Source and channel map data.
More...
|
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...
|
|
|
| _s |
| Dictionary of sources, keyed by ID.
|
|
| _log |
| Logger object for later use.
|
|
|
list | __slots__ = ["_s", "_log"] |
| Explicitly allocate class members.
|
|
Source and channel map data.
Definition at line 251 of file SLMessages.py.
◆ __getitem__()
def SELKIELogger.SLMessages.SLChannelMap.__getitem__ |
( |
|
self, |
|
|
|
ix |
|
) |
| |
Support subscripted access to sources.
- Parameters
-
- Returns
- Source object
Definition at line 357 of file SLMessages.py.
◆ __iter__()
def SELKIELogger.SLMessages.SLChannelMap.__iter__ |
( |
|
self | ) |
|
◆ __next__()
def SELKIELogger.SLMessages.SLChannelMap.__next__ |
( |
|
self | ) |
|
◆ 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
-
- 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
-
Definition at line 396 of file SLMessages.py.
◆ GetSourceName()
def SELKIELogger.SLMessages.SLChannelMap.GetSourceName |
( |
|
self, |
|
|
|
source |
|
) |
| |
- Parameters
-
- 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
-
- 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
-
source | SourceID |
channels | List 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
-
source | SourceID |
name | SourceName |
- Returns
- None
Definition at line 459 of file SLMessages.py.
◆ SourceExists()
def SELKIELogger.SLMessages.SLChannelMap.SourceExists |
( |
|
self, |
|
|
|
source |
|
) |
| |
- Parameters
-
- 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
-
source | Source ID |
timestamp | Timestamp value |
- Returns
- None
Definition at line 483 of file SLMessages.py.
The documentation for this class was generated from the following file:
- /home/runner/work/Logger/Logger/python/SELKIELogger/SLMessages.py