DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
Public Member Functions | |
None | __init__ (self) |
None | __post_init__ (self) |
None | publish (self, Msg message, dict[str, str]|None custom_origin=None, int|str|None level=None) |
None | check_publisher (self) |
str | extract_topic (self, Msg message) |
OpMonId | make_origin (self, str session, str app) |
dict[str, str] | validate_custom_origin (self, dict[str, str]|None custom_origin=None) |
dict | make_data (self, Msg message, str top_block="") |
OpMonValue | to_map (self, int|float|bool|str value, int field_type) |
OpMonEntry | to_entry (self, Msg message, dict[str, str]|None custom_origin) |
int | log_level_to_int (self, str|int level) |
str | log_level_to_str (self, str|int level) |
Public Attributes | |
ts = Timestamp() | |
substructure = None | |
log | |
conf | |
publisher = "OpMon configuration must be of type OpMonConf." | |
default_topic | |
tuple | publisher |
Base class for OpMon publishers.
Definition at line 18 of file publisher_base.py.
None opmonlib.publisher_base.OpMonPublisherBase.__init__ | ( | self | ) |
Construct the publisher.
Reimplemented in opmonlib.publisher.OpMonPublisher, and OpMonPublisher.OpMonPublisher.
Definition at line 22 of file publisher_base.py.
None opmonlib.publisher_base.OpMonPublisherBase.__post_init__ | ( | self | ) |
Perform post-init checks.
Definition at line 28 of file publisher_base.py.
None opmonlib.publisher_base.OpMonPublisherBase.check_publisher | ( | self | ) |
Validate that the publisher has a valid method to send messages.
Definition at line 57 of file publisher_base.py.
str opmonlib.publisher_base.OpMonPublisherBase.extract_topic | ( | self, | |
Msg | message ) |
Extract the target topic from the message.
Definition at line 67 of file publisher_base.py.
int opmonlib.publisher_base.OpMonPublisherBase.log_level_to_int | ( | self, | |
str | int | level ) |
Convert the log level to the equivalent level in python logging as an int.
Definition at line 145 of file publisher_base.py.
str opmonlib.publisher_base.OpMonPublisherBase.log_level_to_str | ( | self, | |
str | int | level ) |
Convert the log level to the equivalent level in python logging as a str.
Definition at line 162 of file publisher_base.py.
dict opmonlib.publisher_base.OpMonPublisherBase.make_data | ( | self, | |
Msg | message, | ||
str | top_block = "" ) |
Map each message entry to the correct data type.
Definition at line 91 of file publisher_base.py.
OpMonId opmonlib.publisher_base.OpMonPublisherBase.make_origin | ( | self, | |
str | session, | ||
str | app ) |
Construct and return the OpMonId.
Definition at line 72 of file publisher_base.py.
None opmonlib.publisher_base.OpMonPublisherBase.publish | ( | self, | |
Msg | message, | ||
dict[str, str] | None | custom_origin = None, | ||
int | str | None | level = None ) |
Publish an OpMonEntry to the relevant location.
Reimplemented in opmonlib.publisher.OpMonPublisher, and OpMonPublisher.OpMonPublisher.
Definition at line 48 of file publisher_base.py.
OpMonEntry opmonlib.publisher_base.OpMonPublisherBase.to_entry | ( | self, | |
Msg | message, | ||
dict[str, str] | None | custom_origin ) |
Pack all the data that needs to be published to an OpMonEntry.
Definition at line 132 of file publisher_base.py.
OpMonValue opmonlib.publisher_base.OpMonPublisherBase.to_map | ( | self, | |
int | float | bool | str | value, | ||
int | field_type ) |
Map the data entry to the correct protobuf format.
Definition at line 108 of file publisher_base.py.
dict[str, str] opmonlib.publisher_base.OpMonPublisherBase.validate_custom_origin | ( | self, | |
dict[str, str] | None | custom_origin = None ) |
Validate that each custom_origin entry is a str.
Definition at line 76 of file publisher_base.py.
opmonlib.publisher_base.OpMonPublisherBase.conf |
Definition at line 33 of file publisher_base.py.
opmonlib.publisher_base.OpMonPublisherBase.default_topic |
Definition at line 42 of file publisher_base.py.
opmonlib.publisher_base.OpMonPublisherBase.log |
Definition at line 30 of file publisher_base.py.
opmonlib.publisher_base.OpMonPublisherBase.publisher = "OpMon configuration must be of type OpMonConf." |
Definition at line 39 of file publisher_base.py.
tuple opmonlib.publisher_base.OpMonPublisherBase.publisher |
Definition at line 59 of file publisher_base.py.
opmonlib.publisher_base.OpMonPublisherBase.substructure = None |
Definition at line 25 of file publisher_base.py.
opmonlib.publisher_base.OpMonPublisherBase.ts = Timestamp() |
Definition at line 24 of file publisher_base.py.