C++ Based OPC UA Client/Server SDK
1.6.1.391
|
Implements OPC UA Variables of the type TwoStateVariableType. More...
#include <opcua_twostatevariabletype.h>
Inherits OpcUa::StateVariableType.
Public Member Functions | |
TwoStateVariableType (UaNode *pParentNode, UaVariable *pInstanceDeclarationVariable, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class TwoStateVariableType based on an instance declaration variable. More... | |
TwoStateVariableType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, const UaVariant &initialValue, OpcUa_Byte accessLevel, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class TwoStateVariableType with the passed attribute values. More... | |
TwoStateVariableType (UaBase::Variable *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class TwoStateVariableType with all components. More... | |
virtual UaNodeId | typeDefinitionId () const |
Returns the type definition NodeId for the TwoStateVariableType. | |
virtual void | setEffectiveTransitionTime (const UaDateTime &EffectiveTransitionTime) |
Sets the EffectiveTransitionTime value. More... | |
virtual UaDateTime | getEffectiveTransitionTime () const |
Returns the value of EffectiveTransitionTime. More... | |
virtual void | setFalseState (const UaLocalizedText &FalseState) |
Sets the FalseState value. More... | |
virtual UaLocalizedText | getFalseState (Session *pSession) const |
Returns the value of FalseState. More... | |
virtual void | setId (const UaVariant &Id) |
Sets the Id value. More... | |
virtual UaVariant | getId () const |
Returns the value of Id. More... | |
virtual void | setIdBoolean (OpcUa_Boolean Id) |
Sets the Id value. More... | |
virtual OpcUa_Boolean | getIdBoolean () const |
Gets the Id value. More... | |
virtual void | setTransitionTime (const UaDateTime &TransitionTime) |
Sets the TransitionTime value. More... | |
virtual UaDateTime | getTransitionTime () const |
Returns the value of TransitionTime. More... | |
virtual void | setTrueState (const UaLocalizedText &TrueState) |
Sets the TrueState value. More... | |
virtual UaLocalizedText | getTrueState (Session *pSession) const |
Returns the value of TrueState. More... | |
virtual OpcUa::PropertyType * | getEffectiveTransitionTimeNode () |
Returns the EffectiveTransitionTime node. More... | |
virtual OpcUa::PropertyType * | getFalseStateNode () |
Returns the FalseState node. More... | |
virtual OpcUa::PropertyType * | getIdNode () |
Returns the Id node. More... | |
virtual OpcUa::PropertyType * | getTransitionTimeNode () |
Returns the TransitionTime node. More... | |
virtual OpcUa::PropertyType * | getTrueStateNode () |
Returns the TrueState node. More... | |
virtual void | useAccessInfoFromType () |
Applys the NodeAccessInfo set at the Base and its children. More... | |
void | useAccessInfoFromInstance (TwoStateVariableType *pInstance) |
Uses the NodeAccessInfo of pOther and its children. More... | |
void | setTwoStateDisplayNames (TwoStateDisplayNames *m_pTwoStateDisplayNames) |
Sets the object containing the display names for the two states. More... | |
void | setState (OpcUa_Boolean state) |
Sets the state of the TwoStateVariable as boolean value. More... | |
OpcUa_Boolean | getState () |
Gets the state of the TwoStateVariable as boolean value. | |
UaDataValue | value (Session *pSession) |
Gets the current value for the DataVariable. More... | |
UaLocalizedText | getStateName (Session *pSession) |
Returns the state name for the current state of the variable. | |
UaLocalizedText | getStateName (Session *pSession, OpcUa_Boolean state) |
Returns the state name for the passed state. | |
Public Member Functions inherited from OpcUa::StateVariableType | |
StateVariableType (UaNode *pParentNode, UaVariable *pInstanceDeclarationVariable, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class StateVariableType based on an instance declaration variable. More... | |
StateVariableType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, const UaVariant &initialValue, OpcUa_Byte accessLevel, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class StateVariableType with the passed attribute values. More... | |
StateVariableType (UaBase::Variable *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class StateVariableType with all components. More... | |
virtual void | setEffectiveDisplayName (const UaLocalizedText &EffectiveDisplayName) |
Sets the EffectiveDisplayName value. More... | |
virtual UaLocalizedText | getEffectiveDisplayName (Session *pSession) const |
Returns the value of EffectiveDisplayName. More... | |
virtual void | setName (const UaQualifiedName &Name) |
Sets the Name value. More... | |
virtual UaQualifiedName | getName () const |
Returns the value of Name. More... | |
virtual void | setNumber (OpcUa_UInt32 Number) |
Sets the Number value. More... | |
virtual OpcUa_UInt32 | getNumber () const |
Returns the value of Number. More... | |
virtual OpcUa::PropertyType * | getEffectiveDisplayNameNode () |
Returns the EffectiveDisplayName node. More... | |
virtual OpcUa::PropertyType * | getNameNode () |
Returns the Name node. More... | |
virtual OpcUa::PropertyType * | getNumberNode () |
Returns the Number node. More... | |
void | useAccessInfoFromInstance (StateVariableType *pInstance) |
Uses the NodeAccessInfo of pOther and its children. More... | |
Public Member Functions inherited from OpcUa::BaseDataVariableType | |
BaseDataVariableType (UaNode *pParentNode, UaVariable *pInstanceDeclarationVariable, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class BaseDataVariableType based on an instance declaration variable. More... | |
BaseDataVariableType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, const UaVariant &initialValue, OpcUa_Byte accessLevel, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class BaseDataVariableType with the passed attribute values. More... | |
BaseDataVariableType (UaBase::Variable *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class BaseDataVariableType with all components. More... | |
void | useAccessInfoFromInstance (BaseDataVariableType *pInstance) |
Uses the NodeAccessInfo of pOther and its children. More... | |
Public Member Functions inherited from OpcUa::BaseVariableType | |
BaseVariableType (UaNode *pParentNode, UaVariable *pInstanceDeclarationVariable, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class BaseVariableType based on an instance declaration variable. More... | |
BaseVariableType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, const UaVariant &initialValue, OpcUa_Byte accessLevel, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class BaseVariableType with the passed attribute values. More... | |
UaReferenceLists * | getUaReferenceLists () const |
Get a ReferenceList where all the Nodes are in. More... | |
UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References) |
Discover the references of a specified node of a view. More... | |
UaNodeId | nodeId () const |
Get the NodeId for the DataVariable. More... | |
virtual UaQualifiedName | browseName () const |
Get the browseName as QualifiedName of the current Node. More... | |
virtual UaLocalizedText | displayName (Session *pSession) const |
Get the displayName as LocalizedText of the current Node. More... | |
virtual OpcUa_Boolean | isDescriptionSupported () const |
Check if Node is DescriptionSupported. More... | |
virtual UaLocalizedText | description (Session *pSession) const |
Get the description as LocalizedText of the current Node. More... | |
virtual OpcUa_Boolean | isWriteMaskSupported () const |
Check if Node is WriteMaskSupported. More... | |
virtual OpcUa_UInt32 | writeMask () const |
Get the writeMask of the current Node. More... | |
virtual OpcUa_Boolean | isUserWriteMaskSupported () const |
Check if Node is UserWriteMaskSupported. More... | |
virtual OpcUa_UInt32 | userWriteMask (Session *pSession) const |
Get the WriteMask of the User. More... | |
virtual UaStatus | setValue (Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel) |
Sets the current value for the DataVariable. More... | |
virtual UaNodeId | dataType () const |
Get the DataType for the DataVariable. More... | |
virtual OpcUa_Int32 | valueRank () const |
Get the ValueRank for the DataVariable. More... | |
virtual OpcUa_Boolean | isArrayDimensionsSupported () const |
Check if the Node is ArrayDimensionsSupported. More... | |
virtual void | arrayDimensions (UaUInt32Array &arrayDimensions) const |
Get the arrayDimensions value for the passed UaNode. More... | |
virtual OpcUa_Byte | accessLevel () const |
Get the AccessLevel for the DataVariable. More... | |
virtual OpcUa_Byte | userAccessLevel (Session *pSession) const |
Get the UserAccessLevel for the DataVariable. More... | |
virtual OpcUa_Boolean | isMinimumSamplingIntervalSupported () const |
Check whether a minimum sampling interval is supported. More... | |
virtual OpcUa_Double | minimumSamplingInterval () const |
Get the minimum sampling interval of the Node. More... | |
virtual OpcUa_Boolean | historizing () const |
Indicates if historizing is available or not. More... | |
virtual void | setBrowseName (const UaQualifiedName &browseName) |
Sets the browse name attribute value. | |
virtual void | setDisplayName (const UaLocalizedText &displayName) |
Sets the display name attribute value. | |
virtual void | setDescription (const UaLocalizedText &description) |
Sets the description attribute value. | |
virtual void | setWriteMask (OpcUa_UInt32 writeMask) |
Sets the write mask attribute value. | |
virtual void | setDataType (const UaNodeId &dataType) |
Sets the data type attribute value. | |
virtual void | setValueRank (OpcUa_Int32 valueRank) |
Sets the value rank attribute value. More... | |
virtual void | setArrayDimensions (const UaUInt32Array &arrayDimensions) |
Sets the array dimensions attribute value. | |
virtual void | setAccessLevel (OpcUa_Byte accessLevel) |
Sets the access level attribute value. | |
virtual void | setMinimumSamplingInterval (OpcUa_Double minimumSamplingInterval) |
Sets the minimum sampling interval attribute value. | |
virtual void | setHistorizing (OpcUa_Boolean historizing) |
Sets the historizing attribute value. | |
virtual void | setModellingRuleId (const UaNodeId &modellingRuleId) |
Set NodeId of the modeling rule for this node. More... | |
virtual UaNodeId | modellingRuleId () const |
Get NodeId of the modeling rule for this node. More... | |
UaNode * | getUaNode () const |
Get the Node. More... | |
virtual OpcUa_UInt32 | valueHandling () const |
Get the mode for the handling of the value attribute. More... | |
virtual void | setValueHandling (OpcUa_UInt32 valueHandling) |
Set the mode for the handling of the value attribute. More... | |
virtual void | setInvalid () |
Set the variable to invalid. More... | |
virtual void | setUserData (UserDataBase *pUserData) |
Method to set user data stored in this class. More... | |
virtual UserDataBase * | getUserData () const |
Method to get the user data stored in this class. More... | |
virtual UaStatus | setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, NodeAccessInfo *pDefaultPermissions, OpcUa_Boolean checkWriteMask) |
Sets the value of an attribute of the Node. More... | |
Public Member Functions inherited from UaVariableCache | |
UaVariableCache () | |
Constructes a cache variable with default settings. | |
UaVariableCache (UaMutexRefCounted *pSharedMutex) | |
Constructes a cache variable with default settings using the passed shared mutex. | |
void | addCacheSignal (CacheSignal *pCacheSignal) |
Add a cache item. More... | |
void | removeCacheSignal (CacheSignal *pCacheSignal) |
Remove a cache item. More... | |
void | signalChange () |
Signal change to all cache items. | |
OpcUa_UInt32 | signalCount () |
Get the count of connected monitored items. More... | |
OpcUa_UInt32 | getMinSamplingInterval () |
Get the minimum sampling interval requested. More... | |
VariableHandle * | pVariableHandle () |
Return the VariableHandle for the DataVariable. More... | |
virtual void | setSharedMutex (UaMutexRefCounted *pSharedMutex) |
Set a shared mutex used for multiple variables to reduce resource consumption. More... | |
UaMutexRefCounted * | getSharedMutex () |
Returns the shared mutex used for multiple variables to reduce resource consumption. | |
void | getHandleIOVariableList (std::list< OpcUa_UInt32 > &handles) |
Returns a list of IOManager handles for the connected IOVariable CacheSignals. More... | |
Public Member Functions inherited from UaVariable | |
UaVariable () | |
construction | |
OpcUa_NodeClass | nodeClass () const |
Get the NodeClass of the current Node. More... | |
virtual void | getAttributeValue (Session *pSession, OpcUa_Int32 attributeId, NodeAccessInfo *pDefaultPermissions, UaDataValue &uaDataValue) |
Gets the value of an attribute of the Node. More... | |
Public Member Functions inherited from UaNode | |
UaNode () | |
Construction of the UaNode. More... | |
virtual UaNodeId | getKey () const |
Get the key of the node used for the hash table. More... | |
virtual const NodeAccessInfo * | getAccessInfo () const |
Returns the access info for this node. More... | |
virtual void | useAccessInfoFrom (const UaNode *pOther) |
Set the NodeAccessInfo from another node to this node. More... | |
virtual void | setAccessInfo (NodeAccessInfo *pAccessInfo) |
Set the NodeAccessInfo for this node. More... | |
virtual void | attachAccessInfo (NodeAccessInfo *pAccessInfo) |
Set the NodeAccessInfo for this node. More... | |
Public Member Functions inherited from ChainEntry | |
ChainEntry () | |
construction | |
ChainEntry * | find (const UaNodeId &key, ChainEntry **ppPrevious) |
finds the right entry in the chain. More... | |
void | add (ChainEntry *pNewEntry) |
adds a new entry to the list. More... | |
void | prepend (ChainEntry *pNewEntry) |
prepends a new entry to the list. More... | |
ChainEntry * | remove (const UaNodeId &key, ChainEntry **ppNext) |
removes an entry from the list. More... | |
ChainEntry * | getNext () const |
Check if there is a chain. More... | |
void | clearChain () |
Clear the chain when the hashtable is cleared. | |
Public Member Functions inherited from ReferenceCounter | |
ReferenceCounter () | |
construction | |
virtual | ~ReferenceCounter () |
destruction | |
Public Member Functions inherited from UaReferenceLists | |
UaReferenceLists () | |
Constructs the reference lists object. | |
virtual | ~UaReferenceLists () |
Destroys the reference lists object. | |
virtual UaStatus | browseReferences (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References) |
Discover the references of a specified node of a view. More... | |
virtual UaStatus | translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets) |
Find a node based on an element of an relative path. More... | |
virtual const UaReference * | pTargetNodes () const |
Returns the list of references to target nodes. More... | |
virtual const UaReference * | pSourceNodes () const |
Returns the list of references to source nodes. More... | |
virtual UaNode * | getTargetNodeByBrowseName (const UaQualifiedName &browseName) const |
Searches a target node with the passed browse name and returns the UaNode interface if found. More... | |
virtual void | addTargetNode (UaReference *pReference) |
Add a reference to a target node where this node is the source node. More... | |
virtual void | addSourceNode (UaReference *pReference) |
Adds a reference to a source node where this node is the target node. More... | |
virtual UaStatus | removeSourceNode (UaReference *pReferenceToRemove) |
Remove a reference to a source node where this node is the target node. More... | |
virtual bool | removeSourceReference (UaReference *pReferenceToRemove) |
Remove the passed reference to a source node. More... | |
virtual UaStatus | removeTargetNode (UaNode *pTargetNode, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional) |
Remove a reference to a target node where this node is the source node. More... | |
virtual UaStatus | removeTargetNode (const UaNodeId &targetNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional) |
Remove a reference to a target node where this node is the source node. More... | |
virtual bool | removeTargetReference (UaReference *pReferenceToRemove) |
Remove the passed reference to a target node. More... | |
virtual UaStatus | removeCrossNodeManagerRef (NodeManager *pNodeManager) |
Remove references to another NodeManager. More... | |
virtual UaStatus | invalidateSourceReferences (OpcUa_Boolean deleteSourceReferences) |
Set all references from SourceNodes to this Node invalid. More... | |
virtual UaStatus | invalidateTargetReferences (OpcUa_Boolean deleteTargetReferences) |
Set all references to TargetNode of this node invalid. More... | |
virtual UaStatus | deleteAllChildren (NodeManagerConfig *pNodeManagerConfig) |
Deletes all child nodes. More... | |
Static Public Member Functions | |
static void | createTypes () |
Create the related type nodes. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Static Public Member Functions inherited from OpcUa::StateVariableType | |
static void | createTypes () |
Create the related type nodes. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Static Public Member Functions inherited from OpcUa::BaseDataVariableType | |
static void | createTypes () |
Create the related type nodes. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Static Public Member Functions inherited from OpcUa::BaseVariableType | |
static void | createTypes () |
Create the related type nodes. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Protected Member Functions | |
virtual | ~TwoStateVariableType () |
Destroys the TwoStateVariableType object. More... | |
Protected Member Functions inherited from OpcUa::StateVariableType | |
virtual | ~StateVariableType () |
Destroys the StateVariableType object. More... | |
Protected Member Functions inherited from OpcUa::BaseDataVariableType | |
virtual | ~BaseDataVariableType () |
Destroys the BaseDataVariableType object. More... | |
Protected Member Functions inherited from OpcUa::BaseVariableType | |
virtual | ~BaseVariableType () |
Destruction. | |
Protected Member Functions inherited from UaVariableCache | |
virtual | ~UaVariableCache () |
Destroyes the cache variable object. | |
Protected Member Functions inherited from UaVariable | |
virtual | ~UaVariable () |
destruction | |
Protected Member Functions inherited from UaNode | |
virtual | ~UaNode () |
Destruction of the UaNode. More... | |
Protected Member Functions inherited from ChainEntry | |
virtual | ~ChainEntry () |
destruction | |
Additional Inherited Members | |
Protected Attributes inherited from UaReferenceLists | |
UaReference * | m_pTargetNodes |
List of references to target nodes where this node is the source node. More... | |
UaReference * | m_pLastTargetNode |
Last references in the list of references to the target nodes. More... | |
UaReference * | m_pSourceNodes |
List of references to source nodes where this node is the target node. More... | |
Implements OPC UA Variables of the type TwoStateVariableType.
Variable members of the TwoStateVariableType:
Browse Name | DataType | TypeDefinition | Modelling Rule | See Also |
---|---|---|---|---|
EffectiveTransitionTime | UtcTime | PropertyType | Optional | getEffectiveTransitionTime, setEffectiveTransitionTime |
FalseState | LocalizedText | PropertyType | Optional | getFalseState, setFalseState |
TransitionTime | UtcTime | PropertyType | Optional | getTransitionTime, setTransitionTime |
TrueState | LocalizedText | PropertyType | Optional | getTrueState, setTrueState |
Most states defined in the OPC UA Specification are simple – i.e. they are either TRUE or FALSE. The TwoStateVariableType is introduced specifically for this use case. More complex states are modelled by using a StateMachineType. The TwoStateVariableType is derived from the StateVariableType. The Value Attribute of a TwoStateVariable contains the current state as a human readable name. The EnabledState for example, might contain the name “Enabled” when TRUE and “Disabled” when FALSE.
The optional Property EffectiveDisplayName from the StateVariableType is used if a state has substates. It contains a human readable name for the current state after taking the state of any SubStateMachines in account. As an example, the EffectiveDisplayName of the EnabledState could contain “Active/HighHigh” to specify that the Condition is active and has exceeded the HighHigh limit.
A HasTrueSubState Reference is used to indicate that the TRUE state has substates.
A HasFalseSubState Reference is used to indicate that the FALSE state has substates.
See also TwoStateVariableType for a documentation of the complete Information Model.
|
protectedvirtual |
Destroys the TwoStateVariableType object.
The destructor is protected since the object is reference counted. It is not possible to delete the object directly.
If the node was added successfully to a NodeManager, it can only be deleted by deleting the node from the NodeManager. If the node was not added to a NodeManager or adding the node failed, the node can be deleted by releasing the reference to the node. In addition potential children should be deleted before releasing the reference. The two variations are shown in the following sample code.
OpcUa::TwoStateVariableType::TwoStateVariableType | ( | UaNode * | pParentNode, |
UaVariable * | pInstanceDeclarationVariable, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Constructs an instance of the class TwoStateVariableType based on an instance declaration variable.
This constructor is used if the variable is created based on an instance declaration of an object or variable type. Since the only difference between the instance declaration variable and the instance variable are the NodeId and the Value, the pointer to the instance declaration node is used to get the attribute values other than the attributes NodeId and Value from the instance declaration node.
The variable is reference counted and can not be deleted directly. The reference counter is set to one after the variable is created. If the variable was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the variable was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the variable must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.
[in] | pParentNode | Parent node of the new variable |
[in] | pInstanceDeclarationVariable | UaVariable interface of the instance declaration node used to provide attribute values other than NodeId and Value |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the variable. Can be NULL if no shared mutex is provided |
OpcUa::TwoStateVariableType::TwoStateVariableType | ( | const UaNodeId & | nodeId, |
const UaString & | name, | ||
OpcUa_UInt16 | browseNameNameSpaceIndex, | ||
const UaVariant & | initialValue, | ||
OpcUa_Byte | accessLevel, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Constructs an instance of the class TwoStateVariableType with the passed attribute values.
This constructor is used if the variable is not created based on an instance declaration. It defines the name, nodeId, initial value and access level of the variable. Additional language specific names and other attribute values can be set with set methods provided by the class. The variable is reference counted and can not be deleted directly. The reference counter is set to one after the variable is created. If the variable was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the variable was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the variable must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.
[in] | nodeId | NodeId of the new variable |
[in] | name | Name of the new variable. Used as browse name and also as display name if no additional language specific names are set. |
[in] | browseNameNameSpaceIndex | Namespace index used for the browse name |
[in] | initialValue | Initial value for the Variable |
[in] | accessLevel | Access level for the Variable |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the variable. Can be NULL if no shared mutex is provided |
OpcUa::TwoStateVariableType::TwoStateVariableType | ( | UaBase::Variable * | pBaseNode, |
XmlUaNodeFactoryManager * | pFactory, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Constructs an instance of the class TwoStateVariableType with all components.
[in] | pBaseNode | The "tree" of nodes that specifies the attributes of the instance and its children |
[in] | pFactory | The factory to create the children |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the variable. Can be NULL if no shared mutex is provided |
|
virtual |
Returns the value of EffectiveTransitionTime.
If the optional EffectiveTransitionTime node has not been created, the value of the InstanceDeclaration node of the VariableType is returned.
EffectiveTransitionTime specifies the time when the current state or one of its substates was entered.
If, for example, a LevelAlarm is active and – while active – switches several times between High and HighHigh, then the TransitionTime stays at the point in time where the Alarm became active whereas the EffectiveTransitionTime changes with each shift of a substate.
|
virtual |
Returns the EffectiveTransitionTime node.
If the Variable has not been created yet, this method returns NULL.
EffectiveTransitionTime specifies the time when the current state or one of its substates was entered.
If, for example, a LevelAlarm is active and – while active – switches several times between High and HighHigh, then the TransitionTime stays at the point in time where the Alarm became active whereas the EffectiveTransitionTime changes with each shift of a substate.
|
virtual |
Returns the value of FalseState.
If the optional FalseState node has not been created, the value of the InstanceDeclaration node of the VariableType is returned.
TrueState and FalseState contain the localized string for the TwoStateVariable value when its Id Property has the value TRUE or FALSE, respectively.
Since the two Properties provide metadata for the Type, Servers may not allow these Properties to be selected in the Event filter for a monitored item. Clients can use the Read Service to get the information from the specific ConditionType.
|
virtual |
Returns the FalseState node.
If the Variable has not been created yet, this method returns NULL.
TrueState and FalseState contain the localized string for the TwoStateVariable value when its Id Property has the value TRUE or FALSE, respectively.
Since the two Properties provide metadata for the Type, Servers may not allow these Properties to be selected in the Event filter for a monitored item. Clients can use the Read Service to get the information from the specific ConditionType.
|
virtual |
Returns the value of Id.
A name which uniquely identifies the current state within the StateMachineType.
A subtype may restrict the DataType.
Reimplemented from OpcUa::StateVariableType.
|
virtual |
Gets the Id value.
The Property Id shall be the current state, i.e. either TRUE or FALSE.
Id is inherited from the StateVariableType and overridden to reflect the required DataType (Boolean).
|
virtual |
Returns the Id node.
The Property Id shall be the current state, i.e. either TRUE or FALSE.
Id is inherited from the StateVariableType and overridden to reflect the required DataType (Boolean).
Reimplemented from OpcUa::StateVariableType.
|
virtual |
Returns the value of TransitionTime.
If the optional TransitionTime node has not been created, the value of the InstanceDeclaration node of the VariableType is returned.
TransitionTime specifies the time when the current state was entered.
|
virtual |
Returns the TransitionTime node.
If the Variable has not been created yet, this method returns NULL.
TransitionTime specifies the time when the current state was entered.
|
virtual |
Returns the value of TrueState.
If the optional TrueState node has not been created, the value of the InstanceDeclaration node of the VariableType is returned.
TrueState and FalseState contain the localized string for the TwoStateVariable value when its Id Property has the value TRUE or FALSE, respectively.
Since the two Properties provide meta-data for the Type, Servers may not allow these Properties to be selected in the Event filter for a monitored item. Clients can use the Read Service to get the information from the specific ConditionType.
|
virtual |
Returns the TrueState node.
If the Variable has not been created yet, this method returns NULL.
TrueState and FalseState contain the localized string for the TwoStateVariable value when its Id Property has the value TRUE or FALSE, respectively.
Since the two Properties provide meta-data for the Type, Servers may not allow these Properties to be selected in the Event filter for a monitored item. Clients can use the Read Service to get the information from the specific ConditionType.
|
virtual |
Sets the EffectiveTransitionTime value.
If the optional EffectiveTransitionTime node has not been created, this method adds it to the address space.
EffectiveTransitionTime specifies the time when the current state or one of its substates was entered.
If, for example, a LevelAlarm is active and – while active – switches several times between High and HighHigh, then the TransitionTime stays at the point in time where the Alarm became active whereas the EffectiveTransitionTime changes with each shift of a substate.
|
virtual |
Sets the FalseState value.
If the optional FalseState node has not been created, this method adds it to the address space.
TrueState and FalseState contain the localized string for the TwoStateVariable value when its Id Property has the value TRUE or FALSE, respectively.
Since the two Properties provide metadata for the Type, Servers may not allow these Properties to be selected in the Event filter for a monitored item. Clients can use the Read Service to get the information from the specific ConditionType.
|
virtual |
Sets the Id value.
A name which uniquely identifies the current state within the StateMachineType.
A subtype may restrict the DataType.
Reimplemented from OpcUa::StateVariableType.
|
virtual |
Sets the Id value.
The Property Id shall be the current state, i.e. either TRUE or FALSE.
Id is inherited from the StateVariableType and overridden to reflect the required DataType (Boolean).
void OpcUa::TwoStateVariableType::setState | ( | OpcUa_Boolean | state | ) |
Sets the state of the TwoStateVariable as boolean value.
This state call influences the value and related properties of the variable.
[in] | state | New state of the two state statemachine |
|
virtual |
Sets the TransitionTime value.
If the optional TransitionTime node has not been created, this method adds it to the address space.
TransitionTime specifies the time when the current state was entered.
|
virtual |
Sets the TrueState value.
If the optional TrueState node has not been created, this method adds it to the address space.
TrueState and FalseState contain the localized string for the TwoStateVariable value when its Id Property has the value TRUE or FALSE, respectively.
Since the two Properties provide meta-data for the Type, Servers may not allow these Properties to be selected in the Event filter for a monitored item. Clients can use the Read Service to get the information from the specific ConditionType.
void OpcUa::TwoStateVariableType::setTwoStateDisplayNames | ( | TwoStateDisplayNames * | pTwoStateDisplayNames | ) |
Sets the object containing the display names for the two states.
[in] | pTwoStateDisplayNames | The object containing the display names for the two states |
void OpcUa::TwoStateVariableType::useAccessInfoFromInstance | ( | TwoStateVariableType * | pOther | ) |
Uses the NodeAccessInfo of pOther and its children.
|
virtual |
Applys the NodeAccessInfo set at the Base and its children.
Reimplemented from OpcUa::StateVariableType.
|
virtual |
Gets the current value for the DataVariable.
pSession | Interface to the Session context for the method call |
Reimplemented from OpcUa::BaseVariableType.