Methods
(static) fromMsg(data) → {Message}
Converts a data packet into a Command or Response type.
Parameters:
Name | Type | Description |
---|---|---|
data |
Array.<number, number, ?, ?> | A four element array where the elements, in sequence, signifies message type, message ID, method name or error, and parameters or result. |
- Source:
Throws:
-
If the message type is not recognised.
- Type
- TypeError
Returns:
- Type
- Message