D | |
DEBUG[0-9], StandardRegisters | |
DEFAULT, StandardTypes | |
Default Objects | |
DEFAULT_BAUDRATE, SerialMessageChannel | |
DEFAULT_CH_TIMEOUT, RoutingMessageChannel | |
DEFAULT_IP_ADR | |
DEFAULT_LINK_UDP_PORT, InmHelper | |
default_msg_factory | |
DEFAULT_REG_ENUM_MSG_TYPES, MessageFactory | |
DEFAULT_RES_ENUM_MSG_TYPES, MessageFactory | |
DEFAULT_SRCADR, InmHelper | |
default_strictness, MessageFactory | |
DEFAULT_TCP_PORT, InetMessageChannel | |
DEFAULT_UDP_PORT | |
default_val_conv, MessageFactory | |
dstadr, MessageHeader | |
DSTADR_SIZE, MessageHeader | |
E | |
Enum Types | |
enum_format_val, MessageFactory | |
Enumerations | |
Exact, Strictness | |
F | |
format, Message | |
format_msg_info | |
format_mval | |
format_mval_0, Message | |
format_str, Message | |
format_type, Message | |
format_val | |
format_val_str | |
Functions | |
Functions and Properties | |
FWID, StandardRegisters | |
FWID_H, StandardRegisters | |
FWID_L, StandardRegisters | |
FWVERSION, StandardRegisters | |
G | |
General Utilities | |
get_format_val_conv, MessageFactory | |
get_format_val_size, MessageFactory | |
get_make_val_int_size, MessageFactory | |
get_next_msg_id, MessageChannel | |
get_selector_keys | |
get_timedelta | |
get_timestamp | |
H | |
HEADER_SIZE, MessageHeader | |
header_to_bytes, InmHelper | |
header_to_hex, InmHelper | |
helper.py | |
Hex, ValueConversions |
Default baud rate to set on the opened serial port.
DEFAULT_BAUDRATE = 38400
If no receive timeout is set on a RoutingMessageChannel, then the timeout set on each of the recv_channels will be DEFAULT_CH_TIMEOUT.
DEFAULT_CH_TIMEOUT = get_timedelta( musecs = 10000 )
Default IP socket address.
DEFAULT_IP_ADR = '127.0.0.1'
Default IP address of internal InetMessageChannel.
DEFAULT_IP_ADR = '127.0.0.1'
Default target UDP port of internal InetMessageChannel.
DEFAULT_LINK_UDP_PORT = 3000
A default instance of MessageFactory.
default_msg_factory = MessageFactory()
Default message types for register identifier enum conversion.
DEFAULT_REG_ENUM_MSG_TYPES = ( StandardTypes.REG_READ, StandardTypes.REG_READ_RES, StandardTypes.INM_REG_READ_RES, StandardTypes.REG_WRITE, StandardTypes.REG_TOGGLE, StandardTypes.REG_RW_EXCH, StandardTypes.REG_WR_EXCH, StandardTypes.REGPAIR_READ, StandardTypes.REGPAIR_READ_RES, StandardTypes.INM_REGPAIR_READ_RES, StandardTypes.REGPAIR_WRITE, StandardTypes.REGPAIR_TOGGLE, StandardTypes.REGPAIR_RW_EXCH, StandardTypes.REGPAIR_WR_EXCH )
Default message types for result code enum conversion.
DEFAULT_RES_ENUM_MSG_TYPES = ( StandardTypes.RESULT, StandardTypes.INM_RESULT )
Default INM source address.
DEFAULT_SRCADR = 99
Default strictness level for multipart message value formatting.
self.default_strictness
Default port number of TCP socket.
DEFAULT_TCP_PORT = 2357
Default port number of UDP socket.
DEFAULT_UDP_PORT = 2357
Default UDP port of internal InetMessageChannel.
DEFAULT_UDP_PORT = 2999
Default conversion for formatted message values.
self.default_val_conv
Destination INM node address.
self.dstadr
Size in bytes of the destination address field in an INM message header.
DSTADR_SIZE = 1
If true, fields known to contain result codes or message type or register identifiers will be converted to the corresponding enum members (from type_enum_class or res_enum_class) when formatting message values.
self.enum_format_val
Applies formatting to the INM message type and value.
def format( self, formatter = None, conv = None )
Provides a standard way to represent INM communication events as strings.
def format_msg_info( obj, event = None, header = None, link_adr = None, event_colw = 0, timestamp = False )
Applies multipart formatting to the INM message value.
def format_mval( self, formatter = None, conv = None, size = None, n_vals = None, strict = None )
Applies multipart formatting to an INM message value.
def format_mval( self, mval, conv = None, size = None, tlv_type = None, n_vals = None, strict = None )
Applies multipart formatting to the INM message value, but returns only the first field.
def format_mval_0( self, formatter = None, conv = None, size = None, n_vals = None, strict = None )
Applies string formatting to the INM message type and value.
def format_str( self, formatter = None )
Applies formatting to the INM message type.
def format_type( self, formatter = None )
Applies formatting to the INM message value.
def format_val( self, formatter = None, conv = None )
Applies formatting to an INM message value.
def format_val( self, val, conv = None, tlv_type = None )
Applies string formatting to the INM message value.
def format_val_str( self, formatter = None )
Applies string formatting to an INM message value.
def format_val_str( self, val, tlv_type = None )
Gets the value formatting conversion specifier associated with a specified message type.
def get_format_val_conv( self, tlv_type, default = None )
Gets the value formatting field sizes associated with a specified message type.
def get_format_val_size( self, tlv_type, default = None )
Gets the value construction integer field sizes associated with a specified message type.
def get_make_val_int_size( self, tlv_type, default = None )
Auto-generates an INM message ID.
def get_next_msg_id( self )
Returns the selector key of the UDP socket.
def get_selector_keys( self )
Gets the selector keys of encapsulated selectable objects from this MessageChannel.
def get_selector_keys( self )
Returns all selector keys obtained by calling the get_selector_keys methods of the channels in recv_channels.
def get_selector_keys( self )
Returns the selector key of the serial port device.
def get_selector_keys( self )
Produces a datetime.timedelta with a specified duration.
def get_timedelta( secs = 0, musecs = 0 )
Produces a datetime.datetime representing the current local time.
get_timestamp = datetime.datetime.now
Size in bytes of a complete INM message header.
HEADER_SIZE = MESSAGE_ID_SIZE + DSTADR_SIZE + SRCADR_SIZE
Constructs an INM message header and returns it as a bytes object.
def header_to_bytes( self, dstadr, msg_id = None, srcadr = None )
Constructs an INM message header and returns it as a list of hex strings.
def header_to_hex( self, dstadr, msg_id = None, srcadr = None )