UA Bundle SDK .NET  2.4.0.361
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Modules Pages
UnifiedAutomation.UaServer.FileDirectoryModel Class Reference

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 sub-directory. More...
 
StatusCode CreateFile (RequestContext context, FileDirectoryModel model, string fileName, bool requestFileOpen, out NodeId fileNodeId, out uint fileHandle)
 Creates a new file in the directory. More...
 
StatusCode Delete (RequestContext context, FileDirectoryModel model, NodeId objectToDelete)
 Deletes a file or directory. 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. 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...
 

Detailed Description

An object that represents a directory that can be accessed via the server.

This class implements support for the FileDirectoryType object on the server side.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.FileDirectoryModel.FileDirectoryModel ( )
inline

Initializes a new instance of the FileDirectoryModel class.

UnifiedAutomation.UaServer.FileDirectoryModel.FileDirectoryModel ( FileDirectoryModel  template)
inline

Initializes a new instance of the FileDirectoryModel class.

Parameters
templateThe template.

Member Function Documentation

StatusCode UnifiedAutomation.UaServer.FileDirectoryModel.CreateDirectory ( RequestContext  context,
FileDirectoryModel  model,
string  directoryName,
out NodeId  directoryNodeId 
)
inline

Creates a new sub-directory.

Parameters
contextThe request context.
modelThe parent directory.
directoryNameName of the directory.
directoryNodeIdThe NodeId assigned to the new directory.
Returns
Good if the operation succeeds; A error code otherwise.

Implements UnifiedAutomation.UaServer.IFileDirectoryMethods.

StatusCode UnifiedAutomation.UaServer.FileDirectoryModel.CreateFile ( RequestContext  context,
FileDirectoryModel  model,
string  fileName,
bool  requestFileOpen,
out NodeId  fileNodeId,
out uint  fileHandle 
)
inline

Creates a new file in the directory.

Parameters
contextThe request context.
modelThe file directory model.
fileNameName of the file.
requestFileOpenif set to true then the file should be opened after it is created.
fileNodeIdThe file node identifier.
fileHandleThe file handle.
Returns
Good if the operation succeeds; A error code otherwise.

Implements UnifiedAutomation.UaServer.IFileDirectoryMethods.

StatusCode UnifiedAutomation.UaServer.FileDirectoryModel.Delete ( RequestContext  context,
FileDirectoryModel  model,
NodeId  objectToDelete 
)
inline

Deletes a file or directory.

Parameters
contextThe request context.
modelThe file directory model.
objectToDeleteThe file or directory to delete.
Returns
Good if the operation succeeds; A error code otherwise.

Implements UnifiedAutomation.UaServer.IFileDirectoryMethods.

virtual StatusCode UnifiedAutomation.UaServer.FileDirectoryModel.DispatchMethod ( RequestContext  context,
MethodHandle  methodHandle,
IList< Variant inputArguments,
List< StatusCode inputArgumentResults,
List< Variant outputArguments 
)
inlinevirtual

Dispatches the method.

Parameters
contextThe context.
methodHandleThe method handle.
inputArgumentsThe input arguments.
inputArgumentResultsThe input argument results.
outputArgumentsThe output arguments.
Returns
void UnifiedAutomation.UaServer.FileDirectoryModel.Dispose ( )
inline

Frees any unmanaged resources.

virtual void UnifiedAutomation.UaServer.FileDirectoryModel.Dispose ( bool  disposing)
inlineprotectedvirtual

An overrideable version of the Dispose.

virtual CallMethodEventHandler UnifiedAutomation.UaServer.FileDirectoryModel.GetMethodDispatcher ( RequestContext  context,
NodeId  objectId,
NodeId  methodId 
)
inlinevirtual

Gets the method dispatcher.

Parameters
contextThe context.
objectIdThe object id.
methodIdThe method id.
Returns

Implements UnifiedAutomation.UaServer.IMethodDispatcher.

StatusCode UnifiedAutomation.UaServer.FileDirectoryModel.MoveOrCopy ( RequestContext  context,
FileDirectoryModel  model,
NodeId  objectToMoveOrCopy,
NodeId  targetDirectory,
bool  createCopy,
string  newName,
out NodeId  newNodeId 
)
inline

Moves or copies a file or directory.

Parameters
contextThe request context.
modelThe file directory model.
objectToMoveOrCopyThe file or directory to move or copy.
targetDirectoryThe target directory.
createCopyif set to true then the file or directory is copied.
newNameThe new name.
newNodeIdThe new node identifier.
Returns

Implements UnifiedAutomation.UaServer.IFileDirectoryMethods.

Member Data Documentation

object UnifiedAutomation.UaServer.FileDirectoryModel.Lock = new object()
protected

An object used to synchronize access to the file object.

Property Documentation

DirectoryInfo UnifiedAutomation.UaServer.FileDirectoryModel.DirectoryOnDisk
getset

Gets or sets the directory on disk that is managed by the object.

The directory on disk that is managed by the object.

IFileDirectoryMethods UnifiedAutomation.UaServer.FileDirectoryModel.FileDirectoryMethods
getset

Gets or sets the FileDirectory methods.

The FileDirectory methods.

NodeId UnifiedAutomation.UaServer.FileDirectoryModel.NodeId
getset

Gets or sets the node identifier.

The node identifier.

Event Documentation

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.


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