Elipse Plant Manager — EPM Web API
Version 6.50.41
epmwebapi.typeevent
Class representing an EPM Event TypeEvents.
Returns raw values from this Event within the configured period.
Parameters
- queryPeriod: An
epmwebapi.queryperiod.QueryPeriodobject with the period of time to query. - where: An optional parameter indicating the where condition to be applied. Default is None.
- select: An optional parameter indicating the selected fields to be returned. Default is ['Time', 'Severity', 'EventId', 'SourceInstanceId','SourceInstance', 'SourceNode', 'PayloadVariables', 'PayloadValues'].
Returns
A numpy NDArray.
Examples
The following examples show how to use historyRead function.
Retrives all events from a period of time:
```python ini_date = dt.datetime.now(dt.timezone.utc) - dt.timedelta(hours=1) end_date = dt.datetime.now(dt.timezone.utc) queryPeriod = epm.QueryPeriod(ini_date, end_date) typeEvent = connection.getTypeEvent('EventName') result = typeEvent.historyRead(queryPeriod)
Retrieves all events from Pump14 in the last hour:
```python
ini_date = dt.datetime.now(dt.timezone.utc) - dt.timedelta(hours=1)
end_date = dt.datetime.now(dt.timezone.utc)
queryPeriod = epm.QueryPeriod(ini_date, end_date)
typeEvent = connection.getTypeEvent('PumpEventName')
where = ElementOperand(Operator.Like, [SimpleAttributeOperand('SourceInstance'), LiteralOperand('Pump14')])
result = typeEvent.historyRead(queryPeriod, where)
Retrieves all Pumps where the Temperature is greater thar 30 degres (Temperature Pump property must be inserted on Payload):
python
ini_date = dt.datetime.now(dt.timezone.utc) - dt.timedelta(hours=1)
end_date = dt.datetime.now(dt.timezone.utc)
queryPeriod = epm.QueryPeriod(ini_date, end_date)
typeEvent = connection.getTypeEvent('PumpEventName')
where = ElementOperand(Operator.Greater, [SimpleAttributeOperand('Temperature'), LiteralOperand(30)])
result = typeEvent.historyRead(queryPeriod, where, ['SourceInstance'])