.NET Based OPC UA Client/Server SDK  2.6.1.422
UnifiedAutomation.UaClient.FileModel Class Reference

Used to access a File object on an OPC UA Server. More...

Inherits UnifiedAutomation.UaClient.SessionMethodHelper.

Public Member Functions

 FileModel (ApplicationInstance application)
 Initializes a new instance of the FileModel class. More...
 
 FileModel (Session session)
 Initializes a new instance of the FileModel class. More...
 
uint Open (FileAccessModes mode)
 Opens a file from the server. More...
 
uint Open (FileAccessModes mode, int timeout)
 Opens a file from the server. More...
 
IAsyncResult BeginOpen (FileAccessModes mode, int timeout, AsyncCallback callback, object callbackData)
 Begins an operation to Open a file from the server. More...
 
uint EndOpen (IAsyncResult result)
 Completes an operation to Open a file from the server. More...
 
void Close (uint fileHandle)
 Closes a file from the server. More...
 
void Close (uint fileHandle, int timeout)
 Closes a file from the server. More...
 
IAsyncResult BeginClose (uint fileHandle, int timeout, AsyncCallback callback, object callbackData)
 Begins an operation to Close a file from the server. More...
 
void EndClose (IAsyncResult result)
 Completes an operation to Close a file from the server. More...
 
long GetLength ()
 Gets the current length of a file on the server. More...
 
long GetLength (int timeout)
 Gets the current length of a file on the server. More...
 
IAsyncResult BeginGetLength (int timeout, AsyncCallback callback, object callbackData)
 Begins an operation to get the current length of a file on the server. More...
 
long EndGetLength (IAsyncResult result)
 Completes an operation to get the current position in a file on the server. More...
 
ulong GetPosition (uint fileHandle)
 Gets the current position in a file on the server. More...
 
ulong GetPosition (uint fileHandle, int timeout)
 Gets the current position in a file on the server. More...
 
IAsyncResult BeginGetPosition (uint fileHandle, int timeout, AsyncCallback callback, object callbackData)
 Begins an operation to get the current position in a file on the server. More...
 
ulong EndGetPosition (IAsyncResult result)
 Completes an operation to get the current position in a file on the server. More...
 
void SetPosition (uint fileHandle, ulong position)
 Sets the position in a file on the server. More...
 
void SetPosition (uint fileHandle, ulong position, int timeout)
 Sets the position in a file on the server. More...
 
IAsyncResult BeginSetPosition (uint fileHandle, ulong position, int timeout, AsyncCallback callback, object callbackData)
 Begins an operation to change the position in a file on the server. More...
 
void EndSetPosition (IAsyncResult result)
 Completes an operation to SetPosition a file from the server. More...
 
byte[] Read (uint fileHandle, int bytesToRead, int timeout)
 Reads a block of data from a the server. More...
 
IAsyncResult BeginRead (uint fileHandle, int bytesToRead, int timeout, AsyncCallback callback, object callbackData)
 Begins an operation to read a block from a file on the server. More...
 
byte[] EndRead (IAsyncResult result)
 Completes an operation to read a block from a file on the server. More...
 
void Write (uint fileHandle, byte[] bytesToWrite, int timeout)
 Writes a block of data from to the server. More...
 
IAsyncResult BeginWrite (uint fileHandle, byte[] bytesToWrite, int timeout, AsyncCallback callback, object callbackData)
 Begins an operation to Write a block from a file on the server. More...
 
void EndWrite (IAsyncResult result)
 Completes an operation to Write a block from a file on the server. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaClient.SessionMethodHelper
 SessionMethodHelper (ApplicationInstance application)
 Initializes a new instance of the SessionMethodHelper class. More...
 
 SessionMethodHelper (Session session)
 Initializes a new instance of the SessionMethodHelper class. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
void Connect (int timeout)
 Connects to the server. More...
 
void BeginConnect (AsyncCallback callback, object callbackData)
 Connects to the server. More...
 
void Disconnect ()
 Disconnects from the server. More...
 

Properties

NodeId FileNodeId [get, set]
 Gets or sets the NodeId of the file object. More...
 
