SELKIELogger  1.0.0
SELKIELogger.SLMessages.SLMessageSource Class Reference

Software message source. More...

Public Member Functions

def __init__ (self, sourceID, name="PythonDL", dataChannels=1, dataChannelNames=None)
 Any valid source must have a source ID, name and a list of named data channels. More...
 
def IDMessage (self)
 
def ChannelsMessage (self)
 
def InfoMessage (self, message)
 
def WarningMessage (self, message)
 
def ErrorMessage (self, message)
 
def TimestampMessage (self)
 Placeholder for timestamp message (Channel 2) More...
 
def DataMessage (self, channelID, data)
 

Public Attributes

 SourceID
 ID number for this source -. More...
 
 Name
 Source Name.
 
 ChannelMap
 Channel Map: Names for all data channels.
 

Detailed Description

Software message source.

Provide a framework for creating valid messages from within Python code. Although this class enforces channel names and provides support for the standard messages (except timestamps), no restriction is placed on the data types used in data messages. See separate documentation for the library to check compatibility.

See also
library/base/sources.h

Definition at line 156 of file SLMessages.py.

Constructor & Destructor Documentation

◆ __init__()

def SELKIELogger.SLMessages.SLMessageSource.__init__ (   self,
  sourceID,
  name = "PythonDL",
  dataChannels = 1,
  dataChannelNames = None 
)

Any valid source must have a source ID, name and a list of named data channels.

Parameters
sourceIDValid data source ID number -
See also
IDs
Parameters
nameSource Name (Default: PythonDL)
dataChannelsNumber of data channels to be created (ID 3+)
dataChannelNamesNames for data channels (First entry = Channel 3)

Definition at line 169 of file SLMessages.py.

Member Function Documentation

◆ ChannelsMessage()

def SELKIELogger.SLMessages.SLMessageSource.ChannelsMessage (   self)
Returns
Channel name map message (Channel 1)

Definition at line 204 of file SLMessages.py.

◆ DataMessage()

def SELKIELogger.SLMessages.SLMessageSource.DataMessage (   self,
  channelID,
  data 
)
Returns
Message representing data from this source
Parameters
channelIDChannel ID (Must correspond to a map entry)
dataMessage data

Definition at line 241 of file SLMessages.py.

◆ ErrorMessage()

def SELKIELogger.SLMessages.SLMessageSource.ErrorMessage (   self,
  message 
)
Returns
ERROR level log message
Parameters
messageMessage text

Definition at line 222 of file SLMessages.py.

◆ IDMessage()

def SELKIELogger.SLMessages.SLMessageSource.IDMessage (   self)
Returns
Source name message (Channel 0)

Definition at line 200 of file SLMessages.py.

◆ InfoMessage()

def SELKIELogger.SLMessages.SLMessageSource.InfoMessage (   self,
  message 
)
Returns
INFO level log message
Parameters
messageMessage text

Definition at line 208 of file SLMessages.py.

◆ TimestampMessage()

def SELKIELogger.SLMessages.SLMessageSource.TimestampMessage (   self)

Placeholder for timestamp message (Channel 2)

Sources should provide a timestamp periodically to allow messages generated at a particular time to be grouped.

Not implemented here

Returns
N/A - Throws NotImplemented exception

Definition at line 229 of file SLMessages.py.

◆ WarningMessage()

def SELKIELogger.SLMessages.SLMessageSource.WarningMessage (   self,
  message 
)
Returns
WARNING level log message
Parameters
messageMessage text

Definition at line 215 of file SLMessages.py.

Member Data Documentation

◆ SourceID

SELKIELogger.SLMessages.SLMessageSource.SourceID

ID number for this source -.

See also
IDs

Definition at line 180 of file SLMessages.py.


The documentation for this class was generated from the following file: