ReadStream
Extends:
A stream that reads atvise server nodes for the node-opcua~ReferenceDescriptions passed.
Test:
Method Summary
Public Methods | ||
public |
processChunk(browseResult: NodeStream.BrowseResult, handleErrors: function(err: Error, status: node-opcua~StatusCodes, success: function)) Returns a ReadStream.ReadResult for the given NodeStream.BrowseResult. |
|
public |
processErrorMessage(referenceDescription: node-opcua~ReferenceDescription): string Returns an error message specifically for the given reference description. |
Inherited Summary
From class Stream | ||
private |
|
|
private |
Called just before the stream is closed: Closes the open session. |
From class QueueStream | ||
public get |
|
|
public get |
The number of processed chunks per second. |
|
public get |
The number of chunks already processed. |
|
public get |
|
|
private |
The maximum of parallel tasks to execute |
|
private |
The number of chunks processed so far. |
|
private |
The number of running operations. |
|
private |
_queued: *[] The queued chunks. |
|
private |
The timestamp of the date when the stream was created. |
|
public abstract |
processChunk(chunk: *, handleErrors: function(err: Error, statusCode: node-opcua~StatusCodes, onSuccess: function)) The function to call when a chunk is ready to be processed. |
|
public abstract |
processErrorMessage(chunk: *): string The error message to use when processing a chunk fails. |
|
private |
_enqueueChunk(chunk: *) Enqueues the given chunk for processing. |
|
private |
Waits for pending operations to complete. |
|
private |
_processChunk(chunk: *) Calls QueueStream#processChunk and handles errors and invalid status codes. |
|
private |
_transform(chunk: *, enc: string, callback: Function) Calls QueueStream#_enqueueChunk as soon as the stream's session is opened. |
Public Methods
public processChunk(browseResult: NodeStream.BrowseResult, handleErrors: function(err: Error, status: node-opcua~StatusCodes, success: function)) source
Returns a ReadStream.ReadResult for the given NodeStream.BrowseResult.
Override:
QueueStream#processChunkParams:
Name | Type | Attribute | Description |
browseResult | NodeStream.BrowseResult | The browse result to process:
|
|
handleErrors | function(err: Error, status: node-opcua~StatusCodes, success: function) | The error handler to call. See QueueStream#processChunk for details. |
Test:
public processErrorMessage(referenceDescription: node-opcua~ReferenceDescription): string source
Returns an error message specifically for the given reference description.
Override:
QueueStream#processErrorMessageParams:
Name | Type | Attribute | Description |
referenceDescription | node-opcua~ReferenceDescription | The reference description to get the error message for. |