The protocol definition language uses a file format which is very similar to that one used with sat-nms device drivers. Like with device drivers the following applies:
/* ... */ and // ... comments).Beside this, each protocol definition file has the same simple structure:
Below, an example for a protocol definition file is shown.
//
// The communication protocol used with SSE devices in NPI mode.
//
COMMENT "SSE-NPI 1.00 020108"
CLASS TTYProtocol
/** packet send procedure ************************************************/
TRANSMIT
CHAR 2 // start byte, STX
CHAR "F" // source (master) LU
CHAR "F"
ADDRESS TEXT // destination (slave) LU, 2 characters
HEXLENGTH 0 // 2 characters hex coded data length
USERDATA // the command string
CHECKSUM SUM8H 1 -1 // checksum 2 characters
CHAR 3 // end byte, ETX
/** packet receive procedure *********************************************/
RECEIVE
START 2 // start byte, STX
ADDRESS TEXT // source (slave) LU
CHAR "F" // destination (master) LU
CHAR "F"
HEXLENGTH 0 // 2 characters hex coded data length
USERDATA // the response string
CHECKSUM SUM8H 1 -1 2 // checksum 2 characters
CHAR 3 // end byte, ETX