Model Railroad System
2.2.2
|
A Grid Connect formatted CAN message. More...
Public Member Functions | |
GridConnectMessage (name,...) | |
Constructor: create a Grid Connect Message object. More... | |
setHeader (header) | |
Set the header. More... | |
setByte (val, n) | |
Set a data byte. More... | |
setHexDigit (val, n) | |
Set a hex digit. More... | |
Private Member Functions | |
_set_extended (opt, extended) | |
Configure method for the -extended option. More... | |
_get_extended (opt) | |
CGet method for the -extended option. More... | |
_set_rtr (opt, rtr) | |
Configure method for the -rtr option. More... | |
_get_rtr (opt) | |
CGet method for the -rtr option. More... | |
_copyCM (option, m) | |
Configure method for the -canmessage option. More... | |
A Grid Connect formatted CAN message.
This is an ASCII formatted version of a CAN message, used by some USB connected CAN interface devices.
This class is used to convert from binary CAN Messages to ASCII Grid Connect messages. See GridConnectReply for converting from ASCII Grid Connect messages to binary CAN Messages.
Options:
lcc::GridConnectMessage::GridConnectMessage | ( | name | , |
... | |||
) |
Constructor: create a Grid Connect Message object.
Create a Grid Connect Message. Typically, a CANMessage is configured with the -canmessage option and then the toString method is used to get a printable Grid Connect Message string.
name | The name of the object. |
... | The options:
|
|
private |
Configure method for the -canmessage option.
Copies in a CANMessage and in the process formats a Grid Connect Message string.
option | Always -canmessage. Ignored. |
m | A CANMessage object. |
|
private |
CGet method for the -extended option.
Gets the extended flag character.
opt | Always -extended. Ignored. |
|
private |
CGet method for the -rtr option.
Gets the rtr flag character.
opt | Always -rtr. Ignored. @returnA boolean flag indicating rtrness. |
|
private |
Configure method for the -extended option.
Sets the extended flag character.
opt | Always -extended. Ignored. |
extended | Boolean flag indicating extendedness. |
|
private |
Configure method for the -rtr option.
Sets the rtr flag character.
opt | Always -rtr. Ignored. |
rtr | Boolean flag indicating rtrness. |
References FileEntry::configure().
lcc::GridConnectMessage::setByte | ( | val | , |
n | |||
) |
Set a data byte.
Stores a data byte as two hex digits.
val | The data byte value, 0-255. |
n | The data index, 0-7. |
References FileEntry::cget(), lcc::complete, and lcc::first.
lcc::GridConnectMessage::setHeader | ( | header | ) |
Set the header.
Sets the header. The header is converted to hex digits and stored in the data buffer.
header | The binary 29-bit header. |
lcc::GridConnectMessage::setHexDigit | ( | val | , |
n | |||
) |
Set a hex digit.
Stores a single nibble (0-16) at the specified index as an ASCII hex digit.
val | The nibble (0-16) to store. |
n | The data index. |
References lcc::middle.