| |
- builtins.object
-
- JsonMsg
class JsonMsg(builtins.object) |
|
JsonMsg(mpointId, value, valueType: IasBasicTypes.IasType.IASType, timestamp=datetime.datetime(2023, 12, 29, 6, 34, 36, 792817), operationalMode=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, value, valueType: IasBasicTypes.IasType.IASType, timestamp=datetime.datetime(2023, 12, 29, 6, 34, 36, 792817), operationalMode=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 not provided, it is set to the actual time
It can be either datetime or a ISO-8601 string
@param operationalMode: (OperationalMode) optionally sets a operational mode
for the passed monitor point
- checkStringIsoTimestamp(self, tStamp)
- Check if the passed string represent a ISO timestamp
@param tStamp the string representing a ISO timestamp
@return True if tStamp is a ISO 8601 timestamp,
False otherwise
- dumps(self)
- Return the JSON string to send to the java plugin
- isoTimestamp(self, tStamp)
- Format the passed timestamp as ISO.
The formatting is needed because datetime is formatted
contains microseconds but we use milliseconds precision
@param the datetime to transfor as ISO 8601
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 (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- idJsonParamName = 'monitorPointId'
- operationaModeParamName = 'operMode'
- tStampJsonParamName = 'timestamp'
- valueJsonParamName = 'value'
- valueTypeJsonParamName = 'valueType'
| |