SELKIELogger
1.0.0
|
Python representation of a logged message. More...
Public Member Functions | |
def | __init__ (self, sourceID, channelID, data) |
Create message with specified source, channel and data. More... | |
def | unpack (cl, data) |
Unpack raw messagepack bytes or list into SLMessage. More... | |
def | pack (self) |
Return packed binary representation of message. More... | |
def | __repr__ (self) |
Represent class as packed binary data. More... | |
def | __str__ (self) |
Public Attributes | |
SourceID | |
Message Source. More... | |
ChannelID | |
Message Channel. More... | |
Data | |
Message value / embedded data. | |
Static Private Attributes | |
list | __slots__ = ["SourceID", "ChannelID", "Data"] |
Explicitly define members. | |
Python representation of a logged message.
Represent messages stored by the Logger program and generated by devices with compatible firmware.
Messages are 4 element MessagePacked arrays, with the first element a constant 0x55, second and third elements identifying the source and message IDs and the final element containing the data for that message.
Definition at line 75 of file SLMessages.py.
def SELKIELogger.SLMessages.SLMessage.__init__ | ( | self, | |
sourceID, | |||
channelID, | |||
data | |||
) |
Create message with specified source, channel and data.
Note that the C library and utilities only support a limited range of types within these messages. Check the library documentation for details.
sourceID | Message Source |
channelID | Message Channel |
data | Message value / data |
Definition at line 88 of file SLMessages.py.
def SELKIELogger.SLMessages.SLMessage.__repr__ | ( | self | ) |
Represent class as packed binary data.
Definition at line 143 of file SLMessages.py.
def SELKIELogger.SLMessages.SLMessage.__str__ | ( | self | ) |
Definition at line 151 of file SLMessages.py.
def SELKIELogger.SLMessages.SLMessage.pack | ( | self | ) |
Return packed binary representation of message.
Definition at line 136 of file SLMessages.py.
def SELKIELogger.SLMessages.SLMessage.unpack | ( | cl, | |
data | |||
) |
Unpack raw messagepack bytes or list into SLMessage.
If a list is provided, it's expected to correspond to each member of the raw array, i.e. [0x55, sourceID, channelID, data]
cl | Class to be created (classmethod) |
data | Raw bytes or a list of values. |
Definition at line 119 of file SLMessages.py.
SELKIELogger.SLMessages.SLMessage.ChannelID |
SELKIELogger.SLMessages.SLMessage.SourceID |