C++ Based OPC UA Client/Server SDK  1.5.5.355
OpcUa::FileDirectoryTypeCallback Class Referenceabstract

Callback interface for handling incoming FileDirectory Method calls. More...

#include <opcua_filedirectorytype.h>

Public Member Functions

virtual UaStatus CreateDirectory (const ServiceContext &serviceContext, const UaString &DirectoryName, UaNodeId &DirectoryNodeId, FileDirectoryType *pFileDirectory)=0
 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, FileDirectoryType *pFileDirectory)=0
 Creates a new FileType object organized by this object. More...
 
virtual UaStatus Delete (const ServiceContext &serviceContext, const UaNodeId &ObjectToDelete, FileDirectoryType *pFileDirectory)=0
 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, FileDirectoryType *pFileDirectory)=0
 Moves or copies a file or directory organized by this object to another directory or renames a file or directory. More...
 

Detailed Description

Callback interface for handling incoming FileDirectory Method calls.

Member Function Documentation

virtual UaStatus OpcUa::FileDirectoryTypeCallback::CreateDirectory ( const ServiceContext serviceContext,
const UaString DirectoryName,
UaNodeId DirectoryNodeId,
FileDirectoryType pFileDirectory 
)
pure 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.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]DirectoryNameThe 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]DirectoryNodeIdThe NodeId of the created directory object.
pFileDirectoryAffected Object Node.
virtual UaStatus OpcUa::FileDirectoryTypeCallback::CreateFile ( const ServiceContext serviceContext,
const UaString FileName,
OpcUa_Boolean  RequestFileOpen,
UaNodeId FileNodeId,
OpcUa_UInt32 &  FileHandle,
FileDirectoryType pFileDirectory 
)
pure 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.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]FileNameThe 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]RequestFileOpenFlag 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]FileNodeIdThe NodeId of the created file object.
[out]FileHandleThe 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.
pFileDirectoryAffected Object Node.
virtual UaStatus OpcUa::FileDirectoryTypeCallback::Delete ( const ServiceContext serviceContext,
const UaNodeId ObjectToDelete,
FileDirectoryType pFileDirectory 
)
pure 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.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]ObjectToDeleteThe 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.
pFileDirectoryAffected Object Node.
virtual UaStatus OpcUa::FileDirectoryTypeCallback::MoveOrCopy ( const ServiceContext serviceContext,
const UaNodeId ObjectToMoveOrCopy,
const UaNodeId TargetDirectory,
OpcUa_Boolean  CreateCopy,
const UaString NewName,
UaNodeId NewNodeId,
FileDirectoryType pFileDirectory 
)
pure 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.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]ObjectToMoveOrCopyThe NodeId of the file or directory to move or copy.
[in]TargetDirectoryThe 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]CreateCopyA flag indicating whether a copy of the file or directory should be created at the target directory.
[in]NewNameThe new name of the file or directory in the new location.
If the string is empty, the name is unchanged.
[out]NewNodeIdThe NodeId of the moved or copied object.
Even if the object is moved, the Server may return a new NodeId.
pFileDirectoryAffected Object Node.

The documentation for this class was generated from the following file: