%SYS.Monitor.AbstractSubscriber
Class %SYS.Monitor.AbstractSubscriber Extends %RegisteredObject [ Abstract, System = 3 ]
Abstract class for a Subscriber
User classes inherit from this class to become a Subscriber for System Monitor.
Properties
Logfile
Property Logfile As %String [ InitialExpression = {$zu(12)_"SystemMonitor.log"}, Internal ];
logfile
SensorReading
Property SensorReading [ MultiDimensional ];
Sensor readings passed from Sensor classes Sensor(, ) = value
SensorName
Property SensorName [ MultiDimensional ];
Sensor subscription lists. If Subscription(type)=1 OR Subscription(name)=1 Subscription()= 1
Notifications
Property Notifications [ MultiDimensional ];
State
Property State As %String [ InitialExpression = " " ];
Runtime state
Methods
Start
Method Start() As %Status
USER MAY IMPLEMENT THIS METHOD This method is called when the subscriber class is created.
Receive
Method Receive() As %Status [ Abstract ]
USER MUST IMPLEMENT THIS METHOD This method is called when the sensor array is filled.
ClearSensors
Method ClearSensors() As %Integer [ Final ]
USER DOES NOT IMPLEMENT THIS METHOD This method is called to clear sensor readings for the SYS.Monitor Controller
GetNextSensor
Method GetNextSensor(Sensor As %String, ByRef qHandle As %Binary, ByRef Qualifier As %String, ByRef Value As %String) As %Integer [ Final ]
USER DOES NOT IMPLEMENT THIS METHOD This method is called to get sensor readings. For a given sensor / qualifier pair, returns the next qualifier and the associated value.
Returns 1 if value, 0 if no more values, -1 if invalid Sensor.
GetSensor
Method GetSensor(Sensor As %String, Qualifier As %String = "", ByRef Value As %String = "") As %Integer [ Final ]
USER DOES NOT IMPLEMENT THIS METHOD This method is called to get sensor readings. For a given sensor / qualifier pair, returns the value.
Returns 1 if value, 0 if no value, -1 if invalid Sensor.
GetNextSensorName
Method GetNextSensorName(ByRef Sensor As %String = "") As %Status [ Final ]
USER DOES NOT IMPLEMENT THIS METHOD This method is called to get sensor names. For a given sensor, returns the next sensor.
Returns sensor name or "" if no more sensors.
ClearNotifications
Method ClearNotifications() As %Integer [ Final ]
USER DOES NOT IMPLEMENT THIS METHOD This method is called to clear notifications for the SYS.Monitor Controller
Notify
Method Notify(Sensor As %String, Severity As %Integer, Msg As %String) As %Integer [ Final ]
USER DOES NOT IMPLEMENT THIS METHOD This method is called to post a notification
OpenLog
Method OpenLog() As %Status [ Final ]
LogMsg
Method LogMsg(msg As %String = "") As %Status
LogCon
Method LogCon(Msg As %String = "", Severity As %Integer = 0) As %Status [ Final ]
GetAllSensors
Method GetAllSensors(ByRef qHandle As %Binary, ByRef Sensor As %String, ByRef Qualifier As %String, ByRef Value As %String) As %Integer [ Final ]
Query method to traverse the SensorReading property. Starting from a null Sensor, returns Sensor, Qualifier, Value, and Sensor Name.
Returns 0 when there are no more sensor readings.