system.kanoa.event.addStateEvent
Description
Adds a stateEvent record.Syntax
addStateEvent(stateInfo, userId)- stateInfo (dict)
- - assetId (int)
- - assetStateId (int): Can set this to a sub asset if asset is down due to a downtime fault on a child cell otherwise null
- - stateCode (int)
- - tStamp (string)
- - note (string)
- userId (int)
stateInfo (dictionary).
Code Example
# Example Usage:
stateInfo = {'assetId': 18, 'assetStateId': 18, 'stateCode': 1, 'tStamp': somedate}
userId = 999
stateInfo = system.kanoa.event.addStateEvent(stateInfo, userId)