Reference
OpcNodeStream Members
Provides a Stream for a binary variable node.
Reference
OpcNodeStream Members
- Type
- OpcNodeStream
- Namespace
- Opc.UaFx.Client
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Inherits members from Stream, MarshalByRefObject.
Constructors
OpcNodeStream
| Overload | Description |
|---|---|
| OpcNodeStream( | Initializes a new instance of the OpcNodeStream class using the specified node. |
| OpcNodeStream( | Initializes a new instance of the OpcNodeStream class using the specified context. |
| OpcNodeStream( | Initializes a new instance of the OpcNodeStream class using the specified client and nodeId. |
OpcNodeStream(OpcVariableNodeInfo)
Initializes a new instance of the OpcNodeStream class using the specified node.
public OpcNodeStream(OpcVariableNodeInfo node)Public Sub New(node As OpcVariableNodeInfo)Parameters
| Name | Type | Description |
|---|---|---|
node | Opc | The Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The node is a null reference ( |
OpcNodeStream(OpcNodeAccessContext)
Initializes a new instance of the OpcNodeStream class using the specified context.
public OpcNodeStream(OpcNodeAccessContext context)Public Sub New(context As OpcNodeAccessContext)Parameters
| Name | Type | Description |
|---|---|---|
context | Opc | The Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The context is a null reference ( |
OpcNodeStream(OpcClient, OpcNodeId)
Initializes a new instance of the OpcNodeStream class using the specified client and nodeId.
public OpcNodeStream(OpcClient client, OpcNodeId nodeId)Public Sub New(client As OpcClient, nodeId As OpcNodeId)Parameters
| Name | Type | Description |
|---|---|---|
client | OpcClient | The OpcClient to use to access the binary variable node. |
nodeId | OpcNodeId | The OpcNodeId of the binary variable node to access. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The client or nodeId is a null reference ( |
Properties
CanRead
Gets a value indicating whether the current stream supports reading.
public override bool CanRead { get; }Public Overrides ReadOnly Property CanRead As BooleanProperty value
The value true if the stream supports reading; otherwise the value false.
Overrides
Remarks
If the stream is closed, this property returns false.
CanSeek
Gets a value indicating whether the current stream supports seeking.
public override bool CanSeek { get; }Public Overrides ReadOnly Property CanSeek As BooleanProperty value
The value true if the stream supports seeking; otherwise the value false.
Overrides
Remarks
If the stream is closed, this property returns false.
CanWrite
Gets a value indicating whether the current stream supports writing.
public override bool CanWrite { get; }Public Overrides ReadOnly Property CanWrite As BooleanProperty value
The value true if the stream supports writing; otherwise the value false.
Overrides
Remarks
If the stream is closed, this property returns false.
Length
Gets the length in bytes of the stream.
public override long Length { get; }Public Overrides ReadOnly Property Length As LongProperty value
A long value representing the length of the stream in bytes.
Exceptions
| Exception | Condition |
|---|---|
| Object | The stream has been disposed of. |
Overrides
Node
Gets the node whose value the stream accesses.
public OpcVariableNodeInfo Node { get; }Public ReadOnly Property Node As OpcVariableNodeInfoProperty value
The OpcVariableNodeInfo of the binary variable node.
Position
Gets or sets the position within the current stream.
public override long Position { get; set; }Public Overrides Property Position As LongProperty value
The current position within the stream.
Exceptions
| Exception | Condition |
|---|---|
| Object | The stream has been disposed of. |
Overrides
Methods
Close
Closes the current stream and releases any resources associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.
public override sealed void Close()Public NotOverridable Overrides Sub Close()Overrides
Remarks
Attempts to manipulate the stream after the stream has been closed might throw an ObjectDisposedException.
Flush
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
public override void Flush()Public Overrides Sub Flush()Overrides
Read
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
public override int Read(byte[] buffer, int offset, int count)Public Overrides Function Read(
buffer As Byte(),
offset As Integer,
count As Integer) As IntegerParameters
| Name | Type | Description |
|---|---|---|
buffer | Byte[] | An 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. |
offset | Int32 | The zero-based byte offset in buffer at which to begin storing the data read from the current stream. |
count | Int32 | The 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.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The sum of offset and count is larger than the buffer length. |
| Argument | The buffer is a null reference ( |
| Argument | The offset or count is negative. |
| Not | The stream does not support reading. |
| Object | The stream has been disposed of. |
Overrides
Remarks
Use the CanRead property to determine whether the current instance supports reading.
Seek
Sets the position within the current stream.
public override long Seek(long offset, SeekOrigin origin)Public Overrides Function Seek(offset As Long, origin As SeekOrigin) As LongParameters
| Name | Type | Description |
|---|---|---|
offset | Int64 | A byte offset relative to the origin parameter. |
origin | SeekOrigin | A value of type SeekOrigin indicating the reference point used to obtain the new position. |
Returns
The new position within the current stream.
Exceptions
| Exception | Condition |
|---|---|
| Not | The stream does not support seeking. |
| Object | The stream has been disposed of. |
Overrides
Remarks
Use the CanSeek property to determine whether the current instance supports seeking. Seeking to any location beyond the length of the stream is supported.
SetLength
Sets the length of the current stream.
public override void SetLength(long value)Public Overrides Sub SetLength(value As Long)Parameters
| Name | Type | Description |
|---|---|---|
value | Int64 | The desired length of the current stream in bytes. |
Exceptions
| Exception | Condition |
|---|---|
| Object | The stream has been disposed of. |
| Not | The stream does not support both writing and seeking. |
Overrides
Remarks
Use the CanWrite property to determine whether the current instance supports writing, and the CanSeek property to determine whether seeking is supported. If the specified value is less than the current length of the stream, the stream is truncated. If the specified value is larger than the current length of the stream, the stream is expanded. If the stream is expanded, the contents of the stream between the old and the new length are not defined.
Write
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
public override void Write(byte[] buffer, int offset, int count)Public Overrides Sub Write(
buffer As Byte(),
offset As Integer,
count As Integer)Parameters
| Name | Type | Description |
|---|---|---|
buffer | Byte[] | An array of bytes. This method copies count bytes from buffer to the current stream. |
offset | Int32 | The zero-based byte offset in buffer at which to begin copying bytes to the current stream. |
count | Int32 | The number of bytes to be written to the current stream. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The sum of offset and count is larger than the buffer length. |
| Argument | The buffer is a null reference ( |
| Argument | The offset or count is negative. |
| Not | The stream does not support writing. |
| Object | The stream has been disposed of. |
Overrides
Remarks
Use the CanWrite property to determine whether the current instance supports writing.

