support for buffer packet type (#608)

* support for buffer packet type

* updated description

* updated signature

* added note on json encoding

* adding sendNumbers

* cleanup

* removing 'sendnumbers'
This commit is contained in:
Peli de Halleux
2018-01-30 10:11:12 -08:00
committed by GitHub
parent 79018d4f00
commit 07a578831c
7 changed files with 201 additions and 19 deletions

View File

@ -14,6 +14,11 @@ namespace radio {
* or the empty string if this packet did not contain a string.
*/
public receivedString: string;
/**
* The buffer payload if a buffer was sent in this packet
* or the empty buffer
*/
public receivedBuffer: Buffer;
/**
* The system time of the sender of the packet at the time the packet was sent.
*/
@ -45,6 +50,7 @@ namespace radio {
packet.time = receivedTime();
packet.serial = receivedSerial();
packet.receivedString = receivedString();
packet.receivedBuffer = receivedBuffer();
packet.signal = receivedSignalStrength();
cb(packet)
});