Class implementing the UaObject interface for the BaseObjectType. More...
#include <opcua_baseobjecttype.h>
Public Member Functions | |
BaseObjectType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
BaseObjectType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
UaReferenceLists * | getUaReferenceLists () const |
virtual UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References) |
UaNodeId | nodeId () const |
virtual UaQualifiedName | browseName () const |
virtual UaLocalizedText | displayName (Session *pSession) const |
< [in] Session context for the call. | |
virtual OpcUa_Boolean | isDescriptionSupported () const |
virtual UaLocalizedText | description (Session *pSession) const |
< [in] Session context for the call. | |
virtual OpcUa_Boolean | isWriteMaskSupported () const |
virtual OpcUa_UInt32 | writeMask () const |
virtual OpcUa_Boolean | isUserWriteMaskSupported () const |
virtual OpcUa_UInt32 | userWriteMask (Session *pSession) const |
< [in] Session context for the call | |
UaNode * | getUaNode () const |
virtual UaNodeId | typeDefinitionId () const |
virtual OpcUa_Byte | eventNotifier () const |
virtual MethodManager * | getMethodManager (UaMethod *pMethod) const |
< [in] Pointer of the Method the MethodManager is requested for. | |
virtual void | setBrowseName (const UaQualifiedName &browseName) |
virtual void | setDisplayName (const UaLocalizedText &displayName) |
virtual void | setDescription (const UaLocalizedText &description) |
virtual void | setWriteMask (OpcUa_UInt32 writeMask) |
virtual void | setEventNotifier (OpcUa_Byte eventNotifier) |
virtual void | setModellingRuleId (const UaNodeId &modellingRuleId) |
virtual UaNodeId | modellingRuleId () const |
void | setMethodManager (MethodManager *pMethodManager) |
virtual UaStatus | setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, OpcUa_Boolean checkWriteMask) |
virtual UaStatus | beginCall (MethodManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 callbackHandle, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments) |
Static Public Member Functions | |
static void | clearStaticMembers () |
Protected Member Functions | |
virtual | ~BaseObjectType () |
Class implementing the UaObject interface for the BaseObjectType.
OPC UA Objects are used to represent systems, system components, real-world objects and software objects. They have the NodeClass Object. The detailed description of Objects and their attributes can be found in the general description of the Object node class.
OpcUa::BaseObjectType::~BaseObjectType | ( | ) | [protected, virtual] |
Destruction of the BaseObjectType. The object is reference counted and can not be deleted directly. The methods addReference and releaseReference are used to manage the reference to this object.
OpcUa::BaseObjectType::BaseObjectType | ( | const UaNodeId & | nodeId, |
UaObject * | pInstanceDeclarationObject, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Construction of the class BaseObjectType.
This constructor is used if the object is created based on an instance declaration of an object type. Since the only difference between the instance declaration object and the instance object are the NodeId, the pointer to the instance declaration node is used to get the attribute values other than NodeId from the instance declaration node.
The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object 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 object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availablity of the object 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 object |
[in] | pInstanceDeclarationObject | UaObject interface of the instance declaration node used to provide attribute values other than NodeId |
[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 object. Can be NULL if no shared mutex is provided |
OpcUa::BaseObjectType::BaseObjectType | ( | const UaNodeId & | nodeId, |
const UaString & | name, | ||
OpcUa_UInt16 | browseNameNameSpaceIndex, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Construction of the class BaseObjectType.
This constructor is used if the object is not created based on an instance declaration. It defines the name and node id of the object. Additional language specific names and other attribute values can be set with set methods provided by the class. The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object 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 object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availablity of the object 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 object |
[in] | name | Name of the new object. 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] | 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 object. Can be NULL if no shared mutex is provided |
UaStatus OpcUa::BaseObjectType::beginCall | ( | MethodManagerCallback * | pCallback, |
const ServiceContext & | serviceContext, | ||
OpcUa_UInt32 | callbackHandle, | ||
MethodHandle * | pMethodHandle, | ||
const UaVariantArray & | inputArguments | ||
) | [virtual] |
Implementation of the MethodManager interface method beginCall
Implements MethodManager.
Reimplemented in OpcUa::AcknowledgeableConditionTypeBase, OpcUa::AlarmConditionTypeBase, OpcUa::ConditionTypeBase, OpcUa::DialogConditionTypeBase, OpcUa::DiscreteAlarmTypeBase, OpcUa::ExclusiveDeviationAlarmTypeBase, OpcUa::ExclusiveLevelAlarmTypeBase, OpcUa::ExclusiveLimitAlarmTypeBase, OpcUa::ExclusiveRateOfChangeAlarmTypeBase, OpcUa::LimitAlarmTypeBase, OpcUa::NonExclusiveDeviationAlarmTypeBase, OpcUa::NonExclusiveLevelAlarmTypeBase, OpcUa::NonExclusiveLimitAlarmTypeBase, OpcUa::NonExclusiveRateOfChangeAlarmTypeBase, OpcUa::OffNormalAlarmTypeBase, and OpcUa::TripAlarmTypeBase.
UaStatus OpcUa::BaseObjectType::browse | ( | const ServiceContext & | serviceContext, |
BrowseContext & | browseContext, | ||
UaReferenceDescriptions & | References | ||
) | [virtual] |
Discover the references of a specified node of a view. This method is used to return a list of references and target nodes for the passed node to browse for the services Browse and BrowseNext.
[in] | serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
[in] | browseContext | Browse context for the first browse or the following browse with continuation point. |
[in] | References | Array of ReferenceDescription results for the browsed node. |
Implements UaNode.
UaQualifiedName OpcUa::BaseObjectType::browseName | ( | ) | const [virtual] |
Get the browseName of the current Node.
Implements UaNode.
void OpcUa::BaseObjectType::clearStaticMembers | ( | ) | [static] |
Clear the static members of the class
Reimplemented in OpcUa::AcknowledgeableConditionType, OpcUa::AcknowledgeableConditionTypeBase, OpcUa::AggregateConfigurationType, OpcUa::AlarmConditionType, OpcUa::AlarmConditionTypeBase, OpcUa::ConditionType, OpcUa::ConditionTypeBase, OpcUa::DialogConditionType, OpcUa::DialogConditionTypeBase, OpcUa::DiscreteAlarmType, OpcUa::DiscreteAlarmTypeBase, OpcUa::ExclusiveDeviationAlarmType, OpcUa::ExclusiveDeviationAlarmTypeBase, OpcUa::ExclusiveLevelAlarmType, OpcUa::ExclusiveLevelAlarmTypeBase, OpcUa::ExclusiveLimitAlarmType, OpcUa::ExclusiveLimitAlarmTypeBase, OpcUa::ExclusiveRateOfChangeAlarmType, OpcUa::ExclusiveRateOfChangeAlarmTypeBase, OpcUa::FolderType, OpcUa::HistoricalDataConfigurationType, OpcUa::LimitAlarmType, OpcUa::LimitAlarmTypeBase, OpcUa::NonExclusiveDeviationAlarmType, OpcUa::NonExclusiveDeviationAlarmTypeBase, OpcUa::NonExclusiveLevelAlarmType, OpcUa::NonExclusiveLevelAlarmTypeBase, OpcUa::NonExclusiveLimitAlarmType, OpcUa::NonExclusiveLimitAlarmTypeBase, OpcUa::NonExclusiveRateOfChangeAlarmType, OpcUa::NonExclusiveRateOfChangeAlarmTypeBase, OpcUa::OffNormalAlarmType, OpcUa::OffNormalAlarmTypeBase, OpcUa::ShelvedStateMachineType, OpcUa::TripAlarmType, OpcUa::TripAlarmTypeBase, OpcUaDi::BlockType, OpcUaDi::ConfigurableObjectType, OpcUaDi::DeviceType, OpcUaDi::FunctionalGroupType, OpcUaDi::ProtocolType, OpcUaDi::TopologyElementType, OpcUaPlc::CtrlFunctionBlockType, OpcUaPlc::CtrlProgramOrganizationUnitType, OpcUaPlc::CtrlProgramType, OpcUaPlc::CtrlTaskType, and OpcUaPlc::SFCType.
UaLocalizedText OpcUa::BaseObjectType::description | ( | Session * | pSession ) | const [virtual] |
UaLocalizedText OpcUa::BaseObjectType::displayName | ( | Session * | pSession ) | const [virtual] |
OpcUa_Byte OpcUa::BaseObjectType::eventNotifier | ( | ) | const [virtual] |
Returns the EventNotifier for the BaseObjectType.
Implements UaObject.
MethodManager * OpcUa::BaseObjectType::getMethodManager | ( | UaMethod * | pMethod ) | const [virtual] |
< [in] Pointer of the Method the MethodManager is requested for.
Returns the method manager interface for the BaseObjectType instance
Reimplemented from UaObject.
UaNode* OpcUa::BaseObjectType::getUaNode | ( | ) | const [inline, virtual] |
Get the UaNode interface pointer of this node.
Implements UaReferenceLists.
UaReferenceLists* OpcUa::BaseObjectType::getUaReferenceLists | ( | ) | const [inline, virtual] |
Get the UaReferenceLists interface for the node. The UaReferenceLists interface is used to manage and to access the references from and to this node.
Reimplemented from UaNode.
OpcUa_Boolean OpcUa::BaseObjectType::isDescriptionSupported | ( | ) | const [virtual] |
OpcUa_Boolean OpcUa::BaseObjectType::isUserWriteMaskSupported | ( | ) | const [virtual] |
Check if Node is UserWriteMaskSupported.
Implements UaNode.
OpcUa_Boolean OpcUa::BaseObjectType::isWriteMaskSupported | ( | ) | const [virtual] |
UaNodeId OpcUa::BaseObjectType::modellingRuleId | ( | ) | const [virtual] |
Get NodeId of the modelling rule for this node. Only instance declaration nodes like Objects, Variables or Methodss have modelling rulestype definition nodes. This method provides a shortcut to get the modelling rule of a node. This information is available for a client by following the HasModellingRule reference (Browse or TranslateBrowsePathToNodeIds) from this node. The HasModellingRule reference is normally not contained in the list of references for the nodes and is handled by the SDK using this method. Creating the reference as normal reference instead of using this shortcut is also possible. The default implemenation of this method returns a null NodeId which means there is no modelling rule defined. The method must be overwritten in a derived class to return a modelling rule.
Reimplemented from UaNode.
UaNodeId OpcUa::BaseObjectType::nodeId | ( | ) | const [virtual] |
UaStatus OpcUa::BaseObjectType::setAttributeValue | ( | Session * | pSession, |
OpcUa_Int32 | attributeId, | ||
const UaDataValue & | dataValue, | ||
OpcUa_Boolean | checkWriteMask | ||
) | [virtual] |
Sets the value of an attribute of the Node.
[in] | pSession | Interface to the Session context for the method call |
[in] | attributeId | Attribute id indicating the attribute to set |
[in] | dataValue | New value for the attribute |
[out] | checkWriteMask | Flag indicating if the write mask of the node should be checked before setting the new value |
Reimplemented from UaNode.
void OpcUa::BaseObjectType::setBrowseName | ( | const UaQualifiedName & | browseName ) | [virtual] |
Sets the browse name attribute value.
[in] | browseName | The browse name to set |
void OpcUa::BaseObjectType::setDescription | ( | const UaLocalizedText & | description ) | [virtual] |
Sets the description attribute value.
[in] | description | The description to set. |
void OpcUa::BaseObjectType::setDisplayName | ( | const UaLocalizedText & | displayName ) | [virtual] |
Sets the display name attribute value.
[in] | displayName | The display name to set. |
void OpcUa::BaseObjectType::setEventNotifier | ( | OpcUa_Byte | eventNotifier ) | [virtual] |
Sets the eventNotifier attribute value.
[in] | eventNotifier | The event notifier value to set. |
void OpcUa::BaseObjectType::setMethodManager | ( | MethodManager * | pMethodManager ) |
Allows a class aggregating the object to implement the MethodManager for this object.
pMethodManager | MethodManager interfac to use for the actual Object. |
void OpcUa::BaseObjectType::setModellingRuleId | ( | const UaNodeId & | modellingRuleId ) | [virtual] |
Set NodeId of the modelling rule for this node.
void OpcUa::BaseObjectType::setWriteMask | ( | OpcUa_UInt32 | writeMask ) | [virtual] |
Sets the write mask attribute value.
[in] | writeMask | The write mask to set. |
UaNodeId OpcUa::BaseObjectType::typeDefinitionId | ( | ) | const [virtual] |
Returns the type definition NodeId for the BaseObjectType
Reimplemented from UaNode.
Reimplemented in OpcUa::AcknowledgeableConditionTypeBase, OpcUa::AlarmConditionTypeBase, OpcUa::BaseObjectTypeGeneric, OpcUa::ConditionTypeBase, OpcUa::DialogConditionTypeBase, OpcUa::DiscreteAlarmTypeBase, OpcUa::ExclusiveDeviationAlarmTypeBase, OpcUa::ExclusiveLevelAlarmTypeBase, OpcUa::ExclusiveLimitAlarmTypeBase, OpcUa::ExclusiveRateOfChangeAlarmTypeBase, OpcUa::LimitAlarmTypeBase, OpcUa::NonExclusiveDeviationAlarmTypeBase, OpcUa::NonExclusiveLevelAlarmTypeBase, OpcUa::NonExclusiveLimitAlarmTypeBase, OpcUa::NonExclusiveRateOfChangeAlarmTypeBase, OpcUa::OffNormalAlarmTypeBase, OpcUa::TripAlarmTypeBase, OpcUaPlc::CtrlConfigurationType, OpcUaPlc::CtrlFunctionBlockType, OpcUaPlc::CtrlProgramType, and OpcUaPlc::CtrlResourceType.
OpcUa_UInt32 OpcUa::BaseObjectType::userWriteMask | ( | Session * | pSession ) | const [virtual] |
OpcUa_UInt32 OpcUa::BaseObjectType::writeMask | ( | ) | const [virtual] |