.NET Based OPC UA Client/Server SDK  2.6.0.418
UnifiedAutomation.UaClient.FileObjectStream Class Reference

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

Inherits Stream.

Public Member Functions

 FileObjectStream (FileModel model)
 Initializes a new instance of the FileObjectStream class. More...
 
 FileObjectStream (ApplicationInstance application, string endpointUrl, NodeId fileId)
 Initializes a new instance of the FileObjectStream class. More...
 
 FileObjectStream (ApplicationInstance application, string endpointUrl, NodeId fileId, FileAccessModes accessMode)
 Initializes a new instance of the FileObjectStream class. More...
 
 FileObjectStream (Session session, NodeId fileId)
 Initializes a new instance of the FileObjectStream class. More...
 
 FileObjectStream (Session session, NodeId fileId, FileAccessModes accessMode)
 Initializes a new instance of the FileObjectStream class. More...
 
override int Read (byte[] buffer, int offset, int count)
 When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. More...
 
override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 Begins an asynchronous read operation. (Consider using M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) More...
 
override int EndRead (IAsyncResult asyncResult)
 Waits for the pending asynchronous read to complete. (Consider using M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) More...
 
override void Write (byte[] buffer, int offset, int count)
 When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. More...
 
override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 Begins an asynchronous write operation. (Consider using M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) More...
 
override void EndWrite (IAsyncResult asyncResult)
 Ends an asynchronous write operation. (Consider using M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) More...
 
override void Close ()
 Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed. More...
 
override void Flush ()
 When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. More...
 
override long Seek (long offset, SeekOrigin origin)
 When overridden in a derived class, sets the position within the current stream. More...
 
override void SetLength (long value)
 When overridden in a derived class, sets the length of the current stream. More...
 

Protected Member Functions

override void Dispose (bool disposing)
 Releases the unmanaged resources used by the T:System.IO.Stream and optionally releases the managed resources. More...
 

Properties

override bool CanRead [get]
 When overridden in a derived class, gets a value indicating whether the current stream supports reading. More...
 
override bool CanSeek [get]
 When overridden in a derived class, gets a value indicating whether the current stream supports seeking. More...
 
override bool CanTimeout [get]
 Gets a value that determines whether the current stream can time out. More...
 
override bool CanWrite [get]
 When overridden in a derived class, gets a value indicating whether the current stream supports writing. More...
 
override long Length [get]
 When overridden in a derived class, gets the length in bytes of the stream. More...
 
override long Position [get, set]
 When overridden in a derived class, gets or sets the position within the current stream. More...
 
override int ReadTimeout [get, set]
 Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. More...
 
override int WriteTimeout [get, set]
 Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. More...
 

Detailed Description

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

Constructor & Destructor Documentation

UnifiedAutomation.UaClient.FileObjectStream.FileObjectStream ( FileModel  model)
inline

Initializes a new instance of the FileObjectStream class.

Parameters
modelThe model to use when accessing the server.
Exceptions
System.ArgumentNullExceptionmodel
UnifiedAutomation.UaClient.FileObjectStream.FileObjectStream ( ApplicationInstance  application,
string  endpointUrl,
NodeId  fileId 
)
inline

Initializes a new instance of the FileObjectStream class.

Parameters
applicationThe application.
endpointUrlThe URL for the server to use.
fileIdThe file object node identifier.
Exceptions
System.ArgumentNullExceptionapplication
UnifiedAutomation.UaClient.FileObjectStream.FileObjectStream ( ApplicationInstance  application,
string  endpointUrl,
NodeId  fileId,
FileAccessModes  accessMode 
)
inline

Initializes a new instance of the FileObjectStream class.

Parameters
applicationThe application.
endpointUrlThe URL for the server to use.
fileIdThe file object node identifier.
accessModeThe access mode to use when opening the file.
Exceptions
System.ArgumentNullExceptionapplication
UnifiedAutomation.UaClient.FileObjectStream.FileObjectStream ( Session  session,
NodeId  fileId 
)
inline

Initializes a new instance of the FileObjectStream class.

Parameters
sessionThe session.
fileIdThe file object node identifier.
Exceptions
System.ArgumentNullExceptionsession
UnifiedAutomation.UaClient.FileObjectStream.FileObjectStream ( Session  session,
NodeId  fileId,
FileAccessModes  accessMode 
)
inline

Initializes a new instance of the FileObjectStream class.

Parameters
sessionThe session.
fileIdThe file object node identifier.
accessModeThe access mode to use when opening the file.
Exceptions
System.ArgumentNullExceptionsession

Member Function Documentation

override IAsyncResult UnifiedAutomation.UaClient.FileObjectStream.BeginRead ( byte[]  buffer,
int  offset,
int  count,
AsyncCallback  callback,
object  state 
)
inline

Begins an asynchronous read operation. (Consider using M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)

