MessageBuilderBase Class
Constructor
MessageBuilderBase
(
-
options
Parameters:
-
options
Object-
[signatureLength=0]
Number optional
-
Item Index
Events
Methods
_append
(
private
-
message_chunk
append a message chunk
Parameters:
-
message_chunk
Object
encode_decode_round_trip_test
(
-
obj
-
[options]
-
callback_buffer
Parameters:
-
obj
Object: object to test ( the object must provide a binaryStoreSize,encode,decode method
-
[options]
Object optional -
callback_buffer
Object
Returns:
:
extract_values
(
-
array
-
[dimensions = null]
Parameters:
-
array
Arrayflat array containing values
-
[dimensions = null]
Arrayoptional dimension of the matrix if data is a matrix
Returns:
:
feed
(
-
data
Feed message builder with some data
Parameters:
-
data
Object
packet_analyzer
(
-
buffer
-
id
-
padding
-
offset
-
custom_options
Parameters:
-
buffer
Buffer -
id
Object -
padding
Integer -
offset
Integer -
custom_options
Object-
factory
Object-
constructObject
Function
-
-
Events
chunk
notify the observers that new message chunk has been received
Event Payload:
-
messageChunk
Bufferthe raw message chunk
error
notify the observers that an error has occurred
Event Payload:
-
error
Errorthe error to raise
full_message_body
notify the observers that a full message has been received
Event Payload:
-
full_message_body
Bufferthe full message body made of all concatenated chunks.
start_chunk
notify the observers that a new message is being built
Event Payload:
-
info
Object -
data
Object