|
| def | __init__ (self, sv_properties sv_props, logger, dict app_configuration) |
| | state_variable class initializer:
|
| |
| def | __del__ (self) |
| | Close the services in case they are active.
|
| |
| def | init_pubsub (self) |
| | Initialize the pub/sub if should not set to be skipped.
|
| |
| def | init_oldb (self) |
| | Initialize Oldb if should not set to be skipped.
|
| |
| def | print_entity_attributes (self, heading, entity) |
| | Print the entity attributes in the log.
|
| |
| def | publish_pubsub_with_frequency_constraints (self, sv_set, timestamp_ms) |
| | Publish state variable data in pubsub but constrained to the maximum periodicity defined in the state variable properties.
|
| |
| def | publish_pubsub_no_constraints (self, sv_set) |
| | Publish state variable data in pub/sub network.
|
| |
| def | publish_oldb_with_frequency_constraints (self, sv_set, timestamp_ms) |
| | Publish state variable data in oldb but constrained to the maximum periodicity defined in the state variable properties.
|
| |
| def | publish_oldb_no_constraints (self, sv_set) |
| | Publish state variable data in oldb immediatelly.
|
| |
| def | publish (self, sv_set, timestamp_ms) |
| | Run both publish_pubsub() and publish_oldb()
|
| |
| def | read_pusub (self, value=None) |
| | Read the state variable topic previously subcribed.
|
| |
| def | read_oldb (self) |
| | Read the content of entity datapoints from Oldb and return it as a dictionary.
|
| |
◆ __init__()
| def SimScripts.state_variable.state_variable.__init__ |
( |
|
self, |
|
|
sv_properties |
sv_props, |
|
|
|
logger, |
|
|
dict |
app_configuration |
|
) |
| |
state_variable class initializer:
- Parameters
-
| sv_props | State variable properties data structure |
| logger | Main application logger. |
◆ __del__()
| def SimScripts.state_variable.state_variable.__del__ |
( |
|
self | ) |
|
Close the services in case they are active.
◆ init_oldb()
| def SimScripts.state_variable.state_variable.init_oldb |
( |
|
self | ) |
|
Initialize Oldb if should not set to be skipped.
◆ init_pubsub()
| def SimScripts.state_variable.state_variable.init_pubsub |
( |
|
self | ) |
|
Initialize the pub/sub if should not set to be skipped.
◆ print_entity_attributes()
| def SimScripts.state_variable.state_variable.print_entity_attributes |
( |
|
self, |
|
|
|
heading, |
|
|
|
entity |
|
) |
| |
Print the entity attributes in the log.
◆ publish()
| def SimScripts.state_variable.state_variable.publish |
( |
|
self, |
|
|
|
sv_set, |
|
|
|
timestamp_ms |
|
) |
| |
Run both publish_pubsub() and publish_oldb()
◆ publish_oldb_no_constraints()
| def SimScripts.state_variable.state_variable.publish_oldb_no_constraints |
( |
|
self, |
|
|
|
sv_set |
|
) |
| |
Publish state variable data in oldb immediatelly.
- Parameters
-
| sv_set | {...} dictionary with entity content to be published |
◆ publish_oldb_with_frequency_constraints()
| def SimScripts.state_variable.state_variable.publish_oldb_with_frequency_constraints |
( |
|
self, |
|
|
|
sv_set, |
|
|
|
timestamp_ms |
|
) |
| |
Publish state variable data in oldb but constrained to the maximum periodicity defined in the state variable properties.
It means that although this method can be called more frequently it will only publish in Oldb when the minimum period from the last publishing is met.
- Parameters
-
| sv_set | {...} dictionary with entity content to be published |
| timestamp_ms | int containing the timestamp in milliseconds to be considered in the in the frequency constraints calculations. |
◆ publish_pubsub_no_constraints()
| def SimScripts.state_variable.state_variable.publish_pubsub_no_constraints |
( |
|
self, |
|
|
|
sv_set |
|
) |
| |
Publish state variable data in pub/sub network.
It will publish at every method call. The publishing will be done with keyed topic if the 'pubsub_key' field has the topic key in the properties provided, if None it will publish a keyless topic.
- Parameters
-
| sv_set | {...} dictionary with entity content to be published |
◆ publish_pubsub_with_frequency_constraints()
| def SimScripts.state_variable.state_variable.publish_pubsub_with_frequency_constraints |
( |
|
self, |
|
|
|
sv_set, |
|
|
|
timestamp_ms |
|
) |
| |
Publish state variable data in pubsub but constrained to the maximum periodicity defined in the state variable properties.
It means that although this method can be called more frequently it will only publish in pubsub when the minimum period from the last publishing is met.
- Parameters
-
| sv_set | {...} dictionary with entity content to be published |
| timestamp_ms | int containing the timestamp in milliseconds to be considered in the in the frequency constraints calculations. |
◆ read_oldb()
| def SimScripts.state_variable.state_variable.read_oldb |
( |
|
self | ) |
|
Read the content of entity datapoints from Oldb and return it as a dictionary.
◆ read_pusub()
| def SimScripts.state_variable.state_variable.read_pusub |
( |
|
self, |
|
|
|
value = None |
|
) |
| |
Read the state variable topic previously subcribed.
This method should be called frequently enough to guarantee all data is read.
- Parameters
-
| value | the value to use to filter a keyed topic. |
- Returns
- [{}, ...] list of dictionaries with all entity data available
◆ configuration
| SimScripts.state_variable.state_variable.configuration |
◆ logger
| SimScripts.state_variable.state_variable.logger |
◆ oldb_client
| SimScripts.state_variable.state_variable.oldb_client |
◆ oldb_last_publishing_timestamp_ms
| SimScripts.state_variable.state_variable.oldb_last_publishing_timestamp_ms |
◆ properties
| SimScripts.state_variable.state_variable.properties |
◆ publisher
| SimScripts.state_variable.state_variable.publisher |
PubSub connectivity Build mal properties.
◆ pubsub_last_publishing_timestamp_ms
| SimScripts.state_variable.state_variable.pubsub_last_publishing_timestamp_ms |
◆ subscriber
| SimScripts.state_variable.state_variable.subscriber |
The documentation for this class was generated from the following file: