| | |
- builtins.object
-
- JsonMsg
class JsonMsg(builtins.object) |
| |
JsonMsg(mpointId: str, value, valueType: IasBasicTypes.IasType.IASType, timestamp: datetime.datetime | None = None, operationalMode: IasBasicTypes.OperationalMode.OperationalMode | None = None)
Objects of this class encapsulate the field of the message to send
to the java plugin as JSON string
It is the counter part of the java org.eso.ias.plugin.network.MessageDao
The type must be one of types supported by the IAS as defined in
org.eso.ias.types.IASTypes |
| |
Methods defined here:
- __init__(self, mpointId: str, value, valueType: IasBasicTypes.IasType.IASType, timestamp: datetime.datetime | None = None, operationalMode: IasBasicTypes.OperationalMode.OperationalMode | None = None)
- Constructor
@param mpointId: the mpointId of the monitor point
@param value: the value to send to the BSDB
@param valueType: (IASType) the type of the value
@param timestamp: (datetime) the point in time when the value
has been read from the monitored system;
if None, the timestamp is set to the actual time
@param operationalMode: (OperationalMode) optionally sets a operational mode
for the passed monitor point
- dumps(self) -> str
- Return the JSON string to send to the java plugin
- isoTimestamp(self, tStamp: datetime.datetime) -> str
- Format the passed timestamp as ISO.
The formatting is needed because datetime
contains microseconds while ISO 8601 has milliseconds precision
@param the datetime to convert to ISO 8601
@return The ISO 8601 string representation of the passed datetime
Static methods defined here:
- parse(jsonStr)
- Parse the passed string and return a JsonMsg
@param jsonStr the json string representing a message to send to the java plugin
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes defined here:
- idJsonParamName = 'monitorPointId'
- logger = <Logger IasPlugin3.JsonMsg (WARNING)>
- operationaModeParamName = 'operMode'
- tStampJsonParamName = 'timestamp'
- valueJsonParamName = 'value'
- valueTypeJsonParamName = 'valueType'
| |