AlarmOperator Class
(Automation::AlarmOperator)The AlarmOperator triggers an alarm based on default input value More...
Header: | #include <AlarmOperator.h> |
Inherits: | CDPOperator<T> |
Public Functions
AlarmOperator(const CDPPropertyBase &in) | |
virtual | ~AlarmOperator() |
Reimplemented Public Functions
virtual void | Configure(XMLPrimitive *pObjectElement) override |
virtual void | Create(const char *shortName, CDPBaseObject *pParent) override |
virtual void | CreateModel() override |
virtual void | Destroy() override |
virtual void | FillNodeChildren(CDP::StudioAPI::NodeStream &serializer) const override |
virtual const CDPPropertyBase & | GetOutput() override |
virtual unsigned int | Process() override |
virtual unsigned int | Status() const override |
- 18 public functions inherited from CDPOperator
- 17 public functions inherited from CDPOperatorBase
- 46 public functions inherited from CDPBaseObject
- 26 public functions inherited from CDP::StudioAPI::CDPNode
- 22 public functions inherited from CDP::StudioAPI::ICDPNode
Reimplemented Protected Functions
virtual std::string | GetProperty(std::string propertyName) override |
virtual int | ReceiveMessage(void *message) override |
- 1 protected function inherited from CDP::StudioAPI::CDPNode
Additional Inherited Members
- 1 public variable inherited from CDPOperatorBase
- 1 static public member inherited from CDPBaseObject
- 1 protected function inherited from CDP::StudioAPI::CDPNode
- 8 protected variables inherited from CDPOperator
- 5 protected variables inherited from CDPOperatorBase
- 11 protected variables inherited from CDPBaseObject
Detailed Description
The AlarmOperator triggers an alarm based on default input value
An AlarmOperator has no effect on the value. It sets output equal to input.
The AlarmOperator implements an alarm based on best practices from EEMUA Publication 191.
Properties
Property | Description |
---|---|
Ack | Acknowledges the alarm. When toggled from 0 to 1 , RepeatCount is reset to 0 , STATUS_SET and STATUS_REPEATBLOCKED flags are cleared and ALARMACK event is triggered. |
Description | The description of the AlarmOperator. |
OperatorBlocked | Disables or enables the alarm. When toggled from 0 to 1 , Status is updated and the alarm is cleared and acked. This property is controlled by the user. |
ProcessBlocked | Disables or enables the alarm. When toggled from 0 to 1 , Status is updated and the alarm is cleared. This property is controlled by the application. |
RepeatCount | The number of times the alarm has been repeated since last start or ack. |
RepeatCountLimit | The limit of the number of times the alarm can be repeated since last start or ack. If RepeatCount is greater or equal to RepeatCountLimit, RepeatBlocked is set; otherwise RepeatBlocked is cleared. Setting RepeatCountLimit equal to 0 disables repeat counting. |
RepeatBlocked | Disables or enables repeating of the alarm and sets or clears STATUS_REPEATBLOCKED flag. |
RepeatDecrementTime | The decrement time of RepeatCount in seconds . If RepeatDecrementTime is greater than 0 , RepeatCount is decremented after every RepeatDecrementTime. |
InputMask | The mask that is AND'ed with the input before checking Limit. Note: It has no effect on float or double input. |
Limit | Holds the threshold that is compared to the input signal to generate alarm. See LimitType and DelayOn for more information. |
LimitType | The type of the limit. In case of Above the alarm is set when the input is greater or equal to Limit. In case of Below the alarm is set when the input is less than Limit. |
DelayOn | The delay before setting the alarm in seconds. If LimitType is Above then the input has to remain greater or equal than Limit for the whole DelayOn period for the alarm to be set. If LimitType is Below then it has to remain less than Limit. |
DelayOff | The delay before clearing the alarm in seconds. If LimitType is Above then the input has to remain less than Limit - Deadband for the whole delay for the alarm to be set. If LimitType is Below then it has to remain greater or equal to Limit + Deadband. |
Deadband | The deadband of the input which specifies when the alarm is cleared. |
Handle | The handle of the AlarmOperator. |
LastSetTime | The last set time of the alarm. |
ResetTimesActivated | Holds when changed from 0 to 1 , TimesActivated is reset to 0 . |
TimesActivated | The number of times the alarm has been activated. |
Status | The status of the alarm. |
Level | Holds the alarm level. It can be Notify, Warning, Error or Emergency and it dictates the seriousness of the alarm. |
Set | Indicates that the alarm is set. |
Text | The text of the alarm. The alarm text can include CDPTag names formatted as '%name%'. These will be substituted with the corresponding tag value, searching from the alarm's own tags and moving up the hierarchy until the application level. |
Group | The group that this alarm belongs to. Alarm groups can be used to selectively visualize them. |
Arguments
Name | Description |
---|---|
In | The default input value. |
Out | The default output value. |
When operator is used inside a signal its default input is automatically tied to signal's InternalValue or previous operator's output. Its default output is automatically tied to next operator's input or to signal's Value. See also CDP Operator Usage In CDP Signals.
The workings of the AlarmOperator is illustrated on the following chart:
Actual Processing Code of the AlarmOperator
unsigned int AlarmOperator<T>::Process() { d->If_Acked_AckAlarmAndClearRepeatBlockedAndRepeatCount(); d->If_ResetTimesActivatedChangedTrue_ResetTimesActivated(); d->SetOrClearOperatorBlockedStatus(); d->SetOrClearProcessBlockedStatus(); d->If_OperatorBlocked_UnackClearAndBlock(); d->If_ProcessBlocked_ClearAndBlock(); if(!d->IsBlocked()) { d->DecrementRepeatCount(); d->CheckHighLevelAndSetOrClearAlarm(); d->CheckLowLevelAndSetOrClearAlarm(); } d->If_StatusChanged_SendEventsAck_ClearOrSet(); m_output = m_input; if (d->status!=d->lastStatus) if (auto parent = GetParent()) parent->RunInComponentThread([=](){ parent->UpdateStatus(GetNodeID(), d->status); }); d->StoreLastValues(); return Status(); }
See also Argument.
Member Function Documentation
AlarmOperator::AlarmOperator(const CDPPropertyBase &in)
Constructs an AlarmOperator with input in.
[virtual]
AlarmOperator::~AlarmOperator()
Destructs the AlarmOperator
[override virtual]
void AlarmOperator::Configure(XMLPrimitive *pObjectElement)
[override virtual]
void AlarmOperator::Create(const char *shortName, CDPBaseObject *pParent)
Reimplemented from CDPBaseObject::Create().
[override virtual]
void AlarmOperator::CreateModel()
Reimplemented from CDPBaseObject::CreateModel().
[override virtual]
void AlarmOperator::Destroy()
[override virtual]
void AlarmOperator::FillNodeChildren(CDP::StudioAPI::NodeStream &serializer) const
Reimplemented from CDPNode::FillNodeChildren().
[override virtual]
const CDPPropertyBase &AlarmOperator::GetOutput()
Reimplemented from CDPOperatorBase::GetOutput().
Returns the input.
[override virtual protected]
std::string AlarmOperator::GetProperty(std::string propertyName)
Reimplemented from CDPBaseObject::GetProperty().
[override virtual]
unsigned int AlarmOperator::Process()
Reimplemented from CDPOperatorBase::Process().
[override virtual protected]
int AlarmOperator::ReceiveMessage(void *message)
Reimplemented from CDPBaseObject::ReceiveMessage().
[override virtual]
unsigned int AlarmOperator::Status() const
Reimplemented from CDPBaseObject::Status().
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.