A Typescript library for interacting with IOTile Devices
Constants used to decode advertisement data into a uniform format.
Create IOTileEvents for all waveforms.
Pack a 32-bit error code the same way an embedded device does it.
The subsystem ID that this error came from
The actual error code
Turn a binary 16 bit uuid into a string of the format {xxxx}
All hex digits are printing in upper case.
A 2-byte data field containin a binary UUID in either little-endian or big endian format.
Reverse the 2-bytes before parsing them. This is useful if the data is being sent as a 16-bit little endian value such as what is included in Bluetooth advertisement packets.
Turn a binary 128 bit uuid into a string of the format {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
All hex digits are printing in upper case.
A 16-byte data field containin a binary UUID in either little-endian or big endian format.
Reverse the 16-bytes before parsing them. This is useful if the data is being sent as a 128-bit little endian value such as what is included in Bluetooth advertisement packets.
Parse a 16-bit integer with flags from an advertising packet into an IOTileAdvertisementFlagsV1 object
Parse a 16-bit integer with flags from an advertising packet into an IOTileAdvertisementFlagsV2 object
Decorator factory that marks a function as a callable RPC with the given metadata.
The address at which the RPC should appear
The 16-bit ID of the RPC
A format string compatible with unpackArrayBuffer to unpack arguments
A format string compatbile with packArrayBuffer to pack the return value
Decorator factory that marks a function as a callable RPC with the given metadata.
This function does not explicitly encode the RPC's address so it is suitable to use within a VirtualTile declaration that does not know its address in advance.
The 16-bit ID of the RPC
A format string compatible with unpackArrayBuffer to unpack arguments
A format string compatbile with packArrayBuffer to pack the return value
Calculate the maximum time that a given threshold is exceeded.
A list of samples along a single axis in G's
The threshold that we should count time above
The sampling rate of the data in Hz
The number of ms that data is above threshold in a single continuous event.
Unpack an array buffer that corresponds to a list of VLE encoded integers.
The function assumes that the input buffer was created from a list of integers in the range of -4095 to 4095 that were processed in the following way to create this binary buffer:
This function undoes all three of these packing steps
A list of integers that have been encoded in the following way: first they were delta encoded, then they were zigzag encoded and finally they were delta encoded.
Generated using TypeDoc
A conversion function that takes the value of a reading in a given stream and turns it into a utc date.