How to Determine the Number of Events in an ETCO
Frame
The informal standard for an ETCO
frame states that it consists of:
- the frame header (ten bytes), followed by
- a Time stamp format (one byte). This is then followed by
- a series of key events of the form
- Type of event (one byte)
- Time stamp (five bytes per event).
To determine the number of events, a program must use the size field of the frame header. The size field indicates the number of bytes of the frame, excluding the frame header. Therefore, the number of events can be calculated by subtracting the size of the time stamp format (one byte) from the frame size.
The $FF
event is a special event that indicates that one more byte of event follows. When this event is encountered, the program should increment the number of events by one.