C++ Based OPC UA Client/Server/PubSub SDK
1.7.8.584
|
Class implementing the UaObject interface for the FileDirectoryType. More...
#include <opcua_filedirectorytype.h>
Inherits OpcUa::FileDirectoryTypeBase.
Public Member Functions | |
FileDirectoryType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class FileDirectoryType. More... | |
FileDirectoryType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class FileDirectoryType. More... | |
FileDirectoryType (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class FileDirectoryType with all components. More... | |
void | setCallback (FileDirectoryTypeCallback *pCallback) |
Set instance specific callback interface for handling incoming FileDirectory Method calls. | |
virtual UaStatus | CreateDirectory (const ServiceContext &serviceContext, const UaString &DirectoryName, UaNodeId &DirectoryNodeId) |
Creates a new FileDirectoryType object organized by this object. More... | |
virtual UaStatus | CreateFile (const ServiceContext &serviceContext, const UaString &FileName, OpcUa_Boolean RequestFileOpen, UaNodeId &FileNodeId, OpcUa_UInt32 &FileHandle) |
Creates a new FileType object organized by this object. More... | |
virtual UaStatus | Delete (const ServiceContext &serviceContext, const UaNodeId &ObjectToDelete) |
Deletes a file or directory organized by this object. More... | |
virtual UaStatus | MoveOrCopy (const ServiceContext &serviceContext, const UaNodeId &ObjectToMoveOrCopy, const UaNodeId &TargetDirectory, OpcUa_Boolean CreateCopy, const UaString &NewName, UaNodeId &NewNodeId) |
Moves or copies a file or directory organized by this object to another directory or renames a file or directory. More... | |
Public Member Functions inherited from OpcUa::FileDirectoryTypeBase | |
FileDirectoryTypeBase (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an FileDirectoryType object using an instance declaration node as base. | |
FileDirectoryTypeBase (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an FileDirectoryType object. | |
FileDirectoryTypeBase (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class FileDirectoryTypeBase with all components. More... | |
virtual UaNodeId | typeDefinitionId () const |
Returns the type definition NodeId for the FileDirectoryType. | |
virtual UaStatus | beginCall (MethodManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 callbackHandle, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments) |
Call method of an UA object. More... | |
virtual UaStatus | call (const ServiceContext &serviceContext, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments, UaVariantArray &outputArguments, UaStatusCodeArray &inputArgumentResults, UaDiagnosticInfos &inputArgumentDiag) |
Synchronous version of the MethodManager method call executed in a worker thread. | |
virtual OpcUa::BaseMethod * | getCreateDirectory () |
Returns the CreateDirectory node. | |
virtual const OpcUa::BaseMethod * | getCreateDirectory () const |
Returns the CreateDirectory node. | |
virtual OpcUa::BaseMethod * | getCreateFile () |
Returns the CreateFile node. | |
virtual const OpcUa::BaseMethod * | getCreateFile () const |
Returns the CreateFile node. | |
virtual OpcUa::BaseMethod * | getDelete () |
Returns the Delete node. | |
virtual const OpcUa::BaseMethod * | getDelete () const |
Returns the Delete node. | |
virtual OpcUa::BaseMethod * | getMoveOrCopy () |
Returns the MoveOrCopy node. | |
virtual const OpcUa::BaseMethod * | getMoveOrCopy () const |
Returns the MoveOrCopy node. | |
virtual UaStatus | addFileDirectoryName_Placeholder (OpcUa::FileDirectoryType *pFileDirectoryName_Placeholder) |
Adds the passed FileDirectoryType node by creating an HasComponent reference. | |
virtual UaStatus | addFileName_Placeholder (OpcUa::FileType *pFileName_Placeholder) |
Adds the passed FileType node by creating an HasComponent reference. | |
virtual void | useAccessInfoFromType () |
Applies the NodeAccessInfo set at the FileDirectoryTypeBase and its children. More... | |
void | useAccessInfoFromInstance (FileDirectoryTypeBase *pInstance) |
Uses the NodeAccessInfo of pOther and its children. More... | |
Public Member Functions inherited from OpcUa::FolderType | |
FolderType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class FolderType. More... | |
FolderType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class FolderType. More... | |
FolderType (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class FolderType with all components. More... | |
Public Member Functions inherited from OpcUa::FolderTypeBase | |
FolderTypeBase (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an FolderType object using an instance declaration node as base. | |
FolderTypeBase (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an FolderType object. | |
FolderTypeBase (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class FolderTypeBase with all components. More... | |
void | useAccessInfoFromInstance (FolderTypeBase *pInstance) |
Uses the NodeAccessInfo of pOther and its children. More... | |
Public Member Functions inherited from OpcUa::BaseObjectType | |
BaseObjectType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class BaseObjectType. More... | |
BaseObjectType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class BaseObjectType. More... | |
UaReferenceLists * | getUaReferenceLists () const |
Get the UaReferenceLists interface for the node. More... | |
virtual 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 of the current Node. More... | |
virtual UaQualifiedName | browseName () const |
Get the browseName 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 |
Check if Node has a userWriteMask. More... | |
UaNode * | getUaNode () const |
Get the UaNode interface pointer of this node. More... | |
virtual OpcUa_Byte | eventNotifier () const |
Returns the EventNotifier for the BaseObjectType. More... | |
virtual MethodManager * | getMethodManager (UaMethod *pMethod) const |
Returns the method manager interface for the BaseObjectType instance. 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 void | setBrowseName (const UaQualifiedName &browseName) |
Sets the browse name attribute value. More... | |
virtual void | setDisplayName (const UaLocalizedText &displayName) |
Sets the display name attribute value. More... | |
virtual void | setDescription (const UaLocalizedText &description) |
Sets the description attribute value. More... | |
virtual void | setWriteMask (OpcUa_UInt32 writeMask) |
Sets the write mask attribute value. More... | |
virtual void | setEventNotifier (OpcUa_Byte eventNotifier) |
Sets the eventNotifier attribute value. More... | |
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... | |
void | setMethodManager (MethodManager *pMethodManager) |
Allows a class aggregating the object to implement the MethodManager for this object. 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 MethodManager | |
MethodManager () | |
construction | |
virtual | ~MethodManager () |
destruction | |
Public Member Functions inherited from UaObject | |
UaObject (UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the UaObject. More... | |
OpcUa_NodeClass | nodeClass () const |
Get the node class of the 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 (UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the UaNode. More... | |
virtual UaNodeId | getKey () const |
Get the key of the node used for the hash table. More... | |
virtual NodeAccessInfo * | getAccessInfo () const |
Returns the access info for this node. More... | |
virtual bool | hasAccessInfo () const |
Check if this UaNode has a NodeAccessInfo assigned. 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... | |
virtual void | setInvalid () |
Set the entry to invalid. 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 type related static members of the class. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
static void | setDefaultCallback (FileDirectoryTypeCallback *pCallback) |
Set default callback interface for all instances for handling incoming FileDirectory Method calls. | |
Static Public Member Functions inherited from OpcUa::FileDirectoryTypeBase | |
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::FolderType | |
static void | createTypes () |
Create the type related static members of the class. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Static Public Member Functions inherited from OpcUa::FolderTypeBase | |
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::BaseObjectType | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Protected Member Functions | |
virtual | ~FileDirectoryType () |
Destruction. | |
Protected Member Functions inherited from OpcUa::FileDirectoryTypeBase | |
virtual | ~FileDirectoryTypeBase () |
Destruction. | |
Protected Member Functions inherited from OpcUa::FolderType | |
virtual | ~FolderType () |
Destruction. | |
Protected Member Functions inherited from OpcUa::FolderTypeBase | |
virtual | ~FolderTypeBase () |
Destruction. | |
Protected Member Functions inherited from OpcUa::BaseObjectType | |
virtual | ~BaseObjectType () |
Destruction of the BaseObjectType. More... | |
Protected Member Functions inherited from UaObject | |
virtual | ~UaObject () |
Destruction of the UaObject. More... | |
Protected Member Functions inherited from UaNode | |
virtual | ~UaNode () |
Destruction of the UaNode. More... | |
Protected Member Functions inherited from ChainEntry | |
virtual | ~ChainEntry () |
destruction | |
Protected Member Functions inherited from UaReferenceLists | |
virtual UaStatus | collectAllChildrenRecursive (NodeManagerConfig *pNodeManagerConfig, NodesToDeleteCollection &nodesToDeleteCollection, int recursionCounter=0) |
Collect a list of all child nodes. More... | |
UaStatus | readAdditionalAttributes (const ServiceContext &serviceContext, OpcUa_Boolean bReturnBrowseName, OpcUa_Boolean bReturnDisplayName, const UaBooleanArray &arrIndexAttributes, const UaBooleanArray &arrIndexTypeDefinition, UaReferenceDescriptions &references) |
Read attributes DisplayName, BrowseName and get the TypeDefinition references. More... | |
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... | |
Class implementing the UaObject interface for the FileDirectoryType.
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.
Object members of the FileDirectoryType:
Browse Name | TypeDefinition | Modelling Rule | See Also |
---|---|---|---|
<FileDirectoryName> | FileDirectoryType | OptionalPlaceholder | |
<FileName> | FileType | OptionalPlaceholder |
Method members of the FileDirectoryType:
Browse Name | Modelling Rule |
---|---|
CreateDirectory | Mandatory |
CreateFile | Mandatory |
Delete | Mandatory |
MoveOrCopy | Mandatory |
Defines a type for the representation of file directories.
It is expected that OPC UA Servers will create vendor specific subtypes of the FileDirectoryType with additional functionalities like methods for creating symbolic links or setting access permissions. OPC UA Clients providing specialized file transfer user interfaces should be prepared to expose such additional methods to the user.
Instances of the ObjectType contain a list of FileDirectoryType objects representing the subdirectories of the file directory represented by the instance of this ObjectType.
Instances of the ObjectType contain a list of FileType objects representing the files in the file directory represented by the instance of this ObjectType.
See also FileDirectoryType for a documentation of the complete Information Model.
OpcUa::FileDirectoryType::FileDirectoryType | ( | const UaNodeId & | nodeId, |
UaObject * | pInstanceDeclarationObject, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Construction of the class FileDirectoryType.
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 node id, 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 availability 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::FileDirectoryType::FileDirectoryType | ( | const UaNodeId & | nodeId, |
const UaString & | name, | ||
OpcUa_UInt16 | browseNameNameSpaceIndex, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Construction of the class FileDirectoryType.
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 availability 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 |
OpcUa::FileDirectoryType::FileDirectoryType | ( | UaBase::Object * | pBaseNode, |
XmlUaNodeFactoryManager * | pFactory, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Constructs an instance of the class FileDirectoryType 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 |
Creates a new FileDirectoryType object organized by this object.
Method Result Codes
Result Code | Description |
---|---|
Bad_BrowseNameDuplicated | A directory with the name already exists. |
Bad_UserAccessDenied | The user does not have permission to perform the requested operation. |
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
[in] | DirectoryName | The name of the directory to create. The name is used for the BrowseName and DisplayName of the directory object and also for the directory in the file system. For the BrowseName, the directoryName is used for the name part of the QualifiedName. The namespace index is Server specific. For the DisplayName, the directoryName is used for the text part of the LocalizedText. The locale part is Server specific. |
[out] | DirectoryNodeId | The NodeId of the created directory Object. |
Implements OpcUa::FileDirectoryTypeBase.
|
virtual |
Creates a new FileType object organized by this object.
The created file can be written using the Write method of the FileType.
Method Result Codes
Result Code | Description |
---|---|
Bad_BrowseNameDuplicated | A file with the name already exists. |
Bad_UserAccessDenied | The user does not have permission to perform the requested operation. |
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
[in] | FileName | The name of the file to create. The name is used for the BrowseName and DisplayName of the file object and also for the file in the file system. For the BrowseName, the FileName is used for the name part of the QualifiedName. The namespace index is Server specific. For the DisplayName, the FileName is used for the text part of the LocalizedText. The locale part is Server specific. |
[in] | RequestFileOpen | Flag indicating whether the new file should be opened with the Write and Read bits set in the open mode after the creation of the file. If the flag is set to True, the file is created and opened for writing. If the flag is set to False, the file is just created. |
[out] | FileNodeId | The NodeId of the created file Object. |
[out] | FileHandle | The FileHandle is returned if RequestFileOpen is set to True. The FileNodeId and the FileHandle can be used to access the new file through the FileType Object representing the new file. If RequestFileOpen is set to False, the returned value shall be 0 and shall be ignored by the caller. |
Implements OpcUa::FileDirectoryTypeBase.
|
virtual |
Deletes a file or directory organized by this object.
Method Result Codes
Result Code | Description |
---|---|
Bad_NotFound | A file or directory with the provided NodeId is not organized by this object. |
Bad_InvalidState | The file or directory is locked and thus cannot be deleted. |
Bad_UserAccessDenied | The user does not have permission to perform the requested operation. |
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
[in] | ObjectToDelete | The NodeId of the file or directory to delete. In the case of a directory, all file and directory Objects below the directory to delete are deleted recursively. |
Implements OpcUa::FileDirectoryTypeBase.
|
virtual |
Moves or copies a file or directory organized by this object to another directory or renames a file or directory.
Method Result Codes
Result Code | Description |
---|---|
Bad_BrowseNameDuplicated | A file or directory with the name already exists. |
Bad_NotFound | A file or directory with the provided NodeId is not organized by this object. |
Bad_InvalidState | The file or directory is locked and thus cannot be moved or copied. |
Bad_UserAccessDenied | The user does not have permission to perform the requested operation. |
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
[in] | ObjectToMoveOrCopy | The NodeId of the file or directory to move or copy. |
[in] | TargetDirectory | The NodeId of the target directory of the move or copy command. If the file or directory is just renamed, the targetDirectory matches the ObjectId passed to the method call. |
[in] | CreateCopy | A flag indicating whether a copy of the file or directory should be created at the target directory. |
[in] | NewName | The new name of the file or directory in the new location. If the string is empty, the name is unchanged. |
[out] | NewNodeId | The NodeId of the moved or copied object. Even if the Object is moved, the Server may return a new NodeId. |
Implements OpcUa::FileDirectoryTypeBase.