NodeId FileLengthNodeId [get, set]
 Gets or sets the file length node identifier. More...
 
- Properties inherited from UnifiedAutomation.UaClient.SessionMethodHelper
string EndpointUrl [get, set]
 Gets or sets the endpoint URL. More...
 
Session Session [get]
 Gets the session. More...
 
RequestSettings DefaultRequestSettings [get, set]
 Gets or sets the default request settings. More...
 
int DefaultTimeout [get]
 Gets the default timeout. More...
 
UserIdentity AdminCredentials [get, set]
 Gets or sets the administrator credentials. More...
 
bool IsConnected [get]
 Gets a value indicating whether a connection to the server is active. More...
 
bool MustCloseSession [get]
 A flag indicating that the object created the session and therefore must close it. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UnifiedAutomation.UaClient.SessionMethodHelper
virtual void Dispose (bool disposing)
 Releases unmanaged and—optionally—managed resources. More...
 
UserIdentity RequestAdminCredentials ()
 Gets the admin credentials. More...
 
- Events inherited from UnifiedAutomation.UaClient.SessionMethodHelper
EventHandler ServerStatusChanged
 Occurs when the server status changes. More...
 
EventHandler
< CredentialsRequiredEventArgs
AdminCredentialsRequired
 Raised when admin credentials are required. More...
 

Detailed Description

Used to access a File object on an OPC UA Server.

Constructor & Destructor Documentation

UnifiedAutomation.UaClient.FileModel.FileModel ( ApplicationInstance  application)
inline

Initializes a new instance of the FileModel class.

Parameters
applicationThe application to use.
UnifiedAutomation.UaClient.FileModel.FileModel ( Session  session)
inline

Initializes a new instance of the FileModel class.

Parameters
sessionThe session to use.

Member Function Documentation

IAsyncResult UnifiedAutomation.UaClient.FileModel.BeginClose ( uint  fileHandle,
int  timeout,
AsyncCallback  callback,
object  callbackData 
)
inline

Begins an operation to Close a file from the server.

Parameters
fileHandleThe handle of the file to close.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.FileModel.BeginGetLength ( int  timeout,
AsyncCallback  callback,
object  callbackData 
)
inline

Begins an operation to get the current length of a file on the server.

Parameters
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.FileModel.BeginGetPosition ( uint  fileHandle,
int  timeout,
AsyncCallback  callback,
object  callbackData 
)
inline

Begins an operation to get the current position in a file on the server.

Parameters
fileHandleThe handle of the file to modify.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.FileModel.BeginOpen ( FileAccessModes  mode,
int  timeout,
AsyncCallback  callback,
object  callbackData 
)
inline

Begins an operation to Open a file from the server.

Parameters
modeHow the file should be opened.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.FileModel.BeginRead ( uint  fileHandle,
int  bytesToRead,
int  timeout,
AsyncCallback  callback,
object  callbackData 
)
inline

Begins an operation to read a block from a file on the server.

Parameters
fileHandleThe file handle.
bytesToReadThe number of bytes to read.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.FileModel.BeginSetPosition ( uint  fileHandle,
ulong  position,
int  timeout,
AsyncCallback  callback,
object  callbackData 
)
inline

Begins an operation to change the position in a file on the server.

Parameters
fileHandleThe handle of the file to modify.
positionThe new position.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.FileModel.BeginWrite ( uint  fileHandle,
byte[]  bytesToWrite,
int  timeout,
AsyncCallback  callback,
object  callbackData 
)
inline

Begins an operation to Write a block from a file on the server.

Parameters
fileHandleThe file handle.
bytesToWriteThe bytes to write.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
void UnifiedAutomation.UaClient.FileModel.Close ( uint  fileHandle)
inline

Closes a file from the server.

Parameters
fileHandleThe handle of the file to close.
Returns
The handle object which must be passed to subsequent calls.
void UnifiedAutomation.UaClient.FileModel.Close ( uint  fileHandle,
int  timeout 
)
inline

Closes a file from the server.

