Source

protocol-example / protocol4.0.py

"""
This is a test protocol, that contains a few messages for illustration
"""
from ptypes import i16, i64, string

#Tokens
string('message')
i64('timestamp')
i16('signal')
i16('voltage')

#Messages
LOG = ('A log message containing some debug info', 
	    0x023, timestamp, message, signal, voltage)
ALIVE = ('A message to signal that the terminal alive', 
        0x021, timestamp)