SELKIELogger  1.0.0
SELKIELogger.SLMessages.SLChannelMap Class Reference

Source and channel map data. More...

Collaboration diagram for SELKIELogger.SLMessages.SLChannelMap:

Classes

class  Channel
 Represents a single channel. More...
 
class  Source
 Represent sources being tracked. More...
 

Public Member Functions

def __init__ (self)
 Initialise blank map.
 
def __getitem__ (self, ix)
 Support subscripted access to sources. More...
 
def __iter__ (self)
 
def __next__ (self)
 
def to_dict (self)
 
def GetSourceName (self, source)
 
def GetChannelName (self, source, channel)
 
def NewSource (self, source, name=None)
 Create or update source. More...
 
def SourceExists (self, source)
 
def ChannelExists (self, source, channel)
 Special cases default channels that must always exist (SLCHAN_NAME, SLCHAN_MAP, SLCHAN_TSTAMP, SLCHAN_LOG_INFO, SLCHAN_LOG_WARN, SLCHAN_LOG_ERR), then checks for the existence of others. More...
 
def SetSourceName (self, source, name)
 Update source name, creating source if required. More...
 
def SetChannelNames (self, source, channels)
 Update channel map for a source, creating if required. More...
 
def UpdateTimestamp (self, source, timestamp)
 Update last timestamp value for a source, creating source if required. More...
 

Private Attributes

 _s
 Dictionary of sources, keyed by ID.
 
 _log
 Logger object for later use.
 

Static Private Attributes

list __slots__ = ["_s", "_log"]
 Explicitly allocate class members.
 

Detailed Description

Source and channel map data.

Definition at line 251 of file SLMessages.py.

Member Function Documentation

◆ __getitem__()

def SELKIELogger.SLMessages.SLChannelMap.__getitem__ (   self,
  ix 
)

Support subscripted access to sources.

Parameters
ixSource ID
Returns
Source object

Definition at line 357 of file SLMessages.py.

◆ __iter__()

def SELKIELogger.SLMessages.SLChannelMap.__iter__ (   self)
Returns
Iterator over sources

Definition at line 367 of file SLMessages.py.

◆ __next__()

def SELKIELogger.SLMessages.SLChannelMap.__next__ (   self)
Returns
next() source

Definition at line 371 of file SLMessages.py.

◆ ChannelExists()

def SELKIELogger.SLMessages.SLChannelMap.ChannelExists (   self,
  source,
  channel 
)

Special cases default channels that must always exist (SLCHAN_NAME, SLCHAN_MAP, SLCHAN_TSTAMP, SLCHAN_LOG_INFO, SLCHAN_LOG_WARN, SLCHAN_LOG_ERR), then checks for the existence of others.

Parameters
sourceSource ID
channelChannel ID
Returns
True if channel exists in specified source

Definition at line 442 of file SLMessages.py.

◆ GetChannelName()

def SELKIELogger.SLMessages.SLChannelMap.GetChannelName (   self,
  source,
  channel 
)
Returns
Formatted channel name
Parameters
sourceSource ID
channelChannel ID

Definition at line 396 of file SLMessages.py.

◆ GetSourceName()

def SELKIELogger.SLMessages.SLChannelMap.GetSourceName (   self,
  source 
)
Parameters
sourceSource ID
Returns
Formatted name for source ID

Definition at line 379 of file SLMessages.py.

◆ NewSource()

def SELKIELogger.SLMessages.SLChannelMap.NewSource (   self,
  source,
  name = None 
)

Create or update source.

Parameters
sourceSource ID
nameSource Name
Returns
None

Definition at line 422 of file SLMessages.py.

◆ SetChannelNames()

def SELKIELogger.SLMessages.SLChannelMap.SetChannelNames (   self,
  source,
  channels 
)

Update channel map for a source, creating if required.

Parameters
sourceSourceID
channelsList of channel names
Returns
None

Definition at line 471 of file SLMessages.py.

◆ SetSourceName()

def SELKIELogger.SLMessages.SLChannelMap.SetSourceName (   self,
  source,
  name 
)

Update source name, creating source if required.

Parameters
sourceSourceID
nameSourceName
Returns
None

Definition at line 459 of file SLMessages.py.

◆ SourceExists()

def SELKIELogger.SLMessages.SLChannelMap.SourceExists (   self,
  source 
)
Parameters
sourceSource ID
Returns
True if source already known

Definition at line 435 of file SLMessages.py.

◆ to_dict()

def SELKIELogger.SLMessages.SLChannelMap.to_dict (   self)
Returns
Dictionary representation of map

Definition at line 375 of file SLMessages.py.

◆ UpdateTimestamp()

def SELKIELogger.SLMessages.SLChannelMap.UpdateTimestamp (   self,
  source,
  timestamp 
)

Update last timestamp value for a source, creating source if required.

Parameters
sourceSource ID
timestampTimestamp value
Returns
None

Definition at line 483 of file SLMessages.py.


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