UAOffNormalAlarm Class
The OffNormalAlarmType is a specialization of the DiscreteAlarmType intended to represent a discrete Condition that is considered to be not normal. This sub type is usually used to indicate that a discrete value is in an Alarm state, it is active as long as a non-normal value is present.
Constructor
UAOffNormalAlarm
()
Item Index
Methods
- (static)UAAcknowledgeableConditionBase.instantiate
- (static)UAAlarmConditionBase.instantiate
- (static)UAOffNormalAlarm.instantiate
- _calculateConditionInfo
- _confirm_branch
- _setEnabledState
- acknowledgeAndAutoConfirmBranch
- activateAlarm
- autoConfirmBranch
- conditionOfNode
- createBranch
- deleteBranch
- desactivateAlarm
- getBranchCount
- getEnabledState
- getEnabledStateAsString
- getInputNodeNode
- getInputNodeValue
- getMaxTimeShelved
- getNormalStateNode
- getNormalStateValue
- getSuppressedOrShelved
- initialize
- isSuppressedOrShelved
- post_initialize
- raiseConditionEvent Raise a Instance Event (see also UAObject#raiseEvent to raise a transient event)
- setLocalTime
- setMaxTimeShelved
- setNormalStateValue
- setReceiveTime
- setTime
Properties
Events
Methods
(static)UAAcknowledgeableConditionBase.instantiate
-
addressSpace
-
conditionTypeId
-
options
-
data
Parameters:
-
addressSpace
AddressSpace -
conditionTypeId
String | NodeId -
options
Object -
data
Object
Returns:
(static)UAAlarmConditionBase.instantiate
-
alarmConditionTypeId
-
options
-
data
Parameters:
-
alarmConditionTypeId
Object -
options
Object-
inputNode
-
optionals
could be "SuppressedState" , "ShelvingState"
-
[maxTimeShelved]
Number | Null optionalmax TimeShelved duration (in ms)
-
-
data
Object
(static)UAOffNormalAlarm.instantiate
-
addressSpace
-
limitAlarmTypeId
-
options
-
data When
Parameters:
-
addressSpace
Object -
limitAlarmTypeId
Object -
options
Object-
inputNode
NodeId | UAVariablethe input node
-
normalState
NodeId | UAVariablethe normalStateNode node
-
-
data When
Objectthe value of inputNode doesn't match the normalState node value, then the alarm is raised.
_calculateConditionInfo
-
stateData
-
isActive
-
value
-
oldCondition
Parameters:
-
stateData
Objectthe new calculated state of the alarm
-
isActive
Boolean -
value
Numberthe new value of the limit alarm
-
oldCondition
ConditionInfogiven for information purpose
-
severity
-
quality
-
message
-
retain
-
Returns:
the new condition info
this method need to be overridden by the instantiate to allow custom message and severity to be set based on specific context of the alarm.
Example:
var myAlarm = addressSpace.instantiateExclusiveLimitAlarm({...}); myAlarm._calculateConditionInfo = function(stateName,value,oldCondition) { var percent = Math.ceil(value * 100); return new ConditionInfo({ message: "Tank is almost " + percent + "% full", severity: 100, quality: StatusCodes.Good }); };
_confirm_branch
-
eventId
-
comment
-
branch
-
message
Parameters:
-
eventId
Object -
comment
Object -
branch
Object -
message
Object
_setEnabledState
-
requestedEnabledState
Parameters:
-
requestedEnabledState
Boolean
Returns:
StatusCodes.Good if successful or BadConditionAlreadyEnabled/BadConditionAlreadyDisabled
acknowledgeAndAutoConfirmBranch
-
branch
-
comment
Parameters:
-
branch
Object -
comment
Object
activateAlarm
()
autoConfirmBranch
-
branch
-
comment
Parameters:
-
branch
Object -
comment
Object
desactivateAlarm
()
getBranchCount
()
Number
Returns:
getEnabledState
()
Boolean
Returns:
getEnabledStateAsString
()
String
Returns:
getInputNodeNode
()
BaseNode
Returns:
return the node in the address space pointed by the inputNode value
Note: please note the difference between alarm.inputNode
- alarm.inputNode is a UAVariable property of the alarm object holding the nodeid of the input node in its value.
- getInputNodeNode() is the UAVariable that contains the value that affects the state of the alarm and whose node id is stored in alarm.inputNode
getInputNodeValue
()
Returns:
getMaxTimeShelved
()
Duration
Returns:
getNormalStateValue
()
Any
Returns:
getSuppressedOrShelved
()
Boolean
Returns:
initialize
()
private
isSuppressedOrShelved
()
Boolean
Returns:
post_initialize
()
private
raiseConditionEvent
Raise a Instance Event
(see also UAObject#raiseEvent to raise a transient event)
-
branch
Parameters:
-
branch
ConditionSnapshot
setLocalTime
-
time
Parameters:
-
time
Date
setMaxTimeShelved
-
duration
Parameters:
-
duration
Object( Duration in Milliseconds)
setNormalStateValue
-
value
Parameters:
-
value
Object
setReceiveTime
-
time
Parameters:
-
time
Date
setTime
-
time
Parameters:
-
time
Date
Properties
ackedState
TwoStateVariable
acknowledge
UAMethod
confirm
UAMethod
confirmedState
TwoStateVariable
inputNode
UAVariable
dataType is DataType.NodeId
The InputNode Property provides the NodeId of the Variable the Value of which is used as primary input in the calculation of the Alarm state. If this Variable is not in the AddressSpace, a Null NodeId shall be provided. In some systems, an Alarm may be calculated based on multiple Variables Values; it is up to the system to determine which Variable’s NodeId is used.
maxTimeShelved
UAVariable
The optional Property MaxTimeShelved is used to set the maximum time that an Alarm Condition may be shelved. The value is expressed as duration. Systems can use this Property to prevent permanent Shelving of an Alarm. If this Property is present it will be an upper limit on the duration passed into a TimedShelve Method call. If a value that exceeds the value of this property is passed to the TimedShelve Method, than a Bad_ShelvingTimeOutOfRange error code is returned on the call. If this Property is present it will also be enforced for the OneShotShelved state, in that an Alarm Condition will transition to the Unshelved state from the OneShotShelved state if the duration specified in this Property expires following a OneShotShelve operation without a change of any of the other items associated with the Condition.
shelvingState
UAShelvingStateMachine
ShelvingState suggests whether an Alarm shall (temporarily) be prevented from being displayed to the user. It is quite often used to block nuisance Alarms.
suppressedState
UATwoStateVariable
SuppressState is used internally by a Server to automatically suppress Alarms due to system specific reasons. For example a system may be configured to suppress Alarms that are associated with machinery that is shutdown, such as a low level Alarm for a tank that is currently not in use.
Events
acknowledged
Event Payload:
-
eventId
Buffer | Null -
comment
LocalizedText -
branch
ConditionSnapshotraised when the alarm branch has been acknowledged
confirmed
Event Payload:
-
eventId
Object -
comment
Object -
eventId raised
Objectwhen the alarm branch has been confirmed