Parameters
bufferThe buffer to read the data into.
offsetThe byte offset in buffer at which to begin writing data read from the stream.
countThe maximum number of bytes to read.
callbackAn optional asynchronous callback, to be called when the read is complete.
stateA user-provided object that distinguishes this particular asynchronous read request from other requests.
Returns
An T:System.IAsyncResult that represents the asynchronous read, which could still be pending.
Exceptions
System.ArgumentNullExceptionbuffer
System.ArgumentOutOfRangeExceptionoffset or count
override IAsyncResult UnifiedAutomation.UaClient.FileObjectStream.BeginWrite ( byte[]  buffer,
int  offset,
int  count,
AsyncCallback  callback,
object  state 
)
inline

Begins an asynchronous write operation. (Consider using M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)

Parameters
bufferThe buffer to write data from.
offsetThe byte offset in buffer from which to begin writing.
countThe maximum number of bytes to write.
callbackAn optional asynchronous callback, to be called when the write is complete.
stateA user-provided object that distinguishes this particular asynchronous write request from other requests.
Returns
An IAsyncResult that represents the asynchronous write, which could still be pending.
Exceptions
System.ArgumentNullExceptionbuffer
System.ArgumentOutOfRangeExceptionoffset or count
override void UnifiedAutomation.UaClient.FileObjectStream.Close ( )
inline

Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.

Exceptions
System.ObjectDisposedExceptionFileObjectStream
override void UnifiedAutomation.UaClient.FileObjectStream.Dispose ( bool  disposing)
inlineprotected

Releases the unmanaged resources used by the T:System.IO.Stream and optionally releases the managed resources.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.
override int UnifiedAutomation.UaClient.FileObjectStream.EndRead ( IAsyncResult  asyncResult)
inline

Waits for the pending asynchronous read to complete. (Consider using M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)

Parameters
asyncResultThe reference to the pending asynchronous request to finish.
Returns
The number of bytes read from the stream, between zero (0) and the number of bytes you requested. Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available.
Exceptions
System.ArgumentNullExceptionasyncResult
override void UnifiedAutomation.UaClient.FileObjectStream.EndWrite ( IAsyncResult  asyncResult)
inline

Ends an asynchronous write operation. (Consider using M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)

Parameters
asyncResultA reference to the outstanding asynchronous I/O request.
Exceptions
System.ArgumentNullExceptionasyncResult
override void UnifiedAutomation.UaClient.FileObjectStream.Flush ( )
inline

When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Exceptions
System.ObjectDisposedExceptionFileObjectStream
override int UnifiedAutomation.UaClient.FileObjectStream.Read ( byte[]  buffer,
int  offset,
int  count 
)
inline

When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Parameters
bufferAn array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
offsetThe zero-based byte offset in buffer at which to begin storing the data read from the current stream.
countThe maximum number of bytes to be read from the current stream.
Returns
The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
override long UnifiedAutomation.UaClient.FileObjectStream.Seek ( long  offset,
SeekOrigin  origin 
)
inline

When overridden in a derived class, sets the position within the current stream.

Parameters
offsetA byte offset relative to the origin parameter.
originA value of type T:System.IO.SeekOrigin indicating the reference point used to obtain the new position.
Returns
The new position within the current stream.
Exceptions
System.ObjectDisposedExceptionFileObjectStream
System.ArgumentOutOfRangeExceptionoffset or offset
System.ArgumentExceptionorigin
override void UnifiedAutomation.UaClient.FileObjectStream.SetLength ( long  value)
inline

When overridden in a derived class, sets the length of the current stream.

Parameters
valueThe desired length of the current stream in bytes.
Exceptions
System.ObjectDisposedExceptionFileObjectStream
System.NotSupportedException
override void UnifiedAutomation.UaClient.FileObjectStream.Write ( byte[]  buffer,
int  offset,
int  count 
)
inline

When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Parameters
bufferAn array of bytes. This method copies count bytes from buffer to the current stream.
offsetThe zero-based byte offset in buffer at which to begin copying bytes to the current stream.
countThe number of bytes to be written to the current stream.

Property Documentation

override bool UnifiedAutomation.UaClient.FileObjectStream.CanRead
get

When overridden in a derived class, gets a value indicating whether the current stream supports reading.

override bool UnifiedAutomation.UaClient.FileObjectStream.CanSeek
get

When overridden in a derived class, gets a value indicating whether the current stream supports seeking.

override bool UnifiedAutomation.UaClient.FileObjectStream.CanTimeout
get

Gets a value that determines whether the current stream can time out.

override bool UnifiedAutomation.UaClient.FileObjectStream.CanWrite
get

When overridden in a derived class, gets a value indicating whether the current stream supports writing.

override long UnifiedAutomation.UaClient.FileObjectStream.Length
get

When overridden in a derived class, gets the length in bytes of the stream.

override long UnifiedAutomation.UaClient.FileObjectStream.Position
getset

When overridden in a derived class, gets or sets the position within the current stream.

override int UnifiedAutomation.UaClient.FileObjectStream.ReadTimeout
getset

Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.

override int UnifiedAutomation.UaClient.FileObjectStream.WriteTimeout
getset

Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.


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