SELKIELogger  1.0.0
SELKIELogger.SLMessages.SLChannelMap.Source Class Reference

Represent sources being tracked. More...

Collaboration diagram for SELKIELogger.SLMessages.SLChannelMap.Source:

Public Member Functions

def __init__ (self, number, name=None, channels=None, lastTimestamp=None)
 Tracked source must be identified by name. More...
 
def __getitem__ (self, ch)
 Support subscripted access to channel names. More...
 
def __iter__ (self)
 Allow iteration over channel list, e.g. More...
 
def __str__ (self)
 Represent source by its name. More...
 

Public Attributes

 id
 Source ID.
 
 name
 Source Name.
 
 channels
 List of channels. More...
 
 lastTimestamp
 Last timestamp received. More...
 

Static Private Attributes

list __slots__ = ["id", "name", "channels", "lastTimestamp"]
 Explicitly allocate class members.
 

Detailed Description

Represent sources being tracked.

Definition at line 259 of file SLMessages.py.

Constructor & Destructor Documentation

◆ __init__()

def SELKIELogger.SLMessages.SLChannelMap.Source.__init__ (   self,
  number,
  name = None,
  channels = None,
  lastTimestamp = None 
)

Tracked source must be identified by name.

Parameters
numberSourceID
nameSource Name
channelsChannel Map
lastTimestampLast source timestamp received

Definition at line 265 of file SLMessages.py.

Member Function Documentation

◆ __getitem__()

def SELKIELogger.SLMessages.SLChannelMap.Source.__getitem__ (   self,
  ch 
)

Support subscripted access to channel names.

Parameters
chChannel ID
Returns
String representing channel name

Definition at line 293 of file SLMessages.py.

◆ __iter__()

def SELKIELogger.SLMessages.SLChannelMap.Source.__iter__ (   self)

Allow iteration over channel list, e.g.

for channel in source:
print(channel)
Returns
Iterator over channel list

Definition at line 310 of file SLMessages.py.

◆ __str__()

def SELKIELogger.SLMessages.SLChannelMap.Source.__str__ (   self)

Represent source by its name.

Returns
Source name

Definition at line 321 of file SLMessages.py.

Member Data Documentation

◆ channels

SELKIELogger.SLMessages.SLChannelMap.Source.channels

List of channels.

Initialised to defaults if not provided.

Definition at line 281 of file SLMessages.py.

◆ lastTimestamp

SELKIELogger.SLMessages.SLChannelMap.Source.lastTimestamp

Last timestamp received.

Initialised to zero if not provided.

Definition at line 288 of file SLMessages.py.


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