function is_gain_modify_packet
is_gain_modify_packet(
raw_packet,
throw_on_invalid?: boolean,
)

Verify the packet is gain_modify packet

Parameters

raw_packet

Packet to verify

optional
throw_on_invalid: boolean = false

Toggle behavior when packet is invalid, true: raise exception, false: return false

Return Type

Throws

TypeError

If raw_packet is not Uint8Array

RangeError

If raw_packet is an empty array

RangeError

If raw_packet has not an gain_modify packet type ID

RangeError

If raw_packet is too short bytes as gain_modify packet

RangeError

If raw_packet is too short long as gain_modify packet

Usage

import { is_gain_modify_packet } from "static/packet_conv/gain_modify.js";