Parameters
fileHandleThe handle of the file to close.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
Returns
The handle object which must be passed to subsequent calls.
void UnifiedAutomation.UaClient.FileModel.EndClose ( IAsyncResult  result)
inline

Completes an operation to Close a file from the server.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The number of bytes Close from the server.
long UnifiedAutomation.UaClient.FileModel.EndGetLength ( IAsyncResult  result)
inline

Completes an operation to get the current position in a file on the server.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The length. -1 if an error occurred.
ulong UnifiedAutomation.UaClient.FileModel.EndGetPosition ( IAsyncResult  result)
inline

Completes an operation to get the current position in a file on the server.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The current position.
uint UnifiedAutomation.UaClient.FileModel.EndOpen ( IAsyncResult  result)
inline

Completes an operation to Open a file from the server.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The number of bytes Open from the server.
byte [] UnifiedAutomation.UaClient.FileModel.EndRead ( IAsyncResult  result)
inline

Completes an operation to read a block from a file on the server.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The bytes returned. null or empty of at the end of file.
void UnifiedAutomation.UaClient.FileModel.EndSetPosition ( IAsyncResult  result)
inline

Completes an operation to SetPosition a file from the server.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The number of bytes SetPosition from the server.
void UnifiedAutomation.UaClient.FileModel.EndWrite ( IAsyncResult  result)
inline

Completes an operation to Write a block from a file on the server.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The bytes returned. null or empty of at the end of file.
long UnifiedAutomation.UaClient.FileModel.GetLength ( )
inline

Gets the current length of a file on the server.

Returns
The length. -1 if an error occurred.
long UnifiedAutomation.UaClient.FileModel.GetLength ( int  timeout)
inline

Gets the current length of a file on the server.

Parameters
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
Returns
The length. -1 if an error occurred.
ulong UnifiedAutomation.UaClient.FileModel.GetPosition ( uint  fileHandle)
inline

Gets the current position in a file on the server.

Parameters
fileHandleThe handle of the file to read.
Returns
The current position.
ulong UnifiedAutomation.UaClient.FileModel.GetPosition ( uint  fileHandle,
int  timeout 
)
inline

Gets the current position in a file on the server.

Parameters
fileHandleThe handle of the file to read.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
Returns
The current position.
uint UnifiedAutomation.UaClient.FileModel.Open ( FileAccessModes  mode)
inline

Opens a file from the server.

Parameters
modeHow the file should be opened.
Returns
The handle object which must be passed to subsequent calls.
uint UnifiedAutomation.UaClient.FileModel.Open ( FileAccessModes  mode,
int  timeout 
)
inline

Opens a file from the server.

Parameters
modeHow the file should be opened.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
Returns
The handle object which must be passed to subsequent calls.
byte [] UnifiedAutomation.UaClient.FileModel.Read ( uint  fileHandle,
int  bytesToRead,
int  timeout 
)
inline

Reads a block of data from a the server.

Parameters
fileHandleThe file handle.
bytesToReadThe number of bytes to read.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
Returns
The bytes returned. null or empty of at the end of file.
void UnifiedAutomation.UaClient.FileModel.SetPosition ( uint  fileHandle,
ulong  position 
)
inline

Sets the position in a file on the server.

Parameters
fileHandleThe handle of the file to modify.
positionThe new position.
void UnifiedAutomation.UaClient.FileModel.SetPosition ( uint  fileHandle,
ulong  position,
int  timeout 
)
inline

Sets the position in a file on the server.

Parameters
fileHandleThe handle of the file to modify.
positionThe new position.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.
void UnifiedAutomation.UaClient.FileModel.Write ( uint  fileHandle,
byte[]  bytesToWrite,
int  timeout 
)
inline

Writes a block of data from to the server.

Parameters
fileHandleThe file handle.
bytesToWriteThe bytes to write.
timeoutThe timeout in milliseconds. Specify 0 to use the default timeout.

Property Documentation

NodeId UnifiedAutomation.UaClient.FileModel.FileLengthNodeId
getset

Gets or sets the file length node identifier.

The file length node identifier.

NodeId UnifiedAutomation.UaClient.FileModel.FileNodeId
getset

Gets or sets the NodeId of the file object.


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