TNG1
The TNG1 device is a 4 channel EMG signal detector developed by Salomo at the Institute
for Interventional Informatics. The TNG1 device connects to a serial port.
The input stream format decoding is handled by the formatter field
associated with this object. The update function for this object does
nothing. All input stream reading and output stream writing is done
by the Format object associated with this object.
Note that the TNG1 module can be connected to any byte stream. There are no restrictions
on the byte stream source.
NeatToolsModule
|
+-- InputDevice
|
+-- FramedInput
|
+-- TNG1
Input streams
1 byte stream byteIn (inherited from FramedInput class)
Output streams
4 byte streams: channel[0], channel[1], channel[2],
channel[3], and 1 boolean stream frameSynch (frameSynch is inherited from
the FramedInput class)
Fields
Methods
- protected final boolean startFrameFound() -- searches the inputBuffer for the frame delimitter
byte 0xff.
If found, sets the startFrameOffset to the offset it was found and returns true.
Otherwise returns false.
- protected final boolean endFrameFound() -- searches the inputBuffer starting at startOffset+1
for the frame delimitter byte 0xff.
If found sets endFrameOffset to the offset it was
found and returns true. Otherwise returns false.
- protected final void updateOutputStreams() -- sets channel[0] to inputBuffer[startOffset+1], etc.
Then updates the inputBuffer so that the first unprocessed byte is endOffset.
(Currently the DOS Neat software makes the first unprocessed byte endOffset+1,
which results in skipping every other frame).