jooby-codec
    Preparing search index...

    Namespace dataSegment

    Transfer data by breaking it into segments.

    This command is currently used only in modules with hardware type MTXLORA. This command could be used as uplink or downlink command. The module can send DataSegment command as the response to the request or without any request.

    import * as dataSegment from 'jooby-codec/analog/commands/downlink/dataSegment.js';

    const parameters = {
    segmentationSessionId: 2,
    segmentIndex: 3,
    segmentsNumber: 5,
    isLast: false,
    data: [0x00, 0x01, 0x02, 0x03, 0x04]
    };

    const bytes = dataSegment.toBytes(parameters);

    // command binary representation
    console.log(bytes);
    // output:
    [30, 7, 2, 83, 0, 1, 2, 3, 4]

    Command format documentation

    examples
    headerSize
    id
    name
    fromBytes
    toBytes
    toJson