.NET Based OPC UA Client/Server SDK
2.5.4.397
|
An object that represents a directory that can be accessed via the server. More...
Inherits UnifiedAutomation.UaServer.FolderModel, UnifiedAutomation.UaServer.IMethodDispatcher, UnifiedAutomation.UaServer.IFileDirectoryMethods, and IDisposable.
Public Member Functions | |
void | Dispose () |
Frees any unmanaged resources. More... | |
StatusCode | CreateDirectory (RequestContext context, FileDirectoryModel model, string directoryName, out NodeId directoryNodeId) |
Creates a new FileDirectoryType object organized by this object. More... | |
StatusCode | CreateFile (RequestContext context, FileDirectoryModel model, string fileName, bool requestFileOpen, out NodeId fileNodeId, out uint fileHandle) |
Creates a new UnifiedAutomation.UaServer.FileModel object organized by this object. More... | |
StatusCode | Delete (RequestContext context, FileDirectoryModel model, NodeId objectToDelete) |
Deletes a file or directory organized by this object. More... | |
StatusCode | MoveOrCopy (RequestContext context, FileDirectoryModel model, NodeId objectToMoveOrCopy, NodeId targetDirectory, bool createCopy, string newName, out NodeId newNodeId) |
Moves or copies a file or directory organized by this object to another directory or renames a file or directory. More... | |
FileDirectoryModel () | |
Initializes a new instance of the FileDirectoryModel class. More... | |
FileDirectoryModel (FileDirectoryModel template) | |
Initializes a new instance of the FileDirectoryModel class. More... | |
virtual CallMethodEventHandler | GetMethodDispatcher (RequestContext context, NodeId objectId, NodeId methodId) |
Gets the method dispatcher. More... | |
virtual StatusCode | DispatchMethod (RequestContext context, MethodHandle methodHandle, IList< Variant > inputArguments, List< StatusCode > inputArgumentResults, List< Variant > outputArguments) |
Dispatches the method. More... | |
Public Member Functions inherited from UnifiedAutomation.UaServer.FolderModel | |
FolderModel () | |
Initializes a new instance of the FolderModel class. More... | |
FolderModel (FolderModel template) | |
Initializes a new instance of the FolderModel class. More... | |
Public Member Functions inherited from UnifiedAutomation.UaServer.BaseObjectModel | |
BaseObjectModel () | |
Initializes a new instance of the BaseObjectModel class. More... | |
BaseObjectModel (BaseObjectModel template) | |
Initializes a new instance of the BaseObjectModel class. More... | |
Public Member Functions inherited from UnifiedAutomation.UaServer.ModelControllerBase | |
virtual ModelHandle | GetModelHandle (StringTable namespaceUris, object instance) |
Gets the metadata handle. More... | |
virtual DataValue | GetValue (IMapperContext context, ModelMapping mapping) |
Gets the value associated with the mapping. More... | |
virtual bool | SetValue (IMapperContext context, ModelMapping mapping, DataValue value) |
Sets the value associated with the mapping. More... | |
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
An overrideable version of the Dispose. More... | |
Protected Attributes | |
object | Lock = new object() |
An object used to synchronize access to the file object. More... | |
Properties | |
NodeId | NodeId [get, set] |
Gets or sets the node identifier. More... | |
DirectoryInfo | DirectoryOnDisk [get, set] |
Gets or sets the directory on disk that is managed by the object. More... | |
IFileDirectoryMethods | FileDirectoryMethods [get, set] |
Gets or sets the FileDirectory methods. More... | |
Properties inherited from UnifiedAutomation.UaServer.ModelControllerBase | |
ModelHandle | ModelHandle [get, set] |
Gets or sets the metadata handle. More... | |
object | UserData [get, set] |
Gets or sets the user data. More... | |
Events | |
EventHandler < CreateDirectoryRequestEventArgs > | CreateDirectoryRequest |
Occurs when a request to create a new directory is received. More... | |
EventHandler < CreateFileRequestEventArgs > | CreateFileRequest |
Occurs when a request to create a new file is received. More... | |
EventHandler < DeleteFileRequestEventArgs > | DeleteFileRequest |
Occurs when a request to delete a file is received. More... | |
EventHandler < MoveFileRequestEventArgs > | MoveFileRequest |
Occurs when a request to move a file is received. More... | |
An object that represents a directory that can be accessed via the server.
Defines a type for the representation of file directories.
This class implements support for the FileDirectoryType object on the server side.
It is expected that OPC UA Servers will create vendor specific subtypes of the UnifiedAutomation.UaServer.FileDirectoryModel 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 UnifiedAutomation.UaServer.FileDirectoryModel objects representing the subdirectories of the file directory represented by the instance of this ObjectType.
Instances of the ObjectType contain a list of UnifiedAutomation.UaServer.FileModel objects representing the files in the file directory represented by the instance of this ObjectType.
|
inline |
Initializes a new instance of the FileDirectoryModel class.
|
inline |
Initializes a new instance of the FileDirectoryModel class.
template | The template. |
|
inline |
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. |
context | The request context. |
model | The parent directory. |
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. |
directoryNodeId | The NodeId of the created directory object. |
Implements UnifiedAutomation.UaServer.IFileDirectoryMethods.
|
inline |
Creates a new UnifiedAutomation.UaServer.FileModel object organized by this object.
The created file can be written using the UnifiedAutomation.UaServer.IFileMethods.Write method of the UnifiedAutomation.UaServer.FileModel.
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. |
context | The request context. |
model | The file directory model. |
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. |
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. |
fileNodeId | The NodeId of the created file object. |
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 UnifiedAutomation.UaServer.FileModel 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 UnifiedAutomation.UaServer.IFileDirectoryMethods.
|
inline |
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. |
context | The request context. |
model | The file directory model. |
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 UnifiedAutomation.UaServer.IFileDirectoryMethods.
|
inlinevirtual |
Dispatches the method.
context | The context. |
methodHandle | The method handle. |
inputArguments | The input arguments. |
inputArgumentResults | The input argument results. |
outputArguments | The output arguments. |
|
inline |
Frees any unmanaged resources.
|
inlineprotectedvirtual |
An overrideable version of the Dispose.
|
inlinevirtual |
Gets the method dispatcher.
context | The context. |
objectId | The object id. |
methodId | The method id. |
Implements UnifiedAutomation.UaServer.IMethodDispatcher.
|
inline |
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. |
context | The request context. |
model | The file directory model. |
objectToMoveOrCopy | The NodeId of the file or directory to move or copy. |
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. |
createCopy | A flag indicating whether a copy of the file or directory should be created at the target directory. |
newName | The new name of the file or directory in the new location. If the string is empty, the name is unchanged. |
newNodeId | The NodeId of the moved or copied object. Even if the object is moved, the Server may return a new NodeId. |
Implements UnifiedAutomation.UaServer.IFileDirectoryMethods.
|
protected |
An object used to synchronize access to the file object.
|
getset |
Gets or sets the directory on disk that is managed by the object.
|
getset |
Gets or sets the FileDirectory methods.
The FileDirectory methods.
|
getset |
Gets or sets the node identifier.
EventHandler<CreateDirectoryRequestEventArgs> UnifiedAutomation.UaServer.FileDirectoryModel.CreateDirectoryRequest |
Occurs when a request to create a new directory is received.
EventHandler<CreateFileRequestEventArgs> UnifiedAutomation.UaServer.FileDirectoryModel.CreateFileRequest |
Occurs when a request to create a new file is received.
EventHandler<DeleteFileRequestEventArgs> UnifiedAutomation.UaServer.FileDirectoryModel.DeleteFileRequest |
Occurs when a request to delete a file is received.
EventHandler<MoveFileRequestEventArgs> UnifiedAutomation.UaServer.FileDirectoryModel.MoveFileRequest |
Occurs when a request to move a file is received.