|
Model Railroad System 2.2.2
|
CMR/I node type. More...
Public Member Functions | |
| CmriNode (name,...) | |
| Constructor – initialize a board. More... | |
| inputs () | |
| Method to fetch input port values. More... | |
| outputs (portvector="") | |
| Method to set output ports. More... | |
| setport (portnum, byte) | |
| Set and send one byte to a port (rewrites all ports). More... | |
| setbitfield (portnum, mask, bits) | |
| Set and send a bitfield to a port (rewrites all ports). More... | |
Static Public Member Functions | |
| static | validate (object) |
| Type validating code Raises an error if object is not either the empty string or a C4TSMINI_Block type. More... | |
| static | openport (port="/dev/ttyS0", baud=9600, maxtries=10000) |
| Open the CMR/I port. More... | |
| static | closeport () |
| Close the CMR/I port. More... | |
| static | portopenp () |
| Return port status. More... | |
Public Attributes | |
| outputbuffer | |
| Output buffer. More... | |
Private Member Functions | |
| _ValidateType (option, value) | |
| Method to validate the card type. More... | |
| _ValidateAddress (option, value) | |
| Method to validate a card address. More... | |
| _ValidateListOfBytes (option, value) | |
| Method to validate a list of bytes. More... | |
| _ValidateSixElementListOfBytes (option, value) | |
| Method to validate a six element list of bytes. More... | |
| _ValidateByte (option, value) | |
| Method to validate a byte value. More... | |
| _ValidateWord (option, value) | |
| Method to validate a word (16-bit) value. More... | |
Static Private Attributes | |
| static | _TypeCodes |
| Node type codes. More... | |
CMR/I node type.
This Snit type defines CMR/I nodes (SUSIC, USIC, or SMINI boards) on a CMR/I network. All options are readonly.
| CmriSupport::CmriNode::CmriNode | ( | name | , |
| ... | |||
| ) |
Constructor – initialize a board.
| name | Name of the node. |
| ... | Options:
|
|
private |
Method to validate a card address.
| option | The option to validate. |
| value | The value to validate. |
|
private |
Method to validate a byte value.
| option | The option to validate. |
| value | The value to validate. |
|
private |
Method to validate a list of bytes.
| option | The option to validate. |
| value | The value to validate. |
|
private |
Method to validate a six element list of bytes.
| option | The option to validate. |
| value | The value to validate. |
|
private |
Method to validate the card type.
| option | The option to validate. |
| value | The value to validate. |
|
private |
Method to validate a word (16-bit) value.
| option | The option to validate. |
| value | The value to validate. |
|
static |
Close the CMR/I port.
This type method closes the CMR/I port.
| CmriSupport::CmriNode::inputs | ( | ) |
Method to fetch input port values.
|
static |
Open the CMR/I port.
This type method opens the CMR/I port.
| port | The serial port connected to the CMR/I network. |
| baud | The BAUD rate to be used. |
| maxtries | The maximum number of retries. |
| CmriSupport::CmriNode::outputs | ( | portvector | = "" | ) |
Method to set output ports.
| portvector | Vector of output ports. |
|
static |
Return port status.
| CmriSupport::CmriNode::setbitfield | ( | portnum | , |
| mask | , | ||
| bits | |||
| ) |
Set and send a bitfield to a port (rewrites all ports).
| portnum | Number of the output port. |
| mask | Bit mask. |
| bits | Bits (must already shifted into position!). |
| CmriSupport::CmriNode::setport | ( | portnum | , |
| byte | |||
| ) |
Set and send one byte to a port (rewrites all ports).
| portnum | Number of the output port. |
| byte | Value to write. |
|
static |
Type validating code Raises an error if object is not either the empty string or a C4TSMINI_Block type.
|
staticprivate |
Node type codes.
| CmriSupport::CmriNode::outputbuffer |
Output buffer.