{
  "version": 3,
  "sources": ["../jacdac-spec/dist/specconstants.ts", "../src/jdom/constants.ts", "../jacdac-spec/spectool/jdutils.ts", "../jacdac-spec/spectool/jdspec.ts", "../src/jdom/error.ts", "../src/jdom/flags.ts", "../src/jdom/utils.ts", "../src/jdom/random.ts", "../src/jdom/buffer.ts", "../jacdac-spec/dist/services.json", "../src/jdom/spec.ts", "../src/jdom/pack.ts", "../src/jdom/pretty.ts", "../src/jdom/packet.ts", "../src/jdom/trace/trace.ts", "../src/jdom/eventsource.ts", "../src/jdom/node.ts", "../src/jdom/servicemembernode.ts", "../src/jdom/flashing.ts", "../src/jdom/servers/registerserver.ts", "../src/jdom/servers/serviceserver.ts", "../src/servers/sensorserver.ts", "../src/servers/realtimeclockserver.ts", "../src/jdom/transport/transport.ts", "../src/jdom/busstats.ts", "../src/jdom/servers/controlserver.ts", "../src/jdom/servers/serviceprovider.ts", "../src/jdom/servers/serverserviceprovider.ts", "../src/jdom/client.ts", "../src/jdom/pipes.ts", "../src/jdom/servers/protocoltestserver.ts", "../src/servers/buttonserver.ts", "../src/servers/buzzerserver.ts", "../src/servers/characterscreenserver.ts", "../src/servers/gamepadserver.ts", "../src/servers/dotmatrixserver.ts", "../src/jdom/lightconstants.ts", "../src/servers/ledstripserver.ts", "../src/servers/matrixkeypadserver.ts", "../src/servers/motorserver.ts", "../src/servers/leveldetector.ts", "../src/servers/analogsensorserver.ts", "../src/servers/raingaugeserver.ts", "../src/servers/reflectedlightserver.ts", "../src/servers/rotaryencoderserver.ts", "../src/servers/servoserver.ts", "../src/servers/settingsserver.ts", "../src/servers/speechsynthesisserver.ts", "../src/servers/switchserver.ts", "../src/servers/trafficlightserver.ts", "../src/servers/soundplayerserver.ts", "../src/servers/randomnumbergeneratorserver.ts", "../src/servers/compassserver.ts", "../src/servers/dmxserver.ts", "../src/jdom/iframeclient.ts", "../src/servers/bitradioserver.ts", "../src/servers/powerserver.ts", "../src/servers/capacitivebuttonserver.ts", "../src/servers/hidkeyboardserver.ts", "../src/servers/hidmouseserver.ts", "../src/servers/vibrationmotorserver.ts", "../src/servers/wifiserver.ts", "../src/servers/accelerometerserver.ts", "../src/servers/brailledisplayserver.ts", "../src/servers/ledserver.ts", "../src/servers/powersupplyserver.ts", "../src/servers/hidjoystickserver.ts", "../src/servers/magneticfieldlevelserver.ts", "../src/servers/dualmotorsserver.ts", "../src/servers/cloudadapterserver.ts", "../src/servers/satnavserver.ts", "../src/servers/planarpositionserver.ts", "../src/servers/serialserver.ts", "../src/servers/rosserver.ts", "../src/servers/indexedscreenserver.ts", "../src/jdom/sevensegment.ts", "../src/servers/sevensegmentdisplayserver.ts", "../src/servers/pcmonitorserver.ts", "../src/servers/pccontrollerserver.ts", "../src/servers/servers.ts", "../src/jdom/serviceclient.ts", "../src/jdom/clients/rolemanagerclient.ts", "../src/jdom/scheduler.ts", "../jacdac-spec/dist/devices.json", "../src/jdom/catalog.ts", "../src/jdom/bus.ts", "../src/jdom/field.ts", "../src/jdom/packobject.ts", "../src/jdom/register.ts", "../src/jdom/event.ts", "../src/jdom/service.ts", "../src/jdom/ledcontroller.ts", "../src/jdom/device.ts", "../src/jdom/trace/traceplayer.ts", "../src/jdom/logparser.ts", "../src/jdom/speedtest.ts", "../src/jdom/command.ts", "../src/jdom/packetfilter.ts", "../src/jdom/trace/tracerecorder.ts", "../src/jdom/trace/traceview.ts", "../src/jdom/light.ts", "../src/jdom/setting.ts", "../src/jdom/nodesetting.ts", "../src/jdom/servers/rolemanagerserver.ts", "../src/jdom/color.ts", "../src/jdom/bridge.ts", "../src/jdom/clients/settingsclient.ts", "../src/jdom/clients/devicescriptmanagerclient.ts", "../src/jdom/transport/bluetooth.ts", "../src/jdom/transport/hf2.ts", "../src/jdom/transport/microbit.ts", "../src/jdom/transport/usbio.ts", "../src/jdom/transport/jdusb.ts", "../src/jdom/transport/webserialio.ts", "../src/jdom/transport/eventtargetobservable.ts", "../src/jdom/transport/usb.ts", "../src/jdom/transport/workertransport.ts", "../src/jdom/transport/webserial.ts", "../src/jdom/bridges/iframebridge.ts", "../src/jdom/transport/websockettransport.ts", "../src/jdom/transport/createbus.ts", "../src/jdom/rolemanager.ts", "../src/jdom/sensors.ts", "../src/jdom/bridges/websocketbridge.ts", "../src/jdom/transport/nodesocket.ts", "../src/jdom/transport/nodespi.ts", "../src/jdom/transport/nodewebserialio.ts", "../src/jdom/transport/nodewebusb.ts", "../src/jdom/devtools.ts", "../src/jdom/semver.ts", "../src/servers/gamepadservermanager.ts", "../src/servers/loggerserver.ts", "../src/servers/verifiedtelemetryserver.ts", "../src/servers/devicescriptmanagerserver.ts"],
  "sourcesContent": ["/* eslint-disable @typescript-eslint/no-namespace */\n// Service Common registers and commands constants\nexport const CONST_SYSTEM_ANNOUNCE_INTERVAL = 0x1f4\n\nexport enum SystemReadingThreshold { // uint8_t\n    Neutral = 0x1,\n    Inactive = 0x2,\n    Active = 0x3,\n}\n\nexport enum SystemStatusCodes { // uint16_t\n    Ready = 0x0,\n    Initializing = 0x1,\n    Calibrating = 0x2,\n    Sleeping = 0x3,\n    WaitingForInput = 0x4,\n    CalibrationNeeded = 0x64,\n}\n\nexport enum SystemCmd {\n    /**\n     * No args. Enumeration data for control service; service-specific advertisement data otherwise.\n     * Control broadcasts it automatically every `announce_interval`ms, but other service have to be queried to provide it.\n     */\n    Announce = 0x0,\n\n    /**\n     * No args. Registers number `N` is fetched by issuing command `0x1000 | N`.\n     * The report format is the same as the format of the register.\n     */\n    GetRegister = 0x1000,\n\n    /**\n     * No args. Registers number `N` is set by issuing command `0x2000 | N`, with the format\n     * the same as the format of the register.\n     */\n    SetRegister = 0x2000,\n\n    /**\n     * No args. Request to calibrate a sensor. The report indicates the calibration is done.\n     */\n    Calibrate = 0x2,\n\n    /**\n     * This report may be emitted by a server in response to a command (action or register operation)\n     * that it does not understand.\n     * The `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\n     * Note that it's possible to get an ACK, followed by such an error report.\n     *\n     * ```\n     * const [serviceCommand, packetCrc] = jdunpack<[number, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    CommandNotImplemented = 0x3,\n}\n\nexport namespace SystemCmdPack {\n    /**\n     * Pack format for 'command_not_implemented' data.\n     */\n    export const CommandNotImplemented = \"u16 u16\"\n}\n\nexport enum SystemReg {\n    /**\n     * Read-write uint32_t. This is either binary on/off (0 or non-zero), or can be gradual (eg. brightness of an RGB LED strip).\n     *\n     * ```\n     * const [intensity] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    Intensity = 0x1,\n\n    /**\n     * Read-write int32_t. The primary value of actuator (eg. servo pulse length, or motor duty cycle).\n     *\n     * ```\n     * const [value] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    Value = 0x2,\n\n    /**\n     * Constant int32_t. The lowest value that can be reported for the value register.\n     *\n     * ```\n     * const [minValue] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    MinValue = 0x110,\n\n    /**\n     * Constant int32_t. The highest value that can be reported for the value register.\n     *\n     * ```\n     * const [maxValue] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    MaxValue = 0x111,\n\n    /**\n     * Read-write mA uint16_t. Limit the power drawn by the service, in mA.\n     *\n     * ```\n     * const [maxPower] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    MaxPower = 0x7,\n\n    /**\n     * Read-write # uint8_t. Asks device to stream a given number of samples\n     * (clients will typically write `255` to this register every second or so, while streaming is required).\n     *\n     * ```\n     * const [streamingSamples] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    StreamingSamples = 0x3,\n\n    /**\n     * Read-write ms uint32_t. Period between packets of data when streaming in milliseconds.\n     *\n     * ```\n     * const [streamingInterval] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    StreamingInterval = 0x4,\n\n    /**\n     * Read-only int32_t. Read-only value of the sensor, also reported in streaming.\n     *\n     * ```\n     * const [reading] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    Reading = 0x101,\n\n    /**\n     * Read-write uint32_t. For sensors that support it, sets the range (sometimes also described `min`/`max_reading`).\n     * Typically only a small set of values is supported.\n     * Setting it to `X` will select the smallest possible range that is at least `X`,\n     * or if it doesn't exist, the largest supported range.\n     *\n     * ```\n     * const [readingRange] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ReadingRange = 0x8,\n\n    /**\n     * Constant. Lists the values supported as `reading_range`.\n     *\n     * ```\n     * const [range] = jdunpack<[number[]]>(buf, \"u32[]\")\n     * ```\n     */\n    SupportedRanges = 0x10a,\n\n    /**\n     * Constant int32_t. The lowest value that can be reported by the sensor.\n     *\n     * ```\n     * const [minReading] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    MinReading = 0x104,\n\n    /**\n     * Constant int32_t. The highest value that can be reported by the sensor.\n     *\n     * ```\n     * const [maxReading] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    MaxReading = 0x105,\n\n    /**\n     * Read-only uint32_t. The real value of whatever is measured is between `reading - reading_error` and `reading + reading_error`. It should be computed from the internal state of the sensor. This register is often, but not always `const`. If the register value is modified,\n     * send a report in the same frame of the `reading` report.\n     *\n     * ```\n     * const [readingError] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ReadingError = 0x106,\n\n    /**\n     * Constant uint32_t. Smallest, yet distinguishable change in reading.\n     *\n     * ```\n     * const [readingResolution] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ReadingResolution = 0x108,\n\n    /**\n     * Read-write int32_t. Threshold when reading data gets inactive and triggers a `inactive`.\n     *\n     * ```\n     * const [inactiveThreshold] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    InactiveThreshold = 0x5,\n\n    /**\n     * Read-write int32_t. Thresholds when reading data gets active and triggers a `active` event.\n     *\n     * ```\n     * const [activeThreshold] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    ActiveThreshold = 0x6,\n\n    /**\n     * Constant ms uint32_t. Preferred default streaming interval for sensor in milliseconds.\n     *\n     * ```\n     * const [streamingPreferredInterval] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    StreamingPreferredInterval = 0x102,\n\n    /**\n     * Constant uint32_t. The hardware variant of the service.\n     * For services which support this, there's an enum defining the meaning.\n     *\n     * ```\n     * const [variant] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    Variant = 0x107,\n\n    /**\n     * Read-write string (bytes). An optional register in the format of a URL query string where the client can provide hints how\n     * the device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\n     *\n     * ```\n     * const [clientVariant] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ClientVariant = 0x9,\n\n    /**\n     * Reports the current state or error status of the device. `code` is a standardized value from\n     * the Jacdac status/error codes. `vendor_code` is any vendor specific error code describing the device\n     * state. This report is typically not queried, when a device has an error, it will typically\n     * add this report in frame along with the announce packet.\n     *\n     * ```\n     * const [code, vendorCode] = jdunpack<[SystemStatusCodes, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    StatusCode = 0x103,\n\n    /**\n     * Constant string (bytes). A friendly name that describes the role of this service instance in the device.\n     *\n     * ```\n     * const [instanceName] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    InstanceName = 0x109,\n}\n\nexport namespace SystemRegPack {\n    /**\n     * Pack format for 'intensity' data.\n     */\n    export const Intensity = \"u32\"\n\n    /**\n     * Pack format for 'value' data.\n     */\n    export const Value = \"i32\"\n\n    /**\n     * Pack format for 'min_value' data.\n     */\n    export const MinValue = \"i32\"\n\n    /**\n     * Pack format for 'max_value' data.\n     */\n    export const MaxValue = \"i32\"\n\n    /**\n     * Pack format for 'max_power' data.\n     */\n    export const MaxPower = \"u16\"\n\n    /**\n     * Pack format for 'streaming_samples' data.\n     */\n    export const StreamingSamples = \"u8\"\n\n    /**\n     * Pack format for 'streaming_interval' data.\n     */\n    export const StreamingInterval = \"u32\"\n\n    /**\n     * Pack format for 'reading' data.\n     */\n    export const Reading = \"i32\"\n\n    /**\n     * Pack format for 'reading_range' data.\n     */\n    export const ReadingRange = \"u32\"\n\n    /**\n     * Pack format for 'supported_ranges' data.\n     */\n    export const SupportedRanges = \"r: u32\"\n\n    /**\n     * Pack format for 'min_reading' data.\n     */\n    export const MinReading = \"i32\"\n\n    /**\n     * Pack format for 'max_reading' data.\n     */\n    export const MaxReading = \"i32\"\n\n    /**\n     * Pack format for 'reading_error' data.\n     */\n    export const ReadingError = \"u32\"\n\n    /**\n     * Pack format for 'reading_resolution' data.\n     */\n    export const ReadingResolution = \"u32\"\n\n    /**\n     * Pack format for 'inactive_threshold' data.\n     */\n    export const InactiveThreshold = \"i32\"\n\n    /**\n     * Pack format for 'active_threshold' data.\n     */\n    export const ActiveThreshold = \"i32\"\n\n    /**\n     * Pack format for 'streaming_preferred_interval' data.\n     */\n    export const StreamingPreferredInterval = \"u32\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u32\"\n\n    /**\n     * Pack format for 'client_variant' data.\n     */\n    export const ClientVariant = \"s\"\n\n    /**\n     * Pack format for 'status_code' data.\n     */\n    export const StatusCode = \"u16 u16\"\n\n    /**\n     * Pack format for 'instance_name' data.\n     */\n    export const InstanceName = \"s\"\n}\n\nexport enum SystemEvent {\n    /**\n     * Notifies that the service has been activated (eg. button pressed, network connected, etc.)\n     */\n    Active = 0x1,\n\n    /**\n     * Notifies that the service has been dis-activated.\n     */\n    Inactive = 0x2,\n\n    /**\n     * Notifies that the some state of the service changed.\n     */\n    Change = 0x3,\n\n    /**\n     * Notifies that the status code of the service changed.\n     *\n     * ```\n     * const [code, vendorCode] = jdunpack<[SystemStatusCodes, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    StatusCodeChanged = 0x4,\n\n    /**\n     * Notifies that the threshold is back between `low` and `high`.\n     */\n    Neutral = 0x7,\n}\n\nexport namespace SystemEventPack {\n    /**\n     * Pack format for 'status_code_changed' data.\n     */\n    export const StatusCodeChanged = \"u16 u16\"\n}\n\n// Service Base service constants\nexport enum BaseCmd {\n    /**\n     * This report may be emitted by a server in response to a command (action or register operation)\n     * that it does not understand.\n     * The `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\n     * Note that it's possible to get an ACK, followed by such an error report.\n     *\n     * ```\n     * const [serviceCommand, packetCrc] = jdunpack<[number, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    CommandNotImplemented = 0x3,\n}\n\nexport namespace BaseCmdPack {\n    /**\n     * Pack format for 'command_not_implemented' data.\n     */\n    export const CommandNotImplemented = \"u16 u16\"\n}\n\nexport enum BaseReg {\n    /**\n     * Constant string (bytes). A friendly name that describes the role of this service instance in the device.\n     * It often corresponds to what's printed on the device:\n     * for example, `A` for button A, or `S0` for servo channel 0.\n     * Words like `left` should be avoided because of localization issues (unless they are printed on the device).\n     *\n     * ```\n     * const [instanceName] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    InstanceName = 0x109,\n\n    /**\n     * Reports the current state or error status of the device. ``code`` is a standardized value from\n     * the Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\n     * state. This report is typically not queried, when a device has an error, it will typically\n     * add this report in frame along with the announce packet. If a service implements this register,\n     * it should also support the ``status_code_changed`` event defined below.\n     *\n     * ```\n     * const [code, vendorCode] = jdunpack<[number, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    StatusCode = 0x103,\n\n    /**\n     * Read-write string (bytes). An optional register in the format of a URL query string where the client can provide hints how\n     * the device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\n     *\n     * ```\n     * const [clientVariant] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ClientVariant = 0x9,\n}\n\nexport namespace BaseRegPack {\n    /**\n     * Pack format for 'instance_name' data.\n     */\n    export const InstanceName = \"s\"\n\n    /**\n     * Pack format for 'status_code' data.\n     */\n    export const StatusCode = \"u16 u16\"\n\n    /**\n     * Pack format for 'client_variant' data.\n     */\n    export const ClientVariant = \"s\"\n}\n\nexport enum BaseEvent {\n    /**\n     * Notifies that the status code of the service changed.\n     *\n     * ```\n     * const [code, vendorCode] = jdunpack<[number, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    StatusCodeChanged = 0x4,\n}\n\nexport namespace BaseEventPack {\n    /**\n     * Pack format for 'status_code_changed' data.\n     */\n    export const StatusCodeChanged = \"u16 u16\"\n}\n\n// Service Sensor constants\nexport enum SensorReg {\n    /**\n     * Read-write # uint8_t. Asks device to stream a given number of samples\n     * (clients will typically write `255` to this register every second or so, while streaming is required).\n     *\n     * ```\n     * const [streamingSamples] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    StreamingSamples = 0x3,\n\n    /**\n     * Read-write ms uint32_t. Period between packets of data when streaming in milliseconds.\n     *\n     * ```\n     * const [streamingInterval] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    StreamingInterval = 0x4,\n\n    /**\n     * Constant ms uint32_t. Preferred default streaming interval for sensor in milliseconds.\n     *\n     * ```\n     * const [streamingPreferredInterval] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    StreamingPreferredInterval = 0x102,\n}\n\nexport namespace SensorRegPack {\n    /**\n     * Pack format for 'streaming_samples' data.\n     */\n    export const StreamingSamples = \"u8\"\n\n    /**\n     * Pack format for 'streaming_interval' data.\n     */\n    export const StreamingInterval = \"u32\"\n\n    /**\n     * Pack format for 'streaming_preferred_interval' data.\n     */\n    export const StreamingPreferredInterval = \"u32\"\n}\n\n// Service Accelerometer constants\nexport const SRV_ACCELEROMETER = 0x1f140409\nexport enum AccelerometerReg {\n    /**\n     * Indicates the current forces acting on accelerometer.\n     *\n     * ```\n     * const [x, y, z] = jdunpack<[number, number, number]>(buf, \"i12.20 i12.20 i12.20\")\n     * ```\n     */\n    Forces = 0x101,\n\n    /**\n     * Read-only g u12.20 (uint32_t). Error on the reading value.\n     *\n     * ```\n     * const [forcesError] = jdunpack<[number]>(buf, \"u12.20\")\n     * ```\n     */\n    ForcesError = 0x106,\n\n    /**\n     * Read-write g u12.20 (uint32_t). Configures the range forces detected.\n     * The value will be \"rounded up\" to one of `max_forces_supported`.\n     *\n     * ```\n     * const [maxForce] = jdunpack<[number]>(buf, \"u12.20\")\n     * ```\n     */\n    MaxForce = 0x8,\n\n    /**\n     * Constant. Lists values supported for writing `max_force`.\n     *\n     * ```\n     * const [maxForce] = jdunpack<[number[]]>(buf, \"u12.20[]\")\n     * ```\n     */\n    MaxForcesSupported = 0x10a,\n}\n\nexport namespace AccelerometerRegPack {\n    /**\n     * Pack format for 'forces' data.\n     */\n    export const Forces = \"i12.20 i12.20 i12.20\"\n\n    /**\n     * Pack format for 'forces_error' data.\n     */\n    export const ForcesError = \"u12.20\"\n\n    /**\n     * Pack format for 'max_force' data.\n     */\n    export const MaxForce = \"u12.20\"\n\n    /**\n     * Pack format for 'max_forces_supported' data.\n     */\n    export const MaxForcesSupported = \"r: u12.20\"\n}\n\nexport enum AccelerometerEvent {\n    /**\n     * Emitted when accelerometer is tilted in the given direction.\n     */\n    TiltUp = 0x81,\n\n    /**\n     * Emitted when accelerometer is tilted in the given direction.\n     */\n    TiltDown = 0x82,\n\n    /**\n     * Emitted when accelerometer is tilted in the given direction.\n     */\n    TiltLeft = 0x83,\n\n    /**\n     * Emitted when accelerometer is tilted in the given direction.\n     */\n    TiltRight = 0x84,\n\n    /**\n     * Emitted when accelerometer is laying flat in the given direction.\n     */\n    FaceUp = 0x85,\n\n    /**\n     * Emitted when accelerometer is laying flat in the given direction.\n     */\n    FaceDown = 0x86,\n\n    /**\n     * Emitted when total force acting on accelerometer is much less than 1g.\n     */\n    Freefall = 0x87,\n\n    /**\n     * Emitted when forces change violently a few times.\n     */\n    Shake = 0x8b,\n\n    /**\n     * Emitted when force in any direction exceeds given threshold.\n     */\n    Force2g = 0x8c,\n\n    /**\n     * Emitted when force in any direction exceeds given threshold.\n     */\n    Force3g = 0x88,\n\n    /**\n     * Emitted when force in any direction exceeds given threshold.\n     */\n    Force6g = 0x89,\n\n    /**\n     * Emitted when force in any direction exceeds given threshold.\n     */\n    Force8g = 0x8a,\n}\n\n// Service Acidity constants\nexport const SRV_ACIDITY = 0x1e9778c5\nexport enum AcidityReg {\n    /**\n     * Read-only pH u4.12 (uint16_t). The acidity, pH, of water.\n     *\n     * ```\n     * const [acidity] = jdunpack<[number]>(buf, \"u4.12\")\n     * ```\n     */\n    Acidity = 0x101,\n\n    /**\n     * Read-only pH u4.12 (uint16_t). Error on the acidity reading.\n     *\n     * ```\n     * const [acidityError] = jdunpack<[number]>(buf, \"u4.12\")\n     * ```\n     */\n    AcidityError = 0x106,\n\n    /**\n     * Constant pH u4.12 (uint16_t). Lowest acidity that can be reported.\n     *\n     * ```\n     * const [minAcidity] = jdunpack<[number]>(buf, \"u4.12\")\n     * ```\n     */\n    MinAcidity = 0x104,\n\n    /**\n     * Constant pH u4.12 (uint16_t). Highest acidity that can be reported.\n     *\n     * ```\n     * const [maxHumidity] = jdunpack<[number]>(buf, \"u4.12\")\n     * ```\n     */\n    MaxHumidity = 0x105,\n}\n\nexport namespace AcidityRegPack {\n    /**\n     * Pack format for 'acidity' data.\n     */\n    export const Acidity = \"u4.12\"\n\n    /**\n     * Pack format for 'acidity_error' data.\n     */\n    export const AcidityError = \"u4.12\"\n\n    /**\n     * Pack format for 'min_acidity' data.\n     */\n    export const MinAcidity = \"u4.12\"\n\n    /**\n     * Pack format for 'max_humidity' data.\n     */\n    export const MaxHumidity = \"u4.12\"\n}\n\n// Service Air Pressure constants\nexport const SRV_AIR_PRESSURE = 0x1e117cea\nexport enum AirPressureReg {\n    /**\n     * Read-only hPa u22.10 (uint32_t). The air pressure.\n     *\n     * ```\n     * const [pressure] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    Pressure = 0x101,\n\n    /**\n     * Read-only hPa u22.10 (uint32_t). The real pressure is between `pressure - pressure_error` and `pressure + pressure_error`.\n     *\n     * ```\n     * const [pressureError] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    PressureError = 0x106,\n\n    /**\n     * Constant hPa u22.10 (uint32_t). Lowest air pressure that can be reported.\n     *\n     * ```\n     * const [minPressure] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    MinPressure = 0x104,\n\n    /**\n     * Constant hPa u22.10 (uint32_t). Highest air pressure that can be reported.\n     *\n     * ```\n     * const [maxPressure] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    MaxPressure = 0x105,\n}\n\nexport namespace AirPressureRegPack {\n    /**\n     * Pack format for 'pressure' data.\n     */\n    export const Pressure = \"u22.10\"\n\n    /**\n     * Pack format for 'pressure_error' data.\n     */\n    export const PressureError = \"u22.10\"\n\n    /**\n     * Pack format for 'min_pressure' data.\n     */\n    export const MinPressure = \"u22.10\"\n\n    /**\n     * Pack format for 'max_pressure' data.\n     */\n    export const MaxPressure = \"u22.10\"\n}\n\n// Service Air Quality Index constants\nexport const SRV_AIR_QUALITY_INDEX = 0x14ac6ed6\nexport enum AirQualityIndexReg {\n    /**\n     * Read-only AQI u16.16 (uint32_t). Air quality index, typically refreshed every second.\n     *\n     * ```\n     * const [aqiIndex] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    AqiIndex = 0x101,\n\n    /**\n     * Read-only AQI u16.16 (uint32_t). Error on the AQI measure.\n     *\n     * ```\n     * const [aqiIndexError] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    AqiIndexError = 0x106,\n\n    /**\n     * Constant AQI u16.16 (uint32_t). Minimum AQI reading, representing a good air quality. Typically 0.\n     *\n     * ```\n     * const [minAqiIndex] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    MinAqiIndex = 0x104,\n\n    /**\n     * Constant AQI u16.16 (uint32_t). Maximum AQI reading, representing a very poor air quality.\n     *\n     * ```\n     * const [maxAqiIndex] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    MaxAqiIndex = 0x105,\n}\n\nexport namespace AirQualityIndexRegPack {\n    /**\n     * Pack format for 'aqi_index' data.\n     */\n    export const AqiIndex = \"u16.16\"\n\n    /**\n     * Pack format for 'aqi_index_error' data.\n     */\n    export const AqiIndexError = \"u16.16\"\n\n    /**\n     * Pack format for 'min_aqi_index' data.\n     */\n    export const MinAqiIndex = \"u16.16\"\n\n    /**\n     * Pack format for 'max_aqi_index' data.\n     */\n    export const MaxAqiIndex = \"u16.16\"\n}\n\n// Service Arcade Gamepad constants\nexport const SRV_ARCADE_GAMEPAD = 0x1deaa06e\n\nexport enum ArcadeGamepadButton { // uint8_t\n    Left = 0x1,\n    Up = 0x2,\n    Right = 0x3,\n    Down = 0x4,\n    A = 0x5,\n    B = 0x6,\n    Menu = 0x7,\n    Select = 0x8,\n    Reset = 0x9,\n    Exit = 0xa,\n}\n\nexport enum ArcadeGamepadReg {\n    /**\n     * Indicates which buttons are currently active (pressed).\n     * `pressure` should be `0xff` for digital buttons, and proportional for analog ones.\n     *\n     * ```\n     * const [rest] = jdunpack<[([ArcadeGamepadButton, number])[]]>(buf, \"r: u8 u0.8\")\n     * const [button, pressure] = rest[0]\n     * ```\n     */\n    Buttons = 0x101,\n\n    /**\n     * Constant. Indicates number of players supported and which buttons are present on the controller.\n     *\n     * ```\n     * const [button] = jdunpack<[ArcadeGamepadButton[]]>(buf, \"u8[]\")\n     * ```\n     */\n    AvailableButtons = 0x180,\n}\n\nexport namespace ArcadeGamepadRegPack {\n    /**\n     * Pack format for 'buttons' data.\n     */\n    export const Buttons = \"r: u8 u0.8\"\n\n    /**\n     * Pack format for 'available_buttons' data.\n     */\n    export const AvailableButtons = \"r: u8\"\n}\n\nexport enum ArcadeGamepadEvent {\n    /**\n     * Argument: button Button (uint8_t). Emitted when button goes from inactive to active.\n     *\n     * ```\n     * const [button] = jdunpack<[ArcadeGamepadButton]>(buf, \"u8\")\n     * ```\n     */\n    Down = 0x1,\n\n    /**\n     * Argument: button Button (uint8_t). Emitted when button goes from active to inactive.\n     *\n     * ```\n     * const [button] = jdunpack<[ArcadeGamepadButton]>(buf, \"u8\")\n     * ```\n     */\n    Up = 0x2,\n}\n\nexport namespace ArcadeGamepadEventPack {\n    /**\n     * Pack format for 'down' data.\n     */\n    export const Down = \"u8\"\n\n    /**\n     * Pack format for 'up' data.\n     */\n    export const Up = \"u8\"\n}\n\n// Service Arcade Sound constants\nexport const SRV_ARCADE_SOUND = 0x1fc63606\nexport enum ArcadeSoundCmd {\n    /**\n     * Argument: samples bytes. Play samples, which are single channel, signed 16-bit little endian values.\n     *\n     * ```\n     * const [samples] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Play = 0x80,\n}\n\nexport namespace ArcadeSoundCmdPack {\n    /**\n     * Pack format for 'play' data.\n     */\n    export const Play = \"b\"\n}\n\nexport enum ArcadeSoundReg {\n    /**\n     * Read-write Hz u22.10 (uint32_t). Get or set playback sample rate (in samples per second).\n     * If you set it, read it back, as the value may be rounded up or down.\n     *\n     * ```\n     * const [sampleRate] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    SampleRate = 0x80,\n\n    /**\n     * Constant B uint32_t. The size of the internal audio buffer.\n     *\n     * ```\n     * const [bufferSize] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    BufferSize = 0x180,\n\n    /**\n     * Read-only B uint32_t. How much data is still left in the buffer to play.\n     * Clients should not send more data than `buffer_size - buffer_pending`,\n     * but can keep the `buffer_pending` as low as they want to ensure low latency\n     * of audio playback.\n     *\n     * ```\n     * const [bufferPending] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    BufferPending = 0x181,\n}\n\nexport namespace ArcadeSoundRegPack {\n    /**\n     * Pack format for 'sample_rate' data.\n     */\n    export const SampleRate = \"u22.10\"\n\n    /**\n     * Pack format for 'buffer_size' data.\n     */\n    export const BufferSize = \"u32\"\n\n    /**\n     * Pack format for 'buffer_pending' data.\n     */\n    export const BufferPending = \"u32\"\n}\n\n// Service Barcode reader constants\nexport const SRV_BARCODE_READER = 0x1c739e6c\n\nexport enum BarcodeReaderFormat { // uint8_t\n    Aztec = 0x1,\n    Code128 = 0x2,\n    Code39 = 0x3,\n    Code93 = 0x4,\n    Codabar = 0x5,\n    DataMatrix = 0x6,\n    Ean13 = 0x8,\n    Ean8 = 0x9,\n    ITF = 0xa,\n    Pdf417 = 0xb,\n    QrCode = 0xc,\n    UpcA = 0xd,\n    UpcE = 0xe,\n}\n\nexport enum BarcodeReaderReg {\n    /**\n     * Read-write bool (uint8_t). Turns on or off the detection of barcodes.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Constant. Reports the list of supported barcode formats, as documented in https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API.\n     *\n     * ```\n     * const [format] = jdunpack<[BarcodeReaderFormat[]]>(buf, \"u8[]\")\n     * ```\n     */\n    Formats = 0x180,\n}\n\nexport namespace BarcodeReaderRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'formats' data.\n     */\n    export const Formats = \"r: u8\"\n}\n\nexport enum BarcodeReaderEvent {\n    /**\n     * Raised when a bar code is detected and decoded. If the reader detects multiple codes, it will issue multiple events.\n     * In case of numeric barcodes, the `data` field should contain the ASCII (which is the same as UTF8 in that case) representation of the number.\n     *\n     * ```\n     * const [format, data] = jdunpack<[BarcodeReaderFormat, string]>(buf, \"u8 s\")\n     * ```\n     */\n    Detect = 0x1,\n}\n\nexport namespace BarcodeReaderEventPack {\n    /**\n     * Pack format for 'detect' data.\n     */\n    export const Detect = \"u8 s\"\n}\n\n// Service bit:radio constants\nexport const SRV_BIT_RADIO = 0x1ac986cf\nexport enum BitRadioReg {\n    /**\n     * Read-write bool (uint8_t). Turns on/off the radio antenna.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-write uint8_t. Group used to filter packets\n     *\n     * ```\n     * const [group] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Group = 0x80,\n\n    /**\n     * Read-write uint8_t. Antenna power to increase or decrease range.\n     *\n     * ```\n     * const [transmissionPower] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    TransmissionPower = 0x81,\n\n    /**\n     * Read-write uint8_t. Change the transmission and reception band of the radio to the given channel.\n     *\n     * ```\n     * const [frequencyBand] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    FrequencyBand = 0x82,\n}\n\nexport namespace BitRadioRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'group' data.\n     */\n    export const Group = \"u8\"\n\n    /**\n     * Pack format for 'transmission_power' data.\n     */\n    export const TransmissionPower = \"u8\"\n\n    /**\n     * Pack format for 'frequency_band' data.\n     */\n    export const FrequencyBand = \"u8\"\n}\n\nexport enum BitRadioCmd {\n    /**\n     * Argument: message string (bytes). Sends a string payload as a radio message, maximum 18 characters.\n     *\n     * ```\n     * const [message] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    SendString = 0x80,\n\n    /**\n     * Argument: value f64 (uint64_t). Sends a double precision number payload as a radio message\n     *\n     * ```\n     * const [value] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    SendNumber = 0x81,\n\n    /**\n     * Sends a double precision number and a name payload as a radio message\n     *\n     * ```\n     * const [value, name] = jdunpack<[number, string]>(buf, \"f64 s\")\n     * ```\n     */\n    SendValue = 0x82,\n\n    /**\n     * Argument: data bytes. Sends a payload of bytes as a radio message\n     *\n     * ```\n     * const [data] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    SendBuffer = 0x83,\n\n    /**\n     * Raised when a string packet is received\n     *\n     * ```\n     * const [time, deviceSerialNumber, rssi, message] = jdunpack<[number, number, number, string]>(buf, \"u32 u32 i8 x[1] s\")\n     * ```\n     */\n    StringReceived = 0x90,\n\n    /**\n     * Raised when a number packet is received\n     *\n     * ```\n     * const [time, deviceSerialNumber, rssi, value, name] = jdunpack<[number, number, number, number, string]>(buf, \"u32 u32 i8 x[3] f64 s\")\n     * ```\n     */\n    NumberReceived = 0x91,\n\n    /**\n     * Raised when a buffer packet is received\n     *\n     * ```\n     * const [time, deviceSerialNumber, rssi, data] = jdunpack<[number, number, number, Uint8Array]>(buf, \"u32 u32 i8 x[1] b\")\n     * ```\n     */\n    BufferReceived = 0x92,\n}\n\nexport namespace BitRadioCmdPack {\n    /**\n     * Pack format for 'send_string' data.\n     */\n    export const SendString = \"s\"\n\n    /**\n     * Pack format for 'send_number' data.\n     */\n    export const SendNumber = \"f64\"\n\n    /**\n     * Pack format for 'send_value' data.\n     */\n    export const SendValue = \"f64 s\"\n\n    /**\n     * Pack format for 'send_buffer' data.\n     */\n    export const SendBuffer = \"b\"\n\n    /**\n     * Pack format for 'string_received' data.\n     */\n    export const StringReceived = \"u32 u32 i8 b[1] s\"\n\n    /**\n     * Pack format for 'number_received' data.\n     */\n    export const NumberReceived = \"u32 u32 i8 b[3] f64 s\"\n\n    /**\n     * Pack format for 'buffer_received' data.\n     */\n    export const BufferReceived = \"u32 u32 i8 b[1] b\"\n}\n\n// Service Bootloader constants\nexport const SRV_BOOTLOADER = 0x1ffa9948\n\nexport enum BootloaderError { // uint32_t\n    NoError = 0x0,\n    PacketTooSmall = 0x1,\n    OutOfFlashableRange = 0x2,\n    InvalidPageOffset = 0x3,\n    NotPageAligned = 0x4,\n}\n\nexport enum BootloaderCmd {\n    /**\n     * No args. The `service_class` is always `0x1ffa9948`. The `product_identifier` identifies the kind of firmware\n     * that \"fits\" this device.\n     */\n    Info = 0x0,\n\n    /**\n     * report Info\n     * ```\n     * const [serviceClass, pageSize, flashableSize, productIdentifier] = jdunpack<[number, number, number, number]>(buf, \"u32 u32 u32 u32\")\n     * ```\n     */\n\n    /**\n     * Argument: session_id uint32_t. The flashing server should generate a random id, and use this command to set it.\n     *\n     * ```\n     * const [sessionId] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    SetSession = 0x81,\n\n    /**\n     * report SetSession\n     * ```\n     * const [sessionId] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n\n    /**\n     * Use to send flashing data. A physical page is split into `chunk_max + 1` chunks, where `chunk_no = 0 ... chunk_max`.\n     * Each chunk is stored at `page_address + page_offset`. `page_address` has to be equal in all chunks,\n     * and is included in response.\n     * Only the last chunk causes writing to flash and elicits response.\n     *\n     * ```\n     * const [pageAddress, pageOffset, chunkNo, chunkMax, sessionId, pageData] = jdunpack<[number, number, number, number, number, Uint8Array]>(buf, \"u32 u16 u8 u8 u32 x[4] x[4] x[4] x[4] b[208]\")\n     * ```\n     */\n    PageData = 0x80,\n\n    /**\n     * report PageData\n     * ```\n     * const [sessionId, pageError, pageAddress] = jdunpack<[number, BootloaderError, number]>(buf, \"u32 u32 u32\")\n     * ```\n     */\n}\n\nexport namespace BootloaderCmdPack {\n    /**\n     * Pack format for 'info' data.\n     */\n    export const InfoReport = \"u32 u32 u32 u32\"\n\n    /**\n     * Pack format for 'set_session' data.\n     */\n    export const SetSession = \"u32\"\n\n    /**\n     * Pack format for 'set_session' data.\n     */\n    export const SetSessionReport = \"u32\"\n\n    /**\n     * Pack format for 'page_data' data.\n     */\n    export const PageData = \"u32 u16 u8 u8 u32 u32 u32 u32 u32 b[208]\"\n\n    /**\n     * Pack format for 'page_data' data.\n     */\n    export const PageDataReport = \"u32 u32 u32\"\n}\n\n// Service Braille display constants\nexport const SRV_BRAILLE_DISPLAY = 0x13bfb7cc\nexport enum BrailleDisplayReg {\n    /**\n     * Read-write bool (uint8_t). Determines if the braille display is active.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-write string (bytes). Braille patterns to show. Must be unicode characters between `0x2800` and `0x28ff`.\n     *\n     * ```\n     * const [patterns] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Patterns = 0x2,\n\n    /**\n     * Constant # uint8_t. Gets the number of patterns that can be displayed.\n     *\n     * ```\n     * const [length] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Length = 0x181,\n}\n\nexport namespace BrailleDisplayRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'patterns' data.\n     */\n    export const Patterns = \"s\"\n\n    /**\n     * Pack format for 'length' data.\n     */\n    export const Length = \"u8\"\n}\n\n// Service Bridge constants\nexport const SRV_BRIDGE = 0x1fe5b46f\nexport enum BridgeReg {\n    /**\n     * Read-write bool (uint8_t). Enables or disables the bridge.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n}\n\nexport namespace BridgeRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n}\n\n// Service Button constants\nexport const SRV_BUTTON = 0x1473a263\nexport enum ButtonReg {\n    /**\n     * Read-only ratio u0.16 (uint16_t). Indicates the pressure state of the button, where `0` is open.\n     *\n     * ```\n     * const [pressure] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Pressure = 0x101,\n\n    /**\n     * Constant bool (uint8_t). Indicates if the button provides analog `pressure` readings.\n     *\n     * ```\n     * const [analog] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Analog = 0x180,\n\n    /**\n     * Read-only bool (uint8_t). Determines if the button is pressed currently.\n     */\n    Pressed = 0x181,\n}\n\nexport namespace ButtonRegPack {\n    /**\n     * Pack format for 'pressure' data.\n     */\n    export const Pressure = \"u0.16\"\n\n    /**\n     * Pack format for 'analog' data.\n     */\n    export const Analog = \"u8\"\n\n    /**\n     * Pack format for 'pressed' data.\n     */\n    export const Pressed = \"u8\"\n}\n\nexport enum ButtonEvent {\n    /**\n     * Emitted when button goes from inactive to active.\n     */\n    Down = 0x1,\n\n    /**\n     * Argument: time ms uint32_t. Emitted when button goes from active to inactive. The 'time' parameter\n     * records the amount of time between the down and up events.\n     *\n     * ```\n     * const [time] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    Up = 0x2,\n\n    /**\n     * Argument: time ms uint32_t. Emitted when the press time is greater than 500ms, and then at least every 500ms\n     * as long as the button remains pressed. The 'time' parameter records the the amount of time\n     * that the button has been held (since the down event).\n     *\n     * ```\n     * const [time] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    Hold = 0x81,\n}\n\nexport namespace ButtonEventPack {\n    /**\n     * Pack format for 'up' data.\n     */\n    export const Up = \"u32\"\n\n    /**\n     * Pack format for 'hold' data.\n     */\n    export const Hold = \"u32\"\n}\n\n// Service Buzzer constants\nexport const SRV_BUZZER = 0x1b57b1d7\nexport enum BuzzerReg {\n    /**\n     * Read-write ratio u0.8 (uint8_t). The volume (duty cycle) of the buzzer.\n     *\n     * ```\n     * const [volume] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    Volume = 0x1,\n}\n\nexport namespace BuzzerRegPack {\n    /**\n     * Pack format for 'volume' data.\n     */\n    export const Volume = \"u0.8\"\n}\n\nexport enum BuzzerCmd {\n    /**\n     * Play a PWM tone with given period and duty for given duration.\n     * The duty is scaled down with `volume` register.\n     * To play tone at frequency `F` Hz and volume `V` (in `0..1`) you will want\n     * to send `P = 1000000 / F` and `D = P * V / 2`.\n     *\n     * ```\n     * const [period, duty, duration] = jdunpack<[number, number, number]>(buf, \"u16 u16 u16\")\n     * ```\n     */\n    PlayTone = 0x80,\n\n    /**\n     * Play a note at the given frequency and volume.\n     */\n    PlayNote = 0x81,\n}\n\nexport namespace BuzzerCmdPack {\n    /**\n     * Pack format for 'play_tone' data.\n     */\n    export const PlayTone = \"u16 u16 u16\"\n\n    /**\n     * Pack format for 'play_note' data.\n     */\n    export const PlayNote = \"u16 u0.16 u16\"\n}\n\n// Service Capacitive Button constants\nexport const SRV_CAPACITIVE_BUTTON = 0x2865adc9\nexport enum CapacitiveButtonReg {\n    /**\n     * Read-write ratio u0.16 (uint16_t). Indicates the threshold for ``up`` events.\n     *\n     * ```\n     * const [threshold] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Threshold = 0x6,\n}\n\nexport namespace CapacitiveButtonRegPack {\n    /**\n     * Pack format for 'threshold' data.\n     */\n    export const Threshold = \"u0.16\"\n}\n\nexport enum CapacitiveButtonCmd {\n    /**\n     * No args. Request to calibrate the capactive. When calibration is requested, the device expects that no object is touching the button.\n     * The report indicates the calibration is done.\n     */\n    Calibrate = 0x2,\n}\n\n// Service Character Screen constants\nexport const SRV_CHARACTER_SCREEN = 0x1f37c56a\n\nexport enum CharacterScreenVariant { // uint8_t\n    LCD = 0x1,\n    OLED = 0x2,\n    Braille = 0x3,\n}\n\nexport enum CharacterScreenTextDirection { // uint8_t\n    LeftToRight = 0x1,\n    RightToLeft = 0x2,\n}\n\nexport enum CharacterScreenReg {\n    /**\n     * Read-write string (bytes). Text to show. Use `\\n` to break lines.\n     *\n     * ```\n     * const [message] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Message = 0x2,\n\n    /**\n     * Read-write ratio u0.16 (uint16_t). Brightness of the screen. `0` means off.\n     *\n     * ```\n     * const [brightness] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Brightness = 0x1,\n\n    /**\n     * Constant Variant (uint8_t). Describes the type of character LED screen.\n     *\n     * ```\n     * const [variant] = jdunpack<[CharacterScreenVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n\n    /**\n     * Read-write TextDirection (uint8_t). Specifies the RTL or LTR direction of the text.\n     *\n     * ```\n     * const [textDirection] = jdunpack<[CharacterScreenTextDirection]>(buf, \"u8\")\n     * ```\n     */\n    TextDirection = 0x82,\n\n    /**\n     * Constant # uint8_t. Gets the number of rows.\n     *\n     * ```\n     * const [rows] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Rows = 0x180,\n\n    /**\n     * Constant # uint8_t. Gets the number of columns.\n     *\n     * ```\n     * const [columns] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Columns = 0x181,\n}\n\nexport namespace CharacterScreenRegPack {\n    /**\n     * Pack format for 'message' data.\n     */\n    export const Message = \"s\"\n\n    /**\n     * Pack format for 'brightness' data.\n     */\n    export const Brightness = \"u0.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n\n    /**\n     * Pack format for 'text_direction' data.\n     */\n    export const TextDirection = \"u8\"\n\n    /**\n     * Pack format for 'rows' data.\n     */\n    export const Rows = \"u8\"\n\n    /**\n     * Pack format for 'columns' data.\n     */\n    export const Columns = \"u8\"\n}\n\n// Service Cloud Adapter constants\nexport const SRV_CLOUD_ADAPTER = 0x14606e9c\nexport enum CloudAdapterCmd {\n    /**\n     * Upload a JSON-encoded message to the cloud.\n     *\n     * ```\n     * const [topic, json] = jdunpack<[string, string]>(buf, \"z s\")\n     * ```\n     */\n    UploadJson = 0x80,\n\n    /**\n     * Upload a binary message to the cloud.\n     *\n     * ```\n     * const [topic, payload] = jdunpack<[string, Uint8Array]>(buf, \"z b\")\n     * ```\n     */\n    UploadBinary = 0x81,\n}\n\nexport namespace CloudAdapterCmdPack {\n    /**\n     * Pack format for 'upload_json' data.\n     */\n    export const UploadJson = \"z s\"\n\n    /**\n     * Pack format for 'upload_binary' data.\n     */\n    export const UploadBinary = \"z b\"\n}\n\nexport enum CloudAdapterReg {\n    /**\n     * Read-only bool (uint8_t). Indicate whether we're currently connected to the cloud server.\n     * When offline, `upload` commands are queued.\n     *\n     * ```\n     * const [connected] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Connected = 0x180,\n\n    /**\n     * Read-only string (bytes). User-friendly name of the connection, typically includes name of the server\n     * and/or type of cloud service (`\"something.cloud.net (Provider IoT)\"`).\n     *\n     * ```\n     * const [connectionName] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ConnectionName = 0x181,\n}\n\nexport namespace CloudAdapterRegPack {\n    /**\n     * Pack format for 'connected' data.\n     */\n    export const Connected = \"u8\"\n\n    /**\n     * Pack format for 'connection_name' data.\n     */\n    export const ConnectionName = \"s\"\n}\n\nexport enum CloudAdapterEvent {\n    /**\n     * Emitted when cloud send us a JSON message.\n     *\n     * ```\n     * const [topic, json] = jdunpack<[string, string]>(buf, \"z s\")\n     * ```\n     */\n    OnJson = 0x80,\n\n    /**\n     * Emitted when cloud send us a binary message.\n     *\n     * ```\n     * const [topic, payload] = jdunpack<[string, Uint8Array]>(buf, \"z b\")\n     * ```\n     */\n    OnBinary = 0x81,\n\n    /**\n     * Emitted when we connect or disconnect from the cloud.\n     */\n    Change = 0x3,\n}\n\nexport namespace CloudAdapterEventPack {\n    /**\n     * Pack format for 'on_json' data.\n     */\n    export const OnJson = \"z s\"\n\n    /**\n     * Pack format for 'on_binary' data.\n     */\n    export const OnBinary = \"z b\"\n}\n\n// Service Cloud Configuration constants\nexport const SRV_CLOUD_CONFIGURATION = 0x1462eefc\n\nexport enum CloudConfigurationConnectionStatus { // uint16_t\n    Connected = 0x1,\n    Disconnected = 0x2,\n    Connecting = 0x3,\n    Disconnecting = 0x4,\n}\n\nexport enum CloudConfigurationReg {\n    /**\n     * Read-only string (bytes). Something like `my-iot-hub.azure-devices.net` if available.\n     *\n     * ```\n     * const [serverName] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ServerName = 0x180,\n\n    /**\n     * Read-only string (bytes). Device identifier for the device in the cloud if available.\n     *\n     * ```\n     * const [cloudDeviceId] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    CloudDeviceId = 0x181,\n\n    /**\n     * Constant string (bytes). Cloud provider identifier.\n     *\n     * ```\n     * const [cloudType] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    CloudType = 0x183,\n\n    /**\n     * Read-only ConnectionStatus (uint16_t). Indicates the status of connection. A message beyond the [0..3] range represents an HTTP error code.\n     *\n     * ```\n     * const [connectionStatus] = jdunpack<[CloudConfigurationConnectionStatus]>(buf, \"u16\")\n     * ```\n     */\n    ConnectionStatus = 0x182,\n\n    /**\n     * Read-write ms uint32_t. How often to push data to the cloud.\n     *\n     * ```\n     * const [pushPeriod] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    PushPeriod = 0x80,\n\n    /**\n     * Read-write ms uint32_t. If no message is published within given period, the device resets.\n     * This can be due to connectivity problems or due to the device having nothing to publish.\n     * Forced to be at least `2 * flush_period`.\n     * Set to `0` to disable (default).\n     *\n     * ```\n     * const [pushWatchdogPeriod] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    PushWatchdogPeriod = 0x81,\n}\n\nexport namespace CloudConfigurationRegPack {\n    /**\n     * Pack format for 'server_name' data.\n     */\n    export const ServerName = \"s\"\n\n    /**\n     * Pack format for 'cloud_device_id' data.\n     */\n    export const CloudDeviceId = \"s\"\n\n    /**\n     * Pack format for 'cloud_type' data.\n     */\n    export const CloudType = \"s\"\n\n    /**\n     * Pack format for 'connection_status' data.\n     */\n    export const ConnectionStatus = \"u16\"\n\n    /**\n     * Pack format for 'push_period' data.\n     */\n    export const PushPeriod = \"u32\"\n\n    /**\n     * Pack format for 'push_watchdog_period' data.\n     */\n    export const PushWatchdogPeriod = \"u32\"\n}\n\nexport enum CloudConfigurationCmd {\n    /**\n     * No args. Starts a connection to the cloud service\n     */\n    Connect = 0x81,\n\n    /**\n     * No args. Starts disconnecting from the cloud service\n     */\n    Disconnect = 0x82,\n\n    /**\n     * Argument: connection_string string (bytes). Restricted command to override the existing connection string to cloud.\n     *\n     * ```\n     * const [connectionString] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    SetConnectionString = 0x86,\n}\n\nexport namespace CloudConfigurationCmdPack {\n    /**\n     * Pack format for 'set_connection_string' data.\n     */\n    export const SetConnectionString = \"s\"\n}\n\nexport enum CloudConfigurationEvent {\n    /**\n     * Argument: connection_status ConnectionStatus (uint16_t). Raised when the connection status changes\n     *\n     * ```\n     * const [connectionStatus] = jdunpack<[CloudConfigurationConnectionStatus]>(buf, \"u16\")\n     * ```\n     */\n    ConnectionStatusChange = 0x3,\n\n    /**\n     * Raised when a message has been sent to the hub.\n     */\n    MessageSent = 0x80,\n}\n\nexport namespace CloudConfigurationEventPack {\n    /**\n     * Pack format for 'connection_status_change' data.\n     */\n    export const ConnectionStatusChange = \"u16\"\n}\n\n// Service CODAL Message Bus constants\nexport const SRV_CODAL_MESSAGE_BUS = 0x121ff81d\nexport enum CodalMessageBusCmd {\n    /**\n     * Send a message on the CODAL bus. If `source` is `0`, it is treated as wildcard.\n     *\n     * ```\n     * const [source, value] = jdunpack<[number, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    Send = 0x80,\n}\n\nexport namespace CodalMessageBusCmdPack {\n    /**\n     * Pack format for 'send' data.\n     */\n    export const Send = \"u16 u16\"\n}\n\nexport enum CodalMessageBusEvent {\n    /**\n     * Raised by the server is triggered by the server. The filtering logic of which event to send over Jacdac is up to the server implementation.\n     *\n     * ```\n     * const [source, value] = jdunpack<[number, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    Message = 0x80,\n}\n\nexport namespace CodalMessageBusEventPack {\n    /**\n     * Pack format for 'message' data.\n     */\n    export const Message = \"u16 u16\"\n}\n\n// Service Color constants\nexport const SRV_COLOR = 0x1630d567\nexport enum ColorReg {\n    /**\n     * Detected color in the RGB color space.\n     *\n     * ```\n     * const [red, green, blue] = jdunpack<[number, number, number]>(buf, \"u0.16 u0.16 u0.16\")\n     * ```\n     */\n    Color = 0x101,\n}\n\nexport namespace ColorRegPack {\n    /**\n     * Pack format for 'color' data.\n     */\n    export const Color = \"u0.16 u0.16 u0.16\"\n}\n\n// Service Compass constants\nexport const SRV_COMPASS = 0x15b7b9bf\nexport enum CompassReg {\n    /**\n     * Read-only \u00B0 u16.16 (uint32_t). The heading with respect to the magnetic north.\n     *\n     * ```\n     * const [heading] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Heading = 0x101,\n\n    /**\n     * Read-write bool (uint8_t). Turn on or off the sensor. Turning on the sensor may start a calibration sequence.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-only \u00B0 u16.16 (uint32_t). Error on the heading reading\n     *\n     * ```\n     * const [headingError] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    HeadingError = 0x106,\n}\n\nexport namespace CompassRegPack {\n    /**\n     * Pack format for 'heading' data.\n     */\n    export const Heading = \"u16.16\"\n\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'heading_error' data.\n     */\n    export const HeadingError = \"u16.16\"\n}\n\nexport enum CompassCmd {\n    /**\n     * No args. Starts a calibration sequence for the compass.\n     */\n    Calibrate = 0x2,\n}\n\n// Service Control constants\nexport const SRV_CONTROL = 0x0\n\nexport enum ControlAnnounceFlags { // uint16_t\n    RestartCounterSteady = 0xf,\n    RestartCounter1 = 0x1,\n    RestartCounter2 = 0x2,\n    RestartCounter4 = 0x4,\n    RestartCounter8 = 0x8,\n    StatusLightNone = 0x0,\n    StatusLightMono = 0x10,\n    StatusLightRgbNoFade = 0x20,\n    StatusLightRgbFade = 0x30,\n    SupportsACK = 0x100,\n    SupportsBroadcast = 0x200,\n    SupportsFrames = 0x400,\n    IsClient = 0x800,\n    SupportsReliableCommands = 0x1000,\n}\n\nexport enum ControlCmd {\n    /**\n     * No args. The `restart_counter` is computed from the `flags & RestartCounterSteady`, starts at `0x1` and increments by one until it reaches `0xf`, then it stays at `0xf`.\n     * If this number ever goes down, it indicates that the device restarted.\n     * `service_class` indicates class identifier for each service index (service index `0` is always control, so it's\n     * skipped in this enumeration).\n     * `packet_count` indicates the number of reports sent by the current device since last announce,\n     * including the current announce packet (it is always 0 if this feature is not supported).\n     * The command form can be used to induce report, which is otherwise broadcast every 500ms.\n     */\n    Services = 0x0,\n\n    /**\n     * report Services\n     * ```\n     * const [flags, packetCount, serviceClass] = jdunpack<[ControlAnnounceFlags, number, number[]]>(buf, \"u16 u8 x[1] u32[]\")\n     * ```\n     */\n\n    /**\n     * No args. Do nothing. Always ignored. Can be used to test ACKs.\n     */\n    Noop = 0x80,\n\n    /**\n     * No args. Blink the status LED (262ms on, 262ms off, four times, with the blue LED) or otherwise draw user's attention to device with no status light.\n     * For devices with status light (this can be discovered in the announce flags), the client should\n     * send the sequence of status light command to generate the identify animation.\n     */\n    Identify = 0x81,\n\n    /**\n     * No args. Reset device. ACK may or may not be sent.\n     */\n    Reset = 0x82,\n\n    /**\n     * The device will respond `num_responses` times, as fast as it can, setting the `counter` field in the report\n     * to `start_counter`, then `start_counter + 1`, ..., and finally `start_counter + num_responses - 1`.\n     * The `dummy_payload` is `size` bytes long and contains bytes `0, 1, 2, ...`.\n     *\n     * ```\n     * const [numResponses, startCounter, size] = jdunpack<[number, number, number]>(buf, \"u32 u32 u8\")\n     * ```\n     */\n    FloodPing = 0x83,\n\n    /**\n     * report FloodPing\n     * ```\n     * const [counter, dummyPayload] = jdunpack<[number, Uint8Array]>(buf, \"u32 b\")\n     * ```\n     */\n\n    /**\n     * Initiates a color transition of the status light from its current color to the one specified.\n     * The transition will complete in about `512 / speed` frames\n     * (each frame is currently 100ms, so speed of `51` is about 1 second and `26` 0.5 second).\n     * As a special case, if speed is `0` the transition is immediate.\n     * If MCU is not capable of executing transitions, it can consider `speed` to be always `0`.\n     * If a monochrome LEDs is fitted, the average value of `red`, `green`, `blue` is used.\n     * If intensity of a monochrome LED cannot be controlled, any value larger than `0` should be considered\n     * on, and `0` (for all three channels) should be considered off.\n     *\n     * ```\n     * const [toRed, toGreen, toBlue, speed] = jdunpack<[number, number, number, number]>(buf, \"u8 u8 u8 u8\")\n     * ```\n     */\n    SetStatusLight = 0x84,\n\n    /**\n     * No args. Force client device into proxy mode.\n     */\n    Proxy = 0x85,\n\n    /**\n     * Argument: seed uint32_t. This opens a pipe to the device to provide an alternative, reliable transport of actions\n     * (and possibly other commands).\n     * The commands are wrapped as pipe data packets.\n     * Multiple invocations of this command with the same `seed` are dropped\n     * (and thus the command is not `unique`); otherwise `seed` carries no meaning\n     * and should be set to a random value by the client.\n     * Note that while the commands sends this way are delivered exactly once, the\n     * responses might get lost.\n     *\n     * ```\n     * const [seed] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ReliableCommands = 0x86,\n\n    /**\n     * report ReliableCommands\n     * ```\n     * const [commands] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n\n    /**\n     * Argument: duration ms uint32_t. Attempt to put devices into lowest power sleep mode for a specified time - most likely involving a full reset on wake-up.\n     *\n     * ```\n     * const [duration] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    Standby = 0x87,\n}\n\nexport namespace ControlCmdPack {\n    /**\n     * Pack format for 'services' data.\n     */\n    export const ServicesReport = \"u16 u8 u8 r: u32\"\n\n    /**\n     * Pack format for 'flood_ping' data.\n     */\n    export const FloodPing = \"u32 u32 u8\"\n\n    /**\n     * Pack format for 'flood_ping' data.\n     */\n    export const FloodPingReport = \"u32 b\"\n\n    /**\n     * Pack format for 'set_status_light' data.\n     */\n    export const SetStatusLight = \"u8 u8 u8 u8\"\n\n    /**\n     * Pack format for 'reliable_commands' data.\n     */\n    export const ReliableCommands = \"u32\"\n\n    /**\n     * Pack format for 'reliable_commands' data.\n     */\n    export const ReliableCommandsReport = \"b[12]\"\n\n    /**\n     * Pack format for 'standby' data.\n     */\n    export const Standby = \"u32\"\n}\n\nexport enum ControlPipe {}\n/**\n * pipe_command WrappedCommand\n * ```\n * const [serviceSize, serviceIndex, serviceCommand, payload] = jdunpack<[number, number, number, Uint8Array]>(buf, \"u8 u8 u16 b\")\n * ```\n */\n\nexport namespace ControlPipePack {\n    /**\n     * Pack format for 'wrapped_command' data.\n     */\n    export const WrappedCommand = \"u8 u8 u16 b\"\n}\n\nexport enum ControlReg {\n    /**\n     * Read-write \u03BCs uint32_t. When set to value other than `0`, it asks the device to reset after specified number of microseconds.\n     * This is typically used to implement watchdog functionality, where a brain device sets `reset_in` to\n     * say 1.6s every 0.5s.\n     *\n     * ```\n     * const [resetIn] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ResetIn = 0x80,\n\n    /**\n     * Constant string (bytes). Identifies the type of hardware (eg., ACME Corp. Servo X-42 Rev C)\n     *\n     * ```\n     * const [deviceDescription] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    DeviceDescription = 0x180,\n\n    /**\n     * Constant uint32_t. A numeric code for the string above; used to identify firmware images and devices.\n     *\n     * ```\n     * const [productIdentifier] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ProductIdentifier = 0x181,\n\n    /**\n     * Constant uint32_t. Typically the same as `product_identifier` unless device was flashed by hand; the bootloader will respond to that code.\n     *\n     * ```\n     * const [bootloaderProductIdentifier] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    BootloaderProductIdentifier = 0x184,\n\n    /**\n     * Constant string (bytes). A string describing firmware version; typically semver.\n     *\n     * ```\n     * const [firmwareVersion] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    FirmwareVersion = 0x185,\n\n    /**\n     * Read-only \u00B0C int16_t. MCU temperature in degrees Celsius (approximate).\n     *\n     * ```\n     * const [mcuTemperature] = jdunpack<[number]>(buf, \"i16\")\n     * ```\n     */\n    McuTemperature = 0x182,\n\n    /**\n     * Read-only \u03BCs uint64_t. Number of microseconds since boot.\n     *\n     * ```\n     * const [uptime] = jdunpack<[number]>(buf, \"u64\")\n     * ```\n     */\n    Uptime = 0x186,\n}\n\nexport namespace ControlRegPack {\n    /**\n     * Pack format for 'reset_in' data.\n     */\n    export const ResetIn = \"u32\"\n\n    /**\n     * Pack format for 'device_description' data.\n     */\n    export const DeviceDescription = \"s\"\n\n    /**\n     * Pack format for 'product_identifier' data.\n     */\n    export const ProductIdentifier = \"u32\"\n\n    /**\n     * Pack format for 'bootloader_product_identifier' data.\n     */\n    export const BootloaderProductIdentifier = \"u32\"\n\n    /**\n     * Pack format for 'firmware_version' data.\n     */\n    export const FirmwareVersion = \"s\"\n\n    /**\n     * Pack format for 'mcu_temperature' data.\n     */\n    export const McuTemperature = \"i16\"\n\n    /**\n     * Pack format for 'uptime' data.\n     */\n    export const Uptime = \"u64\"\n}\n\n// Service Dashboard constants\nexport const SRV_DASHBOARD = 0x1be59107\n// Service DC Current Measurement constants\nexport const SRV_DC_CURRENT_MEASUREMENT = 0x1912c8ae\nexport enum DcCurrentMeasurementReg {\n    /**\n     * Constant string (bytes). A string containing the net name that is being measured e.g. `POWER_DUT` or a reference e.g. `DIFF_DEV1_DEV2`. These constants can be used to identify a measurement from client code.\n     *\n     * ```\n     * const [measurementName] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    MeasurementName = 0x182,\n\n    /**\n     * Read-only A f64 (uint64_t). The current measurement.\n     *\n     * ```\n     * const [measurement] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    Measurement = 0x101,\n\n    /**\n     * Read-only A f64 (uint64_t). Absolute error on the reading value.\n     *\n     * ```\n     * const [measurementError] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    MeasurementError = 0x106,\n\n    /**\n     * Constant A f64 (uint64_t). Minimum measurable current\n     *\n     * ```\n     * const [minMeasurement] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    MinMeasurement = 0x104,\n\n    /**\n     * Constant A f64 (uint64_t). Maximum measurable current\n     *\n     * ```\n     * const [maxMeasurement] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    MaxMeasurement = 0x105,\n}\n\nexport namespace DcCurrentMeasurementRegPack {\n    /**\n     * Pack format for 'measurement_name' data.\n     */\n    export const MeasurementName = \"s\"\n\n    /**\n     * Pack format for 'measurement' data.\n     */\n    export const Measurement = \"f64\"\n\n    /**\n     * Pack format for 'measurement_error' data.\n     */\n    export const MeasurementError = \"f64\"\n\n    /**\n     * Pack format for 'min_measurement' data.\n     */\n    export const MinMeasurement = \"f64\"\n\n    /**\n     * Pack format for 'max_measurement' data.\n     */\n    export const MaxMeasurement = \"f64\"\n}\n\n// Service DC Voltage Measurement constants\nexport const SRV_DC_VOLTAGE_MEASUREMENT = 0x1633ac19\n\nexport enum DcVoltageMeasurementVoltageMeasurementType { // uint8_t\n    Absolute = 0x0,\n    Differential = 0x1,\n}\n\nexport enum DcVoltageMeasurementReg {\n    /**\n     * Constant VoltageMeasurementType (uint8_t). The type of measurement that is taking place. Absolute results are measured with respect to ground, whereas differential results are measured against another signal that is not ground.\n     *\n     * ```\n     * const [measurementType] = jdunpack<[DcVoltageMeasurementVoltageMeasurementType]>(buf, \"u8\")\n     * ```\n     */\n    MeasurementType = 0x181,\n\n    /**\n     * Constant string (bytes). A string containing the net name that is being measured e.g. `POWER_DUT` or a reference e.g. `DIFF_DEV1_DEV2`. These constants can be used to identify a measurement from client code.\n     *\n     * ```\n     * const [measurementName] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    MeasurementName = 0x182,\n\n    /**\n     * Read-only V f64 (uint64_t). The voltage measurement.\n     *\n     * ```\n     * const [measurement] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    Measurement = 0x101,\n\n    /**\n     * Read-only V f64 (uint64_t). Absolute error on the reading value.\n     *\n     * ```\n     * const [measurementError] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    MeasurementError = 0x106,\n\n    /**\n     * Constant V f64 (uint64_t). Minimum measurable current\n     *\n     * ```\n     * const [minMeasurement] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    MinMeasurement = 0x104,\n\n    /**\n     * Constant V f64 (uint64_t). Maximum measurable current\n     *\n     * ```\n     * const [maxMeasurement] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    MaxMeasurement = 0x105,\n}\n\nexport namespace DcVoltageMeasurementRegPack {\n    /**\n     * Pack format for 'measurement_type' data.\n     */\n    export const MeasurementType = \"u8\"\n\n    /**\n     * Pack format for 'measurement_name' data.\n     */\n    export const MeasurementName = \"s\"\n\n    /**\n     * Pack format for 'measurement' data.\n     */\n    export const Measurement = \"f64\"\n\n    /**\n     * Pack format for 'measurement_error' data.\n     */\n    export const MeasurementError = \"f64\"\n\n    /**\n     * Pack format for 'min_measurement' data.\n     */\n    export const MinMeasurement = \"f64\"\n\n    /**\n     * Pack format for 'max_measurement' data.\n     */\n    export const MaxMeasurement = \"f64\"\n}\n\n// Service DeviceScript Condition constants\nexport const SRV_DEVICE_SCRIPT_CONDITION = 0x1196796d\nexport enum DeviceScriptConditionCmd {\n    /**\n     * No args. Triggers a `signalled` event.\n     */\n    Signal = 0x80,\n}\n\nexport enum DeviceScriptConditionEvent {\n    /**\n     * Triggered by `signal` command.\n     */\n    Signalled = 0x3,\n}\n\n// Service DeviceScript Debugger constants\nexport const SRV_DEVS_DBG = 0x155b5b40\n\nexport enum DevsDbgValueTag { // uint8_t\n    Number = 0x1,\n    Special = 0x2,\n    Fiber = 0x3,\n    BuiltinObject = 0x5,\n    Exotic = 0x6,\n    Unhandled = 0x7,\n    ImgBuffer = 0x20,\n    ImgStringBuiltin = 0x21,\n    ImgStringAscii = 0x22,\n    ImgStringUTF8 = 0x23,\n    ImgRole = 0x30,\n    ImgFunction = 0x31,\n    ImgRoleMember = 0x32,\n    ObjArray = 0x51,\n    ObjMap = 0x52,\n    ObjBuffer = 0x53,\n    ObjString = 0x54,\n    ObjStackFrame = 0x55,\n    ObjPacket = 0x56,\n    ObjBoundFunction = 0x57,\n    ObjOpaque = 0x58,\n    ObjAny = 0x50,\n    ObjMask = 0xf0,\n    User1 = 0xf1,\n    User2 = 0xf2,\n    User3 = 0xf3,\n    User4 = 0xf4,\n}\n\nexport enum DevsDbgValueSpecial { // uint8_t\n    Undefined = 0x0,\n    True = 0x1,\n    False = 0x2,\n    Null = 0x3,\n    Globals = 0x64,\n    CurrentException = 0x65,\n}\n\nexport enum DevsDbgFunIdx { // uint16_t\n    None = 0x0,\n    Main = 0xc34f,\n    FirstBuiltIn = 0xc350,\n}\n\nexport enum DevsDbgFiberHandle { // uint32_t\n    None = 0x0,\n}\n\nexport enum DevsDbgProgramCounter {} // uint32_t\n\nexport enum DevsDbgObjStackFrame { // uint32_t\n    Null = 0x0,\n}\n\nexport enum DevsDbgString { // uint32_t\n    StaticIndicatorMask = 0x80000001,\n    StaticTagMask = 0x7f000000,\n    StaticIndexMask = 0xfffffe,\n    Unhandled = 0x0,\n}\n\nexport enum DevsDbgStepFlags { // uint16_t\n    StepOut = 0x1,\n    StepIn = 0x2,\n    Throw = 0x4,\n}\n\nexport enum DevsDbgSuspensionType { // uint8_t\n    None = 0x0,\n    Breakpoint = 0x1,\n    UnhandledException = 0x2,\n    HandledException = 0x3,\n    Halt = 0x4,\n    Panic = 0x5,\n    Restart = 0x6,\n    DebuggerStmt = 0x7,\n    Step = 0x8,\n}\n\nexport enum DevsDbgCmd {\n    /**\n     * Argument: results pipe (bytes). List the currently running fibers (threads).\n     *\n     * ```\n     * const [results] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    ReadFibers = 0x80,\n\n    /**\n     * List stack frames in a fiber.\n     *\n     * ```\n     * const [results, fiberHandle] = jdunpack<[Uint8Array, DevsDbgFiberHandle]>(buf, \"b[12] u32\")\n     * ```\n     */\n    ReadStack = 0x81,\n\n    /**\n     * Read variable slots in a stack frame, elements of an array, etc.\n     *\n     * ```\n     * const [results, v0, tag, start, length] = jdunpack<[Uint8Array, number, DevsDbgValueTag, number, number]>(buf, \"b[12] u32 u8 x[1] u16 u16\")\n     * ```\n     */\n    ReadIndexedValues = 0x82,\n\n    /**\n     * Read variable slots in an object.\n     *\n     * ```\n     * const [results, v0, tag] = jdunpack<[Uint8Array, number, DevsDbgValueTag]>(buf, \"b[12] u32 u8\")\n     * ```\n     */\n    ReadNamedValues = 0x83,\n\n    /**\n     * Read a specific value.\n     *\n     * ```\n     * const [v0, tag] = jdunpack<[number, DevsDbgValueTag]>(buf, \"u32 u8\")\n     * ```\n     */\n    ReadValue = 0x84,\n\n    /**\n     * report ReadValue\n     * ```\n     * const [v0, v1, fnIdx, tag] = jdunpack<[number, number, DevsDbgFunIdx, DevsDbgValueTag]>(buf, \"u32 u32 u16 u8\")\n     * ```\n     */\n\n    /**\n     * Read bytes of a string (UTF8) or buffer value.\n     *\n     * ```\n     * const [results, v0, tag, start, length] = jdunpack<[Uint8Array, number, DevsDbgValueTag, number, number]>(buf, \"b[12] u32 u8 x[1] u16 u16\")\n     * ```\n     */\n    ReadBytes = 0x85,\n\n    /**\n     * Set breakpoint(s) at a location(s).\n     *\n     * ```\n     * const [breakPc] = jdunpack<[DevsDbgProgramCounter[]]>(buf, \"u32[]\")\n     * ```\n     */\n    SetBreakpoints = 0x90,\n\n    /**\n     * Clear breakpoint(s) at a location(s).\n     *\n     * ```\n     * const [breakPc] = jdunpack<[DevsDbgProgramCounter[]]>(buf, \"u32[]\")\n     * ```\n     */\n    ClearBreakpoints = 0x91,\n\n    /**\n     * No args. Clear all breakpoints.\n     */\n    ClearAllBreakpoints = 0x92,\n\n    /**\n     * No args. Resume program execution after a breakpoint was hit.\n     */\n    Resume = 0x93,\n\n    /**\n     * No args. Try suspending current program. Client needs to wait for `suspended` event afterwards.\n     */\n    Halt = 0x94,\n\n    /**\n     * No args. Run the program from the beginning and halt on first instruction.\n     */\n    RestartAndHalt = 0x95,\n\n    /**\n     * Set breakpoints that only trigger in the specified stackframe and resume program.\n     * The breakpoints are cleared automatically on next suspension (regardless of the reason).\n     *\n     * ```\n     * const [stackframe, flags, breakPc] = jdunpack<[DevsDbgObjStackFrame, DevsDbgStepFlags, DevsDbgProgramCounter[]]>(buf, \"u32 u16 x[2] u32[]\")\n     * ```\n     */\n    Step = 0x96,\n}\n\nexport namespace DevsDbgCmdPack {\n    /**\n     * Pack format for 'read_fibers' data.\n     */\n    export const ReadFibers = \"b[12]\"\n\n    /**\n     * Pack format for 'read_stack' data.\n     */\n    export const ReadStack = \"b[12] u32\"\n\n    /**\n     * Pack format for 'read_indexed_values' data.\n     */\n    export const ReadIndexedValues = \"b[12] u32 u8 u8 u16 u16\"\n\n    /**\n     * Pack format for 'read_named_values' data.\n     */\n    export const ReadNamedValues = \"b[12] u32 u8\"\n\n    /**\n     * Pack format for 'read_value' data.\n     */\n    export const ReadValue = \"u32 u8\"\n\n    /**\n     * Pack format for 'read_value' data.\n     */\n    export const ReadValueReport = \"u32 u32 u16 u8\"\n\n    /**\n     * Pack format for 'read_bytes' data.\n     */\n    export const ReadBytes = \"b[12] u32 u8 u8 u16 u16\"\n\n    /**\n     * Pack format for 'set_breakpoints' data.\n     */\n    export const SetBreakpoints = \"r: u32\"\n\n    /**\n     * Pack format for 'clear_breakpoints' data.\n     */\n    export const ClearBreakpoints = \"r: u32\"\n\n    /**\n     * Pack format for 'step' data.\n     */\n    export const Step = \"u32 u16 u16 r: u32\"\n}\n\nexport enum DevsDbgPipe {}\n/**\n * pipe_report Fiber\n * ```\n * const [handle, initialFn, currFn] = jdunpack<[DevsDbgFiberHandle, DevsDbgFunIdx, DevsDbgFunIdx]>(buf, \"u32 u16 u16\")\n * ```\n */\n\n/**\n * pipe_report Stackframe\n * ```\n * const [self, pc, closure, fnIdx] = jdunpack<[DevsDbgObjStackFrame, DevsDbgProgramCounter, DevsDbgObjStackFrame, DevsDbgFunIdx]>(buf, \"u32 u32 u32 u16 x[2]\")\n * ```\n */\n\n/**\n * pipe_report Value\n * ```\n * const [v0, v1, fnIdx, tag] = jdunpack<[number, number, DevsDbgFunIdx, DevsDbgValueTag]>(buf, \"u32 u32 u16 u8\")\n * ```\n */\n\n/**\n * pipe_report KeyValue\n * ```\n * const [key, v0, v1, fnIdx, tag] = jdunpack<[DevsDbgString, number, number, DevsDbgFunIdx, DevsDbgValueTag]>(buf, \"u32 u32 u32 u16 u8\")\n * ```\n */\n\n/**\n * pipe_report BytesValue\n * ```\n * const [data] = jdunpack<[Uint8Array]>(buf, \"b\")\n * ```\n */\n\nexport namespace DevsDbgPipePack {\n    /**\n     * Pack format for 'fiber' data.\n     */\n    export const Fiber = \"u32 u16 u16\"\n\n    /**\n     * Pack format for 'stackframe' data.\n     */\n    export const Stackframe = \"u32 u32 u32 u16 u16\"\n\n    /**\n     * Pack format for 'value' data.\n     */\n    export const Value = \"u32 u32 u16 u8\"\n\n    /**\n     * Pack format for 'key_value' data.\n     */\n    export const KeyValue = \"u32 u32 u32 u16 u8\"\n\n    /**\n     * Pack format for 'bytes_value' data.\n     */\n    export const BytesValue = \"b\"\n}\n\nexport enum DevsDbgReg {\n    /**\n     * Read-write bool (uint8_t). Turn on/off the debugger interface.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-write bool (uint8_t). Wheather to place breakpoint at unhandled exception.\n     *\n     * ```\n     * const [breakAtUnhandledExn] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    BreakAtUnhandledExn = 0x80,\n\n    /**\n     * Read-write bool (uint8_t). Wheather to place breakpoint at handled exception.\n     *\n     * ```\n     * const [breakAtHandledExn] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    BreakAtHandledExn = 0x81,\n\n    /**\n     * Read-only bool (uint8_t). Indicates if the program is currently suspended.\n     * Most commands can only be executed when the program is suspended.\n     *\n     * ```\n     * const [isSuspended] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    IsSuspended = 0x180,\n}\n\nexport namespace DevsDbgRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'break_at_unhandled_exn' data.\n     */\n    export const BreakAtUnhandledExn = \"u8\"\n\n    /**\n     * Pack format for 'break_at_handled_exn' data.\n     */\n    export const BreakAtHandledExn = \"u8\"\n\n    /**\n     * Pack format for 'is_suspended' data.\n     */\n    export const IsSuspended = \"u8\"\n}\n\nexport enum DevsDbgEvent {\n    /**\n     * Emitted when the program hits a breakpoint or similar event in the specified fiber.\n     *\n     * ```\n     * const [fiber, type] = jdunpack<[DevsDbgFiberHandle, DevsDbgSuspensionType]>(buf, \"u32 u8\")\n     * ```\n     */\n    Suspended = 0x80,\n}\n\nexport namespace DevsDbgEventPack {\n    /**\n     * Pack format for 'suspended' data.\n     */\n    export const Suspended = \"u32 u8\"\n}\n\n// Service DeviceScript Manager constants\nexport const SRV_DEVICE_SCRIPT_MANAGER = 0x1134ea2b\nexport enum DeviceScriptManagerCmd {\n    /**\n     * Argument: bytecode_size B uint32_t. Open pipe for streaming in the bytecode of the program. The size of the bytecode has to be declared upfront.\n     * To clear the program, use `bytecode_size == 0`.\n     * The bytecode is streamed over regular pipe data packets.\n     * The bytecode shall be fully written into flash upon closing the pipe.\n     * If `autostart` is true, the program will start after being deployed.\n     * The data payloads, including the last one, should have a size that is a multiple of 32 bytes.\n     * Thus, the initial bytecode_size also needs to be a multiple of 32.\n     *\n     * ```\n     * const [bytecodeSize] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    DeployBytecode = 0x80,\n\n    /**\n     * report DeployBytecode\n     * ```\n     * const [bytecodePort] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n\n    /**\n     * Argument: bytecode pipe (bytes). Get the current bytecode deployed on device.\n     *\n     * ```\n     * const [bytecode] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    ReadBytecode = 0x81,\n}\n\nexport namespace DeviceScriptManagerCmdPack {\n    /**\n     * Pack format for 'deploy_bytecode' data.\n     */\n    export const DeployBytecode = \"u32\"\n\n    /**\n     * Pack format for 'deploy_bytecode' data.\n     */\n    export const DeployBytecodeReport = \"u16\"\n\n    /**\n     * Pack format for 'read_bytecode' data.\n     */\n    export const ReadBytecode = \"b[12]\"\n}\n\nexport enum DeviceScriptManagerPipe {}\n/**\n * pipe_report Bytecode\n * ```\n * const [data] = jdunpack<[Uint8Array]>(buf, \"b\")\n * ```\n */\n\nexport namespace DeviceScriptManagerPipePack {\n    /**\n     * Pack format for 'bytecode' data.\n     */\n    export const Bytecode = \"b\"\n}\n\nexport enum DeviceScriptManagerReg {\n    /**\n     * Read-write bool (uint8_t). Indicates if the program is currently running.\n     * To restart the program, stop it (write `0`), read back the register to make sure it's stopped,\n     * start it, and read back.\n     *\n     * ```\n     * const [running] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Running = 0x80,\n\n    /**\n     * Read-write bool (uint8_t). Indicates wheather the program should be re-started upon `reboot()` or `panic()`.\n     * Defaults to `true`.\n     *\n     * ```\n     * const [autostart] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Autostart = 0x81,\n\n    /**\n     * Read-only uint32_t. The size of current program.\n     *\n     * ```\n     * const [programSize] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ProgramSize = 0x180,\n\n    /**\n     * Read-only uint32_t. Return FNV1A hash of the current bytecode.\n     *\n     * ```\n     * const [programHash] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ProgramHash = 0x181,\n\n    /**\n     * Read-only bytes. Return 32-byte long SHA-256 hash of the current bytecode.\n     *\n     * ```\n     * const [programSha256] = jdunpack<[Uint8Array]>(buf, \"b[32]\")\n     * ```\n     */\n    ProgramSha256 = 0x182,\n\n    /**\n     * Returns the runtime version number compatible with [Semver](https://semver.org/).\n     * When read as 32-bit little endian integer a version `7.15.500` would be `0x07_0F_01F4`.\n     *\n     * ```\n     * const [patch, minor, major] = jdunpack<[number, number, number]>(buf, \"u16 u8 u8\")\n     * ```\n     */\n    RuntimeVersion = 0x183,\n\n    /**\n     * Read-only string (bytes). The name of currently running program. The compiler takes is from `package.json`.\n     *\n     * ```\n     * const [programName] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ProgramName = 0x184,\n\n    /**\n     * Read-only string (bytes). The version number of currently running program. The compiler takes is from `package.json`\n     * and `git`.\n     *\n     * ```\n     * const [programVersion] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ProgramVersion = 0x185,\n}\n\nexport namespace DeviceScriptManagerRegPack {\n    /**\n     * Pack format for 'running' data.\n     */\n    export const Running = \"u8\"\n\n    /**\n     * Pack format for 'autostart' data.\n     */\n    export const Autostart = \"u8\"\n\n    /**\n     * Pack format for 'program_size' data.\n     */\n    export const ProgramSize = \"u32\"\n\n    /**\n     * Pack format for 'program_hash' data.\n     */\n    export const ProgramHash = \"u32\"\n\n    /**\n     * Pack format for 'program_sha256' data.\n     */\n    export const ProgramSha256 = \"b[32]\"\n\n    /**\n     * Pack format for 'runtime_version' data.\n     */\n    export const RuntimeVersion = \"u16 u8 u8\"\n\n    /**\n     * Pack format for 'program_name' data.\n     */\n    export const ProgramName = \"s\"\n\n    /**\n     * Pack format for 'program_version' data.\n     */\n    export const ProgramVersion = \"s\"\n}\n\nexport enum DeviceScriptManagerEvent {\n    /**\n     * Emitted when the program calls `panic(panic_code)` or `reboot()` (`panic_code == 0` in that case).\n     * The byte offset in byte code of the call is given in `program_counter`.\n     * The program will restart immediately when `panic_code == 0` or in a few seconds otherwise.\n     *\n     * ```\n     * const [panicCode, programCounter] = jdunpack<[number, number]>(buf, \"u32 u32\")\n     * ```\n     */\n    ProgramPanic = 0x80,\n\n    /**\n     * Emitted after bytecode of the program has changed.\n     */\n    ProgramChange = 0x3,\n}\n\nexport namespace DeviceScriptManagerEventPack {\n    /**\n     * Pack format for 'program_panic' data.\n     */\n    export const ProgramPanic = \"u32 u32\"\n}\n\n// Service Distance constants\nexport const SRV_DISTANCE = 0x141a6b8a\n\nexport enum DistanceVariant { // uint8_t\n    Ultrasonic = 0x1,\n    Infrared = 0x2,\n    LiDAR = 0x3,\n    Laser = 0x4,\n}\n\nexport enum DistanceReg {\n    /**\n     * Read-only m u16.16 (uint32_t). Current distance from the object\n     *\n     * ```\n     * const [distance] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Distance = 0x101,\n\n    /**\n     * Read-only m u16.16 (uint32_t). Absolute error on the reading value.\n     *\n     * ```\n     * const [distanceError] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    DistanceError = 0x106,\n\n    /**\n     * Constant m u16.16 (uint32_t). Minimum measurable distance\n     *\n     * ```\n     * const [minRange] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    MinRange = 0x104,\n\n    /**\n     * Constant m u16.16 (uint32_t). Maximum measurable distance\n     *\n     * ```\n     * const [maxRange] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    MaxRange = 0x105,\n\n    /**\n     * Constant Variant (uint8_t). Determines the type of sensor used.\n     *\n     * ```\n     * const [variant] = jdunpack<[DistanceVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace DistanceRegPack {\n    /**\n     * Pack format for 'distance' data.\n     */\n    export const Distance = \"u16.16\"\n\n    /**\n     * Pack format for 'distance_error' data.\n     */\n    export const DistanceError = \"u16.16\"\n\n    /**\n     * Pack format for 'min_range' data.\n     */\n    export const MinRange = \"u16.16\"\n\n    /**\n     * Pack format for 'max_range' data.\n     */\n    export const MaxRange = \"u16.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service DMX constants\nexport const SRV_DMX = 0x11cf8c05\nexport enum DmxReg {\n    /**\n     * Read-write bool (uint8_t). Determines if the DMX bridge is active.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n}\n\nexport namespace DmxRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n}\n\nexport enum DmxCmd {\n    /**\n     * Argument: channels bytes. Send a DMX packet, up to 236bytes long, including the start code.\n     *\n     * ```\n     * const [channels] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Send = 0x80,\n}\n\nexport namespace DmxCmdPack {\n    /**\n     * Pack format for 'send' data.\n     */\n    export const Send = \"b\"\n}\n\n// Service Dot Matrix constants\nexport const SRV_DOT_MATRIX = 0x110d154b\n\nexport enum DotMatrixVariant { // uint8_t\n    LED = 0x1,\n    Braille = 0x2,\n}\n\nexport enum DotMatrixReg {\n    /**\n     * Read-write bytes. The state of the screen where dot on/off state is\n     * stored as a bit, column by column. The column should be byte aligned.\n     *\n     * ```\n     * const [dots] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Dots = 0x2,\n\n    /**\n     * Read-write ratio u0.8 (uint8_t). Reads the general brightness of the display, brightness for LEDs. `0` when the screen is off.\n     *\n     * ```\n     * const [brightness] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    Brightness = 0x1,\n\n    /**\n     * Constant # uint16_t. Number of rows on the screen\n     *\n     * ```\n     * const [rows] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Rows = 0x181,\n\n    /**\n     * Constant # uint16_t. Number of columns on the screen\n     *\n     * ```\n     * const [columns] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Columns = 0x182,\n\n    /**\n     * Constant Variant (uint8_t). Describes the type of matrix used.\n     *\n     * ```\n     * const [variant] = jdunpack<[DotMatrixVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace DotMatrixRegPack {\n    /**\n     * Pack format for 'dots' data.\n     */\n    export const Dots = \"b\"\n\n    /**\n     * Pack format for 'brightness' data.\n     */\n    export const Brightness = \"u0.8\"\n\n    /**\n     * Pack format for 'rows' data.\n     */\n    export const Rows = \"u16\"\n\n    /**\n     * Pack format for 'columns' data.\n     */\n    export const Columns = \"u16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Dual Motors constants\nexport const SRV_DUAL_MOTORS = 0x1529d537\nexport enum DualMotorsReg {\n    /**\n     * Relative speed of the motors. Use positive/negative values to run the motor forwards and backwards.\n     * A speed of ``0`` while ``enabled`` acts as brake.\n     *\n     * ```\n     * const [left, right] = jdunpack<[number, number]>(buf, \"i1.15 i1.15\")\n     * ```\n     */\n    Speed = 0x2,\n\n    /**\n     * Read-write bool (uint8_t). Turn the power to the motors on/off.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Constant kg/cm u16.16 (uint32_t). Torque required to produce the rated power of an each electrical motor at load speed.\n     *\n     * ```\n     * const [loadTorque] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    LoadTorque = 0x180,\n\n    /**\n     * Constant rpm u16.16 (uint32_t). Revolutions per minute of the motor under full load.\n     *\n     * ```\n     * const [loadRotationSpeed] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    LoadRotationSpeed = 0x181,\n\n    /**\n     * Constant bool (uint8_t). Indicates if the motors can run backwards.\n     *\n     * ```\n     * const [reversible] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Reversible = 0x182,\n}\n\nexport namespace DualMotorsRegPack {\n    /**\n     * Pack format for 'speed' data.\n     */\n    export const Speed = \"i1.15 i1.15\"\n\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'load_torque' data.\n     */\n    export const LoadTorque = \"u16.16\"\n\n    /**\n     * Pack format for 'load_rotation_speed' data.\n     */\n    export const LoadRotationSpeed = \"u16.16\"\n\n    /**\n     * Pack format for 'reversible' data.\n     */\n    export const Reversible = \"u8\"\n}\n\n// Service Equivalent CO\u2082 constants\nexport const SRV_E_CO2 = 0x169c9dc6\n\nexport enum ECO2Variant { // uint8_t\n    VOC = 0x1,\n    NDIR = 0x2,\n}\n\nexport enum ECO2Reg {\n    /**\n     * Read-only ppm u22.10 (uint32_t). Equivalent CO\u2082 (eCO\u2082) readings.\n     *\n     * ```\n     * const [eCO2] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    ECO2 = 0x101,\n\n    /**\n     * Read-only ppm u22.10 (uint32_t). Error on the reading value.\n     *\n     * ```\n     * const [eCO2Error] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    ECO2Error = 0x106,\n\n    /**\n     * Constant ppm u22.10 (uint32_t). Minimum measurable value\n     *\n     * ```\n     * const [minECO2] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    MinECO2 = 0x104,\n\n    /**\n     * Constant ppm u22.10 (uint32_t). Minimum measurable value\n     *\n     * ```\n     * const [maxECO2] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    MaxECO2 = 0x105,\n\n    /**\n     * Constant Variant (uint8_t). Type of physical sensor and capabilities.\n     *\n     * ```\n     * const [variant] = jdunpack<[ECO2Variant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace ECO2RegPack {\n    /**\n     * Pack format for 'e_CO2' data.\n     */\n    export const ECO2 = \"u22.10\"\n\n    /**\n     * Pack format for 'e_CO2_error' data.\n     */\n    export const ECO2Error = \"u22.10\"\n\n    /**\n     * Pack format for 'min_e_CO2' data.\n     */\n    export const MinECO2 = \"u22.10\"\n\n    /**\n     * Pack format for 'max_e_CO2' data.\n     */\n    export const MaxECO2 = \"u22.10\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Flex constants\nexport const SRV_FLEX = 0x1f47c6c6\nexport enum FlexReg {\n    /**\n     * Read-only ratio i1.15 (int16_t). A measure of the bending.\n     *\n     * ```\n     * const [bending] = jdunpack<[number]>(buf, \"i1.15\")\n     * ```\n     */\n    Bending = 0x101,\n\n    /**\n     * Constant mm uint16_t. Length of the flex sensor\n     *\n     * ```\n     * const [length] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Length = 0x180,\n}\n\nexport namespace FlexRegPack {\n    /**\n     * Pack format for 'bending' data.\n     */\n    export const Bending = \"i1.15\"\n\n    /**\n     * Pack format for 'length' data.\n     */\n    export const Length = \"u16\"\n}\n\n// Service Gamepad constants\nexport const SRV_GAMEPAD = 0x108f7456\n\nexport enum GamepadButtons { // uint32_t\n    Left = 0x1,\n    Up = 0x2,\n    Right = 0x4,\n    Down = 0x8,\n    A = 0x10,\n    B = 0x20,\n    Menu = 0x40,\n    Select = 0x80,\n    Reset = 0x100,\n    Exit = 0x200,\n    X = 0x400,\n    Y = 0x800,\n}\n\nexport enum GamepadVariant { // uint8_t\n    Thumb = 0x1,\n    ArcadeBall = 0x2,\n    ArcadeStick = 0x3,\n    Gamepad = 0x4,\n}\n\nexport enum GamepadReg {\n    /**\n     * If the gamepad is analog, the directional buttons should be \"simulated\", based on gamepad position\n     * (`Left` is `{ x = -1, y = 0 }`, `Up` is `{ x = 0, y = -1}`).\n     * If the gamepad is digital, then each direction will read as either `-1`, `0`, or `1` (in fixed representation).\n     * The primary button on the gamepad is `A`.\n     *\n     * ```\n     * const [buttons, x, y] = jdunpack<[GamepadButtons, number, number]>(buf, \"u32 i1.15 i1.15\")\n     * ```\n     */\n    Direction = 0x101,\n\n    /**\n     * Constant Variant (uint8_t). The type of physical gamepad.\n     *\n     * ```\n     * const [variant] = jdunpack<[GamepadVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n\n    /**\n     * Constant Buttons (uint32_t). Indicates a bitmask of the buttons that are mounted on the gamepad.\n     * If the `Left`/`Up`/`Right`/`Down` buttons are marked as available here, the gamepad is digital.\n     * Even when marked as not available, they will still be simulated based on the analog gamepad.\n     *\n     * ```\n     * const [buttonsAvailable] = jdunpack<[GamepadButtons]>(buf, \"u32\")\n     * ```\n     */\n    ButtonsAvailable = 0x180,\n}\n\nexport namespace GamepadRegPack {\n    /**\n     * Pack format for 'direction' data.\n     */\n    export const Direction = \"u32 i1.15 i1.15\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n\n    /**\n     * Pack format for 'buttons_available' data.\n     */\n    export const ButtonsAvailable = \"u32\"\n}\n\nexport enum GamepadEvent {\n    /**\n     * Argument: buttons Buttons (uint32_t). Emitted whenever the state of buttons changes.\n     *\n     * ```\n     * const [buttons] = jdunpack<[GamepadButtons]>(buf, \"u32\")\n     * ```\n     */\n    ButtonsChanged = 0x3,\n}\n\nexport namespace GamepadEventPack {\n    /**\n     * Pack format for 'buttons_changed' data.\n     */\n    export const ButtonsChanged = \"u32\"\n}\n\n// Service GPIO constants\nexport const SRV_GPIO = 0x10d85a69\n\nexport enum GPIOMode { // uint8_t\n    Off = 0x0,\n    OffPullUp = 0x10,\n    OffPullDown = 0x20,\n    Input = 0x1,\n    InputPullUp = 0x11,\n    InputPullDown = 0x21,\n    Output = 0x2,\n    OutputHigh = 0x12,\n    OutputLow = 0x22,\n    AnalogIn = 0x3,\n    Alternative = 0x4,\n    BaseModeMask = 0xf,\n}\n\nexport enum GPIOCapabilities { // uint16_t\n    PullUp = 0x1,\n    PullDown = 0x2,\n    Input = 0x4,\n    Output = 0x8,\n    Analog = 0x10,\n}\n\nexport enum GPIOReg {\n    /**\n     * Read-only digital_values bytes. For every pin set to `Input*` the corresponding **bit** in `digital_values` will be `1` if and only if\n     * the pin is high.\n     * For other pins, the bit is `0`.\n     * This is normally streamed at low-ish speed, but it's also automatically reported whenever\n     * a digital input pin changes value (throttled to ~100Hz).\n     * The analog values can be read with the `ADC` service.\n     *\n     * ```\n     * const [digitalValues] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    State = 0x101,\n\n    /**\n     * Read-only # uint8_t. Number of pins that can be operated through this service.\n     *\n     * ```\n     * const [numPins] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    NumPins = 0x180,\n}\n\nexport namespace GPIORegPack {\n    /**\n     * Pack format for 'state' data.\n     */\n    export const State = \"b\"\n\n    /**\n     * Pack format for 'num_pins' data.\n     */\n    export const NumPins = \"u8\"\n}\n\nexport enum GPIOCmd {\n    /**\n     * Configure (including setting the value) zero or more pins.\n     * `Alternative` settings means the pin is controlled by other service (SPI, I2C, UART, PWM, etc.).\n     *\n     * ```\n     * const [rest] = jdunpack<[([number, GPIOMode])[]]>(buf, \"r: u8 u8\")\n     * const [pin, mode] = rest[0]\n     * ```\n     */\n    Configure = 0x80,\n\n    /**\n     * Argument: pin uint8_t. Report capabilities and name of a pin.\n     *\n     * ```\n     * const [pin] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    PinInfo = 0x81,\n\n    /**\n     * report PinInfo\n     * ```\n     * const [pin, hwPin, capabilities, mode, label] = jdunpack<[number, number, GPIOCapabilities, GPIOMode, string]>(buf, \"u8 u8 u16 u8 s\")\n     * ```\n     */\n\n    /**\n     * Argument: label string (bytes). This responds with `pin_info` report.\n     *\n     * ```\n     * const [label] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    PinByLabel = 0x83,\n\n    /**\n     * report PinByLabel\n     * ```\n     * const [pin, hwPin, capabilities, mode, label] = jdunpack<[number, number, GPIOCapabilities, GPIOMode, string]>(buf, \"u8 u8 u16 u8 s\")\n     * ```\n     */\n\n    /**\n     * Argument: hw_pin uint8_t. This responds with `pin_info` report.\n     *\n     * ```\n     * const [hwPin] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    PinByHwPin = 0x84,\n\n    /**\n     * report PinByHwPin\n     * ```\n     * const [pin, hwPin, capabilities, mode, label] = jdunpack<[number, number, GPIOCapabilities, GPIOMode, string]>(buf, \"u8 u8 u16 u8 s\")\n     * ```\n     */\n}\n\nexport namespace GPIOCmdPack {\n    /**\n     * Pack format for 'configure' data.\n     */\n    export const Configure = \"r: u8 u8\"\n\n    /**\n     * Pack format for 'pin_info' data.\n     */\n    export const PinInfo = \"u8\"\n\n    /**\n     * Pack format for 'pin_info' data.\n     */\n    export const PinInfoReport = \"u8 u8 u16 u8 s\"\n\n    /**\n     * Pack format for 'pin_by_label' data.\n     */\n    export const PinByLabel = \"s\"\n\n    /**\n     * Pack format for 'pin_by_label' data.\n     */\n    export const PinByLabelReport = \"u8 u8 u16 u8 s\"\n\n    /**\n     * Pack format for 'pin_by_hw_pin' data.\n     */\n    export const PinByHwPin = \"u8\"\n\n    /**\n     * Pack format for 'pin_by_hw_pin' data.\n     */\n    export const PinByHwPinReport = \"u8 u8 u16 u8 s\"\n}\n\n// Service Gyroscope constants\nexport const SRV_GYROSCOPE = 0x1e1b06f2\nexport enum GyroscopeReg {\n    /**\n     * Indicates the current rates acting on gyroscope.\n     *\n     * ```\n     * const [x, y, z] = jdunpack<[number, number, number]>(buf, \"i12.20 i12.20 i12.20\")\n     * ```\n     */\n    RotationRates = 0x101,\n\n    /**\n     * Read-only \u00B0/s u12.20 (uint32_t). Error on the reading value.\n     *\n     * ```\n     * const [rotationRatesError] = jdunpack<[number]>(buf, \"u12.20\")\n     * ```\n     */\n    RotationRatesError = 0x106,\n\n    /**\n     * Read-write \u00B0/s u12.20 (uint32_t). Configures the range of rotation rates.\n     * The value will be \"rounded up\" to one of `max_rates_supported`.\n     *\n     * ```\n     * const [maxRate] = jdunpack<[number]>(buf, \"u12.20\")\n     * ```\n     */\n    MaxRate = 0x8,\n\n    /**\n     * Constant. Lists values supported for writing `max_rate`.\n     *\n     * ```\n     * const [maxRate] = jdunpack<[number[]]>(buf, \"u12.20[]\")\n     * ```\n     */\n    MaxRatesSupported = 0x10a,\n}\n\nexport namespace GyroscopeRegPack {\n    /**\n     * Pack format for 'rotation_rates' data.\n     */\n    export const RotationRates = \"i12.20 i12.20 i12.20\"\n\n    /**\n     * Pack format for 'rotation_rates_error' data.\n     */\n    export const RotationRatesError = \"u12.20\"\n\n    /**\n     * Pack format for 'max_rate' data.\n     */\n    export const MaxRate = \"u12.20\"\n\n    /**\n     * Pack format for 'max_rates_supported' data.\n     */\n    export const MaxRatesSupported = \"r: u12.20\"\n}\n\n// Service Heart Rate constants\nexport const SRV_HEART_RATE = 0x166c6dc4\n\nexport enum HeartRateVariant { // uint8_t\n    Finger = 0x1,\n    Chest = 0x2,\n    Wrist = 0x3,\n    Pump = 0x4,\n    WebCam = 0x5,\n}\n\nexport enum HeartRateReg {\n    /**\n     * Read-only bpm u16.16 (uint32_t). The estimated heart rate.\n     *\n     * ```\n     * const [heartRate] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    HeartRate = 0x101,\n\n    /**\n     * Read-only bpm u16.16 (uint32_t). The estimated error on the reported sensor data.\n     *\n     * ```\n     * const [heartRateError] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    HeartRateError = 0x106,\n\n    /**\n     * Constant Variant (uint8_t). The type of physical sensor\n     *\n     * ```\n     * const [variant] = jdunpack<[HeartRateVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace HeartRateRegPack {\n    /**\n     * Pack format for 'heart_rate' data.\n     */\n    export const HeartRate = \"u16.16\"\n\n    /**\n     * Pack format for 'heart_rate_error' data.\n     */\n    export const HeartRateError = \"u16.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service HID Joystick constants\nexport const SRV_HID_JOYSTICK = 0x1a112155\nexport enum HidJoystickReg {\n    /**\n     * Constant uint8_t. Number of button report supported\n     *\n     * ```\n     * const [buttonCount] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    ButtonCount = 0x180,\n\n    /**\n     * Constant uint32_t. A bitset that indicates which button is analog.\n     *\n     * ```\n     * const [buttonsAnalog] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ButtonsAnalog = 0x181,\n\n    /**\n     * Constant uint8_t. Number of analog input supported\n     *\n     * ```\n     * const [axisCount] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    AxisCount = 0x182,\n}\n\nexport namespace HidJoystickRegPack {\n    /**\n     * Pack format for 'button_count' data.\n     */\n    export const ButtonCount = \"u8\"\n\n    /**\n     * Pack format for 'buttons_analog' data.\n     */\n    export const ButtonsAnalog = \"u32\"\n\n    /**\n     * Pack format for 'axis_count' data.\n     */\n    export const AxisCount = \"u8\"\n}\n\nexport enum HidJoystickCmd {\n    /**\n     * Sets the up/down button state, one byte per button, supports analog buttons. For digital buttons, use `0` for released, `1` for pressed.\n     *\n     * ```\n     * const [pressure] = jdunpack<[number[]]>(buf, \"u0.8[]\")\n     * ```\n     */\n    SetButtons = 0x80,\n\n    /**\n     * Sets the state of analog inputs.\n     *\n     * ```\n     * const [position] = jdunpack<[number[]]>(buf, \"i1.15[]\")\n     * ```\n     */\n    SetAxis = 0x81,\n}\n\nexport namespace HidJoystickCmdPack {\n    /**\n     * Pack format for 'set_buttons' data.\n     */\n    export const SetButtons = \"r: u0.8\"\n\n    /**\n     * Pack format for 'set_axis' data.\n     */\n    export const SetAxis = \"r: i1.15\"\n}\n\n// Service HID Keyboard constants\nexport const SRV_HID_KEYBOARD = 0x18b05b6a\n\nexport enum HidKeyboardSelector { // uint16_t\n    None = 0x0,\n    ErrorRollOver = 0x1,\n    PostFail = 0x2,\n    ErrorUndefined = 0x3,\n    A = 0x4,\n    B = 0x5,\n    C = 0x6,\n    D = 0x7,\n    E = 0x8,\n    F = 0x9,\n    G = 0xa,\n    H = 0xb,\n    I = 0xc,\n    J = 0xd,\n    K = 0xe,\n    L = 0xf,\n    M = 0x10,\n    N = 0x11,\n    O = 0x12,\n    P = 0x13,\n    Q = 0x14,\n    R = 0x15,\n    S = 0x16,\n    T = 0x17,\n    U = 0x18,\n    V = 0x19,\n    W = 0x1a,\n    X = 0x1b,\n    Y = 0x1c,\n    Z = 0x1d,\n    _1 = 0x1e,\n    _2 = 0x1f,\n    _3 = 0x20,\n    _4 = 0x21,\n    _5 = 0x22,\n    _6 = 0x23,\n    _7 = 0x24,\n    _8 = 0x25,\n    _9 = 0x26,\n    _0 = 0x27,\n    Return = 0x28,\n    Escape = 0x29,\n    Backspace = 0x2a,\n    Tab = 0x2b,\n    Spacebar = 0x2c,\n    Minus = 0x2d,\n    Equals = 0x2e,\n    LeftSquareBracket = 0x2f,\n    RightSquareBracket = 0x30,\n    Backslash = 0x31,\n    NonUsHash = 0x32,\n    Semicolon = 0x33,\n    Quote = 0x34,\n    GraveAccent = 0x35,\n    Comma = 0x36,\n    Period = 0x37,\n    Slash = 0x38,\n    CapsLock = 0x39,\n    F1 = 0x3a,\n    F2 = 0x3b,\n    F3 = 0x3c,\n    F4 = 0x3d,\n    F5 = 0x3e,\n    F6 = 0x3f,\n    F7 = 0x40,\n    F8 = 0x41,\n    F9 = 0x42,\n    F10 = 0x43,\n    F11 = 0x44,\n    F12 = 0x45,\n    PrintScreen = 0x46,\n    ScrollLock = 0x47,\n    Pause = 0x48,\n    Insert = 0x49,\n    Home = 0x4a,\n    PageUp = 0x4b,\n    Delete = 0x4c,\n    End = 0x4d,\n    PageDown = 0x4e,\n    RightArrow = 0x4f,\n    LeftArrow = 0x50,\n    DownArrow = 0x51,\n    UpArrow = 0x52,\n    KeypadNumLock = 0x53,\n    KeypadDivide = 0x54,\n    KeypadMultiply = 0x55,\n    KeypadAdd = 0x56,\n    KeypadSubtrace = 0x57,\n    KeypadReturn = 0x58,\n    Keypad1 = 0x59,\n    Keypad2 = 0x5a,\n    Keypad3 = 0x5b,\n    Keypad4 = 0x5c,\n    Keypad5 = 0x5d,\n    Keypad6 = 0x5e,\n    Keypad7 = 0x5f,\n    Keypad8 = 0x60,\n    Keypad9 = 0x61,\n    Keypad0 = 0x62,\n    KeypadDecimalPoint = 0x63,\n    NonUsBackslash = 0x64,\n    Application = 0x65,\n    Power = 0x66,\n    KeypadEquals = 0x67,\n    F13 = 0x68,\n    F14 = 0x69,\n    F15 = 0x6a,\n    F16 = 0x6b,\n    F17 = 0x6c,\n    F18 = 0x6d,\n    F19 = 0x6e,\n    F20 = 0x6f,\n    F21 = 0x70,\n    F22 = 0x71,\n    F23 = 0x72,\n    F24 = 0x73,\n    Execute = 0x74,\n    Help = 0x75,\n    Menu = 0x76,\n    Select = 0x77,\n    Stop = 0x78,\n    Again = 0x79,\n    Undo = 0x7a,\n    Cut = 0x7b,\n    Copy = 0x7c,\n    Paste = 0x7d,\n    Find = 0x7e,\n    Mute = 0x7f,\n    VolumeUp = 0x80,\n    VolumeDown = 0x81,\n}\n\nexport enum HidKeyboardModifiers { // uint8_t\n    None = 0x0,\n    LeftControl = 0x1,\n    LeftShift = 0x2,\n    LeftAlt = 0x4,\n    LeftGUI = 0x8,\n    RightControl = 0x10,\n    RightShift = 0x20,\n    RightAlt = 0x40,\n    RightGUI = 0x80,\n}\n\nexport enum HidKeyboardAction { // uint8_t\n    Press = 0x0,\n    Up = 0x1,\n    Down = 0x2,\n}\n\nexport enum HidKeyboardCmd {\n    /**\n     * Presses a key or a sequence of keys down.\n     *\n     * ```\n     * const [rest] = jdunpack<[([HidKeyboardSelector, HidKeyboardModifiers, HidKeyboardAction])[]]>(buf, \"r: u16 u8 u8\")\n     * const [selector, modifiers, action] = rest[0]\n     * ```\n     */\n    Key = 0x80,\n\n    /**\n     * No args. Clears all pressed keys.\n     */\n    Clear = 0x81,\n}\n\nexport namespace HidKeyboardCmdPack {\n    /**\n     * Pack format for 'key' data.\n     */\n    export const Key = \"r: u16 u8 u8\"\n}\n\n// Service HID Mouse constants\nexport const SRV_HID_MOUSE = 0x1885dc1c\n\nexport enum HidMouseButton { // uint16_t\n    Left = 0x1,\n    Right = 0x2,\n    Middle = 0x4,\n}\n\nexport enum HidMouseButtonEvent { // uint8_t\n    Up = 0x1,\n    Down = 0x2,\n    Click = 0x3,\n    DoubleClick = 0x4,\n}\n\nexport enum HidMouseCmd {\n    /**\n     * Sets the up/down state of one or more buttons.\n     * A `Click` is the same as `Down` followed by `Up` after 100ms.\n     * A `DoubleClick` is two clicks with `150ms` gap between them (that is, `100ms` first click, `150ms` gap, `100ms` second click).\n     *\n     * ```\n     * const [buttons, ev] = jdunpack<[HidMouseButton, HidMouseButtonEvent]>(buf, \"u16 u8\")\n     * ```\n     */\n    SetButton = 0x80,\n\n    /**\n     * Moves the mouse by the distance specified.\n     * If the time is positive, it specifies how long to make the move.\n     *\n     * ```\n     * const [dx, dy, time] = jdunpack<[number, number, number]>(buf, \"i16 i16 u16\")\n     * ```\n     */\n    Move = 0x81,\n\n    /**\n     * Turns the wheel up or down. Positive if scrolling up.\n     * If the time is positive, it specifies how long to make the move.\n     *\n     * ```\n     * const [dy, time] = jdunpack<[number, number]>(buf, \"i16 u16\")\n     * ```\n     */\n    Wheel = 0x82,\n}\n\nexport namespace HidMouseCmdPack {\n    /**\n     * Pack format for 'set_button' data.\n     */\n    export const SetButton = \"u16 u8\"\n\n    /**\n     * Pack format for 'move' data.\n     */\n    export const Move = \"i16 i16 u16\"\n\n    /**\n     * Pack format for 'wheel' data.\n     */\n    export const Wheel = \"i16 u16\"\n}\n\n// Service Humidity constants\nexport const SRV_HUMIDITY = 0x16c810b8\nexport enum HumidityReg {\n    /**\n     * Read-only %RH u22.10 (uint32_t). The relative humidity in percentage of full water saturation.\n     *\n     * ```\n     * const [humidity] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    Humidity = 0x101,\n\n    /**\n     * Read-only %RH u22.10 (uint32_t). The real humidity is between `humidity - humidity_error` and `humidity + humidity_error`.\n     *\n     * ```\n     * const [humidityError] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    HumidityError = 0x106,\n\n    /**\n     * Constant %RH u22.10 (uint32_t). Lowest humidity that can be reported.\n     *\n     * ```\n     * const [minHumidity] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    MinHumidity = 0x104,\n\n    /**\n     * Constant %RH u22.10 (uint32_t). Highest humidity that can be reported.\n     *\n     * ```\n     * const [maxHumidity] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    MaxHumidity = 0x105,\n}\n\nexport namespace HumidityRegPack {\n    /**\n     * Pack format for 'humidity' data.\n     */\n    export const Humidity = \"u22.10\"\n\n    /**\n     * Pack format for 'humidity_error' data.\n     */\n    export const HumidityError = \"u22.10\"\n\n    /**\n     * Pack format for 'min_humidity' data.\n     */\n    export const MinHumidity = \"u22.10\"\n\n    /**\n     * Pack format for 'max_humidity' data.\n     */\n    export const MaxHumidity = \"u22.10\"\n}\n\n// Service I2C constants\nexport const SRV_I2C = 0x1c18ca43\n\nexport enum I2CStatus { // uint8_t\n    OK = 0x0,\n    NAckAddr = 0x1,\n    NAckData = 0x2,\n    NoI2C = 0x3,\n}\n\nexport enum I2CReg {\n    /**\n     * Read-only bool (uint8_t). Indicates whether the I2C is working.\n     *\n     * ```\n     * const [ok] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Ok = 0x180,\n}\n\nexport namespace I2CRegPack {\n    /**\n     * Pack format for 'ok' data.\n     */\n    export const Ok = \"u8\"\n}\n\nexport enum I2CCmd {\n    /**\n     * `address` is 7-bit.\n     * `num_read` can be 0 if nothing needs to be read.\n     * The `write_buf` includes the register address if required (first one or two bytes).\n     *\n     * ```\n     * const [address, numRead, writeBuf] = jdunpack<[number, number, Uint8Array]>(buf, \"u8 u8 b\")\n     * ```\n     */\n    Transaction = 0x80,\n\n    /**\n     * report Transaction\n     * ```\n     * const [status, readBuf] = jdunpack<[I2CStatus, Uint8Array]>(buf, \"u8 b\")\n     * ```\n     */\n}\n\nexport namespace I2CCmdPack {\n    /**\n     * Pack format for 'transaction' data.\n     */\n    export const Transaction = \"u8 u8 b\"\n\n    /**\n     * Pack format for 'transaction' data.\n     */\n    export const TransactionReport = \"u8 b\"\n}\n\n// Service Illuminance constants\nexport const SRV_ILLUMINANCE = 0x1e6ecaf2\nexport enum IlluminanceReg {\n    /**\n     * Read-only lux u22.10 (uint32_t). The amount of illuminance, as lumens per square metre.\n     *\n     * ```\n     * const [illuminance] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    Illuminance = 0x101,\n\n    /**\n     * Read-only lux u22.10 (uint32_t). Error on the reported sensor value.\n     *\n     * ```\n     * const [illuminanceError] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    IlluminanceError = 0x106,\n}\n\nexport namespace IlluminanceRegPack {\n    /**\n     * Pack format for 'illuminance' data.\n     */\n    export const Illuminance = \"u22.10\"\n\n    /**\n     * Pack format for 'illuminance_error' data.\n     */\n    export const IlluminanceError = \"u22.10\"\n}\n\n// Service Indexed screen constants\nexport const SRV_INDEXED_SCREEN = 0x16fa36e5\nexport enum IndexedScreenCmd {\n    /**\n     * Sets the update window for subsequent `set_pixels` commands.\n     *\n     * ```\n     * const [x, y, width, height] = jdunpack<[number, number, number, number]>(buf, \"u16 u16 u16 u16\")\n     * ```\n     */\n    StartUpdate = 0x81,\n\n    /**\n     * Argument: pixels bytes. Set pixels in current window, according to current palette.\n     * Each \"line\" of data is aligned to a byte.\n     *\n     * ```\n     * const [pixels] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    SetPixels = 0x83,\n}\n\nexport namespace IndexedScreenCmdPack {\n    /**\n     * Pack format for 'start_update' data.\n     */\n    export const StartUpdate = \"u16 u16 u16 u16\"\n\n    /**\n     * Pack format for 'set_pixels' data.\n     */\n    export const SetPixels = \"b\"\n}\n\nexport enum IndexedScreenReg {\n    /**\n     * Read-write ratio u0.8 (uint8_t). Set backlight brightness.\n     * If set to `0` the display may go to sleep.\n     *\n     * ```\n     * const [brightness] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    Brightness = 0x1,\n\n    /**\n     * Read-write bytes. The current palette. The colors are `[r,g,b, padding]` 32bit color entries.\n     * The color entry repeats `1 << bits_per_pixel` times.\n     * This register may be write-only.\n     *\n     * ```\n     * const [palette] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Palette = 0x80,\n\n    /**\n     * Constant bit uint8_t. Determines the number of palette entries.\n     * Typical values are 1 or 4.\n     *\n     * ```\n     * const [bitsPerPixel] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    BitsPerPixel = 0x180,\n\n    /**\n     * Constant px uint16_t. Screen width in \"natural\" orientation.\n     *\n     * ```\n     * const [width] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Width = 0x181,\n\n    /**\n     * Constant px uint16_t. Screen height in \"natural\" orientation.\n     *\n     * ```\n     * const [height] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Height = 0x182,\n\n    /**\n     * Read-write bool (uint8_t). If true, consecutive pixels in the \"width\" direction are sent next to each other (this is typical for graphics cards).\n     * If false, consecutive pixels in the \"height\" direction are sent next to each other.\n     * For embedded screen controllers, this is typically true iff `width < height`\n     * (in other words, it's only true for portrait orientation screens).\n     * Some controllers may allow the user to change this (though the refresh order may not be optimal then).\n     * This is independent of the `rotation` register.\n     *\n     * ```\n     * const [widthMajor] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    WidthMajor = 0x81,\n\n    /**\n     * Read-write px uint8_t. Every pixel sent over wire is represented by `up_sampling x up_sampling` square of physical pixels.\n     * Some displays may allow changing this (which will also result in changes to `width` and `height`).\n     * Typical values are 1 and 2.\n     *\n     * ```\n     * const [upSampling] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    UpSampling = 0x82,\n\n    /**\n     * Read-write \u00B0 uint16_t. Possible values are 0, 90, 180 and 270 only.\n     * Write to this register do not affect `width` and `height` registers,\n     * and may be ignored by some screens.\n     *\n     * ```\n     * const [rotation] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Rotation = 0x83,\n}\n\nexport namespace IndexedScreenRegPack {\n    /**\n     * Pack format for 'brightness' data.\n     */\n    export const Brightness = \"u0.8\"\n\n    /**\n     * Pack format for 'palette' data.\n     */\n    export const Palette = \"b\"\n\n    /**\n     * Pack format for 'bits_per_pixel' data.\n     */\n    export const BitsPerPixel = \"u8\"\n\n    /**\n     * Pack format for 'width' data.\n     */\n    export const Width = \"u16\"\n\n    /**\n     * Pack format for 'height' data.\n     */\n    export const Height = \"u16\"\n\n    /**\n     * Pack format for 'width_major' data.\n     */\n    export const WidthMajor = \"u8\"\n\n    /**\n     * Pack format for 'up_sampling' data.\n     */\n    export const UpSampling = \"u8\"\n\n    /**\n     * Pack format for 'rotation' data.\n     */\n    export const Rotation = \"u16\"\n}\n\n// Service Infrastructure constants\nexport const SRV_INFRASTRUCTURE = 0x1e1589eb\n// Service Keyboard client constants\nexport const SRV_KEYBOARD_CLIENT = 0x113d023e\nexport enum KeyboardClientEvent {\n    /**\n     * Argument: key uint16_t. Emitted when a key is pressed.\n     *\n     * ```\n     * const [key] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Down = 0x1,\n\n    /**\n     * Argument: key uint16_t. Emitted when a key is held.\n     *\n     * ```\n     * const [key] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Hold = 0x81,\n}\n\nexport namespace KeyboardClientEventPack {\n    /**\n     * Pack format for 'down' data.\n     */\n    export const Down = \"u16\"\n\n    /**\n     * Pack format for 'hold' data.\n     */\n    export const Hold = \"u16\"\n}\n\n// Service LED constants\nexport const SRV_LED = 0x1609d4f0\nexport const CONST_LED_MAX_PIXELS_LENGTH = 0x40\n\nexport enum LedVariant { // uint8_t\n    Strip = 0x1,\n    Ring = 0x2,\n    Stick = 0x3,\n    Jewel = 0x4,\n    Matrix = 0x5,\n}\n\nexport enum LedReg {\n    /**\n     * Read-write bytes. A buffer of 24bit RGB color entries for each LED, in R, G, B order.\n     * When writing, if the buffer is too short, the remaining pixels are set to `#000000`;\n     * If the buffer is too long, the write may be ignored, or the additional pixels may be ignored.\n     * If the number of pixels is greater than `max_pixels_length`, the read should return an empty payload.\n     *\n     * ```\n     * const [pixels] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Pixels = 0x2,\n\n    /**\n     * Read-write ratio u0.8 (uint8_t). Set the luminosity of the strip.\n     * At `0` the power to the strip is completely shut down.\n     *\n     * ```\n     * const [brightness] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    Brightness = 0x1,\n\n    /**\n     * Read-only ratio u0.8 (uint8_t). This is the luminosity actually applied to the strip.\n     * May be lower than `brightness` if power-limited by the `max_power` register.\n     * It will rise slowly (few seconds) back to `brightness` is limits are no longer required.\n     *\n     * ```\n     * const [actualBrightness] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    ActualBrightness = 0x180,\n\n    /**\n     * Constant # uint16_t. Specifies the number of pixels in the strip.\n     *\n     * ```\n     * const [numPixels] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    NumPixels = 0x182,\n\n    /**\n     * Constant # uint16_t. If the LED pixel strip is a matrix, specifies the number of columns.\n     *\n     * ```\n     * const [numColumns] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    NumColumns = 0x183,\n\n    /**\n     * Read-write mA uint16_t. Limit the power drawn by the light-strip (and controller).\n     *\n     * ```\n     * const [maxPower] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    MaxPower = 0x7,\n\n    /**\n     * Constant # uint16_t. If known, specifies the number of LEDs in parallel on this device.\n     * The actual number of LEDs is `num_pixels * leds_per_pixel`.\n     *\n     * ```\n     * const [ledsPerPixel] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    LedsPerPixel = 0x184,\n\n    /**\n     * Constant nm uint16_t. If monochrome LED, specifies the wave length of the LED.\n     * Register is missing for RGB LEDs.\n     *\n     * ```\n     * const [waveLength] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    WaveLength = 0x185,\n\n    /**\n     * Constant mcd uint16_t. The luminous intensity of all the LEDs, at full brightness, in micro candella.\n     *\n     * ```\n     * const [luminousIntensity] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    LuminousIntensity = 0x186,\n\n    /**\n     * Constant Variant (uint8_t). Specifies the shape of the light strip.\n     *\n     * ```\n     * const [variant] = jdunpack<[LedVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace LedRegPack {\n    /**\n     * Pack format for 'pixels' data.\n     */\n    export const Pixels = \"b\"\n\n    /**\n     * Pack format for 'brightness' data.\n     */\n    export const Brightness = \"u0.8\"\n\n    /**\n     * Pack format for 'actual_brightness' data.\n     */\n    export const ActualBrightness = \"u0.8\"\n\n    /**\n     * Pack format for 'num_pixels' data.\n     */\n    export const NumPixels = \"u16\"\n\n    /**\n     * Pack format for 'num_columns' data.\n     */\n    export const NumColumns = \"u16\"\n\n    /**\n     * Pack format for 'max_power' data.\n     */\n    export const MaxPower = \"u16\"\n\n    /**\n     * Pack format for 'leds_per_pixel' data.\n     */\n    export const LedsPerPixel = \"u16\"\n\n    /**\n     * Pack format for 'wave_length' data.\n     */\n    export const WaveLength = \"u16\"\n\n    /**\n     * Pack format for 'luminous_intensity' data.\n     */\n    export const LuminousIntensity = \"u16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service LED Single constants\nexport const SRV_LED_SINGLE = 0x1e3048f8\n\nexport enum LedSingleVariant { // uint8_t\n    ThroughHole = 0x1,\n    SMD = 0x2,\n    Power = 0x3,\n    Bead = 0x4,\n}\n\nexport enum LedSingleCmd {\n    /**\n     * This has the same semantics as `set_status_light` in the control service.\n     *\n     * ```\n     * const [toRed, toGreen, toBlue, speed] = jdunpack<[number, number, number, number]>(buf, \"u8 u8 u8 u8\")\n     * ```\n     */\n    Animate = 0x80,\n}\n\nexport namespace LedSingleCmdPack {\n    /**\n     * Pack format for 'animate' data.\n     */\n    export const Animate = \"u8 u8 u8 u8\"\n}\n\nexport enum LedSingleReg {\n    /**\n     * The current color of the LED.\n     *\n     * ```\n     * const [red, green, blue] = jdunpack<[number, number, number]>(buf, \"u8 u8 u8\")\n     * ```\n     */\n    Color = 0x180,\n\n    /**\n     * Read-write mA uint16_t. Limit the power drawn by the light-strip (and controller).\n     *\n     * ```\n     * const [maxPower] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    MaxPower = 0x7,\n\n    /**\n     * Constant uint16_t. If known, specifies the number of LEDs in parallel on this device.\n     *\n     * ```\n     * const [ledCount] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    LedCount = 0x183,\n\n    /**\n     * Constant nm uint16_t. If monochrome LED, specifies the wave length of the LED.\n     *\n     * ```\n     * const [waveLength] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    WaveLength = 0x181,\n\n    /**\n     * Constant mcd uint16_t. The luminous intensity of the LED, at full value, in micro candella.\n     *\n     * ```\n     * const [luminousIntensity] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    LuminousIntensity = 0x182,\n\n    /**\n     * Constant Variant (uint8_t). The physical type of LED.\n     *\n     * ```\n     * const [variant] = jdunpack<[LedSingleVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace LedSingleRegPack {\n    /**\n     * Pack format for 'color' data.\n     */\n    export const Color = \"u8 u8 u8\"\n\n    /**\n     * Pack format for 'max_power' data.\n     */\n    export const MaxPower = \"u16\"\n\n    /**\n     * Pack format for 'led_count' data.\n     */\n    export const LedCount = \"u16\"\n\n    /**\n     * Pack format for 'wave_length' data.\n     */\n    export const WaveLength = \"u16\"\n\n    /**\n     * Pack format for 'luminous_intensity' data.\n     */\n    export const LuminousIntensity = \"u16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service LED Strip constants\nexport const SRV_LED_STRIP = 0x126f00e0\n\nexport enum LedStripLightType { // uint8_t\n    WS2812B_GRB = 0x0,\n    APA102 = 0x10,\n    SK9822 = 0x11,\n}\n\nexport enum LedStripVariant { // uint8_t\n    Strip = 0x1,\n    Ring = 0x2,\n    Stick = 0x3,\n    Jewel = 0x4,\n    Matrix = 0x5,\n}\n\nexport enum LedStripReg {\n    /**\n     * Read-write ratio u0.8 (uint8_t). Set the luminosity of the strip.\n     * At `0` the power to the strip is completely shut down.\n     *\n     * ```\n     * const [brightness] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    Brightness = 0x1,\n\n    /**\n     * Read-only ratio u0.8 (uint8_t). This is the luminosity actually applied to the strip.\n     * May be lower than `brightness` if power-limited by the `max_power` register.\n     * It will rise slowly (few seconds) back to `brightness` is limits are no longer required.\n     *\n     * ```\n     * const [actualBrightness] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    ActualBrightness = 0x180,\n\n    /**\n     * Read-write LightType (uint8_t). Specifies the type of light strip connected to controller.\n     * Controllers which are sold with lights should default to the correct type\n     * and could not allow change.\n     *\n     * ```\n     * const [lightType] = jdunpack<[LedStripLightType]>(buf, \"u8\")\n     * ```\n     */\n    LightType = 0x80,\n\n    /**\n     * Read-write # uint16_t. Specifies the number of pixels in the strip.\n     * Controllers which are sold with lights should default to the correct length\n     * and could not allow change. Increasing length at runtime leads to ineffective use of memory and may lead to controller reboot.\n     *\n     * ```\n     * const [numPixels] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    NumPixels = 0x81,\n\n    /**\n     * Read-write # uint16_t. If the LED pixel strip is a matrix, specifies the number of columns. Otherwise, a square shape is assumed. Controllers which are sold with lights should default to the correct length\n     * and could not allow change. Increasing length at runtime leads to ineffective use of memory and may lead to controller reboot.\n     *\n     * ```\n     * const [numColumns] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    NumColumns = 0x83,\n\n    /**\n     * Read-write mA uint16_t. Limit the power drawn by the light-strip (and controller).\n     *\n     * ```\n     * const [maxPower] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    MaxPower = 0x7,\n\n    /**\n     * Constant # uint16_t. The maximum supported number of pixels.\n     * All writes to `num_pixels` are clamped to `max_pixels`.\n     *\n     * ```\n     * const [maxPixels] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    MaxPixels = 0x181,\n\n    /**\n     * Read-write # uint16_t. How many times to repeat the program passed in `run` command.\n     * Should be set before the `run` command.\n     * Setting to `0` means to repeat forever.\n     *\n     * ```\n     * const [numRepeats] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    NumRepeats = 0x82,\n\n    /**\n     * Constant Variant (uint8_t). Specifies the shape of the light strip.\n     *\n     * ```\n     * const [variant] = jdunpack<[LedStripVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace LedStripRegPack {\n    /**\n     * Pack format for 'brightness' data.\n     */\n    export const Brightness = \"u0.8\"\n\n    /**\n     * Pack format for 'actual_brightness' data.\n     */\n    export const ActualBrightness = \"u0.8\"\n\n    /**\n     * Pack format for 'light_type' data.\n     */\n    export const LightType = \"u8\"\n\n    /**\n     * Pack format for 'num_pixels' data.\n     */\n    export const NumPixels = \"u16\"\n\n    /**\n     * Pack format for 'num_columns' data.\n     */\n    export const NumColumns = \"u16\"\n\n    /**\n     * Pack format for 'max_power' data.\n     */\n    export const MaxPower = \"u16\"\n\n    /**\n     * Pack format for 'max_pixels' data.\n     */\n    export const MaxPixels = \"u16\"\n\n    /**\n     * Pack format for 'num_repeats' data.\n     */\n    export const NumRepeats = \"u16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\nexport enum LedStripCmd {\n    /**\n     * Argument: program bytes. Run the given light \"program\". See service description for details.\n     *\n     * ```\n     * const [program] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Run = 0x81,\n}\n\nexport namespace LedStripCmdPack {\n    /**\n     * Pack format for 'run' data.\n     */\n    export const Run = \"b\"\n}\n\n// Service Light bulb constants\nexport const SRV_LIGHT_BULB = 0x1cab054c\nexport enum LightBulbReg {\n    /**\n     * Read-write ratio u0.16 (uint16_t). Indicates the brightness of the light bulb. Zero means completely off and 0xffff means completely on.\n     * For non-dimmable lights, the value should be clamp to 0xffff for any non-zero value.\n     *\n     * ```\n     * const [brightness] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Brightness = 0x1,\n\n    /**\n     * Constant bool (uint8_t). Indicates if the light supports dimming.\n     *\n     * ```\n     * const [dimmable] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Dimmable = 0x180,\n}\n\nexport namespace LightBulbRegPack {\n    /**\n     * Pack format for 'brightness' data.\n     */\n    export const Brightness = \"u0.16\"\n\n    /**\n     * Pack format for 'dimmable' data.\n     */\n    export const Dimmable = \"u8\"\n}\n\n// Service Light level constants\nexport const SRV_LIGHT_LEVEL = 0x17dc9a1c\n\nexport enum LightLevelVariant { // uint8_t\n    PhotoResistor = 0x1,\n    ReverseBiasedLED = 0x2,\n}\n\nexport enum LightLevelReg {\n    /**\n     * Read-only ratio u0.16 (uint16_t). Detect light level\n     *\n     * ```\n     * const [lightLevel] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    LightLevel = 0x101,\n\n    /**\n     * Read-only ratio u0.16 (uint16_t). Absolute estimated error of the reading value\n     *\n     * ```\n     * const [lightLevelError] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    LightLevelError = 0x106,\n\n    /**\n     * Constant Variant (uint8_t). The type of physical sensor.\n     *\n     * ```\n     * const [variant] = jdunpack<[LightLevelVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace LightLevelRegPack {\n    /**\n     * Pack format for 'light_level' data.\n     */\n    export const LightLevel = \"u0.16\"\n\n    /**\n     * Pack format for 'light_level_error' data.\n     */\n    export const LightLevelError = \"u0.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Logger constants\nexport const SRV_LOGGER = 0x12dc1fca\n\nexport enum LoggerPriority { // uint8_t\n    Debug = 0x0,\n    Log = 0x1,\n    Warning = 0x2,\n    Error = 0x3,\n    Silent = 0x4,\n}\n\nexport enum LoggerReg {\n    /**\n     * Read-write Priority (uint8_t). Messages with level lower than this won't be emitted. The default setting may vary.\n     * Loggers should revert this to their default setting if the register has not been\n     * updated in 3000ms, and also keep the lowest setting they have seen in the last 1500ms.\n     * Thus, clients should write this register every 1000ms and ignore messages which are\n     * too verbose for them.\n     *\n     * ```\n     * const [minPriority] = jdunpack<[LoggerPriority]>(buf, \"u8\")\n     * ```\n     */\n    MinPriority = 0x80,\n}\n\nexport namespace LoggerRegPack {\n    /**\n     * Pack format for 'min_priority' data.\n     */\n    export const MinPriority = \"u8\"\n}\n\nexport enum LoggerCmd {\n    /**\n     * Argument: message string (bytes). Report a message.\n     *\n     * ```\n     * const [message] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Debug = 0x80,\n\n    /**\n     * Argument: message string (bytes). Report a message.\n     *\n     * ```\n     * const [message] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Log = 0x81,\n\n    /**\n     * Argument: message string (bytes). Report a message.\n     *\n     * ```\n     * const [message] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Warn = 0x82,\n\n    /**\n     * Argument: message string (bytes). Report a message.\n     *\n     * ```\n     * const [message] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Error = 0x83,\n}\n\nexport namespace LoggerCmdPack {\n    /**\n     * Pack format for 'debug' data.\n     */\n    export const Debug = \"s\"\n\n    /**\n     * Pack format for 'log' data.\n     */\n    export const Log = \"s\"\n\n    /**\n     * Pack format for 'warn' data.\n     */\n    export const Warn = \"s\"\n\n    /**\n     * Pack format for 'error' data.\n     */\n    export const Error = \"s\"\n}\n\n// Service Magnetic field level constants\nexport const SRV_MAGNETIC_FIELD_LEVEL = 0x12fe180f\n\nexport enum MagneticFieldLevelVariant { // uint8_t\n    AnalogNS = 0x1,\n    AnalogN = 0x2,\n    AnalogS = 0x3,\n    DigitalNS = 0x4,\n    DigitalN = 0x5,\n    DigitalS = 0x6,\n}\n\nexport enum MagneticFieldLevelReg {\n    /**\n     * Read-only ratio i1.15 (int16_t). Indicates the strength of magnetic field between -1 and 1.\n     * When no magnet is present the value should be around 0.\n     * For analog sensors,\n     * when the north pole of the magnet is on top of the module\n     * and closer than south pole, then the value should be positive.\n     * For digital sensors,\n     * the value should either `0` or `1`, regardless of polarity.\n     *\n     * ```\n     * const [strength] = jdunpack<[number]>(buf, \"i1.15\")\n     * ```\n     */\n    Strength = 0x101,\n\n    /**\n     * Read-only bool (uint8_t). Determines if the magnetic field is present.\n     * If the event `active` is observed, `detected` is true; if `inactive` is observed, `detected` is false.\n     */\n    Detected = 0x181,\n\n    /**\n     * Constant Variant (uint8_t). Determines which magnetic poles the sensor can detected,\n     * and whether or not it can measure their strength or just presence.\n     *\n     * ```\n     * const [variant] = jdunpack<[MagneticFieldLevelVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace MagneticFieldLevelRegPack {\n    /**\n     * Pack format for 'strength' data.\n     */\n    export const Strength = \"i1.15\"\n\n    /**\n     * Pack format for 'detected' data.\n     */\n    export const Detected = \"u8\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\nexport enum MagneticFieldLevelEvent {\n    /**\n     * Emitted when strong-enough magnetic field is detected.\n     */\n    Active = 0x1,\n\n    /**\n     * Emitted when strong-enough magnetic field is no longer detected.\n     */\n    Inactive = 0x2,\n}\n\n// Service Magnetometer constants\nexport const SRV_MAGNETOMETER = 0x13029088\nexport enum MagnetometerReg {\n    /**\n     * Indicates the current magnetic field on magnetometer.\n     * For reference: `1 mgauss` is `100 nT` (and `1 gauss` is `100 000 nT`).\n     *\n     * ```\n     * const [x, y, z] = jdunpack<[number, number, number]>(buf, \"i32 i32 i32\")\n     * ```\n     */\n    Forces = 0x101,\n\n    /**\n     * Read-only nT int32_t. Absolute estimated error on the readings.\n     *\n     * ```\n     * const [forcesError] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    ForcesError = 0x106,\n}\n\nexport namespace MagnetometerRegPack {\n    /**\n     * Pack format for 'forces' data.\n     */\n    export const Forces = \"i32 i32 i32\"\n\n    /**\n     * Pack format for 'forces_error' data.\n     */\n    export const ForcesError = \"i32\"\n}\n\nexport enum MagnetometerCmd {\n    /**\n     * No args. Forces a calibration sequence where the user/device\n     * might have to rotate to be calibrated.\n     */\n    Calibrate = 0x2,\n}\n\n// Service Matrix Keypad constants\nexport const SRV_MATRIX_KEYPAD = 0x13062dc8\n\nexport enum MatrixKeypadVariant { // uint8_t\n    Membrane = 0x1,\n    Keyboard = 0x2,\n    Elastomer = 0x3,\n    ElastomerLEDPixel = 0x4,\n}\n\nexport enum MatrixKeypadReg {\n    /**\n     * Read-only. The coordinate of the button currently pressed. Keys are zero-indexed from left to right, top to bottom:\n     * ``row = index / columns``, ``column = index % columns``.\n     *\n     * ```\n     * const [index] = jdunpack<[number[]]>(buf, \"u8[]\")\n     * ```\n     */\n    Pressed = 0x101,\n\n    /**\n     * Constant # uint8_t. Number of rows in the matrix\n     *\n     * ```\n     * const [rows] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Rows = 0x180,\n\n    /**\n     * Constant # uint8_t. Number of columns in the matrix\n     *\n     * ```\n     * const [columns] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Columns = 0x181,\n\n    /**\n     * Constant. The characters printed on the keys if any, in indexing sequence.\n     *\n     * ```\n     * const [label] = jdunpack<[string[]]>(buf, \"z[]\")\n     * ```\n     */\n    Labels = 0x182,\n\n    /**\n     * Constant Variant (uint8_t). The type of physical keypad. If the variant is ``ElastomerLEDPixel``\n     * and the next service on the device is a ``LEDPixel`` service, it is considered\n     * as the service controlling the LED pixel on the keypad.\n     *\n     * ```\n     * const [variant] = jdunpack<[MatrixKeypadVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace MatrixKeypadRegPack {\n    /**\n     * Pack format for 'pressed' data.\n     */\n    export const Pressed = \"r: u8\"\n\n    /**\n     * Pack format for 'rows' data.\n     */\n    export const Rows = \"u8\"\n\n    /**\n     * Pack format for 'columns' data.\n     */\n    export const Columns = \"u8\"\n\n    /**\n     * Pack format for 'labels' data.\n     */\n    export const Labels = \"r: z\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\nexport enum MatrixKeypadEvent {\n    /**\n     * Argument: uint8_t. Emitted when a key, at the given index, goes from inactive (`pressed == 0`) to active.\n     *\n     * ```\n     * const [down] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Down = 0x1,\n\n    /**\n     * Argument: uint8_t. Emitted when a key, at the given index, goes from active (`pressed == 1`) to inactive.\n     *\n     * ```\n     * const [up] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Up = 0x2,\n\n    /**\n     * Argument: uint8_t. Emitted together with `up` when the press time was not longer than 500ms.\n     *\n     * ```\n     * const [click] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Click = 0x80,\n\n    /**\n     * Argument: uint8_t. Emitted together with `up` when the press time was more than 500ms.\n     *\n     * ```\n     * const [longClick] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    LongClick = 0x81,\n}\n\nexport namespace MatrixKeypadEventPack {\n    /**\n     * Pack format for 'down' data.\n     */\n    export const Down = \"u8\"\n\n    /**\n     * Pack format for 'up' data.\n     */\n    export const Up = \"u8\"\n\n    /**\n     * Pack format for 'click' data.\n     */\n    export const Click = \"u8\"\n\n    /**\n     * Pack format for 'long_click' data.\n     */\n    export const LongClick = \"u8\"\n}\n\n// Service Microphone constants\nexport const SRV_MICROPHONE = 0x113dac86\nexport enum MicrophoneCmd {\n    /**\n     * The samples will be streamed back over the `samples` pipe.\n     * If `num_samples` is `0`, streaming will only stop when the pipe is closed.\n     * Otherwise the specified number of samples is streamed.\n     * Samples are sent as `i16`.\n     *\n     * ```\n     * const [samples, numSamples] = jdunpack<[Uint8Array, number]>(buf, \"b[12] u32\")\n     * ```\n     */\n    Sample = 0x81,\n}\n\nexport namespace MicrophoneCmdPack {\n    /**\n     * Pack format for 'sample' data.\n     */\n    export const Sample = \"b[12] u32\"\n}\n\nexport enum MicrophoneReg {\n    /**\n     * Read-write \u03BCs uint32_t. Get or set microphone sampling period.\n     * Sampling rate is `1_000_000 / sampling_period Hz`.\n     *\n     * ```\n     * const [samplingPeriod] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    SamplingPeriod = 0x80,\n}\n\nexport namespace MicrophoneRegPack {\n    /**\n     * Pack format for 'sampling_period' data.\n     */\n    export const SamplingPeriod = \"u32\"\n}\n\n// Service MIDI output constants\nexport const SRV_MIDI_OUTPUT = 0x1a848cd7\nexport enum MidiOutputReg {\n    /**\n     * Read-write bool (uint8_t). Opens or closes the port to the MIDI device\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n}\n\nexport namespace MidiOutputRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n}\n\nexport enum MidiOutputCmd {\n    /**\n     * No args. Clears any pending send data that has not yet been sent from the MIDIOutput's queue.\n     */\n    Clear = 0x80,\n\n    /**\n     * Argument: data bytes. Enqueues the message to be sent to the corresponding MIDI port\n     *\n     * ```\n     * const [data] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Send = 0x81,\n}\n\nexport namespace MidiOutputCmdPack {\n    /**\n     * Pack format for 'send' data.\n     */\n    export const Send = \"b\"\n}\n\n// Service Model Runner constants\nexport const SRV_MODEL_RUNNER = 0x140f9a78\n\nexport enum ModelRunnerModelFormat { // uint32_t\n    TFLite = 0x334c4654,\n    ML4F = 0x30470f62,\n    EdgeImpulseCompiled = 0x30564945,\n}\n\nexport enum ModelRunnerCmd {\n    /**\n     * Argument: model_size B uint32_t. Open pipe for streaming in the model. The size of the model has to be declared upfront.\n     * The model is streamed over regular pipe data packets.\n     * The format supported by this instance of the service is specified in `format` register.\n     * When the pipe is closed, the model is written all into flash, and the device running the service may reset.\n     *\n     * ```\n     * const [modelSize] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    SetModel = 0x80,\n\n    /**\n     * report SetModel\n     * ```\n     * const [modelPort] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n\n    /**\n     * Argument: outputs pipe (bytes). Open channel that can be used to manually invoke the model. When enough data is sent over the `inputs` pipe, the model is invoked,\n     * and results are send over the `outputs` pipe.\n     *\n     * ```\n     * const [outputs] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    Predict = 0x81,\n\n    /**\n     * report Predict\n     * ```\n     * const [inputs] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n}\n\nexport namespace ModelRunnerCmdPack {\n    /**\n     * Pack format for 'set_model' data.\n     */\n    export const SetModel = \"u32\"\n\n    /**\n     * Pack format for 'set_model' data.\n     */\n    export const SetModelReport = \"u16\"\n\n    /**\n     * Pack format for 'predict' data.\n     */\n    export const Predict = \"b[12]\"\n\n    /**\n     * Pack format for 'predict' data.\n     */\n    export const PredictReport = \"u16\"\n}\n\nexport enum ModelRunnerReg {\n    /**\n     * Read-write uint16_t. When register contains `N > 0`, run the model automatically every time new `N` samples are collected.\n     * Model may be run less often if it takes longer to run than `N * sampling_interval`.\n     * The `outputs` register will stream its value after each run.\n     * This register is not stored in flash.\n     *\n     * ```\n     * const [autoInvokeEvery] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    AutoInvokeEvery = 0x80,\n\n    /**\n     * Read-only. Results of last model invocation as `float32` array.\n     *\n     * ```\n     * const [output] = jdunpack<[number[]]>(buf, \"f32[]\")\n     * ```\n     */\n    Outputs = 0x101,\n\n    /**\n     * Read-only. The shape of the input tensor.\n     *\n     * ```\n     * const [dimension] = jdunpack<[number[]]>(buf, \"u16[]\")\n     * ```\n     */\n    InputShape = 0x180,\n\n    /**\n     * Read-only. The shape of the output tensor.\n     *\n     * ```\n     * const [dimension] = jdunpack<[number[]]>(buf, \"u16[]\")\n     * ```\n     */\n    OutputShape = 0x181,\n\n    /**\n     * Read-only \u03BCs uint32_t. The time consumed in last model execution.\n     *\n     * ```\n     * const [lastRunTime] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    LastRunTime = 0x182,\n\n    /**\n     * Read-only B uint32_t. Number of RAM bytes allocated for model execution.\n     *\n     * ```\n     * const [allocatedArenaSize] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    AllocatedArenaSize = 0x183,\n\n    /**\n     * Read-only B uint32_t. The size of the model in bytes.\n     *\n     * ```\n     * const [modelSize] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    ModelSize = 0x184,\n\n    /**\n     * Read-only string (bytes). Textual description of last error when running or loading model (if any).\n     *\n     * ```\n     * const [lastError] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    LastError = 0x185,\n\n    /**\n     * Constant ModelFormat (uint32_t). The type of ML models supported by this service.\n     * `TFLite` is flatbuffer `.tflite` file.\n     * `ML4F` is compiled machine code model for Cortex-M4F.\n     * The format is typically present as first or second little endian word of model file.\n     *\n     * ```\n     * const [format] = jdunpack<[ModelRunnerModelFormat]>(buf, \"u32\")\n     * ```\n     */\n    Format = 0x186,\n\n    /**\n     * Constant uint32_t. A version number for the format.\n     *\n     * ```\n     * const [formatVersion] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    FormatVersion = 0x187,\n\n    /**\n     * Constant bool (uint8_t). If present and true this service can run models independently of other\n     * instances of this service on the device.\n     *\n     * ```\n     * const [parallel] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Parallel = 0x188,\n}\n\nexport namespace ModelRunnerRegPack {\n    /**\n     * Pack format for 'auto_invoke_every' data.\n     */\n    export const AutoInvokeEvery = \"u16\"\n\n    /**\n     * Pack format for 'outputs' data.\n     */\n    export const Outputs = \"r: f32\"\n\n    /**\n     * Pack format for 'input_shape' data.\n     */\n    export const InputShape = \"r: u16\"\n\n    /**\n     * Pack format for 'output_shape' data.\n     */\n    export const OutputShape = \"r: u16\"\n\n    /**\n     * Pack format for 'last_run_time' data.\n     */\n    export const LastRunTime = \"u32\"\n\n    /**\n     * Pack format for 'allocated_arena_size' data.\n     */\n    export const AllocatedArenaSize = \"u32\"\n\n    /**\n     * Pack format for 'model_size' data.\n     */\n    export const ModelSize = \"u32\"\n\n    /**\n     * Pack format for 'last_error' data.\n     */\n    export const LastError = \"s\"\n\n    /**\n     * Pack format for 'format' data.\n     */\n    export const Format = \"u32\"\n\n    /**\n     * Pack format for 'format_version' data.\n     */\n    export const FormatVersion = \"u32\"\n\n    /**\n     * Pack format for 'parallel' data.\n     */\n    export const Parallel = \"u8\"\n}\n\n// Service Motion constants\nexport const SRV_MOTION = 0x1179a749\n\nexport enum MotionVariant { // uint8_t\n    PIR = 0x1,\n}\n\nexport enum MotionReg {\n    /**\n     * Read-only bool (uint8_t). Reports is movement is currently detected by the sensor.\n     *\n     * ```\n     * const [moving] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Moving = 0x101,\n\n    /**\n     * Constant m u16.16 (uint32_t). Maximum distance where objects can be detected.\n     *\n     * ```\n     * const [maxDistance] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    MaxDistance = 0x180,\n\n    /**\n     * Constant \u00B0 uint16_t. Opening of the field of view\n     *\n     * ```\n     * const [angle] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Angle = 0x181,\n\n    /**\n     * Constant Variant (uint8_t). Type of physical sensor\n     *\n     * ```\n     * const [variant] = jdunpack<[MotionVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace MotionRegPack {\n    /**\n     * Pack format for 'moving' data.\n     */\n    export const Moving = \"u8\"\n\n    /**\n     * Pack format for 'max_distance' data.\n     */\n    export const MaxDistance = \"u16.16\"\n\n    /**\n     * Pack format for 'angle' data.\n     */\n    export const Angle = \"u16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\nexport enum MotionEvent {\n    /**\n     * A movement was detected.\n     */\n    Movement = 0x1,\n}\n\n// Service Motor constants\nexport const SRV_MOTOR = 0x17004cd8\nexport enum MotorReg {\n    /**\n     * Read-write ratio i1.15 (int16_t). Relative speed of the motor. Use positive/negative values to run the motor forwards and backwards.\n     * Positive is recommended to be clockwise rotation and negative counterclockwise. A speed of ``0``\n     * while ``enabled`` acts as brake.\n     *\n     * ```\n     * const [speed] = jdunpack<[number]>(buf, \"i1.15\")\n     * ```\n     */\n    Speed = 0x2,\n\n    /**\n     * Read-write bool (uint8_t). Turn the power to the motor on/off.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Constant kg/cm u16.16 (uint32_t). Torque required to produce the rated power of an electrical motor at load speed.\n     *\n     * ```\n     * const [loadTorque] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    LoadTorque = 0x180,\n\n    /**\n     * Constant rpm u16.16 (uint32_t). Revolutions per minute of the motor under full load.\n     *\n     * ```\n     * const [loadRotationSpeed] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    LoadRotationSpeed = 0x181,\n\n    /**\n     * Constant bool (uint8_t). Indicates if the motor can run backwards.\n     *\n     * ```\n     * const [reversible] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Reversible = 0x182,\n}\n\nexport namespace MotorRegPack {\n    /**\n     * Pack format for 'speed' data.\n     */\n    export const Speed = \"i1.15\"\n\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'load_torque' data.\n     */\n    export const LoadTorque = \"u16.16\"\n\n    /**\n     * Pack format for 'load_rotation_speed' data.\n     */\n    export const LoadRotationSpeed = \"u16.16\"\n\n    /**\n     * Pack format for 'reversible' data.\n     */\n    export const Reversible = \"u8\"\n}\n\n// Service Multitouch constants\nexport const SRV_MULTITOUCH = 0x1d112ab5\nexport enum MultitouchReg {\n    /**\n     * Read-only. Capacitance of channels. The capacitance is continuously calibrated, and a value of `0` indicates\n     * no touch, wheres a value of around `100` or more indicates touch.\n     * It's best to ignore this (unless debugging), and use events.\n     *\n     * ```\n     * const [capacitance] = jdunpack<[number[]]>(buf, \"i16[]\")\n     * ```\n     */\n    Capacity = 0x101,\n}\n\nexport namespace MultitouchRegPack {\n    /**\n     * Pack format for 'capacity' data.\n     */\n    export const Capacity = \"r: i16\"\n}\n\nexport enum MultitouchEvent {\n    /**\n     * Argument: channel uint8_t. Emitted when an input is touched.\n     *\n     * ```\n     * const [channel] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Touch = 0x1,\n\n    /**\n     * Argument: channel uint8_t. Emitted when an input is no longer touched.\n     *\n     * ```\n     * const [channel] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Release = 0x2,\n\n    /**\n     * Argument: channel uint8_t. Emitted when an input is briefly touched. TODO Not implemented.\n     *\n     * ```\n     * const [channel] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Tap = 0x80,\n\n    /**\n     * Argument: channel uint8_t. Emitted when an input is touched for longer than 500ms. TODO Not implemented.\n     *\n     * ```\n     * const [channel] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    LongPress = 0x81,\n\n    /**\n     * Emitted when input channels are successively touched in order of increasing channel numbers.\n     *\n     * ```\n     * const [duration, startChannel, endChannel] = jdunpack<[number, number, number]>(buf, \"u16 u8 u8\")\n     * ```\n     */\n    SwipePos = 0x90,\n\n    /**\n     * Emitted when input channels are successively touched in order of decreasing channel numbers.\n     *\n     * ```\n     * const [duration, startChannel, endChannel] = jdunpack<[number, number, number]>(buf, \"u16 u8 u8\")\n     * ```\n     */\n    SwipeNeg = 0x91,\n}\n\nexport namespace MultitouchEventPack {\n    /**\n     * Pack format for 'touch' data.\n     */\n    export const Touch = \"u8\"\n\n    /**\n     * Pack format for 'release' data.\n     */\n    export const Release = \"u8\"\n\n    /**\n     * Pack format for 'tap' data.\n     */\n    export const Tap = \"u8\"\n\n    /**\n     * Pack format for 'long_press' data.\n     */\n    export const LongPress = \"u8\"\n\n    /**\n     * Pack format for 'swipe_pos' data.\n     */\n    export const SwipePos = \"u16 u8 u8\"\n\n    /**\n     * Pack format for 'swipe_neg' data.\n     */\n    export const SwipeNeg = \"u16 u8 u8\"\n}\n\n// Service PC controller constants\nexport const SRV_PCCONTROLLER = 0x113d0987\nexport enum PCControllerCmd {\n    /**\n     * Argument: url string (bytes). Open a URL in the default browser.\n     *\n     * ```\n     * const [url] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    OpenUrl = 0x80,\n\n    /**\n     * Argument: name string (bytes). Start an app.\n     *\n     * ```\n     * const [name] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    StartApp = 0x81,\n\n    /**\n     * Argument: text string (bytes). Send text to the active window.\n     *\n     * ```\n     * const [text] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    SendText = 0x82,\n\n    /**\n     * Argument: script string (bytes). Run a script.\n     *\n     * ```\n     * const [script] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    RunScript = 0x83,\n}\n\nexport namespace PCControllerCmdPack {\n    /**\n     * Pack format for 'open_url' data.\n     */\n    export const OpenUrl = \"s\"\n\n    /**\n     * Pack format for 'start_app' data.\n     */\n    export const StartApp = \"s\"\n\n    /**\n     * Pack format for 'send_text' data.\n     */\n    export const SendText = \"s\"\n\n    /**\n     * Pack format for 'run_script' data.\n     */\n    export const RunScript = \"s\"\n}\n\n// Service PC monitor constants\nexport const SRV_PCMONITOR = 0x18627b15\nexport enum PCMonitorReg {\n    /**\n     * Read-only % uint8_t. CPU usage in percent.\n     *\n     * ```\n     * const [cpuUsage] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    CpuUsage = 0x190,\n\n    /**\n     * Read-only \u00B0C uint8_t. CPU temperature in Celsius.\n     *\n     * ```\n     * const [cpuTemperature] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    CpuTemperature = 0x191,\n\n    /**\n     * Read-only % uint8_t. RAM usage in percent.\n     *\n     * ```\n     * const [ramUsage] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    RamUsage = 0x192,\n\n    /**\n     * GPU info.\n     *\n     * ```\n     * const [usage, temperature] = jdunpack<[number, number]>(buf, \"u8 u8\")\n     * ```\n     */\n    GpuInformation = 0x193,\n\n    /**\n     * Network transmit/receive speed in Kbytes per second.\n     *\n     * ```\n     * const [tx, rx] = jdunpack<[number, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    NetworkInformation = 0x195,\n}\n\nexport namespace PCMonitorRegPack {\n    /**\n     * Pack format for 'cpu_usage' data.\n     */\n    export const CpuUsage = \"u8\"\n\n    /**\n     * Pack format for 'cpu_temperature' data.\n     */\n    export const CpuTemperature = \"u8\"\n\n    /**\n     * Pack format for 'ram_usage' data.\n     */\n    export const RamUsage = \"u8\"\n\n    /**\n     * Pack format for 'gpu_information' data.\n     */\n    export const GpuInformation = \"u8 u8\"\n\n    /**\n     * Pack format for 'network_information' data.\n     */\n    export const NetworkInformation = \"u16 u16\"\n}\n\n// Service Planar position constants\nexport const SRV_PLANAR_POSITION = 0x1dc37f55\n\nexport enum PlanarPositionVariant { // uint8_t\n    OpticalMousePosition = 0x1,\n}\n\nexport enum PlanarPositionReg {\n    /**\n     * The current position of the sensor.\n     *\n     * ```\n     * const [x, y] = jdunpack<[number, number]>(buf, \"i22.10 i22.10\")\n     * ```\n     */\n    Position = 0x101,\n\n    /**\n     * Constant Variant (uint8_t). Specifies the type of physical sensor.\n     *\n     * ```\n     * const [variant] = jdunpack<[PlanarPositionVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace PlanarPositionRegPack {\n    /**\n     * Pack format for 'position' data.\n     */\n    export const Position = \"i22.10 i22.10\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Potentiometer constants\nexport const SRV_POTENTIOMETER = 0x1f274746\n\nexport enum PotentiometerVariant { // uint8_t\n    Slider = 0x1,\n    Rotary = 0x2,\n    Hall = 0x3,\n}\n\nexport enum PotentiometerReg {\n    /**\n     * Read-only ratio u0.16 (uint16_t). The relative position of the slider.\n     *\n     * ```\n     * const [position] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Position = 0x101,\n\n    /**\n     * Constant Variant (uint8_t). Specifies the physical layout of the potentiometer.\n     *\n     * ```\n     * const [variant] = jdunpack<[PotentiometerVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace PotentiometerRegPack {\n    /**\n     * Pack format for 'position' data.\n     */\n    export const Position = \"u0.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Power constants\nexport const SRV_POWER = 0x1fa4c95a\n\nexport enum PowerPowerStatus { // uint8_t\n    Disallowed = 0x0,\n    Powering = 0x1,\n    Overload = 0x2,\n    Overprovision = 0x3,\n}\n\nexport enum PowerReg {\n    /**\n     * Read-write bool (uint8_t). Can be used to completely disable the service.\n     * When allowed, the service may still not be providing power, see\n     * `power_status` for the actual current state.\n     *\n     * ```\n     * const [allowed] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Allowed = 0x1,\n\n    /**\n     * Read-write mA uint16_t. Limit the power provided by the service. The actual maximum limit will depend on hardware.\n     * This field may be read-only in some implementations - you should read it back after setting.\n     *\n     * ```\n     * const [maxPower] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    MaxPower = 0x7,\n\n    /**\n     * Read-only PowerStatus (uint8_t). Indicates whether the power provider is currently providing power (`Powering` state), and if not, why not.\n     * `Overprovision` means there was another power provider, and we stopped not to overprovision the bus.\n     *\n     * ```\n     * const [powerStatus] = jdunpack<[PowerPowerStatus]>(buf, \"u8\")\n     * ```\n     */\n    PowerStatus = 0x181,\n\n    /**\n     * Read-only mA uint16_t. Present current draw from the bus.\n     *\n     * ```\n     * const [currentDraw] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    CurrentDraw = 0x101,\n\n    /**\n     * Read-only mV uint16_t. Voltage on input.\n     *\n     * ```\n     * const [batteryVoltage] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    BatteryVoltage = 0x180,\n\n    /**\n     * Read-only ratio u0.16 (uint16_t). Fraction of charge in the battery.\n     *\n     * ```\n     * const [batteryCharge] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    BatteryCharge = 0x182,\n\n    /**\n     * Constant mWh uint32_t. Energy that can be delivered to the bus when battery is fully charged.\n     * This excludes conversion overheads if any.\n     *\n     * ```\n     * const [batteryCapacity] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    BatteryCapacity = 0x183,\n\n    /**\n     * Read-write ms uint16_t. Many USB power packs need current to be drawn from time to time to prevent shutdown.\n     * This regulates how often and for how long such current is drawn.\n     * Typically a 1/8W 22 ohm resistor is used as load. This limits the duty cycle to 10%.\n     *\n     * ```\n     * const [keepOnPulseDuration] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    KeepOnPulseDuration = 0x80,\n\n    /**\n     * Read-write ms uint16_t. Many USB power packs need current to be drawn from time to time to prevent shutdown.\n     * This regulates how often and for how long such current is drawn.\n     * Typically a 1/8W 22 ohm resistor is used as load. This limits the duty cycle to 10%.\n     *\n     * ```\n     * const [keepOnPulsePeriod] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    KeepOnPulsePeriod = 0x81,\n}\n\nexport namespace PowerRegPack {\n    /**\n     * Pack format for 'allowed' data.\n     */\n    export const Allowed = \"u8\"\n\n    /**\n     * Pack format for 'max_power' data.\n     */\n    export const MaxPower = \"u16\"\n\n    /**\n     * Pack format for 'power_status' data.\n     */\n    export const PowerStatus = \"u8\"\n\n    /**\n     * Pack format for 'current_draw' data.\n     */\n    export const CurrentDraw = \"u16\"\n\n    /**\n     * Pack format for 'battery_voltage' data.\n     */\n    export const BatteryVoltage = \"u16\"\n\n    /**\n     * Pack format for 'battery_charge' data.\n     */\n    export const BatteryCharge = \"u0.16\"\n\n    /**\n     * Pack format for 'battery_capacity' data.\n     */\n    export const BatteryCapacity = \"u32\"\n\n    /**\n     * Pack format for 'keep_on_pulse_duration' data.\n     */\n    export const KeepOnPulseDuration = \"u16\"\n\n    /**\n     * Pack format for 'keep_on_pulse_period' data.\n     */\n    export const KeepOnPulsePeriod = \"u16\"\n}\n\nexport enum PowerCmd {\n    /**\n     * No args. Sent by the power service periodically, as broadcast.\n     */\n    Shutdown = 0x80,\n}\n\nexport enum PowerEvent {\n    /**\n     * Argument: power_status PowerStatus (uint8_t). Emitted whenever `power_status` changes.\n     *\n     * ```\n     * const [powerStatus] = jdunpack<[PowerPowerStatus]>(buf, \"u8\")\n     * ```\n     */\n    PowerStatusChanged = 0x3,\n}\n\nexport namespace PowerEventPack {\n    /**\n     * Pack format for 'power_status_changed' data.\n     */\n    export const PowerStatusChanged = \"u8\"\n}\n\n// Service Power supply constants\nexport const SRV_POWER_SUPPLY = 0x1f40375f\nexport enum PowerSupplyReg {\n    /**\n     * Read-write bool (uint8_t). Turns the power supply on with `true`, off with `false`.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-write V f64 (uint64_t). The current output voltage of the power supply. Values provided must be in the range `minimum_voltage` to `maximum_voltage`\n     *\n     * ```\n     * const [outputVoltage] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    OutputVoltage = 0x2,\n\n    /**\n     * Constant V f64 (uint64_t). The minimum output voltage of the power supply. For fixed power supplies, `minimum_voltage` should be equal to `maximum_voltage`.\n     *\n     * ```\n     * const [minimumVoltage] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    MinimumVoltage = 0x110,\n\n    /**\n     * Constant V f64 (uint64_t). The maximum output voltage of the power supply. For fixed power supplies, `minimum_voltage` should be equal to `maximum_voltage`.\n     *\n     * ```\n     * const [maximumVoltage] = jdunpack<[number]>(buf, \"f64\")\n     * ```\n     */\n    MaximumVoltage = 0x111,\n}\n\nexport namespace PowerSupplyRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'output_voltage' data.\n     */\n    export const OutputVoltage = \"f64\"\n\n    /**\n     * Pack format for 'minimum_voltage' data.\n     */\n    export const MinimumVoltage = \"f64\"\n\n    /**\n     * Pack format for 'maximum_voltage' data.\n     */\n    export const MaximumVoltage = \"f64\"\n}\n\n// Service Pressure Button constants\nexport const SRV_PRESSURE_BUTTON = 0x281740c3\nexport enum PressureButtonReg {\n    /**\n     * Read-write ratio u0.16 (uint16_t). Indicates the threshold for ``up`` events.\n     *\n     * ```\n     * const [threshold] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Threshold = 0x6,\n}\n\nexport namespace PressureButtonRegPack {\n    /**\n     * Pack format for 'threshold' data.\n     */\n    export const Threshold = \"u0.16\"\n}\n\n// Service Protocol Test constants\nexport const SRV_PROTO_TEST = 0x16c7466a\nexport enum ProtoTestReg {\n    /**\n     * Read-write bool (uint8_t). A read write bool register.\n     *\n     * ```\n     * const [rwBool] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    RwBool = 0x81,\n\n    /**\n     * Read-only bool (uint8_t). A read only bool register. Mirrors rw_bool.\n     *\n     * ```\n     * const [roBool] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    RoBool = 0x181,\n\n    /**\n     * Read-write uint32_t. A read write u32 register.\n     *\n     * ```\n     * const [rwU32] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    RwU32 = 0x82,\n\n    /**\n     * Read-only uint32_t. A read only u32 register.. Mirrors rw_u32.\n     *\n     * ```\n     * const [roU32] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    RoU32 = 0x182,\n\n    /**\n     * Read-write int32_t. A read write i32 register.\n     *\n     * ```\n     * const [rwI32] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    RwI32 = 0x83,\n\n    /**\n     * Read-only int32_t. A read only i32 register.. Mirrors rw_i32.\n     *\n     * ```\n     * const [roI32] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    RoI32 = 0x183,\n\n    /**\n     * Read-write string (bytes). A read write string register.\n     *\n     * ```\n     * const [rwString] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    RwString = 0x84,\n\n    /**\n     * Read-only string (bytes). A read only string register. Mirrors rw_string.\n     *\n     * ```\n     * const [roString] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    RoString = 0x184,\n\n    /**\n     * Read-write bytes. A read write string register.\n     *\n     * ```\n     * const [rwBytes] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    RwBytes = 0x85,\n\n    /**\n     * Read-only bytes. A read only string register. Mirrors ro_bytes.\n     *\n     * ```\n     * const [roBytes] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    RoBytes = 0x185,\n\n    /**\n     * A read write i8, u8, u16, i32 register.\n     *\n     * ```\n     * const [i8, u8, u16, i32] = jdunpack<[number, number, number, number]>(buf, \"i8 u8 u16 i32\")\n     * ```\n     */\n    RwI8U8U16I32 = 0x86,\n\n    /**\n     * A read only i8, u8, u16, i32 register.. Mirrors rw_i8_u8_u16_i32.\n     *\n     * ```\n     * const [i8, u8, u16, i32] = jdunpack<[number, number, number, number]>(buf, \"i8 u8 u16 i32\")\n     * ```\n     */\n    RoI8U8U16I32 = 0x186,\n\n    /**\n     * A read write u8, string register.\n     *\n     * ```\n     * const [u8, str] = jdunpack<[number, string]>(buf, \"u8 s\")\n     * ```\n     */\n    RwU8String = 0x87,\n\n    /**\n     * A read only u8, string register.. Mirrors rw_u8_string.\n     *\n     * ```\n     * const [u8, str] = jdunpack<[number, string]>(buf, \"u8 s\")\n     * ```\n     */\n    RoU8String = 0x187,\n}\n\nexport namespace ProtoTestRegPack {\n    /**\n     * Pack format for 'rw_bool' data.\n     */\n    export const RwBool = \"u8\"\n\n    /**\n     * Pack format for 'ro_bool' data.\n     */\n    export const RoBool = \"u8\"\n\n    /**\n     * Pack format for 'rw_u32' data.\n     */\n    export const RwU32 = \"u32\"\n\n    /**\n     * Pack format for 'ro_u32' data.\n     */\n    export const RoU32 = \"u32\"\n\n    /**\n     * Pack format for 'rw_i32' data.\n     */\n    export const RwI32 = \"i32\"\n\n    /**\n     * Pack format for 'ro_i32' data.\n     */\n    export const RoI32 = \"i32\"\n\n    /**\n     * Pack format for 'rw_string' data.\n     */\n    export const RwString = \"s\"\n\n    /**\n     * Pack format for 'ro_string' data.\n     */\n    export const RoString = \"s\"\n\n    /**\n     * Pack format for 'rw_bytes' data.\n     */\n    export const RwBytes = \"b\"\n\n    /**\n     * Pack format for 'ro_bytes' data.\n     */\n    export const RoBytes = \"b\"\n\n    /**\n     * Pack format for 'rw_i8_u8_u16_i32' data.\n     */\n    export const RwI8U8U16I32 = \"i8 u8 u16 i32\"\n\n    /**\n     * Pack format for 'ro_i8_u8_u16_i32' data.\n     */\n    export const RoI8U8U16I32 = \"i8 u8 u16 i32\"\n\n    /**\n     * Pack format for 'rw_u8_string' data.\n     */\n    export const RwU8String = \"u8 s\"\n\n    /**\n     * Pack format for 'ro_u8_string' data.\n     */\n    export const RoU8String = \"u8 s\"\n}\n\nexport enum ProtoTestEvent {\n    /**\n     * Argument: bo bool (uint8_t). An event raised when rw_bool is modified\n     *\n     * ```\n     * const [bo] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    EBool = 0x81,\n\n    /**\n     * Argument: u32 uint32_t. An event raised when rw_u32 is modified\n     *\n     * ```\n     * const [u32] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    EU32 = 0x82,\n\n    /**\n     * Argument: i32 int32_t. An event raised when rw_i32 is modified\n     *\n     * ```\n     * const [i32] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    EI32 = 0x83,\n\n    /**\n     * Argument: str string (bytes). An event raised when rw_string is modified\n     *\n     * ```\n     * const [str] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    EString = 0x84,\n\n    /**\n     * Argument: bytes bytes. An event raised when rw_bytes is modified\n     *\n     * ```\n     * const [bytes] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    EBytes = 0x85,\n\n    /**\n     * An event raised when rw_i8_u8_u16_i32 is modified\n     *\n     * ```\n     * const [i8, u8, u16, i32] = jdunpack<[number, number, number, number]>(buf, \"i8 u8 u16 i32\")\n     * ```\n     */\n    EI8U8U16I32 = 0x86,\n\n    /**\n     * An event raised when rw_u8_string is modified\n     *\n     * ```\n     * const [u8, str] = jdunpack<[number, string]>(buf, \"u8 s\")\n     * ```\n     */\n    EU8String = 0x87,\n}\n\nexport namespace ProtoTestEventPack {\n    /**\n     * Pack format for 'e_bool' data.\n     */\n    export const EBool = \"u8\"\n\n    /**\n     * Pack format for 'e_u32' data.\n     */\n    export const EU32 = \"u32\"\n\n    /**\n     * Pack format for 'e_i32' data.\n     */\n    export const EI32 = \"i32\"\n\n    /**\n     * Pack format for 'e_string' data.\n     */\n    export const EString = \"s\"\n\n    /**\n     * Pack format for 'e_bytes' data.\n     */\n    export const EBytes = \"b\"\n\n    /**\n     * Pack format for 'e_i8_u8_u16_i32' data.\n     */\n    export const EI8U8U16I32 = \"i8 u8 u16 i32\"\n\n    /**\n     * Pack format for 'e_u8_string' data.\n     */\n    export const EU8String = \"u8 s\"\n}\n\nexport enum ProtoTestCmd {\n    /**\n     * Argument: bo bool (uint8_t). A command to set rw_bool.\n     *\n     * ```\n     * const [bo] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    CBool = 0x81,\n\n    /**\n     * Argument: u32 uint32_t. A command to set rw_u32.\n     *\n     * ```\n     * const [u32] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    CU32 = 0x82,\n\n    /**\n     * Argument: i32 int32_t. A command to set rw_i32.\n     *\n     * ```\n     * const [i32] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    CI32 = 0x83,\n\n    /**\n     * Argument: str string (bytes). A command to set rw_string.\n     *\n     * ```\n     * const [str] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    CString = 0x84,\n\n    /**\n     * Argument: bytes bytes. A command to set rw_string.\n     *\n     * ```\n     * const [bytes] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    CBytes = 0x85,\n\n    /**\n     * A command to set rw_bytes.\n     *\n     * ```\n     * const [i8, u8, u16, i32] = jdunpack<[number, number, number, number]>(buf, \"i8 u8 u16 i32\")\n     * ```\n     */\n    CI8U8U16I32 = 0x86,\n\n    /**\n     * A command to set rw_u8_string.\n     *\n     * ```\n     * const [u8, str] = jdunpack<[number, string]>(buf, \"u8 s\")\n     * ```\n     */\n    CU8String = 0x87,\n\n    /**\n     * Argument: p_bytes pipe (bytes). A command to read the content of rw_bytes, byte per byte, as a pipe.\n     *\n     * ```\n     * const [pBytes] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    CReportPipe = 0x90,\n}\n\nexport namespace ProtoTestCmdPack {\n    /**\n     * Pack format for 'c_bool' data.\n     */\n    export const CBool = \"u8\"\n\n    /**\n     * Pack format for 'c_u32' data.\n     */\n    export const CU32 = \"u32\"\n\n    /**\n     * Pack format for 'c_i32' data.\n     */\n    export const CI32 = \"i32\"\n\n    /**\n     * Pack format for 'c_string' data.\n     */\n    export const CString = \"s\"\n\n    /**\n     * Pack format for 'c_bytes' data.\n     */\n    export const CBytes = \"b\"\n\n    /**\n     * Pack format for 'c_i8_u8_u16_i32' data.\n     */\n    export const CI8U8U16I32 = \"i8 u8 u16 i32\"\n\n    /**\n     * Pack format for 'c_u8_string' data.\n     */\n    export const CU8String = \"u8 s\"\n\n    /**\n     * Pack format for 'c_report_pipe' data.\n     */\n    export const CReportPipe = \"b[12]\"\n}\n\nexport enum ProtoTestPipe {}\n/**\n * pipe_report PBytes\n * ```\n * const [byte] = jdunpack<[number]>(buf, \"u8\")\n * ```\n */\n\nexport namespace ProtoTestPipePack {\n    /**\n     * Pack format for 'p_bytes' data.\n     */\n    export const PBytes = \"u8\"\n}\n\n// Service Proxy constants\nexport const SRV_PROXY = 0x16f19949\n// Service Pulse Oximeter constants\nexport const SRV_PULSE_OXIMETER = 0x10bb4eb6\nexport enum PulseOximeterReg {\n    /**\n     * Read-only % u8.8 (uint16_t). The estimated oxygen level in blood.\n     *\n     * ```\n     * const [oxygen] = jdunpack<[number]>(buf, \"u8.8\")\n     * ```\n     */\n    Oxygen = 0x101,\n\n    /**\n     * Read-only % u8.8 (uint16_t). The estimated error on the reported sensor data.\n     *\n     * ```\n     * const [oxygenError] = jdunpack<[number]>(buf, \"u8.8\")\n     * ```\n     */\n    OxygenError = 0x106,\n}\n\nexport namespace PulseOximeterRegPack {\n    /**\n     * Pack format for 'oxygen' data.\n     */\n    export const Oxygen = \"u8.8\"\n\n    /**\n     * Pack format for 'oxygen_error' data.\n     */\n    export const OxygenError = \"u8.8\"\n}\n\n// Service Rain gauge constants\nexport const SRV_RAIN_GAUGE = 0x13734c95\nexport enum RainGaugeReg {\n    /**\n     * Read-only mm u16.16 (uint32_t). Total precipitation recorded so far.\n     *\n     * ```\n     * const [precipitation] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Precipitation = 0x101,\n\n    /**\n     * Constant mm u16.16 (uint32_t). Typically the amount of rain needed for tipping the bucket.\n     *\n     * ```\n     * const [precipitationPrecision] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    PrecipitationPrecision = 0x108,\n}\n\nexport namespace RainGaugeRegPack {\n    /**\n     * Pack format for 'precipitation' data.\n     */\n    export const Precipitation = \"u16.16\"\n\n    /**\n     * Pack format for 'precipitation_precision' data.\n     */\n    export const PrecipitationPrecision = \"u16.16\"\n}\n\n// Service Real time clock constants\nexport const SRV_REAL_TIME_CLOCK = 0x1a8b1a28\n\nexport enum RealTimeClockVariant { // uint8_t\n    Computer = 0x1,\n    Crystal = 0x2,\n    Cuckoo = 0x3,\n}\n\nexport enum RealTimeClockReg {\n    /**\n     * Current time in 24h representation. Default streaming period is 1 second.\n     *\n     * ```\n     * const [year, month, dayOfMonth, dayOfWeek, hour, min, sec] = jdunpack<[number, number, number, number, number, number, number]>(buf, \"u16 u8 u8 u8 u8 u8 u8\")\n     * ```\n     */\n    LocalTime = 0x101,\n\n    /**\n     * Read-only s u16.16 (uint32_t). Time drift since the last call to the `set_time` command.\n     *\n     * ```\n     * const [drift] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Drift = 0x180,\n\n    /**\n     * Constant ppm u16.16 (uint32_t). Error on the clock, in parts per million of seconds.\n     *\n     * ```\n     * const [precision] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Precision = 0x181,\n\n    /**\n     * Constant Variant (uint8_t). The type of physical clock used by the sensor.\n     *\n     * ```\n     * const [variant] = jdunpack<[RealTimeClockVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace RealTimeClockRegPack {\n    /**\n     * Pack format for 'local_time' data.\n     */\n    export const LocalTime = \"u16 u8 u8 u8 u8 u8 u8\"\n\n    /**\n     * Pack format for 'drift' data.\n     */\n    export const Drift = \"u16.16\"\n\n    /**\n     * Pack format for 'precision' data.\n     */\n    export const Precision = \"u16.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\nexport enum RealTimeClockCmd {\n    /**\n     * Sets the current time and resets the error.\n     *\n     * ```\n     * const [year, month, dayOfMonth, dayOfWeek, hour, min, sec] = jdunpack<[number, number, number, number, number, number, number]>(buf, \"u16 u8 u8 u8 u8 u8 u8\")\n     * ```\n     */\n    SetTime = 0x80,\n}\n\nexport namespace RealTimeClockCmdPack {\n    /**\n     * Pack format for 'set_time' data.\n     */\n    export const SetTime = \"u16 u8 u8 u8 u8 u8 u8\"\n}\n\n// Service Reflected light constants\nexport const SRV_REFLECTED_LIGHT = 0x126c4cb2\n\nexport enum ReflectedLightVariant { // uint8_t\n    InfraredDigital = 0x1,\n    InfraredAnalog = 0x2,\n}\n\nexport enum ReflectedLightReg {\n    /**\n     * Read-only ratio u0.16 (uint16_t). Reports the reflected brightness. It may be a digital value or, for some sensor, analog value.\n     *\n     * ```\n     * const [brightness] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Brightness = 0x101,\n\n    /**\n     * Constant Variant (uint8_t). Type of physical sensor used\n     *\n     * ```\n     * const [variant] = jdunpack<[ReflectedLightVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace ReflectedLightRegPack {\n    /**\n     * Pack format for 'brightness' data.\n     */\n    export const Brightness = \"u0.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Relay constants\nexport const SRV_RELAY = 0x183fe656\n\nexport enum RelayVariant { // uint8_t\n    Electromechanical = 0x1,\n    SolidState = 0x2,\n    Reed = 0x3,\n}\n\nexport enum RelayReg {\n    /**\n     * Read-write bool (uint8_t). Indicates whether the relay circuit is currently energized or not.\n     *\n     * ```\n     * const [active] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Active = 0x1,\n\n    /**\n     * Constant Variant (uint8_t). Describes the type of relay used.\n     *\n     * ```\n     * const [variant] = jdunpack<[RelayVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n\n    /**\n     * Constant mA uint32_t. Maximum switching current for a resistive load.\n     *\n     * ```\n     * const [maxSwitchingCurrent] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    MaxSwitchingCurrent = 0x180,\n}\n\nexport namespace RelayRegPack {\n    /**\n     * Pack format for 'active' data.\n     */\n    export const Active = \"u8\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n\n    /**\n     * Pack format for 'max_switching_current' data.\n     */\n    export const MaxSwitchingCurrent = \"u32\"\n}\n\n// Service Random Number Generator constants\nexport const SRV_RNG = 0x1789f0a2\n\nexport enum RngVariant { // uint8_t\n    Quantum = 0x1,\n    ADCNoise = 0x2,\n    WebCrypto = 0x3,\n}\n\nexport enum RngReg {\n    /**\n     * Read-only bytes. A register that returns a 64 bytes random buffer on every request.\n     * This never blocks for a long time. If you need additional random bytes, keep querying the register.\n     *\n     * ```\n     * const [random] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Random = 0x180,\n\n    /**\n     * Constant Variant (uint8_t). The type of algorithm/technique used to generate the number.\n     * `Quantum` refers to dedicated hardware device generating random noise due to quantum effects.\n     * `ADCNoise` is the noise from quick readings of analog-digital converter, which reads temperature of the MCU or some floating pin.\n     * `WebCrypto` refers is used in simulators, where the source of randomness comes from an advanced operating system.\n     *\n     * ```\n     * const [variant] = jdunpack<[RngVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace RngRegPack {\n    /**\n     * Pack format for 'random' data.\n     */\n    export const Random = \"b\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Role Manager constants\nexport const SRV_ROLE_MANAGER = 0x1e4b7e66\nexport enum RoleManagerReg {\n    /**\n     * Read-write bool (uint8_t). Normally, if some roles are unfilled, and there are idle services that can fulfill them,\n     * the brain device will assign roles (bind) automatically.\n     * Such automatic assignment happens every second or so, and is trying to be smart about\n     * co-locating roles that share \"host\" (part before first slash),\n     * as well as reasonably stable assignments.\n     * Once user start assigning roles manually using this service, auto-binding should be disabled to avoid confusion.\n     *\n     * ```\n     * const [autoBind] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    AutoBind = 0x80,\n\n    /**\n     * Read-only bool (uint8_t). Indicates if all required roles have been allocated to devices.\n     *\n     * ```\n     * const [allRolesAllocated] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    AllRolesAllocated = 0x181,\n}\n\nexport namespace RoleManagerRegPack {\n    /**\n     * Pack format for 'auto_bind' data.\n     */\n    export const AutoBind = \"u8\"\n\n    /**\n     * Pack format for 'all_roles_allocated' data.\n     */\n    export const AllRolesAllocated = \"u8\"\n}\n\nexport enum RoleManagerCmd {\n    /**\n     * Set role. Can set to empty to remove role binding.\n     *\n     * ```\n     * const [deviceId, serviceIdx, role] = jdunpack<[Uint8Array, number, string]>(buf, \"b[8] u8 s\")\n     * ```\n     */\n    SetRole = 0x81,\n\n    /**\n     * No args. Remove all role bindings.\n     */\n    ClearAllRoles = 0x84,\n\n    /**\n     * Argument: roles pipe (bytes). List all roles and bindings required by the current program. `device_id` and `service_idx` are `0` if role is unbound.\n     *\n     * ```\n     * const [roles] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    ListRoles = 0x83,\n}\n\nexport namespace RoleManagerCmdPack {\n    /**\n     * Pack format for 'set_role' data.\n     */\n    export const SetRole = \"b[8] u8 s\"\n\n    /**\n     * Pack format for 'list_roles' data.\n     */\n    export const ListRoles = \"b[12]\"\n}\n\nexport enum RoleManagerPipe {}\n/**\n * pipe_report Roles\n * ```\n * const [deviceId, serviceClass, serviceIdx, role] = jdunpack<[Uint8Array, number, number, string]>(buf, \"b[8] u32 u8 s\")\n * ```\n */\n\nexport namespace RoleManagerPipePack {\n    /**\n     * Pack format for 'roles' data.\n     */\n    export const Roles = \"b[8] u32 u8 s\"\n}\n\nexport enum RoleManagerEvent {\n    /**\n     * Notifies that role bindings have changed.\n     */\n    Change = 0x3,\n}\n\n// Service ROS constants\nexport const SRV_ROS = 0x1524f42c\nexport enum RosCmd {\n    /**\n     * Publishes a JSON-encoded message to the given topic.\n     *\n     * ```\n     * const [node, topic, message] = jdunpack<[string, string, string]>(buf, \"z z s\")\n     * ```\n     */\n    PublishMessage = 0x81,\n\n    /**\n     * Subscribes to a message topic. Subscribed topics will emit message reports.\n     *\n     * ```\n     * const [node, topic] = jdunpack<[string, string]>(buf, \"z s\")\n     * ```\n     */\n    SubscribeMessage = 0x82,\n\n    /**\n     * A message published on the bus. Message is JSON encoded.\n     *\n     * ```\n     * const [node, topic, message] = jdunpack<[string, string, string]>(buf, \"z z s\")\n     * ```\n     */\n    Message = 0x83,\n}\n\nexport namespace RosCmdPack {\n    /**\n     * Pack format for 'publish_message' data.\n     */\n    export const PublishMessage = \"z z s\"\n\n    /**\n     * Pack format for 'subscribe_message' data.\n     */\n    export const SubscribeMessage = \"z s\"\n\n    /**\n     * Pack format for 'message' data.\n     */\n    export const Message = \"z z s\"\n}\n\n// Service Rotary encoder constants\nexport const SRV_ROTARY_ENCODER = 0x10fa29c9\nexport enum RotaryEncoderReg {\n    /**\n     * Read-only # int32_t. Upon device reset starts at `0` (regardless of the shaft position).\n     * Increases by `1` for a clockwise \"click\", by `-1` for counter-clockwise.\n     *\n     * ```\n     * const [position] = jdunpack<[number]>(buf, \"i32\")\n     * ```\n     */\n    Position = 0x101,\n\n    /**\n     * Constant # uint16_t. This specifies by how much `position` changes when the crank does 360 degree turn. Typically 12 or 24.\n     *\n     * ```\n     * const [clicksPerTurn] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    ClicksPerTurn = 0x180,\n\n    /**\n     * Constant bool (uint8_t). The encoder is combined with a clicker. If this is the case, the clicker button service\n     * should follow this service in the service list of the device.\n     *\n     * ```\n     * const [clicker] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Clicker = 0x181,\n}\n\nexport namespace RotaryEncoderRegPack {\n    /**\n     * Pack format for 'position' data.\n     */\n    export const Position = \"i32\"\n\n    /**\n     * Pack format for 'clicks_per_turn' data.\n     */\n    export const ClicksPerTurn = \"u16\"\n\n    /**\n     * Pack format for 'clicker' data.\n     */\n    export const Clicker = \"u8\"\n}\n\n// Service Rover constants\nexport const SRV_ROVER = 0x19f4d06b\nexport enum RoverReg {\n    /**\n     * The current position and orientation of the robot.\n     *\n     * ```\n     * const [x, y, vx, vy, heading] = jdunpack<[number, number, number, number, number]>(buf, \"i16.16 i16.16 i16.16 i16.16 i16.16\")\n     * ```\n     */\n    Kinematics = 0x101,\n}\n\nexport namespace RoverRegPack {\n    /**\n     * Pack format for 'kinematics' data.\n     */\n    export const Kinematics = \"i16.16 i16.16 i16.16 i16.16 i16.16\"\n}\n\n// Service Satellite Navigation System constants\nexport const SRV_SAT_NAV = 0x19dd6136\nexport enum SatNavReg {\n    /**\n     * Reported coordinates, geometric altitude and time of position. Altitude accuracy is 0 if not available.\n     *\n     * ```\n     * const [timestamp, latitude, longitude, accuracy, altitude, altitudeAccuracy] = jdunpack<[number, number, number, number, number, number]>(buf, \"u64 i9.23 i9.23 u16.16 i26.6 u16.16\")\n     * ```\n     */\n    Position = 0x101,\n\n    /**\n     * Read-write bool (uint8_t). Enables or disables the GPS module\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n}\n\nexport namespace SatNavRegPack {\n    /**\n     * Pack format for 'position' data.\n     */\n    export const Position = \"u64 i9.23 i9.23 u16.16 i26.6 u16.16\"\n\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n}\n\nexport enum SatNavEvent {\n    /**\n     * The module is disabled or lost connection with satellites.\n     */\n    Inactive = 0x2,\n}\n\n// Service Sensor Aggregator constants\nexport const SRV_SENSOR_AGGREGATOR = 0x1d90e1c5\n\nexport enum SensorAggregatorSampleType { // uint8_t\n    U8 = 0x8,\n    I8 = 0x88,\n    U16 = 0x10,\n    I16 = 0x90,\n    U32 = 0x20,\n    I32 = 0xa0,\n}\n\nexport enum SensorAggregatorReg {\n    /**\n     * Set automatic input collection.\n     * These settings are stored in flash.\n     *\n     * ```\n     * const [samplingInterval, samplesInWindow, rest] = jdunpack<[number, number, ([Uint8Array, number, number, number, SensorAggregatorSampleType, number])[]]>(buf, \"u16 u16 x[4] r: b[8] u32 u8 u8 u8 i8\")\n     * const [deviceId, serviceClass, serviceNum, sampleSize, sampleType, sampleShift] = rest[0]\n     * ```\n     */\n    Inputs = 0x80,\n\n    /**\n     * Read-only uint32_t. Number of input samples collected so far.\n     *\n     * ```\n     * const [numSamples] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    NumSamples = 0x180,\n\n    /**\n     * Read-only B uint8_t. Size of a single sample.\n     *\n     * ```\n     * const [sampleSize] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    SampleSize = 0x181,\n\n    /**\n     * Read-write # uint32_t. When set to `N`, will stream `N` samples as `current_sample` reading.\n     *\n     * ```\n     * const [streamingSamples] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    StreamingSamples = 0x81,\n\n    /**\n     * Read-only bytes. Last collected sample.\n     *\n     * ```\n     * const [currentSample] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    CurrentSample = 0x101,\n}\n\nexport namespace SensorAggregatorRegPack {\n    /**\n     * Pack format for 'inputs' data.\n     */\n    export const Inputs = \"u16 u16 u32 r: b[8] u32 u8 u8 u8 i8\"\n\n    /**\n     * Pack format for 'num_samples' data.\n     */\n    export const NumSamples = \"u32\"\n\n    /**\n     * Pack format for 'sample_size' data.\n     */\n    export const SampleSize = \"u8\"\n\n    /**\n     * Pack format for 'streaming_samples' data.\n     */\n    export const StreamingSamples = \"u32\"\n\n    /**\n     * Pack format for 'current_sample' data.\n     */\n    export const CurrentSample = \"b\"\n}\n\n// Service Serial constants\nexport const SRV_SERIAL = 0x11bae5c4\n\nexport enum SerialParityType { // uint8_t\n    None = 0x0,\n    Even = 0x1,\n    Odd = 0x2,\n}\n\nexport enum SerialReg {\n    /**\n     * Read-write bool (uint8_t). Indicates if the serial connection is active.\n     *\n     * ```\n     * const [connected] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Connected = 0x1,\n\n    /**\n     * Read-only string (bytes). User-friendly name of the connection.\n     *\n     * ```\n     * const [connectionName] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ConnectionName = 0x181,\n\n    /**\n     * Read-write baud uint32_t. A positive, non-zero value indicating the baud rate at which serial communication is be established.\n     *\n     * ```\n     * const [baudRate] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    BaudRate = 0x80,\n\n    /**\n     * Read-write uint8_t. The number of data bits per frame. Either 7 or 8.\n     *\n     * ```\n     * const [dataBits] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    DataBits = 0x81,\n\n    /**\n     * Read-write # uint8_t. The number of stop bits at the end of a frame. Either 1 or 2.\n     *\n     * ```\n     * const [stopBits] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    StopBits = 0x82,\n\n    /**\n     * Read-write ParityType (uint8_t). The parity mode.\n     *\n     * ```\n     * const [parityMode] = jdunpack<[SerialParityType]>(buf, \"u8\")\n     * ```\n     */\n    ParityMode = 0x83,\n\n    /**\n     * Read-write # uint8_t. A positive, non-zero value indicating the size of the read and write buffers that should be created.\n     *\n     * ```\n     * const [bufferSize] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    BufferSize = 0x84,\n}\n\nexport namespace SerialRegPack {\n    /**\n     * Pack format for 'connected' data.\n     */\n    export const Connected = \"u8\"\n\n    /**\n     * Pack format for 'connection_name' data.\n     */\n    export const ConnectionName = \"s\"\n\n    /**\n     * Pack format for 'baud_rate' data.\n     */\n    export const BaudRate = \"u32\"\n\n    /**\n     * Pack format for 'data_bits' data.\n     */\n    export const DataBits = \"u8\"\n\n    /**\n     * Pack format for 'stop_bits' data.\n     */\n    export const StopBits = \"u8\"\n\n    /**\n     * Pack format for 'parity_mode' data.\n     */\n    export const ParityMode = \"u8\"\n\n    /**\n     * Pack format for 'buffer_size' data.\n     */\n    export const BufferSize = \"u8\"\n}\n\nexport enum SerialCmd {\n    /**\n     * Argument: data bytes. Send a buffer of data over the serial transport.\n     *\n     * ```\n     * const [data] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Send = 0x80,\n\n    /**\n     * Argument: data bytes. Raised when a buffer of data is received.\n     *\n     * ```\n     * const [data] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Received = 0x80,\n}\n\nexport namespace SerialCmdPack {\n    /**\n     * Pack format for 'send' data.\n     */\n    export const Send = \"b\"\n\n    /**\n     * Pack format for 'received' data.\n     */\n    export const Received = \"b\"\n}\n\n// Service Servo constants\nexport const SRV_SERVO = 0x12fc9103\nexport enum ServoReg {\n    /**\n     * Read-write \u00B0 i16.16 (int32_t). Specifies the angle of the arm (request).\n     *\n     * ```\n     * const [angle] = jdunpack<[number]>(buf, \"i16.16\")\n     * ```\n     */\n    Angle = 0x2,\n\n    /**\n     * Read-write bool (uint8_t). Turn the power to the servo on/off.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-write \u00B0 i16.16 (int32_t). Correction applied to the angle to account for the servo arm drift.\n     *\n     * ```\n     * const [offset] = jdunpack<[number]>(buf, \"i16.16\")\n     * ```\n     */\n    Offset = 0x81,\n\n    /**\n     * Constant \u00B0 i16.16 (int32_t). Lowest angle that can be set, typically 0 \u00B0.\n     *\n     * ```\n     * const [minAngle] = jdunpack<[number]>(buf, \"i16.16\")\n     * ```\n     */\n    MinAngle = 0x110,\n\n    /**\n     * Read-write \u03BCs uint16_t. The length of pulse corresponding to lowest angle.\n     *\n     * ```\n     * const [minPulse] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    MinPulse = 0x83,\n\n    /**\n     * Constant \u00B0 i16.16 (int32_t). Highest angle that can be set, typically 180\u00B0.\n     *\n     * ```\n     * const [maxAngle] = jdunpack<[number]>(buf, \"i16.16\")\n     * ```\n     */\n    MaxAngle = 0x111,\n\n    /**\n     * Read-write \u03BCs uint16_t. The length of pulse corresponding to highest angle.\n     *\n     * ```\n     * const [maxPulse] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    MaxPulse = 0x85,\n\n    /**\n     * Constant kg/cm u16.16 (uint32_t). The servo motor will stop rotating when it is trying to move a `stall_torque` weight at a radial distance of `1.0` cm.\n     *\n     * ```\n     * const [stallTorque] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    StallTorque = 0x180,\n\n    /**\n     * Constant s/60\u00B0 u16.16 (uint32_t). Time to move 60\u00B0.\n     *\n     * ```\n     * const [responseSpeed] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    ResponseSpeed = 0x181,\n\n    /**\n     * Read-only \u00B0 i16.16 (int32_t). The current physical position of the arm, if the device has a way to sense the position.\n     *\n     * ```\n     * const [actualAngle] = jdunpack<[number]>(buf, \"i16.16\")\n     * ```\n     */\n    ActualAngle = 0x101,\n}\n\nexport namespace ServoRegPack {\n    /**\n     * Pack format for 'angle' data.\n     */\n    export const Angle = \"i16.16\"\n\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'offset' data.\n     */\n    export const Offset = \"i16.16\"\n\n    /**\n     * Pack format for 'min_angle' data.\n     */\n    export const MinAngle = \"i16.16\"\n\n    /**\n     * Pack format for 'min_pulse' data.\n     */\n    export const MinPulse = \"u16\"\n\n    /**\n     * Pack format for 'max_angle' data.\n     */\n    export const MaxAngle = \"i16.16\"\n\n    /**\n     * Pack format for 'max_pulse' data.\n     */\n    export const MaxPulse = \"u16\"\n\n    /**\n     * Pack format for 'stall_torque' data.\n     */\n    export const StallTorque = \"u16.16\"\n\n    /**\n     * Pack format for 'response_speed' data.\n     */\n    export const ResponseSpeed = \"u16.16\"\n\n    /**\n     * Pack format for 'actual_angle' data.\n     */\n    export const ActualAngle = \"i16.16\"\n}\n\n// Service Settings constants\nexport const SRV_SETTINGS = 0x1107dc4a\nexport enum SettingsCmd {\n    /**\n     * Argument: key string (bytes). Get the value of given setting. If no such entry exists, the value returned is empty.\n     *\n     * ```\n     * const [key] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Get = 0x80,\n\n    /**\n     * report Get\n     * ```\n     * const [key, value] = jdunpack<[string, Uint8Array]>(buf, \"z b\")\n     * ```\n     */\n\n    /**\n     * Set the value of a given setting.\n     *\n     * ```\n     * const [key, value] = jdunpack<[string, Uint8Array]>(buf, \"z b\")\n     * ```\n     */\n    Set = 0x81,\n\n    /**\n     * Argument: key string (bytes). Delete a given setting.\n     *\n     * ```\n     * const [key] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Delete = 0x84,\n\n    /**\n     * Argument: results pipe (bytes). Return keys of all settings.\n     *\n     * ```\n     * const [results] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    ListKeys = 0x82,\n\n    /**\n     * Argument: results pipe (bytes). Return keys and values of all settings.\n     *\n     * ```\n     * const [results] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    List = 0x83,\n\n    /**\n     * No args. Clears all keys.\n     */\n    Clear = 0x85,\n}\n\nexport namespace SettingsCmdPack {\n    /**\n     * Pack format for 'get' data.\n     */\n    export const Get = \"s\"\n\n    /**\n     * Pack format for 'get' data.\n     */\n    export const GetReport = \"z b\"\n\n    /**\n     * Pack format for 'set' data.\n     */\n    export const Set = \"z b\"\n\n    /**\n     * Pack format for 'delete' data.\n     */\n    export const Delete = \"s\"\n\n    /**\n     * Pack format for 'list_keys' data.\n     */\n    export const ListKeys = \"b[12]\"\n\n    /**\n     * Pack format for 'list' data.\n     */\n    export const List = \"b[12]\"\n}\n\nexport enum SettingsPipe {}\n/**\n * pipe_report ListedKey\n * ```\n * const [key] = jdunpack<[string]>(buf, \"s\")\n * ```\n */\n\n/**\n * pipe_report ListedEntry\n * ```\n * const [key, value] = jdunpack<[string, Uint8Array]>(buf, \"z b\")\n * ```\n */\n\nexport namespace SettingsPipePack {\n    /**\n     * Pack format for 'listed_key' data.\n     */\n    export const ListedKey = \"s\"\n\n    /**\n     * Pack format for 'listed_entry' data.\n     */\n    export const ListedEntry = \"z b\"\n}\n\nexport enum SettingsEvent {\n    /**\n     * Notifies that some setting have been modified.\n     */\n    Change = 0x3,\n}\n\n// Service 7-segment display constants\nexport const SRV_SEVEN_SEGMENT_DISPLAY = 0x196158f7\nexport enum SevenSegmentDisplayReg {\n    /**\n     * Read-write bytes. Each byte encodes the display status of a digit using,\n     * where lowest bit 0 encodes segment `A`, bit 1 encodes segments `B`, ..., bit 6 encodes segments `G`, and bit 7 encodes the decimal point (if present).\n     * If incoming `digits` data is smaller than `digit_count`, the remaining digits will be cleared.\n     * Thus, sending an empty `digits` payload clears the screen.\n     *\n     * ```\n     * const [digits] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Digits = 0x2,\n\n    /**\n     * Read-write ratio u0.16 (uint16_t). Controls the brightness of the LEDs. `0` means off.\n     *\n     * ```\n     * const [brightness] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Brightness = 0x1,\n\n    /**\n     * Read-write bool (uint8_t). Turn on or off the column LEDs (separating minutes from hours, etc.) in of the segment.\n     * If the column LEDs is not supported, the value remains false.\n     *\n     * ```\n     * const [doubleDots] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    DoubleDots = 0x80,\n\n    /**\n     * Constant uint8_t. The number of digits available on the display.\n     *\n     * ```\n     * const [digitCount] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    DigitCount = 0x180,\n\n    /**\n     * Constant bool (uint8_t). True if decimal points are available (on all digits).\n     *\n     * ```\n     * const [decimalPoint] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    DecimalPoint = 0x181,\n}\n\nexport namespace SevenSegmentDisplayRegPack {\n    /**\n     * Pack format for 'digits' data.\n     */\n    export const Digits = \"b\"\n\n    /**\n     * Pack format for 'brightness' data.\n     */\n    export const Brightness = \"u0.16\"\n\n    /**\n     * Pack format for 'double_dots' data.\n     */\n    export const DoubleDots = \"u8\"\n\n    /**\n     * Pack format for 'digit_count' data.\n     */\n    export const DigitCount = \"u8\"\n\n    /**\n     * Pack format for 'decimal_point' data.\n     */\n    export const DecimalPoint = \"u8\"\n}\n\nexport enum SevenSegmentDisplayCmd {\n    /**\n     * Argument: value f64 (uint64_t). Shows the number on the screen using the decimal dot if available.\n     */\n    SetNumber = 0x80,\n}\n\nexport namespace SevenSegmentDisplayCmdPack {\n    /**\n     * Pack format for 'set_number' data.\n     */\n    export const SetNumber = \"f64\"\n}\n\n// Service Soil moisture constants\nexport const SRV_SOIL_MOISTURE = 0x1d4aa3b3\n\nexport enum SoilMoistureVariant { // uint8_t\n    Resistive = 0x1,\n    Capacitive = 0x2,\n}\n\nexport enum SoilMoistureReg {\n    /**\n     * Read-only ratio u0.16 (uint16_t). Indicates the wetness of the soil, from `dry` to `wet`.\n     *\n     * ```\n     * const [moisture] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Moisture = 0x101,\n\n    /**\n     * Read-only ratio u0.16 (uint16_t). The error on the moisture reading.\n     *\n     * ```\n     * const [moistureError] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    MoistureError = 0x106,\n\n    /**\n     * Constant Variant (uint8_t). Describe the type of physical sensor.\n     *\n     * ```\n     * const [variant] = jdunpack<[SoilMoistureVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace SoilMoistureRegPack {\n    /**\n     * Pack format for 'moisture' data.\n     */\n    export const Moisture = \"u0.16\"\n\n    /**\n     * Pack format for 'moisture_error' data.\n     */\n    export const MoistureError = \"u0.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Solenoid constants\nexport const SRV_SOLENOID = 0x171723ca\n\nexport enum SolenoidVariant { // uint8_t\n    PushPull = 0x1,\n    Valve = 0x2,\n    Latch = 0x3,\n}\n\nexport enum SolenoidReg {\n    /**\n     * Read-write bool (uint8_t). Indicates whether the solenoid is energized and pulled (on) or pushed (off).\n     *\n     * ```\n     * const [pulled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Pulled = 0x1,\n\n    /**\n     * Constant Variant (uint8_t). Describes the type of solenoid used.\n     *\n     * ```\n     * const [variant] = jdunpack<[SolenoidVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace SolenoidRegPack {\n    /**\n     * Pack format for 'pulled' data.\n     */\n    export const Pulled = \"u8\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Sound level constants\nexport const SRV_SOUND_LEVEL = 0x14ad1a5d\nexport enum SoundLevelReg {\n    /**\n     * Read-only ratio u0.16 (uint16_t). The sound level detected by the microphone\n     *\n     * ```\n     * const [soundLevel] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    SoundLevel = 0x101,\n\n    /**\n     * Read-write bool (uint8_t). Turn on or off the microphone.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-write ratio u0.16 (uint16_t). Set level at which the `loud` event is generated.\n     *\n     * ```\n     * const [loudThreshold] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    LoudThreshold = 0x6,\n\n    /**\n     * Read-write ratio u0.16 (uint16_t). Set level at which the `quiet` event is generated.\n     *\n     * ```\n     * const [quietThreshold] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    QuietThreshold = 0x5,\n}\n\nexport namespace SoundLevelRegPack {\n    /**\n     * Pack format for 'sound_level' data.\n     */\n    export const SoundLevel = \"u0.16\"\n\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'loud_threshold' data.\n     */\n    export const LoudThreshold = \"u0.16\"\n\n    /**\n     * Pack format for 'quiet_threshold' data.\n     */\n    export const QuietThreshold = \"u0.16\"\n}\n\nexport enum SoundLevelEvent {\n    /**\n     * Generated when a loud sound is detected.\n     */\n    Loud = 0x1,\n\n    /**\n     * Generated low level of sound is detected.\n     */\n    Quiet = 0x2,\n}\n\n// Service Sound player constants\nexport const SRV_SOUND_PLAYER = 0x1403d338\nexport enum SoundPlayerReg {\n    /**\n     * Read-write ratio u0.16 (uint16_t). Global volume of the output. ``0`` means completely off. This volume is mixed with each play volumes.\n     *\n     * ```\n     * const [volume] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Volume = 0x1,\n}\n\nexport namespace SoundPlayerRegPack {\n    /**\n     * Pack format for 'volume' data.\n     */\n    export const Volume = \"u0.16\"\n}\n\nexport enum SoundPlayerCmd {\n    /**\n     * Argument: name string (bytes). Starts playing a sound.\n     *\n     * ```\n     * const [name] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Play = 0x80,\n\n    /**\n     * No args. Cancel any sound playing.\n     */\n    Cancel = 0x81,\n\n    /**\n     * Argument: sounds_port pipe (bytes). Returns the list of sounds available to play.\n     *\n     * ```\n     * const [soundsPort] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    ListSounds = 0x82,\n}\n\nexport namespace SoundPlayerCmdPack {\n    /**\n     * Pack format for 'play' data.\n     */\n    export const Play = \"s\"\n\n    /**\n     * Pack format for 'list_sounds' data.\n     */\n    export const ListSounds = \"b[12]\"\n}\n\nexport enum SoundPlayerPipe {}\n/**\n * pipe_report ListSoundsPipe\n * ```\n * const [duration, name] = jdunpack<[number, string]>(buf, \"u32 s\")\n * ```\n */\n\nexport namespace SoundPlayerPipePack {\n    /**\n     * Pack format for 'list_sounds_pipe' data.\n     */\n    export const ListSoundsPipe = \"u32 s\"\n}\n\n// Service Sound Recorder with Playback constants\nexport const SRV_SOUND_RECORDER_WITH_PLAYBACK = 0x1b72bf50\n\nexport enum SoundRecorderWithPlaybackStatus { // uint8_t\n    Idle = 0x0,\n    Recording = 0x1,\n    Playing = 0x2,\n}\n\nexport enum SoundRecorderWithPlaybackCmd {\n    /**\n     * No args. Replay recorded audio.\n     */\n    Play = 0x80,\n\n    /**\n     * Argument: duration ms uint16_t. Record audio for N milliseconds.\n     *\n     * ```\n     * const [duration] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Record = 0x81,\n\n    /**\n     * No args. Cancel record, the `time` register will be updated by already cached data.\n     */\n    Cancel = 0x82,\n}\n\nexport namespace SoundRecorderWithPlaybackCmdPack {\n    /**\n     * Pack format for 'record' data.\n     */\n    export const Record = \"u16\"\n}\n\nexport enum SoundRecorderWithPlaybackReg {\n    /**\n     * Read-only Status (uint8_t). Indicate the current status\n     *\n     * ```\n     * const [status] = jdunpack<[SoundRecorderWithPlaybackStatus]>(buf, \"u8\")\n     * ```\n     */\n    Status = 0x180,\n\n    /**\n     * Read-only ms uint16_t. Milliseconds of audio recorded.\n     *\n     * ```\n     * const [time] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    Time = 0x181,\n\n    /**\n     * Read-write ratio u0.8 (uint8_t). Playback volume control\n     *\n     * ```\n     * const [volume] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    Volume = 0x1,\n}\n\nexport namespace SoundRecorderWithPlaybackRegPack {\n    /**\n     * Pack format for 'status' data.\n     */\n    export const Status = \"u8\"\n\n    /**\n     * Pack format for 'time' data.\n     */\n    export const Time = \"u16\"\n\n    /**\n     * Pack format for 'volume' data.\n     */\n    export const Volume = \"u0.8\"\n}\n\n// Service Sound Spectrum constants\nexport const SRV_SOUND_SPECTRUM = 0x157abc1e\nexport enum SoundSpectrumReg {\n    /**\n     * Read-only bytes. The computed frequency data.\n     *\n     * ```\n     * const [frequencyBins] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    FrequencyBins = 0x101,\n\n    /**\n     * Read-write bool (uint8_t). Turns on/off the micropohone.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-write uint8_t. The power of 2 used as the size of the FFT to be used to determine the frequency domain.\n     *\n     * ```\n     * const [fftPow2Size] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    FftPow2Size = 0x80,\n\n    /**\n     * Read-write dB int16_t. The minimum power value in the scaling range for the FFT analysis data\n     *\n     * ```\n     * const [minDecibels] = jdunpack<[number]>(buf, \"i16\")\n     * ```\n     */\n    MinDecibels = 0x81,\n\n    /**\n     * Read-write dB int16_t. The maximum power value in the scaling range for the FFT analysis data\n     *\n     * ```\n     * const [maxDecibels] = jdunpack<[number]>(buf, \"i16\")\n     * ```\n     */\n    MaxDecibels = 0x82,\n\n    /**\n     * Read-write ratio u0.8 (uint8_t). The averaging constant with the last analysis frame.\n     * If `0` is set, there is no averaging done, whereas a value of `1` means \"overlap the previous and current buffer quite a lot while computing the value\".\n     *\n     * ```\n     * const [smoothingTimeConstant] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    SmoothingTimeConstant = 0x83,\n}\n\nexport namespace SoundSpectrumRegPack {\n    /**\n     * Pack format for 'frequency_bins' data.\n     */\n    export const FrequencyBins = \"b\"\n\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'fft_pow2_size' data.\n     */\n    export const FftPow2Size = \"u8\"\n\n    /**\n     * Pack format for 'min_decibels' data.\n     */\n    export const MinDecibels = \"i16\"\n\n    /**\n     * Pack format for 'max_decibels' data.\n     */\n    export const MaxDecibels = \"i16\"\n\n    /**\n     * Pack format for 'smoothing_time_constant' data.\n     */\n    export const SmoothingTimeConstant = \"u0.8\"\n}\n\n// Service Speech synthesis constants\nexport const SRV_SPEECH_SYNTHESIS = 0x1204d995\nexport enum SpeechSynthesisReg {\n    /**\n     * Read-write bool (uint8_t). Determines if the speech engine is in a non-paused state.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-write string (bytes). Language used for utterances as defined in https://www.ietf.org/rfc/bcp/bcp47.txt.\n     *\n     * ```\n     * const [lang] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Lang = 0x80,\n\n    /**\n     * Read-write ratio u0.8 (uint8_t). Volume for utterances.\n     *\n     * ```\n     * const [volume] = jdunpack<[number]>(buf, \"u0.8\")\n     * ```\n     */\n    Volume = 0x81,\n\n    /**\n     * Read-write u16.16 (uint32_t). Pitch for utterances\n     *\n     * ```\n     * const [pitch] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Pitch = 0x82,\n\n    /**\n     * Read-write u16.16 (uint32_t). Rate for utterances\n     *\n     * ```\n     * const [rate] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Rate = 0x83,\n}\n\nexport namespace SpeechSynthesisRegPack {\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'lang' data.\n     */\n    export const Lang = \"s\"\n\n    /**\n     * Pack format for 'volume' data.\n     */\n    export const Volume = \"u0.8\"\n\n    /**\n     * Pack format for 'pitch' data.\n     */\n    export const Pitch = \"u16.16\"\n\n    /**\n     * Pack format for 'rate' data.\n     */\n    export const Rate = \"u16.16\"\n}\n\nexport enum SpeechSynthesisCmd {\n    /**\n     * Argument: text string (bytes). Adds an utterance to the utterance queue; it will be spoken when any other utterances queued before it have been spoken.\n     *\n     * ```\n     * const [text] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Speak = 0x80,\n\n    /**\n     * No args. Cancels current utterance and all utterances from the utterance queue.\n     */\n    Cancel = 0x81,\n}\n\nexport namespace SpeechSynthesisCmdPack {\n    /**\n     * Pack format for 'speak' data.\n     */\n    export const Speak = \"s\"\n}\n\n// Service Switch constants\nexport const SRV_SWITCH = 0x1ad29402\n\nexport enum SwitchVariant { // uint8_t\n    Slide = 0x1,\n    Tilt = 0x2,\n    PushButton = 0x3,\n    Tactile = 0x4,\n    Toggle = 0x5,\n    Proximity = 0x6,\n    Magnetic = 0x7,\n    FootButton = 0x8,\n}\n\nexport enum SwitchReg {\n    /**\n     * Read-only bool (uint8_t). Indicates whether the switch is currently active (on).\n     *\n     * ```\n     * const [active] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Active = 0x101,\n\n    /**\n     * Constant Variant (uint8_t). Describes the type of switch used.\n     *\n     * ```\n     * const [variant] = jdunpack<[SwitchVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace SwitchRegPack {\n    /**\n     * Pack format for 'active' data.\n     */\n    export const Active = \"u8\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\nexport enum SwitchEvent {\n    /**\n     * Emitted when switch goes from `off` to `on`.\n     */\n    On = 0x1,\n\n    /**\n     * Emitted when switch goes from `on` to `off`.\n     */\n    Off = 0x2,\n}\n\n// Service TCP constants\nexport const SRV_TCP = 0x1b43b70b\n\nexport enum TcpTcpError { // int32_t\n    InvalidCommand = 0x1,\n    InvalidCommandPayload = 0x2,\n}\n\nexport enum TcpCmd {\n    /**\n     * Argument: inbound pipe (bytes). Open pair of pipes between network peripheral and a controlling device. In/outbound refers to direction from/to internet.\n     *\n     * ```\n     * const [inbound] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    Open = 0x80,\n\n    /**\n     * report Open\n     * ```\n     * const [outboundPort] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n}\n\nexport namespace TcpCmdPack {\n    /**\n     * Pack format for 'open' data.\n     */\n    export const Open = \"b[12]\"\n\n    /**\n     * Pack format for 'open' data.\n     */\n    export const OpenReport = \"u16\"\n}\n\nexport enum TcpPipeCmd {\n    /**\n     * Open an SSL connection to a given host:port pair. Can be issued only once on given pipe.\n     * After the connection is established, an empty data report is sent.\n     * Connection is closed by closing the pipe.\n     *\n     * ```\n     * const [tcpPort, hostname] = jdunpack<[number, string]>(buf, \"u16 s\")\n     * ```\n     */\n    OpenSsl = 0x1,\n\n    /**\n     * Argument: error TcpError (int32_t). Reported when an error is encountered. Negative error codes come directly from the SSL implementation.\n     *\n     * ```\n     * const [error] = jdunpack<[TcpTcpError]>(buf, \"i32\")\n     * ```\n     */\n    Error = 0x0,\n}\n\nexport namespace TcpPipeCmdPack {\n    /**\n     * Pack format for 'open_ssl' data.\n     */\n    export const OpenSsl = \"u16 s\"\n\n    /**\n     * Pack format for 'error' data.\n     */\n    export const Error = \"i32\"\n}\n\nexport enum TcpPipe {}\n/**\n * pipe_command Outdata\n * ```\n * const [data] = jdunpack<[Uint8Array]>(buf, \"b\")\n * ```\n */\n\n/**\n * pipe_report Indata\n * ```\n * const [data] = jdunpack<[Uint8Array]>(buf, \"b\")\n * ```\n */\n\nexport namespace TcpPipePack {\n    /**\n     * Pack format for 'outdata' data.\n     */\n    export const Outdata = \"b\"\n\n    /**\n     * Pack format for 'indata' data.\n     */\n    export const Indata = \"b\"\n}\n\n// Service Temperature constants\nexport const SRV_TEMPERATURE = 0x1421bac7\n\nexport enum TemperatureVariant { // uint8_t\n    Outdoor = 0x1,\n    Indoor = 0x2,\n    Body = 0x3,\n}\n\nexport enum TemperatureReg {\n    /**\n     * Read-only \u00B0C i22.10 (int32_t). The temperature.\n     *\n     * ```\n     * const [temperature] = jdunpack<[number]>(buf, \"i22.10\")\n     * ```\n     */\n    Temperature = 0x101,\n\n    /**\n     * Constant \u00B0C i22.10 (int32_t). Lowest temperature that can be reported.\n     *\n     * ```\n     * const [minTemperature] = jdunpack<[number]>(buf, \"i22.10\")\n     * ```\n     */\n    MinTemperature = 0x104,\n\n    /**\n     * Constant \u00B0C i22.10 (int32_t). Highest temperature that can be reported.\n     *\n     * ```\n     * const [maxTemperature] = jdunpack<[number]>(buf, \"i22.10\")\n     * ```\n     */\n    MaxTemperature = 0x105,\n\n    /**\n     * Read-only \u00B0C u22.10 (uint32_t). The real temperature is between `temperature - temperature_error` and `temperature + temperature_error`.\n     *\n     * ```\n     * const [temperatureError] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    TemperatureError = 0x106,\n\n    /**\n     * Constant Variant (uint8_t). Specifies the type of thermometer.\n     *\n     * ```\n     * const [variant] = jdunpack<[TemperatureVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace TemperatureRegPack {\n    /**\n     * Pack format for 'temperature' data.\n     */\n    export const Temperature = \"i22.10\"\n\n    /**\n     * Pack format for 'min_temperature' data.\n     */\n    export const MinTemperature = \"i22.10\"\n\n    /**\n     * Pack format for 'max_temperature' data.\n     */\n    export const MaxTemperature = \"i22.10\"\n\n    /**\n     * Pack format for 'temperature_error' data.\n     */\n    export const TemperatureError = \"u22.10\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Timeseries Aggregator constants\nexport const SRV_TIMESERIES_AGGREGATOR = 0x1192bdcc\nexport enum TimeseriesAggregatorCmd {\n    /**\n     * No args. Remove all pending timeseries.\n     */\n    Clear = 0x80,\n\n    /**\n     * Add a data point to a timeseries.\n     *\n     * ```\n     * const [value, label] = jdunpack<[number, string]>(buf, \"f64 s\")\n     * ```\n     */\n    Update = 0x83,\n\n    /**\n     * Set aggregation window.\n     * Setting to `0` will restore default.\n     *\n     * ```\n     * const [duration, label] = jdunpack<[number, string]>(buf, \"u32 s\")\n     * ```\n     */\n    SetWindow = 0x84,\n\n    /**\n     * Set whether or not the timeseries will be uploaded to the cloud.\n     * The `stored` reports are generated regardless.\n     *\n     * ```\n     * const [upload, label] = jdunpack<[number, string]>(buf, \"u8 s\")\n     * ```\n     */\n    SetUpload = 0x85,\n\n    /**\n     * Indicates that the average, minimum and maximum value of a given\n     * timeseries are as indicated.\n     * It also says how many samples were collected, and the collection period.\n     * Timestamps are given using device's internal clock, which will wrap around.\n     * Typically, `end_time` can be assumed to be \"now\".\n     * `end_time - start_time == window`\n     *\n     * ```\n     * const [numSamples, avg, min, max, startTime, endTime, label] = jdunpack<[number, number, number, number, number, number, string]>(buf, \"u32 x[4] f64 f64 f64 u32 u32 s\")\n     * ```\n     */\n    Stored = 0x90,\n}\n\nexport namespace TimeseriesAggregatorCmdPack {\n    /**\n     * Pack format for 'update' data.\n     */\n    export const Update = \"f64 s\"\n\n    /**\n     * Pack format for 'set_window' data.\n     */\n    export const SetWindow = \"u32 s\"\n\n    /**\n     * Pack format for 'set_upload' data.\n     */\n    export const SetUpload = \"u8 s\"\n\n    /**\n     * Pack format for 'stored' data.\n     */\n    export const Stored = \"u32 b[4] f64 f64 f64 u32 u32 s\"\n}\n\nexport enum TimeseriesAggregatorReg {\n    /**\n     * Read-only \u03BCs uint32_t. This can queried to establish local time on the device.\n     *\n     * ```\n     * const [now] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    Now = 0x180,\n\n    /**\n     * Read-write bool (uint8_t). When `true`, the windows will be shorter after service reset and gradually extend to requested length.\n     * This is ensure valid data is being streamed in program development.\n     *\n     * ```\n     * const [fastStart] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    FastStart = 0x80,\n\n    /**\n     * Read-write ms uint32_t. Window for timeseries for which `set_window` was never called.\n     * Note that windows returned initially may be shorter if `fast_start` is enabled.\n     *\n     * ```\n     * const [defaultWindow] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    DefaultWindow = 0x81,\n\n    /**\n     * Read-write bool (uint8_t). Whether labelled timeseries for which `set_upload` was never called should be automatically uploaded.\n     *\n     * ```\n     * const [defaultUpload] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    DefaultUpload = 0x82,\n\n    /**\n     * Read-write bool (uint8_t). Whether automatically created timeseries not bound in role manager should be uploaded.\n     *\n     * ```\n     * const [uploadUnlabelled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    UploadUnlabelled = 0x83,\n\n    /**\n     * Read-write ms uint32_t. If no data is received from any sensor within given period, the device is rebooted.\n     * Set to `0` to disable (default).\n     * Updating user-provided timeseries does not reset the watchdog.\n     *\n     * ```\n     * const [sensorWatchdogPeriod] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    SensorWatchdogPeriod = 0x84,\n}\n\nexport namespace TimeseriesAggregatorRegPack {\n    /**\n     * Pack format for 'now' data.\n     */\n    export const Now = \"u32\"\n\n    /**\n     * Pack format for 'fast_start' data.\n     */\n    export const FastStart = \"u8\"\n\n    /**\n     * Pack format for 'default_window' data.\n     */\n    export const DefaultWindow = \"u32\"\n\n    /**\n     * Pack format for 'default_upload' data.\n     */\n    export const DefaultUpload = \"u8\"\n\n    /**\n     * Pack format for 'upload_unlabelled' data.\n     */\n    export const UploadUnlabelled = \"u8\"\n\n    /**\n     * Pack format for 'sensor_watchdog_period' data.\n     */\n    export const SensorWatchdogPeriod = \"u32\"\n}\n\n// Service Traffic Light constants\nexport const SRV_TRAFFIC_LIGHT = 0x15c38d9b\nexport enum TrafficLightReg {\n    /**\n     * Read-write bool (uint8_t). The on/off state of the red light.\n     *\n     * ```\n     * const [red] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Red = 0x80,\n\n    /**\n     * Read-write bool (uint8_t). The on/off state of the yellow light.\n     *\n     * ```\n     * const [yellow] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Yellow = 0x81,\n\n    /**\n     * Read-write bool (uint8_t). The on/off state of the green light.\n     *\n     * ```\n     * const [green] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Green = 0x82,\n}\n\nexport namespace TrafficLightRegPack {\n    /**\n     * Pack format for 'red' data.\n     */\n    export const Red = \"u8\"\n\n    /**\n     * Pack format for 'yellow' data.\n     */\n    export const Yellow = \"u8\"\n\n    /**\n     * Pack format for 'green' data.\n     */\n    export const Green = \"u8\"\n}\n\n// Service Total Volatile organic compound constants\nexport const SRV_TVOC = 0x12a5b597\nexport enum TvocReg {\n    /**\n     * Read-only ppb u22.10 (uint32_t). Total volatile organic compound readings in parts per billion.\n     *\n     * ```\n     * const [tVOC] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    TVOC = 0x101,\n\n    /**\n     * Read-only ppb u22.10 (uint32_t). Error on the reading data\n     *\n     * ```\n     * const [tVOCError] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    TVOCError = 0x106,\n\n    /**\n     * Constant ppb u22.10 (uint32_t). Minimum measurable value\n     *\n     * ```\n     * const [minTVOC] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    MinTVOC = 0x104,\n\n    /**\n     * Constant ppb u22.10 (uint32_t). Minimum measurable value.\n     *\n     * ```\n     * const [maxTVOC] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    MaxTVOC = 0x105,\n}\n\nexport namespace TvocRegPack {\n    /**\n     * Pack format for 'TVOC' data.\n     */\n    export const TVOC = \"u22.10\"\n\n    /**\n     * Pack format for 'TVOC_error' data.\n     */\n    export const TVOCError = \"u22.10\"\n\n    /**\n     * Pack format for 'min_TVOC' data.\n     */\n    export const MinTVOC = \"u22.10\"\n\n    /**\n     * Pack format for 'max_TVOC' data.\n     */\n    export const MaxTVOC = \"u22.10\"\n}\n\n// Service Unique Brain constants\nexport const SRV_UNIQUE_BRAIN = 0x103c4ee5\n// Service USB Bridge constants\nexport const SRV_USB_BRIDGE = 0x18f61a4a\n\nexport enum UsbBridgeQByte { // uint8_t\n    Magic = 0xfe,\n    LiteralMagic = 0xf8,\n    Reserved = 0xf9,\n    SerialGap = 0xfa,\n    FrameGap = 0xfb,\n    FrameStart = 0xfc,\n    FrameEnd = 0xfd,\n}\n\nexport enum UsbBridgeCmd {\n    /**\n     * No args. Disables forwarding of Jacdac packets.\n     */\n    DisablePackets = 0x80,\n\n    /**\n     * No args. Enables forwarding of Jacdac packets.\n     */\n    EnablePackets = 0x81,\n\n    /**\n     * No args. Disables forwarding of serial log messages.\n     */\n    DisableLog = 0x82,\n\n    /**\n     * No args. Enables forwarding of serial log messages.\n     */\n    EnableLog = 0x83,\n}\n\n// Service UV index constants\nexport const SRV_UV_INDEX = 0x1f6e0d90\n\nexport enum UvIndexVariant { // uint8_t\n    UVA_UVB = 0x1,\n    Visible_IR = 0x2,\n}\n\nexport enum UvIndexReg {\n    /**\n     * Read-only uv u16.16 (uint32_t). Ultraviolet index, typically refreshed every second.\n     *\n     * ```\n     * const [uvIndex] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    UvIndex = 0x101,\n\n    /**\n     * Read-only uv u16.16 (uint32_t). Error on the UV measure.\n     *\n     * ```\n     * const [uvIndexError] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    UvIndexError = 0x106,\n\n    /**\n     * Constant Variant (uint8_t). The type of physical sensor and capabilities.\n     *\n     * ```\n     * const [variant] = jdunpack<[UvIndexVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace UvIndexRegPack {\n    /**\n     * Pack format for 'uv_index' data.\n     */\n    export const UvIndex = \"u16.16\"\n\n    /**\n     * Pack format for 'uv_index_error' data.\n     */\n    export const UvIndexError = \"u16.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Verified Telemetry constants\nexport const SRV_VERIFIED_TELEMETRY = 0x2194841f\n\nexport enum VerifiedTelemetryStatus { // uint8_t\n    Unknown = 0x0,\n    Working = 0x1,\n    Faulty = 0x2,\n}\n\nexport enum VerifiedTelemetryFingerprintType { // uint8_t\n    FallCurve = 0x1,\n    CurrentSense = 0x2,\n    Custom = 0x3,\n}\n\nexport enum VerifiedTelemetryReg {\n    /**\n     * Read-only Status (uint8_t). Reads the telemetry working status, where ``true`` is working and ``false`` is faulty.\n     *\n     * ```\n     * const [telemetryStatus] = jdunpack<[VerifiedTelemetryStatus]>(buf, \"u8\")\n     * ```\n     */\n    TelemetryStatus = 0x180,\n\n    /**\n     * Read-write ms uint32_t. Specifies the interval between computing the fingerprint information.\n     *\n     * ```\n     * const [telemetryStatusInterval] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    TelemetryStatusInterval = 0x80,\n\n    /**\n     * Constant FingerprintType (uint8_t). Type of the fingerprint.\n     *\n     * ```\n     * const [fingerprintType] = jdunpack<[VerifiedTelemetryFingerprintType]>(buf, \"u8\")\n     * ```\n     */\n    FingerprintType = 0x181,\n\n    /**\n     * Template Fingerprint information of a working sensor.\n     *\n     * ```\n     * const [confidence, template] = jdunpack<[number, Uint8Array]>(buf, \"u16 b\")\n     * ```\n     */\n    FingerprintTemplate = 0x182,\n}\n\nexport namespace VerifiedTelemetryRegPack {\n    /**\n     * Pack format for 'telemetry_status' data.\n     */\n    export const TelemetryStatus = \"u8\"\n\n    /**\n     * Pack format for 'telemetry_status_interval' data.\n     */\n    export const TelemetryStatusInterval = \"u32\"\n\n    /**\n     * Pack format for 'fingerprint_type' data.\n     */\n    export const FingerprintType = \"u8\"\n\n    /**\n     * Pack format for 'fingerprint_template' data.\n     */\n    export const FingerprintTemplate = \"u16 b\"\n}\n\nexport enum VerifiedTelemetryCmd {\n    /**\n     * No args. This command will clear the template fingerprint of a sensor and collect a new template fingerprint of the attached sensor.\n     */\n    ResetFingerprintTemplate = 0x80,\n\n    /**\n     * No args. This command will append a new template fingerprint to the `fingerprintTemplate`. Appending more fingerprints will increase the accuracy in detecting the telemetry status.\n     */\n    RetrainFingerprintTemplate = 0x81,\n}\n\nexport enum VerifiedTelemetryEvent {\n    /**\n     * Argument: telemetry_status Status (uint8_t). The telemetry status of the device was updated.\n     *\n     * ```\n     * const [telemetryStatus] = jdunpack<[VerifiedTelemetryStatus]>(buf, \"u8\")\n     * ```\n     */\n    TelemetryStatusChange = 0x3,\n\n    /**\n     * The fingerprint template was updated\n     */\n    FingerprintTemplateChange = 0x80,\n}\n\nexport namespace VerifiedTelemetryEventPack {\n    /**\n     * Pack format for 'telemetry_status_change' data.\n     */\n    export const TelemetryStatusChange = \"u8\"\n}\n\n// Service Vibration motor constants\nexport const SRV_VIBRATION_MOTOR = 0x183fc4a2\nexport enum VibrationMotorCmd {\n    /**\n     * Starts a sequence of vibration and pauses. To stop any existing vibration, send an empty payload.\n     *\n     * ```\n     * const [rest] = jdunpack<[([number, number])[]]>(buf, \"r: u8 u0.8\")\n     * const [duration, intensity] = rest[0]\n     * ```\n     */\n    Vibrate = 0x80,\n}\n\nexport namespace VibrationMotorCmdPack {\n    /**\n     * Pack format for 'vibrate' data.\n     */\n    export const Vibrate = \"r: u8 u0.8\"\n}\n\nexport enum VibrationMotorReg {\n    /**\n     * Constant uint8_t. The maximum number of vibration sequences supported in a single packet.\n     *\n     * ```\n     * const [maxVibrations] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    MaxVibrations = 0x180,\n}\n\nexport namespace VibrationMotorRegPack {\n    /**\n     * Pack format for 'max_vibrations' data.\n     */\n    export const MaxVibrations = \"u8\"\n}\n\n// Service Water level constants\nexport const SRV_WATER_LEVEL = 0x147b62ed\n\nexport enum WaterLevelVariant { // uint8_t\n    Resistive = 0x1,\n    ContactPhotoElectric = 0x2,\n    NonContactPhotoElectric = 0x3,\n}\n\nexport enum WaterLevelReg {\n    /**\n     * Read-only ratio u0.16 (uint16_t). The reported water level.\n     *\n     * ```\n     * const [level] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    Level = 0x101,\n\n    /**\n     * Read-only ratio u0.16 (uint16_t). The error rage on the current reading\n     *\n     * ```\n     * const [levelError] = jdunpack<[number]>(buf, \"u0.16\")\n     * ```\n     */\n    LevelError = 0x106,\n\n    /**\n     * Constant Variant (uint8_t). The type of physical sensor.\n     *\n     * ```\n     * const [variant] = jdunpack<[WaterLevelVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace WaterLevelRegPack {\n    /**\n     * Pack format for 'level' data.\n     */\n    export const Level = \"u0.16\"\n\n    /**\n     * Pack format for 'level_error' data.\n     */\n    export const LevelError = \"u0.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\n// Service Weight Scale constants\nexport const SRV_WEIGHT_SCALE = 0x1f4d5040\n\nexport enum WeightScaleVariant { // uint8_t\n    Body = 0x1,\n    Food = 0x2,\n    Jewelry = 0x3,\n}\n\nexport enum WeightScaleReg {\n    /**\n     * Read-only kg u16.16 (uint32_t). The reported weight.\n     *\n     * ```\n     * const [weight] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Weight = 0x101,\n\n    /**\n     * Read-only kg u16.16 (uint32_t). The estimate error on the reported reading.\n     *\n     * ```\n     * const [weightError] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    WeightError = 0x106,\n\n    /**\n     * Read-write kg u16.16 (uint32_t). Calibrated zero offset error on the scale, i.e. the measured weight when nothing is on the scale.\n     * You do not need to subtract that from the reading, it has already been done.\n     *\n     * ```\n     * const [zeroOffset] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    ZeroOffset = 0x80,\n\n    /**\n     * Read-write u16.16 (uint32_t). Calibrated gain on the weight scale error.\n     *\n     * ```\n     * const [gain] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    Gain = 0x81,\n\n    /**\n     * Constant kg u16.16 (uint32_t). Maximum supported weight on the scale.\n     *\n     * ```\n     * const [maxWeight] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    MaxWeight = 0x105,\n\n    /**\n     * Constant kg u16.16 (uint32_t). Minimum recommend weight on the scale.\n     *\n     * ```\n     * const [minWeight] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    MinWeight = 0x104,\n\n    /**\n     * Constant kg u16.16 (uint32_t). Smallest, yet distinguishable change in reading.\n     *\n     * ```\n     * const [weightResolution] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    WeightResolution = 0x108,\n\n    /**\n     * Constant Variant (uint8_t). The type of physical scale\n     *\n     * ```\n     * const [variant] = jdunpack<[WeightScaleVariant]>(buf, \"u8\")\n     * ```\n     */\n    Variant = 0x107,\n}\n\nexport namespace WeightScaleRegPack {\n    /**\n     * Pack format for 'weight' data.\n     */\n    export const Weight = \"u16.16\"\n\n    /**\n     * Pack format for 'weight_error' data.\n     */\n    export const WeightError = \"u16.16\"\n\n    /**\n     * Pack format for 'zero_offset' data.\n     */\n    export const ZeroOffset = \"u16.16\"\n\n    /**\n     * Pack format for 'gain' data.\n     */\n    export const Gain = \"u16.16\"\n\n    /**\n     * Pack format for 'max_weight' data.\n     */\n    export const MaxWeight = \"u16.16\"\n\n    /**\n     * Pack format for 'min_weight' data.\n     */\n    export const MinWeight = \"u16.16\"\n\n    /**\n     * Pack format for 'weight_resolution' data.\n     */\n    export const WeightResolution = \"u16.16\"\n\n    /**\n     * Pack format for 'variant' data.\n     */\n    export const Variant = \"u8\"\n}\n\nexport enum WeightScaleCmd {\n    /**\n     * No args. Call this command when there is nothing on the scale. If supported, the module should save the calibration data.\n     */\n    CalibrateZeroOffset = 0x80,\n\n    /**\n     * Argument: weight g u22.10 (uint32_t). Call this command with the weight of the thing on the scale.\n     *\n     * ```\n     * const [weight] = jdunpack<[number]>(buf, \"u22.10\")\n     * ```\n     */\n    CalibrateGain = 0x81,\n}\n\nexport namespace WeightScaleCmdPack {\n    /**\n     * Pack format for 'calibrate_gain' data.\n     */\n    export const CalibrateGain = \"u22.10\"\n}\n\n// Service WIFI constants\nexport const SRV_WIFI = 0x18aae1fa\n\nexport enum WifiAPFlags { // uint32_t\n    HasPassword = 0x1,\n    WPS = 0x2,\n    HasSecondaryChannelAbove = 0x4,\n    HasSecondaryChannelBelow = 0x8,\n    IEEE_802_11B = 0x100,\n    IEEE_802_11A = 0x200,\n    IEEE_802_11G = 0x400,\n    IEEE_802_11N = 0x800,\n    IEEE_802_11AC = 0x1000,\n    IEEE_802_11AX = 0x2000,\n    IEEE_802_LongRange = 0x8000,\n}\n\nexport enum WifiCmd {\n    /**\n     * Argument: results pipe (bytes). Return list of WiFi network from the last scan.\n     * Scans are performed periodically while not connected (in particular, on startup and after current connection drops),\n     * as well as upon `reconnect` and `scan` commands.\n     *\n     * ```\n     * const [results] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    LastScanResults = 0x80,\n\n    /**\n     * Automatically connect to named network if available. Also set password if network is not open.\n     *\n     * ```\n     * const [ssid, password] = jdunpack<[string, string]>(buf, \"z z\")\n     * ```\n     */\n    AddNetwork = 0x81,\n\n    /**\n     * No args. Enable the WiFi (if disabled), initiate a scan, wait for results, disconnect from current WiFi network if any,\n     * and then reconnect (using regular algorithm, see `set_network_priority`).\n     */\n    Reconnect = 0x82,\n\n    /**\n     * Argument: ssid string (bytes). Prevent from automatically connecting to named network in future.\n     * Forgetting a network resets its priority to `0`.\n     *\n     * ```\n     * const [ssid] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ForgetNetwork = 0x83,\n\n    /**\n     * No args. Clear the list of known networks.\n     */\n    ForgetAllNetworks = 0x84,\n\n    /**\n     * Set connection priority for a network.\n     * By default, all known networks have priority of `0`.\n     *\n     * ```\n     * const [priority, ssid] = jdunpack<[number, string]>(buf, \"i16 s\")\n     * ```\n     */\n    SetNetworkPriority = 0x85,\n\n    /**\n     * No args. Initiate search for WiFi networks. Generates `scan_complete` event.\n     */\n    Scan = 0x86,\n\n    /**\n     * Argument: results pipe (bytes). Return list of known WiFi networks.\n     * `flags` is currently always 0.\n     *\n     * ```\n     * const [results] = jdunpack<[Uint8Array]>(buf, \"b[12]\")\n     * ```\n     */\n    ListKnownNetworks = 0x87,\n}\n\nexport namespace WifiCmdPack {\n    /**\n     * Pack format for 'last_scan_results' data.\n     */\n    export const LastScanResults = \"b[12]\"\n\n    /**\n     * Pack format for 'add_network' data.\n     */\n    export const AddNetwork = \"z z\"\n\n    /**\n     * Pack format for 'forget_network' data.\n     */\n    export const ForgetNetwork = \"s\"\n\n    /**\n     * Pack format for 'set_network_priority' data.\n     */\n    export const SetNetworkPriority = \"i16 s\"\n\n    /**\n     * Pack format for 'list_known_networks' data.\n     */\n    export const ListKnownNetworks = \"b[12]\"\n}\n\nexport enum WifiPipe {}\n/**\n * pipe_report Results\n * ```\n * const [flags, rssi, channel, bssid, ssid] = jdunpack<[WifiAPFlags, number, number, Uint8Array, string]>(buf, \"u32 x[4] i8 u8 b[6] s[33]\")\n * ```\n */\n\n/**\n * pipe_report NetworkResults\n * ```\n * const [priority, flags, ssid] = jdunpack<[number, number, string]>(buf, \"i16 i16 s\")\n * ```\n */\n\nexport namespace WifiPipePack {\n    /**\n     * Pack format for 'results' data.\n     */\n    export const Results = \"u32 u32 i8 u8 b[6] s[33]\"\n\n    /**\n     * Pack format for 'network_results' data.\n     */\n    export const NetworkResults = \"i16 i16 s\"\n}\n\nexport enum WifiReg {\n    /**\n     * Read-only dB int8_t. Current signal strength. Returns -128 when not connected.\n     *\n     * ```\n     * const [rssi] = jdunpack<[number]>(buf, \"i8\")\n     * ```\n     */\n    Rssi = 0x101,\n\n    /**\n     * Read-write bool (uint8_t). Determines whether the WiFi radio is enabled. It starts enabled upon reset.\n     *\n     * ```\n     * const [enabled] = jdunpack<[number]>(buf, \"u8\")\n     * ```\n     */\n    Enabled = 0x1,\n\n    /**\n     * Read-only bytes. 0, 4 or 16 byte buffer with the IPv4 or IPv6 address assigned to device if any.\n     *\n     * ```\n     * const [ipAddress] = jdunpack<[Uint8Array]>(buf, \"b[16]\")\n     * ```\n     */\n    IpAddress = 0x181,\n\n    /**\n     * Constant bytes. The 6-byte MAC address of the device. If a device does MAC address randomization it will have to \"restart\".\n     *\n     * ```\n     * const [eui48] = jdunpack<[Uint8Array]>(buf, \"b[6]\")\n     * ```\n     */\n    Eui48 = 0x182,\n\n    /**\n     * Read-only string (bytes). SSID of the access-point to which device is currently connected.\n     * Empty string if not connected.\n     *\n     * ```\n     * const [ssid] = jdunpack<[string]>(buf, \"s[32]\")\n     * ```\n     */\n    Ssid = 0x183,\n}\n\nexport namespace WifiRegPack {\n    /**\n     * Pack format for 'rssi' data.\n     */\n    export const Rssi = \"i8\"\n\n    /**\n     * Pack format for 'enabled' data.\n     */\n    export const Enabled = \"u8\"\n\n    /**\n     * Pack format for 'ip_address' data.\n     */\n    export const IpAddress = \"b[16]\"\n\n    /**\n     * Pack format for 'eui_48' data.\n     */\n    export const Eui48 = \"b[6]\"\n\n    /**\n     * Pack format for 'ssid' data.\n     */\n    export const Ssid = \"s[32]\"\n}\n\nexport enum WifiEvent {\n    /**\n     * Emitted upon successful join and IP address assignment.\n     */\n    GotIp = 0x1,\n\n    /**\n     * Emitted when disconnected from network.\n     */\n    LostIp = 0x2,\n\n    /**\n     * A WiFi network scan has completed. Results can be read with the `last_scan_results` command.\n     * The event indicates how many networks where found, and how many are considered\n     * as candidates for connection.\n     *\n     * ```\n     * const [numNetworks, numKnownNetworks] = jdunpack<[number, number]>(buf, \"u16 u16\")\n     * ```\n     */\n    ScanComplete = 0x80,\n\n    /**\n     * Emitted whenever the list of known networks is updated.\n     */\n    NetworksChanged = 0x81,\n\n    /**\n     * Argument: ssid string (bytes). Emitted when when a network was detected in scan, the device tried to connect to it\n     * and failed.\n     * This may be because of wrong password or other random failure.\n     *\n     * ```\n     * const [ssid] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    ConnectionFailed = 0x82,\n}\n\nexport namespace WifiEventPack {\n    /**\n     * Pack format for 'scan_complete' data.\n     */\n    export const ScanComplete = \"u16 u16\"\n\n    /**\n     * Pack format for 'connection_failed' data.\n     */\n    export const ConnectionFailed = \"s\"\n}\n\n// Service Wind direction constants\nexport const SRV_WIND_DIRECTION = 0x186be92b\nexport enum WindDirectionReg {\n    /**\n     * Read-only \u00B0 uint16_t. The direction of the wind.\n     *\n     * ```\n     * const [windDirection] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    WindDirection = 0x101,\n\n    /**\n     * Read-only \u00B0 uint16_t. Error on the wind direction reading\n     *\n     * ```\n     * const [windDirectionError] = jdunpack<[number]>(buf, \"u16\")\n     * ```\n     */\n    WindDirectionError = 0x106,\n}\n\nexport namespace WindDirectionRegPack {\n    /**\n     * Pack format for 'wind_direction' data.\n     */\n    export const WindDirection = \"u16\"\n\n    /**\n     * Pack format for 'wind_direction_error' data.\n     */\n    export const WindDirectionError = \"u16\"\n}\n\n// Service Wind speed constants\nexport const SRV_WIND_SPEED = 0x1b591bbf\nexport enum WindSpeedReg {\n    /**\n     * Read-only m/s u16.16 (uint32_t). The velocity of the wind.\n     *\n     * ```\n     * const [windSpeed] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    WindSpeed = 0x101,\n\n    /**\n     * Read-only m/s u16.16 (uint32_t). Error on the reading\n     *\n     * ```\n     * const [windSpeedError] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    WindSpeedError = 0x106,\n\n    /**\n     * Constant m/s u16.16 (uint32_t). Maximum speed that can be measured by the sensor.\n     *\n     * ```\n     * const [maxWindSpeed] = jdunpack<[number]>(buf, \"u16.16\")\n     * ```\n     */\n    MaxWindSpeed = 0x105,\n}\n\nexport namespace WindSpeedRegPack {\n    /**\n     * Pack format for 'wind_speed' data.\n     */\n    export const WindSpeed = \"u16.16\"\n\n    /**\n     * Pack format for 'wind_speed_error' data.\n     */\n    export const WindSpeedError = \"u16.16\"\n\n    /**\n     * Pack format for 'max_wind_speed' data.\n     */\n    export const MaxWindSpeed = \"u16.16\"\n}\n\n// Service WSSK constants\nexport const SRV_WSSK = 0x13b739fe\n\nexport enum WsskStreamingType { // uint16_t\n    Jacdac = 0x1,\n    Dmesg = 0x2,\n    Exceptions = 0x100,\n    TemporaryMask = 0xff,\n    PermamentMask = 0xff00,\n    DefaultMask = 0x100,\n}\n\nexport enum WsskDataType { // uint8_t\n    Binary = 0x1,\n    JSON = 0x2,\n}\n\nexport enum WsskCmd {\n    /**\n     * Argument: message string (bytes). Issued when a command fails.\n     *\n     * ```\n     * const [message] = jdunpack<[string]>(buf, \"s\")\n     * ```\n     */\n    Error = 0xff,\n\n    /**\n     * Argument: status StreamingType (uint16_t). Enable/disable forwarding of all Jacdac frames, exception reporting, and `dmesg` streaming.\n     *\n     * ```\n     * const [status] = jdunpack<[WsskStreamingType]>(buf, \"u16\")\n     * ```\n     */\n    SetStreaming = 0x90,\n\n    /**\n     * Argument: payload bytes. Send from gateway when it wants to see if the device is alive.\n     * The device currently only support 0-length payload.\n     *\n     * ```\n     * const [payload] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    PingDevice = 0x91,\n\n    /**\n     * report PingDevice\n     * ```\n     * const [payload] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n\n    /**\n     * Argument: payload bytes. Send from device to gateway to test connection.\n     *\n     * ```\n     * const [payload] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    PingCloud = 0x92,\n\n    /**\n     * report PingCloud\n     * ```\n     * const [payload] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n\n    /**\n     * No args. Get SHA256 of the currently deployed program.\n     */\n    GetHash = 0x93,\n\n    /**\n     * report GetHash\n     * ```\n     * const [sha256] = jdunpack<[Uint8Array]>(buf, \"b[32]\")\n     * ```\n     */\n\n    /**\n     * Argument: size B uint32_t. Start deployment of a new program.\n     *\n     * ```\n     * const [size] = jdunpack<[number]>(buf, \"u32\")\n     * ```\n     */\n    DeployStart = 0x94,\n\n    /**\n     * Argument: payload bytes. Payload length must be multiple of 32 bytes.\n     *\n     * ```\n     * const [payload] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    DeployWrite = 0x95,\n\n    /**\n     * No args. Finish deployment.\n     */\n    DeployFinish = 0x96,\n\n    /**\n     * Upload a labelled tuple of values to the cloud.\n     * The tuple will be automatically tagged with timestamp and originating device.\n     *\n     * ```\n     * const [datatype, topic, payload] = jdunpack<[WsskDataType, string, Uint8Array]>(buf, \"u8 z b\")\n     * ```\n     */\n    C2d = 0x97,\n\n    /**\n     * Upload a binary message to the cloud.\n     *\n     * ```\n     * const [datatype, topic, payload] = jdunpack<[WsskDataType, string, Uint8Array]>(buf, \"u8 z b\")\n     * ```\n     */\n    D2c = 0x98,\n\n    /**\n     * Argument: frame bytes. Sent both ways.\n     *\n     * ```\n     * const [frame] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    JacdacPacket = 0x99,\n\n    /**\n     * report JacdacPacket\n     * ```\n     * const [frame] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n\n    /**\n     * Argument: logs bytes. The `logs` field is string in UTF-8 encoding, however it can be split in the middle of UTF-8 code point.\n     * Controlled via `dmesg_en`.\n     *\n     * ```\n     * const [logs] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    Dmesg = 0x9a,\n\n    /**\n     * Argument: logs bytes. The format is the same as `dmesg` but this is sent on exceptions only and is controlled separately via `exception_en`.\n     *\n     * ```\n     * const [logs] = jdunpack<[Uint8Array]>(buf, \"b\")\n     * ```\n     */\n    ExceptionReport = 0x9b,\n}\n\nexport namespace WsskCmdPack {\n    /**\n     * Pack format for 'error' data.\n     */\n    export const Error = \"s\"\n\n    /**\n     * Pack format for 'set_streaming' data.\n     */\n    export const SetStreaming = \"u16\"\n\n    /**\n     * Pack format for 'ping_device' data.\n     */\n    export const PingDevice = \"b\"\n\n    /**\n     * Pack format for 'ping_device' data.\n     */\n    export const PingDeviceReport = \"b\"\n\n    /**\n     * Pack format for 'ping_cloud' data.\n     */\n    export const PingCloud = \"b\"\n\n    /**\n     * Pack format for 'ping_cloud' data.\n     */\n    export const PingCloudReport = \"b\"\n\n    /**\n     * Pack format for 'get_hash' data.\n     */\n    export const GetHashReport = \"b[32]\"\n\n    /**\n     * Pack format for 'deploy_start' data.\n     */\n    export const DeployStart = \"u32\"\n\n    /**\n     * Pack format for 'deploy_write' data.\n     */\n    export const DeployWrite = \"b\"\n\n    /**\n     * Pack format for 'c2d' data.\n     */\n    export const C2d = \"u8 z b\"\n\n    /**\n     * Pack format for 'd2c' data.\n     */\n    export const D2c = \"u8 z b\"\n\n    /**\n     * Pack format for 'jacdac_packet' data.\n     */\n    export const JacdacPacket = \"b\"\n\n    /**\n     * Pack format for 'jacdac_packet' data.\n     */\n    export const JacdacPacketReport = \"b\"\n\n    /**\n     * Pack format for 'dmesg' data.\n     */\n    export const Dmesg = \"b\"\n\n    /**\n     * Pack format for 'exception_report' data.\n     */\n    export const ExceptionReport = \"b\"\n}\n", "// Registers 0x001-0x07f - r/w common to all services\n// Registers 0x080-0x0ff - r/w defined per-service\n// Registers 0x100-0x17f - r/o common to all services\n// Registers 0x180-0x1ff - r/o defined per-service\n// Registers 0x200-0xeff - custom, defined per-service\n// Registers 0xf00-0xfff - reserved for implementation, should not be on the wire\n\nexport const CMD_GET_REG = 0x1000\nexport const CMD_SET_REG = 0x2000\n\nexport const CMD_EVENT_MASK = 0x8000\nexport const CMD_EVENT_CODE_MASK = 0x00ff\nexport const CMD_EVENT_COUNTER_POS = 8\nexport const CMD_EVENT_COUNTER_MASK = 0x7f\n\nexport const CMD_TOP_MASK = 0xf000\nexport const CMD_REG_MASK = 0x0fff\n\nexport const ACK_MIN_DELAY = 90\nexport const ACK_MAX_DELAY = 120\n\n// Commands 0x000-0x07f - common to all services\n// Commands 0x080-0xeff - defined per-service\n// Commands 0xf00-0xfff - reserved for implementation\n// enumeration data for CTRL, ad-data for other services\nexport const CMD_ADVERTISEMENT_DATA = 0x00\n\nexport const PIPE_PORT_SHIFT = 7\nexport const PIPE_COUNTER_MASK = 0x001f\nexport const PIPE_CLOSE_MASK = 0x0020\nexport const PIPE_METADATA_MASK = 0x0040\n\nexport const JD_SERIAL_HEADER_SIZE = 16\nexport const JD_SERIAL_MAX_PAYLOAD_SIZE = 236\nexport const JD_SERVICE_INDEX_MASK = 0x3f\nexport const JD_SERVICE_INDEX_INV_MASK = 0xc0\nexport const JD_SERVICE_INDEX_CRC_ACK = 0x3f\nexport const JD_SERVICE_INDEX_PIPE = 0x3e\nexport const JD_SERVICE_INDEX_MAX_NORMAL = 0x30\nexport const JD_SERVICE_INDEX_CTRL = 0x00\nexport const JD_SERVICE_INDEX_BROADCAST = 0x3d\n\n// the COMMAND flag signifies that the device_identifier is the recipent\n// (i.e., it's a command for the peripheral); the bit clear means device_identifier is the source\n// (i.e., it's a report from peripheral or a broadcast message)\nexport const JD_FRAME_FLAG_COMMAND = 0x01\n// an ACK should be issued with CRC of this package upon reception\nexport const JD_FRAME_FLAG_ACK_REQUESTED = 0x02\n// the device_identifier contains target service class number\nexport const JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS = 0x04\nexport const JD_FRAME_FLAG_LOOPBACK = 0x40\nexport const JD_FRAME_FLAG_VNEXT = 0x80\n\nexport const JD_DEVICE_IDENTIFIER_BROADCAST_HIGH_MARK = 0xaaaaaaaa\n\nexport const JD_ADVERTISEMENT_0_COUNTER_MASK = 0x0000000f\nexport const JD_ADVERTISEMENT_0_ACK_SUPPORTED = 0x00000100\n\n// time withouth seeing a package to be considered \"lost\", 2x announce interval\nexport const JD_DEVICE_LOST_DELAY = 1500\n// time without seeing a packet to be considered \"disconnected\"\nexport const JD_DEVICE_DISCONNECTED_DELAY = 3000\n\nexport const RESET_IN_TIME_US = 2000000\n\nexport const MAX_SERVICES_LENGTH = 59\n\nexport const NEW_LISTENER = \"newListener\"\nexport const REMOVE_LISTENER = \"removeListener\"\n\nexport const CONNECTION_STATE = \"connectionState\"\nexport const CONNECT = \"connect\"\nexport const LOST = \"lost\"\nexport const FOUND = \"found\"\nexport const CONNECTING = \"connecting\"\nexport const DISCONNECT = \"disconnect\"\nexport const DISCONNECTING = \"disconnecting\"\nexport const ANNOUNCE = \"announce\"\nexport const START = \"start\"\nexport const RESTART = \"restart\"\nexport const STOP = \"stop\"\nexport const CHANGE = \"change\"\nexport const EVENT = \"event\"\nexport const RENDER = \"render\"\nexport const REFRESH = \"refresh\"\nexport const MESSAGE = \"message\"\nexport const LOG = \"log\"\nexport const FIRMWARE_BLOBS_CHANGE = \"firmwareBlobsChange\"\nexport const LATE = \"late\"\nexport const GET_ATTEMPT = \"getAttempt\"\nexport const SERVICE_CLIENT_ADDED = `serviceClientAdded`\nexport const SERVICE_CLIENT_REMOVED = `serviceClientRemoved`\nexport const READING_SENT = \"readingSent\"\nexport const ROLE_CHANGE = \"roleChange\"\nexport const ROLE_MANAGER_CHANGE = \"roleManagerChange\"\n\nexport const SERVICE_PROVIDER_ADDED = `serviceProviderAdded`\nexport const SERVICE_PROVIDER_REMOVED = `serviceProviderRemoved`\n\nexport const IDENTIFY = \"identify\"\nexport const IDENTIFY_DURATION = 2000\nexport const RESET = \"reset\"\n\nexport const DATA = \"data\"\nexport const SIDE_DATA = \"sideData\"\nexport const CLOSE = \"close\"\nexport const DISPOSE = \"dispose\"\n\nexport const DEVICE_CONNECT = \"deviceConnect\"\nexport const DEVICE_LOST = \"deviceLost\"\nexport const DEVICE_FOUND = \"deviceFound\"\nexport const DEVICE_DISCONNECT = \"deviceDisconnect\"\nexport const DEVICE_ANNOUNCE = \"deviceAnnounce\"\nexport const DEVICE_PACKET_ANNOUNCE = \"devicePacketAnnounce\"\nexport const DEVICE_RESTART = \"deviceRestart\"\nexport const DEVICE_CHANGE = \"deviceChange\"\nexport const DEVICE_FIRMWARE_INFO = \"firmwareInfo\"\nexport const DEVICE_CLEAN = \"deviceClean\"\nexport const SELF_ANNOUNCE = \"selfAnnounce\"\n\nexport const PACKET_SEND = \"packetSend\"\nexport const FRAME_SEND_DISCONNECT = \"frameSendDisconnect\"\n\nexport const PACKET_PRE_PROCESS = \"packetPreProcess\"\nexport const PACKET_PROCESS = \"packetProcess\"\nexport const PACKET_RECEIVE = \"packetReceive\"\nexport const PACKET_RECEIVE_ANNOUNCE = \"packetReceiveAnnounce\"\nexport const PACKET_RECEIVE_NO_DEVICE = \"packetReceiveNoDevice\"\nexport const PACKET_EVENT = \"packetEvent\"\nexport const PACKET_REPORT = \"packetReport\"\nexport const PACKET_ANNOUNCE = \"packetAnnounce\"\nexport const PACKET_INVALID_CRC = \"packetInvalidCrc\"\nexport const PACKET_INVALID_DATA = \"packetInvalidData\"\nexport const PACKET_DATA_NORMALIZE = \"packetDataNormalize\"\n\nexport const FRAME_PROCESS = \"frameProcess\"\nexport const FRAME_PROCESS_LARGE = \"frameProcessLarge\"\nexport const FRAME_SEND = \"frameSend\"\n\nexport const REPORT_RECEIVE = \"reportReceive\"\nexport const REPORT_UPDATE = \"reportUpdate\"\nexport const COMMAND_RECEIVE = \"commandReceive\"\n\nexport const ERROR = \"error\"\nexport const TRANSPORT_ERROR = \"transportError\"\nexport const PANIC = \"panic\"\nexport const TRACE = \"trace\"\nexport const TIMEOUT = \"timeout\"\nexport const TIMEOUT_DISCONNECT = \"timeoutDisconnect\"\nexport const GLOBALS_UPDATED = \"globalsUpdated\"\n\nexport const STATE_CHANGE = \"stateChange\"\n\nexport const PROGRESS = \"progress\"\n\nexport const PACKET_KIND_RW = \"rw\"\nexport const PACKET_KIND_RO = \"ro\"\nexport const PACKET_KIND_EVENT = \"event\"\nexport const PACKET_KIND_ANNOUNCE = \"announce\"\n\nexport const REGISTER_NODE_NAME = \"register\"\nexport const REPORT_NODE_NAME = \"report\"\nexport const CONST_NODE_NAME = \"const\"\nexport const EVENT_NODE_NAME = \"event\"\nexport const SERVICE_NODE_NAME = \"service\"\nexport const SERVICE_MIXIN_NODE_NAME = \"serviceMixin\"\nexport const DEVICE_NODE_NAME = \"device\"\nexport const VIRTUAL_DEVICE_NODE_NAME = \"virtualdevice\"\nexport const BUS_NODE_NAME = \"bus\"\nexport const COMMAND_NODE_NAME = \"command\"\nexport const FIELD_NODE_NAME = \"field\"\nexport const PIPE_NODE_NAME = \"pipe\"\nexport const PIPE_REPORT_NODE_NAME = \"pipe_report\"\nexport const CRC_ACK_NODE_NAME = \"crcAck\"\nexport const SERVICE_TEST_NODE_NAME = \"serviceTest\"\n\nexport const REGISTER_REFRESH_TIMEOUT = 150\nexport const REGISTER_REFRESH_RETRY_0 = 30\nexport const REGISTER_REFRESH_RETRY_1 = 80\nexport const REGISTER_POLL_STREAMING_INTERVAL = 5000\nexport const REGISTER_POLL_FIRST_REPORT_INTERVAL = 400\nexport const REGISTER_POLL_REPORT_INTERVAL = 5001\nexport const REGISTER_POLL_REPORT_MAX_INTERVAL = 60000\nexport const REGISTER_POLL_REPORT_VOLATILE_INTERVAL = 1000\nexport const REGISTER_POLL_REPORT_VOLATILE_MAX_INTERVAL = 5000\nexport const REGISTER_OPTIONAL_POLL_COUNT = 3\nexport const STREAMING_DEFAULT_INTERVAL = 50\n\nexport const FLASH_MAX_DEVICES = 6\n\nexport const PING_LOGGERS_POLL = 2400\nexport const ROLE_MANAGER_POLL = 1500\nexport const REFRESH_REGISTER_POLL = 50\n\nexport const USB_TRANSPORT = \"usb\"\nexport const BLUETOOTH_TRANSPORT = \"bluetooth\"\nexport const SERIAL_TRANSPORT = \"serial\"\nexport const PACKETIO_TRANSPORT = \"packetio\"\nexport const WEBSOCKET_TRANSPORT = \"web\"\nexport const NODESOCKET_TRANSPORT = \"tcp\"\n\nexport const HF2_TIMEOUT = 1000\n\nexport const META_ACK = \"ACK\"\nexport const META_ACK_FAILED = \"ACK_FAILED\"\nexport const META_PIPE = \"PIPE\"\nexport const META_GET = \"GET\"\nexport const META_TRACE = \"TRACE\"\nexport const META_TRACE_DESCRIPTION = \"TRACE_DESCRIPTION\"\nexport const META_NOT_IMPLEMENTED = \"NOT_IMPLEMENTED\"\n\nexport const REGISTER_PRE_GET = \"registerPreGet\"\n\nexport const TRACE_FILTER_HORIZON = 100\nexport const EMBED_MIN_ASPECT_RATIO = 1.22\n\nexport const BLUETOOTH_JACDAC_SERVICE = \"f8530001-a97f-49f5-a554-3e373fbea2d5\"\nexport const BLUETOOTH_JACDAC_RX_CHARACTERISTIC =\n    \"f8530002-a97f-49f5-a554-3e373fbea2d5\"\nexport const BLUETOOTH_JACDAC_TX_CHARACTERISTIC =\n    \"f8530003-a97f-49f5-a554-3e373fbea2d5\"\nexport const BLUETOOTH_JACDAC_DIAG_CHARACTERISTIC =\n    \"f8530004-a97f-49f5-a554-3e373fbea2d5\"\n\nexport const TRANSPORT_CONNECT_RETRY_DELAY = 500\n\nexport const ERROR_TRANSPORT_DEVICE_LOCKED = \"transport/device-locked\"\n\nexport const ROLE_BOUND = \"roleBound\"\nexport const ROLE_UNBOUND = \"roleUnbound\"\nexport const ROLE_HAS_NO_SERVICE = \"roleHasNoService\"\nexport const BOUND = \"bound\"\nexport const UNBOUND = \"unbound\"\n\nexport const JACDAC_ERROR = \"JacdacError\"\nexport const ERROR_TIMEOUT = \"timeout\"\nexport const ERROR_TRANSPORT_CLOSED = \"transport/closed\"\nexport const ERROR_MICROBIT_V1 = \"microbit/v1-not-supported\"\nexport const ERROR_MICROBIT_UNKNOWN = \"microbit/unknown-hardware-revision\"\nexport const ERROR_MICROBIT_JACDAC_MISSING = \"microbit/jacdac-missing\"\nexport const ERROR_MICROBIT_INVALID_MEMORY = \"microbit/invalid-memory\"\nexport const ERROR_TRANSPORT_HF2_NOT_SUPPORTED = \"transport/hf2-not-supported\"\nexport const ERROR_TRANSPORT_WEBSOCKET_NOT_SUPPORTED =\n    \"transport/websocket-not-supported\"\nexport const ERROR_NO_ACK = \"no-ack\"\n\nexport const ROLE_QUERY_SERVICE_OFFSET = \"srvo\"\nexport const ROLE_QUERY_SERVICE_INDEX = \"srvi\"\nexport const ROLE_QUERY_DEVICE = \"dev\"\nexport const ROLE_QUERY_SELF_DEVICE = \"self\"\n\n// eslint-disable-next-line prefer-const\nexport let DOCS_ROOT = \"https://microsoft.github.io/jacdac-docs/\"\n\nexport * from \"../../jacdac-spec/dist/specconstants\"\n", "export function isMixinService(serviceClass: number) {\n    return (serviceClass & 0x2000_0000) === 0x2000_0000\n}\n\nfunction isRegister(pkt: jdspec.PacketInfo): boolean {\n    return (\n        pkt && (pkt.kind === \"const\" || pkt.kind === \"ro\" || pkt.kind === \"rw\")\n    )\n}\nexport function packetsToRegisters(packets: jdspec.PacketInfo[]) {\n    return packets.filter(pkt => !pkt.derived && isRegister(pkt))\n}\n\nexport function parseIntFloat(\n    spec: jdspec.ServiceSpec,\n    w: string,\n    allowFloat = false\n): number {\n    if (/^-?0x[a-f\\d_]+$/i.test(w) || /^-?[\\d_]+$/.test(w)) {\n        const v = parseInt(w.replace(/_/g, \"\")) // allow for 0x3fff_ffff syntax\n        if (isNaN(v)) throw new Error(\"can't parse int: \" + w)\n        return v\n    }\n\n    if (allowFloat && /^-?\\d*(\\.\\d*)?(e(-?)\\d+)?$/.test(w)) {\n        const v = parseFloat(w)\n        if (isNaN(v)) throw new Error(\"can't parse float: \" + w)\n        return v\n    }\n\n    const ww = w.split(/\\./)\n    if (ww.length != 2) {\n        throw new Error(`expecting int or enum member here`)\n    }\n    const en = spec.enums[ww[0]]\n    if (!en) {\n        throw new Error(`${ww[0]} is not an enum type`)\n    }\n    // eslint-disable-next-line no-prototype-builtins\n    if (!en.members.hasOwnProperty(ww[1]))\n        throw new Error(`${ww[1]} is not a member of ${ww[0]}`)\n    return en.members[ww[1]] || 0\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"jdspec.d.ts\" />\nimport { parseIntFloat } from \"./jdutils\"\n\nexport const DEVICE_IMAGE_WIDTH = 1024\nexport const DEVICE_IMAGE_HEIGHT = 768\n\n// modified subset of SenML\nexport const unitDescription: jdspec.SMap<string> = {\n    \"\u00B0\": \"angle\",\n    \"\u00B0/s\": \"rotation rate\",\n    \"\u00B0/s2\": \"rotation acceleration\",\n    m: \"meter\",\n    kg: \"kilogram\",\n    s: \"second\",\n    A: \"ampere\",\n    K: \"kelvin\",\n    cd: \"candela\",\n    mol: \"mole\",\n    Hz: \"hertz\",\n    rad: \"radian\",\n    sr: \"steradian\",\n    N: \"newton\",\n    Pa: \"pascal\",\n    J: \"joule\",\n    W: \"watt\",\n    C: \"coulomb\",\n    V: \"volt\",\n    F: \"farad\",\n    Ohm: \"ohm\",\n    S: \"siemens\",\n    Wb: \"weber\",\n    T: \"tesla\",\n    H: \"henry\",\n    \"\u00B0C\": \"degrees Celsius\",\n    lm: \"lumen\",\n    lx: \"lux\",\n    Bq: \"becquerel\",\n    Gy: \"gray\",\n    Sv: \"sievert\",\n    kat: \"katal\",\n    m2: \"square meter (area)\",\n    m3: \"cubic meter (volume)\",\n    \"m/s\": \"meter per second (velocity)\",\n    \"m/s2\": \"meter per square second (acceleration)\",\n    \"m3/s\": \"cubic meter per second (flow rate)\",\n    \"W/m2\": \"watt per square meter (irradiance)\",\n    \"cd/m2\": \"candela per square meter (luminance)\",\n    bit: \"bit (information content)\",\n    \"bit/s\": \"bit per second (data rate)\",\n    baud: \"symbols per second\",\n    lat: \"degrees latitude\",\n    lon: \"degrees longitude\",\n    pH: \"pH value (acidity; logarithmic quantity)\",\n    dB: \"decibel (logarithmic quantity)\",\n    dBW: \"decibel relative to 1 W (power level)\",\n    count: \"1 (counter value)\",\n    \"/\": \"1 (ratio e.g., value of a switch)\",\n    \"%RH\": \"Percentage (Relative Humidity)\",\n    \"%EL\": \"Percentage (remaining battery energy level)\",\n    EL: \"seconds (remaining battery energy level)\",\n    \"1/s\": \"1 per second (event rate)\",\n    \"S/m\": \"Siemens per meter (conductivity)\",\n    B: \"Byte (information content)\",\n    VA: \"volt-ampere (Apparent Power)\",\n    VAs: \"volt-ampere second (Apparent Energy)\",\n    var: \"volt-ampere reactive (Reactive Power)\",\n    vars: \"volt-ampere-reactive second (Reactive Energy)\",\n    \"J/m\": \"joule per meter (Energy per distance)\",\n    \"kg/m3\": \"kilogram per cubic meter (mass density, mass concentration)\",\n    \"s/60\u00B0\": \"servo speed (time to travel 60\u00B0)\",\n    \"kg/cm\": \"torque\",\n    hsv: \"bit HSV color\",\n    rgb: \"RGB color\",\n    rpm: \"revolutions per minute\",\n    uv: \"UV index\",\n    lux: \"illuminance\",\n    bpm: \"beats per minute\",\n    mcd: \"micro candella\",\n    px: \"pixel\",\n    AQI: \"air quality index\",\n}\n\nexport const secondaryUnitConverters: jdspec.SMap<{\n    name: string\n    unit: senml.Unit | \"#\"\n    scale: number\n    offset: number\n}> = {\n    ms: { name: \"millisecond\", unit: \"s\", scale: 1 / 1000, offset: 0 },\n    min: { name: \"minute\", unit: \"s\", scale: 60, offset: 0 },\n    h: { name: \"hour\", unit: \"s\", scale: 3600, offset: 0 },\n    MHz: { name: \"megahertz\", unit: \"Hz\", scale: 1000000, offset: 0 },\n    kW: { name: \"kilowatt\", unit: \"W\", scale: 1000, offset: 0 },\n    kVA: { name: \"kilovolt-ampere\", unit: \"VA\", scale: 1000, offset: 0 },\n    kvar: { name: \"kilovar\", unit: \"var\", scale: 1000, offset: 0 },\n    Ah: { name: \"ampere-hour\", unit: \"C\", scale: 3600, offset: 0 },\n    Wh: { name: \"watt-hour\", unit: \"J\", scale: 3600, offset: 0 },\n    kWh: { name: \"kilowatt-hour\", unit: \"J\", scale: 3600000, offset: 0 },\n    varh: { name: \"var-hour\", unit: \"vars\", scale: 3600, offset: 0 },\n    kvarh: { name: \"kilovar-hour\", unit: \"vars\", scale: 3600000, offset: 0 },\n    kVAh: {\n        name: \"kilovolt-ampere-hour\",\n        unit: \"VAs\",\n        scale: 3600000,\n        offset: 0,\n    },\n    \"Wh/km\": {\n        name: \"watt-hour per kilometer\",\n        unit: \"J/m\",\n        scale: 3.6,\n        offset: 0,\n    },\n    KB: { name: \"kilobyte\", unit: \"B\", scale: 1000, offset: 0 },\n    KiB: { name: \"kibibyte\", unit: \"B\", scale: 1024, offset: 0 },\n    GB: { name: \"gigabyte\", unit: \"B\", scale: 1.0e9, offset: 0 },\n    \"Mbit/s\": {\n        name: \"megabit per second\",\n        unit: \"bit/s\",\n        scale: 1000000,\n        offset: 0,\n    },\n    \"B/s\": { name: \"byte per second\", unit: \"bit/s\", scale: 8, offset: 0 },\n    \"MB/s\": {\n        name: \"megabyte per second\",\n        unit: \"bit/s\",\n        scale: 8000000,\n        offset: 0,\n    },\n    mV: { name: \"millivolt\", unit: \"V\", scale: 1 / 1000, offset: 0 },\n    mA: { name: \"milliampere\", unit: \"A\", scale: 1 / 1000, offset: 0 },\n    dBm: { name: \"decibel (milliwatt)\", unit: \"dBW\", scale: 1, offset: -30 },\n    \"ug/m3\": {\n        name: \"microgram per cubic meter\",\n        unit: \"kg/m3\",\n        scale: 1.0e-9,\n        offset: 0,\n    },\n    \"mm/h\": {\n        name: \"millimeter per hour\",\n        unit: \"m/s\",\n        scale: 1 / 3600000,\n        offset: 0,\n    },\n    \"m/h\": { name: \"meter per hour\", unit: \"m/s\", scale: 1 / 3600, offset: 0 },\n    \"cm/s\": {\n        name: \"centimeter per seconds\",\n        unit: \"m/s\",\n        scale: 1 / 100,\n        offset: 0,\n    },\n    ppm: { name: \"parts per million\", unit: \"/\", scale: 1.0e-6, offset: 0 },\n    ppb: { name: \"parts per billion\", unit: \"/\", scale: 1.0e-9, offset: 0 },\n    \"/100\": { name: \"percent\", unit: \"/\", scale: 1 / 100, offset: 0 },\n    \"%\": { name: \"percent\", unit: \"/\", scale: 1 / 100, offset: 0 },\n    \"/1000\": { name: \"permille\", unit: \"/\", scale: 1 / 1000, offset: 0 },\n    hPa: { name: \"hectopascal\", unit: \"Pa\", scale: 100, offset: 0 },\n    mm: { name: \"millimeter\", unit: \"m\", scale: 1 / 1000, offset: 0 },\n    cm: { name: \"centimeter\", unit: \"m\", scale: 1 / 100, offset: 0 },\n    km: { name: \"kilometer\", unit: \"m\", scale: 1000, offset: 0 },\n    \"km/h\": {\n        name: \"kilometer per hour\",\n        unit: \"m/s\",\n        scale: 1 / 3.6,\n        offset: 0,\n    },\n    \"8ms\": { name: \"8 milliseconds\", unit: \"s\", scale: 8 / 1000, offset: 0 },\n    nm: { name: \"nanometer\", unit: \"m\", scale: 1e-9, offset: 0 },\n    nT: { name: \"nano Tesla\", unit: \"T\", scale: 1e-9, offset: 0 },\n\n    // compat with previous Jacdac versions\n    frac: { name: \"ratio\", unit: \"/\", scale: 1, offset: 0 },\n    us: { name: \"micro seconds\", unit: \"s\", scale: 1e-6, offset: 0 },\n    mWh: { name: \"micro watt-hour\", unit: \"J\", scale: 3.6e-3, offset: 0 },\n    g: { name: \"earth gravity\", unit: \"m/s2\", scale: 9.80665, offset: 0 },\n    \"#\": { name: \"count\", unit: \"#\", scale: 1, offset: 0 },\n    AudHz: { name: \"Audible Frequency\", unit: \"Hz\", scale: 1, offset: 0 },\n}\n\nexport const encodings: jdspec.SMap<jdspec.Encoding> = {\n    json: \"JSON\",\n    bitset: \"bitset\",\n}\n\nexport function resolveUnit(unit: string) {\n    if (!unit) return { name: \"\", scale: 1, offset: 1 } // indentifier\n\n    // seconary unit?\n    const su = secondaryUnitConverters[unit]\n    if (su) return su\n\n    const name = unitDescription[unit]\n    if (name) return { name, unit, scale: 1, offset: 0 }\n\n    return undefined\n}\n\nexport function units(): { name: string; description: string }[] {\n    const r: { name: string; description: string }[] = []\n    Object.keys(unitDescription).forEach(k => {\n        r.push({ name: k, description: unitDescription[k] })\n        Object.keys(secondaryUnitConverters)\n            .filter(scd => secondaryUnitConverters[scd].unit === k)\n            .forEach(scd =>\n                r.push({\n                    name: scd,\n                    description: secondaryUnitConverters[scd].name,\n                }),\n            )\n    })\n    r.sort((l, r) => l.name.localeCompare(r.name))\n    return r\n}\n\n/* check ranges, see system.md\nRegisters `0x001-0x07f` - r/w common to all services\nRegisters `0x080-0x0ff` - r/w defined per-service\nRegisters `0x100-0x17f` - r/o common to all services\nRegisters `0x180-0x1ff` - r/o defined per-service\nRegisters `0x200-0xeff` - custom, defined per-service\nRegisters `0xf00-0xfff` - reserved for implementation, should not be seen on the wire\n*/\nconst identifierRanges: { [index: string]: [number, number][] } = {\n    rw: [\n        [0x001, 0x07f],\n        [0x080, 0x0ff],\n        [0x200, 0xeff], // custom\n        [0xf00, 0xfff], // impl\n    ],\n    ro: [\n        [0x100, 0x17f],\n        [0x180, 0x1ff],\n        [0x200, 0xeff], // custom\n        [0xf00, 0xfff], // impl\n    ],\n    const: [\n        [0x100, 0x17f],\n        [0x180, 0x1ff],\n        [0x200, 0xeff], // custom\n        [0xf00, 0xfff], // impl\n    ],\n    command: [\n        [0x000, 0x07f],\n        [0x080, 0xeff],\n        [0xf00, 0xfff],\n    ],\n    report: [\n        [0x000, 0x07f],\n        [0x080, 0xeff],\n        [0xf00, 0xfff],\n    ],\n    event: [\n        [0x00, 0x7f], // system\n        [0x80, 0xff],\n    ],\n}\n\nexport function parseServiceSpecificationMarkdownToJSON(\n    filecontent: string,\n    includes?: jdspec.SMap<jdspec.ServiceSpec>,\n    filename = \"\",\n): jdspec.ServiceSpec {\n    filecontent = (filecontent || \"\").replace(/\\r/g, \"\")\n    const info: jdspec.ServiceSpec = {\n        name: \"\",\n        status: \"experimental\",\n        shortId: filename.replace(/\\.md$/, \"\").replace(/.*\\//, \"\"),\n        camelName: \"\",\n        shortName: \"\",\n        extends: [],\n        notes: {},\n        classIdentifier: 0,\n        enums: {},\n        constants: {},\n        packets: [],\n        tags: [],\n    }\n\n    let backticksType: string = null\n    let enumInfo: jdspec.EnumInfo = null\n    let packetInfo: jdspec.PacketInfo = null\n    let pipePacket: jdspec.PacketInfo = null\n    let errors: jdspec.Diagnostic[] = []\n    let lineNo = 0\n    let noteId = \"short\"\n    let lastCmd: jdspec.PacketInfo\n    let packetsToDescribe: jdspec.PacketInfo[]\n    let nextModifier: \"\" | \"segmented\" | \"multi-segmented\" | \"repeats\" = \"\"\n\n    const systemInfo = includes?.[\"_system\"]\n    const usedIds: jdspec.SMap<string> = {}\n    for (const prev of values(includes || {})) {\n        if (prev.catalog && prev.classIdentifier)\n            usedIds[prev.classIdentifier + \"\"] = prev.name\n    }\n\n    try {\n        if (includes[\"_system\"] && includes[\"_base\"]) processInclude(\"_base\")\n        for (const line of filecontent.split(/\\n/)) {\n            lineNo++\n            processLine(line)\n        }\n    } catch (e) {\n        error(\"exception: \" + e.message)\n    }\n\n    if (errors.length) info.errors = errors\n\n    for (const k of Object.keys(info.notes))\n        info.notes[k] = normalizeMD(info.notes[k])\n    for (const v of info.packets) v.description = normalizeMD(v.description)\n\n    if (!info.camelName)\n        info.camelName = camelize(\n            info.name\n                .replace(/\\s+/g, \" \")\n                .replace(/[ -](.)/g, (f, l) => l.toUpperCase())\n                .replace(/[^\\w]+/g, \"_\"),\n        )\n    if (!info.shortName) info.shortName = info.camelName\n\n    if (info.camelName == \"system\") info.classIdentifier = 0x1fff_fff1\n    else if (info.camelName == \"base\") info.classIdentifier = 0x1fff_fff3\n    else if (info.camelName == \"sensor\") info.classIdentifier = 0x1fff_fff2\n\n    if (info.shortName != \"control\" && !info.classIdentifier)\n        error(\"identifier: not specified\")\n\n    info.packets.forEach(pkt => (pkt.packFormat = packFormat(info, pkt)))\n\n    return info\n\n    function processLine(line: string) {\n        if (backticksType) {\n            if (line.trim() == \"```\") {\n                const prev = backticksType\n                backticksType = null\n                if (prev == \"default\") return\n            }\n        } else {\n            const m = /^```(.*)/.exec(line)\n            if (m) {\n                backticksType = m[1] || \"default\"\n                // if we just switched into code section, don't interpret this line and don't add to any description\n                if (backticksType == \"default\") return\n            }\n        }\n\n        const interpret =\n            backticksType == \"default\" ||\n            (backticksType == null && line.slice(0, 4) == \"    \")\n\n        if (!interpret) {\n            const m = /^(#+)\\s*(.*)/.exec(line)\n            if (m) {\n                const [, hd, cont] = m\n                packetsToDescribe = null\n                const newNoteId = cont.trim().toLowerCase()\n                if (hd == \"#\" && !info.name) {\n                    info.name = cont.trim()\n                    line = \"\"\n                } else if (\n                    newNoteId == \"registers\" ||\n                    newNoteId == \"commands\" ||\n                    newNoteId == \"events\" ||\n                    newNoteId == \"examples\"\n                ) {\n                    noteId = newNoteId\n                    line = \"\"\n                } else {\n                    if (noteId == \"short\") noteId = \"long\"\n                    // keep line\n                }\n            }\n\n            if (packetsToDescribe) {\n                for (const iface of packetsToDescribe)\n                    iface.description += line + \"\\n\"\n            } else {\n                if (line || info.notes[noteId]) {\n                    if (!info.notes[noteId]) info.notes[noteId] = \"\"\n                    info.notes[noteId] += line + \"\\n\"\n                }\n            }\n        } else {\n            if (packetsToDescribe && packetsToDescribe[0].description)\n                packetsToDescribe = null\n            const expanded = line\n                .replace(/\\/\\/.*/, \"\")\n                .replace(/[?@:=,{};]/g, s => \" \" + s + \" \")\n                .trim()\n            if (!expanded) return\n            const words = expanded.split(/\\s+/)\n            if (/^[;,]/.test(words[words.length - 1])) words.pop()\n            let cmd = words[0]\n            // allow for `command = Foo.Bar` etc (ie. command is not a keyword there)\n            if (words[1] == \":\" || words[1] == \"=\") cmd = \":\"\n            switch (cmd) {\n                case \"type\":\n                case \"enum\":\n                case \"flags\":\n                    startEnum(words)\n                    break\n                case \"define\":\n                    constant(words)\n                    break\n                case \"meta\":\n                case \"pipe\":\n                case \"report\":\n                case \"command\":\n                case \"const\":\n                case \"ro\":\n                case \"rw\":\n                case \"event\":\n                case \"client\":\n                case \"volatile\":\n                case \"lowlevel\":\n                case \"unique\":\n                case \"restricted\":\n                case \"packed\":\n                    startPacket(words)\n                    break\n                case \"}\":\n                    if (packetInfo) {\n                        finishPacket()\n                    } else if (enumInfo) {\n                        enumInfo = null\n                    } else {\n                        error(\"nothing to end here\")\n                    }\n                    break\n                default:\n                    if (packetInfo) packetField(words)\n                    else if (enumInfo) enumMember(words)\n                    else metadataMember(words)\n            }\n        }\n    }\n\n    function finishPacket() {\n        const paderr = paddingError(packetInfo)\n        if (paderr) {\n            if (!packetInfo.packed)\n                error(\n                    `${paderr} in ${packetInfo.kind} ${packetInfo.name}; you can also add 'packed' attribute`,\n                )\n        } else {\n            if (packetInfo.packed)\n                error(\n                    `${packetInfo.kind} ${packetInfo.name} has unnecessary 'packed' attribute`,\n                )\n        }\n\n        let repeats = false\n        let hadzero = false\n        for (const p of packetInfo.fields) {\n            if (hadzero) {\n                error(\n                    `field ${p.name} in ${packetInfo.kind} ${packetInfo.name} follows a variable-sized field`,\n                )\n                break\n            }\n            if (p.startRepeats) {\n                if (repeats)\n                    error(\n                        `repeats: can only be specified once; in ${packetInfo.kind} ${packetInfo.name}`,\n                    )\n                repeats = true\n            }\n            if (p.storage == 0 && p.type != \"string0\") {\n                if (repeats) {\n                    error(\n                        `variable-sized field ${p.name} in ${packetInfo.kind} ${packetInfo.name} cannot repeat`,\n                    )\n                    break\n                }\n                hadzero = true\n            }\n        }\n\n        const pid = packetInfo.identifier\n        const ranges = identifierRanges[packetInfo.kind]\n        if (\n            packetInfo.name != \"set_register\" &&\n            packetInfo.name != \"get_register\" &&\n            ranges &&\n            !ranges.some(range => range[0] <= pid && pid <= range[1])\n        )\n            error(\n                `${packetInfo.name} identifier ${toHex(\n                    pid,\n                )} out of range, expected in ${ranges\n                    .map(range => `[${range.map(toHex).join(\", \")}]`)\n                    .join(\", \")}`,\n            )\n\n        // additional checks for specific packets\n        if (\n            [\n                \"reading_error\",\n                \"min_reading\",\n                \"max_reading\",\n                \"reading_resolution\",\n            ].indexOf(packetInfo.identifierName) > -1\n        ) {\n            const regid = packetInfo.identifierName\n            if (packetInfo.fields.length > 1) error(`${regid} must be a number`)\n            const reading = info.packets.find(\n                pkt => pkt.kind === \"ro\" && pkt.identifierName === \"reading\",\n            )\n            if (!reading) error(`${regid} register without a reading register`)\n            else if (packetInfo.fields[0].unit !== reading.fields[0].unit)\n                error(\n                    `${regid} unit (${packetInfo.fields[0].unit}) and reading unit (${reading.fields[0].unit}) must match`,\n                )\n        }\n\n        packetInfo = null\n    }\n\n    function normalizeMD(md: string) {\n        return md.replace(/^\\s+/, \"\").replace(/\\s+$/, \"\")\n    }\n\n    function checkBraces(words: string[]) {\n        if (enumInfo || packetInfo) error(\"already in braces\")\n        if (words) {\n            if (words[2] != \"{\") error(`expecting: ${words[0]} NAME {`)\n        }\n\n        enumInfo = null\n        packetInfo = null\n    }\n\n    function forceSection(sectionId: string) {\n        if (noteId != sectionId) {\n            error(`this is only allowed in ## ${sectionId} not in ## ${noteId}`)\n        }\n    }\n\n    function generalKind(k: jdspec.PacketKind): jdspec.PacketKind {\n        switch (k) {\n            case \"const\":\n            case \"ro\":\n            case \"rw\":\n                return \"rw\"\n            default:\n                return k\n        }\n    }\n\n    function startPacket(words: string[]) {\n        checkBraces(null)\n\n        let client: boolean = undefined\n        let lowLevel: boolean = undefined\n        let restricted: boolean = undefined\n        let unique: boolean = undefined\n        let internal: boolean = undefined\n        let volatile: boolean = undefined\n        let packed: boolean = undefined\n\n        function processAttributes() {\n            while (words.length) {\n                if (words[0] === \"restricted\") {\n                    restricted = true\n                } else if (words[0] === \"client\") {\n                    client = true\n                } else if (words[0] === \"lowlevel\") {\n                    lowLevel = true\n                } else if (words[0] === \"unique\") {\n                    unique = true\n                } else if (words[0] === \"internal\") {\n                    internal = true\n                } else if (words[0] === \"volatile\") {\n                    volatile = true\n                } else if (words[0] === \"packed\") {\n                    packed = true\n                } else {\n                    break\n                }\n                words.shift()\n            }\n        }\n\n        processAttributes()\n\n        const kindSt = words.shift()\n        let kind: jdspec.PacketKind = \"command\"\n        if (kindSt == \"meta\") {\n            forceSection(\"commands\")\n            let w2 = words.shift()\n            if (w2 == \"pipe\") w2 = words.shift()\n            if (w2 == \"report\" || w2 == \"command\")\n                kind = (\"meta_pipe_\" + w2) as any\n            else error(\"invalid token after meta\")\n        } else if (kindSt == \"pipe\") {\n            forceSection(\"commands\")\n            const w2 = words.shift()\n            if (w2 == \"report\" || w2 == \"command\") kind = (\"pipe_\" + w2) as any\n            else error(\"invalid token after pipe\")\n        } else {\n            kind = kindSt as any\n        }\n\n        processAttributes()\n\n        if (unique && kind !== \"command\")\n            error(\"unique only applies to commands\")\n\n        if (volatile && kind != \"ro\" && kind != \"rw\")\n            error(\"volatile can only modify ro or rw\")\n\n        let name = words.shift()\n        const isReport = kind == \"report\"\n        if (isReport && lastCmd && !/^\\w+$/.test(name)) {\n            words.unshift(name)\n            name = lastCmd.name\n        }\n\n        packetInfo = {\n            kind,\n            name: normalizeName(name),\n            identifier: undefined,\n            description: \"\",\n            fields: [],\n            internal,\n            client,\n            lowLevel,\n            unique,\n            volatile,\n            restricted,\n            packed,\n        }\n        if (isReport && lastCmd && name == lastCmd.name) {\n            packetInfo.secondary = true\n            lastCmd.hasReport = true\n        }\n        if (!packetsToDescribe) packetsToDescribe = []\n        packetsToDescribe.push(packetInfo)\n        if (words[0] == \"?\") {\n            words.shift()\n            packetInfo.optional = true\n        }\n\n        const prev = info.packets.filter(p => p.name == packetInfo.name)\n        if (prev.length == 0) {\n            // OK\n        } else if (\n            prev.length == 1 &&\n            prev[0].kind == \"command\" &&\n            packetInfo.kind == \"report\"\n        ) {\n            // OK\n        } else {\n            error(`packet redefinition ${prev.map(p => p.name).join(\", \")} `)\n        }\n\n        if (/pipe/.test(kind)) {\n            if (!pipePacket)\n                error(\n                    \"pipe definitions can only occur after the pipe-open packet\",\n                )\n            else packetInfo.pipeType = pipePacket.pipeType\n        }\n\n        const atat = words.indexOf(\"@\")\n        if (kind == \"pipe_command\" || kind == \"pipe_report\") {\n            // no identifier\n            packetInfo.identifier = 0\n        } else if (atat >= 0) {\n            const w = words[atat + 1]\n            let v = parseInt(w)\n            let isSet = true\n            if (isNaN(v)) {\n                v = 0\n                isSet = false\n                if (systemInfo) {\n                    const systemPacket = systemInfo.packets.find(\n                        p => p.name == w,\n                    )\n                    if (systemPacket) {\n                        v = systemPacket.identifier\n                        packetInfo.identifierName = w\n                        if (systemPacket.kind != kind)\n                            error(\n                                `kind mismatch on ${w}: ${systemPacket.kind} vs ${kind}`,\n                            )\n                        else isSet = true\n                    } else error(`${w} not found in _system`)\n                } else {\n                    error(`${w} cannot be resolved, since _system is missing`)\n                }\n            }\n\n            // if we are accessing the reading or reading_error register, mark it volatile\n            if (kind === \"ro\" && (v === 0x101 || v === 0x106))\n                packetInfo.volatile = true\n\n            let isUser = false\n            let isSystem = false\n            let isHigh = 0x200 <= v && v <= 0xeff\n            switch (kind) {\n                case \"const\":\n                case \"ro\":\n                    forceSection(\"registers\")\n                    isSystem = 0x100 <= v && v <= 0x17f\n                    isUser = 0x180 <= v && v <= 0x1ff\n                    break\n                case \"rw\":\n                    forceSection(\"registers\")\n                    isSystem = 0x00 <= v && v <= 0x7f\n                    isUser = 0x80 <= v && v <= 0xff\n                    break\n                case \"report\":\n                case \"command\":\n                    forceSection(\"commands\")\n                    isSystem = 0x00 <= v && v <= 0x7f\n                    isUser = 0x80 <= v && v <= 0xff\n                    isHigh = 0x100 <= v && v <= 0xeff\n                    break\n                case \"event\":\n                    forceSection(\"events\")\n                    isSystem = 0x00 <= v && v <= 0x7f\n                    isUser = 0x80 <= v && v <= 0xff\n                    break\n            }\n\n            if (isUser) {\n                // ok\n            } else if (isSystem) {\n                if (!packetInfo.identifierName)\n                    warn(\n                        `${kind} @ ${toHex(\n                            v,\n                        )} should be expressed with a name from _system.md`,\n                    )\n            } else if (isHigh) {\n                if (!info.highCommands)\n                    warn(\n                        `${kind} @ ${toHex(\n                            v,\n                        )} is from the extended range but 'high: 1' missing`,\n                    )\n            }\n\n            packetInfo.identifier = v\n            words.splice(atat, 2)\n        } else {\n            if (isReport && lastCmd) packetInfo.identifier = lastCmd.identifier\n            else error(`@ not found at ${packetInfo.name}`)\n        }\n\n        if (\n            info.packets.some(\n                p =>\n                    generalKind(p.kind) == generalKind(packetInfo.kind) &&\n                    (!/pipe/.test(p.kind) ||\n                        p.pipeType == packetInfo.pipeType) &&\n                    p.identifier == packetInfo.identifier,\n            )\n        ) {\n            error(\"packet identifier already used\")\n        }\n\n        info.packets.push(packetInfo)\n\n        if (kind == \"command\") lastCmd = packetInfo\n        else lastCmd = null\n\n        if (words[0] == \"=\" || words[0] == \":\") {\n            words.unshift(\"_\")\n            packetField(words)\n            finishPacket()\n        } else {\n            const last = words.shift()\n            if (last == \"{\") {\n                if (words[0] == \"...\") words.shift()\n                if (words[0] == \"}\") {\n                    words.shift()\n                    finishPacket()\n                }\n                if (words.length) error(`excessive tokens: ${words[0]}...`)\n            } else {\n                if (last === undefined && kind == \"event\") {\n                    finishPacket()\n                } else {\n                    error(\"expecting '{'\")\n                }\n            }\n        }\n    }\n\n    function rangeCheck(tp: string, v: number) {\n        const [storage, type, typeShift] = normalizeStorageType(tp)\n\n        if (isNaN(v)) return v // error already reported\n\n        if (storage == 0) {\n            error(`numeric values like ${v} not allowed for ${tp}`)\n            return v\n        }\n\n        if (v < 0 && storage > 0) {\n            error(`negative values like ${v} not allowed for ${tp}`)\n            return v\n        }\n\n        if (Math.floor(v) != v && typeShift == 0) {\n            error(`only integer values allowed for ${tp}; got ${v}`)\n            return v\n        }\n\n        let bits = storage < 0 ? -storage * 8 - 1 : storage * 8\n        bits -= typeShift || 0\n        // don't use bitshift to allow for more than 32 bits\n        let max = 1\n        while (bits--) max *= 2\n        if (-v == max) {\n            // OK - min_int\n        } else if (max == 1 && v == 1) {\n            // we make an exception for u0.8 being set to 1\n        } else {\n            if (Math.abs(v) >= max) {\n                error(`value ${v} is out of range for ${tp}`)\n                return v\n            }\n        }\n\n        return v\n    }\n\n    function parseVal(words: string[]) {\n        const eq = words.shift()\n        if (eq != \"=\" && eq != \":\") error(\"expecting '='\")\n        const val = words.shift()\n        return parseIntCheck(val, true)\n    }\n\n    function constant(words: string[]) {\n        if (words.length != 3) {\n            error(`define syntax is \"define name value\" (${words.join(\" \")}}`)\n            return\n        }\n\n        const name = words[1]\n        const svalue = words[2]\n\n        const hex = /^0x/.test(svalue)\n        const value = hex ? parseInt(svalue, 16) : parseInt(svalue)\n        if (isNaN(value)) {\n            error(\"invalid numeric value for constant\")\n            return\n        }\n        info.constants[name] = { value, hex }\n    }\n\n    function packetField(words: string[]) {\n        if (\n            words.length == 2 &&\n            (words[0] == \"repeats\" ||\n                words[0] == \"segmented\" ||\n                words[0] == \"multi-segmented\")\n        ) {\n            nextModifier = words[0]\n            return\n        }\n        const name = normalizeName(words.shift())\n        let defaultValue: number = undefined\n        let isOptional: boolean = undefined\n        let op = words.shift()\n        if (op == \"?\") {\n            isOptional = true\n            op = words.shift()\n        }\n        if (op == \"=\") {\n            defaultValue = parseIntCheck(words.shift(), true)\n            op = words.shift()\n        }\n\n        if (op != \":\") error(\"expecting ':'\")\n\n        const tp = words.shift()\n        const [storage, type, typeShift] = normalizeStorageType(tp)\n        const isFloat = typeShift === null || undefined\n\n        let tok = words.shift()\n        let unit: jdspec.Unit\n        let encoding: jdspec.Encoding\n        if (tok != \"{\") {\n            if (type === \"string\" || type === \"bytes\")\n                encoding = normalizeEncoding(tok)\n            else unit = normalizeUnit(tok)\n            tok = words.shift()\n        }\n\n        if (defaultValue !== undefined) rangeCheck(tp, defaultValue)\n\n        let shift = typeShift || undefined\n        if (unit == \"/\") {\n            // / units should be used with ui0. data\n            if (!/^(u0|i1)\\.\\d+$/.test(tp))\n                error(\n                    `fraction unit must be used with u0.yyy or i1.yyy data types (got ${tp})`,\n                )\n\n            shift = Math.abs(storage) * 8\n            if (storage < 0) shift -= 1\n        }\n\n        const field: jdspec.PacketMember = {\n            name,\n            unit,\n            encoding,\n            shift,\n            isFloat,\n            type,\n            storage,\n            isSimpleType: canonicalType(storage) == type || undefined,\n            defaultValue,\n            isOptional,\n            multiSegmented: nextModifier == \"multi-segmented\" || undefined,\n            segmented:\n                nextModifier == \"segmented\" ||\n                nextModifier == \"multi-segmented\" ||\n                undefined,\n            startRepeats: nextModifier == \"repeats\" || undefined,\n        }\n\n        if (!unit) delete field.unit\n        if (!encoding) delete field.encoding\n\n        if (tok == \"{\") {\n            while (words.length) {\n                tok = words.shift()\n                if (tok == \"}\") break\n                tok = camelize(tok)\n                switch (tok) {\n                    case \"maxBytes\": {\n                        // eslint-disable-next-line @typescript-eslint/no-extra-semi,@typescript-eslint/no-explicit-any\n                        ;(field as any)[tok] = rangeCheck(\"u8\", parseVal(words))\n                        break\n                    }\n                    case \"typicalMin\":\n                    case \"typicalMax\":\n                    case \"absoluteMin\":\n                    case \"absoluteMax\": {\n                        // eslint-disable-next-line @typescript-eslint/no-extra-semi,@typescript-eslint/no-explicit-any\n                        ;(field as any)[tok] = rangeCheck(tp, parseVal(words))\n                        break\n                    }\n                    case \"preferredInterval\": {\n                        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                        if ((packetInfo as any)[tok] !== undefined)\n                            error(`field ${tok} already set`)\n                            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                        ;(packetInfo as any)[tok] = rangeCheck(\n                            \"u32\",\n                            parseVal(words),\n                        )\n                        break\n                    }\n                    default:\n                        error(\"unknown constraint: \" + tok)\n                        break\n                }\n                if (words[0] == \",\") words.shift()\n            }\n            if (tok == \"}\") tok = null\n        }\n\n        if (tok) error(`excessive tokens at the end of member: ${tok}...`)\n\n        if (\n            field.typicalMin === undefined &&\n            field.typicalMax !== undefined &&\n            storage > 0\n        )\n            field.typicalMin = 0\n\n        if (\n            field.absoluteMin === undefined &&\n            field.absoluteMax !== undefined &&\n            storage > 0\n        )\n            field.absoluteMin = 0\n\n        if (!field.storage && field.maxBytes) field.storage = field.maxBytes\n\n        if (/pipe/.test(type)) {\n            packetInfo.pipeType = packetInfo.name\n            if (\n                pipePacket &&\n                pipePacket.name == packetInfo.name &&\n                packetInfo.kind == \"report\"\n            ) {\n                // keep old pipePacket\n            } else {\n                pipePacket = packetInfo\n            }\n        }\n\n        if (\n            !field.isOptional &&\n            packetInfo.fields[packetInfo.fields.length - 1]?.isOptional\n        ) {\n            error(`all fields after an optional field have to optional`)\n        }\n\n        packetInfo.fields.push(field)\n        nextModifier = undefined\n    }\n\n    function startEnum(words: string[]) {\n        checkBraces(null)\n        let isClosed = false\n        if (words[0] == \"type\") {\n            if (words[2] != \":\") error(\"expecting: type NAME : TYPE\")\n            if (!words[4]) isClosed = true\n            else if (words[4] == \"{\") {\n                if (words[5] == \"}\") isClosed = true\n                else if (words[5]) error(\"excessive syntax\")\n            } else {\n                error(\"expecting {\")\n            }\n        } else {\n            if (words[2] != \":\" || words[4] != \"{\")\n                error(\"expecting: enum NAME : TYPE {\")\n        }\n        enumInfo = {\n            name: normalizeName(words[1]),\n            storage: normalizeStorageType(words[3])[0],\n            isFlags: words[0] == \"flags\" || undefined,\n            isExtensible: words[0] == \"type\" || undefined,\n            members: {},\n        }\n        if (info.enums[enumInfo.name]) error(\"enum redefinition\")\n        info.enums[enumInfo.name] = enumInfo\n        if (isClosed) enumInfo = null\n    }\n\n    function enumMember(words: string[]) {\n        if (words[1] != \"=\" || words.length != 3)\n            error(`expecting: FIELD_NAME = INTEGER`)\n        enumInfo.members[normalizeName(words[0])] = rangeCheck(\n            canonicalType(enumInfo.storage),\n            parseIntCheck(words[2]),\n        )\n    }\n\n    function parseIntCheck(w: string, allowFloat = false) {\n        try {\n            return parseIntFloat(info, w, allowFloat)\n        } catch (e) {\n            error(e.message)\n            return 0\n        }\n    }\n\n    function looksRandom(n: number) {\n        const s = n.toString(16)\n        const h = \"0123456789abcdef\"\n        for (let i = 0; i < h.length; ++i) {\n            const hh = h[i]\n            if (s.indexOf(hh + hh + hh) >= 0) return false\n        }\n        if (/f00d|dead|deaf|beef/.test(s)) return false\n        return true\n    }\n\n    function genRandom() {\n        for (;;) {\n            const m = (Math.random() * 0xfff_ffff) | 0x1000_0000\n            if (looksRandom(m)) return m\n        }\n    }\n\n    function metadataMember(words: string[]) {\n        if (\n            !(\n                (words[1] == \"=\" || words[1] == \":\") &&\n                (words[0] == \"tags\" || words.length == 3)\n            )\n        )\n            error(`expecting: FIELD_NAME = VALUE or FIELD_NAME : VALUE`)\n        switch (words[0]) {\n            case \"extends\":\n                processInclude(words[2])\n                break\n            case \"class\":\n            case \"identifier\": {\n                info.classIdentifier = parseIntCheck(words[2])\n                if (info.name != \"Control\" && info.classIdentifier == 0)\n                    info.classIdentifier = 1\n                const gen = `how about ${toHex(genRandom())}`\n                if (\n                    !(\n                        info.classIdentifier == 0 ||\n                        (0x1000_0001 <= info.classIdentifier &&\n                            info.classIdentifier <= 0x1fff_ff00) ||\n                        (0x2000_0001 <= info.classIdentifier &&\n                            info.classIdentifier <= 0x2ffff_ff00)\n                    )\n                )\n                    error(`class identifier out of range; ${gen}`)\n                if (!looksRandom(info.classIdentifier))\n                    error(`class identifier doesn't look random; ${gen}`)\n                if (usedIds[info.classIdentifier + \"\"])\n                    error(\n                        `class identifier ${toHex(\n                            info.classIdentifier,\n                        )} already used in ${\n                            usedIds[info.classIdentifier + \"\"]\n                        }; ${gen}`,\n                    )\n                break\n            }\n            case \"camel\":\n                info.camelName = words[2]\n                break\n            case \"short\":\n                info.shortName = words[2]\n                break\n            case \"high\":\n                info.highCommands = !!parseIntCheck(words[2])\n                break\n            case \"status\":\n                if (\n                    [\"stable\", \"experimental\", \"deprecated\", \"rc\"].indexOf(\n                        words[2],\n                    ) > -1\n                )\n                    info.status = <any>words[2]\n                else error(\"unknown status\")\n                break\n            case \"group\":\n                info.group = capitalize(words.slice(2).join(\" \"))\n                break\n            case \"restricted\":\n                if (words[2] == \"true\") info.restricted = true\n                else if (words[2] == \"false\") delete info.restricted\n                else error(\"restricted: should be true or false\")\n                break\n            case \"tags\": {\n                const tags = words.slice(2).filter(w => w != \",\" && w != \";\")\n                info.tags = info.tags.concat(tags)\n                break\n            }\n            default:\n                error(\"unknown metadata field: \" + words[0])\n                break\n        }\n    }\n\n    function processInclude(name: string) {\n        if (name == \"_system\") return\n        const inner = includes[name]\n        if (!inner) return error(\"include file not found: \" + name)\n        if (\n            info.packets.some(pkt => !pkt.derived) ||\n            values(info.enums).some(e => !e.derived)\n        )\n            error(\"extends: only allowed on top of the .md file\")\n        if (inner.errors) errors = errors.concat(inner.errors)\n        const innerEnums = clone(inner.enums)\n        Object.keys(innerEnums)\n            .filter(k => !info.enums[k])\n            .forEach(k => {\n                const ie = innerEnums[k]\n                ie.derived = name\n                info.enums[k] = ie\n            })\n        const innerPackets = clone(\n            inner.packets.filter(\n                pkt =>\n                    !info.packets.find(\n                        ipkt =>\n                            ipkt.kind === pkt.kind &&\n                            ipkt.identifier === pkt.identifier,\n                    ),\n            ),\n        )\n        innerPackets.forEach(pkt => (pkt.derived = name))\n        info.packets = [...info.packets, ...innerPackets]\n        if (inner.highCommands) info.highCommands = true\n        info.extends = inner.extends.concat([name])\n    }\n\n    function clone<T>(v: T): T {\n        return JSON.parse(JSON.stringify(v))\n    }\n\n    function error(msg: string) {\n        if (!msg) msg = \"syntax error\"\n        if (errors.some(e => e.line == lineNo && e.message == msg)) return\n        errors.push({ file: filename, line: lineNo, message: msg })\n    }\n\n    function warn(msg: string) {\n        if (info.camelName == \"system\") return // no warnings in _system\n        if (errors.some(e => e.line == lineNo && e.message == msg)) return\n        errors.push({ file: filename, line: lineNo, message: msg })\n    }\n\n    function normalizeName(n: string) {\n        if (!/^\\w+$/.test(n)) error(\"expecting name here\")\n        if (n.length > 31) error(`name '${n}' too long`)\n        return n\n    }\n\n    function normalizeStorageType(\n        tp: string,\n    ): [jdspec.StorageType, string, number] {\n        if (info.enums[tp]) return [info.enums[tp].storage, tp, 0]\n        if (!tp) error(\"expecting type here\")\n        const tp2 = tp.replace(/_t$/, \"\").toLowerCase()\n        const m = /^([ui])(\\d+)\\.(\\d+)$/.exec(tp2)\n        if (m) {\n            const a = parseIntCheck(m[2])\n            const b = parseIntCheck(m[3])\n            const len = a + b\n            if (!(len == 8 || len == 16 || len == 32 || len == 64))\n                error(`fixed point ${tp} can't be ${len} bits`)\n            if (a == 0 && m[1] == \"i\")\n                error(\n                    `fixed point ${tp} can't be i0.X; has to be at least i1.X`,\n                )\n            return [(m[1] == \"i\" ? -1 : 1) * (len >> 3), tp2, b]\n        }\n\n        switch (tp2) {\n            case \"bool\":\n                return [1, tp2, 0]\n            case \"i8\":\n            case \"u8\":\n            case \"i16\":\n            case \"u16\":\n            case \"i32\":\n            case \"u32\":\n            case \"i64\":\n            case \"u64\": {\n                let sz = parseIntCheck(tp2.replace(/^./, \"\")) >> 3\n                if (tp2[0] == \"i\") sz = -sz\n                return [sz, tp2, 0]\n            }\n            case \"f16\":\n                return [2, tp2, null]\n            case \"f32\":\n                return [4, tp2, null]\n            case \"f64\":\n                return [8, tp2, null]\n            case \"pipe\":\n                return [12, tp2, 0]\n            case \"pipe_port\":\n                return [2, tp2, 0]\n            case \"devid\":\n                return [8, tp2, 0]\n            case \"bytes\":\n            case \"string\":\n            case \"string0\":\n                return [0, tp2, 0]\n            default: {\n                const m = /^u8\\[(\\d+)\\]$/.exec(tp2)\n                if (m) return [parseIntCheck(m[1]), tp2, 0]\n                error(\"unknown type: \" + tp + \" \" + tp2)\n                return [4, tp2, 0]\n            }\n        }\n    }\n\n    function normalizeEncoding(unit: string): jdspec.Encoding {\n        return (unit && encodings[unit.toLowerCase()]) || undefined\n    }\n\n    function normalizeUnit(unit: string): jdspec.Unit {\n        if (unit === undefined || unit === null) return undefined\n\n        if (unitDescription[unit] || secondaryUnitConverters[unit])\n            return unit as jdspec.Unit\n        error(`expecting unit, got '${unit}'`)\n        return undefined\n    }\n\n    function paddingError(iface: jdspec.PacketInfo): string {\n        let byteOffset = 0\n\n        for (const m of iface.fields) {\n            const sz = memberSize(m)\n            if (sz == 0) break // no checking after zero-sized element\n            const pad = m.type == \"bytes\" ? 1 : sz > 8 ? 8 : sz\n            if (!/^u8\\[/.test(m.type) && byteOffset % pad != 0)\n                return `need padding of ${\n                    pad - (byteOffset % pad)\n                } byte(s) before ${m.name}`\n            byteOffset += sz\n        }\n\n        return null\n    }\n}\n\nfunction values<T>(o: jdspec.SMap<T>): T[] {\n    const r: T[] = []\n    for (const k of Object.keys(o)) r.push(o[k])\n    return r\n}\n\nfunction toUpper(name: string) {\n    return name\n        ?.replace(/([a-z])([A-Z])/g, (x, a, b) => a + \"_\" + b)\n        .toUpperCase()\n}\n\nfunction toLower(name: string) {\n    return name\n        ?.replace(/([a-z])([A-Z])/g, (x, a, b) => a + \"_\" + b)\n        .toLowerCase()\n}\n\nfunction packed(iface: jdspec.PacketInfo) {\n    if (!iface.packed) return \"\"\n    else return \" __attribute__((packed))\"\n}\n\nexport function cStorage(tp: jdspec.StorageType) {\n    if (tp == 0 || [1, 2, 4, 8].indexOf(Math.abs(tp)) < 0) return \"bytes\"\n    if (tp < 0) return `int${-tp * 8}_t`\n    else return `uint${tp * 8}_t`\n}\n\nfunction cSharpStorage(tp: jdspec.StorageType) {\n    if (tp == 0 || [1, 2, 4, 8].indexOf(Math.abs(tp)) < 0) return \"bytes\"\n    switch (tp) {\n        case -1:\n            return \"sbyte\"\n        case 1:\n            return \"byte\"\n        case -2:\n            return \"short\"\n        case 2:\n            return \"ushort\"\n        case -4:\n            return \"int\"\n        case 4:\n            return \"uint\"\n    }\n    return `unknown({${tp})`\n}\n\nfunction canonicalType(tp: jdspec.StorageType): string {\n    if (tp == 0) return \"bytes\"\n    if (tp < 0) return `i${-tp * 8}`\n    else return `u${tp * 8}`\n}\n\nfunction isRegister(k: jdspec.PacketKind) {\n    return k == \"ro\" || k == \"rw\" || k == \"const\"\n}\n\nfunction toHex(n: number): string {\n    if (n === undefined) return \"\"\n    if (n < 0) return \"-\" + toHex(n)\n    return \"0x\" + n.toString(16)\n}\n\nfunction unitPref(f: jdspec.PacketMember) {\n    if (!f.unit) return \"\"\n    else return prettyUnit(f.unit) + \" \"\n}\n\nfunction prettyUnit(u: jdspec.Unit): string {\n    switch (u) {\n        case \"us\":\n            return \"\u03BCs\"\n        case \"C\":\n            return \"\u00B0C\"\n        case \"/\":\n            return \"ratio\"\n        default:\n            return u\n    }\n}\n\nfunction toPython(info: jdspec.ServiceSpec, language: \"py\" | \"cpy\" | \"mpy\") {\n    const r = [`# Autogenerated constants for ${info.name} service`]\n    if (Object.keys(info.enums).length) r.push(\"from enum import IntEnum\")\n    const docsLength = r.length\n    const desktop = language === \"py\"\n    const packFormats: Record<string, string> = {}\n\n    if (desktop) r.push(\"from jacdac.constants import *\")\n\n    let pref = \"JD_\" + toUpper(info.shortName) + \"_\"\n\n    if (info.shortId[0] == \"_\") pref = \"JD_\"\n\n    if (info.shortId[0] != \"_\")\n        r.push(\n            `JD_SERVICE_CLASS_${toUpper(info.shortName)} = const(${toHex(\n                info.classIdentifier,\n            )})`,\n        )\n    for (const cst in info.constants) {\n        const { value, hex } = info.constants[cst]\n        r.push(\n            `JD_${toUpper(cst)} = const(${\n                hex ? value.toString() : toHex(value)\n            })\\n`,\n        )\n    }\n\n    if (Object.keys(info.enums).length) {\n        for (const en of values(info.enums).filter(en => !en.derived)) {\n            r.push(\"\")\n            r.push(\"\")\n            r.push(\n                `class ${upperCamel(info.shortName)}${upperCamel(\n                    en.name,\n                )}(IntEnum):`,\n            )\n            for (const k of Object.keys(en.members))\n                r.push(`    ${toUpper(k)} = const(${toHex(en.members[k])})`)\n        }\n        r.push(\"\")\n        r.push(\"\")\n    }\n    let useIdentifiers = false\n    for (const pkt of info.packets) {\n        if (pkt.derived) continue\n        if (\n            !pkt.secondary &&\n            pkt.kind != \"pipe_command\" &&\n            pkt.kind != \"pipe_report\"\n        ) {\n            let inner = \"CMD\"\n            if (isRegister(pkt.kind)) inner = \"REG\"\n            else if (pkt.kind == \"event\") inner = \"EV\"\n            else if (\n                pkt.kind == \"meta_pipe_command\" ||\n                pkt.kind == \"meta_pipe_report\"\n            )\n                inner = \"PIPE\"\n            let val = toHex(pkt.identifier)\n            if (pkt.identifierName) {\n                // TODO find identifier and inline it\n                val = \"JD_\" + inner + \"_\" + toUpper(pkt.identifierName)\n                useIdentifiers = true\n            }\n            const name = pref + inner + \"_\" + toUpper(pkt.name)\n            if (name != val) {\n                r.push(`${name} = const(${val})`)\n                if (pkt.packFormat) packFormats[name] = pkt.packFormat\n            }\n        }\n    }\n\n    if (desktop && useIdentifiers)\n        r.splice(docsLength + 1, 0, \"from jacdac.system.constants import *\")\n\n    r.push(`${pref}PACK_FORMATS = {`)\n    r.push(\n        Object.keys(packFormats)\n            .map(k => `    ${k}: \"${packFormats[k]}\"`)\n            .join(\",\\n\"),\n    )\n    r.push(`}`)\n\n    r.push(\"\")\n    return r.join(\"\\n\")\n}\n\nfunction toH(info: jdspec.ServiceSpec) {\n    let r = \"// Autogenerated C header file for \" + info.name + \"\\n\"\n    const hdDef = `_JACDAC_SPEC_${toUpper(info.camelName)}_H`\n    r += `#ifndef ${hdDef}\\n`\n    r += `#define ${hdDef} 1\\n`\n\n    let pref = \"JD_\" + toUpper(info.shortName) + \"_\"\n\n    if (info.shortId[0] == \"_\") pref = \"JD_\"\n\n    r += `\\n#define JD_SERVICE_CLASS_${toUpper(info.shortName)}  ${toHex(\n        info.classIdentifier,\n    )}\\n`\n\n    for (const cst in info.constants) {\n        const { value, hex } = info.constants[cst]\n        r += `#define ${pref}${toUpper(cst)} ${\n            hex ? toHex(value) : value.toString()\n        }\\n`\n    }\n    for (const en of values(info.enums).filter(en => !en.derived)) {\n        const enPref = pref + toUpper(en.name)\n        r += `\\n// enum ${en.name} (${cStorage(en.storage)})\\n`\n        for (const k of Object.keys(en.members))\n            r +=\n                \"#define \" +\n                enPref +\n                \"_\" +\n                toUpper(k) +\n                \" \" +\n                toHex(en.members[k]) +\n                \"\\n\"\n    }\n    for (const pkt of info.packets) {\n        if (pkt.derived) continue\n\n        const cmt = addComment(pkt)\n        r += wrapComment(\"h\", cmt.comment)\n\n        if (\n            !pkt.secondary &&\n            pkt.kind != \"pipe_command\" &&\n            pkt.kind != \"pipe_report\"\n        ) {\n            let inner = \"CMD\"\n            if (isRegister(pkt.kind)) inner = \"REG\"\n            else if (pkt.kind == \"event\") inner = \"EV\"\n            else if (\n                pkt.kind == \"meta_pipe_command\" ||\n                pkt.kind == \"meta_pipe_report\"\n            )\n                inner = \"PIPE\"\n            let val = toHex(pkt.identifier)\n            if (pkt.identifierName)\n                val = \"JD_\" + inner + \"_\" + toUpper(pkt.identifierName)\n            const name = pref + inner + \"_\" + toUpper(pkt.name)\n            if (name != val) r += `#define ${name} ${val}\\n`\n        }\n\n        const isMetaPipe =\n            pkt.kind == \"meta_pipe_report\" || pkt.kind == \"meta_pipe_command\"\n\n        if (cmt.needsStruct || isMetaPipe) {\n            let tname =\n                \"jd_\" + toLower(info.shortName) + \"_\" + toLower(pkt.name)\n            if (pkt.kind == \"report\") tname += \"_report\"\n            r += `typedef struct ${tname} {\\n`\n            if (isMetaPipe) {\n                r += `    uint32_t identifier; // ${toHex(pkt.identifier)}\\n`\n            }\n            let unaligned = \"\"\n            for (let i = 0; i < pkt.fields.length; ++i) {\n                const f = pkt.fields[i]\n                let def = \"\"\n                let cst = cStorage(f.storage)\n                const sz = memberSize(f)\n                if (f.type == \"string\" || f.type == \"string0\")\n                    def = `char ${f.name}[${sz}]`\n                else if (cst == \"bytes\") def = `uint8_t ${f.name}[${sz}]`\n                else {\n                    if (f.isFloat) cst = f.storage == 4 ? \"float\" : \"double\"\n                    def = `${cst} ${f.name}`\n                }\n                // if it's the last field and it start repeats, treat it as an array\n                if (f.startRepeats && i == pkt.fields.length - 1) def += \"[0]\"\n                def += \";\"\n                if (!f.isSimpleType && f.type != \"devid\")\n                    def += \"  // \" + unitPref(f) + f.type\n                else if (f.unit) def += \" // \" + prettyUnit(f.unit)\n                r += \"    \" + unaligned + def + \"\\n\"\n                if (f.type == \"string0\") unaligned = \"// \"\n            }\n            r += `}${packed(pkt)} ${tname}_t;\\n\\n`\n        }\n    }\n    r += \"\\n#endif\\n\"\n    return r\n}\n\nexport function camelize(name: string) {\n    if (!name) return name\n    return (\n        name[0].toLowerCase() +\n        name\n            .slice(1)\n            .replace(/\\s+/g, \"_\")\n            .replace(/_([a-z0-9])/gi, (_, l) => l.toUpperCase())\n    )\n}\n\nexport function capitalize(name: string) {\n    if (!name) return name\n    return name[0].toUpperCase() + name.slice(1)\n}\n\nfunction upperCamel(name: string) {\n    name = camelize(name)\n    if (!name?.length) return name\n    return name[0].toUpperCase() + name.slice(1)\n}\n\nexport function snakify(name: string) {\n    return name\n        ?.replace(/([a-z])([A-Z])/g, (_, a, b) => a + \"_\" + b)\n        .replace(/\\s+/g, \"_\")\n}\n\nexport function dashify(name: string) {\n    if (!name) return name\n    return snakify(name.replace(/^_+/, \"\"))\n        .replace(/(_|\\s)+/g, \"-\")\n        .toLowerCase()\n}\n\nexport function humanify(name: string) {\n    return name\n        ?.replace(/([a-z])([A-Z])/g, (_, a, b) => a + \" \" + b)\n        .replace(/(-|_)/g, \" \")\n}\n\nexport function addComment(pkt: jdspec.PacketInfo) {\n    let comment = \"\"\n\n    let typeInfo = \"\"\n    let needsStruct = false\n    if (pkt.fields.length == 0) {\n        if (pkt.kind != \"event\") typeInfo = \"No args\"\n    } else if (pkt.fields.length == 1 && !pkt.fields[0].startRepeats) {\n        const f0 = pkt.fields[0]\n        typeInfo = cStorage(f0.storage)\n        if (!f0.isSimpleType) typeInfo = f0.type + \" (\" + typeInfo + \")\"\n        typeInfo = unitPref(f0) + typeInfo\n        if (f0.name != \"_\") typeInfo = f0.name + \" \" + typeInfo\n    } else {\n        needsStruct = true\n    }\n\n    if (pkt.fields.length == 1) {\n        if (isRegister(pkt.kind)) {\n            let info = \"\"\n            if (pkt.kind == \"ro\") info = \"Read-only\"\n            else if (pkt.kind == \"const\") info = \"Constant\"\n            else info = \"Read-write\"\n            if (typeInfo) typeInfo = info + \" \" + typeInfo\n            else typeInfo = info\n        } else if (typeInfo) {\n            typeInfo = \"Argument: \" + typeInfo\n        }\n    }\n\n    if (pkt.kind == \"report\" && pkt.secondary) {\n        comment += \"Report: \" + typeInfo + \"\\n\"\n    } else {\n        if (pkt.description) {\n            let desc = pkt.description.replace(/\\n\\n[^]*/, \"\")\n            if (typeInfo) desc = typeInfo + \". \" + desc\n            comment = desc + \"\\n\" + comment\n        }\n    }\n\n    return {\n        comment,\n        needsStruct,\n    }\n}\n\nexport function wrapComment(lang: string, comment: string) {\n    if (lang === \"cs\")\n        return (\n            \"\\n/// <summary>\\n/// \" +\n            comment.replace(/\\n+$/, \"\").replace(/\\n/g, \"\\n/// \") +\n            \"\\n/// </summary>\\n\"\n        )\n    else\n        return (\n            \"\\n/**\\n * \" +\n            comment.replace(/\\n+$/, \"\").replace(/\\n/g, \"\\n * \") +\n            \"\\n */\\n\"\n        )\n}\n\nexport function wrapSnippet(code: string) {\n    if (!code) return code\n    return `\n\\`\\`\\`\n${code.replace(/^\\n+/, \"\").replace(/\\n+$/, \"\")}\n\\`\\`\\`\n`\n}\n\nexport const TYPESCRIPT_STATIC_NAMESPACE = \"jacdac\"\nfunction packFormatForField(\n    info: jdspec.ServiceSpec,\n    fld: jdspec.PacketMember,\n    isStatic?: boolean,\n    useBooleans?: boolean,\n) {\n    const sz = memberSize(fld)\n    const szSuff = sz ? `[${sz}]` : ``\n    let tsType = \"number\"\n    let pyType = \"float\"\n    let csType = \"float\"\n    let fmt = \"\"\n    if (/^[fiu]\\d+(\\.\\d+)?$/.test(fld.type) && 1 <= sz && sz <= 8) {\n        fmt = fld.type\n        if (/^[iu]\\d+$/.test(fld.type)) {\n            pyType = \"int\"\n            csType = \"int\"\n        }\n        if (/^[u]\\d+$/.test(fld.type)) {\n            csType = \"uint\"\n        }\n    } else if (/^u8\\[\\d*\\]$/.exec(fld.type)) {\n        fmt = \"b\" + szSuff\n    } else if (info.enums[fld.type]) {\n        fmt = canonicalType(info.enums[fld.type].storage)\n        pyType =\n            tsType =\n            csType =\n                upperCamel(info.camelName) + upperCamel(fld.type)\n        if (isStatic) tsType = TYPESCRIPT_STATIC_NAMESPACE + \".\" + tsType\n    } else {\n        switch (fld.type) {\n            case \"string\":\n                fmt = \"s\" + szSuff\n                csType = tsType = \"string\"\n                pyType = \"str\"\n                break\n            case \"bytes\":\n                fmt = \"b\" + szSuff\n                break\n            case \"string0\":\n                fmt = \"z\"\n                csType = tsType = \"string\"\n                pyType = \"str\"\n                break\n            case \"devid\":\n                fmt = \"b[8]\"\n                break\n            case \"pipe_port\":\n                fmt = \"u16\"\n                break\n            case \"pipe\":\n                fmt = \"b[12]\"\n                break\n            case \"bool\":\n                // TODO native bool support\n                fmt = \"u8\"\n                if (useBooleans) {\n                    tsType = \"boolean\"\n                    csType = pyType = \"bool\"\n                }\n                break\n            default:\n                return null\n        }\n    }\n\n    if (tsType == \"number\" && fmt && fmt[0] == \"b\") {\n        tsType = \"Buffer\"\n        pyType = \"bytes\"\n        csType = \"byte[]\"\n    }\n    return { fmt, tsType, pyType, csType }\n}\n\n/**\n * Generates the format to pack/unpack a data payload for this packet\n * @param pkt\n * TODO fix this\n */\nexport function packFormat(\n    sinfo: jdspec.ServiceSpec,\n    pkt: jdspec.PacketInfo,\n    useBooleans?: boolean,\n): string {\n    if (!pkt.fields?.length) return undefined\n\n    const fmt: string[] = []\n    for (const fld of pkt.fields) {\n        if (fld.startRepeats) fmt.push(\"r:\")\n        const ff = packFormatForField(sinfo, fld, false, useBooleans)\n        if (!ff) return undefined\n        fmt.push(ff.fmt)\n    }\n\n    return fmt.join(\" \")\n}\n\nexport function packInfo(\n    info: jdspec.ServiceSpec,\n    pkt: jdspec.PacketInfo,\n    options?: {\n        isStatic?: boolean\n        useBooleans?: boolean\n        useJDOM?: boolean\n    },\n) {\n    const {\n        isStatic = false,\n        useBooleans = false,\n        useJDOM = false,\n    } = options || {}\n    const { kind } = pkt\n    const vars: string[] = []\n    const vartp: string[] = []\n    const vartppy: string[] = []\n    const vartpcs: string[] = []\n    let fmt = \"\"\n    let repeats: string[]\n    let reptp: string[]\n\n    for (let i = 0; i < pkt.fields.length; ++i) {\n        const fld = pkt.fields[i]\n        let isArray = \"\"\n        if (fld.startRepeats) {\n            if (i == pkt.fields.length - 1) {\n                isArray = \"[]\"\n            } else {\n                fmt += \"r: \"\n                repeats = []\n                reptp = []\n                vars.push(\"rest\")\n            }\n        }\n        const varname = camelize(fld.name == \"_\" ? pkt.name : fld.name)\n        const f0 = packFormatForField(info, fld, isStatic, useBooleans)\n        if (!f0 || /(reserved|padding)/.test(fld.name)) {\n            if (!f0)\n                console.log(\n                    `${pkt.name}/${fld.name} - can't get format for '${fld.type}'`,\n                )\n            fmt += `x[${memberSize(fld)}] `\n        } else {\n            fmt += f0.fmt + isArray + \" \"\n            let tp = f0.tsType\n            let tpy = f0.pyType\n            let tcs = f0.csType\n            if (tp == \"Buffer\" && !isStatic) {\n                tp = \"Uint8Array\"\n                tpy = \"bytes\"\n                tcs = \"byte[]\"\n            }\n            tp += isArray\n            if (isArray) tpy = \"[\" + tpy + \"]\"\n            if (repeats) {\n                repeats.push(varname)\n                reptp.push(tp)\n            } else {\n                vars.push(varname)\n                vartp.push(tp)\n                vartppy.push(tpy)\n                vartpcs.push(tcs)\n            }\n        }\n    }\n\n    fmt = fmt.replace(/ *$/, \"\")\n\n    if (reptp) vartp.push(\"([\" + reptp.join(\", \") + \"])[]\")\n\n    const pktName = camelize(pkt.name)\n    let buffers = \"\"\n    if (useJDOM) {\n        if (kind === \"command\") {\n            for (let i = 0; i < vars.length; ++i)\n                buffers += `const ${vars[i]}: ${vartp[i]} = ...\\n`\n            buffers += `await service.sendCmdPackedAsync(${capitalize(\n                info.camelName,\n            )}Reg.${capitalize(pktName)}, [${vars.join(\", \")}])\\n`\n        } else if (isRegister(kind)) {\n            buffers +=\n                \"// get (register to REPORT_UPDATE event to enable background refresh)\\n\"\n            buffers += `const ${pktName}Reg = service.register(${capitalize(\n                info.camelName,\n            )}Reg.${capitalize(pktName)})\\n`\n            buffers += `const [${vars.join(\", \")}] : [${vartp.join(\n                \", \",\n            )}] = ${pktName}Reg.unpackedValue\\n`\n            if (kind === \"rw\") {\n                buffers += \"// set\\n\"\n                buffers += `await ${pktName}Reg.sendSetPackedAsync([${vars.join(\n                    \", \",\n                )}])\\n`\n            }\n        } else if (kind === \"event\") {\n            buffers += `const ${pktName}Event = service.event(${capitalize(\n                info.camelName,\n            )}Event.${capitalize(pktName)})\\n`\n            buffers += `${pktName}Event.on(\"change\", () => {\n    // if you need to read the event values\n    // const values = ${pktName}Event.unpackedValue\n})\\n`\n        }\n    } else {\n        buffers += `const [${vars.join(\", \")}] = jdunpack<[${vartp.join(\n            \", \",\n        )}]>(buf, \"${fmt}\")\\n`\n    }\n    if (repeats) buffers += `const [${repeats.join(\", \")}] = rest[0]\\n`\n\n    buffers = buffers.replace(/\\n*$/, \"\")\n\n    return {\n        buffers,\n        names: vars,\n        types: vartp,\n        pyTypes: vartppy,\n        csTypes: vartpcs,\n    }\n}\n\nfunction memberSize(fld: jdspec.PacketMember) {\n    return Math.abs(fld.storage)\n}\n\nfunction toTypescript(info: jdspec.ServiceSpec, language: \"ts\" | \"sts\" | \"cs\") {\n    const ts = language === \"ts\"\n    const sts = language === \"sts\"\n    const csharp = language === \"cs\"\n    const useNamespace = sts || csharp\n\n    const indent = useNamespace ? \"    \" : \"\"\n    const indent2 = indent + \"    \"\n    const numberkw = csharp ? \"uint \" : \"\"\n    const hexkw = csharp ? \"byte[]\" : \"\"\n    const enumkw = csharp\n        ? indent + \"public enum\"\n        : sts\n        ? indent + \"export const enum\"\n        : \"export enum\"\n    const exportkw = csharp ? \"public\" : \"export\"\n    const enumsf = csharp ? \"public const string \" : \"export const \"\n    const cskw = csharp ? \";\" : \"\"\n    let r = useNamespace\n        ? `namespace ${\n              csharp\n                  ? capitalize(TYPESCRIPT_STATIC_NAMESPACE)\n                  : TYPESCRIPT_STATIC_NAMESPACE\n          } {\\n`\n        : \"\"\n\n    if (csharp) {\n        r += `${indent}public static partial class ServiceClasses\\n${indent}{\\n`\n    } else r += indent + \"// Service \" + info.name + \" constants\\n\"\n    if (info.shortId[0] != \"_\") {\n        const name = csharp\n            ? capitalize(info.camelName)\n            : `SRV_${snakify(info.camelName).toLocaleUpperCase()}`\n        r +=\n            indent +\n            (csharp ? indent : \"\") +\n            `${exportkw} const ${numberkw}${name} = ${toHex(\n                info.classIdentifier,\n            )}${cskw}\\n`\n    }\n    const pref = upperCamel(info.camelName)\n    for (const cst in info.constants) {\n        const name = csharp\n            ? capitalize(info.camelName)\n            : `CONST_${snakify(info.camelName).toLocaleUpperCase()}_`\n        const { value, hex } = info.constants[cst]\n        r +=\n            indent +\n            (csharp ? indent : \"\") +\n            `${exportkw} const ${hex ? hexkw : numberkw}${name}${\n                csharp ? capitalize(camelize(cst)) : toUpper(cst)\n            } = ${hex ? value.toString() : toHex(value)}${cskw}\\n`\n    }\n\n    if (csharp) {\n        r += indent + `}\\n`\n    }\n\n    for (const en of values(info.enums)) {\n        const enPref = pref + upperCamel(en.name)\n        r += `\\n${\n            csharp && en.isFlags ? \"    [System.Flags]\\n\" : \"\"\n        }${enumkw} ${enPref}${\n            csharp ? `: ${cSharpStorage(en.storage)}` : \"\"\n        } { // ${cStorage(en.storage)}\\n`\n        for (const k of Object.keys(en.members)) {\n            if (sts) r += indent2 + `//% block=\"${humanify(k).toLowerCase()}\"\\n`\n            r += indent2 + k + \" = \" + toHex(en.members[k]) + \",\\n\"\n        }\n        r += indent + \"}\\n\\n\"\n    }\n    const tsEnums: jdspec.SMap<string> = {}\n\n    for (const pkt of info.packets) {\n        if (pkt.derived) continue\n\n        const cmt = addComment(pkt)\n        const pack = pkt.fields.length\n            ? packInfo(info, pkt, {\n                  isStatic: sts,\n                  useBooleans: false,\n              }).buffers\n            : \"\"\n\n        let inner = \"Cmd\"\n        if (isRegister(pkt.kind)) inner = \"Reg\"\n        else if (pkt.kind == \"event\") inner = \"Event\"\n        else if (\n            pkt.kind == \"meta_pipe_command\" ||\n            pkt.kind == \"meta_pipe_report\"\n        )\n            inner = \"PipeCmd\"\n        else if (pkt.kind == \"pipe_command\" || pkt.kind == \"pipe_report\")\n            inner = \"Pipe\"\n\n        let text = \"\"\n        let meta = \"\"\n        if (pkt.secondary || inner == \"Pipe\") {\n            if (pack)\n                text = wrapComment(\n                    language,\n                    `${pkt.kind} ${upperCamel(pkt.name)}${\n                        pkt.client ? \"\" : wrapSnippet(pack)\n                    }`,\n                )\n        } else {\n            const val = toHex(pkt.identifier)\n            if (sts && pkt.kind === \"event\") {\n                meta = `//% block=\"${snakify(pkt.name).replace(/_/g, \" \")}\"\\n`\n            }\n            text = `${\n                wrapComment(\n                    language,\n                    cmt.comment + (pkt.client ? \"\" : wrapSnippet(pack)),\n                ) + meta\n            }${upperCamel(pkt.name)} = ${val},\\n`\n        }\n\n        if (text) tsEnums[inner] = (tsEnums[inner] || \"\") + text\n\n        // don't emit const strings in makecode,\n        // they don't get dropped efficiently\n        if ((csharp || sts || ts) && pkt.packFormat) {\n            const packName = inner + \"Pack\"\n            tsEnums[packName] =\n                (tsEnums[packName] || \"\") +\n                `${wrapComment(\n                    language,\n                    `Pack format for '${pkt.name}' data.`,\n                )}${enumsf}${upperCamel(pkt.name)}${\n                    pkt.secondary ? \"Report\" : \"\"\n                } = \"${pkt.packFormat}\"${csharp ? \";\" : \"\"}\\n`\n        }\n    }\n\n    for (const k of Object.keys(tsEnums)) {\n        if (k == \"info\") r += tsEnums[k].replace(/^/gm, indent) + \"\\n\\n\"\n        else {\n            const inner = tsEnums[k]\n                .replace(/^\\n+/, \"\")\n                .replace(/\\n$/, \"\")\n                .replace(/\\n/g, \"\\n    \" + indent)\n            if (inner.indexOf(\"public const\") > -1 || k.endsWith(\"Pack\")) {\n                r += `    ${exportkw} ${csharp ? \"static \" : \"\"}${\n                    csharp ? \"class\" : \"namespace\"\n                } ${pref}${k} {\\n    ${indent}${inner}\\n${indent}}\\n\\n`\n            } else\n                r += `${enumkw} ${pref}${k} ${\n                    csharp ? `: ushort ` : \"\"\n                }{\\n    ${indent}${inner}\\n${indent}}\\n\\n`\n        }\n    }\n\n    if (useNamespace) r += \"}\\n\"\n\n    return r.replace(/ *$/gm, \"\")\n}\n\nconst jsKeywords: Record<string, number> = {\n    switch: 1,\n}\n\nexport function jsQuote(n: string) {\n    if (jsKeywords[n]) n += \"_\"\n    return n\n}\n\nexport function generateDeviceSpecificationId(dev: jdspec.DeviceSpec) {\n    return (\n        escapeDeviceIdentifier(dev.company) +\n        \"-\" +\n        escapeDeviceNameIdentifier(dev.name) +\n        (dev.designIdentifier || \"\") +\n        (dev.version\n            ? `v${dev.version\n                  .toLowerCase()\n                  .replace(/^v/, \"\")\n                  .replace(/\\./g, \"\")}`\n            : \"\"\n        ).toLowerCase()\n    )\n}\n\nexport function normalizeDeviceSpecification(dev: jdspec.DeviceSpec) {\n    const productIdentifiers = Array.from(\n        new Set<number>([\n            ...(dev.productIdentifiers || []),\n            ...(dev.firmwares\n                ?.map(fw => fw.productIdentifier)\n                .filter(pi => !!pi) || []),\n        ]).values(),\n    )\n\n    // reorder fields\n    const clone: jdspec.DeviceSpec = {\n        id: generateDeviceSpecificationId(dev),\n        name: dev.name,\n        company: dev.company,\n        description: dev.description,\n        repo: dev.repo,\n        makeCodeRepo: dev.makeCodeRepo,\n        firmwareSource: dev.firmwareSource,\n        hardwareDesign: dev.hardwareDesign,\n        connector: dev.connector,\n        link: dev.link,\n        storeLink: dev.storeLink,\n        services: dev.services,\n        productIdentifiers: productIdentifiers,\n        transport: dev.transport,\n        tags: dev.tags,\n        firmwares: dev.firmwares,\n        version: dev.version ? dev.version.replace(/^v/, \"\") : undefined,\n        designIdentifier: dev.designIdentifier || undefined,\n        bootloader: dev.bootloader,\n        status: dev.status || (dev.storeLink ? \"stable\" : undefined),\n        devices: dev.devices,\n        relatedDevices: dev.relatedDevices,\n        requiredDevices: dev.requiredDevices,\n        shape: dev.shape,\n        order: dev.order,\n    }\n    // delete empty files\n    const anyClone: any = clone\n    for (const key of Object.keys(anyClone)) {\n        const v = anyClone[key]\n        if (v === undefined || v === \"\" || (Array.isArray(v) && !v.length))\n            delete anyClone[key]\n    }\n    return clone\n}\n\nexport function escapeDeviceIdentifier(text: string) {\n    if (!text) text = \"\"\n    const escaped = text\n        .trim()\n        .toLowerCase()\n        .replace(/([^a-z0-9_-])+/gi, \"-\")\n        .replace(/\\./g, \"\") // routing does not like dots\n        .replace(/^-+/, \"\")\n        .replace(/-+$/, \"\")\n    const id = snakify(escaped)\n    return id\n}\n\nexport function escapeDeviceNameIdentifier(text: string) {\n    return escapeDeviceIdentifier(text).replace(/-/g, \"\")\n}\n\nexport function converters(): jdspec.SMap<(s: jdspec.ServiceSpec) => string> {\n    return {\n        json: (j: jdspec.ServiceSpec) => JSON.stringify(j, null, 2),\n        c: toH,\n        ts: j => toTypescript(j, \"ts\"),\n        sts: j => toTypescript(j, \"sts\"),\n        cs: j => toTypescript(j, \"cs\"),\n        py: j => toPython(j, \"py\"),\n        /*\n        \"cpp\": toHPP,\n        */\n    }\n}\n\nexport function isNumericType(field: jdspec.PacketMember) {\n    const tp = field.type\n    return (\n        !field.startRepeats &&\n        /^[uif]\\d+(\\.\\d+)?$/.test(tp) &&\n        tp != \"pipe_port\" &&\n        tp != \"bool\"\n    )\n}\n\nconst Reading = 0x101\nexport function genFieldInfo(\n    reg: jdspec.PacketInfo,\n    field: jdspec.PacketMember,\n) {\n    const isReading = reg.identifier === Reading\n    const name =\n        field.name === \"_\"\n            ? reg.name\n            : isReading\n            ? field.name\n            : `${reg.name}${capitalize(field.name)}`\n    const min = pick(\n        field.typicalMin,\n        field.absoluteMin,\n        field.unit === \"/\" || /^%/.test(field.unit)\n            ? field.type[0] === \"i\"\n                ? -100\n                : 0\n            : undefined,\n        field.type === \"u8\" || field.type === \"u16\" ? 0 : undefined,\n    )\n    const max = pick(\n        field.typicalMax,\n        field.absoluteMax,\n        field.unit === \"/\" || /^%/.test(field.unit) ? 100 : undefined,\n        field.type === \"u8\" ? 0xff : field.type === \"u16\" ? 0xffff : undefined,\n    )\n    const defl = field.defaultValue || (field.unit === \"/\" ? \"100\" : undefined)\n    const valueScaler: (s: string) => string =\n        field.unit === \"/\"\n            ? s => `${s} * 100`\n            : field.type === \"bool\"\n            ? s => `!!${s}`\n            : s => s\n    const valueUnscaler: (s: string) => string =\n        field.unit === \"/\"\n            ? s => `${s} / 100`\n            : field.type === \"bool\"\n            ? s => `${s} ? 1 : 0`\n            : s => s\n    const scale = field.unit === \"/\" ? 100 : undefined\n    let unit: string = field.unit === \"/\" ? \"%\" : field.unit\n    unit = unit?.replace(\"%\", \"\\\\\\\\%\")\n    return { name, min, max, defl, scale, valueScaler, valueUnscaler, unit }\n\n    function pick(...values: number[]) {\n        return values?.find(x => x !== undefined)\n    }\n}\n", "import {\n    ERROR_NO_ACK,\n    ERROR_TIMEOUT,\n    ERROR_TRANSPORT_DEVICE_LOCKED,\n    JACDAC_ERROR,\n} from \"./constants\"\n\nexport interface JDErrorOptions {\n    /**\n     * The error code\n     */\n    code?: string\n    /**\n     * If true, the error is not reported to the user\n     */\n    cancel?: boolean\n}\n/**\n * Common Jacdac error type\n * @category Runtime\n */\nexport class JDError extends Error {\n    readonly code: string\n    readonly cancel: boolean\n    constructor(message: string, options?: JDErrorOptions) {\n        super(message)\n        this.name = JACDAC_ERROR\n        this.code = options?.code\n        this.cancel = !!options?.cancel\n    }\n}\n\nexport function throwError(msg: string, options?: JDErrorOptions) {\n    const e = new JDError(msg, options)\n    throw e\n}\n\nexport function isCancelError(e: Error) {\n    const res = e?.name === JACDAC_ERROR ? (e as JDError)?.cancel : false\n    return res\n}\n\nexport function isAckError(e: Error) {\n    return isCodeError(e, ERROR_NO_ACK)\n}\n\nexport function isTimeoutError(e: Error) {\n    return isCodeError(e, ERROR_TIMEOUT)\n}\n\nexport function isCodeError(e: Error, code: string) {\n    return errorCode(e) === code\n}\n\n/**\n * Extract the Jacdac error code if any\n * @param e\n * @returns\n * @category Runtime\n */\nexport function errorCode(e: Error): string {\n    const code = e?.name === JACDAC_ERROR ? (e as JDError)?.code : undefined\n    if (code) return code\n\n    const deviceLocked =\n        e.name == \"NetworkError\" && /unable to claim interface/i.test(e.message)\n    if (deviceLocked) return ERROR_TRANSPORT_DEVICE_LOCKED\n\n    return undefined\n}\n", "/**\n * Various flags to control the runtime environment\n * @category Runtime\n */\nexport class Flags {\n    /**\n     * Enables additional logging and diagnostics\n     */\n    static diagnostics = false\n    /**\n     * Trace who and what generates packets\n     */\n    static trace = false\n    /**\n     * Enables/disabled WebUSB\n     */\n    static webUSB = true\n    /**\n     * Enables/disabled WebSerial\n     */\n    static webSerial = true\n\n    /**\n     * Enables/disables WebBLE\n     */\n    static webBluetooth = false\n\n    /**\n     * Enables developer mode when connecting devices\n     */\n    static developerMode = false\n}\n", "import { ERROR_TIMEOUT } from \"./constants\"\nimport { JDError } from \"./error\"\nimport { Flags } from \"./flags\"\n\nexport function arrayify<T>(value: T | T[]): T[] {\n    if (value === undefined || value === null) return undefined\n    if (Array.isArray(value)) return value\n    else return [value]\n}\n\nexport function delay<T>(millis: number, value?: T): Promise<T | undefined> {\n    return new Promise(resolve => setTimeout(() => resolve(value), millis))\n}\n\nexport function memcpy(\n    trg: Uint8Array,\n    trgOff: number,\n    src: ArrayLike<number>,\n    srcOff?: number,\n    len?: number,\n) {\n    if (srcOff === void 0) srcOff = 0\n    if (len === void 0) len = src.length - srcOff\n    for (let i = 0; i < len; ++i) trg[trgOff + i] = src[srcOff + i]\n}\n\nexport function strcmp(a: string, b: string) {\n    if (a == b) return 0\n    if (a < b) return -1\n    else return 1\n}\n\nexport function bufferEq(a: Uint8Array, b: ArrayLike<number>, offset = 0) {\n    if (a == b) return true\n    if (!a || !b || a.length != b.length) return false\n    for (let i = offset; i < a.length; ++i) {\n        if (a[i] != b[i]) return false\n    }\n    return true\n}\n\nexport function arrayEq<T = unknown>(\n    a: T[],\n    b: T[],\n    isEqual?: (a: T, b: T) => boolean,\n) {\n    const eq = isEqual || Object.is\n    return a?.length === b?.length && (!a || a.every((_, i) => eq(_, b[i])))\n}\n\nexport function hash(buf: Uint8Array, bits: number) {\n    bits |= 0\n    if (bits < 1) return 0\n    const h = fnv1(buf)\n    if (bits >= 32) return h >>> 0\n    else return ((h ^ (h >>> bits)) & ((1 << bits) - 1)) >>> 0\n}\n\nexport function idiv(a: number, b: number) {\n    return ((a | 0) / (b | 0)) | 0\n}\nexport function fnv1(data: Uint8Array) {\n    let h = 0x811c9dc5\n    for (let i = 0; i < data.length; ++i) {\n        h = Math.imul(h, 0x1000193) ^ data[i]\n    }\n    return h\n}\n\nexport function crc(p: Uint8Array) {\n    let crc = 0xffff\n    for (let i = 0; i < p.length; ++i) {\n        const data = p[i]\n        let x = (crc >> 8) ^ data\n        x ^= x >> 4\n        crc = (crc << 8) ^ (x << 12) ^ (x << 5) ^ x\n        crc &= 0xffff\n    }\n    return crc\n}\n\nexport function ALIGN(n: number) {\n    return (n + 3) & ~3\n}\n\n// this will take lower 8 bits from each character\nexport function stringToUint8Array(input: string) {\n    const len = input.length\n    const res = new Uint8Array(len)\n    for (let i = 0; i < len; ++i) res[i] = input.charCodeAt(i) & 0xff\n    return res\n}\n\nexport function uint8ArrayToString(input: ArrayLike<number>) {\n    const len = input.length\n    let res = \"\"\n    for (let i = 0; i < len; ++i) res += String.fromCharCode(input[i])\n    return res\n}\n\nexport function fromUTF8(binstr: string) {\n    if (!binstr) return \"\"\n\n    // escape function is deprecated\n    let escaped = \"\"\n    for (let i = 0; i < binstr.length; ++i) {\n        const k = binstr.charCodeAt(i) & 0xff\n        if (k == 37 || k > 0x7f) {\n            escaped += \"%\" + k.toString(16)\n        } else {\n            escaped += binstr.charAt(i)\n        }\n    }\n\n    // decodeURIComponent does the actual UTF8 decoding\n    return decodeURIComponent(escaped)\n}\n\nexport function toUTF8(str: string, cesu8?: boolean) {\n    let res = \"\"\n    if (!str) return res\n    for (let i = 0; i < str.length; ++i) {\n        let code = str.charCodeAt(i)\n        if (code <= 0x7f) res += str.charAt(i)\n        else if (code <= 0x7ff) {\n            res += String.fromCharCode(0xc0 | (code >> 6), 0x80 | (code & 0x3f))\n        } else {\n            if (!cesu8 && 0xd800 <= code && code <= 0xdbff) {\n                const next = str.charCodeAt(++i)\n                if (!isNaN(next))\n                    code = 0x10000 + ((code - 0xd800) << 10) + (next - 0xdc00)\n            }\n\n            if (code <= 0xffff)\n                res += String.fromCharCode(\n                    0xe0 | (code >> 12),\n                    0x80 | ((code >> 6) & 0x3f),\n                    0x80 | (code & 0x3f),\n                )\n            else\n                res += String.fromCharCode(\n                    0xf0 | (code >> 18),\n                    0x80 | ((code >> 12) & 0x3f),\n                    0x80 | ((code >> 6) & 0x3f),\n                    0x80 | (code & 0x3f),\n                )\n        }\n    }\n    return res\n}\n\nexport type SMap<T> = Record<string, T>\n\n/** @internal */\nexport class PromiseBuffer<T> {\n    private waiting: ((v: T | Error) => void)[] = []\n    private available: (T | Error)[] = []\n\n    drain() {\n        for (const f of this.waiting) {\n            f(new Error(\"Promise Buffer Reset\"))\n        }\n        this.waiting = []\n        this.available = []\n    }\n\n    pushError(v: Error) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        this.push(v as any)\n    }\n\n    push(v: T) {\n        const f = this.waiting.shift()\n        if (f) f(v)\n        else this.available.push(v)\n    }\n\n    shiftAsync(timeout = 0) {\n        if (this.available.length > 0) {\n            const v = this.available.shift()\n            if (v instanceof Error) return Promise.reject<T>(v)\n            else return Promise.resolve<T | undefined>(v)\n        } else\n            return new Promise<T>((resolve, reject) => {\n                const f = (v: T | Error) => {\n                    if (v instanceof Error) reject(v)\n                    else resolve(v)\n                }\n                this.waiting.push(f)\n                if (timeout > 0) {\n                    delay(timeout).then(() => {\n                        const idx = this.waiting.indexOf(f)\n                        if (idx >= 0) {\n                            this.waiting.splice(idx, 1)\n                            reject(\n                                new JDError(`Timeout (${timeout}ms)`, {\n                                    code: ERROR_TIMEOUT,\n                                }),\n                            )\n                        }\n                    })\n                }\n            })\n    }\n}\n\n/** @internal */\nexport class PromiseQueue {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private readonly promises: Record<string, (() => Promise<any>)[]> = {}\n\n    enqueue<T>(id: string, f: () => Promise<T>): Promise<T> {\n        return new Promise<T>((resolve, reject) => {\n            let arr = this.promises[id]\n            if (!arr) {\n                arr = this.promises[id] = []\n            }\n            const cleanup = () => {\n                arr.shift()\n                if (arr.length == 0) delete this.promises[id]\n                else arr[0]()\n            }\n            arr.push(() =>\n                f().then(\n                    v => {\n                        cleanup()\n                        resolve(v)\n                    },\n                    err => {\n                        cleanup()\n                        reject(err)\n                    },\n                ),\n            )\n            if (arr.length == 1) arr[0]()\n        })\n    }\n}\n\nexport function rgbToHtmlColor(rgb: number) {\n    return `#${(\"000000\" + rgb.toString(16)).slice(-6)}`\n}\n\nexport function rgbaToHtmlColor(rgb: number, a: number) {\n    return `rgba(${(rgb >> 16) & 0xff}, ${(rgb >> 8) & 0xff}, ${\n        (rgb >> 0) & 0xff\n    }, ${a})`\n}\n\nexport function toFullHex(n: number[]) {\n    return (\n        \"0x\" + n.map(id => (\"000000000\" + id.toString(16)).slice(-8)).join(\"\")\n    )\n}\n\nexport function toHex(bytes: ArrayLike<number>, sep?: string) {\n    if (!bytes) return undefined\n    let r = \"\"\n    for (let i = 0; i < bytes.length; ++i) {\n        if (sep && i > 0) r += sep\n        r += (\"0\" + bytes[i].toString(16)).slice(-2)\n    }\n    return r\n}\n\nexport function fromHex(hex: string) {\n    const r = new Uint8Array(hex.length >> 1)\n    for (let i = 0; i < hex.length; i += 2)\n        r[i >> 1] = parseInt(hex.slice(i, i + 2), 16)\n    return r\n}\n\nexport function isSet(v: unknown) {\n    return v !== null && v !== undefined\n}\n\nexport function toArray<T>(a: ArrayLike<T>): T[] {\n    if (!a) return undefined\n    const r: T[] = new Array(a.length)\n    for (let i = 0; i < a.length; ++i) r[i] = a[i]\n    return r\n}\n\nexport interface MutableArrayLike<T> {\n    readonly length: number\n    [n: number]: T\n}\n\nexport function hexNum(n: number): string {\n    if (isNaN(n)) return undefined\n    if (n < 0) return \"-\" + hexNum(-n)\n    return \"0x\" + n.toString(16)\n}\n\nexport function write32(buf: MutableArrayLike<number>, pos: number, v: number) {\n    buf[pos + 0] = (v >> 0) & 0xff\n    buf[pos + 1] = (v >> 8) & 0xff\n    buf[pos + 2] = (v >> 16) & 0xff\n    buf[pos + 3] = (v >> 24) & 0xff\n}\n\nexport function write24(buf: MutableArrayLike<number>, pos: number, v: number) {\n    buf[pos + 0] = (v >> 0) & 0xff\n    buf[pos + 1] = (v >> 8) & 0xff\n    buf[pos + 2] = (v >> 16) & 0xff\n}\n\nexport function write16(buf: MutableArrayLike<number>, pos: number, v: number) {\n    buf[pos + 0] = (v >> 0) & 0xff\n    buf[pos + 1] = (v >> 8) & 0xff\n}\n\nexport function read32(buf: ArrayLike<number>, pos: number) {\n    return (\n        (buf[pos] |\n            (buf[pos + 1] << 8) |\n            (buf[pos + 2] << 16) |\n            (buf[pos + 3] << 24)) >>>\n        0\n    )\n}\n\nexport function read16(buf: ArrayLike<number>, pos: number) {\n    return buf[pos] | (buf[pos + 1] << 8)\n}\n\nexport function encodeU32LE(words: number[]) {\n    const r = new Uint8Array(words.length * 4)\n    for (let i = 0; i < words.length; ++i) write32(r, i * 4, words[i])\n    return r\n}\n\nexport function decodeU32LE(buf: Uint8Array) {\n    const res: number[] = []\n    for (let i = 0; i < buf.length; i += 4) res.push(read32(buf, i))\n    return res\n}\n\nexport function isBufferEmpty(data: Uint8Array): boolean {\n    if (!data) return true\n    const n = data.length\n    for (let i = 0; i < n; ++i) {\n        if (data[i]) return false\n    }\n    return true\n}\n\nexport function bufferToString(buf: Uint8Array) {\n    return fromUTF8(uint8ArrayToString(buf))\n}\n\nexport function stringToBuffer(str: string) {\n    return stringToUint8Array(toUTF8(str))\n}\n\nexport function bufferConcat(a: Uint8Array, b: Uint8Array) {\n    const r = new Uint8Array(a.length + b.length)\n    r.set(a, 0)\n    r.set(b, a.length)\n    return r\n}\n\nexport function bufferConcatMany(bufs: Uint8Array[]) {\n    let sz = 0\n    for (const buf of bufs) sz += buf.length\n    const r = new Uint8Array(sz)\n    sz = 0\n    for (const buf of bufs) {\n        r.set(buf, sz)\n        sz += buf.length\n    }\n    return r\n}\n\nexport function arrayConcatMany<T>(arrs: T[][]): T[] {\n    if (!arrs) return undefined\n\n    // weed out empty array\n    arrs = arrs.filter(a => !!a?.length)\n\n    let sz = 0\n    for (const buf of arrs) sz += buf.length\n    const r: T[] = new Array(sz)\n    sz = 0\n    for (const arr of arrs) {\n        for (let i = 0; i < arr.length; ++i) r[i + sz] = arr[i]\n        sz += arr.length\n    }\n    return r\n}\n\nexport function jsonCopyFrom<T>(trg: T, src: T) {\n    const v = clone(src)\n    for (const k of Object.keys(src)) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-extra-semi\n        ;(trg as any)[k] = (v as any)[k]\n    }\n}\nexport function assert(\n    cond: boolean,\n    msg = \"Assertion failed\",\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    debugData?: any,\n) {\n    if (!cond) {\n        if (debugData) console.debug(`assertion filed ${msg}`, debugData)\n        if (Flags.diagnostics)\n            // eslint-disable-next-line no-debugger\n            debugger\n        throw new Error(msg)\n    }\n}\n\nexport function flatClone<T extends unknown>(obj: T | null): T {\n    if (obj == null) return null\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const r: any = {}\n    Object.keys(obj).forEach(k => {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        r[k] = (obj as any)[k]\n    })\n    return r\n}\n\nexport function clone<T>(v: T): T {\n    if (v == null) return null\n    return JSON.parse(JSON.stringify(v))\n}\n\nexport function throttle(handler: () => void, delay: number): () => void {\n    let enableCall = true\n    return function () {\n        if (!enableCall) return\n        enableCall = false\n        handler()\n        setTimeout(() => (enableCall = true), delay)\n    }\n}\n\nexport interface Signal {\n    signalled: Promise<boolean>\n    signal: () => void\n}\nexport function signal(): Signal {\n    let resolve: (v: boolean) => void\n    return {\n        signalled: new Promise(r => {\n            resolve = r\n        }),\n        signal: () => resolve(true),\n    }\n}\n\nexport function readBlobToUint8Array(blob: Blob): Promise<Uint8Array> {\n    if (blob?.arrayBuffer) {\n        return blob.arrayBuffer().then(data => new Uint8Array(data))\n    }\n\n    return new Promise((resolve, reject) => {\n        const fileReader = new FileReader()\n        fileReader.onload = () => {\n            resolve(new Uint8Array(fileReader.result as ArrayBuffer))\n        }\n        fileReader.onerror = e => {\n            //console.log(e)\n            reject(e)\n        }\n        try {\n            fileReader.readAsArrayBuffer(blob)\n        } catch (e) {\n            reject(e)\n        }\n    })\n}\n\nexport function readBlobToText(blob: Blob): Promise<string> {\n    if (blob.text) {\n        return blob.text()\n    }\n\n    return new Promise((resolve, reject) => {\n        const fileReader = new FileReader()\n        fileReader.onload = () => resolve(fileReader.result as string)\n        fileReader.onerror = e => {\n            //console.log(e)\n            reject(e)\n        }\n        try {\n            fileReader.readAsText(blob)\n        } catch (e) {\n            reject(e)\n        }\n    })\n}\n\nexport function debounce(handler: () => void, delay: number): () => void {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    let timeOutId: any\n    return function () {\n        if (timeOutId) {\n            clearTimeout(timeOutId)\n        }\n        timeOutId = setTimeout(async () => {\n            handler()\n        }, delay)\n    }\n}\n\nexport function debounceAsync(\n    handler: () => Promise<void>,\n    delay: number,\n): () => void {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    let timeOutId: any\n    return function () {\n        if (timeOutId) {\n            clearTimeout(timeOutId)\n        }\n        timeOutId = setTimeout(async () => {\n            await handler()\n        }, delay)\n    }\n}\n\nexport function JSONTryParse<T = unknown>(\n    src: string,\n    defaultValue?: T,\n): T | undefined | null {\n    if (src === undefined) return undefined\n    if (src === null) return null\n\n    try {\n        return JSON.parse(src) as T\n    } catch (e) {\n        return defaultValue\n    }\n}\n\nexport function roundWithPrecision(\n    x: number,\n    digits: number,\n    round = Math.round,\n): number {\n    digits = digits | 0\n    // invalid digits input\n    if (digits <= 0) return round(x)\n    if (x == 0) return 0\n    let r = 0\n    while (r == 0 && digits < 21) {\n        const d = Math.pow(10, digits++)\n        r = round(x * d + Number.EPSILON) / d\n    }\n    return r\n}\n\nexport function renderWithPrecision(\n    x: number,\n    digits: number,\n    round = Math.round,\n): string {\n    const r = roundWithPrecision(x, digits, round)\n    let rs = r.toLocaleString()\n    const sep = (0.1).toLocaleString()[1]\n    if (digits > 0) {\n        let doti = rs.indexOf(sep)\n        if (doti < 0) {\n            rs += sep\n            doti = rs.length - 1\n        }\n        while (rs.length - 1 - doti < digits) rs += \"0\"\n    }\n    return rs\n}\n\nexport function randomRange(min: number, max: number) {\n    return Math.round(Math.random() * (max - min) + min)\n}\n\nexport function unique<T>(values: T[]): T[] {\n    return Array.from(new Set<T>(values).values())\n}\n\nexport function uniqueMap<T, U>(\n    values: T[],\n    id: (value: T) => string,\n    converter: (value: T) => U,\n) {\n    const r: SMap<T> = {}\n    for (let i = 0; i < values.length; ++i) {\n        const value = values[i]\n        const idv = id(value)\n        if (!r[idv]) {\n            r[idv] = value\n        }\n    }\n    return Object.values(r).map(converter)\n}\n\nexport function toMap<T, V>(\n    a: T[],\n    keyConverter: (value: T, index: number) => string,\n    valueConverter: (value: T, index: number) => V,\n    ignoreMissingValues?: boolean,\n): SMap<V> {\n    const m: SMap<V> = {}\n    if (a)\n        for (let i = 0; i < a.length; ++i) {\n            const key = keyConverter(a[i], i)\n            if (key === undefined || key === null) continue\n            const v = valueConverter(a[i], i)\n            if (ignoreMissingValues && (v === undefined || v === null)) continue\n            m[key] = v\n        }\n    return m\n}\n\nexport function ellipse(text: string, maxChars: number, suffix = \"\u2026\") {\n    if (!isNaN(maxChars) && maxChars > 0 && text?.length > maxChars)\n        return text.slice(0, maxChars - suffix.length) + suffix\n    return text\n}\n\nexport function ellipseFirstSentence(text: string) {\n    const i = text?.indexOf(\".\")\n    if (i < 0) return text\n    else return text.slice(0, i + 1)\n}\n\nexport function ellipseJoin(\n    values: string[],\n    maxChars: number,\n    ellipse = \"...\",\n) {\n    let r = \"\"\n    for (let i = 0; i < values.length && r.length < maxChars; ++i) {\n        if (r) r += \", \"\n        r += values[i]\n    }\n    if (r.length > maxChars - ellipse.length)\n        return r.slice(0, maxChars) + ellipse\n    else return r\n}\n\nexport function arrayShuffle<T>(a: T[]): T[] {\n    for (let i = a.length - 1; i > 0; i--) {\n        const j = Math.floor(Math.random() * (i + 1))\n        ;[a[i], a[j]] = [a[j], a[i]]\n    }\n    return a\n}\n\nexport function uniqueName(\n    names: string[],\n    name: string,\n    separator = \"\",\n    startCount = 2,\n): string {\n    if (names.indexOf(name) < 0) return name\n    // allocate names\n    let count = startCount\n    while (names.indexOf(`${name}${separator}${count}`) > -1) count++\n    return `${name}${separator}${count}`\n}\n\nexport function groupBy<T>(list: T[], key: (value: T) => string): SMap<T[]> {\n    if (!list) return {}\n\n    const r: SMap<T[]> = {}\n    list.forEach(item => {\n        const k = key(item)\n        const a = r[k] || (r[k] = [])\n        a.push(item)\n    })\n    return r\n}\n\nexport function pick(...values: number[]) {\n    return values?.find(x => x !== undefined)\n}\n\n/**\n * Applies filters and returns array of [yays, nays]\n * @param values\n * @param condition\n */\nexport function splitFilter<T>(\n    values: ArrayLike<T>,\n    condition: (t: T) => boolean,\n): [T[], T[]] {\n    if (!values) return [undefined, undefined]\n\n    const yays: T[] = []\n    const nays: T[] = []\n    const n = values.length\n    for (let i = 0; i < n; ++i) {\n        const v = values[i]\n        if (condition(v)) yays.push(v)\n        else nays.push(v)\n    }\n    return [yays, nays]\n}\n\nexport function range(end: number): number[] {\n    return Array(end)\n        .fill(0)\n        .map((_, i) => i)\n}\n\nexport function toggleBit(data: Uint8Array, bitindex: number) {\n    data[bitindex >> 3] ^= 1 << (bitindex & 7)\n}\n\nexport function getBit(data: Uint8Array, bitindex: number) {\n    return !!(data[bitindex >> 3] & (1 << (bitindex & 7)))\n}\n\nexport function setBit(data: Uint8Array, bitindex: number, on: boolean) {\n    if (on) data[bitindex >> 3] |= 1 << (bitindex & 7)\n    else data[bitindex >> 3] &= ~(1 << (bitindex & 7))\n}\n\nexport function parseIdentifier(value: number | string) {\n    if (typeof value === \"string\" && /^0x[0-9a-f]+$/i.test(value as string)) {\n        return parseInt(value, 16)\n    } else if (typeof value === \"string\" && /^[0-9]+$/i.test(value as string))\n        return parseInt(value)\n    return Number(value)\n}\n", "import { toHex } from \"./utils\"\n\nfunction cryptoRandomUint32(length: number): Uint32Array {\n    const crypto =\n        (typeof self !== \"undefined\" ? self.crypto : undefined) ||\n        (typeof globalThis !== \"undefined\" ? globalThis.crypto : undefined)\n    if (!crypto) return undefined\n\n    const vals = new Uint32Array(length)\n    crypto.getRandomValues(vals)\n    return vals\n}\n\nexport function anyRandomUint32(length: number): Uint32Array {\n    let r = cryptoRandomUint32(length)\n    if (!r) {\n        r = new Uint32Array(length)\n        for (let i = 0; i < r.length; ++i)\n            r[i] = (Math.random() * 0x1_0000_0000) >>> 0\n    }\n    return r\n}\n\nexport function randomUInt(max: number) {\n    const arr = anyRandomUint32(1)\n    return arr[0] % max\n}\n\nexport function randomBytes(n: number) {\n    const buf = anyRandomUint32(n)\n    const r = new Uint8Array(buf.length)\n    for (let i = 0; i < n; ++i) r[i] = buf[i] & 0xff\n    return r\n}\n\nexport function randomDeviceId() {\n    const devId = anyRandomUint32(8)\n    for (let i = 0; i < 8; ++i) devId[i] &= 0xff\n    return toHex(devId)\n}\n", "import { read16, read32, stringToUint8Array, uint8ArrayToString } from \"./utils\"\n\n/** @internal */\nexport enum NumberFormat {\n    Int8LE = 1,\n    UInt8LE = 2,\n    Int16LE = 3,\n    UInt16LE = 4,\n    Int32LE = 5,\n    Int8BE = 6,\n    UInt8BE = 7,\n    Int16BE = 8,\n    UInt16BE = 9,\n    Int32BE = 10,\n    UInt32LE = 11,\n    UInt32BE = 12,\n    Float32LE = 13,\n    Float64LE = 14,\n    Float32BE = 15,\n    Float64BE = 16,\n    UInt64LE = 17,\n    UInt64BE = 18,\n    Int64LE = 19,\n    Int64BE = 20,\n}\n\nfunction fmtInfoCore(fmt: NumberFormat) {\n    switch (fmt) {\n        case NumberFormat.Int8LE:\n            return -1\n        case NumberFormat.UInt8LE:\n            return 1\n        case NumberFormat.Int16LE:\n            return -2\n        case NumberFormat.UInt16LE:\n            return 2\n        case NumberFormat.Int32LE:\n            return -4\n        case NumberFormat.UInt32LE:\n            return 4\n        case NumberFormat.Int64LE:\n            return -8\n        case NumberFormat.UInt64LE:\n            return 8\n        case NumberFormat.Int8BE:\n            return -10\n        case NumberFormat.UInt8BE:\n            return 10\n        case NumberFormat.Int16BE:\n            return -20\n        case NumberFormat.UInt16BE:\n            return 20\n        case NumberFormat.Int32BE:\n            return -40\n        case NumberFormat.UInt32BE:\n            return 40\n        case NumberFormat.Int64BE:\n            return -80\n        case NumberFormat.UInt64BE:\n            return 80\n\n        case NumberFormat.Float32LE:\n            return 4\n        case NumberFormat.Float32BE:\n            return 40\n        case NumberFormat.Float64LE:\n            return 8\n        case NumberFormat.Float64BE:\n            return 80\n        default:\n            throw new Error(\"unknown format\")\n    }\n}\n\nfunction fmtInfo(fmt: NumberFormat) {\n    let size = fmtInfoCore(fmt)\n    let signed = false\n    if (size < 0) {\n        signed = true\n        size = -size\n    }\n    let swap = false\n    if (size >= 10) {\n        swap = true\n        size /= 10\n    }\n    let isFloat = false\n    switch (fmt) {\n        case NumberFormat.Float32LE:\n        case NumberFormat.Float32BE:\n        case NumberFormat.Float64LE:\n        case NumberFormat.Float64BE:\n            isFloat = true\n            break\n    }\n    return { size, signed, swap, isFloat }\n}\n\n/**\n * Get the size in bytes of specified number format.\n */\nexport function sizeOfNumberFormat(format: NumberFormat) {\n    switch (format) {\n        case NumberFormat.Int8LE:\n        case NumberFormat.UInt8LE:\n        case NumberFormat.Int8BE:\n        case NumberFormat.UInt8BE:\n            return 1\n        case NumberFormat.Int16LE:\n        case NumberFormat.UInt16LE:\n        case NumberFormat.Int16BE:\n        case NumberFormat.UInt16BE:\n            return 2\n        case NumberFormat.Int32LE:\n        case NumberFormat.Int32BE:\n        case NumberFormat.UInt32BE:\n        case NumberFormat.UInt32LE:\n        case NumberFormat.Float32BE:\n        case NumberFormat.Float32LE:\n            return 4\n        case NumberFormat.UInt64BE:\n        case NumberFormat.Int64BE:\n        case NumberFormat.UInt64LE:\n        case NumberFormat.Int64LE:\n        case NumberFormat.Float64BE:\n        case NumberFormat.Float64LE:\n            return 8\n    }\n    return 0\n}\n\nexport function getNumber(\n    buf: ArrayLike<number>,\n    fmt: NumberFormat,\n    offset: number,\n) {\n    switch (fmt) {\n        case NumberFormat.UInt8BE:\n        case NumberFormat.UInt8LE:\n            return buf[offset]\n        case NumberFormat.Int8BE:\n        case NumberFormat.Int8LE:\n            return (buf[offset] << 24) >> 24\n        case NumberFormat.UInt16LE:\n            return read16(buf, offset)\n        case NumberFormat.Int16LE:\n            return (read16(buf, offset) << 16) >> 16\n        case NumberFormat.UInt32LE:\n            return read32(buf, offset)\n        case NumberFormat.Int32LE:\n            return read32(buf, offset) >> 0\n        case NumberFormat.UInt64LE:\n            return read32(buf, offset) + read32(buf, offset + 4) * 0x100000000\n        case NumberFormat.Int64LE:\n            return (\n                read32(buf, offset) +\n                (read32(buf, offset + 4) >> 0) * 0x100000000\n            )\n        default: {\n            const inf = fmtInfo(fmt)\n            if (inf.isFloat) {\n                const arr = new Uint8Array(inf.size)\n                for (let i = 0; i < inf.size; ++i) {\n                    arr[i] = buf[offset + i]\n                }\n                if (inf.swap) arr.reverse()\n                if (inf.size == 4) return new Float32Array(arr.buffer)[0]\n                else return new Float64Array(arr.buffer)[0]\n            }\n            throw new Error(\"unsupported fmt:\" + fmt)\n        }\n    }\n}\n\nexport function setNumber(\n    buf: Uint8Array,\n    fmt: NumberFormat,\n    offset: number,\n    r: number,\n) {\n    const inf = fmtInfo(fmt)\n    if (inf.isFloat) {\n        const arr = new Uint8Array(inf.size)\n        if (inf.size == 4) new Float32Array(arr.buffer)[0] = r\n        else new Float64Array(arr.buffer)[0] = r\n        if (inf.swap) arr.reverse()\n        for (let i = 0; i < inf.size; ++i) {\n            buf[offset + i] = arr[i]\n        }\n        return\n    }\n\n    if (fmt == NumberFormat.UInt64LE || fmt == NumberFormat.Int64LE) {\n        setNumber(buf, NumberFormat.UInt32LE, offset, r >>> 0)\n        setNumber(buf, NumberFormat.UInt32LE, offset + 4, r / 0x100000000)\n        return\n    }\n\n    for (let i = 0; i < inf.size; ++i) {\n        const off = !inf.swap ? offset + i : offset + inf.size - i - 1\n        buf[off] = r & 0xff\n        r >>= 8\n    }\n}\n\nexport function uintOfBuffer(data: Uint8Array) {\n    let fmt: NumberFormat\n    switch (data.length) {\n        case 0:\n        case 1:\n            fmt = NumberFormat.UInt8LE\n            break\n        case 2:\n        case 3:\n            fmt = NumberFormat.UInt16LE\n            break\n        default:\n            fmt = NumberFormat.UInt32LE\n            break\n    }\n    return getNumber(data, fmt, 0)\n}\n\nexport function intOfBuffer(data: Uint8Array) {\n    let fmt: NumberFormat\n    switch (data.length) {\n        case 0:\n        case 1:\n            fmt = NumberFormat.Int8LE\n            break\n        case 2:\n        case 3:\n            fmt = NumberFormat.Int16LE\n            break\n        default:\n            fmt = NumberFormat.Int32LE\n            break\n    }\n    return getNumber(data, fmt, 0)\n}\n\nexport function bufferToArray(data: Uint8Array, fmt: NumberFormat) {\n    const res: number[] = []\n    const sz = sizeOfNumberFormat(fmt)\n    for (let off = 0; off <= data.length - sz; off += sz)\n        res.push(getNumber(data, fmt, off))\n    return res\n}\n\nexport function concatBufferArray(chunks: Uint8Array[]) {\n    let sz = 0\n    for (const ch of chunks) sz += ch.length\n    const r = new Uint8Array(sz)\n    sz = 0\n    for (const ch of chunks) {\n        r.set(ch, sz)\n        sz += ch.length\n    }\n    return r\n}\n\nexport async function sha256(buffers: Uint8Array[]) {\n    const concat = concatBufferArray(buffers)\n    if (typeof self === \"undefined\" || !window.crypto) {\n        const s = require(\"crypto\").createHash(\"sha256\")\n        s.update(concat)\n        return Promise.resolve(new Uint8Array(s.digest()))\n    }\n    const r = await self.crypto.subtle.digest(\"SHA-256\", concat)\n    return new Uint8Array(r)\n}\n\n/**\n * Compute keyed-Hash Message Authentication Code as defined in RFC 2104.\n */\nexport async function sha256Hmac(key: Uint8Array, msg: Uint8Array) {\n    const blockSize = 64\n    if (key.length > blockSize) key = await sha256([key])\n    const paddedKey = new Uint8Array(blockSize)\n    paddedKey.set(key, 0)\n    for (let i = 0; i < blockSize; ++i) paddedKey[i] ^= 0x36\n    const h0 = await sha256([paddedKey, msg])\n    for (let i = 0; i < blockSize; ++i) paddedKey[i] ^= 0x36 ^ 0x5c\n    return await sha256([paddedKey, h0])\n}\n\nexport function fromBase64(encoded: string): Uint8Array {\n    if (typeof Buffer == \"function\" && typeof Buffer.from == \"function\")\n        return new Uint8Array(Buffer.from(encoded, \"base64\"))\n    else return stringToUint8Array(atob(encoded))\n}\n\nexport function toBase64(data: Uint8Array): string {\n    if (typeof Buffer == \"function\" && typeof Buffer.from == \"function\")\n        return Buffer.from(data).toString(\"base64\")\n    else return btoa(uint8ArrayToString(data))\n}\n", "[{\"name\":\"Common registers and commands\",\"status\":\"experimental\",\"shortId\":\"_system\",\"camelName\":\"system\",\"shortName\":\"system\",\"extends\":[],\"notes\":{\"short\":\"This file describes common register and command codes.\\n\\nThese are defined in ranges separate from the per-service ones.\\nNo service actually derives from this file, but services can include packets\\ndefined here.\\nTheir code is listed as say `@ intensity` and not `@ 0x01` (the spectool enforces that).\",\"commands\":\"Command codes are subdivided as follows:\\n\\n-   Commands `0x000-0x07f` - common to all services\\n-   Commands `0x080-0xeff` - defined per-service\\n-   Commands `0xf00-0xfff` - reserved for implementation\\n\\nCommands follow.\",\"registers\":\"Register codes are subdivided as follows:\\n\\n-   Registers `0x001-0x07f` - r/w common to all services\\n-   Registers `0x080-0x0ff` - r/w defined per-service\\n-   Registers `0x100-0x17f` - r/o common to all services\\n-   Registers `0x180-0x1ff` - r/o defined per-service\\n-   Registers `0x200-0xeff` - custom, defined per-service\\n-   Registers `0xf00-0xfff` - reserved for implementation, should not be seen on the wire\\n\\nThe types listed are typical. Check spec for particular service for exact type,\\nand a service-specific name for a register (eg. `value` could be `pulse_length`).\\nAll registers default to `0` unless otherwise indicated.\",\"events\":\"Events codes are 8-bit and are subdivided as follows:\\n\\n-   Events `0x00-0x7f` - common to all services\\n-   Events `0x80-0xff` - defined per-service\"},\"classIdentifier\":536870897,\"enums\":{\"ReadingThreshold\":{\"name\":\"ReadingThreshold\",\"storage\":1,\"members\":{\"Neutral\":1,\"Inactive\":2,\"Active\":3}},\"StatusCodes\":{\"name\":\"StatusCodes\",\"storage\":2,\"members\":{\"Ready\":0,\"Initializing\":1,\"Calibrating\":2,\"Sleeping\":3,\"WaitingForInput\":4,\"CalibrationNeeded\":100}}},\"constants\":{\"announce_interval\":{\"value\":500,\"hex\":false}},\"packets\":[{\"kind\":\"command\",\"name\":\"announce\",\"identifier\":0,\"description\":\"Enumeration data for control service; service-specific advertisement data otherwise.\\nControl broadcasts it automatically every `announce_interval`ms, but other service have to be queried to provide it.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"announce\",\"identifier\":0,\"description\":\"Enumeration data for control service; service-specific advertisement data otherwise.\\nControl broadcasts it automatically every `announce_interval`ms, but other service have to be queried to provide it.\",\"fields\":[],\"secondary\":true},{\"kind\":\"command\",\"name\":\"get_register\",\"identifier\":4096,\"description\":\"Registers number `N` is fetched by issuing command `0x1000 | N`.\\nThe report format is the same as the format of the register.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"get_register\",\"identifier\":4096,\"description\":\"Registers number `N` is fetched by issuing command `0x1000 | N`.\\nThe report format is the same as the format of the register.\",\"fields\":[],\"secondary\":true},{\"kind\":\"command\",\"name\":\"set_register\",\"identifier\":8192,\"description\":\"Registers number `N` is set by issuing command `0x2000 | N`, with the format\\nthe same as the format of the register.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"calibrate\",\"identifier\":2,\"description\":\"Request to calibrate a sensor. The report indicates the calibration is done.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"calibrate\",\"identifier\":2,\"description\":\"Request to calibrate a sensor. The report indicates the calibration is done.\",\"fields\":[],\"secondary\":true},{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16 u16\"},{\"kind\":\"rw\",\"name\":\"intensity\",\"identifier\":1,\"description\":\"This is either binary on/off (0 or non-zero), or can be gradual (eg. brightness of an RGB LED strip).\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"value\",\"identifier\":2,\"description\":\"The primary value of actuator (eg. servo pulse length, or motor duty cycle).\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"const\",\"name\":\"min_value\",\"identifier\":272,\"description\":\"The lowest value that can be reported for the value register.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"const\",\"name\":\"max_value\",\"identifier\":273,\"description\":\"The highest value that can be reported for the value register.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"rw\",\"name\":\"max_power\",\"identifier\":7,\"description\":\"Limit the power drawn by the service, in mA.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mA\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":500,\"typicalMax\":500,\"typicalMin\":0}],\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"reading\",\"identifier\":257,\"description\":\"Read-only value of the sensor, also reported in streaming.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"volatile\":true,\"packFormat\":\"i32\"},{\"kind\":\"rw\",\"name\":\"reading_range\",\"identifier\":8,\"description\":\"For sensors that support it, sets the range (sometimes also described `min`/`max_reading`).\\nTypically only a small set of values is supported.\\nSetting it to `X` will select the smallest possible range that is at least `X`,\\nor if it doesn't exist, the largest supported range.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"supported_ranges\",\"identifier\":266,\"description\":\"Lists the values supported as `reading_range`.\",\"fields\":[{\"name\":\"range\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"startRepeats\":true}],\"packFormat\":\"r: u32\"},{\"kind\":\"const\",\"name\":\"min_reading\",\"identifier\":260,\"description\":\"The lowest value that can be reported by the sensor.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"const\",\"name\":\"max_reading\",\"identifier\":261,\"description\":\"The highest value that can be reported by the sensor.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"ro\",\"name\":\"reading_error\",\"identifier\":262,\"description\":\"The real value of whatever is measured is between `reading - reading_error` and `reading + reading_error`. It should be computed from the internal state of the sensor. This register is often, but not always `const`. If the register value is modified,\\nsend a report in the same frame of the `reading` report.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"volatile\":true,\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"reading_resolution\",\"identifier\":264,\"description\":\"Smallest, yet distinguishable change in reading.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"inactive_threshold\",\"identifier\":5,\"description\":\"Threshold when reading data gets inactive and triggers a `inactive`.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"rw\",\"name\":\"active_threshold\",\"identifier\":6,\"description\":\"Thresholds when reading data gets active and triggers a `active` event.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The hardware variant of the service.\\nFor services which support this, there's an enum defining the meaning.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. `code` is a standardized value from\\nthe Jacdac status/error codes. `vendor_code` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet.\",\"fields\":[{\"name\":\"code\",\"type\":\"StatusCodes\",\"storage\":2},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16 u16\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"packFormat\":\"s\"},{\"kind\":\"event\",\"name\":\"active\",\"identifier\":1,\"description\":\"Notifies that the service has been activated (eg. button pressed, network connected, etc.)\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"inactive\",\"identifier\":2,\"description\":\"Notifies that the service has been dis-activated.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"change\",\"identifier\":3,\"description\":\"Notifies that the some state of the service changed.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"StatusCodes\",\"storage\":2},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16 u16\"},{\"kind\":\"event\",\"name\":\"neutral\",\"identifier\":7,\"description\":\"Notifies that the threshold is back between `low` and `high`.\",\"fields\":[]}],\"tags\":[]},{\"name\":\"Base service\",\"status\":\"stable\",\"shortId\":\"_base\",\"camelName\":\"base\",\"shortName\":\"base\",\"extends\":[],\"notes\":{\"short\":\"Base class for all services.\"},\"classIdentifier\":536870899,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\"}],\"tags\":[]},{\"name\":\"Sensor\",\"status\":\"stable\",\"shortId\":\"_sensor\",\"camelName\":\"sensor\",\"shortName\":\"sensor\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Base class for sensors.\"},\"classIdentifier\":536870898,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\"}],\"tags\":[]},{\"name\":\"Accelerometer\",\"status\":\"stable\",\"shortId\":\"accelerometer\",\"camelName\":\"accelerometer\",\"shortName\":\"accelerometer\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A 3-axis accelerometer.\",\"long\":\"## Orientation\\n\\nAn accelerometer module should translate acceleration values as follows:\\n\\n| Orientation           \\t| X value (g) \\t| Y value (g) \\t| Z value (g) \\t|\\n|-----------------------\\t|-------------\\t|-------------\\t|-------------\\t|\\n| Module lying flat     \\t| 0           \\t| 0           \\t| -1          \\t|\\n| Module on left edge   \\t| -1          \\t| 0           \\t| 0           \\t|\\n| Module on bottom edge \\t| 0           \\t| 1           \\t| 0           \\t|\\n\\nWe recommend an orientation marking on the PCB so that users can mount modules without having to experiment with the device. Left/bottom can be determined by assuming text on silk runs left-to-right.\",\"events\":\"All events are debounced.\"},\"classIdentifier\":521405449,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"forces\",\"identifier\":257,\"description\":\"Indicates the current forces acting on accelerometer.\",\"fields\":[{\"name\":\"x\",\"unit\":\"g\",\"shift\":20,\"type\":\"i12.20\",\"storage\":-4},{\"name\":\"y\",\"unit\":\"g\",\"shift\":20,\"type\":\"i12.20\",\"storage\":-4},{\"name\":\"z\",\"unit\":\"g\",\"shift\":20,\"type\":\"i12.20\",\"storage\":-4}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"i12.20 i12.20 i12.20\"},{\"kind\":\"ro\",\"name\":\"forces_error\",\"identifier\":262,\"description\":\"Error on the reading value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"g\",\"shift\":20,\"type\":\"u12.20\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u12.20\"},{\"kind\":\"rw\",\"name\":\"max_force\",\"identifier\":8,\"description\":\"Configures the range forces detected.\\nThe value will be \\\"rounded up\\\" to one of `max_forces_supported`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"g\",\"shift\":20,\"type\":\"u12.20\",\"storage\":4}],\"optional\":true,\"identifierName\":\"reading_range\",\"packFormat\":\"u12.20\"},{\"kind\":\"const\",\"name\":\"max_forces_supported\",\"identifier\":266,\"description\":\"Lists values supported for writing `max_force`.\",\"fields\":[{\"name\":\"max_force\",\"unit\":\"g\",\"shift\":20,\"type\":\"u12.20\",\"storage\":4,\"startRepeats\":true}],\"optional\":true,\"identifierName\":\"supported_ranges\",\"packFormat\":\"r: u12.20\"},{\"kind\":\"event\",\"name\":\"tilt_up\",\"identifier\":129,\"description\":\"Emitted when accelerometer is tilted in the given direction.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"tilt_down\",\"identifier\":130,\"description\":\"Emitted when accelerometer is tilted in the given direction.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"tilt_left\",\"identifier\":131,\"description\":\"Emitted when accelerometer is tilted in the given direction.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"tilt_right\",\"identifier\":132,\"description\":\"Emitted when accelerometer is tilted in the given direction.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"face_up\",\"identifier\":133,\"description\":\"Emitted when accelerometer is laying flat in the given direction.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"face_down\",\"identifier\":134,\"description\":\"Emitted when accelerometer is laying flat in the given direction.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"freefall\",\"identifier\":135,\"description\":\"Emitted when total force acting on accelerometer is much less than 1g.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"shake\",\"identifier\":139,\"description\":\"Emitted when forces change violently a few times.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"force_2g\",\"identifier\":140,\"description\":\"Emitted when force in any direction exceeds given threshold.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"force_3g\",\"identifier\":136,\"description\":\"Emitted when force in any direction exceeds given threshold.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"force_6g\",\"identifier\":137,\"description\":\"Emitted when force in any direction exceeds given threshold.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"force_8g\",\"identifier\":138,\"description\":\"Emitted when force in any direction exceeds given threshold.\",\"fields\":[]}],\"tags\":[\"C\"],\"group\":\"Movement\"},{\"name\":\"Acidity\",\"status\":\"experimental\",\"shortId\":\"acidity\",\"camelName\":\"acidity\",\"shortName\":\"acidity\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor measuring water acidity, commonly called pH.\"},\"classIdentifier\":513243333,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"acidity\",\"identifier\":257,\"description\":\"The acidity, pH, of water.\",\"fields\":[{\"name\":\"_\",\"unit\":\"pH\",\"shift\":12,\"type\":\"u4.12\",\"storage\":2,\"absoluteMin\":0,\"absoluteMax\":15,\"typicalMin\":2.5,\"typicalMax\":10.5}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":5000,\"packFormat\":\"u4.12\"},{\"kind\":\"ro\",\"name\":\"acidity_error\",\"identifier\":262,\"description\":\"Error on the acidity reading.\",\"fields\":[{\"name\":\"_\",\"unit\":\"pH\",\"shift\":12,\"type\":\"u4.12\",\"storage\":2}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u4.12\"},{\"kind\":\"const\",\"name\":\"min_acidity\",\"identifier\":260,\"description\":\"Lowest acidity that can be reported.\",\"fields\":[{\"name\":\"_\",\"unit\":\"pH\",\"shift\":12,\"type\":\"u4.12\",\"storage\":2}],\"optional\":true,\"identifierName\":\"min_reading\",\"packFormat\":\"u4.12\"},{\"kind\":\"const\",\"name\":\"max_humidity\",\"identifier\":261,\"description\":\"Highest acidity that can be reported.\",\"fields\":[{\"name\":\"_\",\"unit\":\"pH\",\"shift\":12,\"type\":\"u4.12\",\"storage\":2}],\"optional\":true,\"identifierName\":\"max_reading\",\"packFormat\":\"u4.12\"}],\"tags\":[\"C\",\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Air Pressure\",\"status\":\"rc\",\"shortId\":\"airpressure\",\"camelName\":\"airPressure\",\"shortName\":\"airPressure\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor measuring air pressure of outside environment.\",\"registers\":\"Default streaming interval is 1s.\"},\"classIdentifier\":504462570,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"pressure\",\"identifier\":257,\"description\":\"The air pressure.\",\"fields\":[{\"name\":\"_\",\"unit\":\"hPa\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4,\"typicalMin\":150,\"typicalMax\":1150}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u22.10\"},{\"kind\":\"ro\",\"name\":\"pressure_error\",\"identifier\":262,\"description\":\"The real pressure is between `pressure - pressure_error` and `pressure + pressure_error`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"hPa\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"min_pressure\",\"identifier\":260,\"description\":\"Lowest air pressure that can be reported.\",\"fields\":[{\"name\":\"_\",\"unit\":\"hPa\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"optional\":true,\"identifierName\":\"min_reading\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"max_pressure\",\"identifier\":261,\"description\":\"Highest air pressure that can be reported.\",\"fields\":[{\"name\":\"_\",\"unit\":\"hPa\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"optional\":true,\"identifierName\":\"max_reading\",\"packFormat\":\"u22.10\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Air Quality Index\",\"status\":\"experimental\",\"shortId\":\"airqualityindex\",\"camelName\":\"airQualityIndex\",\"shortName\":\"airQualityIndex\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"The Air Quality Index is a measure of how clean or polluted air is. From min, good quality, to high, low quality.\\nThe range of AQI may vary between countries (https://en.wikipedia.org/wiki/Air_quality_index).\"},\"classIdentifier\":346844886,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"aqi_index\",\"identifier\":257,\"description\":\"Air quality index, typically refreshed every second.\",\"fields\":[{\"name\":\"_\",\"unit\":\"AQI\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4,\"typicalMax\":500,\"typicalMin\":0}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":60000,\"packFormat\":\"u16.16\"},{\"kind\":\"ro\",\"name\":\"aqi_index_error\",\"identifier\":262,\"description\":\"Error on the AQI measure.\",\"fields\":[{\"name\":\"_\",\"unit\":\"AQI\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"min_aqi_index\",\"identifier\":260,\"description\":\"Minimum AQI reading, representing a good air quality. Typically 0.\",\"fields\":[{\"name\":\"_\",\"unit\":\"AQI\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"identifierName\":\"min_reading\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"max_aqi_index\",\"identifier\":261,\"description\":\"Maximum AQI reading, representing a very poor air quality.\",\"fields\":[{\"name\":\"_\",\"unit\":\"AQI\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"identifierName\":\"max_reading\",\"packFormat\":\"u16.16\"}],\"tags\":[],\"group\":\"Environment\"},{\"name\":\"Arcade Gamepad\",\"status\":\"deprecated\",\"shortId\":\"arcadegamepad\",\"camelName\":\"arcadeGamepad\",\"shortName\":\"arcadeGamepad\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"This service is deprecated in favor of `gamepad` (although it is currently used by the micro:bit Arcade smart shield).\\nA gamepad with direction and action buttons for one player.\\nIf a device has multiple controllers, it should have multiple gamepad services, using consecutive service identifiers.\"},\"classIdentifier\":501915758,\"enums\":{\"Button\":{\"name\":\"Button\",\"storage\":1,\"members\":{\"Left\":1,\"Up\":2,\"Right\":3,\"Down\":4,\"A\":5,\"B\":6,\"Menu\":7,\"Select\":8,\"Reset\":9,\"Exit\":10}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"buttons\",\"identifier\":257,\"description\":\"Indicates which buttons are currently active (pressed).\\n`pressure` should be `0xff` for digital buttons, and proportional for analog ones.\",\"fields\":[{\"name\":\"button\",\"type\":\"Button\",\"storage\":1,\"startRepeats\":true},{\"name\":\"pressure\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"r: u8 u0.8\"},{\"kind\":\"const\",\"name\":\"available_buttons\",\"identifier\":384,\"description\":\"Indicates number of players supported and which buttons are present on the controller.\",\"fields\":[{\"name\":\"button\",\"type\":\"Button\",\"storage\":1,\"startRepeats\":true}],\"packFormat\":\"r: u8\"},{\"kind\":\"event\",\"name\":\"down\",\"identifier\":1,\"description\":\"Emitted when button goes from inactive to active.\",\"fields\":[{\"name\":\"button\",\"type\":\"Button\",\"storage\":1}],\"identifierName\":\"active\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"up\",\"identifier\":2,\"description\":\"Emitted when button goes from active to inactive.\",\"fields\":[{\"name\":\"button\",\"type\":\"Button\",\"storage\":1}],\"identifierName\":\"inactive\",\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Button\"},{\"name\":\"Arcade Sound\",\"status\":\"experimental\",\"shortId\":\"arcadesound\",\"camelName\":\"arcadeSound\",\"shortName\":\"arcadeSound\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A sound playing device.\\n\\nThis is typically run over an SPI connection, not regular single-wire Jacdac.\"},\"classIdentifier\":533083654,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"play\",\"identifier\":128,\"description\":\"Play samples, which are single channel, signed 16-bit little endian values.\",\"fields\":[{\"name\":\"samples\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"},{\"kind\":\"rw\",\"name\":\"sample_rate\",\"identifier\":128,\"description\":\"Get or set playback sample rate (in samples per second).\\nIf you set it, read it back, as the value may be rounded up or down.\",\"fields\":[{\"name\":\"_\",\"unit\":\"Hz\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4,\"defaultValue\":44100}],\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"buffer_size\",\"identifier\":384,\"description\":\"The size of the internal audio buffer.\",\"fields\":[{\"name\":\"_\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"buffer_pending\",\"identifier\":385,\"description\":\"How much data is still left in the buffer to play.\\nClients should not send more data than `buffer_size - buffer_pending`,\\nbut can keep the `buffer_pending` as low as they want to ensure low latency\\nof audio playback.\",\"fields\":[{\"name\":\"_\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"}],\"tags\":[\"SPI\"]},{\"name\":\"Barcode reader\",\"status\":\"experimental\",\"shortId\":\"barcodereader\",\"camelName\":\"barcodeReader\",\"shortName\":\"barcodeReader\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A device that reads various barcodes, like QR codes. For the web, see [BarcodeDetector](https://developer.mozilla.org/en-US/docs/Web/API/BarcodeDetector).\"},\"classIdentifier\":477339244,\"enums\":{\"Format\":{\"name\":\"Format\",\"storage\":1,\"members\":{\"Aztec\":1,\"Code128\":2,\"Code39\":3,\"Code93\":4,\"Codabar\":5,\"DataMatrix\":6,\"Ean13\":8,\"Ean8\":9,\"ITF\":10,\"Pdf417\":11,\"QrCode\":12,\"UpcA\":13,\"UpcE\":14}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turns on or off the detection of barcodes.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"formats\",\"identifier\":384,\"description\":\"Reports the list of supported barcode formats, as documented in https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API.\",\"fields\":[{\"name\":\"format\",\"type\":\"Format\",\"storage\":1,\"startRepeats\":true}],\"optional\":true,\"packFormat\":\"r: u8\"},{\"kind\":\"event\",\"name\":\"detect\",\"identifier\":1,\"description\":\"Raised when a bar code is detected and decoded. If the reader detects multiple codes, it will issue multiple events.\\nIn case of numeric barcodes, the `data` field should contain the ASCII (which is the same as UTF8 in that case) representation of the number.\",\"fields\":[{\"name\":\"format\",\"type\":\"Format\",\"storage\":1},{\"name\":\"data\",\"type\":\"string\",\"storage\":0}],\"identifierName\":\"active\",\"packFormat\":\"u8 s\"}],\"tags\":[]},{\"name\":\"bit:radio\",\"status\":\"stable\",\"shortId\":\"bitradio\",\"camelName\":\"bitRadio\",\"shortName\":\"bitRadio\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Support for sending and receiving packets using the [Bit Radio protocol](https://github.com/microsoft/pxt-common-packages/blob/master/libs/radio/docs/reference/radio.md), typically used between micro:bit devices.\"},\"classIdentifier\":449414863,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turns on/off the radio antenna.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"group\",\"identifier\":128,\"description\":\"Group used to filter packets\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"transmission_power\",\"identifier\":129,\"description\":\"Antenna power to increase or decrease range.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"defaultValue\":6,\"absoluteMin\":1,\"absoluteMax\":7}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"frequency_band\",\"identifier\":130,\"description\":\"Change the transmission and reception band of the radio to the given channel.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"defaultValue\":7,\"absoluteMax\":83,\"absoluteMin\":0}],\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"send_string\",\"identifier\":128,\"description\":\"Sends a string payload as a radio message, maximum 18 characters.\",\"fields\":[{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"unique\":true,\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"send_number\",\"identifier\":129,\"description\":\"Sends a double precision number payload as a radio message\",\"fields\":[{\"name\":\"value\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"unique\":true,\"packFormat\":\"f64\"},{\"kind\":\"command\",\"name\":\"send_value\",\"identifier\":130,\"description\":\"Sends a double precision number and a name payload as a radio message\",\"fields\":[{\"name\":\"value\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8},{\"name\":\"name\",\"type\":\"string\",\"storage\":0}],\"unique\":true,\"packFormat\":\"f64 s\"},{\"kind\":\"command\",\"name\":\"send_buffer\",\"identifier\":131,\"description\":\"Sends a payload of bytes as a radio message\",\"fields\":[{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"b\"},{\"kind\":\"report\",\"name\":\"string_received\",\"identifier\":144,\"description\":\"Raised when a string packet is received\",\"fields\":[{\"name\":\"time\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"device_serial_number\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"rssi\",\"unit\":\"dB\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true},{\"name\":\"padding\",\"type\":\"u8[1]\",\"storage\":1},{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"u32 u32 i8 b[1] s\"},{\"kind\":\"report\",\"name\":\"number_received\",\"identifier\":145,\"description\":\"Raised when a number packet is received\",\"fields\":[{\"name\":\"time\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"device_serial_number\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"rssi\",\"unit\":\"dB\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true},{\"name\":\"padding\",\"type\":\"u8[3]\",\"storage\":3},{\"name\":\"value\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8},{\"name\":\"name\",\"type\":\"string\",\"storage\":0}],\"packed\":true,\"packFormat\":\"u32 u32 i8 b[3] f64 s\"},{\"kind\":\"report\",\"name\":\"buffer_received\",\"identifier\":146,\"description\":\"Raised when a buffer packet is received\",\"fields\":[{\"name\":\"time\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"device_serial_number\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"rssi\",\"unit\":\"dB\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true},{\"name\":\"padding\",\"type\":\"u8[1]\",\"storage\":1},{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"u32 u32 i8 b[1] b\"}],\"tags\":[]},{\"name\":\"Bootloader\",\"status\":\"stable\",\"shortId\":\"bootloader\",\"camelName\":\"bootloader\",\"shortName\":\"bootloader\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Allows flashing (reprogramming) devices over Jacdac.\\n\\nThis is typically implemented by having a separate _bootloader_ mode, as opposed to _application_ mode\\non the module to be flashed.\\nThe bootloader mode is entered on every device reset, for about 300ms.\\nThe bootloader will generally not announce itself, until it gets some command.\\nOnce it gets the command, it will stay in application mode.\\n\\nTypically, you ask the module (in application mode) to reset, while sending broadcast\\n`info` commands to all bootloaders every 100ms or so.\\nAlternatively, you ask the the user to disconnect and re-connect the module, while\\nbroadcasting `info` commands.\\nThe second method works even if the application is damaged (eg., due to an aborted flash).\\n\\nWhen device is in bootloader mode, the device ID may change compared to application mode,\\nby flipping the first bit in the first byte of the device identifier.\"},\"classIdentifier\":536516936,\"enums\":{\"Error\":{\"name\":\"Error\",\"storage\":4,\"members\":{\"NoError\":0,\"PacketTooSmall\":1,\"OutOfFlashableRange\":2,\"InvalidPageOffset\":3,\"NotPageAligned\":4}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"info\",\"identifier\":0,\"description\":\"The `service_class` is always `0x1ffa9948`. The `product_identifier` identifies the kind of firmware\\nthat \\\"fits\\\" this device.\",\"fields\":[],\"identifierName\":\"announce\",\"hasReport\":true},{\"kind\":\"report\",\"name\":\"info\",\"identifier\":0,\"description\":\"The `service_class` is always `0x1ffa9948`. The `product_identifier` identifies the kind of firmware\\nthat \\\"fits\\\" this device.\",\"fields\":[{\"name\":\"service_class\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"page_size\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"flashable_size\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"product_identifier\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"u32 u32 u32 u32\"},{\"kind\":\"command\",\"name\":\"set_session\",\"identifier\":129,\"description\":\"The flashing server should generate a random id, and use this command to set it.\",\"fields\":[{\"name\":\"session_id\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"hasReport\":true,\"packFormat\":\"u32\"},{\"kind\":\"report\",\"name\":\"set_session\",\"identifier\":129,\"description\":\"The flashing server should generate a random id, and use this command to set it.\",\"fields\":[{\"name\":\"session_id\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"u32\"},{\"kind\":\"command\",\"name\":\"page_data\",\"identifier\":128,\"description\":\"Use to send flashing data. A physical page is split into `chunk_max + 1` chunks, where `chunk_no = 0 ... chunk_max`.\\nEach chunk is stored at `page_address + page_offset`. `page_address` has to be equal in all chunks,\\nand is included in response.\\nOnly the last chunk causes writing to flash and elicits response.\\n\\nErrors not listed are also possible. Errors larger than `0xffff` indicate de-synchronization on chunk numbers.\\n\\nWhile this command is technically `unique`, the bootloader client will retry failed pages.\\nBootloaders typically will not support reliable commands delivered over pipes.\",\"fields\":[{\"name\":\"page_address\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"page_offset\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"chunk_no\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"chunk_max\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"session_id\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"reserved0\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"reserved1\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"reserved2\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"reserved3\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"page_data\",\"type\":\"bytes\",\"storage\":208,\"isSimpleType\":true,\"maxBytes\":208}],\"unique\":true,\"hasReport\":true,\"packFormat\":\"u32 u16 u8 u8 u32 u32 u32 u32 u32 b[208]\"},{\"kind\":\"report\",\"name\":\"page_data\",\"identifier\":128,\"description\":\"Use to send flashing data. A physical page is split into `chunk_max + 1` chunks, where `chunk_no = 0 ... chunk_max`.\\nEach chunk is stored at `page_address + page_offset`. `page_address` has to be equal in all chunks,\\nand is included in response.\\nOnly the last chunk causes writing to flash and elicits response.\\n\\nErrors not listed are also possible. Errors larger than `0xffff` indicate de-synchronization on chunk numbers.\\n\\nWhile this command is technically `unique`, the bootloader client will retry failed pages.\\nBootloaders typically will not support reliable commands delivered over pipes.\",\"fields\":[{\"name\":\"session_id\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"page_error\",\"type\":\"Error\",\"storage\":4},{\"name\":\"page_address\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"u32 u32 u32\"}],\"tags\":[\"C\",\"management\"]},{\"name\":\"Braille display\",\"status\":\"stable\",\"shortId\":\"brailledisplay\",\"camelName\":\"brailleDisplay\",\"shortName\":\"brailleDisplay\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A Braille pattern display module. This module display [unicode braille patterns](https://www.unicode.org/charts/PDF/U2800.pdf), country specific encoding have to be implemented by the clients.\"},\"classIdentifier\":331331532,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Determines if the braille display is active.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"patterns\",\"identifier\":2,\"description\":\"Braille patterns to show. Must be unicode characters between `0x2800` and `0x28ff`.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"lowLevel\":true,\"identifierName\":\"value\",\"packFormat\":\"s\"},{\"kind\":\"const\",\"name\":\"length\",\"identifier\":385,\"description\":\"Gets the number of patterns that can be displayed.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Display\"},{\"name\":\"Bridge\",\"status\":\"rc\",\"shortId\":\"bridge\",\"camelName\":\"bridge\",\"shortName\":\"bridge\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Indicates that the device acts as a bridge to the Jacdac bus.\"},\"classIdentifier\":535147631,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Enables or disables the bridge.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"}],\"tags\":[\"infrastructure\"]},{\"name\":\"Button\",\"status\":\"stable\",\"shortId\":\"button\",\"camelName\":\"button\",\"shortName\":\"button\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A push-button, which returns to inactive position when not operated anymore.\"},\"classIdentifier\":343122531,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"pressure\",\"identifier\":257,\"description\":\"Indicates the pressure state of the button, where `0` is open.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"analog\",\"identifier\":384,\"description\":\"Indicates if the button provides analog `pressure` readings.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"pressed\",\"identifier\":385,\"description\":\"Determines if the button is pressed currently.\\n\\nIf the event `down` or `hold` is observed, `pressed` becomes true; if `up` is observed, `pressed` becomes false.\\nThe client should initialize `pressed` to false.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"client\":true,\"volatile\":true,\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"down\",\"identifier\":1,\"description\":\"Emitted when button goes from inactive to active.\",\"fields\":[],\"identifierName\":\"active\"},{\"kind\":\"event\",\"name\":\"up\",\"identifier\":2,\"description\":\"Emitted when button goes from active to inactive. The 'time' parameter\\nrecords the amount of time between the down and up events.\",\"fields\":[{\"name\":\"time\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"identifierName\":\"inactive\",\"packFormat\":\"u32\"},{\"kind\":\"event\",\"name\":\"hold\",\"identifier\":129,\"description\":\"Emitted when the press time is greater than 500ms, and then at least every 500ms\\nas long as the button remains pressed. The 'time' parameter records the the amount of time\\nthat the button has been held (since the down event).\",\"fields\":[{\"name\":\"time\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"}],\"tags\":[\"C\",\"8bit\",\"padauk\",\"input\"],\"group\":\"Button\"},{\"name\":\"Buzzer\",\"status\":\"rc\",\"shortId\":\"buzzer\",\"camelName\":\"buzzer\",\"shortName\":\"buzzer\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A simple buzzer.\"},\"classIdentifier\":458731991,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"volume\",\"identifier\":1,\"description\":\"The volume (duty cycle) of the buzzer.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1,\"defaultValue\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u0.8\"},{\"kind\":\"command\",\"name\":\"play_tone\",\"identifier\":128,\"description\":\"Play a PWM tone with given period and duty for given duration.\\nThe duty is scaled down with `volume` register.\\nTo play tone at frequency `F` Hz and volume `V` (in `0..1`) you will want\\nto send `P = 1000000 / F` and `D = P * V / 2`.\",\"fields\":[{\"name\":\"period\",\"unit\":\"us\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"duty\",\"unit\":\"us\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"duration\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"lowLevel\":true,\"packFormat\":\"u16 u16 u16\"},{\"kind\":\"command\",\"name\":\"play_note\",\"identifier\":129,\"description\":\"Play a note at the given frequency and volume.\",\"fields\":[{\"name\":\"frequency\",\"unit\":\"AudHz\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"volume\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2},{\"name\":\"duration\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"client\":true,\"packFormat\":\"u16 u0.16 u16\"}],\"tags\":[\"C\",\"8bit\"],\"group\":\"Sound\"},{\"name\":\"Capacitive Button\",\"status\":\"rc\",\"shortId\":\"capacitivebutton\",\"camelName\":\"capacitiveButton\",\"shortName\":\"capacitiveButton\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A configuration service for a capacitive push-button.\"},\"classIdentifier\":677752265,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"threshold\",\"identifier\":6,\"description\":\"Indicates the threshold for ``up`` events.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"identifierName\":\"active_threshold\",\"packFormat\":\"u0.16\"},{\"kind\":\"command\",\"name\":\"calibrate\",\"identifier\":2,\"description\":\"Request to calibrate the capactive. When calibration is requested, the device expects that no object is touching the button. \\nThe report indicates the calibration is done.\",\"fields\":[],\"identifierName\":\"calibrate\",\"hasReport\":true},{\"kind\":\"report\",\"name\":\"calibrate\",\"identifier\":2,\"description\":\"Request to calibrate the capactive. When calibration is requested, the device expects that no object is touching the button. \\nThe report indicates the calibration is done.\",\"fields\":[],\"secondary\":true}],\"tags\":[\"8bit\"],\"group\":\"Button\"},{\"name\":\"Character Screen\",\"status\":\"rc\",\"shortId\":\"characterscreen\",\"camelName\":\"characterScreen\",\"shortName\":\"characterScreen\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A screen that displays characters, typically a LCD/OLED character screen.\"},\"classIdentifier\":523748714,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"LCD\":1,\"OLED\":2,\"Braille\":3}},\"TextDirection\":{\"name\":\"TextDirection\",\"storage\":1,\"members\":{\"LeftToRight\":1,\"RightToLeft\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"message\",\"identifier\":2,\"description\":\"Text to show. Use `\\\\n` to break lines.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"identifierName\":\"value\",\"packFormat\":\"s\"},{\"kind\":\"rw\",\"name\":\"brightness\",\"identifier\":1,\"description\":\"Brightness of the screen. `0` means off.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"optional\":true,\"identifierName\":\"intensity\",\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Describes the type of character LED screen.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"text_direction\",\"identifier\":130,\"description\":\"Specifies the RTL or LTR direction of the text.\",\"fields\":[{\"name\":\"_\",\"type\":\"TextDirection\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"rows\",\"identifier\":384,\"description\":\"Gets the number of rows.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"columns\",\"identifier\":385,\"description\":\"Gets the number of columns.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Display\"},{\"name\":\"Cloud Adapter\",\"status\":\"experimental\",\"shortId\":\"cloudadapter\",\"camelName\":\"cloudAdapter\",\"shortName\":\"cloudAdapter\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Supports cloud connections to upload and download data.\\nNote that `f64` values following a label are not necessarily aligned.\"},\"classIdentifier\":341864092,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"upload_json\",\"identifier\":128,\"description\":\"Upload a JSON-encoded message to the cloud.\",\"fields\":[{\"name\":\"topic\",\"type\":\"string0\",\"storage\":0},{\"name\":\"json\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"z s\"},{\"kind\":\"command\",\"name\":\"upload_binary\",\"identifier\":129,\"description\":\"Upload a binary message to the cloud.\",\"fields\":[{\"name\":\"topic\",\"type\":\"string0\",\"storage\":0},{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"z b\"},{\"kind\":\"ro\",\"name\":\"connected\",\"identifier\":384,\"description\":\"Indicate whether we're currently connected to the cloud server.\\nWhen offline, `upload` commands are queued.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"connection_name\",\"identifier\":385,\"description\":\"User-friendly name of the connection, typically includes name of the server\\nand/or type of cloud service (`\\\"something.cloud.net (Provider IoT)\\\"`).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"event\",\"name\":\"on_json\",\"identifier\":128,\"description\":\"Emitted when cloud send us a JSON message.\",\"fields\":[{\"name\":\"topic\",\"type\":\"string0\",\"storage\":0},{\"name\":\"json\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"z s\"},{\"kind\":\"event\",\"name\":\"on_binary\",\"identifier\":129,\"description\":\"Emitted when cloud send us a binary message.\",\"fields\":[{\"name\":\"topic\",\"type\":\"string0\",\"storage\":0},{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"z b\"},{\"kind\":\"event\",\"name\":\"change\",\"identifier\":3,\"description\":\"Emitted when we connect or disconnect from the cloud.\",\"fields\":[],\"identifierName\":\"change\"}],\"tags\":[\"infrastructure\",\"devicescript\"],\"group\":\"Iot\",\"restricted\":true},{\"name\":\"Cloud Configuration\",\"status\":\"rc\",\"shortId\":\"cloudconfiguration\",\"camelName\":\"cloudConfiguration\",\"shortName\":\"cloudConfiguration\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Connection and diagnostics information about the cloud connection.\"},\"classIdentifier\":342028028,\"enums\":{\"ConnectionStatus\":{\"name\":\"ConnectionStatus\",\"storage\":2,\"members\":{\"Connected\":1,\"Disconnected\":2,\"Connecting\":3,\"Disconnecting\":4}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"server_name\",\"identifier\":384,\"description\":\"Something like `my-iot-hub.azure-devices.net` if available.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"cloud_device_id\",\"identifier\":385,\"description\":\"Device identifier for the device in the cloud if available.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"packFormat\":\"s\"},{\"kind\":\"const\",\"name\":\"cloud_type\",\"identifier\":387,\"description\":\"Cloud provider identifier.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"connection_status\",\"identifier\":386,\"description\":\"Indicates the status of connection. A message beyond the [0..3] range represents an HTTP error code.\",\"fields\":[{\"name\":\"_\",\"type\":\"ConnectionStatus\",\"storage\":2}],\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"push_period\",\"identifier\":128,\"description\":\"How often to push data to the cloud.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":5000}],\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"push_watchdog_period\",\"identifier\":129,\"description\":\"If no message is published within given period, the device resets.\\nThis can be due to connectivity problems or due to the device having nothing to publish.\\nForced to be at least `2 * flush_period`.\\nSet to `0` to disable (default).\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"command\",\"name\":\"connect\",\"identifier\":129,\"description\":\"Starts a connection to the cloud service\",\"fields\":[],\"restricted\":true},{\"kind\":\"command\",\"name\":\"disconnect\",\"identifier\":130,\"description\":\"Starts disconnecting from the cloud service\",\"fields\":[],\"restricted\":true},{\"kind\":\"command\",\"name\":\"set_connection_string\",\"identifier\":134,\"description\":\"Restricted command to override the existing connection string to cloud.\",\"fields\":[{\"name\":\"connection_string\",\"type\":\"string\",\"storage\":0}],\"restricted\":true,\"packFormat\":\"s\"},{\"kind\":\"event\",\"name\":\"connection_status_change\",\"identifier\":3,\"description\":\"Raised when the connection status changes\",\"fields\":[{\"name\":\"connection_status\",\"type\":\"ConnectionStatus\",\"storage\":2}],\"identifierName\":\"change\",\"packFormat\":\"u16\"},{\"kind\":\"event\",\"name\":\"message_sent\",\"identifier\":128,\"description\":\"Raised when a message has been sent to the hub.\",\"fields\":[]}],\"tags\":[\"management\"],\"group\":\"Iot\"},{\"name\":\"CODAL Message Bus\",\"status\":\"experimental\",\"shortId\":\"codalmessagebus\",\"camelName\":\"codalMessageBus\",\"shortName\":\"codalMessageBus\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A service that uses the [CODAL message bus](https://lancaster-university.github.io/microbit-docs/ubit/messageBus/) to send and receive small messages.\\n\\nYou can find known values for `source` in [CODAL repository](https://github.com/lancaster-university/codal-core/blob/master/inc/core/CodalComponent.h)\\nIn MakeCode, you can listen for custom `source`, `value` values using [control.onEvent](https://makecode.microbit.org/reference/control/on-event].\"},\"classIdentifier\":304085021,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"send\",\"identifier\":128,\"description\":\"Send a message on the CODAL bus. If `source` is `0`, it is treated as wildcard.\",\"fields\":[{\"name\":\"source\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"value\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"u16 u16\"},{\"kind\":\"event\",\"name\":\"message\",\"identifier\":128,\"description\":\"Raised by the server is triggered by the server. The filtering logic of which event to send over Jacdac is up to the server implementation.\",\"fields\":[{\"name\":\"source\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"value\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16 u16\"}],\"tags\":[]},{\"name\":\"Color\",\"status\":\"experimental\",\"shortId\":\"color\",\"camelName\":\"color\",\"shortName\":\"color\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"Senses RGB colors\"},\"classIdentifier\":372299111,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"color\",\"identifier\":257,\"description\":\"Detected color in the RGB color space.\",\"fields\":[{\"name\":\"red\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2},{\"name\":\"green\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2},{\"name\":\"blue\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u0.16 u0.16 u0.16\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Compass\",\"status\":\"rc\",\"shortId\":\"compass\",\"camelName\":\"compass\",\"shortName\":\"compass\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that measures the heading.\"},\"classIdentifier\":364362175,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"heading\",\"identifier\":257,\"description\":\"The heading with respect to the magnetic north.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4,\"absoluteMin\":0,\"absoluteMax\":359}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u16.16\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turn on or off the sensor. Turning on the sensor may start a calibration sequence.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"heading_error\",\"identifier\":262,\"description\":\"Error on the heading reading\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u16.16\"},{\"kind\":\"command\",\"name\":\"calibrate\",\"identifier\":2,\"description\":\"Starts a calibration sequence for the compass.\",\"fields\":[],\"identifierName\":\"calibrate\"}],\"tags\":[]},{\"name\":\"Control\",\"status\":\"stable\",\"shortId\":\"control\",\"camelName\":\"control\",\"shortName\":\"control\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Control service is always service index `0`.\\nIt handles actions common to all services on a device.\\n\\nNote: some of the optional features (including `flood_ping`, `mcu_temperature`, and all string registers)\\nare not implemented in `8bit` version.\"},\"classIdentifier\":0,\"enums\":{\"AnnounceFlags\":{\"name\":\"AnnounceFlags\",\"storage\":2,\"isFlags\":true,\"members\":{\"RestartCounterSteady\":15,\"RestartCounter1\":1,\"RestartCounter2\":2,\"RestartCounter4\":4,\"RestartCounter8\":8,\"StatusLightNone\":0,\"StatusLightMono\":16,\"StatusLightRgbNoFade\":32,\"StatusLightRgbFade\":48,\"SupportsACK\":256,\"SupportsBroadcast\":512,\"SupportsFrames\":1024,\"IsClient\":2048,\"SupportsReliableCommands\":4096}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"services\",\"identifier\":0,\"description\":\"The `restart_counter` is computed from the `flags & RestartCounterSteady`, starts at `0x1` and increments by one until it reaches `0xf`, then it stays at `0xf`.\\nIf this number ever goes down, it indicates that the device restarted.\\n`service_class` indicates class identifier for each service index (service index `0` is always control, so it's\\nskipped in this enumeration).\\n`packet_count` indicates the number of reports sent by the current device since last announce,\\nincluding the current announce packet (it is always 0 if this feature is not supported).\\nThe command form can be used to induce report, which is otherwise broadcast every 500ms.\",\"fields\":[],\"identifierName\":\"announce\",\"hasReport\":true},{\"kind\":\"report\",\"name\":\"services\",\"identifier\":0,\"description\":\"The `restart_counter` is computed from the `flags & RestartCounterSteady`, starts at `0x1` and increments by one until it reaches `0xf`, then it stays at `0xf`.\\nIf this number ever goes down, it indicates that the device restarted.\\n`service_class` indicates class identifier for each service index (service index `0` is always control, so it's\\nskipped in this enumeration).\\n`packet_count` indicates the number of reports sent by the current device since last announce,\\nincluding the current announce packet (it is always 0 if this feature is not supported).\\nThe command form can be used to induce report, which is otherwise broadcast every 500ms.\",\"fields\":[{\"name\":\"flags\",\"type\":\"AnnounceFlags\",\"storage\":2},{\"name\":\"packet_count\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"reserved\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"service_class\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"startRepeats\":true}],\"secondary\":true,\"packFormat\":\"u16 u8 u8 r: u32\"},{\"kind\":\"command\",\"name\":\"noop\",\"identifier\":128,\"description\":\"Do nothing. Always ignored. Can be used to test ACKs.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"identify\",\"identifier\":129,\"description\":\"Blink the status LED (262ms on, 262ms off, four times, with the blue LED) or otherwise draw user's attention to device with no status light.\\nFor devices with status light (this can be discovered in the announce flags), the client should\\nsend the sequence of status light command to generate the identify animation.\",\"fields\":[],\"optional\":true},{\"kind\":\"command\",\"name\":\"reset\",\"identifier\":130,\"description\":\"Reset device. ACK may or may not be sent.\",\"fields\":[],\"optional\":true},{\"kind\":\"command\",\"name\":\"flood_ping\",\"identifier\":131,\"description\":\"The device will respond `num_responses` times, as fast as it can, setting the `counter` field in the report\\nto `start_counter`, then `start_counter + 1`, ..., and finally `start_counter + num_responses - 1`.\\nThe `dummy_payload` is `size` bytes long and contains bytes `0, 1, 2, ...`.\",\"fields\":[{\"name\":\"num_responses\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"start_counter\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"size\",\"unit\":\"B\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"unique\":true,\"optional\":true,\"hasReport\":true,\"packFormat\":\"u32 u32 u8\"},{\"kind\":\"report\",\"name\":\"flood_ping\",\"identifier\":131,\"description\":\"The device will respond `num_responses` times, as fast as it can, setting the `counter` field in the report\\nto `start_counter`, then `start_counter + 1`, ..., and finally `start_counter + num_responses - 1`.\\nThe `dummy_payload` is `size` bytes long and contains bytes `0, 1, 2, ...`.\",\"fields\":[{\"name\":\"counter\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"dummy_payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"u32 b\"},{\"kind\":\"command\",\"name\":\"set_status_light\",\"identifier\":132,\"description\":\"Initiates a color transition of the status light from its current color to the one specified.\\nThe transition will complete in about `512 / speed` frames\\n(each frame is currently 100ms, so speed of `51` is about 1 second and `26` 0.5 second).\\nAs a special case, if speed is `0` the transition is immediate.\\nIf MCU is not capable of executing transitions, it can consider `speed` to be always `0`.\\nIf a monochrome LEDs is fitted, the average value of `red`, `green`, `blue` is used.\\nIf intensity of a monochrome LED cannot be controlled, any value larger than `0` should be considered\\non, and `0` (for all three channels) should be considered off.\",\"fields\":[{\"name\":\"to_red\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"to_green\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"to_blue\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"speed\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8 u8 u8 u8\"},{\"kind\":\"command\",\"name\":\"proxy\",\"identifier\":133,\"description\":\"Force client device into proxy mode.\",\"fields\":[],\"optional\":true},{\"kind\":\"command\",\"name\":\"reliable_commands\",\"identifier\":134,\"description\":\"This opens a pipe to the device to provide an alternative, reliable transport of actions\\n(and possibly other commands).\\nThe commands are wrapped as pipe data packets.\\nMultiple invocations of this command with the same `seed` are dropped\\n(and thus the command is not `unique`); otherwise `seed` carries no meaning\\nand should be set to a random value by the client.\\nNote that while the commands sends this way are delivered exactly once, the\\nresponses might get lost.\",\"fields\":[{\"name\":\"seed\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"optional\":true,\"hasReport\":true,\"packFormat\":\"u32\"},{\"kind\":\"report\",\"name\":\"reliable_commands\",\"identifier\":134,\"description\":\"This opens a pipe to the device to provide an alternative, reliable transport of actions\\n(and possibly other commands).\\nThe commands are wrapped as pipe data packets.\\nMultiple invocations of this command with the same `seed` are dropped\\n(and thus the command is not `unique`); otherwise `seed` carries no meaning\\nand should be set to a random value by the client.\\nNote that while the commands sends this way are delivered exactly once, the\\nresponses might get lost.\",\"fields\":[{\"name\":\"commands\",\"type\":\"pipe\",\"storage\":12}],\"secondary\":true,\"pipeType\":\"reliable_commands\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_command\",\"name\":\"wrapped_command\",\"identifier\":0,\"description\":\"This opens a pipe to the device to provide an alternative, reliable transport of actions\\n(and possibly other commands).\\nThe commands are wrapped as pipe data packets.\\nMultiple invocations of this command with the same `seed` are dropped\\n(and thus the command is not `unique`); otherwise `seed` carries no meaning\\nand should be set to a random value by the client.\\nNote that while the commands sends this way are delivered exactly once, the\\nresponses might get lost.\",\"fields\":[{\"name\":\"service_size\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"service_index\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"pipeType\":\"reliable_commands\",\"packFormat\":\"u8 u8 u16 b\"},{\"kind\":\"command\",\"name\":\"standby\",\"identifier\":135,\"description\":\"Attempt to put devices into lowest power sleep mode for a specified time - most likely involving a full reset on wake-up.\",\"fields\":[{\"name\":\"duration\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"reset_in\",\"identifier\":128,\"description\":\"When set to value other than `0`, it asks the device to reset after specified number of microseconds.\\nThis is typically used to implement watchdog functionality, where a brain device sets `reset_in` to\\nsay 1.6s every 0.5s.\",\"fields\":[{\"name\":\"_\",\"unit\":\"us\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"device_description\",\"identifier\":384,\"description\":\"Identifies the type of hardware (eg., ACME Corp. Servo X-42 Rev C)\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"packFormat\":\"s\"},{\"kind\":\"const\",\"name\":\"product_identifier\",\"identifier\":385,\"description\":\"A numeric code for the string above; used to identify firmware images and devices.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"absoluteMin\":805306368,\"absoluteMax\":1073741823}],\"optional\":true,\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"bootloader_product_identifier\",\"identifier\":388,\"description\":\"Typically the same as `product_identifier` unless device was flashed by hand; the bootloader will respond to that code.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"absoluteMin\":805306368,\"absoluteMax\":1073741823}],\"optional\":true,\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"firmware_version\",\"identifier\":389,\"description\":\"A string describing firmware version; typically semver.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"mcu_temperature\",\"identifier\":386,\"description\":\"MCU temperature in degrees Celsius (approximate).\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0C\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true,\"typicalMin\":-10,\"typicalMax\":150}],\"volatile\":true,\"optional\":true,\"preferredInterval\":60000,\"packFormat\":\"i16\"},{\"kind\":\"ro\",\"name\":\"uptime\",\"identifier\":390,\"description\":\"Number of microseconds since boot.\",\"fields\":[{\"name\":\"_\",\"unit\":\"us\",\"type\":\"u64\",\"storage\":8,\"isSimpleType\":true}],\"volatile\":true,\"optional\":true,\"preferredInterval\":60000,\"packFormat\":\"u64\"}],\"tags\":[\"C\",\"8bit\"]},{\"name\":\"Dashboard\",\"status\":\"stable\",\"shortId\":\"dashboard\",\"camelName\":\"dashboard\",\"shortName\":\"dashboard\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Device that interacts, configure or inspects with the services on the bus. While a dashboard is on the bus, heuristics like device reset should be disabled.\"},\"classIdentifier\":468029703,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"}],\"tags\":[\"infrastructure\"]},{\"name\":\"DC Current Measurement\",\"status\":\"experimental\",\"shortId\":\"dccurrentmeasurement\",\"camelName\":\"dcCurrentMeasurement\",\"shortName\":\"dcCurrentMeasurement\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A service that reports a current measurement.\"},\"classIdentifier\":420661422,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"measurement_name\",\"identifier\":386,\"description\":\"A string containing the net name that is being measured e.g. `POWER_DUT` or a reference e.g. `DIFF_DEV1_DEV2`. These constants can be used to identify a measurement from client code.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"measurement\",\"identifier\":257,\"description\":\"The current measurement.\",\"fields\":[{\"name\":\"_\",\"unit\":\"A\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"f64\"},{\"kind\":\"ro\",\"name\":\"measurement_error\",\"identifier\":262,\"description\":\"Absolute error on the reading value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"A\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"f64\"},{\"kind\":\"const\",\"name\":\"min_measurement\",\"identifier\":260,\"description\":\"Minimum measurable current\",\"fields\":[{\"name\":\"_\",\"unit\":\"A\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"optional\":true,\"identifierName\":\"min_reading\",\"packFormat\":\"f64\"},{\"kind\":\"const\",\"name\":\"max_measurement\",\"identifier\":261,\"description\":\"Maximum measurable current\",\"fields\":[{\"name\":\"_\",\"unit\":\"A\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"optional\":true,\"identifierName\":\"max_reading\",\"packFormat\":\"f64\"}],\"tags\":[]},{\"name\":\"DC Voltage Measurement\",\"status\":\"experimental\",\"shortId\":\"dcvoltagemeasurement\",\"camelName\":\"dcVoltageMeasurement\",\"shortName\":\"dcVoltageMeasurement\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A service that reports a voltage measurement.\"},\"classIdentifier\":372485145,\"enums\":{\"VoltageMeasurementType\":{\"name\":\"VoltageMeasurementType\",\"storage\":1,\"members\":{\"Absolute\":0,\"Differential\":1}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"measurement_type\",\"identifier\":385,\"description\":\"The type of measurement that is taking place. Absolute results are measured with respect to ground, whereas differential results are measured against another signal that is not ground.\",\"fields\":[{\"name\":\"_\",\"type\":\"VoltageMeasurementType\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"measurement_name\",\"identifier\":386,\"description\":\"A string containing the net name that is being measured e.g. `POWER_DUT` or a reference e.g. `DIFF_DEV1_DEV2`. These constants can be used to identify a measurement from client code.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"measurement\",\"identifier\":257,\"description\":\"The voltage measurement.\",\"fields\":[{\"name\":\"_\",\"unit\":\"V\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"f64\"},{\"kind\":\"ro\",\"name\":\"measurement_error\",\"identifier\":262,\"description\":\"Absolute error on the reading value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"V\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"f64\"},{\"kind\":\"const\",\"name\":\"min_measurement\",\"identifier\":260,\"description\":\"Minimum measurable current\",\"fields\":[{\"name\":\"_\",\"unit\":\"V\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"optional\":true,\"identifierName\":\"min_reading\",\"packFormat\":\"f64\"},{\"kind\":\"const\",\"name\":\"max_measurement\",\"identifier\":261,\"description\":\"Maximum measurable current\",\"fields\":[{\"name\":\"_\",\"unit\":\"V\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"optional\":true,\"identifierName\":\"max_reading\",\"packFormat\":\"f64\"}],\"tags\":[]},{\"name\":\"DeviceScript Condition\",\"status\":\"deprecated\",\"shortId\":\"devicescriptcondition\",\"camelName\":\"deviceScriptCondition\",\"shortName\":\"deviceScriptCondition\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Conditions are synthetic services used to synchronize threads of executions of a DeviceScript VM.\\n**This is no longer used**.\"},\"classIdentifier\":295074157,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"signal\",\"identifier\":128,\"description\":\"Triggers a `signalled` event.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"signalled\",\"identifier\":3,\"description\":\"Triggered by `signal` command.\",\"fields\":[],\"identifierName\":\"change\"}],\"tags\":[\"infrastructure\",\"devicescript\"],\"restricted\":true},{\"name\":\"DeviceScript Debugger\",\"status\":\"experimental\",\"shortId\":\"devicescriptdebugger\",\"camelName\":\"devsDbg\",\"shortName\":\"devsDbg\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Allows for inspecting and affecting the state of a running DeviceScript program.\"},\"classIdentifier\":358308672,\"enums\":{\"ValueTag\":{\"name\":\"ValueTag\",\"storage\":1,\"members\":{\"Number\":1,\"Special\":2,\"Fiber\":3,\"BuiltinObject\":5,\"Exotic\":6,\"Unhandled\":7,\"ImgBuffer\":32,\"ImgStringBuiltin\":33,\"ImgStringAscii\":34,\"ImgStringUTF8\":35,\"ImgRole\":48,\"ImgFunction\":49,\"ImgRoleMember\":50,\"ObjArray\":81,\"ObjMap\":82,\"ObjBuffer\":83,\"ObjString\":84,\"ObjStackFrame\":85,\"ObjPacket\":86,\"ObjBoundFunction\":87,\"ObjOpaque\":88,\"ObjAny\":80,\"ObjMask\":240,\"User1\":241,\"User2\":242,\"User3\":243,\"User4\":244}},\"ValueSpecial\":{\"name\":\"ValueSpecial\",\"storage\":1,\"members\":{\"Undefined\":0,\"True\":1,\"False\":2,\"Null\":3,\"Globals\":100,\"CurrentException\":101}},\"FunIdx\":{\"name\":\"FunIdx\",\"storage\":2,\"isExtensible\":true,\"members\":{\"None\":0,\"Main\":49999,\"FirstBuiltIn\":50000}},\"FiberHandle\":{\"name\":\"FiberHandle\",\"storage\":4,\"isExtensible\":true,\"members\":{\"None\":0}},\"ProgramCounter\":{\"name\":\"ProgramCounter\",\"storage\":4,\"isExtensible\":true,\"members\":{}},\"ObjStackFrame\":{\"name\":\"ObjStackFrame\",\"storage\":4,\"isExtensible\":true,\"members\":{\"Null\":0}},\"String\":{\"name\":\"String\",\"storage\":4,\"isExtensible\":true,\"members\":{\"StaticIndicatorMask\":2147483649,\"StaticTagMask\":2130706432,\"StaticIndexMask\":16777214,\"Unhandled\":0}},\"StepFlags\":{\"name\":\"StepFlags\",\"storage\":2,\"isFlags\":true,\"members\":{\"StepOut\":1,\"StepIn\":2,\"Throw\":4}},\"SuspensionType\":{\"name\":\"SuspensionType\",\"storage\":1,\"members\":{\"None\":0,\"Breakpoint\":1,\"UnhandledException\":2,\"HandledException\":3,\"Halt\":4,\"Panic\":5,\"Restart\":6,\"DebuggerStmt\":7,\"Step\":8}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"read_fibers\",\"identifier\":128,\"description\":\"List the currently running fibers (threads).\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"read_fibers\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"fiber\",\"identifier\":0,\"description\":\"List the currently running fibers (threads).\",\"fields\":[{\"name\":\"handle\",\"type\":\"FiberHandle\",\"storage\":4},{\"name\":\"initial_fn\",\"type\":\"FunIdx\",\"storage\":2},{\"name\":\"curr_fn\",\"type\":\"FunIdx\",\"storage\":2}],\"pipeType\":\"read_fibers\",\"packFormat\":\"u32 u16 u16\"},{\"kind\":\"command\",\"name\":\"read_stack\",\"identifier\":129,\"description\":\"List stack frames in a fiber.\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12},{\"name\":\"fiber_handle\",\"type\":\"FiberHandle\",\"storage\":4}],\"pipeType\":\"read_stack\",\"packFormat\":\"b[12] u32\"},{\"kind\":\"pipe_report\",\"name\":\"stackframe\",\"identifier\":0,\"description\":\"List stack frames in a fiber.\",\"fields\":[{\"name\":\"self\",\"type\":\"ObjStackFrame\",\"storage\":4},{\"name\":\"pc\",\"type\":\"ProgramCounter\",\"storage\":4},{\"name\":\"closure\",\"type\":\"ObjStackFrame\",\"storage\":4},{\"name\":\"fn_idx\",\"type\":\"FunIdx\",\"storage\":2},{\"name\":\"reserved\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"pipeType\":\"read_stack\",\"packFormat\":\"u32 u32 u32 u16 u16\"},{\"kind\":\"command\",\"name\":\"read_indexed_values\",\"identifier\":130,\"description\":\"Read variable slots in a stack frame, elements of an array, etc.\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12},{\"name\":\"v0\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"tag\",\"type\":\"ValueTag\",\"storage\":1},{\"name\":\"reserved\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"start\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"length\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"pipeType\":\"read_indexed_values\",\"packFormat\":\"b[12] u32 u8 u8 u16 u16\"},{\"kind\":\"pipe_report\",\"name\":\"value\",\"identifier\":0,\"description\":\"Read variable slots in a stack frame, elements of an array, etc.\",\"fields\":[{\"name\":\"v0\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"v1\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"fn_idx\",\"type\":\"FunIdx\",\"storage\":2},{\"name\":\"tag\",\"type\":\"ValueTag\",\"storage\":1}],\"pipeType\":\"read_indexed_values\",\"packFormat\":\"u32 u32 u16 u8\"},{\"kind\":\"command\",\"name\":\"read_named_values\",\"identifier\":131,\"description\":\"Read variable slots in an object.\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12},{\"name\":\"v0\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"tag\",\"type\":\"ValueTag\",\"storage\":1}],\"pipeType\":\"read_named_values\",\"packFormat\":\"b[12] u32 u8\"},{\"kind\":\"pipe_report\",\"name\":\"key_value\",\"identifier\":0,\"description\":\"Read variable slots in an object.\",\"fields\":[{\"name\":\"key\",\"type\":\"String\",\"storage\":4},{\"name\":\"v0\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"v1\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"fn_idx\",\"type\":\"FunIdx\",\"storage\":2},{\"name\":\"tag\",\"type\":\"ValueTag\",\"storage\":1}],\"pipeType\":\"read_named_values\",\"packFormat\":\"u32 u32 u32 u16 u8\"},{\"kind\":\"command\",\"name\":\"read_value\",\"identifier\":132,\"description\":\"Read a specific value.\",\"fields\":[{\"name\":\"v0\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"tag\",\"type\":\"ValueTag\",\"storage\":1}],\"hasReport\":true,\"packFormat\":\"u32 u8\"},{\"kind\":\"report\",\"name\":\"read_value\",\"identifier\":132,\"description\":\"Read a specific value.\",\"fields\":[{\"name\":\"v0\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"v1\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"fn_idx\",\"type\":\"FunIdx\",\"storage\":2},{\"name\":\"tag\",\"type\":\"ValueTag\",\"storage\":1}],\"secondary\":true,\"packFormat\":\"u32 u32 u16 u8\"},{\"kind\":\"command\",\"name\":\"read_bytes\",\"identifier\":133,\"description\":\"Read bytes of a string (UTF8) or buffer value.\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12},{\"name\":\"v0\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"tag\",\"type\":\"ValueTag\",\"storage\":1},{\"name\":\"reserved\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"start\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"length\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"pipeType\":\"read_bytes\",\"packFormat\":\"b[12] u32 u8 u8 u16 u16\"},{\"kind\":\"pipe_report\",\"name\":\"bytes_value\",\"identifier\":0,\"description\":\"Read bytes of a string (UTF8) or buffer value.\",\"fields\":[{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"pipeType\":\"read_bytes\",\"packFormat\":\"b\"},{\"kind\":\"command\",\"name\":\"set_breakpoints\",\"identifier\":144,\"description\":\"Set breakpoint(s) at a location(s).\",\"fields\":[{\"name\":\"break_pc\",\"type\":\"ProgramCounter\",\"storage\":4,\"startRepeats\":true}],\"packFormat\":\"r: u32\"},{\"kind\":\"command\",\"name\":\"clear_breakpoints\",\"identifier\":145,\"description\":\"Clear breakpoint(s) at a location(s).\",\"fields\":[{\"name\":\"break_pc\",\"type\":\"ProgramCounter\",\"storage\":4,\"startRepeats\":true}],\"packFormat\":\"r: u32\"},{\"kind\":\"command\",\"name\":\"clear_all_breakpoints\",\"identifier\":146,\"description\":\"Clear all breakpoints.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"resume\",\"identifier\":147,\"description\":\"Resume program execution after a breakpoint was hit.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"halt\",\"identifier\":148,\"description\":\"Try suspending current program. Client needs to wait for `suspended` event afterwards.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"restart_and_halt\",\"identifier\":149,\"description\":\"Run the program from the beginning and halt on first instruction.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"step\",\"identifier\":150,\"description\":\"Set breakpoints that only trigger in the specified stackframe and resume program.\\nThe breakpoints are cleared automatically on next suspension (regardless of the reason).\",\"fields\":[{\"name\":\"stackframe\",\"type\":\"ObjStackFrame\",\"storage\":4},{\"name\":\"flags\",\"type\":\"StepFlags\",\"storage\":2},{\"name\":\"reserved\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"break_pc\",\"type\":\"ProgramCounter\",\"storage\":4,\"startRepeats\":true}],\"packFormat\":\"u32 u16 u16 r: u32\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turn on/off the debugger interface.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"break_at_unhandled_exn\",\"identifier\":128,\"description\":\"Wheather to place breakpoint at unhandled exception.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"break_at_handled_exn\",\"identifier\":129,\"description\":\"Wheather to place breakpoint at handled exception.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"is_suspended\",\"identifier\":384,\"description\":\"Indicates if the program is currently suspended.\\nMost commands can only be executed when the program is suspended.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"suspended\",\"identifier\":128,\"description\":\"Emitted when the program hits a breakpoint or similar event in the specified fiber.\",\"fields\":[{\"name\":\"fiber\",\"type\":\"FiberHandle\",\"storage\":4},{\"name\":\"type\",\"type\":\"SuspensionType\",\"storage\":1}],\"packFormat\":\"u32 u8\"}],\"tags\":[\"management\",\"devicescript\"],\"restricted\":true},{\"name\":\"DeviceScript Manager\",\"status\":\"experimental\",\"shortId\":\"devicescriptmanager\",\"camelName\":\"deviceScriptManager\",\"shortName\":\"deviceScriptManager\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Allows for deployment and control over DeviceScript virtual machine.\\n\\nPrograms start automatically after device restart or uploading of new program.\\nYou can stop programs until next reset by setting the `running` and `autostart` registers to `false`.\",\"events\":\"When program is running, `status_code == Ready`.\\nWhen there is a valid program, but it is not running, `status_code == Sleeping`.\\nWhen there is no valid program, `status_code == WaitingForInput`.\"},\"classIdentifier\":288680491,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"deploy_bytecode\",\"identifier\":128,\"description\":\"Open pipe for streaming in the bytecode of the program. The size of the bytecode has to be declared upfront.\\nTo clear the program, use `bytecode_size == 0`.\\nThe bytecode is streamed over regular pipe data packets.\\nThe bytecode shall be fully written into flash upon closing the pipe.\\nIf `autostart` is true, the program will start after being deployed.\\nThe data payloads, including the last one, should have a size that is a multiple of 32 bytes.\\nThus, the initial bytecode_size also needs to be a multiple of 32.\",\"fields\":[{\"name\":\"bytecode_size\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"unique\":true,\"hasReport\":true,\"packFormat\":\"u32\"},{\"kind\":\"report\",\"name\":\"deploy_bytecode\",\"identifier\":128,\"description\":\"Open pipe for streaming in the bytecode of the program. The size of the bytecode has to be declared upfront.\\nTo clear the program, use `bytecode_size == 0`.\\nThe bytecode is streamed over regular pipe data packets.\\nThe bytecode shall be fully written into flash upon closing the pipe.\\nIf `autostart` is true, the program will start after being deployed.\\nThe data payloads, including the last one, should have a size that is a multiple of 32 bytes.\\nThus, the initial bytecode_size also needs to be a multiple of 32.\",\"fields\":[{\"name\":\"bytecode_port\",\"type\":\"pipe_port\",\"storage\":2}],\"secondary\":true,\"pipeType\":\"deploy_bytecode\",\"packFormat\":\"u16\"},{\"kind\":\"command\",\"name\":\"read_bytecode\",\"identifier\":129,\"description\":\"Get the current bytecode deployed on device.\",\"fields\":[{\"name\":\"bytecode\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"read_bytecode\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"bytecode\",\"identifier\":0,\"description\":\"Get the current bytecode deployed on device.\",\"fields\":[{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"pipeType\":\"read_bytecode\",\"packFormat\":\"b\"},{\"kind\":\"rw\",\"name\":\"running\",\"identifier\":128,\"description\":\"Indicates if the program is currently running.\\nTo restart the program, stop it (write `0`), read back the register to make sure it's stopped,\\nstart it, and read back.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"autostart\",\"identifier\":129,\"description\":\"Indicates wheather the program should be re-started upon `reboot()` or `panic()`.\\nDefaults to `true`.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"program_size\",\"identifier\":384,\"description\":\"The size of current program.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"program_hash\",\"identifier\":385,\"description\":\"Return FNV1A hash of the current bytecode.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"program_sha256\",\"identifier\":386,\"description\":\"Return 32-byte long SHA-256 hash of the current bytecode.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":32,\"isSimpleType\":true,\"maxBytes\":32}],\"packFormat\":\"b[32]\"},{\"kind\":\"const\",\"name\":\"runtime_version\",\"identifier\":387,\"description\":\"Returns the runtime version number compatible with [Semver](https://semver.org/).\\nWhen read as 32-bit little endian integer a version `7.15.500` would be `0x07_0F_01F4`.\",\"fields\":[{\"name\":\"patch\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"minor\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"major\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16 u8 u8\"},{\"kind\":\"ro\",\"name\":\"program_name\",\"identifier\":388,\"description\":\"The name of currently running program. The compiler takes is from `package.json`.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"program_version\",\"identifier\":389,\"description\":\"The version number of currently running program. The compiler takes is from `package.json`\\nand `git`.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"event\",\"name\":\"program_panic\",\"identifier\":128,\"description\":\"Emitted when the program calls `panic(panic_code)` or `reboot()` (`panic_code == 0` in that case).\\nThe byte offset in byte code of the call is given in `program_counter`.\\nThe program will restart immediately when `panic_code == 0` or in a few seconds otherwise.\",\"fields\":[{\"name\":\"panic_code\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"program_counter\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32 u32\"},{\"kind\":\"event\",\"name\":\"program_change\",\"identifier\":3,\"description\":\"Emitted after bytecode of the program has changed.\",\"fields\":[],\"identifierName\":\"change\"}],\"tags\":[\"management\",\"devicescript\"],\"restricted\":true},{\"name\":\"Distance\",\"status\":\"stable\",\"shortId\":\"distance\",\"camelName\":\"distance\",\"shortName\":\"distance\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that determines the distance of an object without any physical contact involved.\"},\"classIdentifier\":337275786,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Ultrasonic\":1,\"Infrared\":2,\"LiDAR\":3,\"Laser\":4}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"distance\",\"identifier\":257,\"description\":\"Current distance from the object\",\"fields\":[{\"name\":\"_\",\"unit\":\"m\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4,\"typicalMin\":0.02,\"typicalMax\":4}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u16.16\"},{\"kind\":\"ro\",\"name\":\"distance_error\",\"identifier\":262,\"description\":\"Absolute error on the reading value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"m\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"min_range\",\"identifier\":260,\"description\":\"Minimum measurable distance\",\"fields\":[{\"name\":\"_\",\"unit\":\"m\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"identifierName\":\"min_reading\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"max_range\",\"identifier\":261,\"description\":\"Maximum measurable distance\",\"fields\":[{\"name\":\"_\",\"unit\":\"m\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"identifierName\":\"max_reading\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Determines the type of sensor used.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"]},{\"name\":\"DMX\",\"status\":\"experimental\",\"shortId\":\"dmx\",\"camelName\":\"dmx\",\"shortName\":\"dmx\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A service that can send DMX512-A packets with limited size. This service is designed to allow tinkering with a few DMX devices, but only allows 235 channels. More about DMX at https://en.wikipedia.org/wiki/DMX512.\"},\"classIdentifier\":298814469,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Determines if the DMX bridge is active.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"send\",\"identifier\":128,\"description\":\"Send a DMX packet, up to 236bytes long, including the start code.\",\"fields\":[{\"name\":\"channels\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"b\"}],\"tags\":[]},{\"name\":\"Dot Matrix\",\"status\":\"rc\",\"shortId\":\"dotmatrix\",\"camelName\":\"dotMatrix\",\"shortName\":\"dotMatrix\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A rectangular dot matrix display, made of monochrome LEDs or Braille pins.\"},\"classIdentifier\":286070091,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"LED\":1,\"Braille\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"dots\",\"identifier\":2,\"description\":\"The state of the screen where dot on/off state is\\nstored as a bit, column by column. The column should be byte aligned.\\n\\nFor example, if the display has no more than 8 rows in each column, then each byte contains bits corresponding\\nto a single column. Least-significant bit is on top.\\nIf display has 10 rows, then each column is represented by two bytes.\\nThe top-most 8 rows sit in the first byte (with the least significant bit being on top),\\nand the remainign 2 row sit in the second byte.\\n\\nThe following C expression can be used to check if a given `column, row` coordinate is set:\\n`dots[column * column_size + (row >> 3)] & (1 << (row & 7))`, where\\n`column_size` is `(number_of_rows + 7) >> 3` (note that if number of rows is 8 or less then `column_size` is `1`),\\nand `dots` is of `uint8_t*` type.\\n\\nThe size of this register is `number_of_columns * column_size` bytes.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"identifierName\":\"value\",\"packFormat\":\"b\"},{\"kind\":\"rw\",\"name\":\"brightness\",\"identifier\":1,\"description\":\"Reads the general brightness of the display, brightness for LEDs. `0` when the screen is off.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1}],\"optional\":true,\"identifierName\":\"intensity\",\"packFormat\":\"u0.8\"},{\"kind\":\"const\",\"name\":\"rows\",\"identifier\":385,\"description\":\"Number of rows on the screen\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"columns\",\"identifier\":386,\"description\":\"Number of columns on the screen\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Describes the type of matrix used.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Display\"},{\"name\":\"Dual Motors\",\"status\":\"experimental\",\"shortId\":\"dualmotors\",\"camelName\":\"dualMotors\",\"shortName\":\"dualMotors\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A synchronized pair of motors.\"},\"classIdentifier\":355063095,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"speed\",\"identifier\":2,\"description\":\"Relative speed of the motors. Use positive/negative values to run the motor forwards and backwards.\\nA speed of ``0`` while ``enabled`` acts as brake.\",\"fields\":[{\"name\":\"left\",\"unit\":\"/\",\"shift\":15,\"type\":\"i1.15\",\"storage\":-2},{\"name\":\"right\",\"unit\":\"/\",\"shift\":15,\"type\":\"i1.15\",\"storage\":-2}],\"identifierName\":\"value\",\"packFormat\":\"i1.15 i1.15\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turn the power to the motors on/off.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"load_torque\",\"identifier\":384,\"description\":\"Torque required to produce the rated power of an each electrical motor at load speed.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg/cm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"load_rotation_speed\",\"identifier\":385,\"description\":\"Revolutions per minute of the motor under full load.\",\"fields\":[{\"name\":\"_\",\"unit\":\"rpm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"reversible\",\"identifier\":386,\"description\":\"Indicates if the motors can run backwards.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Motor\"},{\"name\":\"Equivalent CO\u2082\",\"status\":\"rc\",\"shortId\":\"eco2\",\"camelName\":\"eCO2\",\"shortName\":\"eCO2\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"Measures equivalent CO\u2082 levels.\"},\"classIdentifier\":379362758,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"VOC\":1,\"NDIR\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"e_CO2\",\"identifier\":257,\"description\":\"Equivalent CO\u2082 (eCO\u2082) readings.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppm\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4,\"typicalMin\":400,\"typicalMax\":8192}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u22.10\"},{\"kind\":\"ro\",\"name\":\"e_CO2_error\",\"identifier\":262,\"description\":\"Error on the reading value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppm\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"min_e_CO2\",\"identifier\":260,\"description\":\"Minimum measurable value\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppm\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"identifierName\":\"min_reading\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"max_e_CO2\",\"identifier\":261,\"description\":\"Minimum measurable value\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppm\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"identifierName\":\"max_reading\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Type of physical sensor and capabilities.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Flex\",\"status\":\"rc\",\"shortId\":\"flex\",\"camelName\":\"flex\",\"shortName\":\"flex\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A bending or deflection sensor.\"},\"classIdentifier\":524797638,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"bending\",\"identifier\":257,\"description\":\"A measure of the bending.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":15,\"type\":\"i1.15\",\"storage\":-2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"i1.15\"},{\"kind\":\"const\",\"name\":\"length\",\"identifier\":384,\"description\":\"Length of the flex sensor\",\"fields\":[{\"name\":\"_\",\"unit\":\"mm\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16\"}],\"tags\":[\"C\",\"8bit\"],\"group\":\"Sensor\"},{\"name\":\"Gamepad\",\"status\":\"rc\",\"shortId\":\"gamepad\",\"camelName\":\"gamepad\",\"shortName\":\"gamepad\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A two axis directional gamepad with optional buttons.\"},\"classIdentifier\":277836886,\"enums\":{\"Buttons\":{\"name\":\"Buttons\",\"storage\":4,\"isFlags\":true,\"members\":{\"Left\":1,\"Up\":2,\"Right\":4,\"Down\":8,\"A\":16,\"B\":32,\"Menu\":64,\"Select\":128,\"Reset\":256,\"Exit\":512,\"X\":1024,\"Y\":2048}},\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Thumb\":1,\"ArcadeBall\":2,\"ArcadeStick\":3,\"Gamepad\":4}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"direction\",\"identifier\":257,\"description\":\"If the gamepad is analog, the directional buttons should be \\\"simulated\\\", based on gamepad position\\n(`Left` is `{ x = -1, y = 0 }`, `Up` is `{ x = 0, y = -1}`).\\nIf the gamepad is digital, then each direction will read as either `-1`, `0`, or `1` (in fixed representation).\\nThe primary button on the gamepad is `A`.\",\"fields\":[{\"name\":\"buttons\",\"type\":\"Buttons\",\"storage\":4},{\"name\":\"x\",\"unit\":\"/\",\"shift\":15,\"type\":\"i1.15\",\"storage\":-2},{\"name\":\"y\",\"unit\":\"/\",\"shift\":15,\"type\":\"i1.15\",\"storage\":-2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u32 i1.15 i1.15\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of physical gamepad.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"buttons_available\",\"identifier\":384,\"description\":\"Indicates a bitmask of the buttons that are mounted on the gamepad.\\nIf the `Left`/`Up`/`Right`/`Down` buttons are marked as available here, the gamepad is digital.\\nEven when marked as not available, they will still be simulated based on the analog gamepad.\",\"fields\":[{\"name\":\"_\",\"type\":\"Buttons\",\"storage\":4}],\"packFormat\":\"u32\"},{\"kind\":\"event\",\"name\":\"buttons_changed\",\"identifier\":3,\"description\":\"Emitted whenever the state of buttons changes.\",\"fields\":[{\"name\":\"buttons\",\"type\":\"Buttons\",\"storage\":4}],\"identifierName\":\"change\",\"packFormat\":\"u32\"}],\"tags\":[\"8bit\",\"padauk\"],\"group\":\"Button\"},{\"name\":\"GPIO\",\"status\":\"experimental\",\"shortId\":\"gpio\",\"camelName\":\"GPIO\",\"shortName\":\"GPIO\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"Access to General Purpose Input/Output (GPIO) pins on a board.\\nThe pins are indexed `0 ... num_pins-1`.\\nThe indexing does not correspond to hardware pin names, nor labels on the board (see `get_pin_info` command for that),\\nand should **not** be exposed to the user.\"},\"classIdentifier\":282614377,\"enums\":{\"Mode\":{\"name\":\"Mode\",\"storage\":1,\"members\":{\"Off\":0,\"OffPullUp\":16,\"OffPullDown\":32,\"Input\":1,\"InputPullUp\":17,\"InputPullDown\":33,\"Output\":2,\"OutputHigh\":18,\"OutputLow\":34,\"AnalogIn\":3,\"Alternative\":4,\"BaseModeMask\":15}},\"Capabilities\":{\"name\":\"Capabilities\",\"storage\":2,\"isFlags\":true,\"members\":{\"PullUp\":1,\"PullDown\":2,\"Input\":4,\"Output\":8,\"Analog\":16}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"state\",\"identifier\":257,\"description\":\"For every pin set to `Input*` the corresponding **bit** in `digital_values` will be `1` if and only if\\nthe pin is high.\\nFor other pins, the bit is `0`.\\nThis is normally streamed at low-ish speed, but it's also automatically reported whenever\\na digital input pin changes value (throttled to ~100Hz).\\nThe analog values can be read with the `ADC` service.\",\"fields\":[{\"name\":\"digital_values\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"b\"},{\"kind\":\"ro\",\"name\":\"num_pins\",\"identifier\":384,\"description\":\"Number of pins that can be operated through this service.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMax\":128,\"absoluteMin\":0}],\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"configure\",\"identifier\":128,\"description\":\"Configure (including setting the value) zero or more pins.\\n`Alternative` settings means the pin is controlled by other service (SPI, I2C, UART, PWM, etc.).\",\"fields\":[{\"name\":\"pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"startRepeats\":true},{\"name\":\"mode\",\"type\":\"Mode\",\"storage\":1}],\"packFormat\":\"r: u8 u8\"},{\"kind\":\"command\",\"name\":\"pin_info\",\"identifier\":129,\"description\":\"Report capabilities and name of a pin.\",\"fields\":[{\"name\":\"pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"hasReport\":true,\"packFormat\":\"u8\"},{\"kind\":\"report\",\"name\":\"pin_info\",\"identifier\":129,\"description\":\"Report capabilities and name of a pin.\",\"fields\":[{\"name\":\"pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"hw_pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"capabilities\",\"type\":\"Capabilities\",\"storage\":2},{\"name\":\"mode\",\"type\":\"Mode\",\"storage\":1},{\"name\":\"label\",\"type\":\"string\",\"storage\":0}],\"secondary\":true,\"packFormat\":\"u8 u8 u16 u8 s\"},{\"kind\":\"command\",\"name\":\"pin_by_label\",\"identifier\":131,\"description\":\"This responds with `pin_info` report.\",\"fields\":[{\"name\":\"label\",\"type\":\"string\",\"storage\":0}],\"hasReport\":true,\"packFormat\":\"s\"},{\"kind\":\"report\",\"name\":\"pin_by_label\",\"identifier\":131,\"description\":\"This responds with `pin_info` report.\",\"fields\":[{\"name\":\"pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"hw_pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"capabilities\",\"type\":\"Capabilities\",\"storage\":2},{\"name\":\"mode\",\"type\":\"Mode\",\"storage\":1},{\"name\":\"label\",\"type\":\"string\",\"storage\":0}],\"secondary\":true,\"packFormat\":\"u8 u8 u16 u8 s\"},{\"kind\":\"command\",\"name\":\"pin_by_hw_pin\",\"identifier\":132,\"description\":\"This responds with `pin_info` report.\",\"fields\":[{\"name\":\"hw_pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"hasReport\":true,\"packFormat\":\"u8\"},{\"kind\":\"report\",\"name\":\"pin_by_hw_pin\",\"identifier\":132,\"description\":\"This responds with `pin_info` report.\",\"fields\":[{\"name\":\"pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"hw_pin\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"capabilities\",\"type\":\"Capabilities\",\"storage\":2},{\"name\":\"mode\",\"type\":\"Mode\",\"storage\":1},{\"name\":\"label\",\"type\":\"string\",\"storage\":0}],\"secondary\":true,\"packFormat\":\"u8 u8 u16 u8 s\"}],\"tags\":[\"io\"]},{\"name\":\"Gyroscope\",\"status\":\"rc\",\"shortId\":\"gyroscope\",\"camelName\":\"gyroscope\",\"shortName\":\"gyroscope\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A 3-axis gyroscope.\"},\"classIdentifier\":505087730,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"rotation_rates\",\"identifier\":257,\"description\":\"Indicates the current rates acting on gyroscope.\",\"fields\":[{\"name\":\"x\",\"unit\":\"\u00B0/s\",\"shift\":20,\"type\":\"i12.20\",\"storage\":-4},{\"name\":\"y\",\"unit\":\"\u00B0/s\",\"shift\":20,\"type\":\"i12.20\",\"storage\":-4},{\"name\":\"z\",\"unit\":\"\u00B0/s\",\"shift\":20,\"type\":\"i12.20\",\"storage\":-4}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"i12.20 i12.20 i12.20\"},{\"kind\":\"ro\",\"name\":\"rotation_rates_error\",\"identifier\":262,\"description\":\"Error on the reading value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0/s\",\"shift\":20,\"type\":\"u12.20\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u12.20\"},{\"kind\":\"rw\",\"name\":\"max_rate\",\"identifier\":8,\"description\":\"Configures the range of rotation rates.\\nThe value will be \\\"rounded up\\\" to one of `max_rates_supported`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0/s\",\"shift\":20,\"type\":\"u12.20\",\"storage\":4}],\"optional\":true,\"identifierName\":\"reading_range\",\"packFormat\":\"u12.20\"},{\"kind\":\"const\",\"name\":\"max_rates_supported\",\"identifier\":266,\"description\":\"Lists values supported for writing `max_rate`.\",\"fields\":[{\"name\":\"max_rate\",\"unit\":\"\u00B0/s\",\"shift\":20,\"type\":\"u12.20\",\"storage\":4,\"startRepeats\":true}],\"optional\":true,\"identifierName\":\"supported_ranges\",\"packFormat\":\"r: u12.20\"}],\"tags\":[],\"group\":\"Movement\"},{\"name\":\"Heart Rate\",\"status\":\"experimental\",\"shortId\":\"heartrate\",\"camelName\":\"heartRate\",\"shortName\":\"heartRate\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor approximating the heart rate. \\n\\n\\n**Jacdac is NOT suitable for medical devices and should NOT be used in any kind of device to diagnose or treat any medical conditions.**\"},\"classIdentifier\":376204740,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Finger\":1,\"Chest\":2,\"Wrist\":3,\"Pump\":4,\"WebCam\":5}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"heart_rate\",\"identifier\":257,\"description\":\"The estimated heart rate.\",\"fields\":[{\"name\":\"_\",\"unit\":\"bpm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4,\"typicalMin\":30,\"typicalMax\":200}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u16.16\"},{\"kind\":\"ro\",\"name\":\"heart_rate_error\",\"identifier\":262,\"description\":\"The estimated error on the reported sensor data.\",\"fields\":[{\"name\":\"_\",\"unit\":\"bpm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of physical sensor\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"],\"group\":\"Biometric\"},{\"name\":\"HID Joystick\",\"status\":\"experimental\",\"shortId\":\"hidjoystick\",\"camelName\":\"hidJoystick\",\"shortName\":\"hidJoystick\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Controls a HID joystick.\"},\"classIdentifier\":437330261,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"button_count\",\"identifier\":384,\"description\":\"Number of button report supported\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"buttons_analog\",\"identifier\":385,\"description\":\"A bitset that indicates which button is analog.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"axis_count\",\"identifier\":386,\"description\":\"Number of analog input supported\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"set_buttons\",\"identifier\":128,\"description\":\"Sets the up/down button state, one byte per button, supports analog buttons. For digital buttons, use `0` for released, `1` for pressed.\",\"fields\":[{\"name\":\"pressure\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1,\"startRepeats\":true}],\"unique\":true,\"packFormat\":\"r: u0.8\"},{\"kind\":\"command\",\"name\":\"set_axis\",\"identifier\":129,\"description\":\"Sets the state of analog inputs.\",\"fields\":[{\"name\":\"position\",\"unit\":\"/\",\"shift\":15,\"type\":\"i1.15\",\"storage\":-2,\"startRepeats\":true}],\"unique\":true,\"packFormat\":\"r: i1.15\"}],\"tags\":[]},{\"name\":\"HID Keyboard\",\"status\":\"stable\",\"shortId\":\"hidkeyboard\",\"camelName\":\"hidKeyboard\",\"shortName\":\"hidKeyboard\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Control a HID keyboard.\\n\\nThe codes for the key (selectors) is defined in the [HID Keyboard\\nspecification](https://usb.org/sites/default/files/hut1_21.pdf), chapter 10 Keyboard/Keypad Page, page 81.\\nModifiers are in page 87.\\n\\nThe device keeps tracks of the key state and is able to clear it all with the clear command.\"},\"classIdentifier\":414210922,\"enums\":{\"Selector\":{\"name\":\"Selector\",\"storage\":2,\"members\":{\"None\":0,\"ErrorRollOver\":1,\"PostFail\":2,\"ErrorUndefined\":3,\"A\":4,\"B\":5,\"C\":6,\"D\":7,\"E\":8,\"F\":9,\"G\":10,\"H\":11,\"I\":12,\"J\":13,\"K\":14,\"L\":15,\"M\":16,\"N\":17,\"O\":18,\"P\":19,\"Q\":20,\"R\":21,\"S\":22,\"T\":23,\"U\":24,\"V\":25,\"W\":26,\"X\":27,\"Y\":28,\"Z\":29,\"_1\":30,\"_2\":31,\"_3\":32,\"_4\":33,\"_5\":34,\"_6\":35,\"_7\":36,\"_8\":37,\"_9\":38,\"_0\":39,\"Return\":40,\"Escape\":41,\"Backspace\":42,\"Tab\":43,\"Spacebar\":44,\"Minus\":45,\"Equals\":46,\"LeftSquareBracket\":47,\"RightSquareBracket\":48,\"Backslash\":49,\"NonUsHash\":50,\"Semicolon\":51,\"Quote\":52,\"GraveAccent\":53,\"Comma\":54,\"Period\":55,\"Slash\":56,\"CapsLock\":57,\"F1\":58,\"F2\":59,\"F3\":60,\"F4\":61,\"F5\":62,\"F6\":63,\"F7\":64,\"F8\":65,\"F9\":66,\"F10\":67,\"F11\":68,\"F12\":69,\"PrintScreen\":70,\"ScrollLock\":71,\"Pause\":72,\"Insert\":73,\"Home\":74,\"PageUp\":75,\"Delete\":76,\"End\":77,\"PageDown\":78,\"RightArrow\":79,\"LeftArrow\":80,\"DownArrow\":81,\"UpArrow\":82,\"KeypadNumLock\":83,\"KeypadDivide\":84,\"KeypadMultiply\":85,\"KeypadAdd\":86,\"KeypadSubtrace\":87,\"KeypadReturn\":88,\"Keypad1\":89,\"Keypad2\":90,\"Keypad3\":91,\"Keypad4\":92,\"Keypad5\":93,\"Keypad6\":94,\"Keypad7\":95,\"Keypad8\":96,\"Keypad9\":97,\"Keypad0\":98,\"KeypadDecimalPoint\":99,\"NonUsBackslash\":100,\"Application\":101,\"Power\":102,\"KeypadEquals\":103,\"F13\":104,\"F14\":105,\"F15\":106,\"F16\":107,\"F17\":108,\"F18\":109,\"F19\":110,\"F20\":111,\"F21\":112,\"F22\":113,\"F23\":114,\"F24\":115,\"Execute\":116,\"Help\":117,\"Menu\":118,\"Select\":119,\"Stop\":120,\"Again\":121,\"Undo\":122,\"Cut\":123,\"Copy\":124,\"Paste\":125,\"Find\":126,\"Mute\":127,\"VolumeUp\":128,\"VolumeDown\":129}},\"Modifiers\":{\"name\":\"Modifiers\",\"storage\":1,\"isFlags\":true,\"members\":{\"None\":0,\"LeftControl\":1,\"LeftShift\":2,\"LeftAlt\":4,\"LeftGUI\":8,\"RightControl\":16,\"RightShift\":32,\"RightAlt\":64,\"RightGUI\":128}},\"Action\":{\"name\":\"Action\",\"storage\":1,\"members\":{\"Press\":0,\"Up\":1,\"Down\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"key\",\"identifier\":128,\"description\":\"Presses a key or a sequence of keys down.\",\"fields\":[{\"name\":\"selector\",\"type\":\"Selector\",\"storage\":2,\"startRepeats\":true},{\"name\":\"modifiers\",\"type\":\"Modifiers\",\"storage\":1},{\"name\":\"action\",\"type\":\"Action\",\"storage\":1}],\"lowLevel\":true,\"unique\":true,\"packFormat\":\"r: u16 u8 u8\"},{\"kind\":\"command\",\"name\":\"clear\",\"identifier\":129,\"description\":\"Clears all pressed keys.\",\"fields\":[]}],\"tags\":[\"8bit\"]},{\"name\":\"HID Mouse\",\"status\":\"stable\",\"shortId\":\"hidmouse\",\"camelName\":\"hidMouse\",\"shortName\":\"hidMouse\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Controls a HID mouse.\"},\"classIdentifier\":411425820,\"enums\":{\"Button\":{\"name\":\"Button\",\"storage\":2,\"isFlags\":true,\"members\":{\"Left\":1,\"Right\":2,\"Middle\":4}},\"ButtonEvent\":{\"name\":\"ButtonEvent\",\"storage\":1,\"members\":{\"Up\":1,\"Down\":2,\"Click\":3,\"DoubleClick\":4}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"set_button\",\"identifier\":128,\"description\":\"Sets the up/down state of one or more buttons.\\nA `Click` is the same as `Down` followed by `Up` after 100ms.\\nA `DoubleClick` is two clicks with `150ms` gap between them (that is, `100ms` first click, `150ms` gap, `100ms` second click).\",\"fields\":[{\"name\":\"buttons\",\"type\":\"Button\",\"storage\":2},{\"name\":\"ev\",\"type\":\"ButtonEvent\",\"storage\":1}],\"unique\":true,\"packFormat\":\"u16 u8\"},{\"kind\":\"command\",\"name\":\"move\",\"identifier\":129,\"description\":\"Moves the mouse by the distance specified.\\nIf the time is positive, it specifies how long to make the move.\",\"fields\":[{\"name\":\"dx\",\"unit\":\"#\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true},{\"name\":\"dy\",\"unit\":\"#\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true},{\"name\":\"time\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"i16 i16 u16\"},{\"kind\":\"command\",\"name\":\"wheel\",\"identifier\":130,\"description\":\"Turns the wheel up or down. Positive if scrolling up.\\nIf the time is positive, it specifies how long to make the move.\",\"fields\":[{\"name\":\"dy\",\"unit\":\"#\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true},{\"name\":\"time\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"i16 u16\"}],\"tags\":[\"8bit\"]},{\"name\":\"Humidity\",\"status\":\"stable\",\"shortId\":\"humidity\",\"camelName\":\"humidity\",\"shortName\":\"humidity\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor measuring humidity of outside environment.\"},\"classIdentifier\":382210232,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"humidity\",\"identifier\":257,\"description\":\"The relative humidity in percentage of full water saturation.\",\"fields\":[{\"name\":\"_\",\"unit\":\"%RH\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":5000,\"packFormat\":\"u22.10\"},{\"kind\":\"ro\",\"name\":\"humidity_error\",\"identifier\":262,\"description\":\"The real humidity is between `humidity - humidity_error` and `humidity + humidity_error`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"%RH\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"min_humidity\",\"identifier\":260,\"description\":\"Lowest humidity that can be reported.\",\"fields\":[{\"name\":\"_\",\"unit\":\"%RH\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"identifierName\":\"min_reading\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"max_humidity\",\"identifier\":261,\"description\":\"Highest humidity that can be reported.\",\"fields\":[{\"name\":\"_\",\"unit\":\"%RH\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"identifierName\":\"max_reading\",\"packFormat\":\"u22.10\"}],\"tags\":[\"C\",\"8bit\"],\"group\":\"Environment\"},{\"name\":\"I2C\",\"status\":\"experimental\",\"shortId\":\"i2c\",\"camelName\":\"I2C\",\"shortName\":\"I2C\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Inter-Integrated Circuit (I2C, I\u00B2C, IIC) serial communication bus lets you communicate with\\nmany sensors and actuators.\"},\"classIdentifier\":471386691,\"enums\":{\"Status\":{\"name\":\"Status\",\"storage\":1,\"members\":{\"OK\":0,\"NAckAddr\":1,\"NAckData\":2,\"NoI2C\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"ok\",\"identifier\":384,\"description\":\"Indicates whether the I2C is working.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"transaction\",\"identifier\":128,\"description\":\"`address` is 7-bit.\\n`num_read` can be 0 if nothing needs to be read.\\nThe `write_buf` includes the register address if required (first one or two bytes).\",\"fields\":[{\"name\":\"address\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"num_read\",\"unit\":\"B\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"write_buf\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"unique\":true,\"hasReport\":true,\"packFormat\":\"u8 u8 b\"},{\"kind\":\"report\",\"name\":\"transaction\",\"identifier\":128,\"description\":\"`address` is 7-bit.\\n`num_read` can be 0 if nothing needs to be read.\\nThe `write_buf` includes the register address if required (first one or two bytes).\",\"fields\":[{\"name\":\"status\",\"type\":\"Status\",\"storage\":1},{\"name\":\"read_buf\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"u8 b\"}],\"tags\":[\"io\"]},{\"name\":\"Illuminance\",\"status\":\"rc\",\"shortId\":\"illuminance\",\"camelName\":\"illuminance\",\"shortName\":\"illuminance\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"Detects the amount of light falling onto a given surface area.\\n\\nNote that this is different from _luminance_, the amount of light that passes through, emits from, or reflects off an object.\"},\"classIdentifier\":510577394,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"illuminance\",\"identifier\":257,\"description\":\"The amount of illuminance, as lumens per square metre.\",\"fields\":[{\"name\":\"_\",\"unit\":\"lux\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4,\"typicalMax\":100000,\"typicalMin\":0}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u22.10\"},{\"kind\":\"ro\",\"name\":\"illuminance_error\",\"identifier\":262,\"description\":\"Error on the reported sensor value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"lux\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u22.10\"}],\"tags\":[\"8bit\",\"padauk\"],\"group\":\"Environment\"},{\"name\":\"Indexed screen\",\"status\":\"rc\",\"shortId\":\"indexedscreen\",\"camelName\":\"indexedScreen\",\"shortName\":\"indexedScreen\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A screen with indexed colors from a palette.\\n\\nThis is often run over an SPI connection or directly on the MCU, not regular single-wire Jacdac.\"},\"classIdentifier\":385496805,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"start_update\",\"identifier\":129,\"description\":\"Sets the update window for subsequent `set_pixels` commands.\",\"fields\":[{\"name\":\"x\",\"unit\":\"px\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"y\",\"unit\":\"px\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"width\",\"unit\":\"px\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"height\",\"unit\":\"px\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16 u16 u16 u16\"},{\"kind\":\"command\",\"name\":\"set_pixels\",\"identifier\":131,\"description\":\"Set pixels in current window, according to current palette.\\nEach \\\"line\\\" of data is aligned to a byte.\",\"fields\":[{\"name\":\"pixels\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"b\"},{\"kind\":\"rw\",\"name\":\"brightness\",\"identifier\":1,\"description\":\"Set backlight brightness.\\nIf set to `0` the display may go to sleep.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u0.8\"},{\"kind\":\"rw\",\"name\":\"palette\",\"identifier\":128,\"description\":\"The current palette. The colors are `[r,g,b, padding]` 32bit color entries.\\nThe color entry repeats `1 << bits_per_pixel` times.\\nThis register may be write-only.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"},{\"kind\":\"const\",\"name\":\"bits_per_pixel\",\"identifier\":384,\"description\":\"Determines the number of palette entries.\\nTypical values are 1 or 4.\",\"fields\":[{\"name\":\"_\",\"unit\":\"bit\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"width\",\"identifier\":385,\"description\":\"Screen width in \\\"natural\\\" orientation.\",\"fields\":[{\"name\":\"_\",\"unit\":\"px\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"height\",\"identifier\":386,\"description\":\"Screen height in \\\"natural\\\" orientation.\",\"fields\":[{\"name\":\"_\",\"unit\":\"px\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"width_major\",\"identifier\":129,\"description\":\"If true, consecutive pixels in the \\\"width\\\" direction are sent next to each other (this is typical for graphics cards).\\nIf false, consecutive pixels in the \\\"height\\\" direction are sent next to each other.\\nFor embedded screen controllers, this is typically true iff `width < height`\\n(in other words, it's only true for portrait orientation screens).\\nSome controllers may allow the user to change this (though the refresh order may not be optimal then).\\nThis is independent of the `rotation` register.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"up_sampling\",\"identifier\":130,\"description\":\"Every pixel sent over wire is represented by `up_sampling x up_sampling` square of physical pixels.\\nSome displays may allow changing this (which will also result in changes to `width` and `height`).\\nTypical values are 1 and 2.\",\"fields\":[{\"name\":\"_\",\"unit\":\"px\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"rotation\",\"identifier\":131,\"description\":\"Possible values are 0, 90, 180 and 270 only.\\nWrite to this register do not affect `width` and `height` registers,\\nand may be ignored by some screens.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16\"}],\"tags\":[\"SPI\"]},{\"name\":\"Infrastructure\",\"status\":\"stable\",\"shortId\":\"infrastructure\",\"camelName\":\"infrastructure\",\"shortName\":\"infrastructure\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A service that tags a device as purely infrastructure device.\\n\\n\\nA Jacdac user interface can hide any device that hosts this service.\"},\"classIdentifier\":504728043,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"}],\"tags\":[\"infrastructure\"]},{\"name\":\"Keyboard client\",\"status\":\"experimental\",\"shortId\":\"keyboardclient\",\"camelName\":\"keyboardClient\",\"shortName\":\"keyboardClient\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Measures KeyboardClient.\"},\"classIdentifier\":289210942,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"down\",\"identifier\":1,\"description\":\"Emitted when a key is pressed.\",\"fields\":[{\"name\":\"key\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"active\",\"packFormat\":\"u16\"},{\"kind\":\"event\",\"name\":\"hold\",\"identifier\":129,\"description\":\"Emitted when a key is held.\",\"fields\":[{\"name\":\"key\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"}],\"tags\":[]},{\"name\":\"LED\",\"status\":\"stable\",\"shortId\":\"led\",\"camelName\":\"led\",\"shortName\":\"led\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A controller for displays of individually controlled RGB LEDs.\\n\\nFor 64 or less LEDs, the service should support the pack the pixels in the pixels register.\\nBeyond this size, the register should return an empty payload as the amount of data exceeds\\nthe size of a packet. Typically services that use more than 64 LEDs\\nwill run on the same MCU and will maintain the pixels buffer internally.\"},\"classIdentifier\":369743088,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Strip\":1,\"Ring\":2,\"Stick\":3,\"Jewel\":4,\"Matrix\":5}}},\"constants\":{\"max_pixels_length\":{\"value\":64,\"hex\":false}},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"pixels\",\"identifier\":2,\"description\":\"A buffer of 24bit RGB color entries for each LED, in R, G, B order.\\nWhen writing, if the buffer is too short, the remaining pixels are set to `#000000`;\\nIf the buffer is too long, the write may be ignored, or the additional pixels may be ignored.\\nIf the number of pixels is greater than `max_pixels_length`, the read should return an empty payload.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"identifierName\":\"value\",\"packFormat\":\"b\"},{\"kind\":\"rw\",\"name\":\"brightness\",\"identifier\":1,\"description\":\"Set the luminosity of the strip.\\nAt `0` the power to the strip is completely shut down.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1,\"defaultValue\":0.05}],\"identifierName\":\"intensity\",\"packFormat\":\"u0.8\"},{\"kind\":\"ro\",\"name\":\"actual_brightness\",\"identifier\":384,\"description\":\"This is the luminosity actually applied to the strip.\\nMay be lower than `brightness` if power-limited by the `max_power` register.\\nIt will rise slowly (few seconds) back to `brightness` is limits are no longer required.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1}],\"packFormat\":\"u0.8\"},{\"kind\":\"const\",\"name\":\"num_pixels\",\"identifier\":386,\"description\":\"Specifies the number of pixels in the strip.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"num_columns\",\"identifier\":387,\"description\":\"If the LED pixel strip is a matrix, specifies the number of columns.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"max_power\",\"identifier\":7,\"description\":\"Limit the power drawn by the light-strip (and controller).\",\"fields\":[{\"name\":\"_\",\"unit\":\"mA\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":200}],\"optional\":true,\"identifierName\":\"max_power\",\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"leds_per_pixel\",\"identifier\":388,\"description\":\"If known, specifies the number of LEDs in parallel on this device.\\nThe actual number of LEDs is `num_pixels * leds_per_pixel`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"wave_length\",\"identifier\":389,\"description\":\"If monochrome LED, specifies the wave length of the LED.\\nRegister is missing for RGB LEDs.\",\"fields\":[{\"name\":\"_\",\"unit\":\"nm\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"typicalMin\":365,\"typicalMax\":885}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"luminous_intensity\",\"identifier\":390,\"description\":\"The luminous intensity of all the LEDs, at full brightness, in micro candella.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mcd\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"typicalMin\":10,\"typicalMax\":5000}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Specifies the shape of the light strip.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Light\"},{\"name\":\"LED Single\",\"status\":\"deprecated\",\"shortId\":\"ledsingle\",\"camelName\":\"ledSingle\",\"shortName\":\"ledSingle\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A controller for 1 or more monochrome or RGB LEDs connected in parallel.\"},\"classIdentifier\":506480888,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"ThroughHole\":1,\"SMD\":2,\"Power\":3,\"Bead\":4}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"animate\",\"identifier\":128,\"description\":\"This has the same semantics as `set_status_light` in the control service.\",\"fields\":[{\"name\":\"to_red\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"to_green\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"to_blue\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"speed\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8 u8 u8 u8\"},{\"kind\":\"ro\",\"name\":\"color\",\"identifier\":384,\"description\":\"The current color of the LED.\",\"fields\":[{\"name\":\"red\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"green\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"blue\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8 u8 u8\"},{\"kind\":\"rw\",\"name\":\"max_power\",\"identifier\":7,\"description\":\"Limit the power drawn by the light-strip (and controller).\",\"fields\":[{\"name\":\"_\",\"unit\":\"mA\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":100}],\"optional\":true,\"identifierName\":\"max_power\",\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"led_count\",\"identifier\":387,\"description\":\"If known, specifies the number of LEDs in parallel on this device.\",\"fields\":[{\"name\":\"_\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"wave_length\",\"identifier\":385,\"description\":\"If monochrome LED, specifies the wave length of the LED.\",\"fields\":[{\"name\":\"_\",\"unit\":\"nm\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"typicalMin\":365,\"typicalMax\":885}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"luminous_intensity\",\"identifier\":386,\"description\":\"The luminous intensity of the LED, at full value, in micro candella.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mcd\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"typicalMin\":10,\"typicalMax\":5000}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The physical type of LED.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\",\"padauk\"],\"group\":\"Light\"},{\"name\":\"LED Strip\",\"status\":\"stable\",\"shortId\":\"ledstrip\",\"camelName\":\"ledStrip\",\"shortName\":\"ledStrip\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A controller for strips of individually controlled RGB LEDs.\",\"long\":\"## Light programs\\n\\nWith 1 mbit Jacdac, we can transmit under 2k of data per animation frame (at 20fps).\\nIf transmitting raw data that would be around 500 pixels, which is not enough for many\\ninstallations and it would completely clog the network.\\n\\nThus, light service defines a domain-specific language for describing light animations\\nand efficiently transmitting them over wire. For short LED displays, less than 64 LEDs, \\nyou can also use the [LED service](/services/led).\\n\\nLight commands are not Jacdac commands.\\nLight commands are efficiently encoded as sequences of bytes and typically sent as payload\\nof `run` command.\\n\\nDefinitions:\\n\\n-   `P` - position in the strip\\n-   `R` - number of repetitions of the command\\n-   `N` - number of pixels affected by the command\\n-   `C` - single color designation\\n-   `C+` - sequence of color designations\\n\\nUpdate modes:\\n\\n-   `0` - replace\\n-   `1` - add RGB\\n-   `2` - subtract RGB\\n-   `3` - multiply RGB (by c/128); each pixel value will change by at least 1\\n\\nProgram commands:\\n\\n-   `0xD0: setall C+` - set all pixels in current range to given color pattern\\n-   `0xD1: fade C+` - set pixels in current range to colors between colors in sequence\\n-   `0xD2: fadehsv C+` - similar to `fade()`, but colors are specified and faded in HSV\\n-   `0xD3: rotfwd K` - rotate (shift) pixels by `K` positions away from the connector\\n-   `0xD4: rotback K` - same, but towards the connector\\n-   `0xD5: show M=50` - send buffer to strip and wait `M` milliseconds\\n-   `0xD6: range P=0 N=length W=1 S=0` - range from pixel `P`, `N` pixels long (currently unsupported: every `W` pixels skip `S` pixels)\\n-   `0xD7: mode K=0` - set update mode\\n-   `0xD8: tmpmode K=0` - set update mode for next command only\\n-   `0xCF: setone P C` - set one pixel at `P` (in current range) to given color\\n-   `mult V` - macro to multiply current range by given value (float)\\n\\nA number `k` is encoded as follows:\\n\\n-   `0 <= k < 128` -> `k`\\n-   `128 <= k < 16383` -> `0x80 | (k >> 8), k & 0xff`\\n-   bigger and negative numbers are not supported\\n\\nThus, bytes `0xC0-0xFF` are free to use for commands.\\n\\nFormats:\\n\\n-   `0xC1, R, G, B` - single color parameter\\n-   `0xC2, R0, G0, B0, R1, G1, B1` - two color parameter\\n-   `0xC3, R0, G0, B0, R1, G1, B1, R2, G2, B2` - three color parameter\\n-   `0xC0, N, R0, G0, B0, ..., R(N-1), G(N-1), B(N-1)` - `N` color parameter\\n-   `0xCF, <number>, R, G, B` - `set1` special format\\n\\nCommands are encoded as command byte, followed by parameters in the order\\nfrom the command definition.\\n\\nThe `setone()` command has irregular encoding to save space - it is byte `0xCF` followed by encoded\\nnumber, and followed by 3 bytes of color.\"},\"classIdentifier\":309264608,\"enums\":{\"LightType\":{\"name\":\"LightType\",\"storage\":1,\"members\":{\"WS2812B_GRB\":0,\"APA102\":16,\"SK9822\":17}},\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Strip\":1,\"Ring\":2,\"Stick\":3,\"Jewel\":4,\"Matrix\":5}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"brightness\",\"identifier\":1,\"description\":\"Set the luminosity of the strip.\\nAt `0` the power to the strip is completely shut down.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1,\"defaultValue\":0.05}],\"identifierName\":\"intensity\",\"packFormat\":\"u0.8\"},{\"kind\":\"ro\",\"name\":\"actual_brightness\",\"identifier\":384,\"description\":\"This is the luminosity actually applied to the strip.\\nMay be lower than `brightness` if power-limited by the `max_power` register.\\nIt will rise slowly (few seconds) back to `brightness` is limits are no longer required.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1}],\"packFormat\":\"u0.8\"},{\"kind\":\"rw\",\"name\":\"light_type\",\"identifier\":128,\"description\":\"Specifies the type of light strip connected to controller.\\nControllers which are sold with lights should default to the correct type\\nand could not allow change.\",\"fields\":[{\"name\":\"_\",\"type\":\"LightType\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"num_pixels\",\"identifier\":129,\"description\":\"Specifies the number of pixels in the strip.\\nControllers which are sold with lights should default to the correct length\\nand could not allow change. Increasing length at runtime leads to ineffective use of memory and may lead to controller reboot.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":15}],\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"num_columns\",\"identifier\":131,\"description\":\"If the LED pixel strip is a matrix, specifies the number of columns. Otherwise, a square shape is assumed. Controllers which are sold with lights should default to the correct length\\nand could not allow change. Increasing length at runtime leads to ineffective use of memory and may lead to controller reboot.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"max_power\",\"identifier\":7,\"description\":\"Limit the power drawn by the light-strip (and controller).\",\"fields\":[{\"name\":\"_\",\"unit\":\"mA\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":200}],\"identifierName\":\"max_power\",\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"max_pixels\",\"identifier\":385,\"description\":\"The maximum supported number of pixels.\\nAll writes to `num_pixels` are clamped to `max_pixels`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"num_repeats\",\"identifier\":130,\"description\":\"How many times to repeat the program passed in `run` command.\\nShould be set before the `run` command.\\nSetting to `0` means to repeat forever.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":1}],\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Specifies the shape of the light strip.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"run\",\"identifier\":129,\"description\":\"Run the given light \\\"program\\\". See service description for details.\",\"fields\":[{\"name\":\"program\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"b\"}],\"tags\":[\"C\"],\"group\":\"Light\"},{\"name\":\"Light bulb\",\"status\":\"rc\",\"shortId\":\"lightbulb\",\"camelName\":\"lightBulb\",\"shortName\":\"lightBulb\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A light bulb controller.\"},\"classIdentifier\":480970060,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"brightness\",\"identifier\":1,\"description\":\"Indicates the brightness of the light bulb. Zero means completely off and 0xffff means completely on.\\nFor non-dimmable lights, the value should be clamp to 0xffff for any non-zero value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"identifierName\":\"intensity\",\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"dimmable\",\"identifier\":384,\"description\":\"Indicates if the light supports dimming.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Light\"},{\"name\":\"Light level\",\"status\":\"stable\",\"shortId\":\"lightlevel\",\"camelName\":\"lightLevel\",\"shortName\":\"lightLevel\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that measures luminosity level.\"},\"classIdentifier\":400333340,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"PhotoResistor\":1,\"ReverseBiasedLED\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"light_level\",\"identifier\":257,\"description\":\"Detect light level\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u0.16\"},{\"kind\":\"ro\",\"name\":\"light_level_error\",\"identifier\":262,\"description\":\"Absolute estimated error of the reading value\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of physical sensor.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\",\"padauk\",\"input\"],\"group\":\"Environment\"},{\"name\":\"Logger\",\"status\":\"stable\",\"shortId\":\"logger\",\"camelName\":\"logger\",\"shortName\":\"logger\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A service which can report messages to the bus.\"},\"classIdentifier\":316415946,\"enums\":{\"Priority\":{\"name\":\"Priority\",\"storage\":1,\"members\":{\"Debug\":0,\"Log\":1,\"Warning\":2,\"Error\":3,\"Silent\":4}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"min_priority\",\"identifier\":128,\"description\":\"Messages with level lower than this won't be emitted. The default setting may vary.\\nLoggers should revert this to their default setting if the register has not been\\nupdated in 3000ms, and also keep the lowest setting they have seen in the last 1500ms.\\nThus, clients should write this register every 1000ms and ignore messages which are\\ntoo verbose for them.\",\"fields\":[{\"name\":\"_\",\"type\":\"Priority\",\"storage\":1,\"defaultValue\":1}],\"packFormat\":\"u8\"},{\"kind\":\"report\",\"name\":\"debug\",\"identifier\":128,\"description\":\"Report a message.\",\"fields\":[{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"report\",\"name\":\"log\",\"identifier\":129,\"description\":\"Report a message.\",\"fields\":[{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"report\",\"name\":\"warn\",\"identifier\":130,\"description\":\"Report a message.\",\"fields\":[{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"report\",\"name\":\"error\",\"identifier\":131,\"description\":\"Report a message.\",\"fields\":[{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"}],\"tags\":[\"infrastructure\",\"C\"]},{\"name\":\"Magnetic field level\",\"status\":\"stable\",\"shortId\":\"magneticfieldlevel\",\"camelName\":\"magneticFieldLevel\",\"shortName\":\"magneticFieldLevel\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that measures strength and polarity of magnetic field.\"},\"classIdentifier\":318642191,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"AnalogNS\":1,\"AnalogN\":2,\"AnalogS\":3,\"DigitalNS\":4,\"DigitalN\":5,\"DigitalS\":6}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"strength\",\"identifier\":257,\"description\":\"Indicates the strength of magnetic field between -1 and 1.\\nWhen no magnet is present the value should be around 0.\\nFor analog sensors,\\nwhen the north pole of the magnet is on top of the module\\nand closer than south pole, then the value should be positive.\\nFor digital sensors,\\nthe value should either `0` or `1`, regardless of polarity.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":15,\"type\":\"i1.15\",\"storage\":-2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"i1.15\"},{\"kind\":\"ro\",\"name\":\"detected\",\"identifier\":385,\"description\":\"Determines if the magnetic field is present.\\nIf the event `active` is observed, `detected` is true; if `inactive` is observed, `detected` is false.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"client\":true,\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Determines which magnetic poles the sensor can detected,\\nand whether or not it can measure their strength or just presence.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"active\",\"identifier\":1,\"description\":\"Emitted when strong-enough magnetic field is detected.\",\"fields\":[],\"identifierName\":\"active\"},{\"kind\":\"event\",\"name\":\"inactive\",\"identifier\":2,\"description\":\"Emitted when strong-enough magnetic field is no longer detected.\",\"fields\":[],\"identifierName\":\"inactive\"}],\"tags\":[\"8bit\",\"padauk\",\"input\"],\"group\":\"Environment\"},{\"name\":\"Magnetometer\",\"status\":\"rc\",\"shortId\":\"magnetomer\",\"camelName\":\"magnetometer\",\"shortName\":\"magnetometer\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A 3-axis magnetometer.\"},\"classIdentifier\":318935176,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"forces\",\"identifier\":257,\"description\":\"Indicates the current magnetic field on magnetometer.\\nFor reference: `1 mgauss` is `100 nT` (and `1 gauss` is `100 000 nT`).\",\"fields\":[{\"name\":\"x\",\"unit\":\"nT\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true},{\"name\":\"y\",\"unit\":\"nT\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true},{\"name\":\"z\",\"unit\":\"nT\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"i32 i32 i32\"},{\"kind\":\"ro\",\"name\":\"forces_error\",\"identifier\":262,\"description\":\"Absolute estimated error on the readings.\",\"fields\":[{\"name\":\"_\",\"unit\":\"nT\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"i32\"},{\"kind\":\"command\",\"name\":\"calibrate\",\"identifier\":2,\"description\":\"Forces a calibration sequence where the user/device\\nmight have to rotate to be calibrated.\",\"fields\":[],\"identifierName\":\"calibrate\"}],\"tags\":[]},{\"name\":\"Matrix Keypad\",\"status\":\"experimental\",\"shortId\":\"matrixkeypad\",\"camelName\":\"matrixKeypad\",\"shortName\":\"matrixKeypad\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A matrix of buttons connected as a keypad\"},\"classIdentifier\":319172040,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Membrane\":1,\"Keyboard\":2,\"Elastomer\":3,\"ElastomerLEDPixel\":4}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"pressed\",\"identifier\":257,\"description\":\"The coordinate of the button currently pressed. Keys are zero-indexed from left to right, top to bottom:\\n``row = index / columns``, ``column = index % columns``.\",\"fields\":[{\"name\":\"index\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"startRepeats\":true}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"r: u8\"},{\"kind\":\"const\",\"name\":\"rows\",\"identifier\":384,\"description\":\"Number of rows in the matrix\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"columns\",\"identifier\":385,\"description\":\"Number of columns in the matrix\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"labels\",\"identifier\":386,\"description\":\"The characters printed on the keys if any, in indexing sequence.\",\"fields\":[{\"name\":\"label\",\"type\":\"string0\",\"storage\":0,\"startRepeats\":true}],\"optional\":true,\"packFormat\":\"r: z\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of physical keypad. If the variant is ``ElastomerLEDPixel``\\nand the next service on the device is a ``LEDPixel`` service, it is considered\\nas the service controlling the LED pixel on the keypad.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"down\",\"identifier\":1,\"description\":\"Emitted when a key, at the given index, goes from inactive (`pressed == 0`) to active.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"identifierName\":\"active\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"up\",\"identifier\":2,\"description\":\"Emitted when a key, at the given index, goes from active (`pressed == 1`) to inactive.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"identifierName\":\"inactive\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"click\",\"identifier\":128,\"description\":\"Emitted together with `up` when the press time was not longer than 500ms.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"long_click\",\"identifier\":129,\"description\":\"Emitted together with `up` when the press time was more than 500ms.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Button\"},{\"name\":\"Microphone\",\"status\":\"experimental\",\"shortId\":\"microphone\",\"camelName\":\"microphone\",\"shortName\":\"microphone\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A single-channel microphone.\"},\"classIdentifier\":289254534,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"sample\",\"identifier\":129,\"description\":\"The samples will be streamed back over the `samples` pipe.\\nIf `num_samples` is `0`, streaming will only stop when the pipe is closed.\\nOtherwise the specified number of samples is streamed.\\nSamples are sent as `i16`.\",\"fields\":[{\"name\":\"samples\",\"type\":\"pipe\",\"storage\":12},{\"name\":\"num_samples\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"pipeType\":\"sample\",\"packFormat\":\"b[12] u32\"},{\"kind\":\"rw\",\"name\":\"sampling_period\",\"identifier\":128,\"description\":\"Get or set microphone sampling period.\\nSampling rate is `1_000_000 / sampling_period Hz`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"us\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"}],\"tags\":[],\"group\":\"Sound\"},{\"name\":\"MIDI output\",\"status\":\"experimental\",\"shortId\":\"midioutput\",\"camelName\":\"midiOutput\",\"shortName\":\"midiOutput\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A MIDI output device.\"},\"classIdentifier\":444894423,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Opens or closes the port to the MIDI device\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"clear\",\"identifier\":128,\"description\":\"Clears any pending send data that has not yet been sent from the MIDIOutput's queue.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"send\",\"identifier\":129,\"description\":\"Enqueues the message to be sent to the corresponding MIDI port\",\"fields\":[{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"b\"}],\"tags\":[],\"group\":\"Sound\"},{\"name\":\"Model Runner\",\"status\":\"experimental\",\"shortId\":\"modelrunner\",\"camelName\":\"modelRunner\",\"shortName\":\"modelRunner\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Runs machine learning models.\\n\\nOnly models with a single input tensor and a single output tensor are supported at the moment.\\nInput is provided by Sensor Aggregator service on the same device.\\nMultiple instances of this service may be present, if more than one model format is supported by a device.\"},\"classIdentifier\":336566904,\"enums\":{\"ModelFormat\":{\"name\":\"ModelFormat\",\"storage\":4,\"members\":{\"TFLite\":860636756,\"ML4F\":809963362,\"EdgeImpulseCompiled\":810961221}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"set_model\",\"identifier\":128,\"description\":\"Open pipe for streaming in the model. The size of the model has to be declared upfront.\\nThe model is streamed over regular pipe data packets.\\nThe format supported by this instance of the service is specified in `format` register.\\nWhen the pipe is closed, the model is written all into flash, and the device running the service may reset.\",\"fields\":[{\"name\":\"model_size\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"unique\":true,\"hasReport\":true,\"packFormat\":\"u32\"},{\"kind\":\"report\",\"name\":\"set_model\",\"identifier\":128,\"description\":\"Open pipe for streaming in the model. The size of the model has to be declared upfront.\\nThe model is streamed over regular pipe data packets.\\nThe format supported by this instance of the service is specified in `format` register.\\nWhen the pipe is closed, the model is written all into flash, and the device running the service may reset.\",\"fields\":[{\"name\":\"model_port\",\"type\":\"pipe_port\",\"storage\":2}],\"secondary\":true,\"pipeType\":\"set_model\",\"packFormat\":\"u16\"},{\"kind\":\"command\",\"name\":\"predict\",\"identifier\":129,\"description\":\"Open channel that can be used to manually invoke the model. When enough data is sent over the `inputs` pipe, the model is invoked,\\nand results are send over the `outputs` pipe.\",\"fields\":[{\"name\":\"outputs\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"predict\",\"hasReport\":true,\"packFormat\":\"b[12]\"},{\"kind\":\"report\",\"name\":\"predict\",\"identifier\":129,\"description\":\"Open channel that can be used to manually invoke the model. When enough data is sent over the `inputs` pipe, the model is invoked,\\nand results are send over the `outputs` pipe.\",\"fields\":[{\"name\":\"inputs\",\"type\":\"pipe_port\",\"storage\":2}],\"secondary\":true,\"pipeType\":\"predict\",\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"auto_invoke_every\",\"identifier\":128,\"description\":\"When register contains `N > 0`, run the model automatically every time new `N` samples are collected.\\nModel may be run less often if it takes longer to run than `N * sampling_interval`.\\nThe `outputs` register will stream its value after each run.\\nThis register is not stored in flash.\",\"fields\":[{\"name\":\"_\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"ro\",\"name\":\"outputs\",\"identifier\":257,\"description\":\"Results of last model invocation as `float32` array.\",\"fields\":[{\"name\":\"output\",\"isFloat\":true,\"type\":\"f32\",\"storage\":4,\"startRepeats\":true}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"r: f32\"},{\"kind\":\"ro\",\"name\":\"input_shape\",\"identifier\":384,\"description\":\"The shape of the input tensor.\",\"fields\":[{\"name\":\"dimension\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"startRepeats\":true}],\"packFormat\":\"r: u16\"},{\"kind\":\"ro\",\"name\":\"output_shape\",\"identifier\":385,\"description\":\"The shape of the output tensor.\",\"fields\":[{\"name\":\"dimension\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"startRepeats\":true}],\"packFormat\":\"r: u16\"},{\"kind\":\"ro\",\"name\":\"last_run_time\",\"identifier\":386,\"description\":\"The time consumed in last model execution.\",\"fields\":[{\"name\":\"_\",\"unit\":\"us\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"allocated_arena_size\",\"identifier\":387,\"description\":\"Number of RAM bytes allocated for model execution.\",\"fields\":[{\"name\":\"_\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"model_size\",\"identifier\":388,\"description\":\"The size of the model in bytes.\",\"fields\":[{\"name\":\"_\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"last_error\",\"identifier\":389,\"description\":\"Textual description of last error when running or loading model (if any).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"const\",\"name\":\"format\",\"identifier\":390,\"description\":\"The type of ML models supported by this service.\\n`TFLite` is flatbuffer `.tflite` file.\\n`ML4F` is compiled machine code model for Cortex-M4F.\\nThe format is typically present as first or second little endian word of model file.\",\"fields\":[{\"name\":\"_\",\"type\":\"ModelFormat\",\"storage\":4}],\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"format_version\",\"identifier\":391,\"description\":\"A version number for the format.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"parallel\",\"identifier\":392,\"description\":\"If present and true this service can run models independently of other\\ninstances of this service on the device.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"}],\"tags\":[]},{\"name\":\"Motion\",\"status\":\"experimental\",\"shortId\":\"motion\",\"camelName\":\"motion\",\"shortName\":\"motion\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor, typically PIR, that detects object motion within a certain range\"},\"classIdentifier\":293185353,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"PIR\":1}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"moving\",\"identifier\":257,\"description\":\"Reports is movement is currently detected by the sensor.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"max_distance\",\"identifier\":384,\"description\":\"Maximum distance where objects can be detected.\",\"fields\":[{\"name\":\"_\",\"unit\":\"m\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"angle\",\"identifier\":385,\"description\":\"Opening of the field of view\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Type of physical sensor\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"movement\",\"identifier\":1,\"description\":\"A movement was detected.\",\"fields\":[],\"identifierName\":\"active\"}],\"tags\":[\"8bit\"],\"group\":\"Movement\"},{\"name\":\"Motor\",\"status\":\"rc\",\"shortId\":\"motor\",\"camelName\":\"motor\",\"shortName\":\"motor\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A DC motor.\"},\"classIdentifier\":385895640,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"speed\",\"identifier\":2,\"description\":\"Relative speed of the motor. Use positive/negative values to run the motor forwards and backwards.\\nPositive is recommended to be clockwise rotation and negative counterclockwise. A speed of ``0`` \\nwhile ``enabled`` acts as brake.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":15,\"type\":\"i1.15\",\"storage\":-2}],\"identifierName\":\"value\",\"packFormat\":\"i1.15\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turn the power to the motor on/off.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"load_torque\",\"identifier\":384,\"description\":\"Torque required to produce the rated power of an electrical motor at load speed.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg/cm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"load_rotation_speed\",\"identifier\":385,\"description\":\"Revolutions per minute of the motor under full load.\",\"fields\":[{\"name\":\"_\",\"unit\":\"rpm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"reversible\",\"identifier\":386,\"description\":\"Indicates if the motor can run backwards.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"}],\"tags\":[\"C\",\"8bit\"]},{\"name\":\"Multitouch\",\"status\":\"experimental\",\"shortId\":\"multitouch\",\"camelName\":\"multitouch\",\"shortName\":\"multitouch\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A capacitive touch sensor with multiple inputs.\",\"events\":\"Most events include the channel number of the input.\"},\"classIdentifier\":487664309,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"capacity\",\"identifier\":257,\"description\":\"Capacitance of channels. The capacitance is continuously calibrated, and a value of `0` indicates\\nno touch, wheres a value of around `100` or more indicates touch.\\nIt's best to ignore this (unless debugging), and use events.\\n\\nDigital sensors will use `0` or `0xffff` on each channel.\",\"fields\":[{\"name\":\"capacitance\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true,\"startRepeats\":true}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"r: i16\"},{\"kind\":\"event\",\"name\":\"touch\",\"identifier\":1,\"description\":\"Emitted when an input is touched.\",\"fields\":[{\"name\":\"channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"identifierName\":\"active\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"release\",\"identifier\":2,\"description\":\"Emitted when an input is no longer touched.\",\"fields\":[{\"name\":\"channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"identifierName\":\"inactive\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"tap\",\"identifier\":128,\"description\":\"Emitted when an input is briefly touched. TODO Not implemented.\",\"fields\":[{\"name\":\"channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"long_press\",\"identifier\":129,\"description\":\"Emitted when an input is touched for longer than 500ms. TODO Not implemented.\",\"fields\":[{\"name\":\"channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"swipe_pos\",\"identifier\":144,\"description\":\"Emitted when input channels are successively touched in order of increasing channel numbers.\",\"fields\":[{\"name\":\"duration\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"start_channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"end_channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u16 u8 u8\"},{\"kind\":\"event\",\"name\":\"swipe_neg\",\"identifier\":145,\"description\":\"Emitted when input channels are successively touched in order of decreasing channel numbers.\",\"fields\":[{\"name\":\"duration\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"start_channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"end_channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u16 u8 u8\"}],\"tags\":[],\"group\":\"Button\"},{\"name\":\"PC controller\",\"status\":\"experimental\",\"shortId\":\"pccontroller\",\"camelName\":\"PCController\",\"shortName\":\"PCController\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Send various events to PC, including opening a URL, start an app, sending text, etc.\"},\"classIdentifier\":289212807,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"open_url\",\"identifier\":128,\"description\":\"Open a URL in the default browser.\",\"fields\":[{\"name\":\"url\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"start_app\",\"identifier\":129,\"description\":\"Start an app.\",\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"send_text\",\"identifier\":130,\"description\":\"Send text to the active window.\",\"fields\":[{\"name\":\"text\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"run_script\",\"identifier\":131,\"description\":\"Run a script.\",\"fields\":[{\"name\":\"script\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"}],\"tags\":[]},{\"name\":\"PC monitor\",\"status\":\"experimental\",\"shortId\":\"pcmonitor\",\"camelName\":\"PCMonitor\",\"shortName\":\"PCMonitor\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Measures PC monitor.\"},\"classIdentifier\":409107221,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"cpu_usage\",\"identifier\":400,\"description\":\"CPU usage in percent.\",\"fields\":[{\"name\":\"_\",\"unit\":\"%\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"cpu_temperature\",\"identifier\":401,\"description\":\"CPU temperature in Celsius.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0C\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"ram_usage\",\"identifier\":402,\"description\":\"RAM usage in percent.\",\"fields\":[{\"name\":\"_\",\"unit\":\"%\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"gpu_information\",\"identifier\":403,\"description\":\"GPU info.\",\"fields\":[{\"name\":\"usage\",\"unit\":\"%\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"temperature\",\"unit\":\"\u00B0C\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8 u8\"},{\"kind\":\"ro\",\"name\":\"network_information\",\"identifier\":405,\"description\":\"Network transmit/receive speed in Kbytes per second.\\n\\nA measure of PC monitor.\",\"fields\":[{\"name\":\"tx\",\"unit\":\"KB\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"rx\",\"unit\":\"KB\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16 u16\"}],\"tags\":[]},{\"name\":\"Planar position\",\"status\":\"experimental\",\"shortId\":\"planarposition\",\"camelName\":\"planarPosition\",\"shortName\":\"planarPosition\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that repors 2D position, typically an optical mouse tracking sensor.\\n\\nThe sensor starts at an arbitrary origin (0,0) and reports the distance from that origin.\\n\\nThe `streaming_interval` is respected when the position is changing. When the position is not changing, the streaming interval may be throttled to `500ms`.\"},\"classIdentifier\":499351381,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"OpticalMousePosition\":1}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"position\",\"identifier\":257,\"description\":\"The current position of the sensor.\",\"fields\":[{\"name\":\"x\",\"unit\":\"mm\",\"shift\":10,\"type\":\"i22.10\",\"storage\":-4},{\"name\":\"y\",\"unit\":\"mm\",\"shift\":10,\"type\":\"i22.10\",\"storage\":-4}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"i22.10 i22.10\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Specifies the type of physical sensor.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[],\"group\":\"Movement\"},{\"name\":\"Potentiometer\",\"status\":\"stable\",\"shortId\":\"potentiometer\",\"camelName\":\"potentiometer\",\"shortName\":\"potentiometer\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A slider or rotary potentiometer.\"},\"classIdentifier\":522667846,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Slider\":1,\"Rotary\":2,\"Hall\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"position\",\"identifier\":257,\"description\":\"The relative position of the slider.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Specifies the physical layout of the potentiometer.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"C\",\"8bit\",\"input\"],\"group\":\"Slider\"},{\"name\":\"Power\",\"status\":\"experimental\",\"shortId\":\"power\",\"camelName\":\"power\",\"shortName\":\"power\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A power-provider service.\",\"long\":\"## Power negotiation protocol\\n\\nThe purpose of the power negotiation is to ensure that there is no more than [I<sub>out_hc(max)</sub>](https://microsoft.github.io/jacdac-docs/reference/electrical-spec/#power-providers) delivered to the power rail.\\nThis is realized by limiting the number of enabled power provider services to one.\\n\\nNote, that it's also possible to have low-current power providers,\\nwhich are limited to [I<sub>out_lc(max)</sub>](https://microsoft.github.io/jacdac-docs/reference/electrical-spec/#power-providers) and do not run a power provider service.\\nThese are **not** accounted for in the power negotiation protocol.\\n\\nPower providers can have multiple _channels_, typically multiple Jacdac ports on the provider.\\nEach channel can be limited to [I<sub>out_hc(max)</sub>](https://microsoft.github.io/jacdac-docs/reference/electrical-spec/#power-providers) separately.\\nIn normal operation, the data lines of each channels are connected together.\\nThe ground lines are always connected together.\\nMulti-channel power providers are also called _powered hubs_.\\n\\nWhile channels have separate current limits, there's nothing to prevent the user\\nfrom joining two or more channels outside of the provider using a passive hub.\\nThis would allow more than [I<sub>out_hc(max)</sub>](https://microsoft.github.io/jacdac-docs/reference/electrical-spec/#power-providers) of current to be drawn, resulting in cables or components\\ngetting hot and/or malfunctioning.\\nThus, the power negotiation protocol seeks to detect situations where\\nmultiple channels of power provider(s) are bridged together\\nand shut down all but one of the channels involved.\\n\\nThe protocol is built around the power providers periodically sending specially crafted\\n`shutdown` commands in broadcast mode.\\nNote that this is unusual - services typically only send reports.\\n\\nThe `shutdown` commands can be reliably identified based on their first half (more details below).\\nWhen a power provider starts receiving a `shutdown` command, it needs to take\\nsteps to identify which of its channels the command is coming from.\\nThis is typically realized with analog switches between the data lines of channels.\\nThe delivery of power over the channel which received the `shutdown` command is then shut down.\\nNote that in the case of a single-channel provider, any received `shutdown` command will cause a shut down.\\n\\nA multi-channel provider needs to also identify when a `shutdown` command it sent from one channel\\nis received on any of its other channels and shut down one of the channels involved.\\n\\nIt is also possible to build a _data bridge_ device, with two or more ports.\\nIt passes through all data except for `shutdown` commands,\\nbut **does not** connect the power lines.\\n\\n### Protocol details\\n\\nThe `shutdown` commands follow a very narrow format:\\n* they need to be the only packet in the frame (and thus we can also call them `shutdown` frames)\\n* the second word of `device_id` needs to be set to `0xAA_AA_AA_AA` (alternating 0 and 1)\\n* the service index is set to `0x3d`\\n* the CRC is therefore fixed\\n* therefore, the packet can be recognized by reading the first 8 bytes (total length is 16 bytes)\\n\\nThe exact byte structure of `shutdown` command is:\\n`15 59 04 05 5A C9 A4 1F AA AA AA AA 00 3D 80 00`\\n\\nThere is one power service per channel.\\nA multi-channel power provider can be implemented as one device with multiple services (typically with one MCU),\\nor many devices with one service each (typically multiple MCUs).\\nThe first option is preferred as it fixes the order of channels,\\nbut the second option may be cheaper to implement.\\n\\nAfter queuing a `shutdown` command, the service enters a grace period\\nuntil the report has been sent on the wire.\\nDuring the grace period incoming `shutdown` commands are ignored.\\n\\n* Upon reset, a power service enables itself, and then only after 0-300ms (random)\\n  sends the first `shutdown` command\\n* Every enabled power service emits `shutdown` commands every 400-600ms (random; first few packets can be even sent more often)\\n* If an enabled power service sees a `shutdown` command from somebody else,\\n  it disables itself (unless in grace period)\\n* If a disabled power service sees no `shutdown` command for more than ~1200ms, it enables itself\\n  (this is when the previous power source is unplugged or otherwise malfunctions)\\n* If a power service has been disabled for around 10s, it enables itself.\\n\\nAdditionally:\\n* While the `allowed` register is set to `0`, the service will not enable itself (nor send `shutdown` commands)\\n* When a current overdraw is detected, the service stop providing power and enters `Overload` state for around 2 seconds,\\n  while still sending `shutdown` commands.\\n\\n### Client notes\\n\\nIf a client hears a `shutdown` command it just means it's on a branch of the\\nnetwork with a (high) power provider.\\nAs clients (brains) typically do not consume much current (as opposed to, say, servos),\\nthe `shutdown` commands are typically irrelevant to them.\\n\\nFor power monitoring, the `power_status_changed` event (and possibly `power_status` register)\\ncan be used.\\nIn particular, user interfaces may alert the user to `Overload` status.\\nThe `Overprovision` status is generally considered normal (eg. when two multi-channel power providers are linked together).\\n\\n### Server implementation notes\\n\\n#### A dedicated MCU per channel\\n\\nEvery channel has:\\n* a cheap 8-bit MCU (e.g. PMS150C, PFS122),\\n* a current limiter with FAULT output and ENABLE input, and\\n* an analog switch.\\n\\nThe MCU here needs at least 4 pins per channel.\\nIt is connected to data line of the channel, the control input of the switch, and to the current limiter's FAULT and ENABLE pins.\\n\\nThe switch connects the data line of the channel (JD_DATA_CHx) with the internal shared data bus, common to all channels (JD_DATA_COM).\\nBoth the switch and the limiter are controlled by the MCU.\\nA latching circuit is not needed for the limiter because the MCU will detect an overcurrent fault and shut it down immediately. \\n\\nDuring reception, after the beginning of `shutdown` frame is detected,\\nthe switch is opened for a brief period.\\nIf the `shutdown` frame is received correctly, it means it was on MCU's channel.\\n\\nIn the case of only one power delivery channel that's controlled by a dedicated MCU, the analog switch is not necessary. \\n\\n#### A shared MCU for multiple channels\\n\\nEvery channel has:\\n* a current limiter with FAULT output and ENABLE input, \\n* an analog switch, and\\n* a wiggle-detection line connecting the MCU to data line of the channel\\n\\nThe MCU again needs at least 4 pins per channel.\\nSwitches and limiters are set up like in the configuration above.\\nThe Jacdac data line of the MCU is connected to internal data bus.\\n\\nWhile a Jacdac packet is being received, the MCU keeps checking if it is a \\nbeginning of the `shutdown` frame.\\nIf that is the case, it opens all switches and checks which one(s) of the channel\\ndata lines wiggle (via the wiggle lines; this can be done with EXTI latches).\\nThe one(s) that wiggle received the `shutdown` frame and need to be disabled.\\n\\nAlso, while sending the `shutdown` frames itself, it needs to be done separately\\nfor each channel, with all the other switches open.\\nIf during that operation we detect wiggle on other channels, then we have detected\\na loop, and the respective channels needs to be disabled.\\n\\n#### A brain-integrated power supply\\n\\nHere, there's only one channel of power and we don't have hard real time requirements,\\nso user-programmable brain can control it.\\nThere is no need for analog switch or wiggle-detection line,\\nbut a current limiter with a latching circuit is needed.\\n\\nThere is nothing special to do during reception of `shutdown` packet.\\nWhen it is received, the current limiter should just be disabled.\\n\\nIdeally, exception/hard-fault handlers on the MCU should also disable the current limiter.\\nSimilarly, the limiter should be disabled while the MCU is in bootloader mode,\\nor otherwise unaware of the power negotiation protocol. \\n\\n### Rationale for the grace period\\n\\nConsider the following scenario:\\n\\n* device A queues `shutdown` command for sending\\n* A receives external `shutdown` packet from B (thus disabling A)\\n* the A `shutdown` command is sent from the queue (thus eventually disabling B)\\n\\nTo avoid that, we make sure that at the precise instant when `shutdown` command is sent,\\nthe power is enabled (and thus will stay enabled until another `shutdown` command arrives).\\nThis could be achieved by inspecting the enable bit, aftering acquiring the line\\nand before starting UART transmission, however that would require breaking abstraction layers.\\nSo instead, we never disable the service, while the `shutdown` packet is queued.\\nThis may lead to delays in disabling power services, but these should be limited due to the\\nrandom nature of the `shutdown` packet spacing.\\n\\n### Rationale for timings\\n\\nThe initial 0-300ms delay is set to spread out the `shutdown` periods of power services,\\nto minimize collisions.\\nThe `shutdown` periods are randomized 400-600ms, instead of a fixed 500ms used for regular\\nservices, for the same reason.\\n\\nThe 1200ms period is set so that droping two `shutdown` packets in a row\\nfrom the current provider will not cause power switch, while missing 3 will.\\n\\nThe 50-60s power switch period is arbitrary, but chosen to limit amount of switching between supplies,\\nwhile keeping it short enough for user to notice any problems such switching may cause.\"},\"classIdentifier\":530893146,\"enums\":{\"PowerStatus\":{\"name\":\"PowerStatus\",\"storage\":1,\"members\":{\"Disallowed\":0,\"Powering\":1,\"Overload\":2,\"Overprovision\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"allowed\",\"identifier\":1,\"description\":\"Can be used to completely disable the service.\\nWhen allowed, the service may still not be providing power, see \\n`power_status` for the actual current state.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1,\"defaultValue\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"max_power\",\"identifier\":7,\"description\":\"Limit the power provided by the service. The actual maximum limit will depend on hardware.\\nThis field may be read-only in some implementations - you should read it back after setting.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mA\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":900,\"typicalMax\":900,\"typicalMin\":0}],\"optional\":true,\"identifierName\":\"max_power\",\"packFormat\":\"u16\"},{\"kind\":\"ro\",\"name\":\"power_status\",\"identifier\":385,\"description\":\"Indicates whether the power provider is currently providing power (`Powering` state), and if not, why not.\\n`Overprovision` means there was another power provider, and we stopped not to overprovision the bus.\",\"fields\":[{\"name\":\"_\",\"type\":\"PowerStatus\",\"storage\":1}],\"volatile\":true,\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"current_draw\",\"identifier\":257,\"description\":\"Present current draw from the bus.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mA\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading\",\"packFormat\":\"u16\"},{\"kind\":\"ro\",\"name\":\"battery_voltage\",\"identifier\":384,\"description\":\"Voltage on input.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mV\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"typicalMin\":4500,\"typicalMax\":5500}],\"volatile\":true,\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"ro\",\"name\":\"battery_charge\",\"identifier\":386,\"description\":\"Fraction of charge in the battery.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"optional\":true,\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"battery_capacity\",\"identifier\":387,\"description\":\"Energy that can be delivered to the bus when battery is fully charged.\\nThis excludes conversion overheads if any.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mWh\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"keep_on_pulse_duration\",\"identifier\":128,\"description\":\"Many USB power packs need current to be drawn from time to time to prevent shutdown.\\nThis regulates how often and for how long such current is drawn.\\nTypically a 1/8W 22 ohm resistor is used as load. This limits the duty cycle to 10%.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":600}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"keep_on_pulse_period\",\"identifier\":129,\"description\":\"Many USB power packs need current to be drawn from time to time to prevent shutdown.\\nThis regulates how often and for how long such current is drawn.\\nTypically a 1/8W 22 ohm resistor is used as load. This limits the duty cycle to 10%.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":20000}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"command\",\"name\":\"shutdown\",\"identifier\":128,\"description\":\"Sent by the power service periodically, as broadcast.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"power_status_changed\",\"identifier\":3,\"description\":\"Emitted whenever `power_status` changes.\",\"fields\":[{\"name\":\"power_status\",\"type\":\"PowerStatus\",\"storage\":1}],\"identifierName\":\"change\",\"packFormat\":\"u8\"}],\"tags\":[]},{\"name\":\"Power supply\",\"status\":\"experimental\",\"shortId\":\"powersupply\",\"camelName\":\"powerSupply\",\"shortName\":\"powerSupply\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A power supply with a fixed or variable voltage range\"},\"classIdentifier\":524302175,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turns the power supply on with `true`, off with `false`.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"output_voltage\",\"identifier\":2,\"description\":\"The current output voltage of the power supply. Values provided must be in the range `minimum_voltage` to `maximum_voltage`\",\"fields\":[{\"name\":\"_\",\"unit\":\"V\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"identifierName\":\"value\",\"packFormat\":\"f64\"},{\"kind\":\"const\",\"name\":\"minimum_voltage\",\"identifier\":272,\"description\":\"The minimum output voltage of the power supply. For fixed power supplies, `minimum_voltage` should be equal to `maximum_voltage`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"V\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"identifierName\":\"min_value\",\"packFormat\":\"f64\"},{\"kind\":\"const\",\"name\":\"maximum_voltage\",\"identifier\":273,\"description\":\"The maximum output voltage of the power supply. For fixed power supplies, `minimum_voltage` should be equal to `maximum_voltage`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"V\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"identifierName\":\"max_value\",\"packFormat\":\"f64\"}],\"tags\":[]},{\"name\":\"Pressure Button\",\"status\":\"rc\",\"shortId\":\"pressurebutton\",\"camelName\":\"pressureButton\",\"shortName\":\"pressureButton\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A pressure sensitive push-button.\"},\"classIdentifier\":672612547,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"threshold\",\"identifier\":6,\"description\":\"Indicates the threshold for ``up`` events.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"identifierName\":\"active_threshold\",\"packFormat\":\"u0.16\"}],\"tags\":[\"8bit\"],\"group\":\"Button\"},{\"name\":\"Protocol Test\",\"status\":\"experimental\",\"shortId\":\"prototest\",\"camelName\":\"protoTest\",\"shortName\":\"protoTest\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"This is test service to validate the protocol packet transmissions between the browser and a MCU.\\nUse this page if you are porting Jacdac to a new platform.\",\"long\":\"### Test procedure\\n\\nFor each ``rw`` registers, set a random value ``x``\\n  * read ``rw`` and check value is equal to ``x``\\n  * read ``ro`` and check value is equal to ``x``\\n  * listen to ``e`` event and check that data is equal to ``x``\\n  * call ``c`` command with new random value ``y``\\n  * read ``rw`` and check value is equal to ``y``\\n  * do all the above steps with acks\\n\\nFor each ``rw`` registers, there shall also\\nbe an ``event`` and a ``command``. The event\\nshould get raised when the value changes;\\nand the command should set the value.\",\"registers\":\"Every ``rw`` register has a corresponding ``ro`` regisrer\\nand a corresponding ``set_...`` command to also set the value.\"},\"classIdentifier\":382158442,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"rw_bool\",\"identifier\":129,\"description\":\"A read write bool register.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"ro_bool\",\"identifier\":385,\"description\":\"A read only bool register. Mirrors rw_bool.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"rw_u32\",\"identifier\":130,\"description\":\"A read write u32 register.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"ro_u32\",\"identifier\":386,\"description\":\"A read only u32 register.. Mirrors rw_u32.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"rw_i32\",\"identifier\":131,\"description\":\"A read write i32 register.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"ro\",\"name\":\"ro_i32\",\"identifier\":387,\"description\":\"A read only i32 register.. Mirrors rw_i32.\",\"fields\":[{\"name\":\"_\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"rw\",\"name\":\"rw_string\",\"identifier\":132,\"description\":\"A read write string register.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"ro\",\"name\":\"ro_string\",\"identifier\":388,\"description\":\"A read only string register. Mirrors rw_string.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"rw\",\"name\":\"rw_bytes\",\"identifier\":133,\"description\":\"A read write string register.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"},{\"kind\":\"ro\",\"name\":\"ro_bytes\",\"identifier\":389,\"description\":\"A read only string register. Mirrors ro_bytes.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"},{\"kind\":\"rw\",\"name\":\"rw_i8_u8_u16_i32\",\"identifier\":134,\"description\":\"A read write i8, u8, u16, i32 register.\",\"fields\":[{\"name\":\"i8\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true},{\"name\":\"u8\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"u16\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"i32\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i8 u8 u16 i32\"},{\"kind\":\"ro\",\"name\":\"ro_i8_u8_u16_i32\",\"identifier\":390,\"description\":\"A read only i8, u8, u16, i32 register.. Mirrors rw_i8_u8_u16_i32.\",\"fields\":[{\"name\":\"i8\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true},{\"name\":\"u8\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"u16\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"i32\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i8 u8 u16 i32\"},{\"kind\":\"rw\",\"name\":\"rw_u8_string\",\"identifier\":135,\"description\":\"A read write u8, string register.\",\"fields\":[{\"name\":\"u8\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"str\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"u8 s\"},{\"kind\":\"ro\",\"name\":\"ro_u8_string\",\"identifier\":391,\"description\":\"A read only u8, string register.. Mirrors rw_u8_string.\",\"fields\":[{\"name\":\"u8\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"str\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"u8 s\"},{\"kind\":\"event\",\"name\":\"e_bool\",\"identifier\":129,\"description\":\"An event raised when rw_bool is modified\",\"fields\":[{\"name\":\"bo\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"e_u32\",\"identifier\":130,\"description\":\"An event raised when rw_u32 is modified\",\"fields\":[{\"name\":\"u32\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"event\",\"name\":\"e_i32\",\"identifier\":131,\"description\":\"An event raised when rw_i32 is modified\",\"fields\":[{\"name\":\"i32\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"event\",\"name\":\"e_string\",\"identifier\":132,\"description\":\"An event raised when rw_string is modified\",\"fields\":[{\"name\":\"str\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"event\",\"name\":\"e_bytes\",\"identifier\":133,\"description\":\"An event raised when rw_bytes is modified\",\"fields\":[{\"name\":\"bytes\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"},{\"kind\":\"event\",\"name\":\"e_i8_u8_u16_i32\",\"identifier\":134,\"description\":\"An event raised when rw_i8_u8_u16_i32 is modified\",\"fields\":[{\"name\":\"i8\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true},{\"name\":\"u8\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"u16\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"i32\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i8 u8 u16 i32\"},{\"kind\":\"event\",\"name\":\"e_u8_string\",\"identifier\":135,\"description\":\"An event raised when rw_u8_string is modified\",\"fields\":[{\"name\":\"u8\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"str\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"u8 s\"},{\"kind\":\"command\",\"name\":\"c_bool\",\"identifier\":129,\"description\":\"A command to set rw_bool.\",\"fields\":[{\"name\":\"bo\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"c_u32\",\"identifier\":130,\"description\":\"A command to set rw_u32.\",\"fields\":[{\"name\":\"u32\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"command\",\"name\":\"c_i32\",\"identifier\":131,\"description\":\"A command to set rw_i32.\",\"fields\":[{\"name\":\"i32\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i32\"},{\"kind\":\"command\",\"name\":\"c_string\",\"identifier\":132,\"description\":\"A command to set rw_string.\",\"fields\":[{\"name\":\"str\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"c_bytes\",\"identifier\":133,\"description\":\"A command to set rw_string.\",\"fields\":[{\"name\":\"bytes\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"},{\"kind\":\"command\",\"name\":\"c_i8_u8_u16_i32\",\"identifier\":134,\"description\":\"A command to set rw_bytes.\",\"fields\":[{\"name\":\"i8\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true},{\"name\":\"u8\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"u16\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"i32\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"packFormat\":\"i8 u8 u16 i32\"},{\"kind\":\"command\",\"name\":\"c_u8_string\",\"identifier\":135,\"description\":\"A command to set rw_u8_string.\",\"fields\":[{\"name\":\"u8\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"str\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"u8 s\"},{\"kind\":\"command\",\"name\":\"c_report_pipe\",\"identifier\":144,\"description\":\"A command to read the content of rw_bytes, byte per byte, as a pipe.\",\"fields\":[{\"name\":\"p_bytes\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"c_report_pipe\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"p_bytes\",\"identifier\":0,\"description\":\"A command to read the content of rw_bytes, byte per byte, as a pipe.\",\"fields\":[{\"name\":\"byte\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"pipeType\":\"c_report_pipe\",\"packFormat\":\"u8\"}],\"tags\":[\"infrastructure\"]},{\"name\":\"Proxy\",\"status\":\"stable\",\"shortId\":\"proxy\",\"camelName\":\"proxy\",\"shortName\":\"proxy\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A service that tags a device as a packet proxy.\\nA device in proxy mode will proxy Jacdac packets and typically has its core logic halted.\"},\"classIdentifier\":384932169,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"}],\"tags\":[\"infrastructure\"]},{\"name\":\"Pulse Oximeter\",\"status\":\"experimental\",\"shortId\":\"pulseoximeter\",\"camelName\":\"pulseOximeter\",\"shortName\":\"pulseOximeter\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor approximating the oxygen level.\\n\\n**Jacdac is not suitable for medical devices and should NOT be used in any kind of device to diagnose or treat any medical conditions.**\"},\"classIdentifier\":280710838,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"oxygen\",\"identifier\":257,\"description\":\"The estimated oxygen level in blood.\",\"fields\":[{\"name\":\"_\",\"unit\":\"%\",\"shift\":8,\"type\":\"u8.8\",\"storage\":2,\"typicalMin\":80,\"typicalMax\":100}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u8.8\"},{\"kind\":\"ro\",\"name\":\"oxygen_error\",\"identifier\":262,\"description\":\"The estimated error on the reported sensor data.\",\"fields\":[{\"name\":\"_\",\"unit\":\"%\",\"shift\":8,\"type\":\"u8.8\",\"storage\":2}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u8.8\"}],\"tags\":[\"8bit\"],\"group\":\"Biometric\"},{\"name\":\"Rain gauge\",\"status\":\"rc\",\"shortId\":\"raingauge\",\"camelName\":\"rainGauge\",\"shortName\":\"rainGauge\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"Measures the amount of liquid precipitation over an area in a predefined period of time.\"},\"classIdentifier\":326323349,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"precipitation\",\"identifier\":257,\"description\":\"Total precipitation recorded so far.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":60000,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"precipitation_precision\",\"identifier\":264,\"description\":\"Typically the amount of rain needed for tipping the bucket.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"identifierName\":\"reading_resolution\",\"packFormat\":\"u16.16\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Real time clock\",\"status\":\"rc\",\"shortId\":\"realtimeclock\",\"camelName\":\"realTimeClock\",\"shortName\":\"realTimeClock\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"Real time clock to support collecting data with precise time stamps.\"},\"classIdentifier\":445323816,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Computer\":1,\"Crystal\":2,\"Cuckoo\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"local_time\",\"identifier\":257,\"description\":\"Current time in 24h representation. Default streaming period is 1 second.\\n\\n-   `day_of_month` is day of the month, starting at `1`\\n-   `day_of_week` is day of the week, starting at `1` as monday. Leave at 0 if unsupported.\",\"fields\":[{\"name\":\"year\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"month\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":1,\"absoluteMax\":12},{\"name\":\"day_of_month\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":0,\"absoluteMax\":31},{\"name\":\"day_of_week\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":1,\"absoluteMax\":7},{\"name\":\"hour\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":0,\"absoluteMax\":23},{\"name\":\"min\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":0,\"absoluteMax\":59},{\"name\":\"sec\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":0,\"absoluteMax\":60}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u16 u8 u8 u8 u8 u8 u8\"},{\"kind\":\"ro\",\"name\":\"drift\",\"identifier\":384,\"description\":\"Time drift since the last call to the `set_time` command.\",\"fields\":[{\"name\":\"_\",\"unit\":\"s\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"precision\",\"identifier\":385,\"description\":\"Error on the clock, in parts per million of seconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of physical clock used by the sensor.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"set_time\",\"identifier\":128,\"description\":\"Sets the current time and resets the error.\",\"fields\":[{\"name\":\"year\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"month\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":1,\"absoluteMax\":12},{\"name\":\"day_of_month\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":1,\"absoluteMax\":31},{\"name\":\"day_of_week\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":1,\"absoluteMax\":7},{\"name\":\"hour\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":0,\"absoluteMax\":23},{\"name\":\"min\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":0,\"absoluteMax\":59},{\"name\":\"sec\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"absoluteMin\":0,\"absoluteMax\":60}],\"packFormat\":\"u16 u8 u8 u8 u8 u8 u8\"}],\"tags\":[\"8bit\"]},{\"name\":\"Reflected light\",\"status\":\"rc\",\"shortId\":\"reflectedlight\",\"camelName\":\"reflectedLight\",\"shortName\":\"reflectedLight\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that detects light and dark surfaces, commonly used for line following robots.\"},\"classIdentifier\":309087410,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"InfraredDigital\":1,\"InfraredAnalog\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"brightness\",\"identifier\":257,\"description\":\"Reports the reflected brightness. It may be a digital value or, for some sensor, analog value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Type of physical sensor used\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Relay\",\"status\":\"stable\",\"shortId\":\"relay\",\"camelName\":\"relay\",\"shortName\":\"relay\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A switching relay.\\n\\nThe contacts should be labelled `NO` (normally open), `COM` (common), and `NC` (normally closed).\\nWhen relay is energized it connects `NO` and `COM`.\\nWhen relay is not energized it connects `NC` and `COM`.\\nSome relays may be missing `NO` or `NC` contacts.\\nWhen relay module is not powered, or is in bootloader mode, it is not energized (connects `NC` and `COM`).\"},\"classIdentifier\":406840918,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Electromechanical\":1,\"SolidState\":2,\"Reed\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"active\",\"identifier\":1,\"description\":\"Indicates whether the relay circuit is currently energized or not.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Describes the type of relay used.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"max_switching_current\",\"identifier\":384,\"description\":\"Maximum switching current for a resistive load.\",\"fields\":[{\"name\":\"_\",\"unit\":\"mA\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u32\"}],\"tags\":[\"8bit\"]},{\"name\":\"Random Number Generator\",\"status\":\"rc\",\"shortId\":\"rng\",\"camelName\":\"rng\",\"shortName\":\"rng\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Generates random numbers using entropy sourced from physical processes.\\n\\nThis typically uses a cryptographical pseudo-random number generator (for example [Fortuna](<https://en.wikipedia.org/wiki/Fortuna_(PRNG)>)),\\nwhich is periodically re-seeded with entropy coming from some hardware source.\"},\"classIdentifier\":394916002,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Quantum\":1,\"ADCNoise\":2,\"WebCrypto\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"random\",\"identifier\":384,\"description\":\"A register that returns a 64 bytes random buffer on every request.\\nThis never blocks for a long time. If you need additional random bytes, keep querying the register.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"volatile\":true,\"packFormat\":\"b\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of algorithm/technique used to generate the number.\\n`Quantum` refers to dedicated hardware device generating random noise due to quantum effects.\\n`ADCNoise` is the noise from quick readings of analog-digital converter, which reads temperature of the MCU or some floating pin.\\n`WebCrypto` refers is used in simulators, where the source of randomness comes from an advanced operating system.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[]},{\"name\":\"Role Manager\",\"status\":\"experimental\",\"shortId\":\"rolemanager\",\"camelName\":\"roleManager\",\"shortName\":\"roleManager\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Assign roles to services on the Jacdac bus.\",\"long\":\"## Role allocation\\n\\nInternally, the role manager stores a mapping from role name to `(device_id, service_idx)`.\\nUsers refer to services by using role names (eg., they instantiate an accelerometer client with a given role name).\\nEach client has a role, and roles are unique to clients\\n(ie., one should not have both a gyro and accelerometer service with role `left_leg`).\\n\\nThe simplest recommended automatic role assignment algorithm is as follows:\\n\\n```text\\nroles.sort(strcmp() on UTF-8 representation of role name)\\ndevices.sort(by device identifier (lexicographic on 8 byte string))\\nmove self device to beginning of devices list\\nfor every role\\n  if role is not assigned\\n    for every device\\n      for every service on device\\n        if serviceClass matches role\\n          if service is not assigned to any role\\n            assign service to role\\n```\\n\\nDue to sorting, role names sharing a prefix will tend to be co-located on the single device.\\nFor example, one can have roles `left_leg_acc`, `left_leg_gyro`, `right_leg_acc`, `right_leg_gyro`,\\nand assuming combined gyro+accelerometer sensors, the pairs will tend to be allocated to a single leg,\\nhowever the legs may be reversed.\\nIn such a case the user can swap the physical sensors (note that left leg will always be assigned to\\nsensor with smaller device identifier).\\nAlternatively, the user can manually modify assignment using `set_role` command.\"},\"classIdentifier\":508264038,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"auto_bind\",\"identifier\":128,\"description\":\"Normally, if some roles are unfilled, and there are idle services that can fulfill them,\\nthe brain device will assign roles (bind) automatically.\\nSuch automatic assignment happens every second or so, and is trying to be smart about\\nco-locating roles that share \\\"host\\\" (part before first slash),\\nas well as reasonably stable assignments.\\nOnce user start assigning roles manually using this service, auto-binding should be disabled to avoid confusion.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1,\"defaultValue\":1}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"all_roles_allocated\",\"identifier\":385,\"description\":\"Indicates if all required roles have been allocated to devices.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"set_role\",\"identifier\":129,\"description\":\"Set role. Can set to empty to remove role binding.\",\"fields\":[{\"name\":\"device_id\",\"type\":\"devid\",\"storage\":8},{\"name\":\"service_idx\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"role\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"b[8] u8 s\"},{\"kind\":\"command\",\"name\":\"clear_all_roles\",\"identifier\":132,\"description\":\"Remove all role bindings.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"list_roles\",\"identifier\":131,\"description\":\"List all roles and bindings required by the current program. `device_id` and `service_idx` are `0` if role is unbound.\",\"fields\":[{\"name\":\"roles\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"list_roles\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"roles\",\"identifier\":0,\"description\":\"List all roles and bindings required by the current program. `device_id` and `service_idx` are `0` if role is unbound.\",\"fields\":[{\"name\":\"device_id\",\"type\":\"devid\",\"storage\":8},{\"name\":\"service_class\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"service_idx\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"role\",\"type\":\"string\",\"storage\":0}],\"pipeType\":\"list_roles\",\"packFormat\":\"b[8] u32 u8 s\"},{\"kind\":\"event\",\"name\":\"change\",\"identifier\":3,\"description\":\"Notifies that role bindings have changed.\",\"fields\":[],\"identifierName\":\"change\"}],\"tags\":[\"infrastructure\"]},{\"name\":\"ROS\",\"status\":\"experimental\",\"shortId\":\"ros\",\"camelName\":\"ros\",\"shortName\":\"ros\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A ROS (Robot Operating System https://www.ros.org/) controller that can act as a broker for messages.\"},\"classIdentifier\":354743340,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"publish_message\",\"identifier\":129,\"description\":\"Publishes a JSON-encoded message to the given topic.\",\"fields\":[{\"name\":\"node\",\"type\":\"string0\",\"storage\":0},{\"name\":\"topic\",\"type\":\"string0\",\"storage\":0},{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"z z s\"},{\"kind\":\"command\",\"name\":\"subscribe_message\",\"identifier\":130,\"description\":\"Subscribes to a message topic. Subscribed topics will emit message reports.\",\"fields\":[{\"name\":\"node\",\"type\":\"string0\",\"storage\":0},{\"name\":\"topic\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"z s\"},{\"kind\":\"report\",\"name\":\"message\",\"identifier\":131,\"description\":\"A message published on the bus. Message is JSON encoded.\",\"fields\":[{\"name\":\"node\",\"type\":\"string0\",\"storage\":0},{\"name\":\"topic\",\"type\":\"string0\",\"storage\":0},{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"z z s\"}],\"tags\":[\"robotics\"]},{\"name\":\"Rotary encoder\",\"status\":\"stable\",\"shortId\":\"rotaryencoder\",\"camelName\":\"rotaryEncoder\",\"shortName\":\"rotaryEncoder\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"An incremental rotary encoder - converts angular motion of a shaft to digital signal.\"},\"classIdentifier\":284830153,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"position\",\"identifier\":257,\"description\":\"Upon device reset starts at `0` (regardless of the shaft position).\\nIncreases by `1` for a clockwise \\\"click\\\", by `-1` for counter-clockwise.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"i32\",\"storage\":-4,\"isSimpleType\":true}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"i32\"},{\"kind\":\"const\",\"name\":\"clicks_per_turn\",\"identifier\":384,\"description\":\"This specifies by how much `position` changes when the crank does 360 degree turn. Typically 12 or 24.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"clicker\",\"identifier\":385,\"description\":\"The encoder is combined with a clicker. If this is the case, the clicker button service\\nshould follow this service in the service list of the device.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"}],\"tags\":[\"C\",\"8bit\",\"input\"],\"group\":\"Slider\"},{\"name\":\"Rover\",\"status\":\"experimental\",\"shortId\":\"rover\",\"camelName\":\"rover\",\"shortName\":\"rover\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A roving robot.\"},\"classIdentifier\":435474539,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"kinematics\",\"identifier\":257,\"description\":\"The current position and orientation of the robot.\",\"fields\":[{\"name\":\"x\",\"unit\":\"cm\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4},{\"name\":\"y\",\"unit\":\"cm\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4},{\"name\":\"vx\",\"unit\":\"cm/s\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4},{\"name\":\"vy\",\"unit\":\"cm/s\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4},{\"name\":\"heading\",\"unit\":\"\u00B0\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"i16.16 i16.16 i16.16 i16.16 i16.16\"}],\"tags\":[]},{\"name\":\"Satellite Navigation System\",\"status\":\"experimental\",\"shortId\":\"satelittenavigationsystem\",\"camelName\":\"satNav\",\"shortName\":\"satNav\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A satellite-based navigation system like GPS, Gallileo, ...\"},\"classIdentifier\":433938742,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"position\",\"identifier\":257,\"description\":\"Reported coordinates, geometric altitude and time of position. Altitude accuracy is 0 if not available.\",\"fields\":[{\"name\":\"timestamp\",\"unit\":\"ms\",\"type\":\"u64\",\"storage\":8,\"isSimpleType\":true},{\"name\":\"latitude\",\"unit\":\"lat\",\"shift\":23,\"type\":\"i9.23\",\"storage\":-4,\"absoluteMin\":-90,\"absoluteMax\":90},{\"name\":\"longitude\",\"unit\":\"lon\",\"shift\":23,\"type\":\"i9.23\",\"storage\":-4,\"absoluteMin\":-180,\"absoluteMax\":180},{\"name\":\"accuracy\",\"unit\":\"m\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4},{\"name\":\"altitude\",\"unit\":\"m\",\"shift\":6,\"type\":\"i26.6\",\"storage\":-4},{\"name\":\"altitudeAccuracy\",\"unit\":\"m\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u64 i9.23 i9.23 u16.16 i26.6 u16.16\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Enables or disables the GPS module\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"inactive\",\"identifier\":2,\"description\":\"The module is disabled or lost connection with satellites.\",\"fields\":[],\"identifierName\":\"inactive\"}],\"tags\":[]},{\"name\":\"Sensor Aggregator\",\"status\":\"experimental\",\"shortId\":\"sensoraggregator\",\"camelName\":\"sensorAggregator\",\"shortName\":\"sensorAggregator\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Aggregate data from multiple sensors into a single stream\\n(often used as input to machine learning models on the same device, see model runner service).\"},\"classIdentifier\":496034245,\"enums\":{\"SampleType\":{\"name\":\"SampleType\",\"storage\":1,\"members\":{\"U8\":8,\"I8\":136,\"U16\":16,\"I16\":144,\"U32\":32,\"I32\":160}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"inputs\",\"identifier\":128,\"description\":\"Set automatic input collection.\\nThese settings are stored in flash.\",\"fields\":[{\"name\":\"sampling_interval\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"samples_in_window\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"reserved\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"device_id\",\"type\":\"devid\",\"storage\":8,\"startRepeats\":true},{\"name\":\"service_class\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"service_num\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"sample_size\",\"unit\":\"B\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true},{\"name\":\"sample_type\",\"type\":\"SampleType\",\"storage\":1},{\"name\":\"sample_shift\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true}],\"packFormat\":\"u16 u16 u32 r: b[8] u32 u8 u8 u8 i8\"},{\"kind\":\"ro\",\"name\":\"num_samples\",\"identifier\":384,\"description\":\"Number of input samples collected so far.\",\"fields\":[{\"name\":\"_\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"sample_size\",\"identifier\":385,\"description\":\"Size of a single sample.\",\"fields\":[{\"name\":\"_\",\"unit\":\"B\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":129,\"description\":\"When set to `N`, will stream `N` samples as `current_sample` reading.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"},{\"kind\":\"ro\",\"name\":\"current_sample\",\"identifier\":257,\"description\":\"Last collected sample.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"b\"}],\"tags\":[]},{\"name\":\"Serial\",\"status\":\"experimental\",\"shortId\":\"serial\",\"camelName\":\"serial\",\"shortName\":\"serial\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"An asynchronous serial communication service capable of sending and receiving buffers of data.\\nSettings default to 115200 baud 8N1.\"},\"classIdentifier\":297461188,\"enums\":{\"ParityType\":{\"name\":\"ParityType\",\"storage\":1,\"members\":{\"None\":0,\"Even\":1,\"Odd\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"connected\",\"identifier\":1,\"description\":\"Indicates if the serial connection is active.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"connection_name\",\"identifier\":385,\"description\":\"User-friendly name of the connection.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"packFormat\":\"s\"},{\"kind\":\"rw\",\"name\":\"baud_rate\",\"identifier\":128,\"description\":\"A positive, non-zero value indicating the baud rate at which serial communication is be established.\",\"fields\":[{\"name\":\"_\",\"unit\":\"baud\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":115200}],\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"data_bits\",\"identifier\":129,\"description\":\"The number of data bits per frame. Either 7 or 8.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"defaultValue\":8,\"absoluteMin\":7,\"absoluteMax\":8}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"stop_bits\",\"identifier\":130,\"description\":\"The number of stop bits at the end of a frame. Either 1 or 2.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"defaultValue\":1,\"absoluteMin\":1,\"absoluteMax\":2}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"parity_mode\",\"identifier\":131,\"description\":\"The parity mode.\",\"fields\":[{\"name\":\"_\",\"type\":\"ParityType\",\"storage\":1,\"defaultValue\":0}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"buffer_size\",\"identifier\":132,\"description\":\"A positive, non-zero value indicating the size of the read and write buffers that should be created.\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"send\",\"identifier\":128,\"description\":\"Send a buffer of data over the serial transport.\",\"fields\":[{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"unique\":true,\"packFormat\":\"b\"},{\"kind\":\"report\",\"name\":\"received\",\"identifier\":128,\"description\":\"Raised when a buffer of data is received.\",\"fields\":[{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"}],\"tags\":[\"io\"]},{\"name\":\"Servo\",\"status\":\"stable\",\"shortId\":\"servo\",\"camelName\":\"servo\",\"shortName\":\"servo\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Servo is a small motor with arm that can be pointing at a specific direction.\\nTypically a servo angle is between 0\u00B0 and 180\u00B0 where 90\u00B0 is the middle resting position.\\n\\nThe `min_pulse/max_pulse` may be read-only if the servo is permanently affixed to its Jacdac controller.\"},\"classIdentifier\":318542083,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"angle\",\"identifier\":2,\"description\":\"Specifies the angle of the arm (request).\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4,\"typicalMin\":0,\"typicalMax\":180}],\"identifierName\":\"value\",\"packFormat\":\"i16.16\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turn the power to the servo on/off.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"offset\",\"identifier\":129,\"description\":\"Correction applied to the angle to account for the servo arm drift.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4}],\"packFormat\":\"i16.16\"},{\"kind\":\"const\",\"name\":\"min_angle\",\"identifier\":272,\"description\":\"Lowest angle that can be set, typically 0 \u00B0.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4}],\"identifierName\":\"min_value\",\"packFormat\":\"i16.16\"},{\"kind\":\"rw\",\"name\":\"min_pulse\",\"identifier\":131,\"description\":\"The length of pulse corresponding to lowest angle.\",\"fields\":[{\"name\":\"_\",\"unit\":\"us\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":500}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"max_angle\",\"identifier\":273,\"description\":\"Highest angle that can be set, typically 180\u00B0.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4}],\"identifierName\":\"max_value\",\"packFormat\":\"i16.16\"},{\"kind\":\"rw\",\"name\":\"max_pulse\",\"identifier\":133,\"description\":\"The length of pulse corresponding to highest angle.\",\"fields\":[{\"name\":\"_\",\"unit\":\"us\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"defaultValue\":2500}],\"optional\":true,\"packFormat\":\"u16\"},{\"kind\":\"const\",\"name\":\"stall_torque\",\"identifier\":384,\"description\":\"The servo motor will stop rotating when it is trying to move a `stall_torque` weight at a radial distance of `1.0` cm.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg/cm\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"response_speed\",\"identifier\":385,\"description\":\"Time to move 60\u00B0.\",\"fields\":[{\"name\":\"_\",\"unit\":\"s/60\u00B0\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"ro\",\"name\":\"actual_angle\",\"identifier\":257,\"description\":\"The current physical position of the arm, if the device has a way to sense the position.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"shift\":16,\"type\":\"i16.16\",\"storage\":-4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading\",\"packFormat\":\"i16.16\"}],\"tags\":[\"C\"]},{\"name\":\"Settings\",\"status\":\"experimental\",\"shortId\":\"settings\",\"camelName\":\"settings\",\"shortName\":\"settings\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Non-volatile key-value storage interface for storing settings.\",\"long\":\"## Secrets\\n\\nEntries with keys starting with `$` are considered secret.\\nThey can be written normally, but they read as a single `0` byte,\\nunless they are empty, in which case the value returned is also empty.\\nThese are typically used by other services on the same device.\"},\"classIdentifier\":285727818,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"get\",\"identifier\":128,\"description\":\"Get the value of given setting. If no such entry exists, the value returned is empty.\",\"fields\":[{\"name\":\"key\",\"type\":\"string\",\"storage\":0}],\"hasReport\":true,\"packFormat\":\"s\"},{\"kind\":\"report\",\"name\":\"get\",\"identifier\":128,\"description\":\"Get the value of given setting. If no such entry exists, the value returned is empty.\",\"fields\":[{\"name\":\"key\",\"type\":\"string0\",\"storage\":0},{\"name\":\"value\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"z b\"},{\"kind\":\"command\",\"name\":\"set\",\"identifier\":129,\"description\":\"Set the value of a given setting.\",\"fields\":[{\"name\":\"key\",\"type\":\"string0\",\"storage\":0},{\"name\":\"value\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"restricted\":true,\"packFormat\":\"z b\"},{\"kind\":\"command\",\"name\":\"delete\",\"identifier\":132,\"description\":\"Delete a given setting.\",\"fields\":[{\"name\":\"key\",\"type\":\"string\",\"storage\":0}],\"restricted\":true,\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"list_keys\",\"identifier\":130,\"description\":\"Return keys of all settings.\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"list_keys\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"listed_key\",\"identifier\":0,\"description\":\"Return keys of all settings.\",\"fields\":[{\"name\":\"key\",\"type\":\"string\",\"storage\":0}],\"pipeType\":\"list_keys\",\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"list\",\"identifier\":131,\"description\":\"Return keys and values of all settings.\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"list\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"listed_entry\",\"identifier\":0,\"description\":\"Return keys and values of all settings.\",\"fields\":[{\"name\":\"key\",\"type\":\"string0\",\"storage\":0},{\"name\":\"value\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"pipeType\":\"list\",\"packFormat\":\"z b\"},{\"kind\":\"command\",\"name\":\"clear\",\"identifier\":133,\"description\":\"Clears all keys.\",\"fields\":[],\"restricted\":true},{\"kind\":\"event\",\"name\":\"change\",\"identifier\":3,\"description\":\"Notifies that some setting have been modified.\",\"fields\":[],\"identifierName\":\"change\"}],\"tags\":[]},{\"name\":\"7-segment display\",\"status\":\"rc\",\"shortId\":\"sevensegmentdisplay\",\"camelName\":\"sevenSegmentDisplay\",\"shortName\":\"sevenSegmentDisplay\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A 7-segment numeric display, with one or more digits.\"},\"classIdentifier\":425810167,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"digits\",\"identifier\":2,\"description\":\"Each byte encodes the display status of a digit using,\\nwhere lowest bit 0 encodes segment `A`, bit 1 encodes segments `B`, ..., bit 6 encodes segments `G`, and bit 7 encodes the decimal point (if present).\\nIf incoming `digits` data is smaller than `digit_count`, the remaining digits will be cleared.\\nThus, sending an empty `digits` payload clears the screen.\\n\\n```text\\nGFEDCBA DP\\n - A -\\n F   B\\n |   |\\n - G -\\n |   |\\n E   C   _\\n |   |  |DP|\\n - D -   -\\n```\",\"fields\":[{\"name\":\"_\",\"encoding\":\"bitset\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"lowLevel\":true,\"identifierName\":\"value\",\"packFormat\":\"b\"},{\"kind\":\"rw\",\"name\":\"brightness\",\"identifier\":1,\"description\":\"Controls the brightness of the LEDs. `0` means off.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"optional\":true,\"identifierName\":\"intensity\",\"packFormat\":\"u0.16\"},{\"kind\":\"rw\",\"name\":\"double_dots\",\"identifier\":128,\"description\":\"Turn on or off the column LEDs (separating minutes from hours, etc.) in of the segment.\\nIf the column LEDs is not supported, the value remains false.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"digit_count\",\"identifier\":384,\"description\":\"The number of digits available on the display.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"decimal_point\",\"identifier\":385,\"description\":\"True if decimal points are available (on all digits).\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"optional\":true,\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"set_number\",\"identifier\":128,\"description\":\"Shows the number on the screen using the decimal dot if available.\",\"fields\":[{\"name\":\"value\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8}],\"client\":true,\"packFormat\":\"f64\"}],\"tags\":[\"8bit\"],\"group\":\"Display\"},{\"name\":\"Soil moisture\",\"status\":\"stable\",\"shortId\":\"soilmoisture\",\"camelName\":\"soilMoisture\",\"shortName\":\"soilMoisture\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A soil moisture sensor.\"},\"classIdentifier\":491430835,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Resistive\":1,\"Capacitive\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"moisture\",\"identifier\":257,\"description\":\"Indicates the wetness of the soil, from `dry` to `wet`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u0.16\"},{\"kind\":\"ro\",\"name\":\"moisture_error\",\"identifier\":262,\"description\":\"The error on the moisture reading.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Describe the type of physical sensor.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Solenoid\",\"status\":\"rc\",\"shortId\":\"solenoid\",\"camelName\":\"solenoid\",\"shortName\":\"solenoid\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A push-pull solenoid is a type of relay that pulls a coil when activated.\"},\"classIdentifier\":387392458,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"PushPull\":1,\"Valve\":2,\"Latch\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"pulled\",\"identifier\":1,\"description\":\"Indicates whether the solenoid is energized and pulled (on) or pushed (off).\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Describes the type of solenoid used.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"]},{\"name\":\"Sound level\",\"status\":\"rc\",\"shortId\":\"soundlevel\",\"camelName\":\"soundLevel\",\"shortName\":\"soundLevel\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sound level detector sensor, gives a relative indication of the sound level.\"},\"classIdentifier\":346888797,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"sound_level\",\"identifier\":257,\"description\":\"The sound level detected by the microphone\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u0.16\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turn on or off the microphone.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"loud_threshold\",\"identifier\":6,\"description\":\"Set level at which the `loud` event is generated.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"identifierName\":\"active_threshold\",\"packFormat\":\"u0.16\"},{\"kind\":\"rw\",\"name\":\"quiet_threshold\",\"identifier\":5,\"description\":\"Set level at which the `quiet` event is generated.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"identifierName\":\"inactive_threshold\",\"packFormat\":\"u0.16\"},{\"kind\":\"event\",\"name\":\"loud\",\"identifier\":1,\"description\":\"Generated when a loud sound is detected.\",\"fields\":[],\"identifierName\":\"active\"},{\"kind\":\"event\",\"name\":\"quiet\",\"identifier\":2,\"description\":\"Generated low level of sound is detected.\",\"fields\":[],\"identifierName\":\"inactive\"}],\"tags\":[\"8bit\"],\"group\":\"Sound\"},{\"name\":\"Sound player\",\"status\":\"rc\",\"shortId\":\"soundplayer\",\"camelName\":\"soundPlayer\",\"shortName\":\"soundPlayer\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A device that can play various sounds stored locally. This service is typically paired with a ``storage`` service for storing sounds.\"},\"classIdentifier\":335795000,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"volume\",\"identifier\":1,\"description\":\"Global volume of the output. ``0`` means completely off. This volume is mixed with each play volumes.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"optional\":true,\"identifierName\":\"intensity\",\"packFormat\":\"u0.16\"},{\"kind\":\"command\",\"name\":\"play\",\"identifier\":128,\"description\":\"Starts playing a sound.\",\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"cancel\",\"identifier\":129,\"description\":\"Cancel any sound playing.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"list_sounds\",\"identifier\":130,\"description\":\"Returns the list of sounds available to play.\",\"fields\":[{\"name\":\"sounds_port\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"list_sounds\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"list_sounds_pipe\",\"identifier\":0,\"description\":\"Returns the list of sounds available to play.\",\"fields\":[{\"name\":\"duration\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"name\",\"type\":\"string\",\"storage\":0}],\"pipeType\":\"list_sounds\",\"packFormat\":\"u32 s\"}],\"tags\":[],\"group\":\"Sound\"},{\"name\":\"Sound Recorder with Playback\",\"status\":\"experimental\",\"shortId\":\"soundrecorderwithplayback\",\"camelName\":\"soundRecorderWithPlayback\",\"shortName\":\"soundRecorderWithPlayback\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A record and replay module. You can record a few seconds of audio and play it back.\"},\"classIdentifier\":460504912,\"enums\":{\"Status\":{\"name\":\"Status\",\"storage\":1,\"members\":{\"Idle\":0,\"Recording\":1,\"Playing\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"play\",\"identifier\":128,\"description\":\"Replay recorded audio.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"record\",\"identifier\":129,\"description\":\"Record audio for N milliseconds.\",\"fields\":[{\"name\":\"duration\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"command\",\"name\":\"cancel\",\"identifier\":130,\"description\":\"Cancel record, the `time` register will be updated by already cached data.\",\"fields\":[]},{\"kind\":\"ro\",\"name\":\"status\",\"identifier\":384,\"description\":\"Indicate the current status\",\"fields\":[{\"name\":\"_\",\"type\":\"Status\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"time\",\"identifier\":385,\"description\":\"Milliseconds of audio recorded.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16\"},{\"kind\":\"rw\",\"name\":\"volume\",\"identifier\":1,\"description\":\"Playback volume control\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1}],\"optional\":true,\"identifierName\":\"intensity\",\"packFormat\":\"u0.8\"}],\"tags\":[\"8bit\",\"padauk\"],\"group\":\"Sound\"},{\"name\":\"Sound Spectrum\",\"status\":\"experimental\",\"shortId\":\"soundspectrum\",\"camelName\":\"soundSpectrum\",\"shortName\":\"soundSpectrum\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A microphone that analyzes the sound specturm\"},\"classIdentifier\":360365086,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"frequency_bins\",\"identifier\":257,\"description\":\"The computed frequency data.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"b\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Turns on/off the micropohone.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"fft_pow2_size\",\"identifier\":128,\"description\":\"The power of 2 used as the size of the FFT to be used to determine the frequency domain.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"defaultValue\":5,\"absoluteMin\":2,\"absoluteMax\":7}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"min_decibels\",\"identifier\":129,\"description\":\"The minimum power value in the scaling range for the FFT analysis data\",\"fields\":[{\"name\":\"_\",\"unit\":\"dB\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true}],\"packFormat\":\"i16\"},{\"kind\":\"rw\",\"name\":\"max_decibels\",\"identifier\":130,\"description\":\"The maximum power value in the scaling range for the FFT analysis data\",\"fields\":[{\"name\":\"_\",\"unit\":\"dB\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true}],\"packFormat\":\"i16\"},{\"kind\":\"rw\",\"name\":\"smoothing_time_constant\",\"identifier\":131,\"description\":\"The averaging constant with the last analysis frame.\\nIf `0` is set, there is no averaging done, whereas a value of `1` means \\\"overlap the previous and current buffer quite a lot while computing the value\\\".\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1,\"defaultValue\":0.8}],\"packFormat\":\"u0.8\"}],\"tags\":[],\"group\":\"Sound\"},{\"name\":\"Speech synthesis\",\"status\":\"rc\",\"shortId\":\"speechsynthesis\",\"camelName\":\"speechSynthesis\",\"shortName\":\"speechSynthesis\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A speech synthesizer\"},\"classIdentifier\":302307733,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Determines if the speech engine is in a non-paused state.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"lang\",\"identifier\":128,\"description\":\"Language used for utterances as defined in https://www.ietf.org/rfc/bcp/bcp47.txt.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"packFormat\":\"s\"},{\"kind\":\"rw\",\"name\":\"volume\",\"identifier\":129,\"description\":\"Volume for utterances.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1,\"defaultValue\":1}],\"optional\":true,\"packFormat\":\"u0.8\"},{\"kind\":\"rw\",\"name\":\"pitch\",\"identifier\":130,\"description\":\"Pitch for utterances\",\"fields\":[{\"name\":\"_\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4,\"defaultValue\":1,\"absoluteMax\":2,\"absoluteMin\":0}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"rw\",\"name\":\"rate\",\"identifier\":131,\"description\":\"Rate for utterances\",\"fields\":[{\"name\":\"_\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4,\"defaultValue\":1,\"absoluteMin\":0.1,\"absoluteMax\":10}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"command\",\"name\":\"speak\",\"identifier\":128,\"description\":\"Adds an utterance to the utterance queue; it will be spoken when any other utterances queued before it have been spoken.\",\"fields\":[{\"name\":\"text\",\"type\":\"string\",\"storage\":0}],\"unique\":true,\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"cancel\",\"identifier\":129,\"description\":\"Cancels current utterance and all utterances from the utterance queue.\",\"fields\":[]}],\"tags\":[]},{\"name\":\"Switch\",\"status\":\"rc\",\"shortId\":\"switch\",\"camelName\":\"switch\",\"shortName\":\"switch\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A switch, which keeps its position.\"},\"classIdentifier\":450008066,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Slide\":1,\"Tilt\":2,\"PushButton\":3,\"Tactile\":4,\"Toggle\":5,\"Proximity\":6,\"Magnetic\":7,\"FootButton\":8}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"active\",\"identifier\":257,\"description\":\"Indicates whether the switch is currently active (on).\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u8\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Describes the type of switch used.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"on\",\"identifier\":1,\"description\":\"Emitted when switch goes from `off` to `on`.\",\"fields\":[],\"identifierName\":\"active\"},{\"kind\":\"event\",\"name\":\"off\",\"identifier\":2,\"description\":\"Emitted when switch goes from `on` to `off`.\",\"fields\":[],\"identifierName\":\"inactive\"}],\"tags\":[\"8bit\",\"input\"],\"group\":\"Button\"},{\"name\":\"TCP\",\"status\":\"experimental\",\"shortId\":\"tcp\",\"camelName\":\"tcp\",\"shortName\":\"tcp\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Data transfer over TCP/IP and TLS stream sockets.\",\"commands\":\"## Pipes\"},\"classIdentifier\":457422603,\"enums\":{\"TcpError\":{\"name\":\"TcpError\",\"storage\":-4,\"members\":{\"InvalidCommand\":1,\"InvalidCommandPayload\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"open\",\"identifier\":128,\"description\":\"Open pair of pipes between network peripheral and a controlling device. In/outbound refers to direction from/to internet.\",\"fields\":[{\"name\":\"inbound\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"open\",\"hasReport\":true,\"packFormat\":\"b[12]\"},{\"kind\":\"report\",\"name\":\"open\",\"identifier\":128,\"description\":\"Open pair of pipes between network peripheral and a controlling device. In/outbound refers to direction from/to internet.\",\"fields\":[{\"name\":\"outbound_port\",\"type\":\"pipe_port\",\"storage\":2}],\"secondary\":true,\"pipeType\":\"open\",\"packFormat\":\"u16\"},{\"kind\":\"meta_pipe_command\",\"name\":\"open_ssl\",\"identifier\":1,\"description\":\"Open an SSL connection to a given host:port pair. Can be issued only once on given pipe.\\nAfter the connection is established, an empty data report is sent.\\nConnection is closed by closing the pipe.\",\"fields\":[{\"name\":\"tcp_port\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"hostname\",\"type\":\"string\",\"storage\":0}],\"pipeType\":\"open\",\"packFormat\":\"u16 s\"},{\"kind\":\"pipe_command\",\"name\":\"outdata\",\"identifier\":0,\"description\":\"Bytes to be sent directly over an established TCP or SSL connection.\",\"fields\":[{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"pipeType\":\"open\",\"packFormat\":\"b\"},{\"kind\":\"pipe_report\",\"name\":\"indata\",\"identifier\":0,\"description\":\"Bytes read directly from directly over an established TCP or SSL connection.\",\"fields\":[{\"name\":\"data\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"pipeType\":\"open\",\"packFormat\":\"b\"},{\"kind\":\"meta_pipe_report\",\"name\":\"error\",\"identifier\":0,\"description\":\"Reported when an error is encountered. Negative error codes come directly from the SSL implementation.\",\"fields\":[{\"name\":\"error\",\"type\":\"TcpError\",\"storage\":-4}],\"pipeType\":\"open\",\"packFormat\":\"i32\"}],\"tags\":[]},{\"name\":\"Temperature\",\"status\":\"stable\",\"shortId\":\"temperature\",\"camelName\":\"temperature\",\"shortName\":\"temperature\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A thermometer measuring outside or inside environment.\"},\"classIdentifier\":337754823,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Outdoor\":1,\"Indoor\":2,\"Body\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"temperature\",\"identifier\":257,\"description\":\"The temperature.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0C\",\"shift\":10,\"type\":\"i22.10\",\"storage\":-4}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"i22.10\"},{\"kind\":\"const\",\"name\":\"min_temperature\",\"identifier\":260,\"description\":\"Lowest temperature that can be reported.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0C\",\"shift\":10,\"type\":\"i22.10\",\"storage\":-4}],\"identifierName\":\"min_reading\",\"packFormat\":\"i22.10\"},{\"kind\":\"const\",\"name\":\"max_temperature\",\"identifier\":261,\"description\":\"Highest temperature that can be reported.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0C\",\"shift\":10,\"type\":\"i22.10\",\"storage\":-4}],\"identifierName\":\"max_reading\",\"packFormat\":\"i22.10\"},{\"kind\":\"ro\",\"name\":\"temperature_error\",\"identifier\":262,\"description\":\"The real temperature is between `temperature - temperature_error` and `temperature + temperature_error`.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0C\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"Specifies the type of thermometer.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"C\",\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Timeseries Aggregator\",\"status\":\"experimental\",\"shortId\":\"timeseriesaggregator\",\"camelName\":\"timeseriesAggregator\",\"shortName\":\"timeseriesAggregator\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Supports aggregating timeseries data (especially sensor readings)\\nand sending them to a cloud/storage service.\\nUsed in DeviceScript.\\n\\nNote that `f64` values are not necessarily aligned.\"},\"classIdentifier\":294829516,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"clear\",\"identifier\":128,\"description\":\"Remove all pending timeseries.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"update\",\"identifier\":131,\"description\":\"Add a data point to a timeseries.\",\"fields\":[{\"name\":\"value\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8},{\"name\":\"label\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"f64 s\"},{\"kind\":\"command\",\"name\":\"set_window\",\"identifier\":132,\"description\":\"Set aggregation window.\\nSetting to `0` will restore default.\",\"fields\":[{\"name\":\"duration\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"label\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"u32 s\"},{\"kind\":\"command\",\"name\":\"set_upload\",\"identifier\":133,\"description\":\"Set whether or not the timeseries will be uploaded to the cloud.\\nThe `stored` reports are generated regardless.\",\"fields\":[{\"name\":\"upload\",\"type\":\"bool\",\"storage\":1},{\"name\":\"label\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"u8 s\"},{\"kind\":\"report\",\"name\":\"stored\",\"identifier\":144,\"description\":\"Indicates that the average, minimum and maximum value of a given\\ntimeseries are as indicated.\\nIt also says how many samples were collected, and the collection period.\\nTimestamps are given using device's internal clock, which will wrap around.\\nTypically, `end_time` can be assumed to be \\\"now\\\".\\n`end_time - start_time == window`\",\"fields\":[{\"name\":\"num_samples\",\"unit\":\"#\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"padding\",\"type\":\"u8[4]\",\"storage\":4},{\"name\":\"avg\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8},{\"name\":\"min\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8},{\"name\":\"max\",\"isFloat\":true,\"type\":\"f64\",\"storage\":8},{\"name\":\"start_time\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"end_time\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"label\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"u32 b[4] f64 f64 f64 u32 u32 s\"},{\"kind\":\"ro\",\"name\":\"now\",\"identifier\":384,\"description\":\"This can queried to establish local time on the device.\",\"fields\":[{\"name\":\"_\",\"unit\":\"us\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"volatile\":true,\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"fast_start\",\"identifier\":128,\"description\":\"When `true`, the windows will be shorter after service reset and gradually extend to requested length.\\nThis is ensure valid data is being streamed in program development.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1,\"defaultValue\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"default_window\",\"identifier\":129,\"description\":\"Window for timeseries for which `set_window` was never called.\\nNote that windows returned initially may be shorter if `fast_start` is enabled.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":60000}],\"packFormat\":\"u32\"},{\"kind\":\"rw\",\"name\":\"default_upload\",\"identifier\":130,\"description\":\"Whether labelled timeseries for which `set_upload` was never called should be automatically uploaded.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1,\"defaultValue\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"upload_unlabelled\",\"identifier\":131,\"description\":\"Whether automatically created timeseries not bound in role manager should be uploaded.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1,\"defaultValue\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"sensor_watchdog_period\",\"identifier\":132,\"description\":\"If no data is received from any sensor within given period, the device is rebooted.\\nSet to `0` to disable (default).\\nUpdating user-provided timeseries does not reset the watchdog.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"packFormat\":\"u32\"}],\"tags\":[\"infrastructure\",\"devicescript\"],\"group\":\"Iot\",\"restricted\":true},{\"name\":\"Traffic Light\",\"status\":\"rc\",\"shortId\":\"trafficlight\",\"camelName\":\"trafficLight\",\"shortName\":\"trafficLight\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Controls a mini traffic with a red, orange and green LED.\"},\"classIdentifier\":365137307,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"red\",\"identifier\":128,\"description\":\"The on/off state of the red light.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"yellow\",\"identifier\":129,\"description\":\"The on/off state of the yellow light.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"green\",\"identifier\":130,\"description\":\"The on/off state of the green light.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"]},{\"name\":\"Total Volatile organic compound\",\"status\":\"stable\",\"shortId\":\"tvoc\",\"camelName\":\"tvoc\",\"shortName\":\"tvoc\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"Measures equivalent Total Volatile Organic Compound levels.\"},\"classIdentifier\":312849815,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"TVOC\",\"identifier\":257,\"description\":\"Total volatile organic compound readings in parts per billion.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppb\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4,\"absoluteMin\":0,\"typicalMax\":1187,\"typicalMin\":0}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u22.10\"},{\"kind\":\"ro\",\"name\":\"TVOC_error\",\"identifier\":262,\"description\":\"Error on the reading data\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppb\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"min_TVOC\",\"identifier\":260,\"description\":\"Minimum measurable value\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppb\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"identifierName\":\"min_reading\",\"packFormat\":\"u22.10\"},{\"kind\":\"const\",\"name\":\"max_TVOC\",\"identifier\":261,\"description\":\"Minimum measurable value.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ppb\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"identifierName\":\"max_reading\",\"packFormat\":\"u22.10\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Unique Brain\",\"status\":\"stable\",\"shortId\":\"uniquebrain\",\"camelName\":\"uniqueBrain\",\"shortName\":\"uniqueBrain\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"The presence of this service indicates that this device is a client that controls sensors and actuators.\\nIf a unique brain detects another younger unique brain (determined by reset counter in announce packets),\\nthen the older brain should switch into proxy mode.\"},\"classIdentifier\":272387813,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"}],\"tags\":[\"infrastructure\"]},{\"name\":\"USB Bridge\",\"status\":\"rc\",\"shortId\":\"usbbridge\",\"camelName\":\"usbBridge\",\"shortName\":\"usbBridge\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"This service is normally not announced or otherwise exposed on the serial bus.\\nIt is used to communicate with a USB-Jacdac bridge at the USB layer.\\nThe host sends broadcast packets to this service to control the link layer.\\nThe device responds with broadcast reports (no-one else does that).\\nThese packets are not forwarded to the UART Jacdac line.\\n\\nPackets are sent over USB Serial (CDC).\\nThe host shall set the CDC to 1Mbaud 8N1\\n(even though in some cases the USB interface is connected directly to the MCU and line settings are\\nignored).\\n\\nThe CDC line carries both Jacdac frames and serial logging output.\\nJacdac frames have valid CRC and are framed by delimeter characters and possibly fragmented.\\n\\n`0xFE` is used as a framing byte.\\nNote that bytes `0xF8`-`0xFF` are always invalid UTF-8.\\n`0xFF` occurs relatively often in Jacdac packets, so is not used for framing.\\n\\nThe following sequences are supported:\\n\\n* `0xFE 0xF8` - literal 0xFE\\n* `0xFE 0xF9` - reserved; ignore\\n* `0xFE 0xFA` - indicates that some serial logs were dropped at this point\\n* `0xFE 0xFB` - indicates that some Jacdac frames were dropped at this point\\n* `0xFE 0xFC` - Jacdac frame start\\n* `0xFE 0xFD` - Jacdac frame end\\n\\n0xFE followed by any other byte:\\n* in serial, should be treated as literal 0xFE (and the byte as itself, unless it's 0xFE)\\n* in frame data, should terminate the current frame fragment,\\n  and ideally have all data (incl. fragment start) in the current frame fragment treated as serial\"},\"classIdentifier\":418781770,\"enums\":{\"QByte\":{\"name\":\"QByte\",\"storage\":1,\"members\":{\"Magic\":254,\"LiteralMagic\":248,\"Reserved\":249,\"SerialGap\":250,\"FrameGap\":251,\"FrameStart\":252,\"FrameEnd\":253}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"disable_packets\",\"identifier\":128,\"description\":\"Disables forwarding of Jacdac packets.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"disable_packets\",\"identifier\":128,\"description\":\"Disables forwarding of Jacdac packets.\",\"fields\":[],\"secondary\":true},{\"kind\":\"command\",\"name\":\"enable_packets\",\"identifier\":129,\"description\":\"Enables forwarding of Jacdac packets.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"enable_packets\",\"identifier\":129,\"description\":\"Enables forwarding of Jacdac packets.\",\"fields\":[],\"secondary\":true},{\"kind\":\"command\",\"name\":\"disable_log\",\"identifier\":130,\"description\":\"Disables forwarding of serial log messages.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"disable_log\",\"identifier\":130,\"description\":\"Disables forwarding of serial log messages.\",\"fields\":[],\"secondary\":true},{\"kind\":\"command\",\"name\":\"enable_log\",\"identifier\":131,\"description\":\"Enables forwarding of serial log messages.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"enable_log\",\"identifier\":131,\"description\":\"Enables forwarding of serial log messages.\",\"fields\":[],\"secondary\":true}],\"tags\":[\"infrastructure\"]},{\"name\":\"UV index\",\"status\":\"stable\",\"shortId\":\"uvindex\",\"camelName\":\"uvIndex\",\"shortName\":\"uvIndex\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"The UV Index is a measure of the intensity of ultraviolet (UV) rays from the Sun.\"},\"classIdentifier\":527306128,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"UVA_UVB\":1,\"Visible_IR\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"uv_index\",\"identifier\":257,\"description\":\"Ultraviolet index, typically refreshed every second.\",\"fields\":[{\"name\":\"_\",\"unit\":\"uv\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4,\"typicalMax\":11,\"typicalMin\":0}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u16.16\"},{\"kind\":\"ro\",\"name\":\"uv_index_error\",\"identifier\":262,\"description\":\"Error on the UV measure.\",\"fields\":[{\"name\":\"_\",\"unit\":\"uv\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of physical sensor and capabilities.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Verified Telemetry\",\"status\":\"deprecated\",\"shortId\":\"verifiedtelemetrysensor\",\"camelName\":\"verifiedTelemetry\",\"shortName\":\"verifiedTelemetry\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A mixin service that exposes verified telemetry information for a sensor (see https://github.com/Azure/Verified-Telemetry/tree/main/PnPModel).\"},\"classIdentifier\":563381279,\"enums\":{\"Status\":{\"name\":\"Status\",\"storage\":1,\"members\":{\"Unknown\":0,\"Working\":1,\"Faulty\":2}},\"FingerprintType\":{\"name\":\"FingerprintType\",\"storage\":1,\"members\":{\"FallCurve\":1,\"CurrentSense\":2,\"Custom\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"telemetry_status\",\"identifier\":384,\"description\":\"Reads the telemetry working status, where ``true`` is working and ``false`` is faulty.\",\"fields\":[{\"name\":\"_\",\"type\":\"Status\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"rw\",\"name\":\"telemetry_status_interval\",\"identifier\":128,\"description\":\"Specifies the interval between computing the fingerprint information.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u32\"},{\"kind\":\"const\",\"name\":\"fingerprint_type\",\"identifier\":385,\"description\":\"Type of the fingerprint.\",\"fields\":[{\"name\":\"_\",\"type\":\"FingerprintType\",\"storage\":1}],\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"fingerprint_template\",\"identifier\":386,\"description\":\"Template Fingerprint information of a working sensor.\",\"fields\":[{\"name\":\"confidence\",\"unit\":\"%\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"template\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"u16 b\"},{\"kind\":\"command\",\"name\":\"reset_fingerprint_template\",\"identifier\":128,\"description\":\"This command will clear the template fingerprint of a sensor and collect a new template fingerprint of the attached sensor.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"retrain_fingerprint_template\",\"identifier\":129,\"description\":\"This command will append a new template fingerprint to the `fingerprintTemplate`. Appending more fingerprints will increase the accuracy in detecting the telemetry status.\",\"fields\":[],\"unique\":true},{\"kind\":\"event\",\"name\":\"telemetry_status_change\",\"identifier\":3,\"description\":\"The telemetry status of the device was updated.\",\"fields\":[{\"name\":\"telemetry_status\",\"type\":\"Status\",\"storage\":1}],\"identifierName\":\"change\",\"packFormat\":\"u8\"},{\"kind\":\"event\",\"name\":\"fingerprint_template_change\",\"identifier\":128,\"description\":\"The fingerprint template was updated\",\"fields\":[]}],\"tags\":[]},{\"name\":\"Vibration motor\",\"status\":\"stable\",\"shortId\":\"vibrationmotor\",\"camelName\":\"vibrationMotor\",\"shortName\":\"vibrationMotor\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"A vibration motor.\"},\"classIdentifier\":406832290,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"vibrate\",\"identifier\":128,\"description\":\"Starts a sequence of vibration and pauses. To stop any existing vibration, send an empty payload.\",\"fields\":[{\"name\":\"duration\",\"unit\":\"8ms\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"startRepeats\":true},{\"name\":\"intensity\",\"unit\":\"/\",\"shift\":8,\"type\":\"u0.8\",\"storage\":1}],\"packFormat\":\"r: u8 u0.8\"},{\"kind\":\"const\",\"name\":\"max_vibrations\",\"identifier\":384,\"description\":\"The maximum number of vibration sequences supported in a single packet.\",\"fields\":[{\"name\":\"_\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"optional\":true,\"packFormat\":\"u8\"}],\"tags\":[]},{\"name\":\"Water level\",\"status\":\"rc\",\"shortId\":\"waterlevel\",\"camelName\":\"waterLevel\",\"shortName\":\"waterLevel\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that measures liquid/water level.\"},\"classIdentifier\":343630573,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Resistive\":1,\"ContactPhotoElectric\":2,\"NonContactPhotoElectric\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"level\",\"identifier\":257,\"description\":\"The reported water level.\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u0.16\"},{\"kind\":\"ro\",\"name\":\"level_error\",\"identifier\":262,\"description\":\"The error rage on the current reading\",\"fields\":[{\"name\":\"_\",\"unit\":\"/\",\"shift\":16,\"type\":\"u0.16\",\"storage\":2}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u0.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of physical sensor.\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"}],\"tags\":[\"8bit\"]},{\"name\":\"Weight Scale\",\"status\":\"rc\",\"shortId\":\"weightscale\",\"camelName\":\"weightScale\",\"shortName\":\"weightScale\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A weight measuring sensor.\"},\"classIdentifier\":525160512,\"enums\":{\"Variant\":{\"name\":\"Variant\",\"storage\":1,\"members\":{\"Body\":1,\"Food\":2,\"Jewelry\":3}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"weight\",\"identifier\":257,\"description\":\"The reported weight.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"identifierName\":\"reading\",\"packFormat\":\"u16.16\"},{\"kind\":\"ro\",\"name\":\"weight_error\",\"identifier\":262,\"description\":\"The estimate error on the reported reading.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u16.16\"},{\"kind\":\"rw\",\"name\":\"zero_offset\",\"identifier\":128,\"description\":\"Calibrated zero offset error on the scale, i.e. the measured weight when nothing is on the scale.\\nYou do not need to subtract that from the reading, it has already been done.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"rw\",\"name\":\"gain\",\"identifier\":129,\"description\":\"Calibrated gain on the weight scale error.\",\"fields\":[{\"name\":\"_\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"max_weight\",\"identifier\":261,\"description\":\"Maximum supported weight on the scale.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"identifierName\":\"max_reading\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"min_weight\",\"identifier\":260,\"description\":\"Minimum recommend weight on the scale.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"identifierName\":\"min_reading\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"weight_resolution\",\"identifier\":264,\"description\":\"Smallest, yet distinguishable change in reading.\",\"fields\":[{\"name\":\"_\",\"unit\":\"kg\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"identifierName\":\"reading_resolution\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"variant\",\"identifier\":263,\"description\":\"The type of physical scale\",\"fields\":[{\"name\":\"_\",\"type\":\"Variant\",\"storage\":1}],\"optional\":true,\"identifierName\":\"variant\",\"packFormat\":\"u8\"},{\"kind\":\"command\",\"name\":\"calibrate_zero_offset\",\"identifier\":128,\"description\":\"Call this command when there is nothing on the scale. If supported, the module should save the calibration data.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"calibrate_gain\",\"identifier\":129,\"description\":\"Call this command with the weight of the thing on the scale.\",\"fields\":[{\"name\":\"weight\",\"unit\":\"g\",\"shift\":10,\"type\":\"u22.10\",\"storage\":4}],\"packFormat\":\"u22.10\"}],\"tags\":[\"8bit\"]},{\"name\":\"WIFI\",\"status\":\"rc\",\"shortId\":\"wifi\",\"camelName\":\"wifi\",\"shortName\":\"wifi\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Discovery and connection to WiFi networks. Separate TCP service can be used for data transfer.\",\"long\":\"## Connection\\n\\nThe device controlled by this service is meant to connect automatically, once configured.\\nTo that end, it keeps a list of known WiFi networks, with priorities and passwords.\\nIt will connect to the available network with numerically highest priority,\\nbreaking ties in priority by signal strength (typically all known networks have priority of `0`).\\nIf the connection fails (due to wrong password, radio failure, or other problem)\\nan `connection_failed` event is emitted, and the device will try to connect to the next eligible network.\\nWhen networks are exhausted, the scan is performed again and the connection process restarts.\\n\\nUpdating networks (setting password, priorties, forgetting) does not trigger an automatic reconnect.\\n\\n## Captive portals\\n\\nIf the Wifi is not able to join an AP because it needs to receive a password, it may decide to enter a mode\\nwhere it waits for user input. Typical example of this mode would be a captive portal or waiting for a BLE interaction.\\nIn that situation, the `status_code` should set to `WaitingForInput`.\"},\"classIdentifier\":413852154,\"enums\":{\"APFlags\":{\"name\":\"APFlags\",\"storage\":4,\"isFlags\":true,\"members\":{\"HasPassword\":1,\"WPS\":2,\"HasSecondaryChannelAbove\":4,\"HasSecondaryChannelBelow\":8,\"IEEE_802_11B\":256,\"IEEE_802_11A\":512,\"IEEE_802_11G\":1024,\"IEEE_802_11N\":2048,\"IEEE_802_11AC\":4096,\"IEEE_802_11AX\":8192,\"IEEE_802_LongRange\":32768}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"command\",\"name\":\"last_scan_results\",\"identifier\":128,\"description\":\"Return list of WiFi network from the last scan.\\nScans are performed periodically while not connected (in particular, on startup and after current connection drops),\\nas well as upon `reconnect` and `scan` commands.\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"last_scan_results\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"results\",\"identifier\":0,\"description\":\"Return list of WiFi network from the last scan.\\nScans are performed periodically while not connected (in particular, on startup and after current connection drops),\\nas well as upon `reconnect` and `scan` commands.\",\"fields\":[{\"name\":\"flags\",\"type\":\"APFlags\",\"storage\":4},{\"name\":\"reserved\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true},{\"name\":\"rssi\",\"unit\":\"dB\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true,\"typicalMin\":-100,\"typicalMax\":-20},{\"name\":\"channel\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true,\"typicalMin\":1,\"typicalMax\":13},{\"name\":\"bssid\",\"type\":\"u8[6]\",\"storage\":6},{\"name\":\"ssid\",\"type\":\"string\",\"storage\":33,\"maxBytes\":33}],\"pipeType\":\"last_scan_results\",\"packFormat\":\"u32 u32 i8 u8 b[6] s[33]\"},{\"kind\":\"command\",\"name\":\"add_network\",\"identifier\":129,\"description\":\"Automatically connect to named network if available. Also set password if network is not open.\",\"fields\":[{\"name\":\"ssid\",\"type\":\"string0\",\"storage\":0},{\"name\":\"password\",\"type\":\"string0\",\"storage\":0,\"isOptional\":true}],\"packFormat\":\"z z\"},{\"kind\":\"command\",\"name\":\"reconnect\",\"identifier\":130,\"description\":\"Enable the WiFi (if disabled), initiate a scan, wait for results, disconnect from current WiFi network if any,\\nand then reconnect (using regular algorithm, see `set_network_priority`).\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"forget_network\",\"identifier\":131,\"description\":\"Prevent from automatically connecting to named network in future.\\nForgetting a network resets its priority to `0`.\",\"fields\":[{\"name\":\"ssid\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"forget_all_networks\",\"identifier\":132,\"description\":\"Clear the list of known networks.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"set_network_priority\",\"identifier\":133,\"description\":\"Set connection priority for a network.\\nBy default, all known networks have priority of `0`.\",\"fields\":[{\"name\":\"priority\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true},{\"name\":\"ssid\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"i16 s\"},{\"kind\":\"command\",\"name\":\"scan\",\"identifier\":134,\"description\":\"Initiate search for WiFi networks. Generates `scan_complete` event.\",\"fields\":[]},{\"kind\":\"command\",\"name\":\"list_known_networks\",\"identifier\":135,\"description\":\"Return list of known WiFi networks.\\n`flags` is currently always 0.\",\"fields\":[{\"name\":\"results\",\"type\":\"pipe\",\"storage\":12}],\"pipeType\":\"list_known_networks\",\"packFormat\":\"b[12]\"},{\"kind\":\"pipe_report\",\"name\":\"network_results\",\"identifier\":0,\"description\":\"Return list of known WiFi networks.\\n`flags` is currently always 0.\",\"fields\":[{\"name\":\"priority\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true},{\"name\":\"flags\",\"type\":\"i16\",\"storage\":-2,\"isSimpleType\":true},{\"name\":\"ssid\",\"type\":\"string\",\"storage\":0}],\"pipeType\":\"list_known_networks\",\"packFormat\":\"i16 i16 s\"},{\"kind\":\"ro\",\"name\":\"rssi\",\"identifier\":257,\"description\":\"Current signal strength. Returns -128 when not connected.\",\"fields\":[{\"name\":\"_\",\"unit\":\"dB\",\"type\":\"i8\",\"storage\":-1,\"isSimpleType\":true,\"typicalMin\":-128,\"typicalMax\":-20}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":15000,\"packFormat\":\"i8\"},{\"kind\":\"rw\",\"name\":\"enabled\",\"identifier\":1,\"description\":\"Determines whether the WiFi radio is enabled. It starts enabled upon reset.\",\"fields\":[{\"name\":\"_\",\"type\":\"bool\",\"storage\":1}],\"identifierName\":\"intensity\",\"packFormat\":\"u8\"},{\"kind\":\"ro\",\"name\":\"ip_address\",\"identifier\":385,\"description\":\"0, 4 or 16 byte buffer with the IPv4 or IPv6 address assigned to device if any.\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":16,\"isSimpleType\":true,\"maxBytes\":16}],\"packFormat\":\"b[16]\"},{\"kind\":\"const\",\"name\":\"eui_48\",\"identifier\":386,\"description\":\"The 6-byte MAC address of the device. If a device does MAC address randomization it will have to \\\"restart\\\".\",\"fields\":[{\"name\":\"_\",\"type\":\"bytes\",\"storage\":6,\"isSimpleType\":true,\"maxBytes\":6}],\"packFormat\":\"b[6]\"},{\"kind\":\"ro\",\"name\":\"ssid\",\"identifier\":387,\"description\":\"SSID of the access-point to which device is currently connected.\\nEmpty string if not connected.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":32,\"maxBytes\":32}],\"packFormat\":\"s[32]\"},{\"kind\":\"event\",\"name\":\"got_ip\",\"identifier\":1,\"description\":\"Emitted upon successful join and IP address assignment.\",\"fields\":[],\"identifierName\":\"active\"},{\"kind\":\"event\",\"name\":\"lost_ip\",\"identifier\":2,\"description\":\"Emitted when disconnected from network.\",\"fields\":[],\"identifierName\":\"inactive\"},{\"kind\":\"event\",\"name\":\"scan_complete\",\"identifier\":128,\"description\":\"A WiFi network scan has completed. Results can be read with the `last_scan_results` command.\\nThe event indicates how many networks where found, and how many are considered\\nas candidates for connection.\",\"fields\":[{\"name\":\"num_networks\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"num_known_networks\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"packFormat\":\"u16 u16\"},{\"kind\":\"event\",\"name\":\"networks_changed\",\"identifier\":129,\"description\":\"Emitted whenever the list of known networks is updated.\",\"fields\":[]},{\"kind\":\"event\",\"name\":\"connection_failed\",\"identifier\":130,\"description\":\"Emitted when when a network was detected in scan, the device tried to connect to it\\nand failed.\\nThis may be because of wrong password or other random failure.\",\"fields\":[{\"name\":\"ssid\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"}],\"tags\":[],\"group\":\"Iot\"},{\"name\":\"Wind direction\",\"status\":\"rc\",\"shortId\":\"winddirection\",\"camelName\":\"windDirection\",\"shortName\":\"windDirection\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that measures wind direction.\"},\"classIdentifier\":409725227,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"wind_direction\",\"identifier\":257,\"description\":\"The direction of the wind.\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true,\"absoluteMin\":0,\"absoluteMax\":359}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":1000,\"packFormat\":\"u16\"},{\"kind\":\"ro\",\"name\":\"wind_direction_error\",\"identifier\":262,\"description\":\"Error on the wind direction reading\",\"fields\":[{\"name\":\"_\",\"unit\":\"\u00B0\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u16\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"Wind speed\",\"status\":\"rc\",\"shortId\":\"windspeed\",\"camelName\":\"windSpeed\",\"shortName\":\"windSpeed\",\"extends\":[\"_base\",\"_sensor\"],\"notes\":{\"short\":\"A sensor that measures wind speed.\"},\"classIdentifier\":458824639,\"enums\":{},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"streaming_samples\",\"identifier\":3,\"description\":\"Asks device to stream a given number of samples\\n(clients will typically write `255` to this register every second or so, while streaming is required).\",\"fields\":[{\"name\":\"_\",\"unit\":\"#\",\"type\":\"u8\",\"storage\":1,\"isSimpleType\":true}],\"internal\":true,\"identifierName\":\"streaming_samples\",\"packFormat\":\"u8\",\"derived\":\"_sensor\"},{\"kind\":\"rw\",\"name\":\"streaming_interval\",\"identifier\":4,\"description\":\"Period between packets of data when streaming in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true,\"defaultValue\":100,\"typicalMin\":1,\"typicalMax\":60000}],\"identifierName\":\"streaming_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"const\",\"name\":\"streaming_preferred_interval\",\"identifier\":258,\"description\":\"Preferred default streaming interval for sensor in milliseconds.\",\"fields\":[{\"name\":\"_\",\"unit\":\"ms\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"internal\":true,\"optional\":true,\"identifierName\":\"streaming_preferred_interval\",\"packFormat\":\"u32\",\"derived\":\"_sensor\"},{\"kind\":\"ro\",\"name\":\"wind_speed\",\"identifier\":257,\"description\":\"The velocity of the wind.\",\"fields\":[{\"name\":\"_\",\"unit\":\"m/s\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"identifierName\":\"reading\",\"preferredInterval\":60000,\"packFormat\":\"u16.16\"},{\"kind\":\"ro\",\"name\":\"wind_speed_error\",\"identifier\":262,\"description\":\"Error on the reading\",\"fields\":[{\"name\":\"_\",\"unit\":\"m/s\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"volatile\":true,\"optional\":true,\"identifierName\":\"reading_error\",\"packFormat\":\"u16.16\"},{\"kind\":\"const\",\"name\":\"max_wind_speed\",\"identifier\":261,\"description\":\"Maximum speed that can be measured by the sensor.\",\"fields\":[{\"name\":\"_\",\"unit\":\"m/s\",\"shift\":16,\"type\":\"u16.16\",\"storage\":4}],\"optional\":true,\"identifierName\":\"max_reading\",\"packFormat\":\"u16.16\"}],\"tags\":[\"8bit\"],\"group\":\"Environment\"},{\"name\":\"WSSK\",\"status\":\"experimental\",\"shortId\":\"wssk\",\"camelName\":\"wssk\",\"shortName\":\"wssk\",\"extends\":[\"_base\"],\"notes\":{\"short\":\"Defines a binary protocol for IoT devices to talk to DeviceScript gateway over encrypted websockets.\\nThis is not used as a regular Jacdac service.\"},\"classIdentifier\":330775038,\"enums\":{\"StreamingType\":{\"name\":\"StreamingType\",\"storage\":2,\"members\":{\"Jacdac\":1,\"Dmesg\":2,\"Exceptions\":256,\"TemporaryMask\":255,\"PermamentMask\":65280,\"DefaultMask\":256}},\"DataType\":{\"name\":\"DataType\",\"storage\":1,\"members\":{\"Binary\":1,\"JSON\":2}}},\"constants\":{},\"packets\":[{\"kind\":\"report\",\"name\":\"command_not_implemented\",\"identifier\":3,\"description\":\"This report may be emitted by a server in response to a command (action or register operation)\\nthat it does not understand.\\nThe `service_command` and `packet_crc` fields are copied from the command packet that was unhandled.\\nNote that it's possible to get an ACK, followed by such an error report.\",\"fields\":[{\"name\":\"service_command\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"packet_crc\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"identifierName\":\"command_not_implemented\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"const\",\"name\":\"instance_name\",\"identifier\":265,\"description\":\"A friendly name that describes the role of this service instance in the device.\\nIt often corresponds to what's printed on the device:\\nfor example, `A` for button A, or `S0` for servo channel 0.\\nWords like `left` should be avoided because of localization issues (unless they are printed on the device).\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"instance_name\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"ro\",\"name\":\"status_code\",\"identifier\":259,\"description\":\"Reports the current state or error status of the device. ``code`` is a standardized value from \\nthe Jacdac status/error codes. ``vendor_code`` is any vendor specific error code describing the device\\nstate. This report is typically not queried, when a device has an error, it will typically\\nadd this report in frame along with the announce packet. If a service implements this register,\\nit should also support the ``status_code_changed`` event defined below.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"rw\",\"name\":\"client_variant\",\"identifier\":9,\"description\":\"An optional register in the format of a URL query string where the client can provide hints how\\nthe device twin should be rendered. If the register is not implemented, the client library can simulate the register client side.\",\"fields\":[{\"name\":\"_\",\"type\":\"string\",\"storage\":0}],\"optional\":true,\"identifierName\":\"client_variant\",\"packFormat\":\"s\",\"derived\":\"_base\"},{\"kind\":\"event\",\"name\":\"status_code_changed\",\"identifier\":4,\"description\":\"Notifies that the status code of the service changed.\",\"fields\":[{\"name\":\"code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true},{\"name\":\"vendor_code\",\"type\":\"u16\",\"storage\":2,\"isSimpleType\":true}],\"optional\":true,\"identifierName\":\"status_code_changed\",\"packFormat\":\"u16 u16\",\"derived\":\"_base\"},{\"kind\":\"report\",\"name\":\"error\",\"identifier\":255,\"description\":\"Issued when a command fails.\",\"fields\":[{\"name\":\"message\",\"type\":\"string\",\"storage\":0}],\"packFormat\":\"s\"},{\"kind\":\"command\",\"name\":\"set_streaming\",\"identifier\":144,\"description\":\"Enable/disable forwarding of all Jacdac frames, exception reporting, and `dmesg` streaming.\",\"fields\":[{\"name\":\"status\",\"type\":\"StreamingType\",\"storage\":2}],\"packFormat\":\"u16\"},{\"kind\":\"command\",\"name\":\"ping_device\",\"identifier\":145,\"description\":\"Send from gateway when it wants to see if the device is alive.\\nThe device currently only support 0-length payload.\",\"fields\":[{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"hasReport\":true,\"packFormat\":\"b\"},{\"kind\":\"report\",\"name\":\"ping_device\",\"identifier\":145,\"description\":\"Send from gateway when it wants to see if the device is alive.\\nThe device currently only support 0-length payload.\",\"fields\":[{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"b\"},{\"kind\":\"command\",\"name\":\"ping_cloud\",\"identifier\":146,\"description\":\"Send from device to gateway to test connection.\",\"fields\":[{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"hasReport\":true,\"packFormat\":\"b\"},{\"kind\":\"report\",\"name\":\"ping_cloud\",\"identifier\":146,\"description\":\"Send from device to gateway to test connection.\",\"fields\":[{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"b\"},{\"kind\":\"command\",\"name\":\"get_hash\",\"identifier\":147,\"description\":\"Get SHA256 of the currently deployed program.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"get_hash\",\"identifier\":147,\"description\":\"Get SHA256 of the currently deployed program.\",\"fields\":[{\"name\":\"sha256\",\"type\":\"u8[32]\",\"storage\":32}],\"secondary\":true,\"packFormat\":\"b[32]\"},{\"kind\":\"command\",\"name\":\"deploy_start\",\"identifier\":148,\"description\":\"Start deployment of a new program.\",\"fields\":[{\"name\":\"size\",\"unit\":\"B\",\"type\":\"u32\",\"storage\":4,\"isSimpleType\":true}],\"hasReport\":true,\"packFormat\":\"u32\"},{\"kind\":\"report\",\"name\":\"deploy_start\",\"identifier\":148,\"description\":\"Start deployment of a new program.\",\"fields\":[],\"secondary\":true},{\"kind\":\"command\",\"name\":\"deploy_write\",\"identifier\":149,\"description\":\"Payload length must be multiple of 32 bytes.\",\"fields\":[{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"hasReport\":true,\"packFormat\":\"b\"},{\"kind\":\"report\",\"name\":\"deploy_write\",\"identifier\":149,\"description\":\"Payload length must be multiple of 32 bytes.\",\"fields\":[],\"secondary\":true},{\"kind\":\"command\",\"name\":\"deploy_finish\",\"identifier\":150,\"description\":\"Finish deployment.\",\"fields\":[],\"hasReport\":true},{\"kind\":\"report\",\"name\":\"deploy_finish\",\"identifier\":150,\"description\":\"Finish deployment.\",\"fields\":[],\"secondary\":true},{\"kind\":\"command\",\"name\":\"c2d\",\"identifier\":151,\"description\":\"Upload a labelled tuple of values to the cloud.\\nThe tuple will be automatically tagged with timestamp and originating device.\",\"fields\":[{\"name\":\"datatype\",\"type\":\"DataType\",\"storage\":1},{\"name\":\"topic\",\"type\":\"string0\",\"storage\":0},{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"u8 z b\"},{\"kind\":\"report\",\"name\":\"d2c\",\"identifier\":152,\"description\":\"Upload a binary message to the cloud.\",\"fields\":[{\"name\":\"datatype\",\"type\":\"DataType\",\"storage\":1},{\"name\":\"topic\",\"type\":\"string0\",\"storage\":0},{\"name\":\"payload\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"u8 z b\"},{\"kind\":\"command\",\"name\":\"jacdac_packet\",\"identifier\":153,\"description\":\"Sent both ways.\",\"fields\":[{\"name\":\"frame\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"hasReport\":true,\"packFormat\":\"b\"},{\"kind\":\"report\",\"name\":\"jacdac_packet\",\"identifier\":153,\"description\":\"Sent both ways.\",\"fields\":[{\"name\":\"frame\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"secondary\":true,\"packFormat\":\"b\"},{\"kind\":\"report\",\"name\":\"dmesg\",\"identifier\":154,\"description\":\"The `logs` field is string in UTF-8 encoding, however it can be split in the middle of UTF-8 code point.\\nControlled via `dmesg_en`.\",\"fields\":[{\"name\":\"logs\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"},{\"kind\":\"report\",\"name\":\"exception_report\",\"identifier\":155,\"description\":\"The format is the same as `dmesg` but this is sent on exceptions only and is controlled separately via `exception_en`.\",\"fields\":[{\"name\":\"logs\",\"type\":\"bytes\",\"storage\":0,\"isSimpleType\":true}],\"packFormat\":\"b\"}],\"tags\":[\"infrastructure\",\"devicescript\"],\"group\":\"Iot\"}]", "// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../../jacdac-spec/spectool/jdspec.d.ts\" />\n\nimport { NumberFormat } from \"./buffer\"\nimport serviceSpecificationData from \"../../jacdac-spec/dist/services.json\"\nimport { bufferEq, fromHex, toggleBit, toHex } from \"./utils\"\nimport {\n    SystemEvent,\n    SystemReg,\n    SensorReg,\n    SRV_CONTROL,\n    SRV_ROLE_MANAGER,\n    SRV_SETTINGS,\n    SRV_BOOTLOADER,\n    SRV_LOGGER,\n    SRV_INFRASTRUCTURE,\n    SRV_PROTO_TEST,\n    SRV_PROXY,\n    SRV_UNIQUE_BRAIN,\n    SRV_DASHBOARD,\n    SRV_BRIDGE,\n    SRV_DEVICE_SCRIPT_CONDITION,\n    SRV_DEVICE_SCRIPT_MANAGER,\n    SRV_DEVS_DBG,\n} from \"./constants\"\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet _serviceSpecifications: jdspec.ServiceSpec[] =\n    serviceSpecificationData as any\nlet _serviceSpecificationMap: Record<number, jdspec.ServiceSpec> = undefined\n\n/**\n * Override built-in service specifications\n * @param specs * @category Specification\n */\nexport function loadServiceSpecifications(\n    specifications: jdspec.ServiceSpec[],\n): {\n    added: jdspec.ServiceSpec[]\n    errors: { message: string; spec: jdspec.ServiceSpec }[]\n    changed: boolean\n} {\n    const previous = _serviceSpecifications\n\n    // combine builtin specs with new specs\n    const builtins = (serviceSpecificationData ||\n        []) as any as jdspec.ServiceSpec[]\n    const specs = builtins.slice(0)\n    const added: jdspec.ServiceSpec[] = []\n    const errors: { message: string; spec: jdspec.ServiceSpec }[] = []\n\n    if (specifications?.length) {\n        const serviceClasses = new Set<number>(\n            specs.map(s => s.classIdentifier),\n        )\n        const shortIds = new Set<string>(specs.map(s => s.shortId))\n        for (const spec of specifications) {\n            if (serviceClasses.has(spec.classIdentifier)) {\n                const existingSpec = specs.find(\n                    s => s.classIdentifier === spec.classIdentifier,\n                )\n                if (JSON.stringify(existingSpec) === JSON.stringify(spec))\n                    continue // inserting a duplicate, ignore\n                errors.push({\n                    message: `classIdentifier 0x${spec.classIdentifier.toString(\n                        16,\n                    )} already in use`,\n                    spec,\n                })\n                continue\n            }\n            if (shortIds.has(spec.shortId)) {\n                errors.push({\n                    message: \"shortId already in use\",\n                    spec,\n                })\n                continue\n            }\n\n            specs.push(spec)\n            added.push(spec)\n            serviceClasses.add(spec.classIdentifier)\n            shortIds.add(spec.shortId)\n        }\n    }\n\n    const changed = JSON.stringify(previous) !== JSON.stringify(specs)\n    if (changed) {\n        _serviceSpecifications = specs\n        _serviceSpecificationMap = undefined\n    }\n    return { added, errors, changed }\n}\n\n/**\n * Returns a map from service short ids to service specifications\n * @category Specification\n */\nexport function serviceMap(): Record<string, jdspec.ServiceSpec> {\n    const m: Record<string, jdspec.ServiceSpec> = {}\n    _serviceSpecifications.forEach(spec => (m[spec.shortId] = spec))\n    return m\n}\n\n/**\n * Returns the list of service specifications\n * @category Specification\n */\nexport function serviceSpecifications() {\n    return _serviceSpecifications.slice(0)\n}\n\n/**\n * Checks if classIdentifier is compatible with requiredClassIdentifier\n * @category Specification\n */\nexport function isInstanceOf(\n    classIdentifier: number,\n    requiredClassIdentifier: number,\n): boolean {\n    // garbage data\n    if (isNaN(classIdentifier)) return false\n\n    // direct hit\n    if (classIdentifier === requiredClassIdentifier) return true\n\n    // lookup inheritance chain\n    const classSpec = serviceSpecificationFromClassIdentifier(classIdentifier)\n    return !!classSpec?.extends?.some(extend => {\n        const extendSpec = serviceSpecificationFromName(extend)\n        return (\n            !!extendSpec &&\n            isInstanceOf(extendSpec.classIdentifier, requiredClassIdentifier)\n        )\n    })\n}\n\n/**\n * Checks if the service supports the Jacdac infrastructure\n * @param spec\n * @returns\n * @category Specification\n */\nexport function isInfrastructure(spec: jdspec.ServiceSpec) {\n    return (\n        spec &&\n        ([\n            SRV_CONTROL,\n            SRV_ROLE_MANAGER,\n            SRV_LOGGER,\n            SRV_SETTINGS,\n            SRV_BOOTLOADER,\n            SRV_PROTO_TEST,\n            SRV_INFRASTRUCTURE,\n            SRV_PROXY,\n            SRV_UNIQUE_BRAIN,\n            SRV_DASHBOARD,\n            SRV_BRIDGE,\n            SRV_DEVICE_SCRIPT_CONDITION,\n            SRV_DEVICE_SCRIPT_MANAGER,\n            SRV_DEVS_DBG,\n        ].indexOf(spec.classIdentifier) > -1 ||\n            spec.shortId[0] === \"_\")\n    )\n}\n\n/**\n * Looks up a service specification by name\n * @param shortId\n * @category Specification\n */\nexport function serviceSpecificationFromName(\n    shortId: string,\n): jdspec.ServiceSpec {\n    if (!shortId) return undefined\n    return _serviceSpecifications.find(s => s.shortId === shortId)\n}\n\n/**\n * Looks up a service specification by class\n * @param classIdentifier\n * @category Specification\n */\nexport function serviceSpecificationFromClassIdentifier(\n    classIdentifier: number,\n): jdspec.ServiceSpec {\n    if (isNaN(classIdentifier)) return undefined\n    // try lookup cache\n    let srv = _serviceSpecificationMap?.[classIdentifier]\n    if (srv) return srv\n\n    // resolve\n    srv = _serviceSpecifications.find(\n        s => s.classIdentifier === classIdentifier,\n    )\n    if (srv) {\n        if (!_serviceSpecificationMap) _serviceSpecificationMap = {}\n        _serviceSpecificationMap[classIdentifier] = srv\n    }\n    return srv\n}\n\n/**\n * Indicates if the specified service is a sensor\n * @param spec\n * @returns\n * @category Specification\n */\nexport function isSensor(spec: jdspec.ServiceSpec): boolean {\n    return (\n        spec &&\n        spec.packets.some(pkt => isReading(pkt)) &&\n        spec.packets.some(pkt => pkt.identifier == SensorReg.StreamingSamples)\n    )\n}\n\n/**\n * Indicates if the specified service is an actuator\n * @param spec\n * @returns\n * @category Specification\n */\nexport function isActuator(spec: jdspec.ServiceSpec): boolean {\n    return (\n        spec &&\n        spec.packets.some(pkt => pkt.identifier === SystemReg.Value) &&\n        spec.packets.some(pkt => pkt.identifier === SystemReg.Intensity)\n    )\n}\n\n/**\n * Indicates if the packet information is a register\n * @param spec\n * @returns\n * @category Specification\n */\nexport function isRegister(pkt: jdspec.PacketInfo) {\n    return pkt && (pkt.kind == \"const\" || pkt.kind == \"ro\" || pkt.kind == \"rw\")\n}\n\n/**\n * Indicates if the packet information is a ``reading`` register\n * @param spec\n * @returns\n * @category Specification\n */\nexport function isReading(pkt: jdspec.PacketInfo) {\n    return pkt && pkt.kind == \"ro\" && pkt.identifier == SystemReg.Reading\n}\n\nconst ignoredRegister = [\n    SystemReg.StatusCode,\n    SystemReg.InstanceName,\n    SystemReg.StreamingInterval,\n    SystemReg.StreamingPreferredInterval,\n    SystemReg.StreamingSamples,\n    SystemReg.ReadingError,\n    SystemReg.ReadingResolution,\n    SystemReg.MinReading,\n    SystemReg.MaxReading,\n    SystemReg.MinValue,\n    SystemReg.MaxValue,\n    SystemReg.MaxPower,\n]\n/**\n * Indicates if the register is usable from a high-level programming environment.\n * @category Specification\n */\nexport function isHighLevelRegister(pkt: jdspec.PacketInfo) {\n    return (\n        isRegister(pkt) &&\n        !pkt.lowLevel &&\n        !pkt.internal &&\n        ignoredRegister.indexOf(pkt.identifier) < 0\n    )\n}\n\nconst ignoredEvents = [SystemEvent.StatusCodeChanged]\n/**\n * Indicates if the event is usable from a high-level programming environment.\n * @category Specification\n */\nexport function isHighLevelEvent(pkt: jdspec.PacketInfo) {\n    return (\n        isEvent(pkt) &&\n        !pkt.lowLevel &&\n        !pkt.internal &&\n        ignoredEvents.indexOf(pkt.identifier) < 0\n    )\n}\n\n/**\n * Indicate if the register code is an auxilliary register to support streaming.\n * @param code\n * @returns\n * @category Specification\n */\nexport function isOptionalReadingRegisterCode(code: number) {\n    const regs = [\n        SystemReg.MinReading,\n        SystemReg.MaxReading,\n        SystemReg.ReadingError,\n        SystemReg.ReadingResolution,\n        SystemReg.StreamingPreferredInterval,\n\n        SystemReg.StreamingInterval,\n        SystemReg.StreamingSamples,\n    ]\n    return regs.indexOf(code) > -1\n}\n\n/**\n * Indicates if the packet info represents an ``intensity`` register\n * @category Specification\n */\nexport function isIntensity(pkt: jdspec.PacketInfo) {\n    return pkt && pkt.kind == \"rw\" && pkt.identifier == SystemReg.Intensity\n}\n\n/**\n * Indicates if the packet info represents a ``value`` register\n * @category Specification\n */\nexport function isValue(pkt: jdspec.PacketInfo) {\n    return pkt && pkt.kind == \"rw\" && pkt.identifier == SystemReg.Value\n}\n\n/**\n * Indicates if the packet info represents a ``intensity`` or a ``value`` register\n * @category Specification\n */\nexport function isValueOrIntensity(pkt: jdspec.PacketInfo) {\n    return (\n        pkt &&\n        pkt.kind == \"rw\" &&\n        (pkt.identifier == SystemReg.Value ||\n            pkt.identifier == SystemReg.Intensity)\n    )\n}\n\n/**\n * Indicates if the packet info represents an ``const`` register\n * @category Specification\n */\nexport function isConstRegister(pkt: jdspec.PacketInfo) {\n    return pkt?.kind === \"const\"\n}\n\n/**\n * Indicates if the packet info is not rw\n */\nexport function isReadOnlyRegister(pkt: jdspec.PacketInfo) {\n    return pkt?.kind !== \"rw\"\n}\n\n/**\n * Indicates if the packet info represents an ``event``\n * @category Specification\n */\nexport function isEvent(pkt: jdspec.PacketInfo) {\n    return pkt.kind == \"event\"\n}\n\n/**\n * Indicates if the packet info represents a ``command``\n * @category Specification\n */\nexport function isCommand(pkt: jdspec.PacketInfo) {\n    return pkt.kind == \"command\"\n}\n\n/**\n * Indicates if the packet info represents a ``pipe_report``\n * @category Specification\n */\nexport function isPipeReport(pkt: jdspec.PacketInfo) {\n    return pkt.kind == \"pipe_report\"\n}\n\n/**\n * Indicates if the `report` packet is the report specication of the `cmd` command.\n * @category Specification\n */\nexport function isReportOf(cmd: jdspec.PacketInfo, report: jdspec.PacketInfo) {\n    return (\n        report.secondary &&\n        report.kind == \"report\" &&\n        cmd.kind == \"command\" &&\n        cmd.name == report.name\n    )\n}\n\n/**\n * Indicates if the `report` packet is the *pipe* report specication of the `cmd` command.\n * @category Specification\n */\nexport function isPipeReportOf(\n    cmd: jdspec.PacketInfo,\n    pipeReport: jdspec.PacketInfo,\n) {\n    return (\n        pipeReport.kind == \"pipe_report\" &&\n        cmd.kind == \"command\" &&\n        cmd.pipeType &&\n        cmd.pipeType === pipeReport.pipeType\n    )\n}\n\n/**\n * @internal\n */\nexport function isIntegerType(tp: string) {\n    return /^[ui]\\d+(\\.|$)/.test(tp) || tp == \"pipe_port\" || tp == \"bool\"\n}\n\n/**\n * @internal\n */\nexport function numberFormatFromStorageType(tp: jdspec.StorageType) {\n    switch (tp) {\n        case -1:\n            return NumberFormat.Int8LE\n        case 1:\n            return NumberFormat.UInt8LE\n        case -2:\n            return NumberFormat.Int16LE\n        case 2:\n            return NumberFormat.UInt16LE\n        case -4:\n            return NumberFormat.Int32LE\n        case 4:\n            return NumberFormat.UInt32LE\n        case -8:\n            return NumberFormat.Int64LE\n        case 8:\n            return NumberFormat.UInt64LE\n        case 0:\n            return null\n        default:\n            return null\n    }\n}\n\n/**\n * @internal\n */\nexport function numberFormatToStorageType(nf: NumberFormat) {\n    switch (nf) {\n        case NumberFormat.Int8LE:\n            return -1\n        case NumberFormat.UInt8LE:\n            return 1\n        case NumberFormat.Int16LE:\n            return -2\n        case NumberFormat.UInt16LE:\n            return 2\n        case NumberFormat.Int32LE:\n            return -4\n        case NumberFormat.UInt32LE:\n            return 4\n        case NumberFormat.Int64LE:\n            return -8\n        case NumberFormat.UInt64LE:\n            return 8\n        default:\n            return null\n    }\n}\n\n/**\n * @internal\n */\nexport function scaleIntToFloat(v: number, info: jdspec.PacketMember) {\n    if (!info.shift) return v\n    if (info.shift < 0) return v * (1 << -info.shift)\n    else return v / (1 << info.shift)\n}\n\n/**\n * @internal\n */\nexport function scaleFloatToInt(v: number, info: jdspec.PacketMember) {\n    if (!info.shift) return v\n    if (info.shift < 0) return Math.round(v / (1 << -info.shift))\n    else return Math.round(v * (1 << info.shift))\n}\n\n/**\n * @internal\n */\nexport function storageTypeRange(tp: jdspec.StorageType): [number, number] {\n    if (tp == 0) throw new Error(\"no range for 0\")\n    if (tp < 0) {\n        const v = Math.pow(2, -tp * 8 - 1)\n        return [-v, v - 1]\n    } else {\n        const v = Math.pow(2, tp * 8)\n        return [0, v - 1]\n    }\n}\n\n/**\n * @internal\n */\nexport function clampToStorage(v: number, tp: jdspec.StorageType) {\n    if (tp == null) return v // no clamping for floats\n    const [min, max] = storageTypeRange(tp)\n    if (isNaN(v)) return 0\n    if (v < min) return min\n    if (v > max) return max\n    return v\n}\n\n/**\n * @internal\n */\nexport function memberValueToString(\n    value: any,\n    info: jdspec.PacketMember,\n): string {\n    if (value === undefined || value === null) return \"\"\n    switch (info.type) {\n        case \"bytes\":\n            return toHex(value)\n        case \"string\":\n            return value\n        default:\n            return \"\" + value\n    }\n}\n\n/**\n * @internal\n */\nexport function tryParseMemberValue(\n    text: string,\n    info: jdspec.PacketMember,\n): { value?: any; error?: string } {\n    if (!text) return {}\n\n    if (info.type === \"string\") return { value: text }\n    else if (info.type === \"pipe\") return {}\n    // not supported\n    else if (info.type === \"bytes\") {\n        try {\n            return { value: fromHex(text) }\n        } catch (e) {\n            return {\n                error: \"invalid hexadecimal format\",\n            }\n        }\n    } else {\n        const n = isIntegerType(info.type) ? parseInt(text) : parseFloat(text)\n        if (isNaN(n)) return { error: \"invalid format\" }\n        else return { value: n }\n    }\n}\n\n/**\n * Parses a device identifier into a buffer, returns undefined if invalid\n * @param id\n * @returns\n * @category Specification\n */\nexport function parseDeviceId(id: string): Uint8Array {\n    if (!id) return undefined\n    id = id.replace(/\\s/g, \"\")\n    if (id.length != 16 || !/^[a-f0-9]+$/i.test(id)) return undefined\n    return fromHex(id)\n}\n\nexport function parseDualDeviceId(id: string) {\n    const rid = parseDeviceId(id)\n    toggleBit(rid, 0)\n    return rid\n}\n\nexport function dualDeviceId(id: string): string {\n    return toHex(parseDualDeviceId(id))\n}\n\n/**\n * Check if the left device identifier is a bootloader dual of the right identifier\n * @param left\n * @param right\n * @returns\n */\nexport function isDualDeviceId(left: string, right: string) {\n    const lid = parseDeviceId(left)\n    const rid = parseDualDeviceId(right)\n    return bufferEq(lid, rid)\n}\n", "import {\n    getNumber,\n    NumberFormat,\n    setNumber,\n    sizeOfNumberFormat,\n} from \"./buffer\"\nimport { clampToStorage, numberFormatToStorageType } from \"./spec\"\nimport { bufferEq, bufferToString, stringToBuffer } from \"./utils\"\n\n/**\n * @category Data Packing\n */\nexport type PackedSimpleValue = number | boolean | string | Uint8Array\n\n/**\n * @category Data Packing\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PackedValues = any[]\n\n// ASCII codes of characters\nconst ch_b = 98\nconst ch_i = 105\nconst ch_r = 114\nconst ch_s = 115\nconst ch_u = 117\nconst ch_x = 120\nconst ch_z = 122\n//const ch_0 = 48\n//const ch_9 = 57\nconst ch_colon = 58\nconst ch_sq_open = 91\nconst ch_sq_close = 93\n\nfunction numberFormatOfType(tp: string): NumberFormat {\n    switch (tp) {\n        case \"u8\":\n            return NumberFormat.UInt8LE\n        case \"u16\":\n            return NumberFormat.UInt16LE\n        case \"u32\":\n            return NumberFormat.UInt32LE\n        case \"i8\":\n            return NumberFormat.Int8LE\n        case \"i16\":\n            return NumberFormat.Int16LE\n        case \"i32\":\n            return NumberFormat.Int32LE\n        case \"f32\":\n            return NumberFormat.Float32LE\n        case \"f64\":\n            return NumberFormat.Float64LE\n        case \"i64\":\n            return NumberFormat.Int64LE\n        case \"u64\":\n            return NumberFormat.UInt64LE\n        default:\n            return null\n    }\n}\n\nfunction bufferSlice(buf: Uint8Array, start: number, end: number) {\n    return buf.slice(start, end)\n}\n\nclass TokenParser {\n    c0: number\n    size: number\n    div: number\n    fp = 0\n    nfmt: NumberFormat\n    word: string\n    isArray: boolean\n\n    constructor(public fmt: string) {}\n\n    parse() {\n        this.div = 1\n        this.isArray = false\n\n        const fmt = this.fmt\n        while (this.fp < fmt.length) {\n            let endp = this.fp\n            while (endp < fmt.length && fmt.charCodeAt(endp) != 32) endp++\n            let word = fmt.slice(this.fp, endp)\n            this.fp = endp + 1\n            if (!word) continue\n\n            const dotIdx = word.indexOf(\".\")\n            let c0 = word.charCodeAt(0)\n            // \"u10.6\" -> \"u16\", div = 1 << 6\n            if ((c0 == ch_i || c0 == ch_u) && dotIdx >= 0) {\n                const sz0 = parseInt(word.slice(1, dotIdx))\n                const sz1 = parseInt(word.slice(dotIdx + 1))\n                word = word[0] + (sz0 + sz1)\n                this.div = 1 << sz1\n            }\n\n            const c1 = word.charCodeAt(1)\n            if (c1 == ch_sq_open) {\n                this.size = parseInt(word.slice(2))\n            } else {\n                this.size = -1\n            }\n\n            if (\n                word.charCodeAt(word.length - 1) == ch_sq_close &&\n                word.charCodeAt(word.length - 2) == ch_sq_open\n            ) {\n                word = word.slice(0, -2)\n                this.isArray = true\n            }\n\n            this.nfmt = numberFormatOfType(word)\n            this.word = word\n\n            if (this.nfmt == null) {\n                if (c0 == ch_r) {\n                    if (c1 != ch_colon) c0 = 0\n                } else if (c0 == ch_s || c0 == ch_b || c0 == ch_x) {\n                    if (word.length != 1 && this.size == -1) c0 = 0\n                } else if (c0 == ch_z) {\n                    if (word.length != 1) c0 = 0\n                } else {\n                    c0 = 0\n                }\n                if (c0 == 0) throw new Error(`invalid format: ${word}`)\n                this.c0 = c0\n            } else {\n                this.size = sizeOfNumberFormat(this.nfmt)\n                this.c0 = -1\n            }\n\n            return true\n        }\n        return false\n    }\n}\n\nfunction jdunpackCore(buf: Uint8Array, fmt: string, repeat: number) {\n    const repeatRes: any[][] = repeat ? [] : null\n    let res: any[] = []\n    let off = 0\n    let fp0 = 0\n    const parser = new TokenParser(fmt)\n    if (repeat && buf.length == 0) return []\n    while (parser.parse()) {\n        if (parser.isArray && !repeat) {\n            res.push(\n                jdunpackCore(\n                    bufferSlice(buf, off, buf.length),\n                    fmt.slice(fp0),\n                    1,\n                ),\n            )\n            return res\n        }\n\n        fp0 = parser.fp\n        let sz = parser.size\n        const c0 = parser.c0\n        if (c0 == ch_z) {\n            let endoff = off\n            while (endoff < buf.length && buf[endoff] != 0) endoff++\n            sz = endoff - off\n        } else if (sz < 0) {\n            sz = buf.length - off\n        }\n\n        if (parser.nfmt !== null) {\n            let v = getNumber(buf, parser.nfmt, off)\n            if (parser.div != 1) v /= parser.div\n            res.push(v)\n            off += parser.size\n        } else {\n            const subbuf = bufferSlice(buf, off, off + sz)\n            if (c0 == ch_z || c0 == ch_s) {\n                let zerop = 0\n                while (zerop < subbuf.length && subbuf[zerop] != 0) zerop++\n                res.push(bufferToString(bufferSlice(subbuf, 0, zerop)))\n            } else if (c0 == ch_b) {\n                res.push(subbuf)\n            } else if (c0 == ch_x) {\n                // skip padding\n            } else if (c0 == ch_r) {\n                res.push(jdunpackCore(subbuf, fmt.slice(fp0), 2))\n                break\n            } else {\n                throw new Error(`whoops`)\n            }\n            off += subbuf.length\n            if (c0 == ch_z) off++\n        }\n\n        if (repeat && parser.fp >= fmt.length) {\n            parser.fp = 0\n            if (repeat == 2) {\n                repeatRes.push(res)\n                res = []\n            }\n            if (off >= buf.length) break\n        }\n    }\n\n    if (repeat == 2) {\n        if (res.length) repeatRes.push(res)\n        return repeatRes\n    } else {\n        return res\n    }\n}\n\n/**\n Unpacks a byte buffer into structured data as specified in the format string.\n See jdpack for format string reference.\n @category Data Packing\n*/\nexport function jdunpack<T extends PackedValues>(\n    buf: Uint8Array,\n    fmt: string,\n): T {\n    if (!buf || !fmt) return undefined\n\n    // hot path for buffers\n    if (fmt === \"b\") return [buf.slice(0)] as T\n    // hot path\n    let nf = numberFormatOfType(fmt)\n    if (nf !== null) {\n        let sz = sizeOfNumberFormat(nf)\n        if (buf.length === 4 && nf === NumberFormat.UInt64LE) {\n            nf = NumberFormat.UInt32LE\n            sz = 4\n        }\n        if (buf.length < sz) {\n            throw new Error(\n                `size mistmatch, expected ${fmt} (${sz} bytes), got ${buf.length}`,\n            )\n        }\n        return [getNumber(buf, nf, 0)] as T\n    }\n    // slow path\n    return jdunpackCore(buf, fmt, 0) as T\n}\n\n// only works for LE types\nfunction clampWithNumberFormat(v: number, format: NumberFormat) {\n    if (format == NumberFormat.Float32LE || format == NumberFormat.Float64LE)\n        return v\n\n    if (isNaN(v)) return 0\n\n    if (format == NumberFormat.UInt32LE) {\n        if (v < 0) return 0\n        if (v > 0xffffffff) return 0xffffffff\n        return v >>> 0\n    }\n\n    if (v < 0) {\n        switch (format) {\n            case NumberFormat.UInt8LE:\n            case NumberFormat.UInt16LE:\n                return 0\n            case NumberFormat.Int8LE:\n                if (v <= -0x80) return -0x80\n                break\n            case NumberFormat.Int16LE:\n                if (v <= -0x8000) return -0x8000\n                break\n            case NumberFormat.Int32LE:\n                if (v <= -0x80000000) return -0x80000000\n                break\n        }\n    } else {\n        switch (format) {\n            case NumberFormat.UInt8LE:\n                if (v >= 0xff) return 0xff\n                break\n            case NumberFormat.UInt16LE:\n                if (v >= 0xffff) return 0xffff\n                break\n            case NumberFormat.Int8LE:\n                if (v >= 0x7f) return 0x7f\n                break\n            case NumberFormat.Int16LE:\n                if (v >= 0x7fff) return 0x7fff\n                break\n            case NumberFormat.Int32LE:\n                if (v >= 0x7fffffff) return 0x7fffffff\n                break\n        }\n    }\n\n    return v | 0\n}\n\nfunction jdpackCore(\n    trg: Uint8Array,\n    fmt: string,\n    data: PackedValues,\n    off: number,\n) {\n    //console.log({ fmt, data })\n    let idx = 0\n    const parser = new TokenParser(fmt)\n    while (parser.parse()) {\n        const c0 = parser.c0\n\n        if (c0 == ch_x) {\n            // skip padding\n            off += parser.size\n            continue\n        }\n\n        const dataItem = data[idx++]\n\n        if (c0 == ch_r && dataItem) {\n            const fmt0 = fmt.slice(parser.fp)\n            for (const velt of dataItem as any[][]) {\n                off = jdpackCore(trg, fmt0, velt, off)\n            }\n            break\n        }\n\n        // use temporary variable to avoid a Gatsby build bug\n        let arr: any[]\n        if (parser.isArray) arr = dataItem\n        else arr = [dataItem]\n\n        for (let v of arr) {\n            if (parser.nfmt !== null) {\n                if (typeof v != \"number\")\n                    throw new Error(`expecting number, got ` + typeof v)\n                if (trg) {\n                    v *= parser.div\n                    const st: jdspec.StorageType = numberFormatToStorageType(\n                        parser.nfmt,\n                    )\n                    if (parser.div == 1 && (st == 4 || st == -4))\n                        // no clamping\n                        v = 0 | Math.round(v)\n                    else if (st != null) v = clampToStorage(Math.round(v), st)\n                    setNumber(trg, parser.nfmt, off, v)\n                }\n                off += parser.size\n            } else {\n                let buf: Uint8Array\n                if (typeof v === \"string\") {\n                    if (c0 == ch_z) buf = stringToBuffer(v + \"\\u0000\")\n                    else if (c0 == ch_s) buf = stringToBuffer(v)\n                    else throw new Error(`unexpected string`)\n                } else if (v && typeof v === \"object\" && v.length != null) {\n                    // assume buffer\n                    if (c0 == ch_b) buf = v\n                    else throw new Error(`unexpected buffer`)\n                } else {\n                    throw new Error(`expecting string or buffer`)\n                }\n\n                let sz = parser.size\n                if (sz >= 0) {\n                    if (buf.length > sz) buf = bufferSlice(buf, 0, sz)\n                } else {\n                    sz = buf.length\n                }\n\n                if (trg) trg.set(buf, off)\n                off += sz\n            }\n        }\n    }\n\n    if (data.length > idx) throw new Error(`format '${fmt}' too short`)\n\n    return off\n}\n\n/**\n\n* Format strings are space-separated sequences of type descriptions.\n* All numbers are understood to be little endian.\n* The following type descriptions are supported:\n* \n* - `u8`, `u16`, `u32` - unsigned, 1, 2, and 4 bytes long respectively\n* - `i8`, `i16`, `i32` - similar, but signed\n* - `b` - buffer until the end of input (has to be last)\n* - `s` - similar, but utf-8 encoded string\n* - `z` - NUL-terminated utf-8 string\n* - `b[10]` - 10 byte buffer (10 is just an example, here and below)\n* - `s[10]` - 10 byte utf-8 string; trailing NUL bytes (if any) are removed\n* - `x[10]` - 10 bytes of padding\n* \n* There is one more token, `r:`. The type descriptions following it are repeated in order\n* until the input buffer is exhausted.\n* When unpacking, fields after `r:` are repeated as an array of tuples.\n* \n* In case there's only a single field repeating,\n* it's also possible to append `[]` to its type, to get an array of values.\n* \n* @category Data Packing\n*/\nexport function jdpack<T extends PackedValues>(fmt: string, data: T) {\n    if (!fmt || !data) return undefined\n\n    // hot path for buffers\n    if (fmt === \"b\") return (data[0] as Uint8Array)?.slice(0)\n\n    // hot path\n    const nf = numberFormatOfType(fmt)\n    if (nf !== null) {\n        const buf = new Uint8Array(sizeOfNumberFormat(nf))\n        const st: jdspec.StorageType = numberFormatToStorageType(nf)\n        let v = data[0]\n        if (st != null) {\n            // no clamping for U32, I32\n            if (st == 4 || st == -4) v = Math.round(v) | 0\n            else v = clampToStorage(Math.round(v), st)\n        }\n        setNumber(buf, nf, 0, v)\n        return buf\n    }\n\n    // slow path\n    const len = jdpackCore(null, fmt, data, 0)\n    const res = new Uint8Array(len)\n    jdpackCore(res, fmt, data, 0)\n    return res\n}\n\n/**\n * Checks if two packed values serialize to the same buffer\n * @param fmt packing format string\n * @param left left data\n * @param right right data\n * @returns true if both data serialize to the same buffer\n * @category Data Packing\n */\nexport function jdpackEqual<T extends PackedValues>(\n    fmt: string,\n    left: T,\n    right: T,\n) {\n    if (!left !== !right) return false\n    if (!left) return true\n\n    const leftBuffer = jdpack<T>(fmt, left)\n    const rightBuffer = jdpack<T>(fmt, right)\n    return bufferEq(leftBuffer, rightBuffer)\n}\n\n/**\n * Check if two packed values are the same\n * @param a\n * @param b\n * @returns\n */\nexport function packedValuesIsEqual(a: PackedValues, b: PackedValues): boolean {\n    if (a instanceof Uint8Array) {\n        return b instanceof Uint8Array && bufferEq(a, b)\n    } else if (Array.isArray(a)) {\n        const e =\n            Array.isArray(b) &&\n            a.length === b.length &&\n            a.every((v, i) => packedValuesIsEqual(v, b[i]))\n        return e\n    } else {\n        return Object.is(a, b)\n    }\n}\n", "import { Packet } from \"./packet\"\nimport { NumberFormat } from \"./buffer\"\nimport {\n    roundWithPrecision,\n    idiv,\n    fromHex,\n    hash,\n    fromUTF8,\n    uint8ArrayToString,\n    read16,\n    toHex,\n    toArray,\n    hexNum,\n    isSet,\n} from \"./utils\"\nimport {\n    isIntegerType,\n    numberFormatFromStorageType,\n    scaleIntToFloat,\n    isRegister,\n    serviceSpecificationFromName,\n    serviceSpecificationFromClassIdentifier,\n} from \"./spec\"\nimport {\n    CMD_SET_REG,\n    CMD_GET_REG,\n    CMD_REG_MASK,\n    PIPE_METADATA_MASK,\n    CMD_TOP_MASK,\n    PIPE_PORT_SHIFT,\n    JD_FRAME_FLAG_COMMAND,\n    JD_FRAME_FLAG_ACK_REQUESTED,\n    CMD_ADVERTISEMENT_DATA,\n    JD_SERVICE_INDEX_CTRL,\n} from \"./constants\"\nimport {\n    ControlReg,\n    DeviceScriptManagerReg,\n    GPIOReg,\n    SRV_DEVICE_SCRIPT_MANAGER,\n    SRV_GPIO,\n    SRV_WIFI,\n    SystemCmd,\n    SystemReg,\n    WifiReg,\n} from \"../../jacdac-spec/dist/specconstants\"\nimport { jdpack, jdunpack } from \"./pack\"\n\n/** @internal */\nexport enum RegisterType {\n    UInt, // default\n    UIntHex,\n    Int,\n    IntArray,\n    String,\n}\n\n/**\n * @internal\n */\nexport interface DecodedMember {\n    info: jdspec.PacketMember\n    value: any\n    numValue: number\n    scaledValue: number\n    humanValue: string\n    description: string\n    size: number\n}\n\n/**\n * @internal\n */\nexport interface DecodedPacket {\n    service: jdspec.ServiceSpec\n    info: jdspec.PacketInfo\n    decoded: DecodedMember[]\n    description: string\n    error?: string\n}\n\nexport function prettyUnit(u: jdspec.Unit | string): string {\n    switch (u) {\n        case \"us\":\n            return \"\u03BCs\"\n        case \"C\":\n        case \"Cel\":\n            return \"\u00B0C\"\n        case \"K\":\n            return \"\u00B0K\"\n        case \"/\":\n        case \"#\":\n            return \"\"\n        default:\n            return u\n    }\n}\n\nexport function prettyMemberUnit(\n    specification: jdspec.PacketMember,\n    showDataType?: boolean,\n) {\n    const parts: string[] = [\n        prettyUnit(specification.unit),\n        isSet(specification.typicalMin) &&\n            `[${specification.typicalMin}, ${specification.typicalMax}]`,\n        isSet(specification.absoluteMin) &&\n            `absolute [${specification.absoluteMin}, ${specification.absoluteMax}]`,\n    ].filter(f => isSet(f) && f)\n    if (showDataType) parts.unshift(specification.type)\n    const helperText = parts.join(\", \")\n    return helperText\n}\n\nexport function prettySize(b: number) {\n    b = b | 0\n    if (b === 0) return \"0kb\"\n    else if (b < 100) return b + \"b\"\n    else if (b < 1000) return roundWithPrecision(b / 1e3, 2) + \"kb\"\n    else if (b < 1000000) return roundWithPrecision(b / 1e3, 1) + \"kb\"\n    else return roundWithPrecision(b / 1e6, 1) + \"mb\"\n}\n\nexport function prettyDuration(ms: number, millis?: boolean) {\n    let s = ms / 1000\n    const precision = millis ? 3 : 0\n    if (s < 60) return `${roundWithPrecision(s, precision)}s`\n\n    let r = \"\"\n    const d = Math.floor(s / (24 * 3600))\n    if (d > 0) {\n        r += d + \":\"\n        s -= d * (24 * 3600)\n    }\n    const h = Math.floor(s / 3600)\n    if (h > 0) {\n        r += h + \":\"\n        s -= h * 3600\n    }\n    const m = Math.floor(s / 60)\n    if (d > 0 || h > 0 || m > 0) {\n        r += m + \":\"\n        s -= m * 60\n    }\n    r += roundWithPrecision(s, precision)\n    return r\n}\n\nexport function prettyMicroDuration(us: number) {\n    if (us < 1000) return `${us}${prettyUnit(\"us\")}`\n    else return prettyDuration(us / 1000)\n}\n\n// 2 letter + 2 digit ID; 1.8%/0.3%/0.07%/0.015% collision probability among 50/20/10/5 devices\nexport function shortDeviceId(devid: string) {\n    const h = hash(fromHex(devid), 30)\n    return (\n        String.fromCharCode(0x41 + (h % 26)) +\n        String.fromCharCode(0x41 + (idiv(h, 26) % 26)) +\n        String.fromCharCode(0x30 + (idiv(h, 26 * 26) % 10)) +\n        String.fromCharCode(0x30 + (idiv(h, 26 * 26 * 10) % 10))\n    )\n}\n\nexport function isDeviceId(devid: string) {\n    return devid && /^[a-f0-9]{16,16}$/i.test(devid)\n}\n\nfunction toIP(buffer: Uint8Array): string {\n    if (!buffer) return undefined\n    if (buffer.length === 4)\n        return `${buffer[0]}.${buffer[1]}.${buffer[2]}.${buffer[3]}`\n    else return toHex(buffer, \".\")\n}\n\nfunction toMAC(buffer: Uint8Array) {\n    const hex = toHex(buffer, \":\")\n    return hex\n}\n\nfunction toBits(buffer: Uint8Array) {\n    let bitString = \"\"\n    buffer.forEach(byte => {\n        for (let i = 7; i >= 0; i--) {\n            bitString += (byte >> i) & 1\n        }\n    })\n    return bitString\n}\n\nexport function prettyEnum(\n    enumInfo: jdspec.EnumInfo,\n    numValue: number,\n    separator = \" | \",\n) {\n    if (!enumInfo) return undefined\n\n    let humanValue = \"\"\n    if (enumInfo.isFlags) {\n        humanValue = \"\"\n        let curr = numValue\n        for (const key of Object.keys(enumInfo.members)) {\n            const val = enumInfo.members[key]\n            if ((curr & val) == val) {\n                if (humanValue) humanValue += separator\n                humanValue += key\n                curr &= ~val\n            }\n        }\n        if (curr) {\n            if (humanValue) humanValue += separator\n            humanValue += hexNum(curr)\n        }\n    } else {\n        humanValue = reverseLookup(enumInfo.members, numValue)\n    }\n    return humanValue\n}\n\nexport function decodeMember(\n    service: jdspec.ServiceSpec,\n    pktInfo: jdspec.PacketInfo,\n    member: jdspec.PacketMember,\n    pkt: Packet,\n    offset: number,\n): DecodedMember {\n    if (!member) return null\n\n    if (pkt.data.length <= offset) return null\n\n    let numValue: number = undefined\n    let scaledValue: number = undefined\n    let value = undefined\n    let humanValue: string = undefined\n    let size = Math.abs(member.storage)\n\n    const enumInfo = service?.enums[member.type]\n    const isInt = isIntegerType(member.type) || !!enumInfo\n\n    if (\n        service?.classIdentifier === SRV_WIFI &&\n        pktInfo.kind === \"ro\" &&\n        pktInfo.identifier === WifiReg.IpAddress &&\n        offset == 0\n    ) {\n        value = pkt.data\n        humanValue = toIP(pkt.data)\n    } else if (\n        service?.classIdentifier === SRV_GPIO &&\n        pktInfo.kind === \"ro\" &&\n        pktInfo.identifier === GPIOReg.State &&\n        offset == 0\n    ) {\n        value = pkt.data\n        humanValue = toBits(pkt.data)\n    } else if (\n        service?.classIdentifier === SRV_DEVICE_SCRIPT_MANAGER &&\n        pktInfo.kind === \"const\" &&\n        pktInfo.identifier === DeviceScriptManagerReg.RuntimeVersion &&\n        offset == 0\n    ) {\n        value = pkt.data\n        humanValue =\n            value?.length >= 2 ? `${value[2]}.${value[1]}.${value[0]}` : \"?\"\n    } else if (\n        service?.classIdentifier === SRV_WIFI &&\n        pktInfo.kind === \"const\" &&\n        pktInfo.identifier === WifiReg.Eui48 &&\n        offset == 0\n    ) {\n        value = pkt.data\n        humanValue = toMAC(pkt.data)\n    } else if (member.isFloat && (size == 4 || size == 8)) {\n        if (size == 4) numValue = pkt.getNumber(NumberFormat.Float32LE, offset)\n        else numValue = pkt.getNumber(NumberFormat.Float64LE, offset)\n        value = scaledValue = numValue\n\n        if (Math.abs(value) < 10) humanValue = value.toFixed(5)\n        else if (Math.abs(value) < 1000) humanValue = value.toFixed(3)\n        else if (Math.abs(value) < 100000) humanValue = value.toFixed(2)\n        else humanValue = \"\" + value\n        if (member.unit) humanValue += prettyUnit(member.unit)\n    } else if (!isInt) {\n        if (member.type == \"string0\") {\n            let ptr = offset\n            while (ptr < pkt.data.length) {\n                if (!pkt.data[ptr++]) break\n            }\n            size = ptr - offset\n        }\n        const buf = size\n            ? pkt.data.slice(offset, offset + size)\n            : pkt.data.slice(offset)\n        if (member.type == \"string\" || member.type == \"string0\") {\n            try {\n                value = fromUTF8(uint8ArrayToString(buf))\n            } catch {\n                // invalid UTF8\n                value = uint8ArrayToString(buf)\n            }\n            humanValue = JSON.stringify(value).replace(/\\\\u0000/g, \"\\\\0\")\n        } else if (member.type == \"pipe\") {\n            value = buf\n            const devid = toHex(buf.slice(0, 8))\n            const port = read16(buf, 8)\n            humanValue = \"pipe to \" + shortDeviceId(devid) + \" port:\" + port\n            // + \" [\" + toHex(buf.slice(10)) + \"]\"\n            if (pkt?.device?.bus) {\n                const trg = pkt.device.bus.device(devid, true)\n                if (trg)\n                    trg.port(port).pipeType =\n                        service?.shortId + \".\" + pktInfo.pipeType + \".report\"\n            }\n        } else {\n            value = buf\n            humanValue = hexDump(buf)\n        }\n        size = buf.length\n    } else {\n        const fmt = numberFormatFromStorageType(member.storage)\n        numValue = pkt.getNumber(fmt, offset)\n        value = scaledValue = scaleIntToFloat(numValue, member)\n        if (pkt.device && member.type == \"pipe_port\")\n            pkt.device.port(value).pipeType =\n                service?.shortId + \".\" + pktInfo.pipeType + \".command\"\n        if (enumInfo) {\n            if (enumInfo.isFlags) {\n                humanValue = \"\"\n                let curr = numValue\n                for (const key of Object.keys(enumInfo.members)) {\n                    const val = enumInfo.members[key]\n                    if ((curr & val) == val) {\n                        if (humanValue) humanValue += \" | \"\n                        humanValue += key\n                        curr &= ~val\n                    }\n                }\n                if (curr) {\n                    if (humanValue) humanValue += \" | \"\n                    humanValue += hexNum(curr)\n                }\n            } else {\n                humanValue = reverseLookup(enumInfo.members, numValue)\n            }\n        } else if (member.type == \"bool\") {\n            value = !!numValue\n            humanValue = value ? \"true\" : \"false\"\n        } else if (member.unit === \"ms\") humanValue = prettyDuration(value)\n        else if (member.unit === \"us\") humanValue = prettyMicroDuration(value)\n        else if (member.unit || scaledValue != numValue) {\n            // don't show so much digits\n            let v = scaledValue\n            if (member.unit) v = roundWithPrecision(v, 3)\n            humanValue = \"\" + v\n            if (member.unit) humanValue += prettyUnit(member.unit)\n        } else {\n            humanValue = scaledValue + \"\"\n            if (\n                (scaledValue | 0) == scaledValue &&\n                (!member.unit || scaledValue >= 15)\n            ) {\n                if (!member.unit) humanValue = hexNum(scaledValue)\n                else humanValue += \" (\" + hexNum(scaledValue) + \")\"\n            } else if (scaledValue && member.storage == 8) {\n                const did = toHex(pkt.data.slice(offset, offset + 8))\n                humanValue += ` (${did} / ${shortDeviceId(did)})`\n            }\n        }\n    }\n\n    return {\n        value,\n        numValue,\n        scaledValue,\n        humanValue,\n        description:\n            member.name +\n            \":\" +\n            (!humanValue\n                ? \"?\"\n                : humanValue.indexOf(\"\\n\") >= 0\n                ? \"\\n\" + humanValue.replace(/^/gm, \"      \")\n                : \" \" + humanValue),\n        info: member,\n        size,\n    }\n}\n\nexport function valueToFlags(\n    enumInfo: jdspec.EnumInfo,\n    value: number,\n): number[] {\n    const r: number[] = []\n    const curr = value\n    for (const key of Object.keys(enumInfo.members)) {\n        const val = enumInfo.members[key]\n        if (curr & val) {\n            r.push(val)\n        }\n    }\n    return r\n}\n\nexport function flagsToValue(values: number[]) {\n    return values.reduce((prev, cur) => prev | cur, 0)\n}\n\nexport function decodeMembers(\n    service: jdspec.ServiceSpec,\n    pktInfo: jdspec.PacketInfo,\n    pkt: Packet,\n    off = 0,\n) {\n    const fields = pktInfo.fields.slice(0)\n    let startRep = fields.findIndex(f => f.startRepeats)\n    let fidx = 0\n    const res: DecodedMember[] = []\n\n    while (off < pkt.data.length) {\n        if (fidx >= fields.length && startRep >= 0) fidx = startRep\n        const member = fields[fidx++]\n        if (!member) {\n            // warning: too large packet\n            break\n        }\n        const decoded = decodeMember(service, pktInfo, member, pkt, off)\n        if (decoded) {\n            off += decoded.size\n            res.push(decoded)\n        } else {\n            break // ???\n        }\n    }\n\n    return res\n}\n\nexport function wrapDecodedMembers(decoded: DecodedMember[]) {\n    if (decoded.length == 0) return \" {}\"\n    else if (decoded.length == 1 && decoded[0].description.length < 60)\n        return \" { \" + decoded[0].description + \" }\"\n    else\n        return (\n            \" {\\n\" + decoded.map(d => \"    \" + d.description).join(\"\\n\") + \"\\n}\"\n        )\n}\n\nfunction syntheticPktInfo(\n    kind: jdspec.PacketKind,\n    addr: number,\n): jdspec.PacketInfo {\n    return {\n        kind,\n        identifier: addr,\n        name: hexNum(addr),\n        description: \"\",\n        fields: [\n            {\n                name: \"_\",\n                type: \"bytes\",\n                storage: 0,\n            },\n        ],\n    }\n}\n\nfunction decodeRegister(\n    service: jdspec.ServiceSpec,\n    pkt: Packet,\n): DecodedPacket {\n    const isSet = pkt.isRegisterSet\n    const isGet = pkt.isRegisterGet\n\n    if (!isSet && !isGet) return null\n\n    let error = \"\"\n    const addr = pkt.serviceCommand & CMD_REG_MASK\n    let regInfo = service?.packets.find(\n        p => isRegister(p) && p.identifier == addr,\n    )\n    if (!regInfo) {\n        regInfo = syntheticPktInfo(\"rw\", addr)\n        error = `unable to decode register`\n    }\n\n    const decoded = decodeMembers(service, regInfo, pkt)\n\n    if (regInfo.packFormat && pkt.data.length) {\n        try {\n            const recoded: string = toHex(\n                jdpack(\n                    regInfo.packFormat,\n                    jdunpack(pkt.data, regInfo.packFormat),\n                ),\n            )\n            if (recoded !== undefined && recoded !== toHex(pkt.data)) {\n                error = `invalid data packing, ${toHex(\n                    pkt.data,\n                )} recoded to ${recoded}`\n            }\n        } catch (e) {\n            error = `invalid data packing, ${e.message}`\n        }\n    }\n\n    let description = \"\"\n    if (decoded.length == 0) description = regInfo.name\n    else if (decoded.length == 1)\n        description = regInfo.name + \": \" + decoded[0].humanValue\n    else description = wrapDecodedMembers(decoded)\n\n    if (isGet) description = \"GET \" + description\n    else description = \"SET \" + description\n\n    return {\n        service,\n        info: regInfo,\n        decoded,\n        description,\n        error,\n    }\n}\n\nfunction decodeEvent(service: jdspec.ServiceSpec, pkt: Packet): DecodedPacket {\n    if (pkt.isCommand || !pkt.isEvent) return null\n\n    const evCode = pkt.eventCode\n    const evInfo =\n        service?.packets.find(\n            p => p.kind == \"event\" && p.identifier == evCode,\n        ) || syntheticPktInfo(\"event\", evCode)\n\n    const decoded = decodeMembers(service, evInfo, pkt)\n    const description =\n        `EVENT[${pkt.eventCounter}] ${evInfo.name}` +\n        wrapDecodedMembers(decoded)\n\n    return {\n        service,\n        info: evInfo,\n        decoded,\n        description,\n    }\n}\n\nfunction decodeCommand(\n    service: jdspec.ServiceSpec,\n    pkt: Packet,\n): DecodedPacket {\n    const kind = pkt.isCommand ? \"command\" : \"report\"\n    const cmdInfo =\n        service?.packets.find(\n            p => p.kind == kind && p.identifier == pkt.serviceCommand,\n        ) || syntheticPktInfo(kind, pkt.serviceCommand)\n\n    const decoded = decodeMembers(service, cmdInfo, pkt)\n    const description =\n        (pkt.isCommand ? \"CMD \" : \"REPORT \") +\n        cmdInfo.name +\n        wrapDecodedMembers(decoded)\n\n    return {\n        service,\n        info: cmdInfo,\n        decoded,\n        description,\n    }\n}\n\nfunction decodeCRCack(service: jdspec.ServiceSpec, pkt: Packet): DecodedPacket {\n    if (!pkt.isReport || !pkt.isCRCAck) return null\n    return {\n        service,\n        info: syntheticPktInfo(\"report\", pkt.serviceCommand),\n        decoded: [],\n        description: \"CRC-ACK \" + hexNum(pkt.serviceCommand),\n    }\n}\n\nfunction decodePacket(service: jdspec.ServiceSpec, pkt: Packet): DecodedPacket {\n    const decoded =\n        decodeCRCack(service, pkt) ||\n        decodeRegister(service, pkt) ||\n        decodeEvent(service, pkt) ||\n        decodeCommand(service, pkt)\n    return decoded\n}\n\nfunction decodePipe(pkt: Packet): DecodedPacket {\n    const cmd = pkt.serviceCommand\n    const pinfo = pkt.device.port(cmd >> PIPE_PORT_SHIFT)\n    if (!pinfo.pipeType) return null\n\n    const [servId, pipeType, dir] = pinfo.pipeType.split(/\\./)\n    const service = serviceSpecificationFromName(servId)\n    if (!service) return null\n\n    const meta = !!(cmd & PIPE_METADATA_MASK)\n    const candidates = service.packets\n        .filter(\n            p =>\n                p.pipeType == pipeType &&\n                /pipe/.test(p.kind) &&\n                /meta/.test(p.kind) == meta &&\n                /command/.test(p.kind) == (dir == \"command\"),\n        )\n        .filter(\n            p =>\n                !meta ||\n                pkt.getNumber(NumberFormat.UInt16LE, 0) == p.identifier,\n        )\n\n    const cmdInfo = candidates[0]\n    if (cmdInfo) {\n        const decoded = decodeMembers(service, cmdInfo, pkt, meta ? 4 : 0)\n        const description =\n            cmdInfo.kind.toUpperCase() +\n            \" \" +\n            cmdInfo.name +\n            wrapDecodedMembers(decoded)\n        return {\n            service,\n            info: cmdInfo,\n            decoded,\n            description,\n        }\n    }\n\n    return null\n}\n\nexport function decodePacketData(pkt: Packet): DecodedPacket {\n    try {\n        if (pkt.device && pkt.isPipe) {\n            const info = decodePipe(pkt)\n            if (info) return info\n        }\n\n        const serviceClass = pkt.serviceClass\n        const service = serviceSpecificationFromClassIdentifier(serviceClass)\n        return decodePacket(service, pkt)\n    } catch (error) {\n        console.error(error, {\n            error,\n            pkt,\n            data: toHex(pkt.data),\n        })\n        throw error\n    }\n}\n\nfunction reverseLookup(map: Record<string, number>, n: number) {\n    for (const k of Object.keys(map)) {\n        if (map[k] == n) return k\n    }\n    return hexNum(n)\n}\n\nexport function serviceClass(name: string): number {\n    const serv = serviceSpecificationFromName(name)\n    return serv ? serv.classIdentifier : -1\n}\n\nexport function serviceName(serviceClass: number): string {\n    if (!isSet(serviceClass)) return \"?\"\n    const serv = serviceSpecificationFromClassIdentifier(serviceClass)\n    return serv ? serv.name.toUpperCase() : \"?\"\n}\n\nexport function serviceShortIdOrClass(serviceClass: number, hexPrefix = \"0x\") {\n    if (!isSet(serviceClass)) return \"?\"\n    const serv = serviceSpecificationFromClassIdentifier(serviceClass)\n    return serv?.shortId || `${hexPrefix}${serviceClass.toString(16)}`\n}\n\nexport function deviceServiceName(pkt: Packet): string {\n    const srv_class = pkt?.device?.serviceClassAt(pkt.serviceIndex)\n    const serv_id = serviceName(srv_class)\n    return `${pkt?.device?.shortId || \"?\"}/${serv_id}:${pkt.serviceIndex}`\n}\n\nexport function commandName(n: number, serviceClass?: number): string {\n    let pref = \"\"\n    if ((n & CMD_TOP_MASK) == CMD_SET_REG) pref = \"SET[\"\n    else if ((n & CMD_TOP_MASK) == CMD_GET_REG) pref = \"GET[\"\n    if (pref) {\n        const reg = n & CMD_REG_MASK\n        let regName = SystemReg[reg]?.toLowerCase() // try reserved registers first, fast path\n        if (regName === undefined) {\n            const serviceSpec =\n                serviceSpecificationFromClassIdentifier(serviceClass)\n            regName = serviceSpec?.packets.find(\n                pkt => isRegister(pkt) && pkt.identifier === reg,\n            )?.name\n        }\n        return (\n            pref +\n            (regName !== undefined ? regName : `x${reg.toString(16)}`) +\n            \"]\"\n        )\n    }\n\n    let r = SystemCmd[n]?.toLowerCase()\n    if (r === undefined) {\n        const serviceSpec =\n            serviceSpecificationFromClassIdentifier(serviceClass)\n        r = serviceSpec?.packets.find(\n            pkt =>\n                (pkt.kind === \"command\" || pkt.kind === \"report\") &&\n                pkt.identifier === n,\n        )?.name\n    }\n    return r\n}\n\nfunction num2str(n: number) {\n    return n + \" (0x\" + n.toString(16) + \")\"\n}\n\nexport interface PrintPacketOptions {\n    showTime?: boolean\n    skipRepeatedAnnounce?: boolean\n    skipResetIn?: boolean\n}\n\nexport function toAscii(d: ArrayLike<number>) {\n    let r = \"\"\n    for (let i = 0; i < d.length; ++i) {\n        const c = d[i]\n        if (c < 32 || c >= 127) r += \".\"\n        else r += String.fromCharCode(c)\n    }\n    return r\n}\n\nexport function hexDump(d: ArrayLike<number>): string {\n    const chunk = 32\n    if (d.length <= chunk) return toHex(d) + \"\\u00A0|\\u00A0\" + toAscii(d)\n\n    const a = toArray(d)\n    let r = \"\"\n    for (let i = 0; i < d.length; i += chunk) {\n        if (i + chunk >= d.length) {\n            let s = toHex(a.slice(i))\n            while (s.length < chunk * 2) s += \"  \"\n            r += s + \"\\u00A0|\\u00A0\" + toAscii(a.slice(i))\n        } else {\n            r += hexDump(a.slice(i, i + chunk)) + \"\\n\"\n        }\n    }\n    return r\n}\n\nexport function printPacket(\n    pkt: Packet,\n    opts: PrintPacketOptions = {},\n): string {\n    const frame_flags = pkt.frameFlags\n    const devname = pkt.friendlyDeviceName\n    const service_name = pkt.friendlyServiceName\n    const cmdname = pkt.friendlyCommandName || hexNum(pkt.serviceCommand)\n    const sender = pkt.sender\n\n    if (\n        opts.skipResetIn &&\n        pkt.serviceIndex === JD_SERVICE_INDEX_CTRL &&\n        pkt.serviceCommand === (CMD_SET_REG | ControlReg.ResetIn)\n    )\n        return \"\"\n\n    let pdesc = `${devname}/${service_name}: ${cmdname}; sz=${pkt.size}`\n\n    if (frame_flags & JD_FRAME_FLAG_COMMAND) pdesc = \"to \" + pdesc\n    else pdesc = \"from \" + pdesc\n    if (frame_flags & JD_FRAME_FLAG_ACK_REQUESTED)\n        pdesc = `[ack:${hexNum(pkt.crc)}] ` + pdesc\n\n    const d = pkt.data\n    if (\n        pkt.device &&\n        pkt.serviceIndex == JD_SERVICE_INDEX_CTRL &&\n        pkt.serviceCommand == CMD_ADVERTISEMENT_DATA\n    ) {\n        if (pkt.device.lastServiceUpdate < pkt.timestamp) {\n            if (opts.skipRepeatedAnnounce) return \"\"\n            else pdesc = \" ====== \" + pdesc\n        } else {\n            pdesc +=\n                \"; Announce services: \" +\n                pkt.device.serviceClasses.map(serviceName).join(\", \")\n        }\n    } else if (pkt.isRepeatedEvent) {\n        pdesc = ` ------ ${pdesc} EVENT[${pkt.eventCounter}]`\n    } else {\n        const decoded = pkt.decoded\n        if (decoded) {\n            pdesc += \"; \" + decoded.description\n        } else if (0 < d.length && d.length <= 4) {\n            const v0 = pkt.uintData,\n                v1 = pkt.intData\n            pdesc += \"; \" + num2str(v0)\n            if (v0 != v1) pdesc += \"; signed: \" + num2str(v1)\n        } else if (d.length) {\n            pdesc += \"; \" + hexDump(d)\n        }\n    }\n\n    if (sender) pdesc += ` (${sender})`\n\n    return (\n        (!isNaN(pkt.timestamp) && opts?.showTime\n            ? Math.round(pkt.timestamp) + \"ms: \"\n            : \"\") + pdesc\n    )\n}\n", "import {\n    crc,\n    ALIGN,\n    write16,\n    bufferConcat,\n    toHex,\n    fromHex,\n    read32,\n    read16,\n    write32,\n    hexNum,\n    bufferToString,\n} from \"./utils\"\nimport {\n    JD_FRAME_FLAG_COMMAND,\n    JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS,\n    CMD_SET_REG,\n    JD_SERIAL_HEADER_SIZE,\n    JD_FRAME_FLAG_ACK_REQUESTED,\n    JD_SERVICE_INDEX_MASK,\n    JD_SERVICE_INDEX_INV_MASK,\n    JD_SERIAL_MAX_PAYLOAD_SIZE,\n    JD_SERVICE_INDEX_CRC_ACK,\n    JD_SERVICE_INDEX_PIPE,\n    PIPE_PORT_SHIFT,\n    PIPE_COUNTER_MASK,\n    PIPE_METADATA_MASK,\n    PIPE_CLOSE_MASK,\n    CMD_GET_REG,\n    JD_SERVICE_INDEX_CTRL,\n    CMD_REG_MASK,\n    CMD_EVENT_CODE_MASK,\n    CMD_EVENT_COUNTER_MASK,\n    CMD_EVENT_MASK,\n    CMD_EVENT_COUNTER_POS,\n    JD_SERVICE_INDEX_MAX_NORMAL,\n    JD_DEVICE_IDENTIFIER_BROADCAST_HIGH_MARK,\n    JD_SERVICE_INDEX_BROADCAST,\n} from \"./constants\"\nimport { JDDevice } from \"./device\"\nimport { NumberFormat, getNumber } from \"./buffer\"\nimport { JDBus } from \"./bus\"\nimport {\n    commandName,\n    DecodedPacket,\n    decodePacketData,\n    serviceName,\n    shortDeviceId,\n} from \"./pretty\"\nimport { SRV_CONTROL, SystemCmd } from \"../../jacdac-spec/dist/specconstants\"\nimport { jdpack, jdunpack, PackedValues } from \"./pack\"\nimport { serviceSpecificationFromClassIdentifier } from \"./spec\"\nimport { throwError } from \"./error\"\n\nconst { warn, debug } = console\n\n/**\n * Represent serialized Packet, or several packets.\n */\nexport type JDFrameBuffer = Uint8Array & {\n    _jacdac_sender?: string\n    _jacdac_timestamp?: number\n    _jacdac_replay?: boolean\n    _jacdac_meta?: any\n}\n\nexport function isLargeFrame(frame: Uint8Array) {\n    return frame[2] === 0xff\n}\n\n/**\n * A Jacdac packet\n * @category JDOM\n */\nexport class Packet {\n    private _header: Uint8Array\n    private _data: Uint8Array\n    private _meta: Record<string, unknown> = undefined // accesory data used by clients\n    timestamp: number\n    device: JDDevice\n    private _decoded: DecodedPacket\n    readonly key: number\n    // An optional tracing identity to avoid\n    // resending own packets for bridges\n    public sender: string\n    // Replayed in a trace\n    public replay?: boolean\n    public isRepeatedEvent: boolean\n\n    private static _nextKey = 1\n    private constructor() {\n        this.key = Packet._nextKey++\n    }\n\n    static fromBinary(data: JDFrameBuffer, timestamp?: number) {\n        if (!data || data.length > 252) return undefined\n        const p = new Packet()\n        p._header = data.slice(0, JD_SERIAL_HEADER_SIZE)\n        p._data = data.slice(\n            JD_SERIAL_HEADER_SIZE,\n            JD_SERIAL_HEADER_SIZE + p.size,\n        )\n        p.sender = data._jacdac_sender\n        p.timestamp = timestamp ?? data._jacdac_timestamp\n        return p\n    }\n\n    static from(service_command: number, data: Uint8Array) {\n        const p = new Packet()\n        p._header = new Uint8Array(JD_SERIAL_HEADER_SIZE)\n        p.data = data\n        p.serviceCommand = service_command\n        return p\n    }\n\n    static onlyHeader(service_command: number) {\n        return Packet.from(service_command, new Uint8Array(0))\n    }\n\n    toBuffer() {\n        // compute correct framing and CRC\n        const res = bufferConcat(this._header, this._data) as JDFrameBuffer\n        res[2] = this._data.length + 4\n        write16(res, 0, crc(res.slice(2)))\n        res._jacdac_sender = this.sender\n        res._jacdac_timestamp = this.timestamp\n        return res\n    }\n\n    get header() {\n        return this._header.slice(0)\n    }\n\n    get deviceIdentifier() {\n        return toHex(this._header.slice(4, 4 + 8))\n    }\n    set deviceIdentifier(id: string) {\n        if (id !== this.deviceIdentifier) {\n            const idb = fromHex(id)\n            if (idb.length != 8) throwError(\"Invalid id\")\n            if (this.isMultiCommand) throwError(\"Invalid multicast\")\n            this._header.set(idb, 4)\n            this._decoded = undefined\n            this.device = undefined\n        }\n    }\n\n    get frameFlags() {\n        return this._header[3]\n    }\n\n    set frameFlags(v: number) {\n        this._header[3] = v\n    }\n\n    get isMultiCommand() {\n        return !!(this.frameFlags & JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS)\n    }\n\n    get size(): number {\n        return this._header[12]\n    }\n\n    get requiresAck(): boolean {\n        return this.frameFlags & JD_FRAME_FLAG_ACK_REQUESTED ? true : false\n    }\n    set requiresAck(ack: boolean) {\n        if (ack != this.requiresAck)\n            this._header[3] ^= JD_FRAME_FLAG_ACK_REQUESTED\n        this._decoded = undefined\n    }\n\n    get serviceIndex(): number {\n        return this._header[13] & JD_SERVICE_INDEX_MASK\n    }\n    set serviceIndex(value: number) {\n        if (value == null) throw new Error(\"service_index not set\")\n        this._header[13] =\n            (this._header[13] & JD_SERVICE_INDEX_INV_MASK) | value\n        this._decoded = undefined\n    }\n\n    get serviceClass(): number {\n        if (this.isMultiCommand) return read32(this._header, 4)\n        if (this.serviceIndex === 0) return SRV_CONTROL\n        return this.device?.serviceClassAt(this.serviceIndex)\n    }\n\n    get crc(): number {\n        return read16(this._header, 0)\n    }\n\n    get serviceCommand(): number {\n        return read16(this._header, 14)\n    }\n    set serviceCommand(cmd: number) {\n        write16(this._header, 14, cmd)\n        this._decoded = undefined\n    }\n\n    get isRegisterSet() {\n        return (\n            this.serviceIndex <= JD_SERVICE_INDEX_MAX_NORMAL &&\n            this.serviceCommand >> 12 == CMD_SET_REG >> 12\n        )\n    }\n\n    get isRegisterGet() {\n        return (\n            this.serviceIndex <= JD_SERVICE_INDEX_MAX_NORMAL &&\n            this.serviceCommand >> 12 == CMD_GET_REG >> 12\n        )\n    }\n\n    // TODO rename to registerCode\n    get registerIdentifier() {\n        if (!this.isRegisterGet && !this.isRegisterSet) return undefined\n        return this.serviceCommand & CMD_REG_MASK\n    }\n\n    get isEvent() {\n        return (\n            this.serviceIndex <= JD_SERVICE_INDEX_MAX_NORMAL &&\n            (this.serviceCommand & CMD_EVENT_MASK) !== 0\n        )\n    }\n\n    get eventCode() {\n        return this.isEvent\n            ? this.serviceCommand & CMD_EVENT_CODE_MASK\n            : undefined\n    }\n\n    get eventCounter() {\n        return this.isEvent\n            ? (this.serviceCommand >> CMD_EVENT_COUNTER_POS) &\n                  CMD_EVENT_COUNTER_MASK\n            : undefined\n    }\n\n    get isCRCAck() {\n        return this.serviceIndex === JD_SERVICE_INDEX_CRC_ACK\n    }\n\n    get isPipe() {\n        return this.serviceIndex === JD_SERVICE_INDEX_PIPE\n    }\n\n    get pipePort() {\n        return this.isPipe && this.serviceCommand >> PIPE_PORT_SHIFT\n    }\n\n    get pipeCount() {\n        return this.isPipe && this.serviceCommand & PIPE_COUNTER_MASK\n    }\n\n    get data(): Uint8Array {\n        return this._data\n    }\n\n    set data(buf: Uint8Array) {\n        if (buf.length > JD_SERIAL_MAX_PAYLOAD_SIZE)\n            throw Error(\n                `jacdac packet length too large, ${buf.length} > ${JD_SERIAL_MAX_PAYLOAD_SIZE} bytes`,\n            )\n        this._header[12] = buf.length\n        this._data = buf\n        this._decoded = undefined\n    }\n\n    jdunpack<T extends PackedValues>(fmt: string): T {\n        return (this._data && fmt && jdunpack<T>(this._data, fmt)) || ([] as T)\n    }\n\n    get uintData() {\n        let buf = this._data\n        if (buf.length == 0) return undefined\n        if (buf.length < 4) buf = bufferConcat(buf, new Uint8Array(4))\n        if (buf.length == 8)\n            return read32(buf, 0) + read32(buf, 4) * 0x100000000\n        return read32(buf, 0)\n    }\n\n    get stringData(): string {\n        return this._data && bufferToString(this._data)\n    }\n\n    get intData() {\n        let fmt: NumberFormat\n        switch (this._data.length) {\n            case 0:\n                return undefined\n            case 1:\n                fmt = NumberFormat.Int8LE\n                break\n            case 2:\n            case 3:\n                fmt = NumberFormat.Int16LE\n                break\n            default:\n                fmt = NumberFormat.Int32LE\n                break\n        }\n        return this.getNumber(fmt, 0)\n    }\n\n    get isAnnounce() {\n        return (\n            this.serviceIndex == JD_SERVICE_INDEX_CTRL &&\n            this.isReport &&\n            this.serviceCommand == SystemCmd.Announce\n        )\n    }\n\n    get isRepeatedAnnounce() {\n        return (\n            this.isAnnounce && this.device?.lastServiceUpdate < this.timestamp\n        )\n    }\n\n    get decoded() {\n        if (!this._decoded) this._decoded = decodePacketData(this)\n        return this._decoded\n    }\n\n    get meta() {\n        if (!this._meta) this._meta = {}\n        return this._meta\n    }\n\n    clone() {\n        const pkt = new Packet()\n        pkt._header = this._header.slice()\n        pkt._data = this._data.slice()\n        pkt.timestamp = this.timestamp\n        return pkt\n    }\n\n    cloneForDevice(deviceId: string, serviceIndex: number) {\n        const idb = fromHex(deviceId)\n        if (idb.length != 8) throwError(\"Invalid id\")\n        if (!this.isMultiCommand) throwError(\"Must be multi command\")\n\n        const pkt = Packet.fromBinary(this.toBuffer(), this.timestamp)\n        pkt.frameFlags &= ~JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS\n        pkt._header.set(idb, 4)\n        pkt._decoded = undefined\n        pkt.sender = undefined\n        pkt.serviceIndex = serviceIndex\n        return pkt\n    }\n\n    compress(stripped: Uint8Array[]) {\n        if (stripped.length == 0) return\n        let sz = -4\n        for (const s of stripped) {\n            sz += s.length\n        }\n        const data = new Uint8Array(sz)\n        this._header.set(stripped[0], 12)\n        data.set(stripped[0].slice(4), 0)\n        sz = stripped[0].length - 4\n        for (const s of stripped.slice(1)) {\n            data.set(s, sz)\n            sz += s.length\n        }\n        this._data = data\n        this._decoded = undefined\n    }\n\n    withFrameStripped() {\n        return bufferConcat(this._header.slice(12, 12 + 4), this._data)\n    }\n\n    getNumber(fmt: NumberFormat, offset: number) {\n        return getNumber(this._data, fmt, offset)\n    }\n\n    get isCommand() {\n        return !!(this.frameFlags & JD_FRAME_FLAG_COMMAND)\n    }\n\n    set isCommand(value: boolean) {\n        if (value) this._header[3] |= JD_FRAME_FLAG_COMMAND\n        else this._header[3] &= ~JD_FRAME_FLAG_COMMAND\n        this._decoded = undefined\n    }\n\n    get isReport() {\n        return !this.isCommand\n    }\n\n    assignDevice(bus: JDBus) {\n        if (!this.isMultiCommand && !this.device)\n            this.device = bus.device(this.deviceIdentifier, false, this)\n    }\n\n    toString(): string {\n        let msg = `${shortDeviceId(this.deviceIdentifier)}/${\n            this.serviceIndex\n        }[${this.frameFlags}]: 0x${this.serviceCommand.toString(16)} sz=${\n            this.size\n        }`\n        if (this.size < 20) msg += \": \" + toHex(this.data)\n        else msg += \": \" + toHex(this.data.slice(0, 20)) + \"...\"\n        return msg\n    }\n\n    sendCoreAsync(bus: JDBus) {\n        const buf = this.toBuffer()\n        // Here we're sending this packet as the only one in a frame, therefore we need to compute CRC (which toBuffer() does)\n        // There's no crc computation function on Packet, since it should be typically only applied to full frames.\n        // The crc field reads the CRC from the frame (which is useful eg for acks).\n        this._header[0] = buf[0]\n        this._header[1] = buf[1]\n        this._header[2] = buf[2]\n        this.assignDevice(bus)\n        return bus.sendPacketAsync(this)\n    }\n\n    sendReportAsync(dev: JDDevice) {\n        if (!dev) return Promise.resolve()\n        this.deviceIdentifier = dev.deviceId\n        this.device = dev\n        return this.sendCoreAsync(dev.bus)\n    }\n\n    sendCmdAsync(dev: JDDevice) {\n        if (!dev) return Promise.resolve()\n        this.deviceIdentifier = dev.deviceId\n        this.device = dev\n        this.isCommand = true\n        return this.sendCoreAsync(dev.bus)\n    }\n\n    sendAsMultiCommandAsync(bus: JDBus, service_class: number) {\n        this._header[3] |=\n            JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS | JD_FRAME_FLAG_COMMAND\n        write32(this._header, 4, service_class)\n        write32(this._header, 8, JD_DEVICE_IDENTIFIER_BROADCAST_HIGH_MARK)\n        this.serviceIndex = JD_SERVICE_INDEX_BROADCAST\n        return this.sendCoreAsync(bus)\n    }\n\n    static fromFrame(frame: JDFrameBuffer, timestamp: number, skipCrc = false) {\n        return frameToPackets(frame, timestamp, skipCrc)\n    }\n\n    static jdpacked<T extends PackedValues>(\n        service_command: number,\n        fmt: string,\n        nums: T,\n    ) {\n        return Packet.from(service_command, jdpack<T>(fmt, nums))\n    }\n\n    // helpers\n    get friendlyDeviceName(): string {\n        if (this.isMultiCommand) return \"*\"\n        return this.device?.friendlyName || shortDeviceId(this.deviceIdentifier)\n    }\n    get friendlyServiceName(): string {\n        let service_name: string\n        if (this.isCRCAck) {\n            service_name = \"CRC-ACK\"\n        } else if (this.isPipe) {\n            service_name = \"PIPE\"\n        } else {\n            const sc = this.serviceClass\n            if (sc === undefined) return `(${this.serviceIndex})`\n            else {\n                const serv_id = serviceName(sc)\n                service_name = `${serv_id === \"?\" ? hexNum(sc) : serv_id} (${\n                    this.serviceIndex\n                })`\n            }\n        }\n        return service_name\n    }\n    get friendlyCommandName(): string {\n        const cmd = this.serviceCommand\n        let cmdname: string\n        if (this.isCRCAck) {\n            cmdname = hexNum(cmd)\n        } else if (this.isPipe) {\n            cmdname = `port:${cmd >> PIPE_PORT_SHIFT} cnt:${\n                cmd & PIPE_COUNTER_MASK\n            }`\n            if (cmd & PIPE_METADATA_MASK) cmdname += \" meta\"\n            if (cmd & PIPE_CLOSE_MASK) cmdname += \" close\"\n        } else if (this.isEvent) {\n            const spec = serviceSpecificationFromClassIdentifier(\n                this.serviceClass,\n            )\n            const code = this.eventCode\n            const pkt = spec?.packets.find(\n                pkt => pkt.kind === \"event\" && pkt.identifier === code,\n            )\n            cmdname = pkt?.name\n        } else {\n            cmdname = commandName(cmd, this.serviceClass)\n        }\n        return cmdname\n    }\n}\n\nfunction frameToPackets(\n    frame: JDFrameBuffer,\n    timestamp: number,\n    skipCrc = false,\n) {\n    if (timestamp === undefined) timestamp = frame._jacdac_timestamp\n    const size = frame.length < 12 ? 0 : frame[2]\n    if (frame.length < size + 12) {\n        warn(\n            `${timestamp | 0}ms: got only ${frame.length} bytes; expecting ${\n                size + 12\n            }`,\n        )\n        return []\n    } else if (size < 4) {\n        warn(`${timestamp | 0}ms: empty packet`)\n        return []\n    } else {\n        // check length first - if length doesn't CRC also won't\n        if (frame.length != 12 + size) {\n            warn(`${timestamp | 0}ms: unexpected packet len: ${frame.length}`)\n            return []\n        }\n        if (!skipCrc) {\n            const computed = crc(frame.slice(2, size + 12))\n            const actual = read16(frame, 0)\n            if (actual != computed) {\n                warn(\n                    `${\n                        timestamp | 0\n                    }ms: crc mismatch; sz=${size} got:${actual}, exp:${computed}, ${toHex(\n                        frame,\n                    )}`,\n                )\n                return []\n            }\n        }\n        const res: Packet[] = []\n        for (let ptr = 12; ptr < 12 + size; ) {\n            const psz = frame[ptr] + 4\n            const sz = ALIGN(psz)\n            if (ptr + psz > 12 + size) {\n                warn(\n                    `${timestamp | 0}ms: invalid frame compression, res len=${\n                        res.length\n                    }`,\n                )\n                break\n            }\n            const pkt = bufferConcat(\n                frame.slice(0, 12),\n                frame.slice(ptr, ptr + psz),\n            )\n            const p = Packet.fromBinary(pkt)\n            p.timestamp = timestamp\n            p.sender = frame._jacdac_sender\n            res.push(p)\n            // only set req_ack flag on first packet - otherwise we would sent multiple acks\n            if (res.length > 1) p.requiresAck = false\n            ptr += sz\n        }\n\n        //debug(`${timestamp | 0}ms: decoded ${res.length} packets`)\n        return res\n    }\n}\n", "import { JDBus } from \"../bus\"\nimport { META_TRACE, META_TRACE_DESCRIPTION } from \"../constants\"\nimport { JDFrameBuffer, Packet } from \"../packet\"\nimport { printPacket, PrintPacketOptions } from \"../pretty\"\nimport { randomDeviceId } from \"../random\"\nimport { roundWithPrecision, toHex } from \"../utils\"\n\nconst TRACE_OVERSHOOT = 1.1\n\n/**\n * Collect stack trace at the current execution position\n * @returns\n * @internal\n */\nexport function stack() {\n    return new Error().stack\n}\n\n/**\n * @internal\n */\nexport function cleanStack(text: string) {\n    return text\n        ?.split(/\\n/g)\n        .slice(2)\n        .join(\"\\n\") // drop first 2 lines\n        .replace(/webpack-internal:\\/\\/\\//g, \"\")\n        .replace(/https:\\/\\/microsoft\\.github\\.io\\/jacdac-docs/g, \"\")\n}\n\nexport function serializeToTrace(\n    frame: JDFrameBuffer,\n    start?: number,\n    bus?: JDBus,\n    options?: PrintPacketOptions\n) {\n    const data = toHex(frame).padEnd(60, \" \")\n    const t0 = (frame._jacdac_timestamp || 0) - (start || 0)\n    let t = t0.toFixed(3).padEnd(10, \" \")\n\n    let descr = frame._jacdac_meta?.[META_TRACE_DESCRIPTION] ?? \"\"\n\n    if (options) {\n        const perpkt = Packet.fromFrame(frame, undefined, true).map(pkt => {\n            pkt.sender = undefined\n            if (bus) pkt.assignDevice(bus)\n            return printPacket(pkt, options)\n        })\n        if (\n            perpkt.length == 1 &&\n            perpkt[0].length < 70 &&\n            !perpkt[0].includes(\"\\n\")\n        )\n            descr += `${perpkt[0]} (${frame._jacdac_sender ?? \"loop\"})`\n        else {\n            descr += ` (${frame._jacdac_sender ?? \"loop\"})\\n`\n            descr += perpkt.join(\"\\n\") + \"\\n\"\n        }\n    } else if (!descr) {\n        descr = Packet.fromFrame(frame, undefined, true)\n            .map(pkt => {\n                if (bus) pkt.assignDevice(bus)\n                return printPacket(pkt, {}).replace(/\\r?\\n/g, \" \")\n            })\n            .join(\" ;; \")\n    }\n    let msg = `${t} ${data}   ${descr}`\n    const trace = frame._jacdac_meta?.[META_TRACE] as string\n    if (trace) msg += \"\\n\" + cleanStack(trace)\n    return msg\n}\n\n/**\n * A sequence of packets.\n * @category Trace\n */\nexport class Trace {\n    readonly id = randomDeviceId()\n    readonly maxLength: number\n    readonly description: string\n    private resolutionBus: JDBus\n\n    /**\n     * Constructs a new empty trace or from an existing list of packets\n     * @param frames list of frames/packets\n     * @param description description of the trace\n     */\n    constructor(\n        public frames: JDFrameBuffer[] = [],\n        options?: {\n            description?: string\n            maxLength?: number\n        }\n    ) {\n        this.description = options?.description\n        this.maxLength = options?.maxLength\n    }\n\n    /**\n     * Number of packets in trace\n     */\n    get length() {\n        return this.frames.length\n    }\n\n    /**\n     * Duration in milliseconds between the first and last packet.\n     */\n    get duration() {\n        if (!this.frames.length) return 0\n        return (\n            this.frames[this.frames.length - 1]._jacdac_timestamp -\n            this.frames[0]._jacdac_timestamp\n        )\n    }\n\n    /**\n     * _jacdac_timestamp of the first packet, defaults to 0 if trace is empty.\n     */\n    get startTimestamp() {\n        return this.frames[0]?._jacdac_timestamp || 0\n    }\n\n    /**\n     * _jacdac_timestamp of the last packet, defaults to 0 if trace is empty.\n     */\n    get endTimestamp() {\n        return this.frames[this.frames.length - 1]?._jacdac_timestamp || 0\n    }\n\n    /**\n     * Appends a frame to the trace\n     * @param frame frame/packet to add\n     */\n    addFrame(frame: JDFrameBuffer) {\n        if (!frame._jacdac_meta) frame._jacdac_meta = {}\n\n        // our event tracing may end up registering the same\n        // packet twice when it is received and transmitted\n        if (frame._jacdac_meta[this.id]) {\n            // console.trace(\"packet added twice\", { packet })\n            return\n        }\n        // keep track of trace added\n        frame._jacdac_meta[this.id] = true\n        // packets are mutable (eg., _jacdac_timestamp is updated on each send), so we take a copy\n        const copy = frame.slice() as JDFrameBuffer\n        copy._jacdac_sender = frame._jacdac_sender\n        copy._jacdac_timestamp = frame._jacdac_timestamp\n        // TODO need to copy 'meta' as well?\n        this.frames.push(copy)\n\n        // limit trace size\n        if (\n            this.maxLength > 0 &&\n            this.frames.length > this.maxLength * TRACE_OVERSHOOT\n        ) {\n            // 10% overshoot of max\n            this.frames = this.frames.slice(-this.maxLength)\n        }\n    }\n\n    /**\n     * Gets a text-rendered view of the trace\n     * @param length maximum number of elements\n     * @returns text where each line is a packet\n     */\n    serializeToText(length?: number) {\n        const start = this.startTimestamp\n        let pkts = this.frames\n        if (length > 0) pkts = pkts.slice(-length)\n        const text = pkts.map(pkt =>\n            serializeToTrace(pkt, start, this.resolutionBus)\n        )\n        if (this.description) {\n            text.unshift(this.description)\n            text.unshift(\"\")\n        }\n        return text.join(\"\\n\")\n    }\n\n    resolveDevices(bus: JDBus) {\n        this.resolutionBus = bus\n    }\n\n    toPackets(bus?: JDBus) {\n        const res: Packet[] = []\n        for (const frame of this.frames)\n            for (const pkt of Packet.fromFrame(frame, undefined, true)) {\n                if (bus) pkt.assignDevice(bus)\n                res.push(pkt)\n            }\n        return res\n    }\n}\n", "import {\n    NEW_LISTENER,\n    REMOVE_LISTENER,\n    ERROR,\n    CHANGE,\n    TIMEOUT,\n    ERROR_TIMEOUT,\n} from \"./constants\"\nimport { Observable, Observer } from \"./observable\"\nimport { Flags } from \"./flags\"\nimport { stack } from \"./trace/trace\"\nimport { delay } from \"./utils\"\nimport { throwError } from \"./error\"\n\n/**\n * @category JDOM\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type EventHandler = (...args: any[]) => void\n\ninterface Listener {\n    handler: EventHandler\n    once: boolean\n    stackTrace?: string\n}\n\nfunction normalizeEventNames(eventNames: string | string[]): string[] {\n    if (!eventNames) eventNames = []\n    if (typeof eventNames === \"string\") eventNames = [eventNames]\n    return eventNames\n}\n\n/**\n * Base interface for evented nodes in Jacdac\n * @category JDOM\n */\nexport interface IEventSource {\n    readonly nodeId: number\n    changeId: number\n\n    /**\n     * Subscribes to an event and returns the unsubscription handler\n     * @param eventName\n     * @param next\n     */\n    subscribe<T>(\n        eventName: string | string[],\n        next: (value: T) => void,\n    ): () => void\n}\n\n/**\n * Given a node or set of nodes, generate a stable string that can be used to track dependencies in frameworks like React.\n * @param nodes\n * @returns\n * @category JDOM\n */\nexport function dependencyId(nodes: IEventSource | IEventSource[]) {\n    if (Array.isArray(nodes))\n        return nodes?.map(node => node?.nodeId || \"?\").join(\",\") || \"\"\n    else return nodes?.nodeId || \"\"\n}\n\nlet nextNodeId = 0\n\n/**\n * Collects unsubscribe handlers and unmounts them\n */\nexport class JDCancellationToken {\n    private subscriptions: (() => void)[] = []\n\n    constructor() {}\n\n    mount(...items: (() => void)[]) {\n        this.subscriptions.push(...items)\n    }\n\n    unmount() {\n        const us = this.subscriptions\n        this.subscriptions = []\n        us.forEach(unsub => unsub())\n    }\n}\n\n/**\n * Base class for evented nodes in Jacdac\n * @category JDOM\n */\nexport class JDEventSource implements IEventSource {\n    /**\n     * Gets an internal unique node identifier, mostly used for debugging.\n     * @category JDOM\n     */\n    public readonly nodeId = nextNodeId++\n\n    private readonly listeners: Record<string, Listener[]> = {}\n\n    /**\n     * Gets a counter of event emit calls.\n     * @category JDOM\n     */\n    readonly eventStats: Record<string, number> = {}\n\n    /**\n     * Gets a counter map from events to new listener counts\n     * @category JDOM\n     */\n    newListenerStats: Record<string, number> = undefined\n\n    /**\n     * @internal\n     */\n    constructor() {}\n\n    /**\n     * Registers a handler for one or more events\n     * @param eventName name or names of the events to subscribe\n     * @param handler handler to register\n     * @returns current object instance\n     * @category JDOM\n     */\n    on(eventName: string | string[], handler: EventHandler) {\n        if (!handler) return this\n        normalizeEventNames(eventName).forEach(eventName =>\n            this.addListenerInternal(eventName, handler, false),\n        )\n        return this\n    }\n\n    /**\n     * Unregisters a handler for one or more events\n     * @param eventName name or names of the events to subscribe\n     * @param handler handler to unregister\n     * @returns current object instance\n     * @category JDOM\n     */\n    off(eventName: string | string[], handler: EventHandler) {\n        normalizeEventNames(eventName).forEach(eventName =>\n            this.removeListenerInternal(eventName, handler),\n        )\n        return this\n    }\n\n    /**\n     * Registers a handler for one or more events to run only once.\n     * @param eventName name or names of the events to subscribe\n     * @param handler handler to execute\n     * @returns current object instance\n     * @category JDOM\n     */\n    once(eventName: string | string[], handler: EventHandler) {\n        normalizeEventNames(eventName).forEach(eventName =>\n            this.addListenerInternal(eventName, handler, true),\n        )\n        return this\n    }\n\n    /**\n     * Awaits an event with a timeout. Throws JacdacError with timeout if operation does not return.\n     * @param eventName\n     * @param timeout\n     */\n    async awaitOnce(\n        eventName: string | string[],\n        token?: JDCancellationToken,\n    ): Promise<void> {\n        if (!eventName) return\n\n        const p = new Promise<void>(resolve => {\n            const handler = () => resolve?.()\n            this.once(eventName, handler)\n            token?.mount(() => this.off(eventName, handler))\n        })\n        return p\n    }\n\n    private addListenerInternal(\n        eventName: string,\n        handler: EventHandler,\n        once: boolean,\n    ): void {\n        if (!eventName || !handler) {\n            return\n        }\n\n        const eventListeners =\n            this.listeners[eventName] || (this.listeners[eventName] = [])\n        const listener = eventListeners.find(\n            listener => listener.handler === handler,\n        )\n        if (listener) {\n            listener.once = !!once\n            return\n        }\n\n        eventListeners.push({\n            handler,\n            once: !!once,\n            // debug only collection of trace for leak detection\n            stackTrace: Flags.diagnostics && stack(),\n        })\n        this.emit(NEW_LISTENER, eventName, handler)\n        // diagnostics\n        if (Flags.diagnostics) {\n            if (!this.newListenerStats) this.newListenerStats = {}\n            this.newListenerStats[eventName] =\n                (this.newListenerStats[eventName] || 0) + 1\n        }\n    }\n\n    private removeListenerInternal(\n        eventName: string,\n        handler: EventHandler,\n    ): void {\n        if (!eventName || !handler) return\n\n        const eventListeners = this.listeners[eventName]\n        if (eventListeners) {\n            for (let i = 0; i < eventListeners.length; ++i) {\n                const listener = eventListeners[i]\n                if (handler === listener.handler) {\n                    eventListeners.splice(i, 1)\n                    this.emit(REMOVE_LISTENER, eventName, handler)\n                    return\n                }\n            }\n        }\n    }\n\n    /**\n     * Synchronously calls each of the listeners registered for the event named eventName,\n     * in the order they were registered, passing the supplied arguments to each.\n     * @param eventName\n     * @param args\n     * @category JDOM\n     */\n    emit(eventName: string, ...args: unknown[]): boolean {\n        if (!eventName) return false\n\n        // track event stats\n        this.eventStats[eventName] = (this.eventStats[eventName] || 0) + 1\n\n        const eventListeners = this.listeners[eventName]\n        if (!eventListeners || eventListeners.length == 0) {\n            // report unhandled errors\n            if (eventName == ERROR && Flags.diagnostics) console.debug(args[0])\n            return false\n        }\n        for (let i = 0; i < eventListeners.length; ++i) {\n            const listener = eventListeners[i]\n            const handler = listener.handler\n            if (listener.once) {\n                eventListeners.splice(i, 1)\n                --i\n            }\n            try {\n                // eslint-disable-next-line prefer-spread\n                handler.apply(null, args)\n            } catch (e) {\n                // avoid recursive errors in error handler\n                if (eventName !== ERROR) this.emit(ERROR, e)\n            }\n        }\n        return true\n    }\n\n    /**\n     * Gets the number of listeners for a given event\n     * @param eventName name of the event\n     * @returns number of registered handlers\n     * @category JDOM\n     */\n    listenerCount(eventName: string): number {\n        if (!eventName) return 0\n        const listeners = this.listeners[eventName]\n        return listeners?.length || 0\n    }\n\n    /**\n     * Gets the list stack trace where an event was registered. Only enabled if ``Flags.debug`` is true.\n     * @param eventName name of the event\n     * @returns stack traces where a listener was added\n     * @category JDOM\n     */\n    listenerStackTraces(eventName: string): string[] {\n        const listeners = this.listeners[eventName]\n        return listeners?.map(listener => listener.stackTrace)\n    }\n\n    /**\n     * Returns an array listing the events for which the emitter has registered listeners.\n     * @category JDOM\n     */\n    eventNames(): string[] {\n        return Object.keys(this.listeners)\n    }\n\n    /**\n     * Creates an observable from the given event\n     * @param eventName\n     * @category JDOM\n     */\n    observe<T>(eventName: string | string[]): Observable<T> {\n        return new EventObservable<T>(this, normalizeEventNames(eventName))\n    }\n\n    /**\n     * Subscribes to an event and returns the unsubscription handler\n     * @param eventName\n     * @param next\n     * @category JDOM\n     */\n    subscribe<T>(\n        eventName: string | string[],\n        next: (value: T) => void,\n    ): () => void {\n        const observer = this.observe<T>(eventName)\n        return observer.subscribe({ next }).unsubscribe\n    }\n\n    /**\n     * Gets a counter for the ``CHANGE`` event.\n     * @category JDOM\n     */\n    get changeId() {\n        return this.eventStats[CHANGE] || 0\n    }\n}\n\nexport class JDSubscriptionScope {\n    private unsubscribers: (() => void)[] = []\n    private _unmounted = false\n\n    get unmounted() {\n        return this._unmounted\n    }\n\n    mount(unsubscribe: () => void): () => void {\n        this._unmounted = false\n        if (unsubscribe && this.unsubscribers.indexOf(unsubscribe) < 0)\n            this.unsubscribers.push(unsubscribe)\n        return unsubscribe\n    }\n\n    unmount() {\n        const us = this.unsubscribers\n        this.unsubscribers = []\n        us.forEach(u => u())\n        this._unmounted = true\n    }\n}\n\nclass EventObservable<T> implements Observable<T> {\n    constructor(\n        public readonly eventEmitter: JDEventSource,\n        public readonly eventNames: string[],\n    ) {\n        //console.log(`obs`, this.eventNames)\n    }\n\n    subscribe(observer: Observer<T>) {\n        //console.log(`on`, this.eventNames, observer)\n        if (observer.next) this.eventEmitter.on(this.eventNames, observer.next)\n        if (observer.error) this.eventEmitter.on(ERROR, observer.error)\n        // never completes\n        return {\n            unsubscribe: () => {\n                //console.log(`off`, this.eventNames, observer)\n                if (observer.next)\n                    this.eventEmitter.off(this.eventNames, observer.next)\n                if (observer.error) this.eventEmitter.off(ERROR, observer.error)\n            },\n        }\n    }\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { JDEventSource } from \"./eventsource\"\n\n/**\n * Base class for JDOM Node classes.\n * @category JDOM\n */\nexport abstract class JDNode extends JDEventSource {\n    private _nodeData: Record<string, unknown>\n\n    constructor() {\n        super()\n    }\n\n    /**\n     * Globally unique identifier in the tree\n     * @category JDOM\n     */\n    abstract get id(): string\n\n    /**\n     * Gets a kind identifier useful for UI descriptions\n     * @category JDOM\n     */\n    abstract get nodeKind(): string\n\n    /**\n     * Gets the local name\n     * @category JDOM\n     */\n    abstract get name(): string\n\n    /**\n     * A human friendly name\n     * @category JDOM\n     */\n    get friendlyName(): string {\n        return this.name\n    }\n\n    /**\n     * Gets the name including parents\n     * @category JDOM\n     */\n    abstract get qualifiedName(): string\n\n    /**\n     * Gets the parent node in the Jacdac dom\n     * @category JDOM\n     */\n    abstract get parent(): JDNode\n\n    /**\n     * Gets the children of the current node\n     * @category JDOM\n     */\n    abstract get children(): JDNode[]\n\n    /**\n     * Gets a databag to store custom information\n     * @category JDOM\n     */\n    get nodeData() {\n        if (!this._nodeData) this._nodeData = {}\n        return this._nodeData\n    }\n\n    /**\n     * Emit event in current node and parent nodes\n     * @param event event to emit\n     * @param arg event arguments\n     * @category JDOM\n     */\n    emitPropagated(event: string, arg?: any) {\n        let current = this as JDNode\n        while (current) {\n            current.emit(event, arg || this)\n            current = current.parent\n        }\n    }\n\n    /**\n     * @hidden\n     */\n    toString() {\n        return this.friendlyName\n    }\n}\n", "import { JDNode } from \"./node\"\nimport { JDService } from \"./service\"\nimport { DecodedPacket } from \"./pretty\"\nimport { CHANGE } from \"./constants\"\n\n/**\n * Base class for JDOM service member classes.\n * @category JDOM\n */\nexport abstract class JDServiceMemberNode extends JDNode {\n    private _specification: jdspec.PacketInfo\n    private _notImplemented = false\n\n    /**\n     * Parent service\n     * @category JDOM\n     */\n    public readonly service: JDService\n    /**\n     * Identifier of the event.\n     * @category Specification\n     */\n    public readonly code: number\n\n    private readonly isPacket: (pkt: jdspec.PacketInfo) => boolean\n\n    /**\n     * @internal\n     */\n    constructor(\n        service: JDService,\n        code: number,\n        isPacket: (pkt: jdspec.PacketInfo) => boolean,\n    ) {\n        super()\n        this._specification = null\n        this.service = service\n        this.code = code\n        this.isPacket = isPacket\n    }\n\n    /**\n     * Gets the node identifier in the JDOM tree\n     * @category JDOM\n     */\n    get id() {\n        return `${this.nodeKind}:${\n            this.service.device.deviceId\n        }:${this.service.serviceIndex.toString(16)}:${this.code.toString(16)}`\n    }\n\n    /**\n     * Gets the event name, if specified.\n     * @category JDOM\n     */\n    get name() {\n        return this.specification?.name || this.code.toString(16)\n    }\n\n    /**\n     * Gets the qualitified event name, if specified.\n     * @category JDOM\n     */\n    get qualifiedName() {\n        return `${this.service.qualifiedName}.${this.name}`\n    }\n\n    /**\n     * Gets the event specification if known.\n     * @category Specification\n     */\n    get specification() {\n        if (this._specification === null)\n            // lookup once\n            this._specification = this.service.specification?.packets.find(\n                packet =>\n                    this.isPacket(packet) && packet.identifier === this.code,\n            )\n        return this._specification\n    }\n\n    /**\n     * Gets the parent service client instance.\n     * @category JDOM\n     */\n    get parent(): JDNode {\n        return this.service\n    }\n\n    /**\n     * Gets the event friendly name.\n     * @category JDOM\n     */\n    get friendlyName() {\n        const parts = [this.service.friendlyName, this.name]\n        return parts.join(\".\")\n    }\n\n    /**\n     * Indicates if the member is not implemented on the server side\n     * @category JDOM\n     */\n    get notImplemented() {\n        return this._notImplemented\n    }\n\n    /**\n     * Internal\n     * @internal\n     */\n    setNotImplemented() {\n        if (!this._notImplemented) {\n            this._notImplemented = true\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * @internal\n     */\n    abstract get decoded(): DecodedPacket\n}\n", "import { bufferToArray, NumberFormat, getNumber } from \"./buffer\"\nimport { JDBus } from \"./bus\"\nimport { Packet } from \"./packet\"\nimport { JDDevice } from \"./device\"\nimport {\n    BootloaderCmd,\n    ControlCmd,\n    SRV_BOOTLOADER,\n    CMD_ADVERTISEMENT_DATA,\n    PACKET_REPORT,\n    PROGRESS,\n    CHANGE,\n} from \"./constants\"\nimport {\n    assert,\n    bufferConcat,\n    bufferToString,\n    readBlobToUint8Array,\n} from \"./utils\"\nimport { jdpack, jdunpack } from \"./pack\"\nimport { BootloaderError } from \"./constants\"\nimport { prettySize } from \"./pretty\"\nimport { Flags } from \"./flags\"\nimport { dualDeviceId, isDualDeviceId } from \"./spec\"\nimport { JDEventSource } from \"./eventsource\"\n\nconst BL_SUBPAGE_SIZE = 208\nconst BL_RETRIES = 15\nconst BL_SESSION_DELAY = 5\nconst BL_PAGE_DELAY = 5\n\nlet _startTime = 0\n\nconst uf2ExtTags: Record<string, number> = {\n    version: -0x9fc7bc,\n    name: -0x650d9d,\n    pageSize: 0x0be9f7,\n    productIdentifier: 0xc8a729,\n}\n\n/**\n * UF2 page data structure\n * @category Firmware\n * @internal\n */\nexport interface FirmwarePage {\n    data: Uint8Array\n    targetAddress: number\n}\n\n/**\n * Data structure representing a firmware binary\n * @category Firmware\n * @internal\n */\nexport interface FirmwareBlob {\n    pages: FirmwarePage[]\n    productIdentifier: number\n    pageSize: number\n    name: string\n    version: string\n    // name of the file or repo\n    store: string\n}\n\nfunction timestamp() {\n    if (!_startTime) _startTime = Date.now()\n    return Date.now() - _startTime\n}\n\nfunction log(msg: string) {\n    if (Flags.diagnostics) console.debug(`BL [${timestamp()}ms]: ${msg}`)\n}\n\nexport class FirmwareUpdater extends JDEventSource {\n    constructor(\n        readonly bus: JDBus,\n        readonly blob: FirmwareBlob,\n    ) {\n        super()\n    }\n\n    /**\n     * Flash firmware blob onto device\n     * @param bus\n     * @param blob\n     * @param updateCandidates\n     * @param ignoreFirmwareCheck\n     * @param progress\n     * @returns\n     * @category Firmware\n     */\n    async flash(\n        updateCandidates: FirmwareInfo[],\n        ignoreFirmwareCheck: boolean,\n    ) {\n        if (!updateCandidates?.length) return\n        const { bus, blob } = this\n        _startTime = Date.now()\n        log(`resetting ${updateCandidates.length} device(s)`)\n        const bootloaderDeviceIds: string[] = []\n        for (const d of updateCandidates) {\n            const device = bus.device(d.deviceId, true)\n            if (!device) {\n                log(\"device not found\")\n                return\n            }\n            if (!device.bootloader) {\n                log(`resetting ${device}`)\n                bootloaderDeviceIds.push(dualDeviceId(device.deviceId))\n                await device.sendCtrlCommand(ControlCmd.Reset)\n            } else {\n                bootloaderDeviceIds.push(device.deviceId)\n            }\n        }\n        const allFlashers = await createFlashers(this, bootloaderDeviceIds)\n        const flashers = allFlashers\n            .filter(\n                f =>\n                    !!ignoreFirmwareCheck ||\n                    f.dev_class == blob.productIdentifier,\n            )\n            .filter(f =>\n                updateCandidates.find(\n                    uc =>\n                        uc.deviceId === f.device.deviceId ||\n                        isDualDeviceId(uc.deviceId, f.device.deviceId),\n                ),\n            )\n        if (!flashers.length) {\n            log(`no devices to flash`)\n            return\n        }\n        if (flashers.length != updateCandidates.length) {\n            console.error(\n                `expected ${updateCandidates.length} flashers, got ${flashers.length}`,\n            )\n            return\n        }\n        log(`flashing ${blob.name}`)\n        flashers[0].classClients = flashers\n        const unmounts: (() => void)[] = []\n        try {\n            flashers.forEach(f => {\n                f.device.firmwareUpdater = this\n                const dualDevice = bus.device(\n                    dualDeviceId(f.device.deviceId),\n                    true,\n                )\n                if (dualDevice) dualDevice.firmwareUpdater = this\n                unmounts.push(() => {\n                    f.device.firmwareUpdater = undefined\n                    if (dualDevice) dualDevice.firmwareUpdater = undefined\n                })\n            })\n            await flashers[0].flashFirmwareBlob(blob)\n        } finally {\n            unmounts.forEach(u => u())\n        }\n    }\n}\n\nclass FlashClient {\n    private pageSize: number\n    private flashSize: number\n    private sessionId: number\n    classClients: FlashClient[]\n    private lastStatus: Packet\n    private pending: boolean\n    public dev_class: number\n    public device: JDDevice\n\n    private progressTotal: number\n    private progressIndex: number\n\n    constructor(\n        readonly updater: FirmwareUpdater,\n        adpkt: Packet,\n    ) {\n        const d = bufferToArray(adpkt.data, NumberFormat.UInt32LE)\n        this.pageSize = d[1]\n        this.flashSize = d[2]\n        this.dev_class = d[3]\n        this.device = adpkt.device\n        this.handlePacket = this.handlePacket.bind(this)\n    }\n\n    get bus() {\n        return this.updater.bus\n    }\n\n    get progress() {\n        return this.progressTotal ? this.progressIndex / this.progressTotal : 0\n    }\n\n    private handlePacket(pkt: Packet) {\n        if (pkt.serviceCommand == BootloaderCmd.PageData) this.lastStatus = pkt\n    }\n\n    private start() {\n        this.device.on(PACKET_REPORT, this.handlePacket)\n    }\n\n    private stop() {\n        this.device.off(PACKET_REPORT, this.handlePacket)\n    }\n\n    private async sendCommandAsync(p: Packet) {\n        p.serviceIndex = 1\n        await p.sendCmdAsync(this.device)\n    }\n\n    private async startFlashAsync() {\n        this.sessionId = (Math.random() * 0x10000000) | 0\n        for (const d of this.classClients) {\n            d.start()\n            log(\n                `flashing ${d.device.shortId}; available flash=${\n                    d.flashSize / 1024\n                }kb; page=${d.pageSize}b`,\n            )\n        }\n\n        const setsession = Packet.jdpacked<[number]>(\n            BootloaderCmd.SetSession,\n            \"u32\",\n            [this.sessionId],\n        )\n\n        this.allPending()\n\n        for (let i = 0; i < BL_RETRIES; ++i) {\n            for (const d of this.classClients) {\n                if (d.pending) {\n                    if (\n                        d.lastStatus &&\n                        d.lastStatus.getNumber(NumberFormat.UInt32LE, 0) ==\n                            this.sessionId\n                    ) {\n                        d.pending = false\n                    } else {\n                        d.lastStatus = null\n                        log(`set session ${this.sessionId} on ${d.device}`)\n                        await d.sendCommandAsync(setsession)\n                    }\n                    await this.bus.delay(BL_SESSION_DELAY)\n                }\n            }\n            if (this.numPending() == 0) break\n            await this.waitForStatusAsync()\n        }\n\n        if (this.numPending()) throw new Error(\"Can't set session id\")\n    }\n\n    private async endFlashAsync() {\n        for (const f of this.classClients) {\n            await this.bus.delay(10)\n            await f.device.reset()\n        }\n    }\n\n    private allPending() {\n        for (const c of this.classClients) {\n            c.pending = true\n            c.lastStatus = null\n        }\n    }\n\n    private numPending() {\n        let num = 0\n        for (const c of this.classClients) if (c.pending) num++\n        return num\n    }\n\n    private async waitForStatusAsync() {\n        for (let i = 0; i < 100; ++i) {\n            if (this.classClients.every(c => c.lastStatus != null)) break\n            await this.bus.delay(5)\n        }\n    }\n\n    private async flashPage(page: FirmwarePage) {\n        const pageAddr = page.targetAddress\n        const pageSize = this.pageSize\n        const numSubpage =\n            ((pageSize + BL_SUBPAGE_SIZE - 1) / BL_SUBPAGE_SIZE) | 0\n\n        log(\n            `flash ${prettySize(this.pageSize)} at ${(\n                pageAddr & 0xffffff\n            ).toString(16)}`,\n        )\n\n        if (page.data.length != this.pageSize)\n            throw new Error(\"invalid page size\")\n\n        for (const f of this.classClients) f.lastStatus = null\n\n        this.allPending()\n        for (let i = 0; i < BL_RETRIES; ++i) {\n            log(`  attempt ${i}`)\n            let currSubpage = 0\n            for (let suboff = 0; suboff < pageSize; suboff += BL_SUBPAGE_SIZE) {\n                let sz = BL_SUBPAGE_SIZE\n                if (suboff + sz > pageSize) sz = pageSize - suboff\n                log(\n                    `send sub page ${currSubpage}/${\n                        numSubpage - 1\n                    } at ${suboff.toString(16)}[${sz}]`,\n                )\n                const hd = jdpack(\"u32 u16 u8 u8 u32 u32 u32 u32 u32\", [\n                    pageAddr,\n                    suboff,\n                    currSubpage++,\n                    numSubpage - 1,\n                    this.sessionId,\n                    0,\n                    0,\n                    0,\n                    0,\n                ])\n                assert(hd.length == 4 * 7)\n                const p = Packet.from(\n                    BootloaderCmd.PageData,\n                    bufferConcat(hd, page.data.slice(suboff, suboff + sz)),\n                )\n                // in first round, just broadcast everything\n                // in other rounds, broadcast everything except for last packet\n                if (\n                    this.classClients.length > 1 &&\n                    (i == 0 || currSubpage < numSubpage)\n                )\n                    await p.sendAsMultiCommandAsync(this.bus, SRV_BOOTLOADER)\n                else {\n                    for (const f of this.classClients)\n                        if (f.pending) {\n                            f.lastStatus = null\n                            await f.sendCommandAsync(p)\n                        }\n                }\n                await this.bus.delay(BL_PAGE_DELAY)\n            }\n\n            await this.waitForStatusAsync()\n\n            for (const f of this.classClients) {\n                if (f.pending) {\n                    let err = \"\"\n                    if (f.lastStatus) {\n                        const [session_id, page_error, pageAddrR] = jdunpack<\n                            [number, BootloaderError, number]\n                        >(f.lastStatus.data, \"u32 u32 u32\")\n                        if (session_id != this.sessionId)\n                            err = \"invalid session_id\"\n                        else if (pageAddrR != pageAddr)\n                            err = \"invalid page address\"\n                        else if (page_error)\n                            err =\n                                \"err: \" +\n                                (BootloaderError[page_error] || page_error)\n                    } else {\n                        err = \"timeout\"\n                    }\n                    if (err) {\n                        f.lastStatus = null\n                        log(`retry ${f.device}: ${err}`)\n                    } else {\n                        f.pending = false\n                    }\n                }\n            }\n\n            if (this.numPending() == 0) {\n                log(\n                    `page ${\n                        pageAddr & 0xffffff\n                    } done, ${i}/${BL_RETRIES} retries`,\n                )\n                return\n            }\n        }\n\n        throw new Error(\"too many retries\")\n    }\n\n    public async flashFirmwareBlob(fw: FirmwareBlob) {\n        const waitCycles = 15\n        this.progressTotal = fw.pages.length + waitCycles + 3\n        this.progressIndex = 0\n        const prog = () => {\n            this.updater.emit(PROGRESS, this.progress)\n            this.progressIndex++\n        }\n        try {\n            this.updater.emit(CHANGE)\n            prog()\n            await this.startFlashAsync()\n            prog()\n            for (const page of fw.pages) {\n                await this.flashPage(page)\n                prog()\n            }\n        } finally {\n            try {\n                // even if something failed, try to reset everyone\n                await this.endFlashAsync()\n                prog()\n                // wait until we're out of bootloader mode; otherwise the subsequent scan will keep devices in BL mode\n                for (let i = 0; i < waitCycles; ++i) {\n                    await this.bus.delay(150)\n                    prog()\n                }\n            } finally {\n                // even if resetting failed, unregister event listeners\n                for (const d of this.classClients) {\n                    d.stop()\n                }\n            }\n            this.updater.emit(CHANGE)\n        }\n    }\n}\n\nconst UF2_MAGIC_START0 = 0x0a324655\nconst UF2_MAGIC_START1 = 0x9e5d5157\nconst UF2_MAGIC_END = 0x0ab16f30\n\n/**\n * Parses a UF2 firmware binary into firmware blobs\n * @param uf2\n * @param store\n * @returns\n * @category Firmware\n */\nexport function parseUF2Firmware(\n    uf2: Uint8Array,\n    store: string,\n): FirmwareBlob[] {\n    const blobs: FirmwareBlob[] = []\n    let currBlob: FirmwareBlob\n    for (let off = 0; off < uf2.length; off += 512) {\n        const header = uf2.slice(off, off + 32)\n        const [\n            magic0,\n            magic1,\n            flags,\n            trgaddr,\n            payloadSize,\n            blkNo,\n            numBlocks,\n            familyID,\n        ] = bufferToArray(header, NumberFormat.UInt32LE)\n        if (\n            magic0 != UF2_MAGIC_START0 ||\n            magic1 != UF2_MAGIC_START1 ||\n            getNumber(uf2, NumberFormat.UInt32LE, off + 512 - 4) !=\n                UF2_MAGIC_END\n        )\n            throw new Error(\"invalid UF2\")\n        if (blkNo == 0) {\n            flush()\n            currBlob = {\n                pages: [],\n                productIdentifier: familyID,\n                version: \"\",\n                pageSize: 1024,\n                name: \"FW \" + familyID.toString(16),\n                store,\n            }\n        }\n        if (flags & 0x8000)\n            parseExtTags(uf2.slice(off + 32 + payloadSize, off + 512))\n        const pageSize = currBlob.pageSize || 1024\n        let currPage = currBlob.pages[currBlob.pages.length - 1]\n        if (\n            !currPage ||\n            !(\n                currPage.targetAddress <= trgaddr &&\n                trgaddr < currPage.targetAddress + pageSize\n            )\n        ) {\n            currPage = {\n                targetAddress: trgaddr & ~(pageSize - 1),\n                data: new Uint8Array(pageSize),\n            }\n            currPage.data.fill(0xff)\n            currBlob.pages.push(currPage)\n        }\n        currPage.data.set(\n            uf2.slice(off + 32, off + 32 + payloadSize),\n            trgaddr - currPage.targetAddress,\n        )\n    }\n    flush()\n    return blobs\n\n    function flush() {\n        if (currBlob) blobs.push(currBlob)\n    }\n\n    function parseExtTags(buf: Uint8Array) {\n        let sz = 0\n        for (let i = 0; i < buf.length; i += sz) {\n            sz = buf[i]\n            if (sz == 0) break\n            const desig = getNumber(buf, NumberFormat.UInt32LE, i) >>> 8\n            for (const key of Object.keys(uf2ExtTags)) {\n                const tg = uf2ExtTags[key]\n                if (desig == Math.abs(tg)) {\n                    let v: any\n                    if (tg < 0) {\n                        v = bufferToString(buf.slice(i + 4, i + sz))\n                    } else {\n                        v = getNumber(buf, NumberFormat.UInt32LE, i + 4)\n                    }\n                    const cbany = currBlob as any\n                    cbany[key] = v\n                    break\n                }\n            }\n            sz = (sz + 3) & ~3\n        }\n    }\n}\n\n/**\n * Firmware information\n * @internal\n */\nexport interface FirmwareInfo {\n    deviceId: string\n    version: string\n    name: string\n    productIdentifier: number\n    bootloaderProductIdentifier: number\n}\n\n/**\n * Parse a UF2 firmware file and extracts firmware blobs\n * @param blob\n * @param store\n * @returns\n * @category Firmware\n */\nexport async function parseFirmwareFile(\n    blob: Blob,\n    store?: string,\n): Promise<FirmwareBlob[]> {\n    const data = await readBlobToUint8Array(blob)\n    const buf = new Uint8Array(data)\n    const uf2Blobs = parseUF2Firmware(buf, store)\n    return uf2Blobs\n}\n\nasync function createFlashers(\n    updater: FirmwareUpdater,\n    bootloaderDeviceIds?: string[],\n) {\n    const bus = updater.bus\n    const flashers: FlashClient[] = []\n    const numTries = 10\n    const tryDelay = 10\n\n    const handlePkt = (p: Packet) => {\n        // note that we may get this even if recovery==false due to someone else asking\n        // (eg when the user set the recovery mode toggle)\n        if (\n            p.serviceIndex == 1 &&\n            p.serviceCommand == CMD_ADVERTISEMENT_DATA &&\n            p.getNumber(NumberFormat.UInt32LE, 0) == SRV_BOOTLOADER\n        ) {\n            if (!flashers.find(f => f.device.deviceId == p.deviceIdentifier)) {\n                log(`new flasher`)\n                flashers.push(new FlashClient(updater, p))\n            }\n        }\n    }\n\n    try {\n        bus.on(PACKET_REPORT, handlePkt)\n        for (let i = 0; i < numTries; ++i) {\n            if (bootloaderDeviceIds?.length > 1) {\n                // also ask BL services if any\n                const bl_announce = Packet.onlyHeader(CMD_ADVERTISEMENT_DATA)\n                await bl_announce.sendAsMultiCommandAsync(bus, SRV_BOOTLOADER)\n                await bus.delay(tryDelay)\n            } else {\n                for (const id of bootloaderDeviceIds) {\n                    const bl_announce = Packet.onlyHeader(\n                        CMD_ADVERTISEMENT_DATA,\n                    )\n                    bl_announce.serviceIndex = 1\n                    bl_announce.deviceIdentifier = id\n                    bl_announce.isCommand = true\n                    await bus.sendPacketAsync(bl_announce)\n                }\n            }\n            await bus.delay(tryDelay)\n        }\n    } finally {\n        bus.off(PACKET_REPORT, handlePkt)\n    }\n    return flashers\n}\n\n/**\n * Indicates if a firmware blob is applicated to the device information\n * @param dev\n * @param blob\n * @returns\n * @category Firmware\n */\nexport function updateApplicable(dev: FirmwareInfo, blob: FirmwareBlob) {\n    return (\n        dev &&\n        blob &&\n        dev.bootloaderProductIdentifier == blob.productIdentifier &&\n        dev.version !== blob.version\n    )\n}\n\n/**\n * This command can be sent every 50ms to keep devices in bootloader mode\n * @param bus\n * @category Firmware\n */\nexport async function sendStayInBootloaderCommand(bus: JDBus) {\n    const bl_announce = Packet.onlyHeader(BootloaderCmd.Info)\n    await bl_announce.sendAsMultiCommandAsync(bus, SRV_BOOTLOADER)\n}\n", "import { JDServiceServer } from \"./serviceserver\"\nimport { jdpack, jdunpack, PackedSimpleValue, PackedValues } from \"../pack\"\nimport { Packet } from \"../packet\"\nimport { bufferEq, isSet, pick } from \"../utils\"\nimport { JDEventSource } from \"../eventsource\"\nimport {\n    CHANGE,\n    CMD_GET_REG,\n    JD_SERIAL_MAX_PAYLOAD_SIZE,\n    PACKET_DATA_NORMALIZE,\n    PACKET_INVALID_DATA,\n    REGISTER_PRE_GET,\n    REPORT_RECEIVE,\n} from \"../constants\"\nimport { isRegister } from \"../spec\"\n\nfunction defaultFieldPayload(\n    specification: jdspec.PacketMember,\n): PackedSimpleValue {\n    let r: PackedSimpleValue = undefined\n    switch (specification.type) {\n        case \"bool\":\n            r = 0\n            break\n        case \"i8\":\n        case \"i16\":\n        case \"i32\":\n        case \"u8\":\n        case \"u16\":\n        case \"u32\": {\n            const min = pick(\n                specification.typicalMin,\n                specification.absoluteMin,\n                undefined,\n            )\n            const max = pick(\n                specification.typicalMax,\n                specification.absoluteMax,\n                undefined,\n            )\n            if (max !== undefined && min !== undefined) r = (max + min) / 2\n            else r = 0\n            break\n        }\n        case \"bytes\": {\n            r = new Uint8Array(0)\n            break\n        }\n        case \"string\":\n        case \"string0\": {\n            r = \"\"\n            break\n        }\n    }\n\n    if (/^(u0|i1)\\.\\d+$/.test(specification.type)) r = 0\n\n    return r\n}\n\nfunction defaultPayload<T extends PackedValues>(\n    specification: jdspec.PacketInfo,\n): T {\n    const { fields } = specification\n    const rs = fields.map(defaultFieldPayload)\n    return rs as T\n}\n\n/**\n * A register \"server\" instance, used to assembly service servers.\n * @category Servers\n */\nexport class JDRegisterServer<\n    TValues extends PackedValues,\n> extends JDEventSource {\n    data: Uint8Array\n    lastSetTime: number\n    private readonly resetData: Uint8Array\n    readonly specification: jdspec.PacketInfo\n    readOnly: boolean\n    errorRegister: JDRegisterServer<TValues>\n    skipBoundaryCheck = false\n    skipErrorInjection = false\n    valueProcessor: (values: TValues) => TValues\n\n    constructor(\n        public readonly service: JDServiceServer,\n        public readonly identifier: number,\n        defaultValue?: TValues,\n    ) {\n        super()\n        const serviceSpecification = this.service.specification\n        this.specification = serviceSpecification.packets.find(\n            pkt => isRegister(pkt) && pkt.identifier === this.identifier,\n        )\n        let v: PackedValues = defaultValue\n        if (!v && !this.specification.optional)\n            v = defaultPayload(this.specification)\n        if (v !== undefined && !v.some(vi => vi === undefined)) {\n            this.data = jdpack(this.packFormat, v)\n        }\n\n        // keep a copy to handle reset\n        this.resetData = this.data?.slice(0)\n\n        // don't check boundaries if there are none\n        this.skipBoundaryCheck = !this.specification?.fields.some(\n            field => isSet(field.absoluteMin) || isSet(field.absoluteMax),\n        )\n    }\n\n    get packFormat() {\n        return this.specification.packFormat\n    }\n\n    values(): TValues {\n        return jdunpack(this.data, this.packFormat) as TValues\n    }\n\n    private normalize(values: TValues) {\n        // enforce boundaries from spec\n        if (!this.skipBoundaryCheck) {\n            this.specification?.fields.forEach((field, fieldi) => {\n                if (field.isSimpleType) {\n                    let value = values[fieldi] as number\n                    // clamp within bounds\n                    const min = field.absoluteMin\n                    if (min !== undefined) value = Math.max(min, value)\n                    const max = field.absoluteMax\n                    if (max !== undefined) value = Math.min(max, value)\n                    // update\n                    values[fieldi] = value\n                }\n            })\n        }\n\n        // enforce other boundaries\n        this.emit(PACKET_DATA_NORMALIZE, values)\n    }\n\n    private shouldNormalize() {\n        return (\n            !this.skipBoundaryCheck || this.listenerCount(PACKET_DATA_NORMALIZE)\n        )\n    }\n\n    /**\n     * Sets the value on the register\n     * @param values values to set\n     * @param skipChangeEvent true to avoid emitting CHANGE\n     * @returns true if values changed; false otherwise\n     */\n    setValues(values: TValues, skipChangeEvent?: boolean) {\n        if (this.readOnly) return false\n\n        if (this.shouldNormalize()) this.normalize(values)\n        if (this.valueProcessor) values = this.valueProcessor(values)\n\n        const d = jdpack(this.packFormat, values)\n        if (!bufferEq(this.data, d)) {\n            this.data = d\n            if (!skipChangeEvent) this.emit(CHANGE)\n            return true\n        }\n\n        return false\n    }\n\n    reset() {\n        this.data = this.resetData?.slice(0)\n    }\n\n    allowLargeFrames = false\n\n    async sendGetAsync() {\n        this.emit(REGISTER_PRE_GET)\n\n        let d = this.data\n        if (!d) return\n        // large frames\n        if (this.allowLargeFrames && d.length > JD_SERIAL_MAX_PAYLOAD_SIZE) {\n            d = new Uint8Array(0)\n        }\n\n        const error =\n            !this.skipErrorInjection && this.errorRegister?.values()[0]\n        if (error && !isNaN(error)) {\n            // apply error artifically\n            const vs = this.values() as number[]\n            for (let i = 0; i < vs.length; ++i) {\n                vs[i] += Math.random() * error\n            }\n            d = jdpack(this.packFormat, vs)\n        }\n        await this.service.sendPacketAsync(\n            Packet.from(this.identifier | CMD_GET_REG, d),\n        )\n    }\n\n    handlePacket(pkt: Packet): boolean {\n        if (this.identifier !== pkt.registerIdentifier) return false\n\n        if (pkt.isRegisterGet) {\n            this.sendGetAsync()\n        } else if (this.identifier >> 8 !== 0x1) {\n            // set, non-const\n            let changed = false\n            let d = pkt.data\n\n            // unpack and check boundaries\n            if (this.shouldNormalize() || this.valueProcessor) {\n                try {\n                    // unpack, apply boundaries, repack\n                    let values = jdunpack<TValues>(d, this.packFormat)\n                    if (this.shouldNormalize()) this.normalize(values)\n                    if (this.valueProcessor)\n                        values = this.valueProcessor(values)\n                    d = jdpack<TValues>(this.packFormat, values)\n                } catch (e) {\n                    // invalid format, refuse\n                    this.emit(PACKET_INVALID_DATA, pkt)\n                }\n            }\n\n            // test if anything changed\n            if (!bufferEq(this.data, d)) {\n                this.data = d\n                changed = true\n            }\n            this.lastSetTime = this.service.timestamp\n            this.emit(REPORT_RECEIVE)\n            if (changed) this.emit(CHANGE)\n        }\n        return true\n    }\n}\n", "import {\n    BaseEvent,\n    SystemCmd,\n    SystemEvent,\n    SystemReg,\n    SystemStatusCodes,\n} from \"../../../jacdac-spec/dist/specconstants\"\nimport {\n    CHANGE,\n    DEVICE_CHANGE,\n    FRAME_PROCESS_LARGE,\n    PACKET_RECEIVE,\n    PACKET_SEND,\n    REPORT_UPDATE,\n} from \"../constants\"\nimport { JDServerServiceProvider } from \"./serverserviceprovider\"\nimport { JDEventSource } from \"../eventsource\"\nimport { Packet } from \"../packet\"\nimport { JDRegisterServer } from \"./registerserver\"\nimport { isRegister, serviceSpecificationFromClassIdentifier } from \"../spec\"\nimport { PackedValues } from \"../pack\"\nimport { JDService } from \"../service\"\n\nconst CALIBRATION_DELAY = 5000\n\n/**\n * Server instiation options\n * @category Servers\n */\nexport interface JDServerOptions {\n    /**\n     * Service instance name\n     */\n    instanceName?: string\n    /**\n     * This server instance is a twin of a physical device and should not emit any packet\n     */\n    twin?: JDService\n    /**\n     * Initial value for the ``value`` register\n     */\n    valueValues?: PackedValues\n    /**\n     * Initial value for the ``intensity`` register\n     */\n    intensityValues?: PackedValues\n\n    /**\n     * A callback to transform the received intensity value data\n     */\n    intensityProcessor?: (values: PackedValues) => PackedValues\n\n    /**\n     * Emit active/inactive events based on the intensity register\n     */\n    isActive?: (intensity: PackedValues) => boolean\n    /**\n     * Initial value for the ``variant`` register\n     */\n    variant?: number\n    /**\n     * Optional client variant register\n     */\n    clientVariant?: string\n    /**\n     * A map of custom register initial values\n     */\n    registerValues?: {\n        code: number\n        values: PackedValues\n    }[]\n}\n\n/**\n * Base class for service server implementations\n * @category Servers\n */\nexport class JDServiceServer extends JDEventSource {\n    public serviceIndex = -1 // set by device\n    private _device: JDServerServiceProvider\n    public readonly specification: jdspec.ServiceSpec\n    private readonly _registers: JDRegisterServer<PackedValues>[] = []\n    private readonly commands: {\n        [identifier: number]: (pkt: Packet) => void\n    } = {}\n    readonly statusCode: JDRegisterServer<[SystemStatusCodes, number]>\n    readonly instanceName: JDRegisterServer<[string]>\n    private _twin: JDService\n    private _twinCleanup: (() => void)[]\n    private _locked = false\n\n    constructor(\n        public readonly serviceClass: number,\n        options?: JDServerOptions,\n    ) {\n        super()\n        const {\n            instanceName,\n            variant,\n            valueValues,\n            intensityValues,\n            intensityProcessor,\n            registerValues,\n            clientVariant,\n            isActive,\n        } = options || {}\n\n        this.specification = serviceSpecificationFromClassIdentifier(\n            this.serviceClass,\n        )\n\n        this.statusCode = this.addRegister<[SystemStatusCodes, number]>(\n            SystemReg.StatusCode,\n            [SystemStatusCodes.Ready, 0],\n        )\n        if (valueValues) this.addRegister(SystemReg.Value, valueValues)\n        if (intensityValues) {\n            const intensity = this.addRegister(\n                SystemReg.Intensity,\n                intensityValues,\n            )\n            if (intensityProcessor)\n                intensity.valueProcessor = intensityProcessor\n            if (isActive)\n                intensity.on(CHANGE, () => {\n                    const ev = isActive(intensity.values())\n                    if (ev !== undefined)\n                        this.sendEvent(\n                            isActive(intensity.values())\n                                ? SystemEvent.Active\n                                : SystemEvent.Inactive,\n                        )\n                })\n        }\n        if (variant) this.addRegister<[number]>(SystemReg.Variant, [variant])\n        if (clientVariant)\n            this.addRegister<[string]>(SystemReg.ClientVariant, [clientVariant])\n        this.instanceName = this.addRegister<[string]>(SystemReg.InstanceName, [\n            instanceName || \"\",\n        ])\n\n        // any extra\n        registerValues?.forEach(({ code, values }) =>\n            this.addRegister<PackedValues>(code, values),\n        )\n\n        // emit event when status code changes\n        this.statusCode.on(CHANGE, () =>\n            this.sendEvent(BaseEvent.StatusCodeChanged, this.statusCode.data),\n        )\n\n        // if the device has a calibrate command, regiser handler\n        // and put device in calibrationneeded state\n        if (\n            this.specification.packets.find(\n                pkt =>\n                    pkt.kind === \"command\" &&\n                    pkt.identifier === SystemCmd.Calibrate,\n            )\n        ) {\n            this.addCommand(\n                SystemCmd.Calibrate,\n                this.handleCalibrate.bind(this),\n            )\n            this.statusCode.setValues(\n                [SystemStatusCodes.CalibrationNeeded, 0],\n                true,\n            )\n        }\n\n        this.handleTwinPacket = this.handleTwinPacket.bind(this)\n    }\n\n    get device() {\n        return this._device\n    }\n\n    set device(value: JDServerServiceProvider) {\n        if (this._device !== value) {\n            this._device = value\n            this.emit(DEVICE_CHANGE)\n            this.emit(CHANGE)\n        }\n    }\n\n    get twin() {\n        return this._twin\n    }\n\n    set twin(service: JDService) {\n        if (service === this._twin) return\n\n        if (this._twin) {\n            this._twin.off(PACKET_RECEIVE, this.handleTwinPacket)\n            this._twin.off(PACKET_SEND, this.handleTwinPacket)\n            this._twinCleanup.forEach(tw => tw())\n            // unsubscribe\n        }\n        this._twin = service\n        this._twinCleanup = service ? [] : undefined\n        if (this._twin) {\n            this._twin.on(PACKET_RECEIVE, this.handleTwinPacket)\n            this._twin.on(PACKET_SEND, this.handleTwinPacket)\n            this._twin.registers().forEach(twinReg => {\n                const reg = this.register(twinReg.code)\n                if (reg) {\n                    reg?.setValues(twinReg.unpackedValue)\n                    this._twinCleanup.push(\n                        twinReg.subscribe(REPORT_UPDATE, () =>\n                            reg.setValues(twinReg.unpackedValue),\n                        ),\n                    )\n                }\n            })\n        }\n\n        this.emit(CHANGE)\n    }\n\n    private handleTwinPacket(pkt: Packet) {\n        this.handlePacket(pkt)\n    }\n\n    get registers() {\n        return this._registers.slice(0)\n    }\n\n    get timestamp() {\n        const bus = this.device?.bus || this._twin?.device?.bus\n        return bus?.timestamp\n    }\n\n    register<TValues extends PackedValues = PackedValues>(\n        code: number,\n    ): JDRegisterServer<TValues> {\n        return this._registers.find(\n            reg => reg.identifier === code,\n        ) as JDRegisterServer<TValues>\n    }\n\n    protected addExistingRegister<TValues extends PackedValues = PackedValues>(\n        reg: JDRegisterServer<TValues>,\n    ) {\n        this._registers.push(reg)\n        return reg\n    }\n\n    addRegister<TValues extends PackedValues = PackedValues>(\n        identifier: number,\n        defaultValue?: TValues,\n    ): JDRegisterServer<TValues> {\n        let reg = this._registers.find(\n            r => r.identifier === identifier,\n        ) as JDRegisterServer<TValues>\n        if (!reg && !this._locked) {\n            // make sure this register is supported\n            if (\n                !this.specification.packets.find(\n                    pkt => isRegister(pkt) && pkt.identifier === identifier,\n                )\n            )\n                return undefined\n            reg = new JDRegisterServer<TValues>(this, identifier, defaultValue)\n            this._registers.push(reg)\n        }\n        return reg\n    }\n\n    reset() {\n        this.registers.forEach(reg => reg.reset())\n    }\n\n    /**\n     * Locks the current set of registers\n     */\n    public lock() {\n        this._locked = true\n    }\n\n    protected addCommand(identifier: number, handler: (pkt: Packet) => void) {\n        if (this._locked) console.error(`adding command to locked service`)\n        this.commands[identifier] = handler\n    }\n\n    async handlePacket(pkt: Packet) {\n        if (pkt.isRegisterGet || pkt.isRegisterSet) {\n            // find register to handle\n            const rid = pkt.registerIdentifier\n            let reg = this._registers.find(r => r.identifier === rid)\n            if (!reg) {\n                // try adding\n                reg = this.addRegister(rid)\n            }\n            reg?.handlePacket(pkt)\n        } else if (pkt.isCommand) {\n            const cmd = this.commands[pkt.serviceCommand]\n            if (cmd) cmd(pkt)\n            else if (cmd === undefined)\n                console.debug(`ignored command`, { pkt })\n        }\n        // ignored?\n    }\n\n    async sendPacketAsync(pkt: Packet) {\n        if (this.twin) return\n\n        pkt.serviceIndex = this.serviceIndex\n        await this.device.sendPacketAsync(pkt)\n    }\n\n    async sendEvent(eventCode: number, data?: Uint8Array) {\n        if (this.twin) return\n\n        const { device } = this\n        if (!device) return\n        const { bus } = device\n        if (!bus) return\n\n        const now = bus.timestamp\n        const cmd = device.createEventCmd(eventCode)\n        const pkt = Packet.from(cmd, data || new Uint8Array(0))\n        await this.sendPacketAsync(pkt)\n        device.delayedSend(pkt, now + 20)\n        device.delayedSend(pkt, now + 100)\n    }\n\n    private async handleCalibrate() {\n        const [status] = this.statusCode.values()\n        if (status !== SystemStatusCodes.Ready) return\n        this.calibrate()\n    }\n\n    processLargeFrame(command: string, data: Uint8Array) {\n        this.emit(FRAME_PROCESS_LARGE, command, data)\n    }\n\n    async calibrate() {\n        // notify that calibration started\n        this.statusCode.setValues([SystemStatusCodes.Calibrating, 0])\n        // wait 5 seconds\n        await this.device.bus.delay(CALIBRATION_DELAY)\n        // finish\n        this.statusCode.setValues([SystemStatusCodes.Ready, 0])\n    }\n}\n", "import { SystemReg } from \"../../jacdac-spec/dist/specconstants\"\nimport {\n    CHANGE,\n    READING_SENT,\n    REFRESH,\n    SensorReg,\n    STREAMING_DEFAULT_INTERVAL,\n} from \"../jdom/constants\"\nimport { PackedValues } from \"../jdom/pack\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\n/**\n * Creation options for sensor servers\n * @category Servers\n * @internal\n */\nexport interface SensorServiceOptions<TReading extends PackedValues>\n    extends JDServerOptions {\n    readingValues?: TReading\n    readingError?: TReading\n    streamingInterval?: number\n    preferredStreamingInterval?: number\n}\n\nexport class SensorServer<\n    TReading extends PackedValues,\n> extends JDServiceServer {\n    readonly reading: JDRegisterServer<TReading>\n    readonly readingError: JDRegisterServer<TReading>\n    readonly streamingSamples: JDRegisterServer<[number]>\n    readonly streamingInterval: JDRegisterServer<[number]>\n    readonly preferredStreamingInterval: JDRegisterServer<[number]>\n\n    private lastStream = 0\n    private lastErrorReadingChanged = false\n\n    constructor(\n        public readonly serviceClass: number,\n        options?: SensorServiceOptions<TReading>,\n    ) {\n        super(serviceClass, options)\n        const {\n            readingValues,\n            streamingInterval,\n            preferredStreamingInterval,\n            readingError,\n        } = options || {}\n        this.reading = this.addRegister<TReading>(\n            SystemReg.Reading,\n            readingValues,\n        )\n        this.streamingSamples = this.addRegister<[number]>(\n            SensorReg.StreamingSamples,\n        )\n        this.streamingInterval = this.addRegister<[number]>(\n            SensorReg.StreamingInterval,\n            [\n                streamingInterval ||\n                    preferredStreamingInterval ||\n                    this.reading.specification.preferredInterval ||\n                    STREAMING_DEFAULT_INTERVAL,\n            ],\n        )\n        if (preferredStreamingInterval !== undefined)\n            this.preferredStreamingInterval = this.addRegister<[number]>(\n                SensorReg.StreamingPreferredInterval,\n                [preferredStreamingInterval],\n            )\n        if (readingError !== undefined) {\n            this.readingError = this.addRegister<TReading>(\n                SystemReg.ReadingError,\n                readingError,\n            )\n            this.reading.errorRegister = this.readingError\n            this.readingError.on(\n                CHANGE,\n                () => (this.lastErrorReadingChanged = true),\n            )\n        }\n\n        this.on(REFRESH, this.refreshRegisters.bind(this))\n    }\n\n    private refreshRegisters() {\n        const [samples] = this.streamingSamples.values()\n        if (samples <= 0 || !this.reading.data) return\n        // is it time to stream?\n        let interval = this.streamingInterval?.values()?.[0]\n        if (interval === undefined)\n            interval = this.preferredStreamingInterval?.values()?.[0]\n        if (interval === undefined)\n            interval = this.reading.specification.preferredInterval\n        if (interval === undefined) interval = STREAMING_DEFAULT_INTERVAL\n\n        const now = this.device.bus.timestamp\n        if (now - this.lastStream > interval) {\n            // let's stream a value!\n            this.lastStream = now\n            this.streamingSamples.setValues([samples - 1])\n            this.reading.sendGetAsync()\n            this.emit(READING_SENT)\n\n            // if the error changed, send value as well.\n            if (this.lastErrorReadingChanged) {\n                this.readingError?.sendGetAsync()\n                this.lastErrorReadingChanged = false\n            }\n        }\n    }\n}\n", "import { SensorServer } from \"./sensorserver\"\nimport {\n    RealTimeClockCmd,\n    RealTimeClockReg,\n    RealTimeClockVariant,\n    REFRESH,\n    SRV_REAL_TIME_CLOCK,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDBus } from \"../jdom/bus\"\nimport { Packet } from \"../jdom/packet\"\n\n/**\n * @internal\n */\nexport type RealTimeClockReadingType = [\n    number,\n    number,\n    number,\n    number,\n    number,\n    number,\n    number,\n]\n\n/**\n * @internal\n */\nexport function dateToClock(n: Date): RealTimeClockReadingType {\n    const year = n.getFullYear()\n    const month = n.getMonth() + 1\n    const dayOfMonth = n.getDate()\n    const dayOfWeek = n.getDay()\n    const hour = n.getHours()\n    const min = n.getMinutes()\n    const sec = n.getSeconds()\n\n    return [year, month, dayOfMonth, dayOfWeek, hour, min, sec]\n}\n\nexport class RealTimeClockServer extends SensorServer<RealTimeClockReadingType> {\n    readonly drift: JDRegisterServer<[number]>\n    readonly precision: JDRegisterServer<[number]>\n    private lastSecond = 0\n\n    constructor() {\n        super(SRV_REAL_TIME_CLOCK, {\n            readingValues: dateToClock(new Date()),\n            variant: RealTimeClockVariant.Computer,\n            streamingInterval: 1000,\n        })\n\n        this.drift = this.addRegister<[number]>(RealTimeClockReg.Drift, [0])\n        this.precision = this.addRegister<[number]>(\n            RealTimeClockReg.Precision,\n            [0],\n        )\n\n        this.addCommand(RealTimeClockCmd.SetTime, this.handleSetTime.bind(this))\n        this.on(REFRESH, this.refreshTime.bind(this))\n    }\n\n    static async syncTime(bus: JDBus) {\n        const values = dateToClock(new Date())\n        const pkt = Packet.jdpacked<RealTimeClockReadingType>(\n            RealTimeClockCmd.SetTime,\n            \"u16 u8 u8 u8 u8 u8 u8\",\n            values,\n        )\n        await pkt.sendAsMultiCommandAsync(bus, SRV_REAL_TIME_CLOCK)\n    }\n\n    private handleSetTime(pkt: Packet) {\n        //console.debug(`set time`, { pkt })\n    }\n\n    private refreshTime() {\n        const d = new Date()\n        const s = d.getSeconds()\n        if (s !== this.lastSecond) {\n            const r = dateToClock(d)\n            this.reading.setValues(r)\n            this.lastSecond = s\n        }\n    }\n}\n", "import { JDBus } from \"../bus\"\nimport {\n    CHANGE,\n    CONNECT,\n    CONNECTING,\n    CONNECTION_STATE,\n    DISCONNECT,\n    DISCONNECTING,\n    ERROR,\n    LOST,\n    FRAME_SEND_DISCONNECT,\n    SELF_ANNOUNCE,\n    TRANSPORT_CONNECT_RETRY_DELAY,\n    DISPOSE,\n    TRANSPORT_ERROR,\n    LOG,\n} from \"../constants\"\nimport { isCancelError } from \"../error\"\nimport { JDEventSource } from \"../eventsource\"\nimport { Flags } from \"../flags\"\nimport { Observable } from \"../observable\"\nimport { assert, delay } from \"../utils\"\n\n/**\n * Connection states for transports\n * @category Transport\n */\nexport enum ConnectionState {\n    Connected = \"connected\",\n    Connecting = \"connecting\",\n    Disconnecting = \"disconnecting\",\n    Disconnected = \"disconnected\",\n}\n\n/**\n * General options for the transports\n * @category Transport\n */\nexport interface TransportOptions {\n    // if no packets is received within the pulse interval, disconnect/reconnect\n    checkPulse?: boolean\n    disconnectOnError?: boolean\n    connectObservable?: Observable<void>\n    disconnectObservable?: Observable<void>\n}\n\n/**\n * A transport marshalls Jacdac packets between a physical device on the TypeScript bus.\n * @category Transport\n */\nexport abstract class Transport extends JDEventSource {\n    private _bus: JDBus\n    private _checkPulse: boolean\n    private _connectionTime: number\n    private _lastReceivedTime: number\n    private _lastPulse: number\n    protected disposed = false\n    private _cleanups: (() => void)[]\n    private _disconnectOnError: boolean\n    resourceGroupId: string\n\n    constructor(readonly type: string, options?: TransportOptions) {\n        super()\n        this.checkPulse = this.checkPulse.bind(this)\n        this._checkPulse = !!options?.checkPulse\n        this._disconnectOnError = !!options?.disconnectOnError\n        this._cleanups = [\n            options?.connectObservable?.subscribe({\n                next: async () => {\n                    const { bus } = this\n                    if (Flags.diagnostics)\n                        console.debug(\n                            `${this.type}: device detected, connect ${\n                                bus?.autoConnect ? \"auto\" : \"manual\"\n                            }`\n                        )\n                    if (bus?.disconnected && this.bus?.autoConnect) {\n                        await delay(TRANSPORT_CONNECT_RETRY_DELAY)\n                        if (bus?.disconnected && bus?.autoConnect) {\n                            if (\n                                typeof document === \"undefined\" || // Node.js\n                                document.visibilityState === \"visible\" // or tab visible\n                            ) {\n                                this.connect(true)\n                            }\n                        }\n                    }\n                },\n            })?.unsubscribe,\n            options?.disconnectObservable?.subscribe({\n                next: () => {\n                    this.disconnect()\n                },\n            })?.unsubscribe,\n        ].filter(c => !!c)\n    }\n\n    protected get pulseTimeout() {\n        // typically, when no packets received within 1s, something went wrong - reconnect\n        return 1000\n    }\n\n    get bus() {\n        return this._bus\n    }\n\n    description(): string {\n        return undefined\n    }\n\n    async disconnectBus() {\n        if (this._bus) {\n            this._bus.off(SELF_ANNOUNCE, this.checkPulse)\n            await this.disconnect() // async\n        }\n        this._bus = undefined\n    }\n\n    setBus(bus: JDBus) {\n        assert(!this._bus)\n        assert(!!bus)\n        this._bus = bus\n        if (this._bus && this._checkPulse)\n            this._bus.on(SELF_ANNOUNCE, this.checkPulse)\n    }\n\n    private _connectionState = ConnectionState.Disconnected\n    private _connectPromise: Promise<void>\n    private _disconnectPromise: Promise<void>\n\n    /**\n     * Gets the bus connection state.\n     */\n    get connectionState(): ConnectionState {\n        return this._connectionState\n    }\n\n    private setConnectionState(state: ConnectionState) {\n        if (this._connectionState !== state) {\n            //console.debug(`${this._connectionState} -> ${state}`)\n            this._connectionState = state\n            this._connectionTime =\n                state === ConnectionState.Connected\n                    ? this.bus?.timestamp\n                    : undefined\n            this._lastReceivedTime = undefined\n            this.emit(CONNECTION_STATE, this._connectionState)\n            this.bus?.emit(CONNECTION_STATE, this)\n            switch (this._connectionState) {\n                case ConnectionState.Connected:\n                    this.emit(CONNECT)\n                    break\n                case ConnectionState.Connecting:\n                    this.emit(CONNECTING)\n                    break\n                case ConnectionState.Disconnecting:\n                    this.emit(DISCONNECTING)\n                    break\n                case ConnectionState.Disconnected:\n                    this.emit(DISCONNECT)\n                    break\n            }\n            this.emit(CHANGE)\n            this.bus?.emit(CHANGE)\n        }\n    }\n\n    get connecting() {\n        return this.connectionState == ConnectionState.Connecting\n    }\n\n    get disconnecting() {\n        return this.connectionState == ConnectionState.Disconnecting\n    }\n\n    get connected() {\n        return this._connectionState == ConnectionState.Connected\n    }\n\n    get disconnected() {\n        return this._connectionState == ConnectionState.Disconnected\n    }\n\n    protected abstract transportSendPacketAsync(pkt: Uint8Array): Promise<void>\n    protected abstract transportConnectAsync(\n        background?: boolean\n    ): Promise<void>\n    protected abstract transportDisconnectAsync(\n        background?: boolean\n    ): Promise<void>\n\n    private async checkPulse() {\n        assert(this._checkPulse)\n\n        const { bus, _lastPulse } = this\n\n        const n = Date.now()\n        this._lastPulse = n\n        if (_lastPulse) {\n            const d = n - _lastPulse\n            // ignore pulse checks that are too much out of the 500ms period -\n            // we might have been very busy and didn't process any incoming packets\n            if (d < 400 || d > 700) return\n        }\n\n        if (!this.connected || !bus) return // ignore while not connected\n        if (bus.safeBoot) return // don't mess with flashing bootloaders\n        const devices = bus.devices()\n        if (devices?.some(dev => dev.firmwareUpdater))\n            // don't mess with flashing\n            return\n\n        // detect if the proxy device is lost\n        const t =\n            bus.timestamp - (this._lastReceivedTime || this._connectionTime)\n        if (t > this.pulseTimeout) {\n            this.emit(LOST)\n            if (Flags.diagnostics)\n                console.debug(\n                    `${this.type}: lost connection with device t=${bus.timestamp}`\n                )\n            if (this._lastReceivedTime !== undefined) {\n                await this.reconnect()\n                if (this.connectionState == ConnectionState.Disconnected) {\n                    // try again\n                    await delay(500)\n                    await this.reconnect()\n                }\n            } else await this.disconnect(true)\n        }\n    }\n\n    async sendPacketWhenConnectedAsync(frame: Uint8Array) {\n        if (this.connected) await this.transportSendPacketAsync(frame)\n        else this.emit(FRAME_SEND_DISCONNECT, frame)\n    }\n\n    connect(background?: boolean): Promise<void> {\n        if (Flags.diagnostics)\n            console.debug(\n                `${this.type}: connect ${background ? `(background)` : \"\"}`\n            )\n        if (this.disposed)\n            throw new Error(\"attempted to connect to a disposed transport\")\n        // already connected\n        if (this.connectionState == ConnectionState.Connected) {\n            if (Flags.diagnostics)\n                console.debug(`${this.type}: already connected`)\n            return Promise.resolve()\n        }\n\n        // connecting\n        if (!this._connectPromise) {\n            // already disconnecting, retry when disconnected\n            if (this._disconnectPromise) {\n                if (Flags.diagnostics)\n                    console.debug(\n                        `${this.type}: queuing connect after disconnecting`\n                    )\n                const p = this._disconnectPromise\n                this._disconnectPromise = undefined\n                this._connectPromise = p.then(() => this.connect())\n            } else {\n                // starting a fresh connection\n                console.debug(`${this.type}: connecting`)\n                this._connectPromise = Promise.resolve()\n                this.setConnectionState(ConnectionState.Connecting)\n                this._connectPromise = this._connectPromise.then(() =>\n                    this.transportConnectAsync(background)\n                )\n                const p = (this._connectPromise = this._connectPromise\n                    .then(() => {\n                        if (p == this._connectPromise) {\n                            this._connectPromise = undefined\n                            this.setConnectionState(ConnectionState.Connected)\n                        } else {\n                            console.debug(\n                                `${this.type}: connection aborted in flight`,\n                                {\n                                    state: this._connectionState,\n                                    old: this._connectPromise,\n                                    new: p,\n                                }\n                            )\n                            // already reported\n                        }\n                    })\n                    .catch(e => {\n                        if (p == this._connectPromise) {\n                            this._connectPromise = undefined\n                            this.setConnectionState(\n                                ConnectionState.Disconnected\n                            )\n                            if (!background) this.errorHandler(CONNECT, e)\n                            else if (Flags.diagnostics)\n                                console.debug(\n                                    `${this.type}: background connect failed, ${e.message}`\n                                )\n                        } else {\n                            if (Flags.diagnostics)\n                                console.debug(\n                                    `${this.type}: connection error aborted in flight`\n                                )\n                        }\n                    }))\n            }\n        } else {\n            if (Flags.diagnostics)\n                console.debug(`${this.type}: connect with existing promise`)\n        }\n        return this._connectPromise\n    }\n\n    disconnect(background?: boolean): Promise<void> {\n        // already disconnected\n        if (this.connectionState == ConnectionState.Disconnected)\n            return Promise.resolve()\n\n        if (!this._disconnectPromise) {\n            // connection in progress, wait and disconnect when done\n            if (this._connectPromise) {\n                if (Flags.diagnostics)\n                    console.debug(\n                        `${this.type}: cancelling connection and disconnect`\n                    )\n                this._connectPromise = undefined\n            }\n            console.debug(`${this.type}: disconnecting`)\n            this._disconnectPromise = Promise.resolve()\n            this.setConnectionState(ConnectionState.Disconnecting)\n            this._disconnectPromise = this._disconnectPromise.then(() =>\n                this.transportDisconnectAsync(background)\n            )\n            this._disconnectPromise = this._disconnectPromise\n                .catch(e => {\n                    this._disconnectPromise = undefined\n                    this.errorHandler(DISCONNECT, e)\n                })\n                .finally(() => {\n                    this._disconnectPromise = undefined\n                    this.setConnectionState(ConnectionState.Disconnected)\n                })\n        } else {\n            if (Flags.diagnostics)\n                console.debug(`${this.type}: disconnect with existing promise`)\n        }\n        return this._disconnectPromise\n    }\n\n    async reconnect() {\n        if (Flags.diagnostics) console.debug(`${this.type}: reconnect`)\n        await this.disconnect(true)\n        await this.connect(true)\n    }\n\n    protected handleFrame(payload: Uint8Array, skipCrc = false) {\n        const { bus } = this\n        if (!bus) return\n\n        const { timestamp } = bus\n        this._lastReceivedTime = timestamp\n        this.bus.processFrame(payload, this.type, skipCrc)\n    }\n\n    protected handleLog(line: string) {\n        this.emit(LOG, line)\n    }    \n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    protected errorHandler(context: string, exception: any) {\n        if (!isCancelError(exception)) {\n            this.emit(ERROR, { context, exception })\n            // maybe have been already disconnected\n            this.bus?.emit(TRANSPORT_ERROR, {\n                transport: this,\n                context,\n                exception,\n            })\n        }\n        this.emit(CHANGE)\n\n        if (this._disconnectOnError) {\n            // when a microbit flash is initiated via file download, the device will\n            // stop responding. we should not try to reconnect while this is the case\n            this.disconnect(true)\n        }\n    }\n\n    sendSideData(data: any): Promise<void> {\n        throw new Error(`side data not supported on ${this}`)\n    }\n\n    dispose() {\n        this.emit(DISPOSE)\n        this.disposed = true\n        this._cleanups.forEach(c => c())\n        this._cleanups = []\n    }\n}\n", "import { JDBus } from \"./bus\"\nimport { CHANGE, PACKET_PROCESS, PACKET_SEND, SELF_ANNOUNCE } from \"./constants\"\nimport { JDEventSource } from \"./eventsource\"\nimport { Packet } from \"./packet\"\n\nexport interface BusStats {\n    packets: number\n    announce: number\n    acks: number\n    bytes: number\n\n    devices: number\n    simulators: number\n    transport?: string\n}\n\ninterface Stats {\n    packets: number\n    announce: number\n    acks: number\n    bytes: number\n}\n\nexport class BusStatsMonitor extends JDEventSource {\n    private readonly _prev: Stats[] = Array(4)\n        .fill(0)\n        .map(() => ({\n            packets: 0,\n            announce: 0,\n            acks: 0,\n            bytes: 0,\n        }))\n    private _previ = 0\n    private _temp: Stats = {\n        packets: 0,\n        announce: 0,\n        acks: 0,\n        bytes: 0,\n    }\n\n    /**\n     * @internal\n     */\n    constructor(private readonly bus: JDBus) {\n        super()\n        bus.on(PACKET_SEND, this.handlePacketSend.bind(this))\n        bus.on(PACKET_PROCESS, this.handlePacketProcess.bind(this))\n        bus.on(SELF_ANNOUNCE, this.handleSelfAnnounce.bind(this))\n    }\n\n    /**\n     * Computes the current packet statistics of the bus\n     */\n    get current(): BusStats {\n        const r: Stats = {\n            packets: 0,\n            announce: 0,\n            acks: 0,\n            bytes: 0,\n        }\n        const n = this._prev.length\n        for (let i = 0; i < this._prev.length; ++i) {\n            const p = this._prev[i]\n            r.packets += p.packets\n            r.announce += p.announce\n            r.acks += p.acks\n            r.bytes += p.bytes\n        }\n        // announce every 500ms\n        const n2 = n / 2\n        r.packets /= n2\n        r.announce /= n2\n        r.acks /= n2\n        r.bytes /= n2\n        return {\n            devices: this.bus.devices({ ignoreInfrastructure: true }).length,\n            simulators: this.bus.serviceProviders().length,\n            transport: this.bus.transports.find(\n                transport => transport.connected,\n            )?.type,\n            ...r,\n        }\n    }\n\n    private accumulate(pkt: Packet) {\n        this._temp.packets++\n        this._temp.bytes += (pkt.header?.length || 0) + (pkt.data?.length || 0)\n        if (pkt.isAnnounce) this._temp.announce++\n        if (pkt.isCRCAck) this._temp.acks++\n    }\n\n    private handleSelfAnnounce() {\n        const changed =\n            JSON.stringify(this._prev) !== JSON.stringify(this._temp)\n        this._prev[this._previ] = this._temp\n        this._previ = (this._previ + 1) % this._prev.length\n        this._temp = {\n            packets: 0,\n            announce: 0,\n            acks: 0,\n            bytes: 0,\n        }\n        if (changed) this.emit(CHANGE)\n    }\n\n    private handlePacketSend(pkt: Packet) {\n        this.accumulate(pkt)\n    }\n\n    private handlePacketProcess(pkt: Packet) {\n        this.accumulate(pkt)\n    }\n}\n", "import {\n    ControlAnnounceFlags,\n    ControlCmd,\n    ControlReg,\n    IDENTIFY,\n    SRV_CONTROL,\n} from \"../constants\"\nimport { Packet } from \"../packet\"\nimport { JDRegisterServer } from \"./registerserver\"\nimport { JDServiceServer } from \"./serviceserver\"\n\n/**\n * A control service server\n * @category Servers\n */\nexport class ControlServer extends JDServiceServer {\n    readonly deviceDescription: JDRegisterServer<[string]>\n    readonly mcuTemperature: JDRegisterServer<[number]>\n    readonly resetIn: JDRegisterServer<[number]>\n    readonly uptime: JDRegisterServer<[number]>\n    private startTime: number\n\n    constructor(options?: { resetIn?: boolean; deviceDescription?: string }) {\n        super(SRV_CONTROL)\n        const { resetIn, deviceDescription } = options || {}\n        this.startTime = Date.now()\n        this.deviceDescription = this.addRegister<[string]>(\n            ControlReg.DeviceDescription,\n            [deviceDescription || \"Simulated\"]\n        )\n        this.mcuTemperature = this.addRegister<[number]>(\n            ControlReg.McuTemperature,\n            [25]\n        )\n        this.uptime = this.addRegister<[number]>(ControlReg.Uptime)\n        if (resetIn)\n            this.resetIn = this.addRegister<[number]>(ControlReg.ResetIn, [0])\n\n        this.addRegister(ControlReg.FirmwareVersion, [\"0.0.0\"])\n        this.addRegister(ControlReg.ProductIdentifier, [0])\n        this.addRegister(ControlReg.BootloaderProductIdentifier, [0])\n\n        this.addCommand(ControlCmd.Services, this.announce.bind(this))\n        this.addCommand(ControlCmd.Identify, this.identify.bind(this))\n        this.addCommand(ControlCmd.Reset, this.handleReset.bind(this))\n        this.addCommand(ControlCmd.Noop, null)\n    }\n\n    async announce() {\n        // restartCounter, flags, packetCount, serviceClass\n        const pkt = Packet.jdpacked<[ControlAnnounceFlags, number, number[]]>(\n            ControlCmd.Services,\n            \"u16 u8 x[1] u32[]\",\n            [\n                this.device.restartCounter |\n                    ControlAnnounceFlags.StatusLightRgbNoFade |\n                    ControlAnnounceFlags.SupportsACK,\n                this.device.packetCount + 1,\n                this.device\n                    .services()\n                    .slice(1)\n                    .map(srv => srv.serviceClass),\n            ]\n        )\n\n        await this.sendPacketAsync(pkt)\n\n        // micros\n        this.uptime.setValues([(Date.now() - this.startTime) * 100], true)\n\n        // check if we need to reset\n        if (this.resetIn) {\n            const [resetIn] = this.resetIn.values()\n            if (resetIn) {\n                const resetTimestamp = resetIn / 1000 + this.resetIn.lastSetTime\n                if (resetTimestamp < this.device.bus.timestamp) {\n                    // reset in expired\n                    console.debug(`${this} reset in expired`, {\n                        resetIn,\n                        lastSet: this.resetIn.lastSetTime,\n                        resetTimestamp,\n                    })\n                    this.device.reset()\n                }\n            }\n        }\n    }\n\n    async identify() {\n        this.emit(IDENTIFY)\n    }\n\n    private handleReset() {\n        this.startTime = Date.now()\n        this.device.reset()\n    }\n}\n", "import { JDBus } from \"../bus\"\nimport {\n    CHANGE,\n    PACKET_PROCESS,\n    SELF_ANNOUNCE,\n} from \"../constants\"\nimport { JDEventSource } from \"../eventsource\"\nimport { Packet } from \"../packet\"\nimport { shortDeviceId } from \"../pretty\"\nimport { randomDeviceId } from \"../random\"\nimport { JDServiceServer } from \"./serviceserver\"\n\n/**\n * Implements a device with service servers.\n * @category Servers\n */\nexport abstract class JDServiceProvider extends JDEventSource {\n    private _bus: JDBus\n    public readonly template: string\n    public readonly deviceId: string\n    public readonly shortId: string\n\n    constructor(template: string, deviceId?: string) {\n        super()\n        this.template = template\n        this.deviceId = deviceId\n        if (!this.deviceId) this.deviceId = randomDeviceId()\n        this.shortId = shortDeviceId(this.deviceId)\n        this.handleSelfAnnounce = this.handleSelfAnnounce.bind(this)\n        this.handlePacket = this.handlePacket.bind(this)\n    }\n\n    get bus() {\n        return this._bus\n    }\n\n    set bus(value: JDBus) {\n        if (value !== this._bus) {\n            this.stop()\n            this._bus = value\n            if (this._bus) this.start()\n            this.emit(CHANGE)\n        }\n    }\n\n    protected start() {\n        if (this._bus) {\n            this._bus.on(SELF_ANNOUNCE, this.handleSelfAnnounce)\n            this._bus.on(PACKET_PROCESS, this.handlePacket)\n        }\n    }\n\n    protected stop() {\n        if (this._bus) {\n            this._bus.off(SELF_ANNOUNCE, this.handleSelfAnnounce)\n            this._bus.off(PACKET_PROCESS, this.handlePacket)\n            this._bus = undefined\n        }\n    }\n\n    abstract service(serviceIndex: number): JDServiceServer\n\n    protected handleSelfAnnounce(): void {\n        this.emit(SELF_ANNOUNCE)\n    }\n    protected abstract handlePacket(pkt: Packet): void\n}\n", "import { JDServiceServer } from \"./serviceserver\"\nimport { Packet } from \"../packet\"\nimport { isBufferEmpty } from \"../utils\"\nimport { ControlServer } from \"./controlserver\"\nimport {\n    CHANGE,\n    CMD_EVENT_COUNTER_MASK,\n    CMD_EVENT_COUNTER_POS,\n    CMD_EVENT_MASK,\n    CONNECT,\n    DISCONNECT,\n    ERROR,\n    JD_SERVICE_INDEX_CRC_ACK,\n    MAX_SERVICES_LENGTH,\n    REFRESH,\n    RESET,\n} from \"../constants\"\nimport { JDServiceProvider } from \"./serviceprovider\"\n\n/**\n * Implements a device with service servers.\n * @category Servers\n */\nexport class JDServerServiceProvider extends JDServiceProvider {\n    private _services: JDServiceServer[]\n    public readonly controlService: ControlServer\n    private _restartCounter = 0\n    private _packetCount = 0\n    private _eventCounter: number = undefined\n    private _delayedPackets: {\n        timestamp: number\n        pkt: Packet\n    }[]\n\n    constructor(\n        template: string,\n        services: JDServiceServer[],\n        options?: {\n            deviceId?: string\n            resetIn?: boolean\n            deviceDescription?: string\n        }\n    ) {\n        super(template, options?.deviceId)\n        this.controlService = new ControlServer(options)\n        this._services = []\n        this.updateServices(services)\n\n        this.on(REFRESH, this.refreshRegisters.bind(this))\n    }\n\n    updateServices(services: JDServiceServer[]) {\n        // clear previous services\n        this._services?.slice(1).forEach(srv => (srv.device = undefined))\n        // store new services\n        this._services = [this.controlService, ...services]\n        if (this._services.length >= MAX_SERVICES_LENGTH) {\n            this.emit(\n                ERROR,\n                `too many services (${this._services.length}) > ${MAX_SERVICES_LENGTH}`\n            )\n            console.warn(`jacdac: dropping services to ${MAX_SERVICES_LENGTH}`)\n            this._services = this._services.slice(0, MAX_SERVICES_LENGTH)\n        }\n        this._services.forEach((srv, i) => {\n            srv.device = this\n            srv.serviceIndex = i\n        })\n        this.emit(CHANGE)\n    }\n\n    removeService(service: JDServiceServer) {\n        if (service?.device !== this) return // not in this device;\n        const newServices = this._services.slice(1)\n        const index = newServices.indexOf(service)\n        if (index > -1) {\n            newServices.splice(index, 1)\n            this.updateServices(newServices)\n        }\n    }\n\n    protected start() {\n        super.start()\n        this._packetCount = 0\n        this.emit(CONNECT)\n    }\n\n    protected stop() {\n        this.emit(DISCONNECT)\n        this._delayedPackets = undefined\n        super.stop()\n    }\n\n    protected handleSelfAnnounce() {\n        super.handleSelfAnnounce()\n        if (this._restartCounter < 0xf) this._restartCounter++\n        // async\n        this.controlService.announce()\n        // also send status codes, for non-zero codes\n        const activeServices = this.services().filter(\n            srv => !isBufferEmpty(srv.statusCode.data)\n        )\n        activeServices.forEach(srv => srv.statusCode.sendGetAsync())\n\n        // reset counter\n        this._packetCount = 0\n    }\n\n    get restartCounter() {\n        return this._restartCounter\n    }\n\n    get packetCount() {\n        return this._packetCount\n    }\n\n    services(): JDServiceServer[] {\n        return this._services.slice(0)\n    }\n\n    service(serviceIndex: number) {\n        return serviceIndex !== undefined && this._services[serviceIndex]\n    }\n\n    toString() {\n        return `host ${this.shortId}`\n    }\n\n    get eventCounter() {\n        return this._eventCounter\n    }\n\n    createEventCmd(evCode: number) {\n        if (!this._eventCounter) this._eventCounter = 0\n        this._eventCounter = (this._eventCounter + 1) & CMD_EVENT_COUNTER_MASK\n        if (evCode >> 8) throw new Error(\"invalid event code\")\n        return (\n            CMD_EVENT_MASK |\n            (this._eventCounter << CMD_EVENT_COUNTER_POS) |\n            evCode\n        )\n    }\n\n    async sendPacketAsync(pkt: Packet) {\n        if (!this.bus) return Promise.resolve()\n\n        // qos counter\n        this._packetCount++\n\n        pkt.deviceIdentifier = this.deviceId\n        // compute crc and send\n        return pkt.sendCoreAsync(this.bus)\n    }\n\n    delayedSend(pkt: Packet, timestamp: number) {\n        if (!this._delayedPackets) {\n            this._delayedPackets = []\n            // start processing loop\n            setTimeout(this.processDelayedPackets.bind(this), 10)\n        }\n        const dp = { timestamp, pkt }\n        this._delayedPackets.push(dp)\n        this._delayedPackets.sort((l, r) => -l.timestamp + r.timestamp)\n    }\n\n    private processDelayedPackets() {\n        // consume packets that are ready\n        while (this._delayedPackets?.length) {\n            const { timestamp, pkt } = this._delayedPackets[0]\n            if (timestamp > this.bus.timestamp) break\n            this._delayedPackets.shift()\n            // do we wait?\n            try {\n                this.sendPacketAsync(pkt)\n            } catch (e) {\n                // something went wrong, clear queue\n                this._delayedPackets = undefined\n                throw e\n            }\n        }\n        // keep waiting or stop\n        if (!this._delayedPackets?.length) this._delayedPackets = undefined\n        // we're done\n        else setTimeout(this.processDelayedPackets.bind(this), 10)\n    }\n\n    protected handlePacket(pkt: Packet) {\n        const devIdMatch = pkt.deviceIdentifier == this.deviceId\n        if (pkt.requiresAck && devIdMatch) {\n            pkt.requiresAck = false // make sure we only do it once\n            const crc = pkt.crc\n            const ack = Packet.onlyHeader(crc)\n            ack.serviceIndex = JD_SERVICE_INDEX_CRC_ACK\n            this.sendPacketAsync(ack)\n        }\n\n        if (pkt.isMultiCommand) {\n            if (!pkt.isCommand) return // only commands supported\n            const multiCommandClass = pkt.serviceClass\n            for (const h of this._services) {\n                if (h.serviceClass == multiCommandClass) {\n                    // pretend it's directly addressed to us\n                    const npkt = pkt.cloneForDevice(\n                        this.deviceId,\n                        h.serviceIndex\n                    )\n                    h.handlePacket(npkt)\n                }\n            }\n        } else if (devIdMatch) {\n            if (!pkt.isCommand) return // huh? someone's pretending to be us?\n            const h = this._services[pkt.serviceIndex]\n            if (h) {\n                // log(`handle pkt at ${h.name} cmd=${pkt.service_command}`)\n                h.handlePacket(pkt)\n            }\n        } else {\n            if (pkt.isCommand) return // it's a command, and it's not for us\n            // reception of ACKs is handled by JDDevice class\n        }\n    }\n\n    private refreshRegisters() {\n        this._services.forEach(srv => srv.emit(REFRESH))\n    }\n\n    reset() {\n        this._restartCounter = 0\n        this._packetCount = 0\n        this._services?.forEach(srv => srv.reset())\n        this.emit(RESET)\n    }\n}\n", "import { JDEventSource } from \"./eventsource\"\n\n/**\n * Base class for clients\n * @category Clients\n */\nexport class JDClient extends JDEventSource {\n    private unsubscribers: (() => void)[] = []\n    protected unmounted = false\n    constructor() {\n        super()\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    protected log(msg: any, arg?: any) {\n        if (arg) console.debug(msg, arg)\n        else console.debug(msg)\n    }\n\n    mount(unsubscribe: () => void): () => void {\n        this.unmounted = false\n        if (unsubscribe && this.unsubscribers.indexOf(unsubscribe) < 0)\n            this.unsubscribers.push(unsubscribe)\n        return unsubscribe\n    }\n\n    unmount() {\n        const us = this.unsubscribers\n        this.unsubscribers = []\n        us.forEach(u => u())\n        this.unmounted = true\n    }\n}\n", "import { JDDevice } from \"./device\"\nimport {\n    PIPE_PORT_SHIFT,\n    PIPE_COUNTER_MASK,\n    PIPE_CLOSE_MASK,\n    JD_SERVICE_INDEX_PIPE,\n    PIPE_METADATA_MASK,\n    PACKET_RECEIVE,\n    DATA,\n    CLOSE,\n    ERROR_TIMEOUT,\n} from \"./constants\"\nimport { Packet } from \"./packet\"\nimport { JDBus } from \"./bus\"\nimport { signal, fromHex, toHex, assert } from \"./utils\"\nimport { JDClient } from \"./client\"\nimport { jdpack, jdunpack } from \"./pack\"\nimport { randomUInt } from \"./random\"\nimport { JDService } from \"./service\"\nimport { throwError } from \"./error\"\n\nexport class OutPipe {\n    private _count = 0\n\n    constructor(\n        private device: JDDevice,\n        private port: number,\n        readonly hosted?: boolean,\n    ) {}\n\n    static from(bus: JDBus, pkt: Packet, hosted?: boolean) {\n        const [idbuf, port] = pkt.jdunpack<[Buffer, number]>(\"b[8] u16\")\n        const id = toHex(idbuf)\n        const dev = bus.device(id, false, pkt)\n        return new OutPipe(dev, port, hosted)\n    }\n\n    get count() {\n        return this._count\n    }\n\n    get isOpen() {\n        return this.device != null\n    }\n\n    send(buf: Uint8Array) {\n        return this.sendData(buf, 0, false)\n    }\n\n    sendMeta(buf: Uint8Array) {\n        return this.sendData(buf, PIPE_METADATA_MASK, false)\n    }\n\n    async respondForEach<T>(\n        items: ArrayLike<T>,\n        converter: (item: T) => Uint8Array,\n    ) {\n        const n = items.length\n        for (let i = 0; i < n; ++i) {\n            const item = items[i]\n            const data = converter(item)\n            await this.send(data)\n        }\n        await this.close()\n    }\n\n    private async sendData(buf: Uint8Array, flags: number, closing: boolean) {\n        if (!this.device) {\n            // ignore as device may be already gone\n            if (closing) return\n            else throwError(\"sending data over closed pipe\")\n        }\n        const cmd =\n            (this.port << PIPE_PORT_SHIFT) |\n            flags |\n            (this._count & PIPE_COUNTER_MASK)\n        const pkt = Packet.from(cmd, buf)\n        pkt.serviceIndex = JD_SERVICE_INDEX_PIPE\n        try {\n            // this needs await - we don't want to send further pipe packets before the current\n            // one is ACKed\n            await this.device.sendPktWithAck(pkt)\n        } catch (e) {\n            this.free()\n            if (closing) console.debug(e)\n            else throw e\n        }\n        this._count++\n    }\n\n    private free() {\n        this.device = null\n        this.port = null\n    }\n\n    async close() {\n        try {\n            await this.sendData(new Uint8Array(0), PIPE_CLOSE_MASK, true)\n        } finally {\n            this.free()\n        }\n    }\n\n    async sendBytes(data: Uint8Array) {\n        const chunkSize = 224 // has to be divisible by 8\n        for (let i = 0; i < data.length; i += chunkSize) {\n            await this.send(data.slice(i, i + chunkSize))\n        }\n    }\n\n    static async sendBytes(\n        service: JDService,\n        cmd: number,\n        data: Uint8Array,\n        onProgress?: (p: number) => void,\n    ): Promise<void> {\n        const { device } = service\n\n        onProgress?.(0)\n        const resp = await service.sendCmdAwaitResponseAsync(\n            Packet.jdpacked(cmd, \"u32\", [data.length]),\n            3000,\n        )\n        onProgress?.(0.05)\n        const [pipePort] = jdunpack<[number]>(resp.data, \"u16\")\n        if (!pipePort) throw new Error(\"wrong port \" + pipePort)\n\n        const pipe = new OutPipe(device, pipePort)\n        const chunkSize = 224 // has to be divisible by 8\n        for (let i = 0; i < data.length; i += chunkSize) {\n            await pipe.send(data.slice(i, i + chunkSize))\n            onProgress?.(0.05 + (i / data.length) * 0.9)\n        }\n        await pipe.close()\n        onProgress?.(1)\n    }\n}\n\nexport class InPipe extends JDClient {\n    private _port: number\n    private _count = 0\n\n    constructor(protected readonly bus: JDBus) {\n        super()\n\n        this._handlePacket = this._handlePacket.bind(this)\n        this.allocPort()\n        this.mount(\n            this.bus.selfDevice.subscribe(PACKET_RECEIVE, this._handlePacket),\n        )\n    }\n\n    get port() {\n        return this._port\n    }\n\n    get count() {\n        return this._count\n    }\n\n    get isOpen() {\n        return this._port != null\n    }\n\n    private allocPort() {\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n            this._port = 1 + randomUInt(511)\n            const info = this.bus.selfDevice.port(this._port)\n            if (!info.localPipe && !info.pipeType) {\n                info.localPipe = this\n                break\n            }\n        }\n    }\n\n    openCommand(cmd: number) {\n        if (!this.isOpen) throwError(\"trying to access a closed pipe\")\n        const b = jdpack<[Uint8Array, number, number]>(\"b[8] u16 u16\", [\n            fromHex(this.bus.selfDeviceId),\n            this._port,\n            0,\n        ])\n        return Packet.from(cmd, b)\n    }\n\n    private _handlePacket(pkt: Packet) {\n        if (!pkt.isPipe) return\n        if (pkt.pipePort !== this._port) return\n        if (\n            (pkt.serviceCommand & PIPE_COUNTER_MASK) ==\n            (this._count & PIPE_COUNTER_MASK)\n        ) {\n            this._count++\n            this.emit(DATA, pkt)\n            if (pkt.serviceCommand & PIPE_CLOSE_MASK) {\n                this.close()\n            }\n        }\n    }\n\n    close() {\n        if (this._port == null) return\n        this.emit(CLOSE)\n        this._port = null\n        this.bus.selfDevice.port(this._port).localPipe = undefined\n        this.unmount()\n    }\n}\n\nexport class InPipeReader extends InPipe {\n    private done = signal()\n    private meta: Packet[] = []\n    private output: Packet[] = []\n\n    constructor(bus: JDBus) {\n        super(bus)\n        this.mount(\n            this.subscribe(DATA, (pkt: Packet) => {\n                if (pkt.serviceCommand & PIPE_METADATA_MASK) this.meta.push(pkt)\n                else this.output.push(pkt)\n            }),\n        )\n        this.mount(this.subscribe(CLOSE, this.done.signal))\n    }\n\n    async readData(timeout = 500): Promise<Uint8Array[]> {\n        const r = await this.readAll(timeout)\n        return r.output.map(p => p.data).filter(b => !!b?.length)\n    }\n\n    async readBytes(timeout = 500): Promise<Uint8Array> {\n        const data = await this.readData(timeout)\n        const n = data.reduce((n, b) => n + b.length, 0)\n        const res = new Uint8Array(n)\n        let i = 0\n        data.forEach(d => {\n            res.set(d, i)\n            i += d.length\n        })\n        assert(i === n)\n        return res\n    }\n\n    async readAll(timeout = 500) {\n        const res = await this.bus.withTimeout(timeout, this.done.signalled)\n        if (!res)\n            throwError(\"Timeout reading pipe: \" + timeout + \"ms\", {\n                code: ERROR_TIMEOUT,\n            })\n        return {\n            meta: this.meta,\n            output: this.output,\n        }\n    }\n}\n", "import {\n    SRV_PROTO_TEST,\n    CHANGE,\n    ProtoTestReg,\n    ProtoTestCmd,\n    ProtoTestEvent,\n} from \"../constants\"\nimport { jdpack, jdunpack } from \"../pack\"\nimport { Packet } from \"../packet\"\nimport { OutPipe } from \"../pipes\"\nimport { JDRegisterServer } from \"./registerserver\"\nimport { JDServiceServer } from \"./serviceserver\"\n\nexport class ProtocolTestServer extends JDServiceServer {\n    private rwBytes: JDRegisterServer<[Uint8Array]>\n\n    constructor() {\n        super(SRV_PROTO_TEST)\n\n        this.init<[boolean]>(\n            ProtoTestReg.RwBool,\n            ProtoTestReg.RoBool,\n            ProtoTestCmd.CBool,\n            ProtoTestEvent.EBool,\n            false\n        )\n        this.init<[number]>(\n            ProtoTestReg.RwI32,\n            ProtoTestReg.RoI32,\n            ProtoTestCmd.CI32,\n            ProtoTestEvent.EI32,\n            0\n        )\n        this.init<[number]>(\n            ProtoTestReg.RwU32,\n            ProtoTestReg.RoU32,\n            ProtoTestCmd.CU32,\n            ProtoTestEvent.EU32,\n            0\n        )\n        this.init<[string]>(\n            ProtoTestReg.RwString,\n            ProtoTestReg.RoString,\n            ProtoTestCmd.CString,\n            ProtoTestEvent.EString,\n            \"\"\n        )\n        this.rwBytes = this.init<[Uint8Array]>(\n            ProtoTestReg.RwBytes,\n            ProtoTestReg.RoBytes,\n            ProtoTestCmd.CBytes,\n            ProtoTestEvent.EBytes,\n            new Uint8Array(0)\n        )\n        this.init<[number, number, number, number]>(\n            ProtoTestReg.RwI8U8U16I32,\n            ProtoTestReg.RoI8U8U16I32,\n            ProtoTestCmd.CI8U8U16I32,\n            ProtoTestEvent.EI8U8U16I32,\n            0,\n            0,\n            0,\n            0\n        )\n        this.init<[number, string]>(\n            ProtoTestReg.RwU8String,\n            ProtoTestReg.RoU8String,\n            ProtoTestCmd.CU8String,\n            ProtoTestEvent.EU8String,\n            0,\n            \"\"\n        )\n\n        this.addCommand(\n            ProtoTestCmd.CReportPipe,\n            this.handleReportPipe.bind(this)\n        )\n    }\n\n    private init<TValues extends any[]>(\n        rwi: number,\n        roi: number,\n        ci: number,\n        ei: number,\n        ...values: TValues\n    ) {\n        const rw = this.addRegister(rwi, values)\n        const ro = this.addRegister(roi, rw.values())\n        rw.on(CHANGE, () => {\n            ro.setValues(rw.values())\n            this.sendEvent(ei, rw.data)\n        })\n        this.addCommand(ci, pkt =>\n            rw.setValues(jdunpack(pkt.data, rw.specification.packFormat))\n        )\n        return rw\n    }\n\n    private async handleReportPipe(pkt: Packet) {\n        const pipe = OutPipe.from(this.device.bus, pkt, true)\n        await pipe.respondForEach(this.rwBytes.data, (b: number) => {\n            const buf = new Uint8Array(1)\n            buf[0] = b\n            return jdpack<[Uint8Array]>(\"b\", [buf])\n        })\n    }\n}\n\n", "import {\n    ButtonEvent,\n    ButtonReg,\n    CHANGE,\n    REFRESH,\n    SRV_BUTTON,\n} from \"../jdom/constants\"\nimport { SensorServer } from \"./sensorserver\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { jdpack } from \"../jdom/pack\"\n\n/**\n * Server implementation for the button service\n * @category Servers\n */\nexport class ButtonServer extends SensorServer<[number]> {\n    public static readonly HOLD_TIME = 500\n    public static readonly INACTIVE_VALUE = 0\n    public static readonly ACTIVE_VALUE = 1\n\n    private _downTime: number\n    private _nextHold: number\n\n    readonly analog: JDRegisterServer<[boolean]>\n    private _threshold: JDRegisterServer<[number]>\n\n    constructor(instanceName?: string, analog?: boolean) {\n        super(SRV_BUTTON, {\n            instanceName,\n            readingValues: [ButtonServer.INACTIVE_VALUE],\n            streamingInterval: 50,\n        })\n        this.analog = this.addRegister(ButtonReg.Analog, [!!analog])\n        this.on(REFRESH, this.handleRefresh.bind(this))\n    }\n\n    get threshold() {\n        return this._threshold\n    }\n\n    set threshold(value: JDRegisterServer<[number]>) {\n        if (value !== this._threshold) {\n            this._threshold = value\n            this.analog.setValues([!!this._threshold])\n            this.emit(CHANGE)\n        }\n    }\n\n    private isActive() {\n        // TODO: debouncing\n        const [v] = this.reading.values()\n        const t = this.threshold?.values()?.[0] || 0.5\n\n        return v > t\n    }\n\n    private async handleRefresh() {\n        const now = this.device.bus.timestamp\n        if (this.isActive()) {\n            // down event\n            if (this._downTime === undefined) {\n                this._downTime = now\n                this._nextHold = this._downTime + ButtonServer.HOLD_TIME\n                await this.sendEvent(ButtonEvent.Down)\n                // hold\n            } else if (now > this._nextHold) {\n                const time = now - this._downTime\n                this._nextHold =\n                    this.device.bus.timestamp + ButtonServer.HOLD_TIME\n                await this.sendEvent(\n                    ButtonEvent.Hold,\n                    jdpack<[number]>(\"u32\", [time]),\n                )\n            }\n        } else {\n            // up event\n            if (this._downTime !== undefined) {\n                const time = now - this._downTime\n                this._downTime = undefined\n                this._nextHold = undefined\n                await this.sendEvent(\n                    ButtonEvent.Up,\n                    jdpack<[number]>(\"u32\", [time]),\n                )\n            }\n        }\n    }\n\n    async down() {\n        this.reading.setValues([ButtonServer.ACTIVE_VALUE])\n    }\n\n    async up() {\n        this.reading.setValues([ButtonServer.INACTIVE_VALUE])\n    }\n}\n", "import { BuzzerCmd, BuzzerReg, SRV_BUZZER } from \"../jdom/constants\"\nimport { jdpack, jdunpack } from \"../jdom/pack\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\n/**\n * @internal\n */\nexport interface BuzzerTone {\n    frequency: number\n    duration: number\n    volume: number\n}\n\n/**\n * Encodes a buzzer tone information into a data payload\n * @param frequency sound frequency in Hz\n * @param ms sound duration in milliseconds\n * @param volume volume from [0..1]\n * @returns data payload\n * @category Data Packing\n */\nexport function tonePayload(frequency: number, ms: number, volume: number) {\n    const period = Math.round(1000000 / frequency)\n    const duty = (period * volume) >> 11\n    return jdpack(\"u16 u16 u16\", [period, duty, ms])\n}\n\n/**\n * Server implementation for the buzzer service\n * @category Servers\n */\nexport class BuzzerServer extends JDServiceServer {\n    readonly volume: JDRegisterServer<[number]>\n\n    static PLAY_TONE = \"playTone\"\n\n    constructor(options?: JDServerOptions) {\n        super(SRV_BUZZER, options)\n\n        this.volume = this.addRegister<[number]>(BuzzerReg.Volume, [0.2])\n        this.addCommand(BuzzerCmd.PlayTone, this.handlePlayTone.bind(this))\n    }\n\n    private handlePlayTone(pkt: Packet) {\n        const [period, , duration] = jdunpack<[number, number, number]>(\n            pkt.data,\n            \"u16 u16 u16\",\n        )\n        const frequency = 1000000 / period\n        const [volume] = this.volume.values()\n\n        this.emit(BuzzerServer.PLAY_TONE, <BuzzerTone>{\n            frequency,\n            duration,\n            volume,\n        })\n    }\n}\n", "import {\n    CharacterScreenReg,\n    CharacterScreenTextDirection,\n    CharacterScreenVariant,\n    SRV_CHARACTER_SCREEN,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class CharacterScreenServer extends JDServiceServer {\n    readonly message: JDRegisterServer<[string]>\n    readonly brightness: JDRegisterServer<[number]>\n    readonly rows: JDRegisterServer<[number]>\n    readonly columns: JDRegisterServer<[number]>\n    readonly variant: JDRegisterServer<[CharacterScreenVariant]>\n    readonly textDirection: JDRegisterServer<[CharacterScreenTextDirection]>\n\n    constructor(options?: {\n        message?: string\n        brightness?: number\n        rows?: number\n        columns?: number\n        variant?: CharacterScreenVariant\n        textDirection?: CharacterScreenTextDirection\n    }) {\n        super(SRV_CHARACTER_SCREEN)\n        const {\n            message = \"\",\n            rows = 2,\n            columns = 16,\n            variant,\n            textDirection,\n            brightness = 100,\n        } = options || {}\n\n        this.message = this.addRegister<[string]>(CharacterScreenReg.Message, [\n            message,\n        ])\n        this.brightness = this.addRegister<[number]>(\n            CharacterScreenReg.Brightness,\n            [brightness],\n        )\n        this.rows = this.addRegister<[number]>(CharacterScreenReg.Rows, [rows])\n        this.columns = this.addRegister<[number]>(CharacterScreenReg.Columns, [\n            columns,\n        ])\n        this.variant = this.addRegister<[CharacterScreenVariant]>(\n            CharacterScreenReg.Variant,\n            [variant || CharacterScreenVariant.LCD],\n        )\n        this.message = this.addRegister<[string]>(CharacterScreenReg.Message, [\n            \"\",\n        ])\n        this.textDirection = this.addRegister<[CharacterScreenTextDirection]>(\n            CharacterScreenReg.TextDirection,\n            [textDirection || CharacterScreenTextDirection.LeftToRight],\n        )\n    }\n}\n", "import {\n    GamepadButtons,\n    GamepadEvent,\n    GamepadReg,\n    GamepadVariant,\n    SRV_GAMEPAD,\n} from \"../jdom/constants\"\nimport { jdpack } from \"../jdom/pack\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { SensorServer } from \"./sensorserver\"\n\n/**\n * @internal\n */\nexport const GAMEPAD_DPAD_BUTTONS =\n    GamepadButtons.Left |\n    GamepadButtons.Right |\n    GamepadButtons.Up |\n    GamepadButtons.Down\n\n/**\n * @internal\n */\nexport const GAMEPAD_ARCADE_BUTTONS =\n    GAMEPAD_DPAD_BUTTONS |\n    GamepadButtons.A |\n    GamepadButtons.B |\n    GamepadButtons.Menu |\n    GamepadButtons.Select |\n    GamepadButtons.Exit\n\n/**\n * @internal\n */\nexport const GAMEPAD_DPAD_A_BUTTONS = GAMEPAD_DPAD_BUTTONS | GamepadButtons.A\n\n/**\n * @internal\n */\nexport const GAMEPAD_DPAD_AB_BUTTONS = GAMEPAD_DPAD_A_BUTTONS | GamepadButtons.B\n\n/**\n * @internal\n */\nexport const GAMEPAD_DPAD_XY_BUTTONS =\n    GAMEPAD_DPAD_BUTTONS | GamepadButtons.X | GamepadButtons.Y\n\n/**\n * @internal\n */\nexport const GAMEPAD_GAMEPAD_EXTRA_BUTTONS =\n    GamepadButtons.B |\n    GamepadButtons.Select |\n    GamepadButtons.Menu |\n    GamepadButtons.Reset\n\n// https://w3c.github.io/gamepad/#remapping\nconst standardGamepadMapping = [\n    [GamepadButtons.Left, 14],\n    [GamepadButtons.Right, 15],\n    [GamepadButtons.Up, 12],\n    [GamepadButtons.Down, 13],\n    [GamepadButtons.A, 0],\n    [GamepadButtons.B, 1],\n    [GamepadButtons.X, 2],\n    [GamepadButtons.Y, 3],\n    [GamepadButtons.Select, 8],\n    [GamepadButtons.Menu, 9],\n]\n\nexport class GamepadServer extends SensorServer<\n    [GamepadButtons, number, number]\n> {\n    readonly variant: JDRegisterServer<[GamepadVariant]>\n    readonly buttonsAvailable: JDRegisterServer<[0 | GamepadButtons]>\n\n    constructor(options?: {\n        instanceName?: string\n        variant?: GamepadVariant\n        buttonsAvailable?: GamepadButtons\n    }) {\n        super(SRV_GAMEPAD, {\n            instanceName: options?.instanceName,\n            readingValues: [<GamepadButtons>0, 0, 0],\n            streamingInterval: 50,\n        })\n        const {\n            variant = GamepadVariant.Thumb,\n            buttonsAvailable = <GamepadButtons>0,\n        } = options || {}\n\n        this.variant = this.addRegister<[GamepadVariant]>(GamepadReg.Variant, [\n            variant,\n        ])\n        this.buttonsAvailable = this.addRegister<[GamepadButtons]>(\n            GamepadReg.ButtonsAvailable,\n            [buttonsAvailable],\n        )\n    }\n\n    get isAnalog() {\n        const [value] = this.buttonsAvailable.values()\n        return !(value & GAMEPAD_DPAD_BUTTONS)\n    }\n\n    async down(buttons: GamepadButtons) {\n        const [currentButtons, x, y] = this.reading.values()\n        const newButtons = currentButtons | buttons\n        await this.updateReading(newButtons, x, y)\n    }\n\n    async up(buttons: GamepadButtons) {\n        const [currentButtons, x, y] = this.reading.values()\n        const newButtons = currentButtons & ~buttons\n        await this.updateReading(newButtons, x, y)\n    }\n\n    async updateDirection(x: number, y: number) {\n        const [button] = this.reading.values()\n        await this.updateReading(button, x, y)\n    }\n\n    /**\n     * Read the state of a browser gamepad and apply it to the sensor\n     * @param gamepad\n     */\n    async update(gamepad: Gamepad) {\n        const { buttons, axes } = gamepad\n        const [buttonsAvailable] = this.buttonsAvailable.values()\n\n        let newButtons: GamepadButtons = <GamepadButtons>0\n        for (const [b, id] of standardGamepadMapping) {\n            if ((b & buttonsAvailable) == b && !!buttons[id].pressed) {\n                newButtons |= b\n            }\n        }\n\n        let newX = 0,\n            newY = 0\n        if (this.isAnalog) {\n            const [axeLeftRight, axeUpDown] = axes\n            newX = axeLeftRight\n            newY = axeUpDown\n        }\n\n        await this.updateReading(newButtons, newX, newY)\n    }\n\n    private async updateReading(buttons: GamepadButtons, x: number, y: number) {\n        const [oldButtons] = this.reading.values()\n        let newButtons = buttons\n        if (!this.isAnalog) {\n            x =\n                buttons & GamepadButtons.Left\n                    ? -1\n                    : buttons & GamepadButtons.Right\n                    ? 1\n                    : 0\n            y =\n                buttons & GamepadButtons.Up\n                    ? -1\n                    : buttons & GamepadButtons.Down\n                    ? 1\n                    : 0\n        } else {\n            const threshold = 0.4\n            // clear events\n            const mask = ~GAMEPAD_DPAD_BUTTONS\n            newButtons = buttons & mask\n            // recompute\n            if (x < -threshold) newButtons |= GamepadButtons.Left\n            else if (x > threshold) newButtons |= GamepadButtons.Right\n            if (y < -threshold) newButtons |= GamepadButtons.Up\n            else if (y > threshold) newButtons |= GamepadButtons.Down\n        }\n        this.reading.setValues([newButtons, x, y])\n        if (newButtons !== oldButtons) {\n            await this.sendEvent(\n                GamepadEvent.ButtonsChanged,\n                jdpack<[number]>(\"u32\", [newButtons]),\n            )\n        }\n    }\n}\n", "import {\n    CHANGE,\n    DotMatrixReg,\n    DotMatrixVariant,\n    SensorReg,\n    SRV_DOT_MATRIX,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class DotMatrixServer extends JDServiceServer {\n    readonly dots: JDRegisterServer<[Uint8Array]>\n    readonly rows: JDRegisterServer<[number]>\n    readonly columns: JDRegisterServer<[number]>\n    readonly brightness: JDRegisterServer<[number]>\n    readonly variant: JDRegisterServer<[DotMatrixVariant]>\n\n    constructor(\n        columns: number,\n        rows: number,\n        options?: {\n            brightness?: number\n            variant?: DotMatrixVariant\n        },\n    ) {\n        super(SRV_DOT_MATRIX)\n        const { brightness, variant } = options || {}\n        this.dots = this.addRegister(DotMatrixReg.Dots, [new Uint8Array(0)])\n        this.rows = this.addRegister(DotMatrixReg.Rows, [rows])\n        this.columns = this.addRegister(DotMatrixReg.Columns, [columns])\n        if (brightness !== undefined)\n            this.brightness = this.addRegister(DotMatrixReg.Brightness, [128])\n        if (variant !== undefined)\n            this.variant = this.addRegister(DotMatrixReg.Variant, [variant])\n        this.rows.skipBoundaryCheck = true\n        this.rows.skipErrorInjection = true\n\n        if (variant === DotMatrixVariant.LED)\n            this.addRegister<[number]>(SensorReg.StreamingPreferredInterval, [\n                50,\n            ])\n\n        this.rows.on(CHANGE, this.updateDotsBuffer.bind(this))\n        this.columns.on(CHANGE, this.updateDotsBuffer.bind(this))\n\n        this.updateDotsBuffer()\n    }\n\n    private updateDotsBuffer() {\n        // columns must be byte aligned\n        const [rows] = this.rows.values()\n        const [columns] = this.columns.values()\n\n        // total bytes needed\n        const n = columns * ((rows + 7) >> 3)\n\n        if (this.dots.data?.length !== n) {\n            this.dots.data = new Uint8Array(n)\n            this.dots.emit(CHANGE)\n        }\n    }\n}\n", "/*\n * `0xD0: set_all(C+)` - set all pixels in current range to given color pattern\n * `0xD1: fade(C+)` - set `N` pixels to color between colors in sequence\n * `0xD2: fade_hsv(C+)` - similar to `fade()`, but colors are specified and faded in HSV\n * `0xD3: rotate_fwd(K)` - rotate (shift) pixels by `K` positions away from the connector\n * `0xD4: rotate_back(K)` - same, but towards the connector\n * `0xD5: show(M=50)` - send buffer to strip and wait `M` milliseconds\n * `0xD6: range(P=0, N=length)` - range from pixel `P`, `N` pixels long\n * `0xD7: mode(K=0)` - set update mode\n * `0xD8: mode1(K=0)` - set update mode for next command only\n */\n\nexport const LIGHT_PROG_SET_ALL = 0xd0\nexport const LIGHT_PROG_FADE = 0xd1\nexport const LIGHT_PROG_FADE_HSV = 0xd2\nexport const LIGHT_PROG_ROTATE_FWD = 0xd3\nexport const LIGHT_PROG_ROTATE_BACK = 0xd4\nexport const LIGHT_PROG_SHOW = 0xd5\nexport const LIGHT_PROG_RANGE = 0xd6\nexport const LIGHT_PROG_MODE = 0xd7\nexport const LIGHT_PROG_MODE1 = 0xd8\n\nexport const LIGHT_MODE_REPLACE = 0x00\nexport const LIGHT_MODE_ADD_RGB = 0x01\nexport const LIGHT_MODE_SUBTRACT_RGB = 0x02\nexport const LIGHT_MODE_MULTIPLY_RGB = 0x03\nexport const LIGHT_MODE_LAST = 0x03\n\nexport const LIGHT_PROG_COLN = 0xc0\nexport const LIGHT_PROG_COL1 = 0xc1\nexport const LIGHT_PROG_COL2 = 0xc2\nexport const LIGHT_PROG_COL3 = 0xc3\n\nexport const LIGHT_PROG_COL1_SET = 0xcf\n", "import {\n    CHANGE,\n    LedStripCmd,\n    LedStripLightType,\n    LedStripReg,\n    LedStripVariant,\n    RENDER,\n    SRV_LED_STRIP,\n} from \"../jdom/constants\"\nimport {\n    LIGHT_MODE_ADD_RGB,\n    LIGHT_MODE_LAST,\n    LIGHT_MODE_MULTIPLY_RGB,\n    LIGHT_MODE_REPLACE,\n    LIGHT_MODE_SUBTRACT_RGB,\n    LIGHT_PROG_COL1,\n    LIGHT_PROG_COL1_SET,\n    LIGHT_PROG_COL2,\n    LIGHT_PROG_COL3,\n    LIGHT_PROG_COLN,\n    LIGHT_PROG_FADE,\n    LIGHT_PROG_FADE_HSV,\n    LIGHT_PROG_MODE,\n    LIGHT_PROG_MODE1,\n    LIGHT_PROG_RANGE,\n    LIGHT_PROG_ROTATE_BACK,\n    LIGHT_PROG_ROTATE_FWD,\n    LIGHT_PROG_SET_ALL,\n    LIGHT_PROG_SHOW,\n} from \"../jdom/lightconstants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\nimport { isBufferEmpty } from \"../jdom/utils\"\n\nconst PROG_EOF = 0\nconst PROG_CMD = 1\nconst PROG_NUMBER = 3\nconst PROG_COLOR_BLOCK = 4\n\ninterface RGB {\n    r: number\n    g: number\n    b: number\n}\n\nfunction rgb(r: number, g: number, b: number) {\n    return { r, g, b }\n}\n\nfunction hsv(hue: number, sat: number, val: number): RGB {\n    // scale down to 0..192\n    hue = (hue * 192) >> 8\n\n    // reference: based on FastLED's hsv2rgb rainbow algorithm\n    // [https://github.com/FastLED/FastLED](MIT)\n    const invsat = 255 - sat\n    const brightness_floor = (val * invsat) >> 8\n    const color_amplitude = val - brightness_floor\n    const section = (hue / 0x40) >> 0 // [0..2]\n    const offset = hue % 0x40 >> 0 // [0..63]\n\n    const rampup = offset\n    const rampdown = 0x40 - 1 - offset\n\n    const rampup_amp_adj = ((rampup * color_amplitude) / (256 / 4)) >> 0\n    const rampdown_amp_adj = ((rampdown * color_amplitude) / (256 / 4)) >> 0\n\n    const rampup_adj_with_floor = rampup_amp_adj + brightness_floor\n    const rampdown_adj_with_floor = rampdown_amp_adj + brightness_floor\n\n    let r = 0,\n        g = 0,\n        b = 0\n    if (section) {\n        if (section == 1) {\n            // section 1: 0x40..0x7F\n            r = brightness_floor\n            g = rampdown_adj_with_floor\n            b = rampup_adj_with_floor\n        } else {\n            // section 2; 0x80..0xBF\n            r = rampup_adj_with_floor\n            g = brightness_floor\n            b = rampdown_adj_with_floor\n        }\n    } else {\n        // section 0: 0x00..0x3F\n        r = rampdown_adj_with_floor\n        g = rampup_adj_with_floor\n        b = brightness_floor\n    }\n    return rgb(r, g, b)\n}\n\nfunction mulcol(c: number, m: number): number {\n    let c2 = (c * m) >> 7\n    if (m < 128 && c == c2) c2--\n    else if (m > 128 && c == c2) c2++\n    return c2\n}\n\nfunction clamp(c: number): number {\n    if (c < 0) return 0\n    if (c > 255) return 255\n    return c\n}\n\nfunction SCALE0(c: number, i: number) {\n    return ((c & 0xff) * (1 + (i & 0xff))) >> 8\n}\n\nexport class LedStripServer extends JDServiceServer {\n    readonly brightness: JDRegisterServer<[number]>\n    readonly actualBrightness: JDRegisterServer<[number]>\n    readonly lightType: JDRegisterServer<[LedStripLightType]>\n    readonly numPixels: JDRegisterServer<[number]>\n    readonly maxPower: JDRegisterServer<[number]>\n    readonly maxPixels: JDRegisterServer<[number]>\n    readonly numRepeats: JDRegisterServer<[number]>\n    readonly numColumns: JDRegisterServer<[number]>\n\n    private pxbuffer: Uint8Array = new Uint8Array(0)\n\n    private prog_mode = 0\n    private prog_tmpmode = 0\n\n    private range_start = 0\n    private range_end = 0\n    private range_len = 0\n    private range_ptr = 0\n\n    private prog_ptr = 0\n    private prog_size = 0\n    private prog_data = new Uint8Array(0)\n\n    private dirty = true\n    private inited = false\n\n    power_enable = false\n\n    constructor(\n        options?: {\n            numPixels?: number\n            numColumns?: number\n            maxPixels?: number\n            maxPower?: number\n        } & JDServerOptions,\n    ) {\n        super(SRV_LED_STRIP, options)\n\n        const {\n            numColumns,\n            maxPower = 200,\n            maxPixels = 300,\n            numPixels = 15,\n        } = options || {}\n\n        this.brightness = this.addRegister<[number]>(LedStripReg.Brightness, [\n            15,\n        ])\n        this.actualBrightness = this.addRegister<[number]>(\n            LedStripReg.ActualBrightness,\n            [15],\n        )\n        this.lightType = this.addRegister<[LedStripLightType]>(\n            LedStripReg.LightType,\n            [LedStripLightType.WS2812B_GRB],\n        )\n        this.numPixels = this.addRegister<[number]>(LedStripReg.NumPixels, [\n            numPixels,\n        ])\n        this.maxPower = this.addRegister<[number]>(LedStripReg.MaxPower, [\n            maxPower,\n        ])\n        this.maxPixels = this.addRegister<[number]>(LedStripReg.MaxPixels, [\n            maxPixels,\n        ])\n        this.numRepeats = this.addRegister<[number]>(LedStripReg.NumRepeats, [\n            0,\n        ])\n        if (numColumns !== undefined)\n            this.numColumns = this.addRegister<[number]>(\n                LedStripReg.NumColumns,\n                [numColumns],\n            )\n\n        this.brightness.on(\n            CHANGE,\n            () => (this.intensity = this.requested_intensity),\n        )\n        this.numPixels.on(CHANGE, this.allocRxBuffer.bind(this))\n        this.maxPixels.on(CHANGE, this.allocRxBuffer.bind(this))\n\n        this.addCommand(LedStripCmd.Run, this.handleRun.bind(this))\n\n        this.allocRxBuffer()\n    }\n\n    /**\n     * Gets an array of RGB color numbers\n     */\n    get colors() {\n        return this.pxbuffer\n    }\n\n    private get maxpower(): number {\n        const [r] = this.maxPower.values() || [200]\n        return r\n    }\n\n    private get maxpixels(): number {\n        const [r] = this.maxPixels.values() || []\n        return r\n    }\n\n    private get numpixels(): number {\n        const [r] = this.numPixels.values() || [0]\n        return r\n    }\n\n    private get requested_intensity(): number {\n        const [r] = this.brightness.values() || [0]\n        return r\n    }\n\n    private get intensity(): number {\n        const [r] = this.actualBrightness.values() || [0]\n        return r\n    }\n\n    private set intensity(v: number) {\n        this.actualBrightness.setValues([v])\n    }\n\n    private jd_power_enable(value: boolean) {\n        this.power_enable = value\n    }\n\n    is_enabled() {\n        return this.numpixels > 0 && this.requested_intensity > 0\n    }\n\n    private allocRxBuffer() {\n        const { numpixels = 0, maxpixels, pxbuffer } = this\n        if (maxpixels !== undefined && numpixels > maxpixels)\n            this.numPixels.setValues([this.maxpixels])\n        const n = numpixels * 3 // don't need to prealloc here\n        if (pxbuffer || n !== pxbuffer.length) this.pxbuffer = new Uint8Array(n)\n    }\n\n    private reset_range() {\n        this.range_ptr = this.range_start\n    }\n\n    private set_next(c: RGB) {\n        if (this.range_ptr >= this.range_end) return false\n\n        const p = this.pxbuffer\n        const pi = this.range_ptr++ * 3\n        // fast path\n        if (this.prog_tmpmode == LIGHT_MODE_REPLACE) {\n            p[pi + 0] = c.r\n            p[pi + 1] = c.g\n            p[pi + 2] = c.b\n            return true\n        }\n\n        let r = p[pi + 0],\n            g = p[pi + 1],\n            b = p[pi + 2]\n        switch (this.prog_tmpmode) {\n            case LIGHT_MODE_ADD_RGB:\n                r += c.r\n                g += c.g\n                b += c.b\n                break\n            case LIGHT_MODE_SUBTRACT_RGB:\n                r -= c.r\n                g -= c.g\n                b -= c.b\n                break\n            case LIGHT_MODE_MULTIPLY_RGB:\n                r = mulcol(r, c.r)\n                g = mulcol(g, c.g)\n                b = mulcol(b, c.b)\n                break\n        }\n        p[pi + 0] = clamp(r)\n        p[pi + 1] = clamp(g)\n        p[pi + 2] = clamp(b)\n        return true\n    }\n\n    private limit_intensity() {\n        const { numpixels, requested_intensity, maxpower, pxbuffer } = this\n\n        let n = numpixels * 3\n        const prev_intensity = this.intensity\n        let intensity = this.intensity\n\n        intensity += 1 + (intensity >> 5)\n        if (\n            requested_intensity !== undefined &&\n            intensity > requested_intensity\n        )\n            intensity = requested_intensity\n\n        let current_full = 0\n        let current = 0\n        let current_prev = 0\n        let di = 0\n        while (n--) {\n            const v = pxbuffer[di++]\n            current += SCALE0(v, intensity)\n            current_prev += SCALE0(v, prev_intensity)\n            current_full += v\n        }\n\n        // 46uA per step of LED\n        current *= 46\n        current_prev *= 46\n        current_full *= 46\n\n        // 14mA is the chip at 48MHz, 930uA per LED is static\n        const base_current = 14000 + 930 * numpixels\n        const current_limit = maxpower * 1000 - base_current\n\n        if (current <= current_limit) {\n            this.intensity = intensity\n            // LOG(\"curr: %dmA; not limiting %d\", (base_current + current) / 1000, state->intensity);\n            return\n        }\n\n        if (current_prev <= current_limit) {\n            return // no change needed\n        }\n\n        let inten = current_limit / (current_full >> 8) - 1\n        if (inten < 0) inten = 0\n        this.intensity = inten\n    }\n\n    private prog_fetch_color(): RGB {\n        const ptr = this.prog_ptr\n        if (ptr + 3 > this.prog_size) return rgb(0, 0, 0)\n        const d = this.prog_data\n        this.prog_ptr = ptr + 3\n        return rgb(d[ptr + 0], d[ptr + 1], d[ptr + 2])\n    }\n\n    private prog_fetch(): {\n        dst?: number\n        prog: number\n    } {\n        if (this.prog_ptr >= this.prog_size) return { prog: PROG_EOF }\n        const d = this.prog_data\n        const c = d[this.prog_ptr++]\n        if (!(c & 0x80)) {\n            return { dst: c, prog: PROG_NUMBER }\n        } else if ((c & 0xc0) == 0x80) {\n            return {\n                dst: ((c & 0x3f) << 8) | d[this.prog_ptr++],\n                prog: PROG_NUMBER,\n            }\n        } else\n            switch (c) {\n                case LIGHT_PROG_COL1:\n                    return {\n                        dst: 1,\n                        prog: PROG_COLOR_BLOCK,\n                    }\n                case LIGHT_PROG_COL2:\n                    return {\n                        dst: 2,\n                        prog: PROG_COLOR_BLOCK,\n                    }\n                case LIGHT_PROG_COL3:\n                    return {\n                        dst: 3,\n                        prog: PROG_COLOR_BLOCK,\n                    }\n                case LIGHT_PROG_COLN:\n                    return {\n                        dst: d[this.prog_ptr++],\n                        prog: PROG_COLOR_BLOCK,\n                    }\n                default:\n                    return {\n                        dst: c,\n                        prog: PROG_CMD,\n                    }\n            }\n    }\n\n    private prog_fetch_num(defl: number): number {\n        const prev = this.prog_ptr\n        const fr = this.prog_fetch()\n        const { dst: res, prog: r } = fr\n        if (r == PROG_NUMBER) return res\n        else {\n            this.prog_ptr = prev // rollback\n            return defl\n        }\n    }\n\n    private prog_fetch_cmd(): number {\n        let cmd: number\n        // skip until there's a command\n        for (;;) {\n            const c = this.prog_fetch()\n            switch (c.prog) {\n                case PROG_CMD:\n                    return c.dst\n                case PROG_COLOR_BLOCK:\n                    while (cmd--) this.prog_fetch_color()\n                    break\n                case PROG_EOF:\n                    return 0\n            }\n        }\n    }\n\n    private prog_set(len: number) {\n        this.reset_range()\n        const start = this.prog_ptr\n        for (;;) {\n            this.prog_ptr = start\n            let ok = false\n            for (let i = 0; i < len; ++i) {\n                // don't break the loop immediately if !ok - make sure the prog counter advances\n                ok = this.set_next(this.prog_fetch_color())\n            }\n            if (!ok) break\n        }\n    }\n\n    private prog_fade(len: number, usehsv: boolean) {\n        if (len < 2) {\n            this.prog_set(len)\n            return\n        }\n        let colidx = 0\n        const endp = this.prog_ptr + 3 * len\n        let col0 = this.prog_fetch_color()\n        let col1 = this.prog_fetch_color()\n\n        const colstep = ((len - 1) << 16) / this.range_len\n        let colpos = 0\n\n        this.reset_range()\n\n        for (;;) {\n            while (colidx < colpos >> 16) {\n                colidx++\n                col0 = col1\n                col1 = this.prog_fetch_color()\n            }\n            const fade1 = colpos & 0xffff\n            const fade0 = 0xffff - fade1\n            const col = rgb(\n                (col0.r * fade0 + col1.r * fade1 + 0x8000) >> 16,\n                (col0.g * fade0 + col1.g * fade1 + 0x8000) >> 16,\n                (col0.b * fade0 + col1.b * fade1 + 0x8000) >> 16,\n            )\n            if (!this.set_next(usehsv ? hsv(col.r, col.g, col.b) : col)) break\n            colpos += colstep\n        }\n\n        this.prog_ptr = endp\n    }\n\n    private prog_rot(shift: number) {\n        if (shift <= 0 || shift >= this.range_len) return\n\n        const range_start = this.range_start\n        const range_end = this.range_end\n        const buf = this.pxbuffer\n\n        let first = range_start * 3\n        let middle = (range_start + shift) * 3\n        const last = range_end * 3\n        let next = middle\n\n        while (first != next) {\n            const tmp = buf[first]\n            const tmp1 = buf[first + 1]\n            const tmp2 = buf[first + 2]\n\n            buf[first] = buf[next]\n            buf[first + 1] = buf[next + 1]\n            buf[first + 2] = buf[next + 2]\n\n            buf[next] = tmp\n            buf[next + 1] = tmp1\n            buf[next + 2] = tmp2\n\n            first += 3\n            next += 3\n\n            if (next === last) next = middle\n            else if (first === middle) middle = next\n        }\n    }\n\n    private fetch_mode(): number {\n        const m = this.prog_fetch_num(0)\n        if (m > LIGHT_MODE_LAST) return 0\n        return m\n    }\n\n    private prog_process() {\n        const data = this.prog_data\n\n        if (this.prog_ptr >= this.prog_size) return false\n\n        // check that the program wasn't restarted\n        // concurrently\n        while (data === this.prog_data) {\n            const cmd = this.prog_fetch_cmd()\n            if (!cmd) break\n\n            if (cmd == LIGHT_PROG_SHOW) {\n                const k = this.prog_fetch_num(50)\n                this.dirty = true\n                setTimeout(this.animationFrame.bind(this), k)\n                // check data is still current;\n                return data === this.prog_data\n            }\n\n            switch (cmd) {\n                case LIGHT_PROG_COL1_SET:\n                    this.range_ptr = this.range_start + this.prog_fetch_num(0)\n                    this.set_next(this.prog_fetch_color())\n                    break\n                case LIGHT_PROG_FADE:\n                case LIGHT_PROG_FADE_HSV:\n                case LIGHT_PROG_SET_ALL: {\n                    const { dst: len, prog: pcmd } = this.prog_fetch()\n                    if (pcmd != PROG_COLOR_BLOCK || len == 0) continue // bailout\n                    if (cmd == LIGHT_PROG_SET_ALL) this.prog_set(len)\n                    else this.prog_fade(len, cmd == LIGHT_PROG_FADE_HSV)\n                    break\n                }\n\n                case LIGHT_PROG_ROTATE_BACK:\n                case LIGHT_PROG_ROTATE_FWD: {\n                    let k = this.prog_fetch_num(1)\n                    const len = this.range_len\n                    if (len == 0) continue\n                    while (k >= len) k -= len\n                    if (cmd == LIGHT_PROG_ROTATE_FWD && k != 0) k = len - k\n                    this.prog_rot(k)\n                    break\n                }\n\n                case LIGHT_PROG_MODE1:\n                    this.prog_tmpmode = this.fetch_mode()\n                    break\n\n                case LIGHT_PROG_MODE:\n                    this.prog_mode = this.fetch_mode()\n                    break\n\n                case LIGHT_PROG_RANGE: {\n                    let start = this.prog_fetch_num(0)\n                    const len = this.prog_fetch_num(this.numpixels)\n                    const numpixels = this.numpixels\n                    if (start > numpixels) start = numpixels\n                    let end = start + len\n                    if (end > numpixels) end = numpixels\n                    this.range_start = start\n                    this.range_end = end\n                    this.range_len = end - start\n                    break\n                }\n            }\n\n            if (cmd != LIGHT_PROG_MODE1) this.prog_tmpmode = this.prog_mode\n        }\n\n        return false\n    }\n\n    /**\n     * Perform an animation step\n     */\n    animationFrame() {\n        if (!this.prog_process()) return // concurrently udpated\n\n        if (!this.is_enabled()) return\n        if (this.dirty) {\n            this.dirty = false\n            if (isBufferEmpty(this.pxbuffer)) {\n                this.jd_power_enable(false)\n                this.emit(RENDER)\n                return\n            } else {\n                this.jd_power_enable(true)\n            }\n            this.limit_intensity()\n            // we're ready to render...\n            this.emit(RENDER)\n        }\n    }\n\n    private sync_config() {\n        if (!this.is_enabled()) {\n            this.jd_power_enable(false)\n            return\n        }\n\n        if (!this.inited) {\n            this.inited = true\n            // initialize?\n            // px_init(this.lighttype);\n        }\n\n        this.jd_power_enable(true)\n    }\n\n    private handleRun(pkt: Packet) {\n        this.prog_data = pkt.data\n        this.prog_size = this.prog_data.length\n        this.prog_ptr = 0\n\n        this.range_start = 0\n        this.range_end = this.range_len = this.numpixels\n        this.prog_tmpmode = this.prog_mode = 0\n\n        this.sync_config()\n        this.animationFrame()\n    }\n}\n", "import { MatrixKeypadReg, SRV_MATRIX_KEYPAD } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { SensorServer } from \"./sensorserver\"\n\nexport class MatrixKeypadServer extends SensorServer<[[number][]]> {\n    readonly rows: JDRegisterServer<[number]>\n    readonly columns: JDRegisterServer<[number]>\n    readonly labels: JDRegisterServer<[[string][]]>\n\n    constructor(columns: number, rows: number, labels?: string[]) {\n        super(SRV_MATRIX_KEYPAD, {\n            readingValues: [[]],\n        })\n\n        this.columns = this.addRegister(MatrixKeypadReg.Columns, [columns])\n        this.rows = this.addRegister(MatrixKeypadReg.Rows, [rows])\n        this.labels = this.addRegister(\n            MatrixKeypadReg.Labels,\n            labels ? [labels.map(l => [l])] : undefined,\n        )\n    }\n\n    async down(button: number) {\n        const [values] = this.reading.values()\n        const valuei = values.findIndex(v => v[0] === button)\n        if (valuei < 0) {\n            values.push([button])\n            this.reading.setValues([values])\n        }\n    }\n\n    async up(button: number) {\n        const [values] = this.reading.values()\n        const valuei = values.findIndex(v => v[0] === button)\n        if (valuei > -1) {\n            values.splice(valuei, 1)\n            this.reading.setValues([values])\n        }\n    }\n}\n", "import { MotorReg, SRV_MOTOR } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class MotorServer extends JDServiceServer {\n    readonly speed: JDRegisterServer<[number]>\n    readonly enabled: JDRegisterServer<[boolean]>\n    readonly loadTorque: JDRegisterServer<[number]>\n    readonly loadRotationSpeed: JDRegisterServer<[number]>\n\n    constructor(\n        instanceName?: string,\n        options?: {\n            loadTorque?: number\n            loadRotationSpeed?: number\n        },\n    ) {\n        super(SRV_MOTOR, { instanceName })\n\n        const { loadTorque, loadRotationSpeed } = options || {}\n\n        this.speed = this.addRegister<[number]>(MotorReg.Speed, [0])\n        this.enabled = this.addRegister<[boolean]>(MotorReg.Enabled, [false])\n        if (loadTorque)\n            this.loadTorque = this.addRegister<[number]>(MotorReg.LoadTorque, [\n                loadTorque,\n            ])\n        if (loadRotationSpeed)\n            this.loadRotationSpeed = this.addRegister<[number]>(\n                MotorReg.LoadRotationSpeed,\n                [loadRotationSpeed],\n            )\n    }\n}\n", "import { JDClient } from \"../jdom/client\"\nimport { CHANGE, SystemEvent, SystemReadingThreshold } from \"../jdom/constants\"\nimport { AnalogSensorServer } from \"./analogsensorserver\"\n\nexport class LevelDetector extends JDClient {\n    private _state: SystemReadingThreshold\n\n    constructor(readonly service: AnalogSensorServer) {\n        super()\n        this.reset()\n        if (this.service.inactiveThreshold)\n            this.mount(\n                this.service.inactiveThreshold.subscribe(\n                    CHANGE,\n                    this.reset.bind(this),\n                ),\n            )\n        if (this.service.activeThreshold)\n            this.mount(\n                this.service.activeThreshold.subscribe(\n                    CHANGE,\n                    this.reset.bind(this),\n                ),\n            )\n        this.mount(\n            this.service.reading.subscribe(CHANGE, this.update.bind(this)),\n        )\n    }\n\n    reset() {\n        this._state = SystemReadingThreshold.Neutral\n    }\n\n    update() {\n        const [level] = this.service.reading.values()\n        if (level === undefined) {\n            this.setState(SystemReadingThreshold.Neutral)\n            return\n        }\n\n        const [active] = this.service.activeThreshold?.values() || []\n        if (active !== undefined && level >= active) {\n            this.setState(SystemReadingThreshold.Active)\n            return\n        }\n\n        const [inactive] = this.service.inactiveThreshold?.values() || []\n        if (inactive !== undefined && level <= inactive) {\n            this.setState(SystemReadingThreshold.Inactive)\n            return\n        }\n\n        // neutral\n        this.setState(SystemReadingThreshold.Neutral)\n    }\n\n    private setState(state: number) {\n        if (state === this._state) return\n\n        this._state = state\n        switch (state) {\n            case SystemReadingThreshold.Active:\n                this.service.sendEvent(SystemEvent.Active)\n                break\n            case SystemReadingThreshold.Inactive:\n                this.service.sendEvent(SystemEvent.Inactive)\n                break\n            case SystemReadingThreshold.Neutral:\n                this.service.sendEvent(SystemEvent.Neutral)\n                break\n        }\n    }\n}\n", "import { SystemReg } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { LevelDetector } from \"./leveldetector\"\nimport { SensorServer, SensorServiceOptions } from \"./sensorserver\"\n\n/**\n * Creation options for AnalogSensorServer\n * @category Servers\n * @internal\n */\nexport interface AnalogSensorServerOptions\n    extends SensorServiceOptions<[number]> {\n    minReading?: number\n    maxReading?: number\n    inactiveThreshold?: number\n    activeThreshold?: number\n    readingResolution?: number\n}\n\n/**\n * Base class for analog sensor servers\n * @category Servers\n */\nexport class AnalogSensorServer extends SensorServer<[number]> {\n    readonly inactiveThreshold: JDRegisterServer<[number]>\n    readonly activeThreshold: JDRegisterServer<[number]>\n    readonly levelDetector: LevelDetector\n\n    constructor(serviceClass: number, options?: AnalogSensorServerOptions) {\n        super(serviceClass, options)\n        const {\n            minReading,\n            maxReading,\n            inactiveThreshold,\n            activeThreshold,\n            readingResolution,\n        } = options || {}\n        if (minReading !== undefined)\n            this.addRegister<[number]>(SystemReg.MinReading, [minReading])\n        if (maxReading !== undefined)\n            this.addRegister<[number]>(SystemReg.MaxReading, [maxReading])\n        if (readingResolution !== undefined)\n            this.addRegister<[number]>(SystemReg.ReadingResolution, [\n                readingResolution,\n            ])\n        if (\n            inactiveThreshold !== undefined ||\n            this.activeThreshold !== undefined\n        ) {\n            if (inactiveThreshold !== undefined)\n                this.inactiveThreshold = this.addRegister<[number]>(\n                    SystemReg.InactiveThreshold,\n                    [inactiveThreshold],\n                )\n            if (activeThreshold !== undefined)\n                this.activeThreshold = this.addRegister<[number]>(\n                    SystemReg.ActiveThreshold,\n                    [activeThreshold],\n                )\n            this.levelDetector = new LevelDetector(this)\n        }\n    }\n}\n", "import { CHANGE, RainGaugeReg, SRV_RAIN_GAUGE } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { AnalogSensorServer } from \"./analogsensorserver\"\n\nexport class RainGaugeServer extends AnalogSensorServer {\n    readonly precipitationPrecision: JDRegisterServer<[number]>\n    private _tiltCount = 0\n    private _level = 0\n\n    constructor(options?: { bucketSize?: number }) {\n        super(SRV_RAIN_GAUGE, {\n            readingValues: [0],\n        })\n        const { bucketSize } = options || {}\n\n        this.precipitationPrecision = this.addRegister<[number]>(\n            RainGaugeReg.PrecipitationPrecision,\n            [bucketSize || 0.2794],\n        )\n        this._level = 0\n    }\n\n    get tiltCount() {\n        return this._tiltCount\n    }\n\n    get level() {\n        return this._level\n    }\n\n    async rain(fraction: number) {\n        if (!fraction) return\n\n        this._level += fraction\n        if (this._level >= 0.7) await this.tilt()\n        else this.emit(CHANGE)\n    }\n\n    async tilt() {\n        this._tiltCount++\n        this._level = 0\n\n        const [bucket] = this.precipitationPrecision.values()\n        const [current] = this.reading.values()\n        this.reading.setValues([current + (bucket || 0.2)])\n\n        this.emit(CHANGE)\n    }\n}\n", "import {\n    ReflectedLightReg,\n    ReflectedLightVariant,\n    SRV_REFLECTED_LIGHT,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { AnalogSensorServer } from \"./analogsensorserver\"\n\nexport class ReflectedLightServer extends AnalogSensorServer {\n    readonly variant: JDRegisterServer<[ReflectedLightVariant]>\n\n    constructor(options?: { variant?: ReflectedLightVariant }) {\n        super(SRV_REFLECTED_LIGHT, { readingValues: [0] })\n        const { variant } = options || {}\n\n        this.variant = this.addRegister<[ReflectedLightVariant]>(\n            ReflectedLightReg.Variant,\n            [variant || ReflectedLightVariant.InfraredDigital],\n        )\n    }\n}\n", "import { RotaryEncoderReg, SRV_ROTARY_ENCODER } from \"../jdom/constants\"\nimport { SensorServer } from \"./sensorserver\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\n\nexport class RotaryEncoderServer extends SensorServer<[number]> {\n    readonly clicksPerTurn: JDRegisterServer<[number]>\n\n    constructor() {\n        super(SRV_ROTARY_ENCODER, { readingValues: [0], streamingInterval: 50 })\n\n        this.clicksPerTurn = this.addRegister<[number]>(\n            RotaryEncoderReg.ClicksPerTurn,\n            [12],\n        )\n    }\n\n    async rotate(clicks: number) {\n        const [position] = this.reading.values()\n        this.reading.setValues([position + (clicks >> 0)])\n    }\n}\n", "import { PACKET_DATA_NORMALIZE, ServoReg, SRV_SERVO } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\nexport class ServoServer extends JDServiceServer {\n    readonly angle: JDRegisterServer<[number]>\n    readonly offset: JDRegisterServer<[number]>\n    readonly enabled: JDRegisterServer<[boolean]>\n    readonly minAngle: JDRegisterServer<[number]>\n    readonly maxAngle: JDRegisterServer<[number]>\n    readonly responseSpeed: JDRegisterServer<[number]>\n    readonly stallTorque: JDRegisterServer<[number]>\n\n    constructor(\n        options?: {\n            minAngle?: number\n            maxAngle?: number\n            responseSpeed?: number\n            stallTorque?: number\n        } & JDServerOptions,\n    ) {\n        super(SRV_SERVO, options)\n        const {\n            minAngle = 0,\n            maxAngle = 180,\n            responseSpeed,\n            stallTorque,\n        } = options || {}\n\n        this.angle = this.addRegister<[number]>(ServoReg.Angle, [0])\n        this.enabled = this.addRegister<[boolean]>(ServoReg.Enabled, [false])\n        this.minAngle = this.addRegister<[number]>(ServoReg.MinAngle, [\n            minAngle,\n        ])\n        this.maxAngle = this.addRegister<[number]>(ServoReg.MaxAngle, [\n            maxAngle,\n        ])\n        this.offset = this.addRegister<[number]>(ServoReg.Offset, [0])\n        this.responseSpeed = this.addRegister<[number]>(\n            ServoReg.ResponseSpeed,\n            responseSpeed !== undefined ? [responseSpeed] : undefined,\n        )\n        this.stallTorque = this.addRegister<[number]>(\n            ServoReg.StallTorque,\n            stallTorque !== undefined ? [stallTorque] : undefined,\n        )\n\n        this.angle.on(PACKET_DATA_NORMALIZE, (values: [number]) => {\n            let angle = values[0]\n            const [minAngle] = this.minAngle.values()\n            const [maxAngle] = this.maxAngle.values()\n            if (minAngle !== undefined) angle = Math.max(minAngle, angle)\n            if (maxAngle !== undefined) angle = Math.min(maxAngle, angle)\n            values[0] = angle\n        })\n    }\n}\n", "import { SettingsCmd, SettingsEvent, SRV_SETTINGS } from \"../jdom/constants\"\nimport { jdpack } from \"../jdom/pack\"\nimport { Packet } from \"../jdom/packet\"\nimport { OutPipe } from \"../jdom/pipes\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\nimport { Setting } from \"../jdom/setting\"\nimport { fromHex, toHex } from \"../jdom/utils\"\n\nexport class SettingsServer extends JDServiceServer {\n    private settings: Record<string, string>\n\n    constructor(readonly store?: Setting) {\n        super(SRV_SETTINGS)\n\n        this.addCommand(SettingsCmd.Get, this.handleGet.bind(this))\n        this.addCommand(SettingsCmd.Set, this.handleSet.bind(this))\n        this.addCommand(SettingsCmd.Delete, this.handleDelete.bind(this))\n        this.addCommand(SettingsCmd.ListKeys, this.handleListKeys.bind(this))\n        this.addCommand(SettingsCmd.List, this.handleList.bind(this))\n        this.addCommand(SettingsCmd.Clear, this.handleClear.bind(this))\n\n        this.settings = this.read()\n    }\n\n    private getPayload(key: string) {\n        const value = this.settings[key]\n        const secret = /^$/.test(key)\n\n        let payload: Uint8Array\n        if (value === undefined) {\n            payload = new Uint8Array(0)\n        } else if (secret) {\n            const payload = new Uint8Array(1)\n            payload[0] = 0\n        } else {\n            payload = fromHex(value)\n        }\n\n        return payload\n    }\n\n    private async handleGet(pkt: Packet) {\n        const [key] = pkt.jdunpack<[string]>(\"s\")\n        const payload = this.getPayload(key)\n        const resp = Packet.jdpacked<[string, Uint8Array]>(\n            SettingsCmd.Get,\n            \"z b\",\n            [key, payload],\n        )\n        await this.sendPacketAsync(resp)\n    }\n\n    private async handleSet(pkt: Packet) {\n        const [key, value] = pkt.jdunpack<[string, Uint8Array]>(\"z b\")\n        this.settings[key] = toHex(value)\n        await this.save()\n    }\n\n    private async handleDelete(pkt: Packet) {\n        const [key] = pkt.jdunpack<[string]>(\"s\")\n        delete this.settings[key]\n        await this.save()\n    }\n\n    private async handleListKeys(pkt: Packet) {\n        const pipe = OutPipe.from(this.device.bus, pkt, true)\n        await pipe.respondForEach(Object.keys(this.settings), k =>\n            jdpack<[string]>(\"s\", [k]),\n        )\n    }\n\n    private async handleList(pkt: Packet) {\n        const pipe = OutPipe.from(this.device.bus, pkt, true)\n        await pipe.respondForEach(Object.keys(this.settings), k => {\n            const payload = this.getPayload(k)\n            return jdpack<[string, Uint8Array]>(\"z b\", [k, payload])\n        })\n    }\n\n    private handleClear() {\n        this.settings = {}\n        this.save()\n    }\n\n    private read(): Record<string, string> {\n        if (!this.store) return {}\n\n        try {\n            return JSON.parse(this.store.get() || \"{}\")\n        } catch (e) {\n            console.debug(e)\n            return {}\n        }\n    }\n\n    private async save() {\n        this.store?.set(JSON.stringify(this.settings))\n        await this.sendEvent(SettingsEvent.Change)\n    }\n}\n", "import {\n    SpeechSynthesisCmd,\n    SpeechSynthesisReg,\n    SRV_SPEECH_SYNTHESIS,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class SpeechSynthesisServer extends JDServiceServer {\n    readonly enabled: JDRegisterServer<[boolean]>\n    readonly pitch: JDRegisterServer<[number]>\n    readonly rate: JDRegisterServer<[number]>\n    readonly lang: JDRegisterServer<[string]>\n    readonly volume: JDRegisterServer<[number]>\n\n    readonly synthesis: SpeechSynthesis\n\n    constructor() {\n        super(SRV_SPEECH_SYNTHESIS)\n\n        this.synthesis = typeof self !== \"undefined\" && window.speechSynthesis\n\n        this.enabled = this.addRegister<[boolean]>(SpeechSynthesisReg.Enabled, [\n            !this.synthesis?.paused,\n        ])\n        this.pitch = this.addRegister<[number]>(SpeechSynthesisReg.Pitch, [1])\n        this.rate = this.addRegister<[number]>(SpeechSynthesisReg.Rate, [1])\n        this.lang = this.addRegister<[string]>(SpeechSynthesisReg.Lang, [\"\"])\n        this.volume = this.addRegister<[number]>(SpeechSynthesisReg.Volume, [\n            0.5,\n        ])\n\n        this.addCommand(SpeechSynthesisCmd.Speak, this.handleSpeak.bind(this))\n        this.addCommand(SpeechSynthesisCmd.Cancel, this.handleCancel.bind(this))\n    }\n\n    private handleSpeak(pkt: Packet) {\n        const [text] = pkt.jdunpack(\"s\")\n        if (!this.synthesis || !text) return\n\n        const [pitch] = this.pitch.values()\n        const [rate] = this.pitch.values()\n        const [lang] = this.lang.values()\n        const [volume] = this.volume.values()\n\n        const utterance = new SpeechSynthesisUtterance(text)\n        utterance.pitch = pitch\n        utterance.rate = rate\n        utterance.lang = lang\n        utterance.volume = volume\n\n        this.synthesis.speak(utterance)\n    }\n\n    private handleCancel(pkt: Packet) {\n        this.synthesis?.cancel()\n    }\n}\n", "import {\n    SRV_SWITCH,\n    SwitchEvent,\n    SwitchReg,\n    SwitchVariant,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { SensorServer } from \"./sensorserver\"\n\nexport class SwitchServer extends SensorServer<[boolean]> {\n    readonly variant: JDRegisterServer<[SwitchVariant]>\n\n    constructor(options?: { variant?: SwitchVariant }) {\n        super(SRV_SWITCH, { readingValues: [false], streamingInterval: 50 })\n        const { variant } = options || {}\n\n        this.variant = this.addRegister(\n            SwitchReg.Variant,\n            variant !== undefined ? [variant] : undefined,\n        )\n    }\n\n    async toggle() {\n        const [v] = this.reading.values()\n        if (!v) await this.switchOn()\n        else await this.switchOff()\n    }\n\n    async switchOn() {\n        const [v] = this.reading.values()\n        if (!v) {\n            this.reading.setValues([true])\n            await this.sendEvent(SwitchEvent.On)\n        }\n    }\n\n    async switchOff() {\n        const [v] = this.reading.values()\n        if (v) {\n            this.reading.setValues([false])\n            await this.sendEvent(SwitchEvent.Off)\n        }\n    }\n}\n", "import { SRV_TRAFFIC_LIGHT, TrafficLightReg } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\nexport class TrafficLightServer extends JDServiceServer {\n    readonly red: JDRegisterServer<[boolean]>\n    readonly yellow: JDRegisterServer<[boolean]>\n    readonly green: JDRegisterServer<[boolean]>\n\n    constructor(options?: JDServerOptions) {\n        super(SRV_TRAFFIC_LIGHT, options)\n\n        this.red = this.addRegister(TrafficLightReg.Red, [false])\n        this.yellow = this.addRegister(TrafficLightReg.Yellow, [false])\n        this.green = this.addRegister(TrafficLightReg.Green, [false])\n    }\n}\n", "import {\n    SoundPlayerCmd,\n    SoundPlayerReg,\n    SRV_SOUND_PLAYER,\n} from \"../jdom/constants\"\nimport { jdpack } from \"../jdom/pack\"\nimport { Packet } from \"../jdom/packet\"\nimport { OutPipe } from \"../jdom/pipes\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\n/**\n * @internal\n */\nexport type SoundPlayerSound = [number, string]\n\nexport class SoundPlayerServer extends JDServiceServer {\n    readonly volume: JDRegisterServer<[number]>\n    onPlay?: (name: string) => void\n    constructor(private readonly sounds: SoundPlayerSound[]) {\n        super(SRV_SOUND_PLAYER)\n\n        this.volume = this.addRegister(SoundPlayerReg.Volume, [0.5])\n        this.addCommand(\n            SoundPlayerCmd.ListSounds,\n            this.handleListSounds.bind(this),\n        )\n        this.addCommand(SoundPlayerCmd.Play, this.handlePlay.bind(this))\n    }\n\n    private async handleListSounds(pkt: Packet) {\n        const pipe = OutPipe.from(this.device.bus, pkt, true)\n        await pipe.respondForEach(this.sounds, sound =>\n            jdpack<[number, string]>(\"u32 s\", sound),\n        )\n    }\n\n    private handlePlay(pkt: Packet) {\n        const [name] = pkt.jdunpack(\"s\")\n        this.onPlay?.(name)\n    }\n}\n", "import {\n    REGISTER_PRE_GET,\n    RngReg,\n    RngVariant,\n    SRV_RNG,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class RandomNumberGeneratorServer extends JDServiceServer {\n    readonly reading: JDRegisterServer<[Uint8Array]>\n    constructor() {\n        super(SRV_RNG, {\n            variant: RngVariant.WebCrypto,\n        })\n\n        this.reading = this.addRegister(RngReg.Random, [new Uint8Array(64)])\n        this.reading.on(REGISTER_PRE_GET, this.handleRefresh.bind(this))\n    }\n\n    private handleRefresh() {\n        // generate new data\n        const data = new Uint8Array(64)\n        if (typeof window !== \"undefined\") window.crypto.getRandomValues(data)\n        this.reading.setValues([data], true)\n    }\n}\n", "import {\n    CHANGE,\n    CompassReg,\n    SRV_COMPASS,\n    SystemStatusCodes,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { AnalogSensorServer } from \"./analogsensorserver\"\n\nexport class CompassServer extends AnalogSensorServer {\n    private enabled: JDRegisterServer<[boolean]>\n    constructor() {\n        super(SRV_COMPASS, {\n            readingValues: [0],\n            minReading: 0,\n            maxReading: 360,\n            readingError: [1],\n        })\n\n        this.enabled = this.addRegister(CompassReg.Enabled, [false])\n        this.enabled.on(CHANGE, () => {\n            const [status] = this.statusCode.values()\n            if (status === SystemStatusCodes.CalibrationNeeded) {\n                console.debug(\"start calibration\")\n                this.calibrate()\n            }\n        })\n    }\n}\n", "import { DmxCmd, SRV_DMX } from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\nimport { toHex } from \"../jdom/utils\"\n\nexport class DMXServer extends JDServiceServer {\n    constructor() {\n        super(SRV_DMX, {\n            intensityValues: [0],\n        })\n\n        this.addCommand(DmxCmd.Send, this.handleSend.bind(this))\n    }\n\n    private handleSend(pkt: Packet) {\n        // ignore\n        console.debug(`dmx send`, toHex(pkt.data))\n    }\n}\n", "/**\n * @internal\n */\nexport function inIFrame() {\n    try {\n        return typeof window !== \"undefined\" && window.self !== window.top\n    } catch (e) {\n        return typeof window !== \"undefined\"\n    }\n}\n", "import { getNumber, NumberFormat, setNumber } from \"../jdom/buffer\"\nimport { BitRadioCmd, BitRadioReg, SRV_BIT_RADIO } from \"../jdom/constants\"\nimport { inIFrame } from \"../jdom/iframeclient\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\nimport { memcpy, stringToBuffer } from \"../jdom/utils\"\n\n// keep in sync with CODAL\nconst RADIO_MAX_PACKET_SIZE = 32\n//const MAX_FIELD_DOUBLE_NAME_LENGTH = 8;\nconst MAX_PAYLOAD_LENGTH = 20\nconst PACKET_PREFIX_LENGTH = 9\nconst VALUE_PACKET_NAME_LEN_OFFSET = 13\nconst DOUBLE_VALUE_PACKET_NAME_LEN_OFFSET = 17\n\n// Packet Spec:\n// | 0              | 1 ... 4       | 5 ... 8           | 9 ... 28\n// ----------------------------------------------------------------\n// | packet type    | system time   | serial number     | payload\n//\n// Serial number defaults to 0 unless enabled by user\n\n// payload: number (9 ... 12)\nconst PACKET_TYPE_NUMBER = 0\n// payload: number (9 ... 12), name length (13), name (14 ... 26)\nconst PACKET_TYPE_VALUE = 1\n// payload: string length (9), string (10 ... 28)\nconst PACKET_TYPE_STRING = 2\n// payload: buffer length (9), buffer (10 ... 28)\nconst PACKET_TYPE_BUFFER = 3\n// payload: number (9 ... 16)\nconst PACKET_TYPE_DOUBLE = 4\n// payload: number (9 ... 16), name length (17), name (18 ... 26)\nconst PACKET_TYPE_DOUBLE_VALUE = 5\n\nfunction getStringOffset(packetType: number) {\n    switch (packetType) {\n        case PACKET_TYPE_STRING:\n            return PACKET_PREFIX_LENGTH\n        case PACKET_TYPE_VALUE:\n            return VALUE_PACKET_NAME_LEN_OFFSET\n        case PACKET_TYPE_DOUBLE_VALUE:\n            return DOUBLE_VALUE_PACKET_NAME_LEN_OFFSET\n        default:\n            return undefined\n    }\n}\n\n/*\nfunction getMaxStringLength(packetType: number) {\n    switch (packetType) {\n        case PACKET_TYPE_STRING:\n            return MAX_PAYLOAD_LENGTH - 2;\n        case PACKET_TYPE_VALUE:\n        case PACKET_TYPE_DOUBLE_VALUE:\n            return MAX_FIELD_DOUBLE_NAME_LENGTH;\n        default:\n            return undefined;\n    }\n}\n*/\n\nfunction truncateString(str: string) {\n    // TODO\n    return str\n}\n\nclass RadioPacket {\n    public static getPacket(data: Uint8Array) {\n        if (!data) return undefined\n        // last 4 bytes is RSSi\n        return new RadioPacket(data)\n    }\n\n    public static mkPacket(packetType: number) {\n        const res = new RadioPacket()\n        res.data[0] = packetType\n        return res\n    }\n\n    private constructor(public readonly data?: Uint8Array) {\n        if (!data) this.data = new Uint8Array(RADIO_MAX_PACKET_SIZE + 4)\n    }\n\n    get signal() {\n        return getNumber(this.data, NumberFormat.Int32LE, this.data.length - 4)\n    }\n\n    get packetType() {\n        return this.data[0]\n    }\n\n    get time() {\n        return getNumber(this.data, NumberFormat.Int32LE, 1)\n    }\n\n    set time(val: number) {\n        setNumber(this.data, NumberFormat.Int32LE, 1, val)\n    }\n\n    get serial() {\n        return getNumber(this.data, NumberFormat.Int32LE, 5)\n    }\n\n    set serial(val: number) {\n        setNumber(this.data, NumberFormat.Int32LE, 5, val)\n    }\n\n    get stringPayload() {\n        const offset = getStringOffset(this.packetType) as number\n        return offset\n            ? this.data.slice(offset + 1, this.data[offset]).toString()\n            : undefined\n    }\n\n    set stringPayload(val: string) {\n        const offset = getStringOffset(this.packetType) as number\n        if (offset) {\n            const buf = stringToBuffer(truncateString(val))\n            this.data[offset] = buf.length\n            memcpy(this.data, offset + 1, buf)\n        }\n    }\n\n    get numberPayload() {\n        switch (this.packetType) {\n            case PACKET_TYPE_NUMBER:\n            case PACKET_TYPE_VALUE:\n                return getNumber(\n                    this.data,\n                    NumberFormat.Int32LE,\n                    PACKET_PREFIX_LENGTH,\n                )\n            case PACKET_TYPE_DOUBLE:\n            case PACKET_TYPE_DOUBLE_VALUE:\n                return getNumber(\n                    this.data,\n                    NumberFormat.Float64LE,\n                    PACKET_PREFIX_LENGTH,\n                )\n        }\n        return undefined\n    }\n\n    set numberPayload(val: number) {\n        switch (this.packetType) {\n            case PACKET_TYPE_NUMBER:\n            case PACKET_TYPE_VALUE:\n                setNumber(\n                    this.data,\n                    NumberFormat.Int32LE,\n                    PACKET_PREFIX_LENGTH,\n                    val,\n                )\n                break\n            case PACKET_TYPE_DOUBLE:\n            case PACKET_TYPE_DOUBLE_VALUE:\n                setNumber(\n                    this.data,\n                    NumberFormat.Float64LE,\n                    PACKET_PREFIX_LENGTH,\n                    val,\n                )\n                break\n        }\n    }\n\n    get bufferPayload() {\n        const len = this.data[PACKET_PREFIX_LENGTH]\n        return this.data.slice(\n            PACKET_PREFIX_LENGTH + 1,\n            PACKET_PREFIX_LENGTH + 1 + len,\n        )\n    }\n\n    set bufferPayload(b: Uint8Array) {\n        const len = Math.min(b.length, MAX_PAYLOAD_LENGTH - 1)\n        this.data[PACKET_PREFIX_LENGTH] = len\n        memcpy(this.data, PACKET_PREFIX_LENGTH + 1, b, 0, len)\n    }\n\n    hasString() {\n        return (\n            this.packetType === PACKET_TYPE_STRING ||\n            this.packetType === PACKET_TYPE_VALUE ||\n            this.packetType === PACKET_TYPE_DOUBLE_VALUE\n        )\n    }\n\n    hasNumber() {\n        return (\n            this.packetType === PACKET_TYPE_NUMBER ||\n            this.packetType === PACKET_TYPE_DOUBLE ||\n            this.packetType === PACKET_TYPE_VALUE ||\n            this.packetType === PACKET_TYPE_DOUBLE_VALUE\n        )\n    }\n}\n\n/**\n * A server implementation of the bit:radio service\n * @category Servers\n */\nexport class BitRadioServer extends JDServiceServer {\n    readonly enabled: JDRegisterServer<[boolean]>\n    readonly group: JDRegisterServer<[number]>\n    readonly transmissionPower: JDRegisterServer<[number]>\n    readonly frequencyBand: JDRegisterServer<[number]>\n\n    constructor() {\n        super(SRV_BIT_RADIO)\n\n        this.enabled = this.addRegister<[boolean]>(BitRadioReg.Enabled, [false])\n        this.group = this.addRegister<[number]>(BitRadioReg.Group, [1])\n        this.transmissionPower = this.addRegister<[number]>(\n            BitRadioReg.TransmissionPower,\n            [6],\n        )\n        this.frequencyBand = this.addRegister<[number]>(\n            BitRadioReg.FrequencyBand,\n            [7],\n        )\n\n        this.addCommand(\n            BitRadioCmd.SendString,\n            this.handleSendString.bind(this),\n        )\n        this.addCommand(\n            BitRadioCmd.SendNumber,\n            this.handleSendNumber.bind(this),\n        )\n        this.addCommand(BitRadioCmd.SendValue, this.handleSendValue.bind(this))\n        this.addCommand(\n            BitRadioCmd.SendBuffer,\n            this.handleSendBuffer.bind(this),\n        )\n    }\n\n    private handleSendString(pkt: Packet) {\n        const [message] = pkt.jdunpack<[string]>(\"s\")\n        const rpkt = RadioPacket.mkPacket(PACKET_TYPE_STRING)\n        rpkt.stringPayload = message\n        this.sendRadioPacket(rpkt)\n    }\n\n    private handleSendNumber(pkt: Packet) {\n        const [value] = pkt.jdunpack<[number, string]>(\"f64\")\n        const rpkt = RadioPacket.mkPacket(PACKET_TYPE_DOUBLE)\n        rpkt.numberPayload = value\n        this.sendRadioPacket(rpkt)\n    }\n\n    private handleSendValue(pkt: Packet) {\n        const [value, name] = pkt.jdunpack<[number, string]>(\"f64 s\")\n        const rpkt = RadioPacket.mkPacket(PACKET_TYPE_DOUBLE_VALUE)\n        rpkt.stringPayload = name\n        rpkt.numberPayload = value\n        this.sendRadioPacket(rpkt)\n    }\n\n    private handleSendBuffer(pkt: Packet) {\n        const { data } = pkt\n        const rpkt = RadioPacket.mkPacket(PACKET_TYPE_BUFFER)\n        rpkt.bufferPayload = data\n        this.sendRadioPacket(rpkt)\n    }\n\n    private sendRadioPacket(rpkt: RadioPacket) {\n        const [on] = this.enabled.values()\n        if (!on) return // radio is off\n\n        const { bus } = this.device\n        const { timestamp } = bus\n        const [group] = this.group.values()\n        rpkt.time = timestamp\n        rpkt.serial = 0 // todo\n        const msg = {\n            type: \"radiopacket\",\n            broadcast: true,\n            // TODO\n            rssi: -75,\n            // TODO\n            serial: 0,\n            time: bus.timestamp,\n            payload: {\n                groupId: group,\n                type: 0, // buffer\n                bufferData: rpkt.data,\n            },\n        }\n        // send message to parent\n        if (inIFrame()) {\n            window.parent.postMessage(msg, \"*\")\n        }\n    }\n}\n", "import {\n    CHANGE,\n    PowerPowerStatus,\n    PowerReg,\n    SRV_POWER,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\nexport class PowerServer extends JDServiceServer {\n    readonly allowed: JDRegisterServer<[boolean]>\n    readonly maxPower: JDRegisterServer<[number]>\n    readonly powerStatus: JDRegisterServer<[PowerPowerStatus]>\n    readonly currentDraw: JDRegisterServer<[number]>\n    readonly keepOnPulseDuration: JDRegisterServer<[number]>\n    readonly keepOnPulsePeriod: JDRegisterServer<[number]>\n\n    constructor(options?: JDServerOptions) {\n        super(SRV_POWER, options)\n        this.allowed = this.addRegister<[boolean]>(PowerReg.Allowed, [false])\n        this.maxPower = this.addRegister<[number]>(PowerReg.MaxPower, [500])\n        this.powerStatus = this.addRegister<[PowerPowerStatus]>(\n            PowerReg.PowerStatus,\n            [PowerPowerStatus.Disallowed],\n        )\n        this.currentDraw = this.addRegister<[number]>(PowerReg.CurrentDraw, [0])\n        this.keepOnPulseDuration = this.addRegister<[number]>(\n            PowerReg.KeepOnPulseDuration,\n            [10],\n        )\n        this.keepOnPulsePeriod = this.addRegister<[number]>(\n            PowerReg.KeepOnPulsePeriod,\n            [1000],\n        )\n\n        this.allowed.on(CHANGE, this.handleAllowedChange.bind(this))\n    }\n\n    private handleAllowedChange() {\n        const allowed = !!this.allowed.values()[0]\n        if (allowed) {\n            this.powerStatus.setValues([PowerPowerStatus.Powering])\n            this.currentDraw.setValues([250])\n        } else {\n            this.powerStatus.setValues([PowerPowerStatus.Disallowed])\n            this.currentDraw.setValues([0])\n        }\n    }\n}\n", "import { CapacitiveButtonReg, SRV_CAPACITIVE_BUTTON } from \"../jdom/constants\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\n\nexport class CapacitiveButtonServer extends JDServiceServer {\n    readonly threshold: JDRegisterServer<[number]>\n\n    constructor(options?: { threshold?: number } & JDServerOptions) {\n        super(SRV_CAPACITIVE_BUTTON, options)\n        const { threshold = 0.5 } = options || {}\n\n        this.threshold = this.addRegister(CapacitiveButtonReg.Threshold, [\n            threshold,\n        ])\n    }\n}\n", "import {\n    CHANGE,\n    HidKeyboardAction,\n    HidKeyboardCmd,\n    HidKeyboardCmdPack,\n    HidKeyboardModifiers,\n    SRV_HID_KEYBOARD,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\nimport { SMap } from \"../jdom/utils\"\n\nexport class HIDKeyboardServer extends JDServiceServer {\n    private _lastKey: [number, HidKeyboardModifiers, HidKeyboardAction][]\n\n    constructor(options?: JDServerOptions) {\n        super(SRV_HID_KEYBOARD, options)\n\n        this.addCommand(HidKeyboardCmd.Clear, this.handleClear.bind(this))\n        this.addCommand(HidKeyboardCmd.Key, this.handleKey.bind(this))\n    }\n\n    get lastKey() {\n        return this._lastKey\n    }\n\n    private handleKey(pkt: Packet) {\n        const [rest] = pkt.jdunpack<\n            [[number, HidKeyboardModifiers, HidKeyboardAction][]]\n        >(HidKeyboardCmdPack.Key)\n        this._lastKey = rest\n        this.emit(CHANGE)\n    }\n\n    private handleClear() {\n        if (this._lastKey) {\n            this._lastKey = undefined\n            this.emit(CHANGE)\n        }\n    }\n}\n/**\n * @internal\n */\nexport const selectors: SMap<number> = {\n    a: 0x04,\n    b: 0x05,\n    c: 0x06,\n    d: 0x07,\n    e: 0x08,\n    f: 0x09,\n    g: 0x0a,\n    h: 0x0b,\n    i: 0x0c,\n    j: 0x0d,\n    k: 0x0e,\n    l: 0x0f,\n    m: 0x10,\n    n: 0x11,\n    o: 0x12,\n    p: 0x13,\n    q: 0x14,\n    r: 0x15,\n    s: 0x16,\n    t: 0x17,\n    u: 0x18,\n    v: 0x19,\n    w: 0x1a,\n    x: 0x1b,\n    y: 0x1c,\n    z: 0x1d,\n\n    \"1\": 0x1e,\n    \"2\": 0x1f,\n    \"3\": 0x20,\n    \"4\": 0x21,\n    \"5\": 0x22,\n    \"6\": 0x23,\n    \"7\": 0x24,\n    \"8\": 0x25,\n    \"9\": 0x26,\n    \"0\": 0x27,\n\n    \"!\": 0x1e,\n    \"@\": 0x1f,\n    \"#\": 0x20,\n    $: 0x21,\n    \"%\": 0x22,\n    \"^\": 0x23,\n    \"&\": 0x24,\n    \"*\": 0x25,\n    \"(\": 0x26,\n    \")\": 0x27,\n\n    enter: 0x28,\n    escape: 0x29,\n    backspace: 0x2a,\n    tab: 0x2b,\n    space: 0x2c,\n    \" \": 0x2c,\n    \"-\": 0x2d,\n    _: 0x2d,\n    \"=\": 0x2e,\n    \"+\": 0x2e,\n    \"[\": 0x2f,\n    \"{\": 0x2f,\n    \"]\": 0x30,\n    \"}\": 0x30,\n    \"\\\\\": 0x31,\n    \"|\": 0x31,\n    // non-US #\n    \"~\": 0x32,\n    \";\": 0x33,\n    \":\": 0x33,\n    \"'\": 0x34,\n    '\"': 0x34,\n    \"`\": 0x35,\n    \",\": 0x36,\n    //\"<\": 0x37,\n    \".\": 0x37,\n    //\">\": 0x37,\n    \"/\": 0x38,\n    \"?\": 0x38,\n    capslock: 0x39,\n    f1: 0x3a,\n    f2: 0x3b,\n    f3: 0x3c,\n    f4: 0x3d,\n    f5: 0x3e,\n    f6: 0x3f,\n    f7: 0x40,\n    f8: 0x41,\n    f9: 0x42,\n    f10: 0x43,\n    f11: 0x44,\n    f12: 0x45,\n    printscreen: 0x46,\n    scrolllock: 0x47,\n    pause: 0x48,\n    insert: 0x49,\n    home: 0x4a,\n    pageup: 0x4b,\n    delete: 0x4c,\n    end: 0x4d,\n    pagedown: 0x4e,\n    arrowright: 0x4f,\n    arrowleft: 0x50,\n    arrowdown: 0x51,\n    arrowup: 0x52,\n    numlock: 0x53,\n    numpaddivide: 0x54,\n    numpadmultiply: 0x55,\n    numpadsubstract: 0x56,\n    numpadadd: 0x57,\n    numpadenter: 0x58,\n    numpad1: 0x59,\n    numpad2: 0x5a,\n    numpad3: 0x5b,\n    numpad4: 0x5c,\n    numpad5: 0x5d,\n    numpad6: 0x5e,\n    numpad7: 0x5f,\n    numpad8: 0x60,\n    numpad9: 0x61,\n    numpad0: 0x62,\n    numpaddecimal: 0x63,\n    numpadequal: 0x67,\n    f13: 0x68,\n    f14: 0x69,\n    f15: 0x6a,\n    f16: 0x6b,\n    f17: 0x6c,\n    f18: 0x6d,\n    f19: 0x6e,\n    f20: 0x6f,\n    f21: 0x70,\n    f22: 0x71,\n    f23: 0x72,\n    f24: 0x73,\n    execute: 0x74,\n    help: 0x75,\n    contextmenu: 0x76,\n    select: 0x77,\n    stop: 0x78,\n    again: 0x79,\n    undo: 0x7a,\n    cut: 0x7b,\n    copy: 0x7c,\n    paste: 0x7d,\n    find: 0x7e,\n    mute: 0x7f,\n    volumeup: 0x80,\n    volumedown: 0x81,\n\n    numpadcomma: 0x85,\n}\n/**\n * @internal\n */\nexport const reverseSelectors: { [index: number]: string } = Object.keys(\n    selectors,\n).reduce(\n    (r, key) => {\n        if (!r[selectors[key]]) r[selectors[key]] = key\n        return r\n    },\n    {} as { [index: number]: string },\n)\n\n/**\n * @internal\n */\nexport const modifierCodes = {\n    controlleft: HidKeyboardModifiers.LeftControl,\n    altleft: HidKeyboardModifiers.LeftAlt,\n    shiftleft: HidKeyboardModifiers.LeftShift,\n    metaleft: HidKeyboardModifiers.LeftGUI,\n\n    controlright: HidKeyboardModifiers.RightControl,\n    altright: HidKeyboardModifiers.RightAlt,\n    shiftright: HidKeyboardModifiers.RightShift,\n    metaright: HidKeyboardModifiers.RightGUI,\n}\n\n/**\n * @internal\n */\nexport function renderKeyboardKey(\n    selector: number,\n    modifiers: HidKeyboardModifiers,\n    pretty: boolean,\n) {\n    const flags = pretty\n        ? [\n              \"Ctrl\",\n              \"Shift\",\n              \"Alt\",\n              \"Cmd\",\n              \"Ctrl Right\",\n              \"Shift Right\",\n              \"AltRight\",\n              \"Cmd Right\",\n          ]\n        : [\n              \"{controlleft}\",\n              \"{shiftleft}\",\n              \"{altleft}\",\n              \"{metaleft}\",\n              \"{controlright}\",\n              \"{shiftright}\",\n              \"{altright}\",\n              \"{metaright}\",\n          ]\n    const sep = pretty ? \" + \" : \" \"\n    const values = []\n    flags.forEach((flag, i) => {\n        if (modifiers & (1 << i)) {\n            values.push(flag)\n        }\n    })\n    const sel = reverseSelectors[selector]\n    if (sel !== undefined)\n        values.push(\n            pretty\n                ? sel.toUpperCase()\n                : !pretty && sel.length > 1\n                ? `{${sel}}`\n                : sel,\n        )\n    const value = values.filter(v => !!v).join(sep)\n    return value\n}\n", "import {\n    CHANGE,\n    HidMouseButton,\n    HidMouseButtonEvent,\n    HidMouseCmd,\n    SRV_HID_MOUSE,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\n/**\n * @internal\n */\nexport function renderHidMouseButtons(buttons: HidMouseButton) {\n    const btns = [\n        buttons & HidMouseButton.Left ? \"left\" : \"\",\n        buttons & HidMouseButton.Right ? \"right\" : \"\",\n        buttons & HidMouseButton.Middle ? \"middle\" : \"\",\n    ]\n        .filter(b => !!b)\n        .join(\", \")\n    return btns\n}\n\nexport class HIDMouseServer extends JDServiceServer {\n    private _lastCommand: string\n\n    constructor(options?: JDServerOptions) {\n        super(SRV_HID_MOUSE, options)\n\n        this.addCommand(HidMouseCmd.Move, this.handleMove.bind(this))\n        this.addCommand(HidMouseCmd.SetButton, this.handleSetButton.bind(this))\n        this.addCommand(HidMouseCmd.Wheel, this.handleWheel.bind(this))\n    }\n\n    get lastCommand() {\n        return this._lastCommand\n    }\n\n    setLastCommand(s: string) {\n        if (this._lastCommand !== s) {\n            this._lastCommand = s\n            this.emit(CHANGE)\n        }\n    }\n\n    private handleMove(pkt: Packet) {\n        const [dx, dy, time] =\n            pkt.jdunpack<[number, number, number]>(\"i16 i16 u16\")\n        this.setLastCommand(`move ${dx} ${dy} ${time}`)\n    }\n\n    private handleSetButton(pkt: Packet) {\n        const [buttons, event] =\n            pkt.jdunpack<[HidMouseButton, HidMouseButtonEvent]>(\"u16 u8\")\n        const btns = renderHidMouseButtons(buttons)\n        this.setLastCommand(\n            `set buttons ${btns || \"?\"} ${(\n                HidMouseButtonEvent[event] || \"?\"\n            ).toLocaleLowerCase()}`,\n        )\n    }\n\n    private handleWheel(pkt: Packet) {\n        const [dy, time] = pkt.jdunpack<[number, number]>(\"i16 u16\")\n        this.setLastCommand(`wheel ${dy} ${time}`)\n    }\n}\n", "import { JDRegisterServer } from \"../jacdac\"\nimport {\n    CHANGE,\n    REFRESH,\n    SRV_VIBRATION_MOTOR,\n    VibrationMotorCmd,\n    VibrationMotorReg,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDServerOptions, JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class VibrationMotorServer extends JDServiceServer {\n    static VIBRATE_PATTERN = \"vibratePattern\"\n\n    private _animation: {\n        start: number\n        pattern: [number, number][]\n    }\n    private _animationStep = -1\n    readonly maxVibrations: JDRegisterServer<[number]>\n\n    constructor(options?: { maxVibrations?: number } & JDServerOptions) {\n        super(SRV_VIBRATION_MOTOR, options)\n        const { maxVibrations = 10 } = options || {}\n\n        this.maxVibrations = this.addRegister<[number]>(\n            VibrationMotorReg.MaxVibrations,\n            [maxVibrations],\n        )\n        this.addCommand(\n            VibrationMotorCmd.Vibrate,\n            this.handleVibrate.bind(this),\n        )\n        this.on(REFRESH, this.handleRefresh.bind(this))\n    }\n\n    private handleRefresh() {\n        if (!this._animation) return // nothing to do\n\n        const { start, pattern } = this._animation\n        const now = this.device.bus.timestamp\n        const elapsed = now - start\n        let t = 0\n        for (let i = 0; i < pattern.length; ++i) {\n            const [duration, speed] = pattern[i]\n            const dt = duration << 3\n            t += dt\n            if (t - dt <= elapsed && t > elapsed) {\n                // we're playing this note\n                if (this._animationStep !== i) {\n                    this._animationStep = i\n                    this.emit(VibrationMotorServer.VIBRATE_PATTERN, {\n                        duration,\n                        speed,\n                    })\n                }\n                break\n            }\n        }\n        if (elapsed > t) {\n            // animation finished\n            this._animation = undefined\n            this._animationStep = -1\n            this.emit(VibrationMotorServer.VIBRATE_PATTERN, {\n                duration: 0,\n                speed: 0,\n            })\n            this.emit(CHANGE)\n        }\n    }\n\n    private handleVibrate(pkt: Packet) {\n        const [pattern] = pkt.jdunpack<[[number, number][]]>(\"r: u8 u0.8\")\n        this._animation = {\n            start: this.device.bus.timestamp,\n            pattern,\n        }\n        this._animationStep = -1\n        if (pattern.length) {\n            const [duration, speed] = pattern[0]\n            this._animationStep = 0\n            this.emit(VibrationMotorServer.VIBRATE_PATTERN, {\n                duration,\n                speed,\n            })\n        }\n        this.emit(CHANGE)\n    }\n}\n", "import {\n    CHANGE,\n    SRV_WIFI,\n    WifiAPFlags,\n    WifiCmd,\n    WifiEvent,\n    WifiReg,\n} from \"../jdom/constants\"\nimport { jdpack } from \"../jdom/pack\"\nimport { Packet } from \"../jdom/packet\"\nimport { OutPipe } from \"../jdom/pipes\"\nimport { randomBytes } from \"../jdom/random\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport interface ScanResult {\n    flags: WifiAPFlags\n    rssi: number\n    channel: number\n    bssid: Uint8Array\n    ssid: string\n}\n\nexport interface Network {\n    ssid: string\n    flags: WifiAPFlags\n    priority: number\n    password: string\n}\n\nexport class WifiServer extends JDServiceServer {\n    readonly enabled: JDRegisterServer<[boolean]>\n    readonly ssid: JDRegisterServer<[string]>\n    readonly ipAddress: JDRegisterServer<[Uint8Array]>\n    readonly eui48: JDRegisterServer<[Uint8Array]>\n\n    private _lastScanResults: ScanResult[]\n    private _knownNetworks: Network[]\n\n    constructor(options?: {\n        scanResults?: ScanResult[]\n        knownNetworks?: Network[]\n    }) {\n        super(SRV_WIFI, { intensityValues: [true] })\n\n        this._lastScanResults = options?.scanResults || []\n        this._knownNetworks = options?.knownNetworks || []\n\n        this.enabled = this.addRegister(WifiReg.Enabled, [true])\n        this.ssid = this.addRegister(WifiReg.Ssid, [\"\"])\n        this.ipAddress = this.addRegister<[Uint8Array]>(WifiReg.IpAddress, [\n            new Uint8Array(0),\n        ])\n        this.eui48 = this.addRegister<[Uint8Array]>(WifiReg.Eui48, [\n            new Uint8Array(0),\n        ])\n\n        this.addCommand(WifiCmd.Scan, this.handleScan.bind(this))\n        this.addCommand(WifiCmd.Reconnect, this.handleReconnect.bind(this))\n        this.addCommand(\n            WifiCmd.LastScanResults,\n            this.handleLastScanResults.bind(this),\n        )\n        this.addCommand(\n            WifiCmd.ListKnownNetworks,\n            this.handleListKnownNetworks.bind(this),\n        )\n        this.addCommand(WifiCmd.AddNetwork, this.handleAddNetwork.bind(this))\n        this.addCommand(\n            WifiCmd.ForgetAllNetworks,\n            this.handleForgetAllNetworks.bind(this),\n        )\n        this.addCommand(\n            WifiCmd.ForgetNetwork,\n            this.handleForgetNetwork.bind(this),\n        )\n        this.addCommand(\n            WifiCmd.SetNetworkPriority,\n            this.handleSetNetworkPriority.bind(this),\n        )\n\n        this.ipAddress.on(CHANGE, this.handleIpChange.bind(this))\n        this.enabled.on(CHANGE, this.handleEnabledChange.bind(this))\n    }\n\n    private handleEnabledChange() {\n        const [enabled] = this.enabled.values()\n        if (!enabled) this.disconnect()\n        else this.connect()\n    }\n\n    private handleIpChange() {\n        const [ip] = this.ipAddress.values()\n        if (ip?.length) this.sendEvent(WifiEvent.GotIp)\n        else this.sendEvent(WifiEvent.LostIp)\n    }\n\n    private get scannedKnownNetworks() {\n        return this._lastScanResults.filter(n =>\n            this._knownNetworks.some(kn => kn.ssid === n.ssid),\n        )\n    }\n\n    private handleReconnect() {\n        this.disconnect()\n        if (this.scannedKnownNetworks.length) {\n            console.debug(`wifi: reconnect, connect`)\n            this.enabled.setValues([true])\n        }\n    }\n\n    private connect() {\n        const network = this.scannedKnownNetworks[0]\n        const { ssid } = network || {}\n        this.ssid.setValues([ssid || \"\"])\n        this.enabled.setValues([!!ssid])\n        this.ipAddress.setValues([ssid ? randomBytes(4) : new Uint8Array(0)])\n    }\n\n    private disconnect() {\n        this.ssid.setValues([\"\"])\n        this.enabled.setValues([false])\n        this.ipAddress.setValues([new Uint8Array(0)])\n    }\n\n    private scan() {\n        this.sendEvent(\n            WifiEvent.ScanComplete,\n            jdpack<[number, number]>(\"u16 u16\", [\n                this._lastScanResults.length,\n                this.scannedKnownNetworks.length,\n            ]),\n        )\n    }\n\n    private handleScan() {\n        this.scan()\n    }\n\n    private async handleLastScanResults(pkt: Packet) {\n        const pipe = OutPipe.from(this.device.bus, pkt, true)\n        await pipe.respondForEach(\n            this._lastScanResults,\n            ({ flags, rssi, channel, bssid, ssid }) =>\n                jdpack<[WifiAPFlags, number, number, Uint8Array, string]>(\n                    \"u32 x[4] i8 u8 b[6] s[33]\",\n                    [flags, rssi, channel, bssid, ssid],\n                ),\n        )\n    }\n\n    private async handleListKnownNetworks(pkt: Packet) {\n        const pipe = OutPipe.from(this.device.bus, pkt, true)\n        await pipe.respondForEach(\n            this._knownNetworks,\n            ({ priority, flags, ssid }) =>\n                jdpack<[number, number, string]>(\"i16 i16 s\", [\n                    priority,\n                    flags,\n                    ssid,\n                ]),\n        )\n    }\n\n    private handleAddNetwork(pkt: Packet) {\n        const [ssid, password] = pkt.jdunpack<[string, string]>(\"z z\")\n        let network = this._knownNetworks.find(n => n.ssid === ssid)\n        if (!network) {\n            const scanned = this._lastScanResults.find(s => s.ssid === ssid)\n            this._knownNetworks.push(\n                (network = {\n                    ssid,\n                    flags: scanned?.flags,\n                    priority: 0,\n                    password: \"\",\n                }),\n            )\n        }\n        network.password = password\n        this.sendEvent(WifiEvent.NetworksChanged)\n    }\n\n    private handleForgetAllNetworks() {\n        this._knownNetworks = []\n        this.disconnect()\n        this.sendEvent(WifiEvent.NetworksChanged)\n    }\n\n    private handleForgetNetwork(pkt: Packet) {\n        const [ssid] = pkt.jdunpack<[string]>(\"s\")\n        this._knownNetworks = this._knownNetworks.filter(\n            network => network.ssid !== ssid,\n        )\n        const [currentSsid] = this.ssid.values()\n        if (ssid === currentSsid) this.disconnect()\n        this.sendEvent(WifiEvent.NetworksChanged)\n    }\n\n    private handleSetNetworkPriority(pkt: Packet) {\n        const [priority, ssid] = pkt.jdunpack<[number, string]>(\"i16 s\")\n        const network = this._knownNetworks.find(\n            network => network.ssid === ssid,\n        )\n        if (network) network.priority = priority\n        this.sendEvent(WifiEvent.NetworksChanged)\n    }\n}\n", "import {\n    AccelerometerReg,\n    SRV_ACCELEROMETER,\n} from \"../../jacdac-spec/dist/specconstants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { SensorServer } from \"./sensorserver\"\n\nexport class AccelerometerServer extends SensorServer<\n    [number, number, number]\n> {\n    maxForce: JDRegisterServer<[number]>\n\n    constructor() {\n        super(SRV_ACCELEROMETER, {\n            readingValues: [0.5, 0.5, -(1 - (0.5 * 0.5 + 0.5 * 0.5))],\n            preferredStreamingInterval: 20,\n        })\n\n        this.maxForce = this.addRegister<[number]>(AccelerometerReg.MaxForce, [\n            2,\n        ])\n    }\n}\n", "import { BrailleDisplayReg, SRV_BRAILLE_DISPLAY } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\nexport class BrailleDisplayServer extends JDServiceServer {\n    readonly patterns: JDRegisterServer<[string]>\n    readonly enabled: JDRegisterServer<[boolean]>\n    readonly length: JDRegisterServer<[number]>\n\n    constructor(\n        options?: { patterns?: string; length?: number } & JDServerOptions,\n    ) {\n        super(SRV_BRAILLE_DISPLAY, options)\n        const { patterns = \"\", length = 12 } = options || {}\n\n        this.patterns = this.addRegister<[string]>(BrailleDisplayReg.Patterns, [\n            patterns,\n        ])\n        this.enabled = this.addRegister<[boolean]>(BrailleDisplayReg.Enabled, [\n            false,\n        ])\n        this.length = this.addRegister<[number]>(BrailleDisplayReg.Length, [\n            length,\n        ])\n    }\n}\n", "import {\n    CHANGE,\n    LedReg,\n    CONST_LED_MAX_PIXELS_LENGTH,\n    SRV_LED,\n    FRAME_PROCESS_LARGE,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\nfunction SCALE0(c: number, i: number) {\n    return ((c & 0xff) * (1 + (i & 0xff))) >> 8\n}\n\nexport interface LedServerOptions extends JDServerOptions {\n    numPixels?: number\n    numColumns?: number\n    ledsPerPixel?: number\n    luminousIntensity?: number\n    waveLength?: number\n    maxPower?: number\n    color?: [number, number, number]\n}\n\nexport class LedServer extends JDServiceServer {\n    readonly pixels: JDRegisterServer<[Uint8Array]>\n    readonly brightness: JDRegisterServer<[number]>\n    readonly actualBrightness: JDRegisterServer<[number]>\n    readonly numPixels: JDRegisterServer<[number]>\n    readonly maxPower: JDRegisterServer<[number]>\n    readonly numColumns: JDRegisterServer<[number]>\n    readonly ledsPerPixel: JDRegisterServer<[number]>\n    readonly luminousIntensity: JDRegisterServer<[number]>\n    readonly waveLength: JDRegisterServer<[number]>\n\n    constructor(options?: LedServerOptions) {\n        super(SRV_LED, options)\n\n        const {\n            numColumns,\n            maxPower = 200,\n            numPixels = 10,\n            ledsPerPixel,\n            luminousIntensity,\n            waveLength,\n        } = options || {}\n\n        const n = Math.min(CONST_LED_MAX_PIXELS_LENGTH, numPixels)\n\n        this.pixels = this.addRegister<[Uint8Array]>(LedReg.Pixels, [\n            new Uint8Array(n * 3),\n        ])\n        this.brightness = this.addRegister<[number]>(LedReg.Brightness, [15])\n        this.actualBrightness = this.addRegister<[number]>(\n            LedReg.ActualBrightness,\n            [15],\n        )\n        this.numPixels = this.addRegister<[number]>(LedReg.NumPixels, [n])\n        this.maxPower = this.addRegister<[number]>(LedReg.MaxPower, [maxPower])\n        if (numColumns !== undefined)\n            this.numColumns = this.addRegister<[number]>(LedReg.NumColumns, [\n                numColumns,\n            ])\n        if (ledsPerPixel !== undefined)\n            this.ledsPerPixel = this.addRegister(LedReg.LedsPerPixel, [\n                ledsPerPixel,\n            ])\n        if (luminousIntensity !== undefined)\n            this.luminousIntensity = this.addRegister(\n                LedReg.LuminousIntensity,\n                [luminousIntensity],\n            )\n        if (waveLength !== undefined)\n            this.waveLength = this.addRegister(LedReg.WaveLength, [waveLength])\n\n        this.brightness.on(CHANGE, () => {\n            this.intensity = this.requested_intensity\n            this.limit_intensity()\n        })\n        this.pixels.on(CHANGE, () => this.limit_intensity())\n\n        this.on(FRAME_PROCESS_LARGE, this.handleFrameLarge.bind(this))\n    }\n\n    private handleFrameLarge(topic: string, data: Uint8Array) {\n        if (topic === \"leds\") this.pixels.setValues([data])\n    }\n\n    /**\n     * Gets an array of RGB color numbers\n     */\n    get colors() {\n        return this.pixels.data\n    }\n\n    private get maxpower(): number {\n        const [r] = this.maxPower.values() || [200]\n        return r\n    }\n\n    private get numpixels(): number {\n        const [r] = this.numPixels.values() || [0]\n        return r\n    }\n\n    private get requested_intensity(): number {\n        const [r] = this.brightness.values() || [0]\n        return r\n    }\n\n    private get intensity(): number {\n        const [r] = this.actualBrightness.values() || [0]\n        return r\n    }\n\n    private set intensity(v: number) {\n        this.actualBrightness.setValues([v])\n    }\n\n    get enabled() {\n        return this.numpixels > 0 && this.requested_intensity > 0\n    }\n\n    private limit_intensity() {\n        const pxbuffer = this.pixels.data\n        const { numpixels, requested_intensity, maxpower } = this\n\n        let n = numpixels * 3\n        const prev_intensity = this.intensity\n        let intensity = this.intensity\n\n        intensity += 1 + (intensity >> 5)\n        if (\n            requested_intensity !== undefined &&\n            intensity > requested_intensity\n        )\n            intensity = requested_intensity\n\n        let current_full = 0\n        let current = 0\n        let current_prev = 0\n        let di = 0\n        while (n--) {\n            const v = pxbuffer[di++]\n            current += SCALE0(v, intensity)\n            current_prev += SCALE0(v, prev_intensity)\n            current_full += v\n        }\n\n        // 46uA per step of LED\n        current *= 46\n        current_prev *= 46\n        current_full *= 46\n\n        // 14mA is the chip at 48MHz, 930uA per LED is static\n        const base_current = 14000 + 930 * numpixels\n        const current_limit = maxpower * 1000 - base_current\n\n        if (current <= current_limit) {\n            this.intensity = intensity\n            // LOG(\"curr: %dmA; not limiting %d\", (base_current + current) / 1000, state->intensity);\n            return\n        }\n\n        if (current_prev <= current_limit) {\n            return // no change needed\n        }\n\n        let inten = current_limit / (current_full >> 8) - 1\n        if (inten < 0) inten = 0\n        this.intensity = inten\n    }\n}\n", "import { PowerSupplyReg, SRV_POWER_SUPPLY } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class PowerSupplyServer extends JDServiceServer {\n    readonly enabled: JDRegisterServer<[boolean]>\n    readonly outputVoltage: JDRegisterServer<[number]>\n    readonly minVoltage: JDRegisterServer<[number]>\n    readonly maxVoltage: JDRegisterServer<[number]>\n\n    constructor(options?: {\n        outputVoltage: number\n        minVoltage: number\n        maxVoltage: number\n    }) {\n        super(SRV_POWER_SUPPLY)\n        const { outputVoltage, minVoltage, maxVoltage } = options || {}\n\n        this.enabled = this.addRegister(PowerSupplyReg.Enabled, [false])\n        this.outputVoltage = this.addRegister(PowerSupplyReg.OutputVoltage, [\n            outputVoltage,\n        ])\n        this.minVoltage = this.addRegister(PowerSupplyReg.MinimumVoltage, [\n            minVoltage,\n        ])\n        this.maxVoltage = this.addRegister(PowerSupplyReg.MaximumVoltage, [\n            maxVoltage,\n        ])\n    }\n}\n", "import { bufferEq } from \"../jdom/utils\"\nimport {\n    CHANGE,\n    HidJoystickCmd,\n    HidJoystickReg,\n    SRV_HID_JOYSTICK,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDServerOptions, JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class HIDJoystickServer extends JDServiceServer {\n    buttons: Uint8Array = new Uint8Array()\n    axis: Uint8Array = new Uint8Array()\n\n    constructor(\n        options?: {\n            buttonCount: number\n            axisCount: number\n            buttonsAnalog: boolean\n        } & JDServerOptions,\n    ) {\n        super(SRV_HID_JOYSTICK, options)\n        const {\n            buttonCount = 16,\n            axisCount = 6,\n            buttonsAnalog = false,\n        } = options || {}\n\n        this.addRegister(HidJoystickReg.ButtonCount, [buttonCount])\n        this.addRegister(HidJoystickReg.AxisCount, [axisCount])\n        this.addRegister(HidJoystickReg.ButtonsAnalog, [buttonsAnalog])\n\n        this.addCommand(\n            HidJoystickCmd.SetButtons,\n            this.handleSetButtons.bind(this),\n        )\n        this.addCommand(HidJoystickCmd.SetAxis, this.handleSetAxis.bind(this))\n    }\n\n    private handleSetButtons(pkt: Packet) {\n        if (!bufferEq(this.buttons, pkt.data)) {\n            this.buttons = pkt.data\n            this.emit(CHANGE)\n        }\n    }\n    private handleSetAxis(pkt: Packet) {\n        if (!bufferEq(this.axis, pkt.data)) {\n            this.axis = pkt.data\n            this.emit(CHANGE)\n        }\n    }\n}\n", "import {\n    CHANGE,\n    MagneticFieldLevelEvent,\n    MagneticFieldLevelReg,\n    MagneticFieldLevelVariant,\n    SRV_MAGNETIC_FIELD_LEVEL,\n    SystemReadingThreshold,\n} from \"../jdom/constants\"\nimport { JDServerOptions } from \"../jdom/servers/serviceserver\"\nimport { SensorServer } from \"./sensorserver\"\n\nexport interface MagneticFieldLevelServerOptions extends JDServerOptions {\n    variant: MagneticFieldLevelVariant\n}\n\nexport class MagneticFieldLevelServer extends SensorServer<[number]> {\n    private _state = SystemReadingThreshold.Neutral\n\n    static ACTIVE_THRESHOLD = 0.3\n    static INACTIVE_THRESHOLD = 0.1\n\n    constructor(options: MagneticFieldLevelServerOptions) {\n        super(SRV_MAGNETIC_FIELD_LEVEL, {\n            ...options,\n            readingValues: [0],\n        })\n\n        this.reading.on(CHANGE, this.update.bind(this))\n    }\n\n    active() {\n        this.reading.setValues([1])\n    }\n\n    inactive() {\n        this.reading.setValues([0])\n    }\n\n    get variant() {\n        const reg = this.register(MagneticFieldLevelReg.Variant)\n        const [v] = reg.values() as [MagneticFieldLevelVariant]\n        return v\n    }\n\n    private update() {\n        const [strength] = this.reading.values()\n        if (Math.abs(strength) >= MagneticFieldLevelServer.ACTIVE_THRESHOLD) {\n            this.setState(SystemReadingThreshold.Active)\n        } else if (\n            Math.abs(strength) <= MagneticFieldLevelServer.INACTIVE_THRESHOLD\n        ) {\n            this.setState(SystemReadingThreshold.Inactive)\n        } else this.setState(SystemReadingThreshold.Neutral)\n    }\n\n    private setState(state: number) {\n        if (state === this._state) return\n\n        const variant = this.variant\n        this._state = state\n        switch (state) {\n            case SystemReadingThreshold.Active:\n                this.sendEvent(MagneticFieldLevelEvent.Active)\n                break\n            case SystemReadingThreshold.Inactive:\n                this.sendEvent(MagneticFieldLevelEvent.Inactive)\n                break\n        }\n    }\n}\n", "import { DualMotorsReg, SRV_DUAL_MOTORS } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class DualMotorsServer extends JDServiceServer {\n    readonly speed: JDRegisterServer<[number, number]>\n    readonly enabled: JDRegisterServer<[boolean]>\n    readonly loadTorque: JDRegisterServer<[number]>\n    readonly loadRotationSpeed: JDRegisterServer<[number]>\n\n    constructor(\n        instanceName?: string,\n        options?: {\n            loadTorque?: number\n            loadRotationSpeed?: number\n        },\n    ) {\n        super(SRV_DUAL_MOTORS, { instanceName })\n\n        const { loadTorque, loadRotationSpeed } = options || {}\n\n        this.speed = this.addRegister<[number, number]>(\n            DualMotorsReg.Speed,\n            [0, 0],\n        )\n        this.enabled = this.addRegister<[boolean]>(DualMotorsReg.Enabled, [\n            false,\n        ])\n        if (loadTorque)\n            this.loadTorque = this.addRegister<[number]>(\n                DualMotorsReg.LoadTorque,\n                [loadTorque],\n            )\n        if (loadRotationSpeed)\n            this.loadRotationSpeed = this.addRegister<[number]>(\n                DualMotorsReg.LoadRotationSpeed,\n                [loadRotationSpeed],\n            )\n    }\n}\n", "import {\n    CloudAdapterCmd,\n    CloudAdapterEvent,\n    CloudAdapterReg,\n    SRV_CLOUD_ADAPTER,\n    CHANGE,\n    CloudAdapterCmdPack,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServerOptions, JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport const UPLOAD_JSON = \"upload\"\nexport const UPLOAD_BIN = \"uploadBin\"\nexport const CLOUD_COMMAND = \"cloudCommand\"\n\nexport interface CloudAdapterUploadJSONRequest {\n    json: string\n}\n\nexport interface CloudAdapterUploadBinRequest {\n    data: Uint8Array\n}\n\nexport class CloudAdapterServer extends JDServiceServer {\n    readonly connectedRegister: JDRegisterServer<[boolean]>\n    readonly connectionNameRegister: JDRegisterServer<[string]>\n    readonly controlled: boolean\n\n    constructor(\n        options?: {\n            connectionName?: string\n            controlled?: boolean\n        } & JDServerOptions,\n    ) {\n        super(SRV_CLOUD_ADAPTER, options)\n\n        this.controlled = !!options?.controlled\n        this.connectedRegister = this.addRegister(CloudAdapterReg.Connected, [\n            false,\n        ])\n        this.connectionNameRegister = this.addRegister(\n            CloudAdapterReg.ConnectionName,\n            [options?.connectionName || \"\"],\n        )\n        this.addCommand(\n            CloudAdapterCmd.UploadJson,\n            this.handleUpload.bind(this),\n        )\n        this.addCommand(\n            CloudAdapterCmd.UploadBinary,\n            this.handleUploadBin.bind(this),\n        )\n        this.connectedRegister.on(CHANGE, () =>\n            this.sendEvent(CloudAdapterEvent.Change),\n        )\n        this.connectionNameRegister.on(CHANGE, () =>\n            this.sendEvent(CloudAdapterEvent.Change),\n        )\n    }\n\n    get connected() {\n        return this.connectedRegister.values()[0]\n    }\n\n    set connected(value: boolean) {\n        if (value !== this.connected) {\n            this.connectedRegister.setValues([!!value])\n            this.sendEvent(CloudAdapterEvent.Change)\n        }\n    }\n\n    private async handleUpload(pkt: Packet) {\n        if (!this.connected) {\n            console.debug(`cloud: cancel upload, not connected`)\n            return\n        }\n\n        const [json] = pkt.jdunpack<[string]>(CloudAdapterCmdPack.UploadJson)\n        this.uploadJSON(json)\n    }\n\n    private async handleUploadBin(pkt: Packet) {\n        if (!this.connected) {\n            console.debug(`cloud: cancel upload, not connected`)\n            return\n        }\n\n        const data = pkt.data\n        this.uploadBin(data)\n    }\n\n    uploadJSON(json: string) {\n        this.emit(UPLOAD_JSON, <CloudAdapterUploadJSONRequest>{\n            json,\n        })\n    }\n\n    uploadBin(data: Uint8Array) {\n        this.emit(UPLOAD_BIN, <CloudAdapterUploadBinRequest>{ data })\n    }\n}\n", "import { SatNavReg, SRV_SAT_NAV } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { SensorServer, SensorServiceOptions } from \"./sensorserver\"\n\nexport type SatNavReadingType = [\n    number, // time\n    number, // latitude\n    number, // longitude\n    number, // accuracy\n    number, // altitude,\n    number, // altitude accuracy\n]\n\nexport class SatNavServer extends SensorServer<SatNavReadingType> {\n    readonly enabled: JDRegisterServer<[boolean]>\n\n    constructor(options?: SensorServiceOptions<SatNavReadingType>) {\n        super(\n            SRV_SAT_NAV,\n            options || {\n                streamingInterval: 1000,\n            },\n        )\n        this.enabled = this.addRegister(SatNavReg.Enabled, [false])\n    }\n\n    setGeolocationPosition(\n        loc: GeolocationPosition,\n        skipChangeEvent?: boolean,\n    ) {\n        const { timestamp, coords } = loc\n        const { latitude, longitude, accuracy, altitude, altitudeAccuracy } =\n            coords\n        this.reading.setValues(\n            [\n                timestamp,\n                latitude,\n                longitude,\n                accuracy,\n                altitude || 0,\n                altitudeAccuracy || 0,\n            ],\n            skipChangeEvent,\n        )\n    }\n}\n\nexport function watchLocation(\n    server: SatNavServer,\n    options?: PositionOptions,\n): () => void {\n    let id: number = undefined\n    const success: PositionCallback = pos => {\n        console.log(\"geo: pos\", { id, pos })\n        if (id !== undefined) server.setGeolocationPosition(pos)\n    }\n    const unmount = () => {\n        if (id !== undefined) navigator.geolocation.clearWatch(id)\n        console.log(\"geo: unmount\", { id })\n        id = undefined\n    }\n    const error: PositionErrorCallback = err => {\n        console.log(err)\n        unmount()\n    }\n    if (typeof navigator !== \"undefined\" && navigator.geolocation) {\n        id = navigator.geolocation.watchPosition(\n            success,\n            error,\n            options || {\n                enableHighAccuracy: false,\n                timeout: 5000,\n                maximumAge: 0,\n            },\n        )\n        console.log(\"geo: mount\", { id })\n        navigator.geolocation.getCurrentPosition(success, error)\n    }\n    return unmount\n}\n", "import { SRV_PLANAR_POSITION } from \"../jacdac\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { SensorServer } from \"./sensorserver\"\n\nexport class PlanarPositionServer extends SensorServer<[number, number]> {\n    position: JDRegisterServer<[number]>\n\n    constructor() {\n        super(SRV_PLANAR_POSITION, {\n            readingValues: [0, 0],\n            preferredStreamingInterval: 500,\n        })\n    }\n\n    move(dx: number, dy: number) {\n        if (!dx && !dy) return\n        let [x = 0, y = 0] = this.reading.values()\n        x += dx\n        y += dy\n        this.reading.setValues([x, y])\n        // always send update immediately\n        this.reading.sendGetAsync()\n    }\n}\n", "import { Packet, toHex } from \"../jacdac\"\nimport {\n    SerialCmd,\n    SerialParityType,\n    SerialReg,\n    SRV_SERIAL,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class SerialServer extends JDServiceServer {\n    readonly connected: JDRegisterServer<[boolean]>\n    readonly baudRate: JDRegisterServer<[number]>\n    readonly dataBits: JDRegisterServer<[number]>\n    readonly stopBits: JDRegisterServer<[number]>\n    readonly parityMode: JDRegisterServer<[SerialParityType]>\n    readonly bufferSize: JDRegisterServer<[number]>\n\n    constructor(options?: {\n        baudRate?: number\n        dataBits?: number\n        stopBits?: number\n        parityMode?: SerialParityType\n        bufferSize?: number\n        connectionName?: string\n    }) {\n        super(SRV_SERIAL)\n        const {\n            baudRate = 115200,\n            dataBits = 8,\n            stopBits = 1,\n            parityMode = SerialParityType.None,\n            bufferSize = 64,\n            connectionName,\n        } = options || {}\n\n        this.connected = this.addRegister(SerialReg.Connected, [false])\n        this.baudRate = this.addRegister(SerialReg.BaudRate, [baudRate])\n        this.dataBits = this.addRegister(SerialReg.DataBits, [dataBits])\n        this.stopBits = this.addRegister(SerialReg.StopBits, [stopBits])\n        this.parityMode = this.addRegister(SerialReg.ParityMode, [parityMode])\n        this.bufferSize = this.addRegister(SerialReg.BufferSize, [bufferSize])\n        if (connectionName)\n            this.addRegister(SerialReg.ConnectionName, [connectionName])\n        this.addCommand(SerialCmd.Send, this.handleSend.bind(this))\n    }\n\n    private handleSend(pkt: Packet) {\n        const [connected] = this.connected.values()\n        if (!connected) return // ignore\n\n        console.debug(`serial send`, toHex(pkt.data))\n    }\n}\n", "import { JSONTryParse, jdpack } from \"../jacdac\"\nimport { CHANGE, RosCmd, RosCmdPack, SRV_ROS } from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport const ADVERTISE = \"advertise\"\nexport const SUBSCRIBE = \"subscribe\"\nexport const PUBLISH = \"publish\"\nexport const RosReportMessage = 0x83\n\n/**\n * Emitted with SUBSCRIBE on new subscription\n */\nexport interface RosSubscription {\n    node: string\n    topic: string\n}\n\n/**\n * Emitted with PUBLISH when receiving a publish message command\n */\nexport interface RosMessage {\n    node: string\n    topic: string\n    message: any\n    messageSource?: string\n}\n\n/**\n * A thin ROS server implementation.\n *\n * Maintains a list of subscription for message and raises event on publishing and subscriptions.\n */\nexport class RosServer extends JDServiceServer {\n    // topic -> nodes\n    private _subscriptions: Record<string, Set<string>> = {}\n    private _messages: RosMessage[] = []\n    maxMessages = 10\n\n    constructor() {\n        super(SRV_ROS)\n\n        this.addCommand(\n            RosCmd.SubscribeMessage,\n            this.handleSubscribeMessage.bind(this),\n        )\n        this.addCommand(\n            RosCmd.PublishMessage,\n            this.handlePublishMessage.bind(this),\n        )\n    }\n\n    private handleSubscribeMessage(pkt: Packet) {\n        const [node, topic] = pkt.jdunpack<[string, string]>(\n            RosCmdPack.SubscribeMessage,\n        )\n\n        const sub =\n            this._subscriptions[topic] ||\n            (this._subscriptions[topic] = new Set<string>())\n        if (!sub.has(node)) {\n            sub.add(node)\n            this.emit(SUBSCRIBE, { node, topic })\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Clears all subscriptions\n     */\n    clear() {\n        this._subscriptions = {}\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Gets the list of subscription handled by this node\n     */\n    get subscriptions(): string[] {\n        return Object.keys(this._subscriptions)\n    }\n\n    /**\n     * Gets the latest messages\n     */\n    get messages(): RosMessage[] {\n        return this._messages.slice(0)\n    }\n\n    /**\n     * Publishes a message on the bus if any subscription is active.\n     * @param node source node for the message\n     * @param topic topic of the message\n     * @param message JSON data payload; that will be converted to string\n     */\n    public async publishMessage(node: string, topic: string, message: any) {\n        if (!this._subscriptions[topic]?.size) return\n\n        this.pushMessage({ node, topic, message })\n\n        const data = jdpack<[string, string, any]>(RosCmdPack.PublishMessage, [\n            node,\n            topic,\n            JSON.stringify(message),\n        ])\n        await this.sendPacketAsync(Packet.from(RosReportMessage, data))\n\n        this.emit(CHANGE)\n    }\n\n    private pushMessage(msg: RosMessage) {\n        this._messages.push(msg)\n        while (this._messages.length > this.maxMessages)\n            this._messages.unshift()\n    }\n\n    private async handlePublishMessage(pkt: Packet) {\n        const [node, topic, messageSource] = pkt.jdunpack<\n            [string, string, string]\n        >(RosCmdPack.PublishMessage)\n        const message = JSONTryParse(messageSource)\n\n        const msg: RosMessage = { node, topic, message, messageSource }\n        this.pushMessage(msg)\n        this.emit(PUBLISH, msg)\n        this.emit(CHANGE)\n    }\n}\n", "import {\n    CHANGE,\n    FRAME_PROCESS_LARGE,\n    IndexedScreenCmd,\n    IndexedScreenCmdPack,\n    IndexedScreenReg,\n    SRV_INDEXED_SCREEN,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServerOptions, JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport interface IndexedScreenServerOptions extends JDServerOptions {\n    width?: number\n    height?: number\n    bitsPerPixel?: 1 | 2 | 4 | 8\n    brightness?: number\n    rotation?: 0 | 90 | 180 | 270\n    // 24bit rgb colors\n    palette?: number[]\n}\n\nexport class IndexedScreenServer extends JDServiceServer {\n    readonly width: JDRegisterServer<[number]>\n    readonly height: JDRegisterServer<[number]>\n    readonly bitsPerPixel: JDRegisterServer<[number]>\n    readonly brightness: JDRegisterServer<[number]>\n    readonly widthMajor: JDRegisterServer<[boolean]>\n    readonly rotation: JDRegisterServer<[number]>\n    readonly palette: JDRegisterServer<[Uint8Array]>\n\n    private _clip: { x: number; y: number; width: number; height: number }\n    private _pixels: ImageData\n\n    constructor(options?: IndexedScreenServerOptions) {\n        super(SRV_INDEXED_SCREEN, options)\n\n        const {\n            width = 8,\n            height = 8,\n            brightness = 1,\n            rotation = 0,\n            bitsPerPixel = 1,\n            palette = [0xff0000, 0xffffff],\n        } = options || {}\n\n        this.width = this.addRegister(IndexedScreenReg.Width, [width])\n        this.height = this.addRegister(IndexedScreenReg.Height, [height])\n        this.bitsPerPixel = this.addRegister(IndexedScreenReg.BitsPerPixel, [\n            bitsPerPixel,\n        ])\n        this.rotation = this.addRegister(IndexedScreenReg.Rotation, [rotation])\n        this.widthMajor = this.addRegister(IndexedScreenReg.WidthMajor, [false])\n        const pbuf = new Uint8Array(palette.length << 2)\n        for (let i = 0; i < palette.length; ++i) {\n            pbuf[i * 4] = (palette[i] >> 16) & 0xff\n            pbuf[i * 4 + 1] = (palette[i] >> 8) & 0xff\n            pbuf[i * 4 + 2] = palette[i] & 0xff\n            pbuf[i * 4 + 3] = 0xff\n        }\n        this.palette = this.addRegister(IndexedScreenReg.Palette, [pbuf])\n        this.brightness = this.addRegister(IndexedScreenReg.Brightness, [\n            brightness,\n        ])\n        this.addCommand(\n            IndexedScreenCmd.SetPixels,\n            this.handleSetPixels.bind(this),\n        )\n        this.addCommand(\n            IndexedScreenCmd.StartUpdate,\n            this.handleStartUpdate.bind(this),\n        )\n        this.width.skipBoundaryCheck = true\n        this.width.skipErrorInjection = true\n        this.height.skipBoundaryCheck = true\n        this.height.skipErrorInjection = true\n\n        this.width.on(CHANGE, this.updatePixels.bind(this))\n        this.height.on(CHANGE, this.updatePixels.bind(this))\n\n        this.on(FRAME_PROCESS_LARGE, this.handleLargeFrame.bind(this))\n\n        this.updatePixels()\n    }\n\n    private updatePixels() {\n        const [width] = this.width.values()\n        const [height] = this.height.values()\n        this._clip = {\n            x: 0,\n            y: 0,\n            width,\n            height,\n        }\n        this._pixels = new ImageData(width, height)\n    }\n\n    get pixels() {\n        return this._pixels\n    }\n\n    setImage(imgData: Uint8Array) {\n        const [palette] = this.palette.values()\n        const { x, y, width, height } = this._clip\n\n        const u32palette = new Uint32Array(palette.length >> 2)\n        for (let i = 0; i < u32palette.length; ++i) {\n            // TODO make sure packing is all right\n            // this fixes alpha to 0xff just in case\n            u32palette[i] =\n                0xff000000 |\n                (palette[i * 4] << 16) |\n                (palette[i * 4 + 1] << 8) |\n                palette[i * 4 + 2]\n        }\n\n        // blit image into image data\n        /**\n         * A Canvas Pixel ArrayBuffer is an ArrayBuffer whose data is represented in left-to-right\n         * order, row by row top to bottom, starting with the top left,\n         * with each pixel's red, green, blue, and alpha components\n         * being given in that order for each pixel. Each component of each pixel represented\n         * in this array must be in the range 0..255, representing the 8 bit value for\n         * that component. The components must be assigned consecutive indices starting with 0 for the top left pixel's red component.\n         */\n\n        const pixdata = this._pixels.data\n        const data = new Uint32Array(\n            pixdata.buffer,\n            pixdata.byteOffset,\n            pixdata.byteLength >> 2,\n        )\n        let sp = 0\n        const [bpp] = this.bitsPerPixel.values()\n        const mask = (1 << bpp) - 1\n        const alignVal = bpp == 1 ? 1 : 4\n\n        for (let ix = 0; ix < width; ++ix) {\n            for (let iy = 0; iy < height; ) {\n                let ipix = (iy + y) * width + ix + x\n                const b = imgData[sp++]\n                for (let m = 0; m < 8; m += bpp) {\n                    data[ipix] = u32palette[(b >> m) & mask]\n                    ipix += width\n                    iy++\n                }\n            }\n            while (sp & (alignVal - 1)) sp++\n        }\n\n        // send update\n        this.emit(CHANGE)\n    }\n\n    private handleStartUpdate(pkt: Packet) {\n        const [x, y, width, height] = pkt.jdunpack<\n            [number, number, number, number]\n        >(IndexedScreenCmdPack.StartUpdate)\n\n        this._clip = { x, y, width, height }\n    }\n\n    private handleLargeFrame(command: string, data: Uint8Array) {\n        if (command === \"pixels\") this.setImage(data)\n    }\n\n    private handleSetPixels(pkt: Packet) {\n        this.setImage(pkt.data)\n    }\n}\n", "export function sevenSegmentDigitEncode(value: number, digitCount: number) {\n    const ns = isNaN(value) ? \"\" : value.toString()\n    const length = digitCount\n    if (isNaN(length)) return // unknown size\n\n    const digits = new Uint8Array(length)\n    const n = Math.min(length, ns.length)\n    /*\n     * ```text\n     *  - A -\n     *  F   B\n     *  |   |\n     *  - G -\n     *  |   |   -\n     *  E   C  |DP|\n     *  - D -   -\n     * ```\n     */\n    const digitBits = [\n        0b00111111, // 0\n        0b00000110, // 1\n        0b01011011, // 2\n        0b01001111, // 3\n        0b01100110, // 4\n        0b01101101, // 5\n        0b01111101, // 6\n        0b00000111, // 7\n        0b01111111, // 8\n        0b01101111, // 9\n    ]\n\n    let k = digits.length - 1\n    for (let i = n - 1; i >= 0; --i) {\n        let c = ns.charCodeAt(i)\n        let value = 0\n        // dot\n        if (c == 46) {\n            i--\n            if (i > -1) c = ns.charCodeAt(i)\n            value |= 0b10000000\n        }\n        // 0-9\n        if (c >= 48 && c < 48 + digitBits.length) value |= digitBits[c - 48]\n        // -\n        else if (c == 45) value |= 0b01000000\n        // e, E\n        else if (c == 69 || c == 101) value |= 0b01001111\n        digits[k--] = value\n    }\n\n    return digits\n}\n", "import {\n    SRV_SEVEN_SEGMENT_DISPLAY,\n    SevenSegmentDisplayCmd,\n    SevenSegmentDisplayCmdPack,\n    SevenSegmentDisplayReg,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\nimport { sevenSegmentDigitEncode } from \"../jdom/sevensegment\"\n\nexport class SevenSegmentDisplayServer extends JDServiceServer {\n    readonly digits: JDRegisterServer<[Uint8Array]>\n    readonly digitCount: JDRegisterServer<[number]>\n    readonly decimalPoint: JDRegisterServer<[boolean]>\n    constructor(options: { digits: Uint8Array; decimalPoint?: boolean }) {\n        super(SRV_SEVEN_SEGMENT_DISPLAY, {\n            intensityValues: [0xffff],\n        })\n\n        const { digits, decimalPoint } = options\n\n        this.digitCount = this.addRegister<[number]>(\n            SevenSegmentDisplayReg.DigitCount,\n            [digits.length],\n        )\n        this.decimalPoint = this.addRegister<[boolean]>(\n            SevenSegmentDisplayReg.DecimalPoint,\n            [!!decimalPoint],\n        )\n        this.digits = this.addRegister<[Uint8Array]>(\n            SevenSegmentDisplayReg.Digits,\n            [digits],\n        )\n\n        this.addCommand(\n            SevenSegmentDisplayCmd.SetNumber,\n            this.handleSetNumber.bind(this),\n        )\n    }\n\n    private async handleSetNumber(pkt: Packet) {\n        const [digitCount] = this.digitCount.values()\n        const [value] = pkt.jdunpack<[number]>(\n            SevenSegmentDisplayCmdPack.SetNumber,\n        )\n        const digits = isNaN(value)\n            ? new Uint8Array(0)\n            : sevenSegmentDigitEncode(value, digitCount)\n        if (this.digits.setValues([digits])) await this.digits.sendGetAsync()\n    }\n}\n", "import { PCMonitorReg, SRV_PCMONITOR } from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServerOptions, JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class PCMonitorServer extends JDServiceServer {\n    readonly CPUUsage: JDRegisterServer<[number]>\n    readonly CPUTemperature: JDRegisterServer<[number]>\n    readonly RAMUsage: JDRegisterServer<[number]>\n    readonly GPUInfo: JDRegisterServer<[number, number]>\n    readonly NetworkInfo: JDRegisterServer<[number, number]>\n\n    constructor(options?: JDServerOptions) {\n        super(SRV_PCMONITOR, options)\n\n        this.CPUUsage = this.addRegister<[number]>(PCMonitorReg.CpuUsage, [0])\n        this.CPUTemperature = this.addRegister<[number]>(\n            PCMonitorReg.CpuTemperature,\n            [21],\n        )\n        this.RAMUsage = this.addRegister<[number]>(PCMonitorReg.RamUsage, [0])\n        this.GPUInfo = this.addRegister<[number, number]>(\n            PCMonitorReg.GpuInformation,\n            [0, 0],\n        )\n        this.NetworkInfo = this.addRegister<[number, number]>(\n            PCMonitorReg.NetworkInformation,\n            [0, 0],\n        )\n    }\n}\n", "import { PCControllerCmd, SRV_PCCONTROLLER } from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDServerOptions, JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class PCControllerServer extends JDServiceServer {\n    constructor(options?: JDServerOptions) {\n        super(SRV_PCCONTROLLER, options)\n\n        this.addCommand(PCControllerCmd.OpenUrl, this.handleOpenUrl.bind(this))\n        this.addCommand(\n            PCControllerCmd.SendText,\n            this.handleSendText.bind(this),\n        )\n        this.addCommand(\n            PCControllerCmd.StartApp,\n            this.handleStartApp.bind(this),\n        )\n        this.addCommand(\n            PCControllerCmd.RunScript,\n            this.handleRunScript.bind(this),\n        )\n    }\n\n    public static readonly OPEN_URL = \"openUrl\"\n    public static readonly SEND_TEXT = \"sendText\"\n    public static readonly START_APP = \"startApp\"\n    public static readonly RUN_SCRIPT = \"runScript\"\n\n    private handleOpenUrl(pkt: Packet) {\n        const url = pkt.stringData\n        this.emit(PCControllerServer.OPEN_URL, url)\n    }\n\n    private handleSendText(pkt: Packet) {\n        const text = pkt.stringData\n        this.emit(PCControllerServer.SEND_TEXT, text)\n    }\n\n    private handleStartApp(pkt: Packet) {\n        const text = pkt.stringData\n        this.emit(PCControllerServer.START_APP, text)\n    }\n\n    private handleRunScript(pkt: Packet) {\n        const text = pkt.stringData\n        this.emit(PCControllerServer.RUN_SCRIPT, text)\n    }\n}\n", "import { JDBus } from \"../jdom/bus\"\nimport {\n    CharacterScreenTextDirection,\n    CharacterScreenVariant,\n    DistanceVariant,\n    LedStripVariant,\n    PotentiometerVariant,\n    RelayReg,\n    RelayVariant,\n    SRV_ACIDITY,\n    SRV_ACCELEROMETER,\n    SRV_AIR_PRESSURE,\n    SRV_BUTTON,\n    SRV_BUZZER,\n    SRV_CHARACTER_SCREEN,\n    SRV_BRAILLE_DISPLAY,\n    SRV_DISTANCE,\n    SRV_E_CO2,\n    SRV_HUMIDITY,\n    SRV_LED_STRIP,\n    SRV_MATRIX_KEYPAD,\n    SRV_MOTOR,\n    SRV_POTENTIOMETER,\n    SRV_PROTO_TEST,\n    SRV_RAIN_GAUGE,\n    SRV_RELAY,\n    SRV_GAMEPAD,\n    SRV_ROTARY_ENCODER,\n    SRV_SERVO,\n    SRV_SETTINGS,\n    SRV_SWITCH,\n    SRV_TEMPERATURE,\n    SRV_TRAFFIC_LIGHT,\n    SRV_VIBRATION_MOTOR,\n    SRV_TVOC,\n    SRV_WIND_DIRECTION,\n    SRV_WIND_SPEED,\n    SwitchVariant,\n    TemperatureVariant,\n    WindSpeedReg,\n    ECO2Variant,\n    SRV_SPEECH_SYNTHESIS,\n    SRV_SOIL_MOISTURE,\n    GamepadVariant,\n    SRV_REAL_TIME_CLOCK,\n    SRV_ILLUMINANCE,\n    SRV_LIGHT_LEVEL,\n    LightLevelVariant,\n    SRV_UV_INDEX,\n    SRV_REFLECTED_LIGHT,\n    ReflectedLightVariant,\n    SRV_MOTION,\n    SRV_LED,\n    SRV_SEVEN_SEGMENT_DISPLAY,\n    SevenSegmentDisplayReg,\n    SRV_HEART_RATE,\n    HeartRateVariant,\n    LedVariant,\n    SRV_WATER_LEVEL,\n    SRV_SOUND_LEVEL,\n    SRV_COLOR,\n    SRV_SOUND_PLAYER,\n    SRV_PULSE_OXIMETER,\n    SRV_WEIGHT_SCALE,\n    WeightScaleVariant,\n    SRV_DOT_MATRIX,\n    SRV_RNG,\n    SRV_COMPASS,\n    SRV_GYROSCOPE,\n    SRV_SOUND_SPECTRUM,\n    SoundSpectrumReg,\n    SRV_SOLENOID,\n    SRV_DMX,\n    SRV_BIT_RADIO,\n    SRV_POWER,\n    CHANGE,\n    GamepadButtons,\n    SRV_HID_KEYBOARD,\n    SRV_HID_MOUSE,\n    SRV_HID_JOYSTICK,\n    DotMatrixVariant,\n    SRV_FLEX,\n    SRV_WIFI,\n    SRV_LIGHT_BULB,\n    LightBulbReg,\n    WifiAPFlags,\n    SRV_POWER_SUPPLY,\n    MagneticFieldLevelVariant,\n    SRV_MAGNETIC_FIELD_LEVEL,\n    SRV_DUAL_MOTORS,\n    SRV_CLOUD_ADAPTER,\n    SRV_SAT_NAV,\n    SRV_DC_VOLTAGE_MEASUREMENT,\n    SRV_DC_CURRENT_MEASUREMENT,\n    DcCurrentMeasurementReg,\n    DcVoltageMeasurementReg,\n    DcVoltageMeasurementVoltageMeasurementType,\n    SRV_PLANAR_POSITION,\n    SRV_SERIAL,\n    SystemReg,\n    SRV_ROS,\n    SRV_INDEXED_SCREEN,\n    SRV_PCMONITOR,\n    SRV_PCCONTROLLER,\n} from \"../jdom/constants\"\nimport { JDServerServiceProvider } from \"../jdom/servers/serverserviceprovider\"\nimport { ProtocolTestServer } from \"../jdom/servers/protocoltestserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\nimport { ButtonServer } from \"./buttonserver\"\nimport { BuzzerServer } from \"./buzzerserver\"\nimport { CharacterScreenServer } from \"./characterscreenserver\"\nimport {\n    GamepadServer,\n    GAMEPAD_ARCADE_BUTTONS,\n    GAMEPAD_DPAD_AB_BUTTONS,\n} from \"./gamepadserver\"\nimport { DotMatrixServer } from \"./dotmatrixserver\"\nimport { LedStripServer } from \"./ledstripserver\"\nimport { MatrixKeypadServer } from \"./matrixkeypadserver\"\nimport { MotorServer } from \"./motorserver\"\nimport { RainGaugeServer } from \"./raingaugeserver\"\nimport { RealTimeClockServer } from \"./realtimeclockserver\"\nimport { ReflectedLightServer } from \"./reflectedlightserver\"\nimport { RotaryEncoderServer } from \"./rotaryencoderserver\"\nimport { SensorServer, SensorServiceOptions } from \"./sensorserver\"\nimport { ServoServer } from \"./servoserver\"\nimport { SettingsServer } from \"./settingsserver\"\nimport { SpeechSynthesisServer } from \"./speechsynthesisserver\"\nimport { SwitchServer } from \"./switchserver\"\nimport { TrafficLightServer } from \"./trafficlightserver\"\nimport { fromHex, hash, stringToUint8Array, toFullHex } from \"../jdom/utils\"\nimport { SoundPlayerServer, SoundPlayerSound } from \"./soundplayerserver\"\nimport {\n    AnalogSensorServer,\n    AnalogSensorServerOptions,\n} from \"./analogsensorserver\"\nimport { RandomNumberGeneratorServer } from \"./randomnumbergeneratorserver\"\nimport { CompassServer } from \"./compassserver\"\nimport { DMXServer } from \"./dmxserver\"\nimport { BitRadioServer } from \"./bitradioserver\"\nimport { PowerServer } from \"./powerserver\"\nimport { CapacitiveButtonServer } from \"./capacitivebuttonserver\"\nimport { HIDKeyboardServer } from \"./hidkeyboardserver\"\nimport { HIDMouseServer } from \"./hidmouseserver\"\nimport { JDServiceProvider } from \"../jdom/servers/serviceprovider\"\nimport { VibrationMotorServer } from \"./vibrationmotorserver\"\nimport { WifiServer } from \"./wifiserver\"\nimport { AccelerometerServer } from \"./accelerometerserver\"\nimport { BrailleDisplayServer } from \"./brailledisplayserver\"\nimport { Flags } from \"../jdom/flags\"\nimport { LedServer } from \"./ledserver\"\nimport { PowerSupplyServer } from \"./powersupplyserver\"\nimport { HIDJoystickServer } from \"./hidjoystickserver\"\nimport {\n    isActuator,\n    isConstRegister,\n    isReading,\n    isSensor,\n    serviceSpecificationFromClassIdentifier,\n} from \"../jdom/spec\"\nimport { PackedSimpleValue } from \"../jdom/pack\"\nimport { MagneticFieldLevelServer } from \"./magneticfieldlevelserver\"\nimport { DualMotorsServer } from \"./dualmotorsserver\"\nimport { CloudAdapterServer } from \"./cloudadapterserver\"\nimport { SatNavServer } from \"./satnavserver\"\nimport { PlanarPositionServer } from \"./planarpositionserver\"\nimport { SerialServer } from \"./serialserver\"\nimport { genFieldInfo, isNumericType } from \"../../jacdac-spec/spectool/jdspec\"\nimport { RosServer } from \"./rosserver\"\nimport { IndexedScreenServer } from \"./indexedscreenserver\"\nimport { randomDeviceId } from \"../jdom/random\"\nimport { SevenSegmentDisplayServer } from \"./sevensegmentdisplayserver\"\nimport { PCMonitorServer } from \"./pcmonitorserver\"\nimport { PCControllerServer } from \"./pccontrollerserver\"\n\nconst indoorThermometerOptions: AnalogSensorServerOptions = {\n    readingValues: [21.5],\n    streamingInterval: 1000,\n    minReading: -5,\n    maxReading: 50,\n    readingError: [0.25],\n    variant: TemperatureVariant.Indoor,\n}\nconst outdoorThermometerOptions: AnalogSensorServerOptions = {\n    readingValues: [21.5],\n    streamingInterval: 1000,\n    minReading: -40,\n    maxReading: 120,\n    readingError: [0.25],\n    variant: TemperatureVariant.Outdoor,\n}\nconst outdoorHumidityOptions: AnalogSensorServerOptions = {\n    streamingInterval: 1000,\n    readingValues: [40],\n    readingError: [0.1],\n    minReading: 10,\n    maxReading: 99,\n}\nconst soilThermometerOptions: AnalogSensorServerOptions = {\n    readingValues: [15],\n    streamingInterval: 1000,\n    minReading: -55,\n    maxReading: 125,\n    readingError: [0.5],\n    variant: TemperatureVariant.Outdoor,\n}\nconst medicalThermometerOptions: AnalogSensorServerOptions = {\n    readingValues: [37.5],\n    streamingInterval: 1000,\n    minReading: 35,\n    maxReading: 42,\n    readingError: [0.5],\n    variant: TemperatureVariant.Body,\n}\nconst barometerOptions: AnalogSensorServerOptions = {\n    readingValues: [1013],\n    readingError: [1.5],\n    streamingInterval: 1000,\n    minReading: 150,\n    maxReading: 4000,\n}\nconst sonarOptions: AnalogSensorServerOptions = {\n    variant: DistanceVariant.Ultrasonic,\n    minReading: 0.02,\n    maxReading: 4,\n    readingValues: [1],\n}\n\nconst SG90_STALL_TORQUE = 1.8\n/**\n * @internal\n */\nexport const SG90_RESPONSE_SPEED = 0.12 // deg/60deg\n\nconst microServoOptions = {\n    stallTorque: SG90_STALL_TORQUE, // kg/cm\n    responseSpeed: SG90_RESPONSE_SPEED, // s/60deg\n    minAngle: 0,\n    maxAngle: 180,\n}\nconst microServoContinuousOptions = {\n    stallTorque: SG90_STALL_TORQUE, // kg/cm\n    responseSpeed: SG90_RESPONSE_SPEED, // s/60deg\n    minAngle: -90,\n    maxAngle: 90,\n    clientVariant: \"cont=1\",\n}\nconst microServo270Options = {\n    stallTorque: SG90_STALL_TORQUE, // kg/cm\n    responseSpeed: SG90_RESPONSE_SPEED, // s/60deg\n    minAngle: 0,\n    maxAngle: 270,\n}\nconst microServo360Options = {\n    stallTorque: SG90_STALL_TORQUE, // kg/cm\n    responseSpeed: SG90_RESPONSE_SPEED * 2, // s/60deg\n    minAngle: 0,\n    maxAngle: 360,\n}\nconst windDirectionOptions: AnalogSensorServerOptions = {\n    readingValues: [0],\n    readingError: [5],\n    streamingInterval: 5000,\n}\nconst windSpeedOptions: AnalogSensorServerOptions = {\n    readingValues: [0],\n    readingError: [2],\n    streamingInterval: 5000,\n    registerValues: [{ code: WindSpeedReg.MaxWindSpeed, values: [80] }],\n}\nconst eCO2Options: AnalogSensorServerOptions = {\n    readingValues: [400],\n    streamingInterval: 1000,\n    variant: ECO2Variant.VOC,\n}\nconst CO2Options: AnalogSensorServerOptions = {\n    readingValues: [400],\n    streamingInterval: 1000,\n    variant: ECO2Variant.NDIR,\n}\nconst tvocOptions: AnalogSensorServerOptions = {\n    readingValues: [500],\n    streamingInterval: 1000,\n}\n\nconst microbitSounds: SoundPlayerSound[] = [\n    [0, \"giggle\"],\n    [0, \"happy\"],\n    [0, \"hello\"],\n    [0, \"mysterious\"],\n    [0, \"sad\"],\n    [0, \"slide\"],\n    [0, \"soaring\"],\n    [0, \"spring\"],\n    [0, \"twinkle\"],\n    [0, \"yawn\"],\n]\nconst soundLevel: AnalogSensorServerOptions = {\n    readingValues: [0],\n    intensityValues: [false],\n}\nconst soundSpectrum: SensorServiceOptions<[Uint8Array]> = {\n    readingValues: [new Uint8Array(0)],\n    intensityValues: [false],\n    registerValues: [\n        {\n            code: SoundSpectrumReg.FftPow2Size,\n            values: [5],\n        },\n        {\n            code: SoundSpectrumReg.MinDecibels,\n            values: [-100],\n        },\n        {\n            code: SoundSpectrumReg.MaxDecibels,\n            values: [-30],\n        },\n        {\n            code: SoundSpectrumReg.SmoothingTimeConstant,\n            values: [0.8],\n        },\n    ],\n}\n\n/**\n * A factory for instantiation a simulated service server\n * @category Servers\n */\nexport interface ServiceProviderDefinition {\n    /**\n     * Name of the simulated device\n     */\n    name: string\n    /**\n     * List of service classes hosted by the provider\n     */\n    serviceClasses: number[]\n    /**\n     * Factory handler to instantiate simulated servers\n     */\n    services: () => JDServiceServer[]\n    /**\n     * Indicates if the simulated device should support resetId\n     */\n    resetIn?: boolean\n    /**\n     * Custom factory to wrap the services into a service provider\n     */\n    factory?: (services: JDServiceServer[]) => JDServiceProvider\n\n    /**\n     * Additional service options\n     */\n    serviceOptions?: ServiceProviderOptions[]\n}\n\nlet _providerDefinitions: ServiceProviderDefinition[]\nfunction initProviders() {\n    return (_providerDefinitions =\n        _providerDefinitions ||\n        [\n            <ServiceProviderDefinition>{\n                name: \"7-segment (4 segments)\",\n                serviceClasses: [SRV_SEVEN_SEGMENT_DISPLAY],\n                services: () => [\n                    new SevenSegmentDisplayServer({\n                        digits: fromHex(\"00000000\"),\n                    }),\n                ],\n            },\n            {\n                name: \"7-segment (8 segments)\",\n                serviceClasses: [SRV_SEVEN_SEGMENT_DISPLAY],\n                services: () => [\n                    new SevenSegmentDisplayServer({\n                        digits: fromHex(\"0000000000000000\"),\n                    }),\n                ],\n            },\n            {\n                name: \"accelerometer\",\n                serviceClasses: [SRV_ACCELEROMETER],\n                services: () => [new AccelerometerServer()],\n            },\n            {\n                name: \"water acidity (pH)\",\n                serviceClasses: [SRV_ACIDITY],\n                services: () => [\n                    new AnalogSensorServer(SRV_ACIDITY, {\n                        minReading: 2.5,\n                        maxReading: 10,\n                        readingValues: [7],\n                        readingError: [0.1],\n                        readingResolution: 0.1,\n                    }),\n                ],\n            },\n            {\n                name: \"barometer\",\n                serviceClasses: [SRV_AIR_PRESSURE],\n                services: () => [\n                    new AnalogSensorServer(SRV_AIR_PRESSURE, barometerOptions),\n                ],\n            },\n            {\n                name: \"bitradio\",\n                serviceClasses: [SRV_BIT_RADIO],\n                services: () => [new BitRadioServer()],\n            },\n            {\n                name: \"Braille display (4 patterns)\",\n                serviceClasses: [SRV_BRAILLE_DISPLAY],\n                services: () => [\n                    new BrailleDisplayServer({\n                        patterns: \"\u2803\",\n                        length: 4,\n                    }),\n                ],\n            },\n            {\n                name: \"Braille display (16 patterns)\",\n                serviceClasses: [SRV_BRAILLE_DISPLAY],\n                services: () => [\n                    new BrailleDisplayServer({\n                        patterns: \"\u2803\",\n                        length: 16,\n                    }),\n                ],\n            },\n            {\n                name: \"Braille display (32 patterns)\",\n                serviceClasses: [SRV_BRAILLE_DISPLAY],\n                services: () => [\n                    new BrailleDisplayServer({\n                        patterns: \"\u2803\",\n                        length: 32,\n                    }),\n                ],\n            },\n            {\n                name: \"button\",\n                serviceClasses: [SRV_BUTTON],\n                services: () => [new ButtonServer()],\n            },\n            {\n                name: \"button (2x)\",\n                serviceClasses: [SRV_BUTTON],\n                services: () => [\n                    new ButtonServer(\"B0\"),\n                    new ButtonServer(\"B1\"),\n                ],\n            },\n            {\n                name: \"button (4x)\",\n                serviceClasses: [SRV_BUTTON],\n                services: () =>\n                    Array(4)\n                        .fill(0)\n                        .map((_, i) => new ButtonServer(`B${i}`)),\n            },\n            {\n                name: \"buzzer\",\n                serviceClasses: [SRV_BUZZER],\n                services: () => [new BuzzerServer()],\n            },\n            {\n                name: \"capacitive button\",\n                serviceClasses: [SRV_BUTTON],\n                services: () => {\n                    const button = new ButtonServer()\n                    const config = new CapacitiveButtonServer()\n                    button.threshold = config.threshold\n                    return [button, config]\n                },\n            },\n            {\n                name: \"capacitive button (6x)\",\n                serviceClasses: [SRV_BUTTON],\n                services: () =>\n                    Array(6)\n                        .fill(0)\n                        .map((_, i) => new ButtonServer(`C${i}`, true)),\n            },\n            {\n                name: \"capacitive button (12x)\",\n                serviceClasses: [SRV_BUTTON],\n                services: () =>\n                    Array(12)\n                        .fill(0)\n                        .map((_, i) => new ButtonServer(`C${i}`, true)),\n            },\n            {\n                name: \"character screen (LDC, 16x2)\",\n                serviceClasses: [SRV_CHARACTER_SCREEN],\n                services: () => [\n                    new CharacterScreenServer({ message: \"hello\\nworld!\" }),\n                ],\n            },\n            <ServiceProviderDefinition>{\n                name: \"character screen (OLED, 32x8, RTL)\",\n                serviceClasses: [SRV_CHARACTER_SCREEN],\n                services: () => [\n                    new CharacterScreenServer({\n                        message: \"hello\\nworld!\",\n                    }),\n                ],\n                serviceOptions: [\n                    {\n                        serviceClass: SRV_CHARACTER_SCREEN,\n                        constants: {\n                            columns: 32,\n                            rows: 9,\n                            variant: CharacterScreenVariant.OLED,\n                            textDirection:\n                                CharacterScreenTextDirection.RightToLeft,\n                        },\n                    },\n                ],\n            },\n            {\n                name: \"color\",\n                serviceClasses: [SRV_COLOR],\n                services: () => [\n                    new SensorServer<[number, number, number]>(SRV_COLOR, {\n                        readingValues: [0.5, 0, 0.5],\n                        preferredStreamingInterval: 1000,\n                    }),\n                ],\n            },\n            {\n                name: \"compass\",\n                serviceClasses: [SRV_COMPASS],\n                services: () => [new CompassServer()],\n            },\n            {\n                name: \"DC current/voltage measurement\",\n                serviceClasses: [\n                    SRV_DC_CURRENT_MEASUREMENT,\n                    SRV_DC_VOLTAGE_MEASUREMENT,\n                ],\n                services: () => [\n                    new AnalogSensorServer(SRV_DC_CURRENT_MEASUREMENT, {\n                        readingValues: [0.001],\n                        readingResolution: 0.001,\n                        streamingInterval: 100,\n                        minReading: 0,\n                        maxReading: 1,\n                        registerValues: [\n                            {\n                                code: DcCurrentMeasurementReg.MeasurementName,\n                                values: [\"amp\"],\n                            },\n                        ],\n                    }),\n                    new AnalogSensorServer(SRV_DC_VOLTAGE_MEASUREMENT, {\n                        readingValues: [5],\n                        streamingInterval: 100,\n                        readingResolution: 0.001,\n                        minReading: 0,\n                        maxReading: 7,\n                        registerValues: [\n                            {\n                                code: DcVoltageMeasurementReg.MeasurementName,\n                                values: [\"volt\"],\n                            },\n                            {\n                                code: DcVoltageMeasurementReg.MeasurementType,\n                                values: [\n                                    DcVoltageMeasurementVoltageMeasurementType.Absolute,\n                                ],\n                            },\n                        ],\n                    }),\n                ],\n            },\n            {\n                name: \"distance (sonar)\",\n                serviceClasses: [SRV_DISTANCE],\n                services: () => [\n                    new AnalogSensorServer(SRV_DISTANCE, sonarOptions),\n                ],\n            },\n            {\n                name: \"DMX\",\n                serviceClasses: [SRV_DMX],\n                services: () => [new DMXServer()],\n            },\n            {\n                name: \"eCO\u2082\",\n                serviceClasses: [SRV_E_CO2],\n                services: () => [\n                    new AnalogSensorServer(SRV_E_CO2, eCO2Options),\n                ],\n            },\n            {\n                name: \"eCO\u2082 + TVOC\",\n                serviceClasses: [SRV_E_CO2, SRV_TVOC],\n                services: () => [\n                    new AnalogSensorServer(SRV_E_CO2, eCO2Options),\n                    new AnalogSensorServer(SRV_TVOC, tvocOptions),\n                ],\n            },\n            {\n                name: \"eCO\u2082 + humidity + thermometer\",\n                serviceClasses: [SRV_E_CO2, SRV_HUMIDITY, SRV_TEMPERATURE],\n                services: () => [\n                    new AnalogSensorServer(SRV_E_CO2, CO2Options),\n                    new AnalogSensorServer(\n                        SRV_HUMIDITY,\n                        outdoorHumidityOptions,\n                    ),\n                    new AnalogSensorServer(\n                        SRV_TEMPERATURE,\n                        indoorThermometerOptions,\n                    ),\n                ],\n            },\n            {\n                name: \"flex sensor\",\n                serviceClasses: [SRV_FLEX],\n                services: () => [\n                    new AnalogSensorServer(SRV_FLEX, {\n                        readingValues: [0.5],\n                    }),\n                ],\n            },\n            {\n                name: \"gyroscope\",\n                serviceClasses: [SRV_GYROSCOPE],\n                services: () => [\n                    new SensorServer<[number, number, number]>(SRV_GYROSCOPE, {\n                        readingValues: [0, 0, 0],\n                    }),\n                ],\n            },\n            {\n                name: \"heart rate\",\n                serviceClasses: [SRV_HEART_RATE],\n                services: () => [\n                    new AnalogSensorServer(SRV_HEART_RATE, {\n                        readingValues: [80],\n                        streamingInterval: 100,\n                        variant: HeartRateVariant.Finger,\n                    }),\n                ],\n            },\n            {\n                name: \"humidity\",\n                serviceClasses: [SRV_HUMIDITY],\n                services: () => [\n                    new AnalogSensorServer(\n                        SRV_HUMIDITY,\n                        outdoorHumidityOptions,\n                    ),\n                ],\n            },\n            {\n                name: \"humidity + temperature\",\n                serviceClasses: [SRV_HUMIDITY, SRV_TEMPERATURE],\n                services: () => [\n                    new AnalogSensorServer(\n                        SRV_TEMPERATURE,\n                        outdoorThermometerOptions,\n                    ),\n                    new AnalogSensorServer(\n                        SRV_HUMIDITY,\n                        outdoorHumidityOptions,\n                    ),\n                ],\n            },\n            {\n                name: \"humidity + temperature + barometer\",\n                serviceClasses: [\n                    SRV_HUMIDITY,\n                    SRV_TEMPERATURE,\n                    SRV_AIR_PRESSURE,\n                ],\n                services: () => [\n                    new AnalogSensorServer(\n                        SRV_TEMPERATURE,\n                        outdoorThermometerOptions,\n                    ),\n                    new AnalogSensorServer(\n                        SRV_HUMIDITY,\n                        outdoorHumidityOptions,\n                    ),\n                    new AnalogSensorServer(SRV_AIR_PRESSURE, barometerOptions),\n                ],\n            },\n            {\n                name: \"HID keyboard (simulated)\",\n                serviceClasses: [SRV_HID_KEYBOARD],\n                services: () => [new HIDKeyboardServer()],\n            },\n            {\n                name: \"HID joystick (simulated)\",\n                serviceClasses: [SRV_HID_JOYSTICK],\n                services: () => [new HIDJoystickServer()],\n            },\n            {\n                name: \"HID mouse (simulated)\",\n                serviceClasses: [SRV_HID_MOUSE],\n                services: () => [new HIDMouseServer()],\n            },\n            {\n                name: \"illuminance\",\n                serviceClasses: [SRV_ILLUMINANCE],\n                services: () => [\n                    new AnalogSensorServer(SRV_ILLUMINANCE, {\n                        readingValues: [1],\n                    }),\n                ],\n            },\n            {\n                name: \"gamepad (stick + A + B)\",\n                serviceClasses: [SRV_GAMEPAD],\n                services: () => [\n                    new GamepadServer({\n                        variant: GamepadVariant.Thumb,\n                        buttonsAvailable: GamepadButtons.A | GamepadButtons.B,\n                    }),\n                ],\n            },\n            {\n                name: \"gamepad (stick)\",\n                serviceClasses: [SRV_GAMEPAD],\n                services: () => [\n                    new GamepadServer({\n                        variant: GamepadVariant.Thumb,\n                    }),\n                ],\n            },\n            {\n                name: \"gamepad (stick+A)\",\n                serviceClasses: [SRV_GAMEPAD],\n                services: () => [\n                    new GamepadServer({\n                        variant: GamepadVariant.Thumb,\n                        buttonsAvailable: GamepadButtons.A,\n                    }),\n                ],\n            },\n            {\n                name: \"gamepad (Dpad + arcade buttons)\",\n                serviceClasses: [SRV_GAMEPAD],\n                services: () => [\n                    new GamepadServer({\n                        variant: GamepadVariant.Gamepad,\n                        buttonsAvailable: GAMEPAD_ARCADE_BUTTONS,\n                    }),\n                ],\n            },\n            {\n                name: \"gamepad (only DPad+A/B)\",\n                serviceClasses: [SRV_GAMEPAD],\n                services: () => [\n                    new GamepadServer({\n                        variant: GamepadVariant.Gamepad,\n                        buttonsAvailable: GAMEPAD_DPAD_AB_BUTTONS,\n                    }),\n                ],\n            },\n            {\n                name: \"gamepad (Dpad + all buttons)\",\n                serviceClasses: [SRV_GAMEPAD],\n                services: () => [\n                    new GamepadServer({\n                        variant: GamepadVariant.Gamepad,\n                        buttonsAvailable:\n                            GAMEPAD_ARCADE_BUTTONS |\n                            GamepadButtons.X |\n                            GamepadButtons.Y,\n                    }),\n                ],\n            },\n            {\n                name: \"geolocation (satelitte navigation)\",\n                serviceClasses: [SRV_SAT_NAV],\n                services: () => [new SatNavServer()],\n            },\n            {\n                name: \"LED ring 8 pixels\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 8,\n                        variant: LedVariant.Ring,\n                    }),\n                ],\n            },\n            {\n                name: \"LED ring 10 pixels\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 10,\n                        variant: LedVariant.Ring,\n                    }),\n                ],\n            },\n            {\n                name: \"LED ring 12 pixels\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 12,\n                        variant: LedVariant.Ring,\n                    }),\n                ],\n            },\n            {\n                name: \"LED ring 16 pixels\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 16,\n                        variant: LedVariant.Ring,\n                    }),\n                ],\n            },\n            {\n                name: \"LED ring 24 pixels\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 24,\n                        variant: LedVariant.Ring,\n                    }),\n                ],\n            },\n            {\n                name: \"LED jewel 7 pixels\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 7,\n                        variant: LedVariant.Jewel,\n                    }),\n                ],\n            },\n            {\n                name: \"LED stick 8\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 8,\n                        variant: LedVariant.Stick,\n                    }),\n                ],\n            },\n            {\n                name: \"LED single\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 1,\n                        ledsPerPixel: 1,\n                        color: [255, 0, 0],\n                        variant: LedVariant.Stick,\n                    }),\n                ],\n            },\n            {\n                name: \"LED single with 5 leds\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 1,\n                        waveLength: 450,\n                        ledsPerPixel: 5,\n                        color: [0, 0, 255],\n                        variant: LedVariant.Stick,\n                    }),\n                ],\n            },\n            {\n                name: \"LED matrix (5x5 micro:bit)\",\n                serviceClasses: [SRV_DOT_MATRIX],\n                services: () => [\n                    new DotMatrixServer(5, 5, {\n                        brightness: 128,\n                        variant: DotMatrixVariant.LED,\n                    }),\n                ],\n            },\n            {\n                name: \"LED matrix (8x8)\",\n                serviceClasses: [SRV_DOT_MATRIX],\n                services: () => [\n                    new DotMatrixServer(8, 8, {\n                        brightness: 128,\n                        variant: DotMatrixVariant.LED,\n                    }),\n                ],\n            },\n            {\n                name: \"LED matrix (11x7)\",\n                serviceClasses: [SRV_DOT_MATRIX],\n                services: () => [\n                    new DotMatrixServer(11, 7, {\n                        brightness: 128,\n                        variant: DotMatrixVariant.LED,\n                    }),\n                ],\n            },\n            {\n                name: \"Braille matrix (8x4)\",\n                serviceClasses: [SRV_DOT_MATRIX],\n                services: () => [\n                    new DotMatrixServer(8, 4, {\n                        variant: DotMatrixVariant.Braille,\n                    }),\n                ],\n            },\n            {\n                name: \"LED pixel strip 30\",\n                serviceClasses: [SRV_LED_STRIP],\n                services: () => [\n                    new LedStripServer({\n                        numPixels: 60,\n                        maxPower: 1000,\n                        variant: LedStripVariant.Strip,\n                    }),\n                ],\n            },\n            {\n                name: \"LED pixel strip 60\",\n                serviceClasses: [SRV_LED_STRIP],\n                services: () => [\n                    new LedStripServer({\n                        numPixels: 60,\n                        maxPower: 2000,\n                        variant: LedStripVariant.Strip,\n                    }),\n                ],\n            },\n            {\n                name: \"LED pixel strip 150\",\n                serviceClasses: [SRV_LED_STRIP],\n                services: () => [\n                    new LedStripServer({\n                        numPixels: 150,\n                        maxPower: 5000,\n                        variant: LedStripVariant.Strip,\n                    }),\n                ],\n            },\n            {\n                name: \"LED pixel strip 300\",\n                serviceClasses: [SRV_LED_STRIP],\n                services: () => [\n                    new LedStripServer({\n                        numPixels: 300,\n                        maxPower: 5000,\n                        variant: LedStripVariant.Strip,\n                    }),\n                ],\n            },\n            {\n                name: \"LED pixel matrix (4x4)\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 16,\n                        variant: LedVariant.Matrix,\n                    }),\n                ],\n            },\n            {\n                name: \"LED pixel matrix (8x8)\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 64,\n                        variant: LedVariant.Matrix,\n                        numColumns: 8,\n                    }),\n                ],\n            },\n            {\n                name: \"LED pixel matrix (16x4)\",\n                serviceClasses: [SRV_LED],\n                services: () => [\n                    new LedServer({\n                        numPixels: 64,\n                        numColumns: 16,\n                        variant: LedVariant.Matrix,\n                    }),\n                ],\n            },\n            {\n                name: \"light bulb\",\n                serviceClasses: [SRV_LIGHT_BULB],\n                services: () => [\n                    new JDServiceServer(SRV_LIGHT_BULB, {\n                        intensityValues: [0],\n                        isActive: values => !!values?.[0],\n                        intensityProcessor: (values: [number]) => {\n                            const newValues = [values[0] > 0 ? 1 : 0]\n                            return newValues\n                        },\n                        registerValues: [\n                            {\n                                code: LightBulbReg.Dimmable,\n                                values: [false],\n                            },\n                        ],\n                    }),\n                ],\n            },\n            {\n                name: \"light bulb (dimmeable)\",\n                serviceClasses: [SRV_LIGHT_BULB],\n                services: () => [\n                    new JDServiceServer(SRV_LIGHT_BULB, {\n                        intensityValues: [0],\n                        isActive: values => !!values?.[0],\n                        registerValues: [\n                            {\n                                code: LightBulbReg.Dimmable,\n                                values: [true],\n                            },\n                        ],\n                    }),\n                ],\n            },\n            {\n                name: \"light level (solar)\",\n                serviceClasses: [SRV_LIGHT_LEVEL],\n                services: () => [\n                    new SensorServer(SRV_LIGHT_LEVEL, {\n                        readingValues: [0.5],\n                        variant: LightLevelVariant.PhotoResistor,\n                    }),\n                ],\n            },\n            {\n                name: \"line sensor (digital)\",\n                serviceClasses: [SRV_REFLECTED_LIGHT],\n                services: () => [new ReflectedLightServer()],\n            },\n            {\n                name: \"line sensor (2x digital)\",\n                serviceClasses: [SRV_REFLECTED_LIGHT],\n                services: () => [\n                    new ReflectedLightServer(),\n                    new ReflectedLightServer(),\n                ],\n            },\n            {\n                name: \"line sensor (3x digital)\",\n                serviceClasses: [SRV_REFLECTED_LIGHT],\n                services: () => [\n                    new ReflectedLightServer(),\n                    new ReflectedLightServer(),\n                    new ReflectedLightServer(),\n                ],\n            },\n            {\n                name: \"line sensor (analog)\",\n                serviceClasses: [SRV_REFLECTED_LIGHT],\n                services: () => [\n                    new ReflectedLightServer({\n                        variant: ReflectedLightVariant.InfraredAnalog,\n                    }),\n                ],\n            },\n            <ServiceProviderDefinition>{\n                name: \"magnetic field level\",\n                serviceClasses: [SRV_MAGNETIC_FIELD_LEVEL],\n                services: () => [\n                    new MagneticFieldLevelServer({\n                        variant: MagneticFieldLevelVariant.AnalogNS,\n                    }),\n                ],\n            },\n            {\n                name: \"matrix keypad (3x4)\",\n                serviceClasses: [SRV_MATRIX_KEYPAD],\n                services: () => [\n                    new MatrixKeypadServer(3, 4, [\n                        \"0\",\n                        \"1\",\n                        \"2\",\n                        \"3\",\n                        \"4\",\n                        \"5\",\n                        \"6\",\n                        \"7\",\n                        \"8\",\n                        \"*\",\n                        \"0\",\n                        \"#\",\n                    ]),\n                ],\n            },\n            {\n                name: \"matrix keypad (4x4)\",\n                serviceClasses: [SRV_MATRIX_KEYPAD],\n                services: () => [\n                    new MatrixKeypadServer(4, 4, [\n                        \"0\",\n                        \"1\",\n                        \"2\",\n                        \"A\",\n                        \"3\",\n                        \"4\",\n                        \"5\",\n                        \"B\",\n                        \"6\",\n                        \"7\",\n                        \"8\",\n                        \"C\",\n                        \"*\",\n                        \"0\",\n                        \"#\",\n                        \"D\",\n                    ]),\n                ],\n            },\n            {\n                name: \"matrix keypad (1x4)\",\n                serviceClasses: [SRV_MATRIX_KEYPAD],\n                services: () => [\n                    new MatrixKeypadServer(4, 1, [\"1\", \"2\", \"3\", \"4\"]),\n                ],\n            },\n            {\n                name: \"motion\",\n                serviceClasses: [SRV_MOTION],\n                services: () => [\n                    new SensorServer(SRV_MOTION, {\n                        readingValues: [false],\n                        streamingInterval: 1000,\n                    }),\n                ],\n            },\n            {\n                name: \"motor\",\n                serviceClasses: [SRV_MOTOR],\n                services: () => [new MotorServer()],\n                resetIn: true,\n            },\n            {\n                name: \"motor (dual)\",\n                serviceClasses: [SRV_DUAL_MOTORS],\n                services: () => [new DualMotorsServer()],\n                resetIn: true,\n            },\n            {\n                name: \"PC controller\",\n                serviceClasses: [SRV_PCCONTROLLER],\n                services: () => [new PCControllerServer()],\n            },\n            {\n                name: \"PC monitor\",\n                serviceClasses: [SRV_PCMONITOR],\n                services: () => [new PCMonitorServer()],\n            },\n            {\n                name: \"planar position\",\n                serviceClasses: [SRV_PLANAR_POSITION],\n                services: () => [new PlanarPositionServer()],\n            },\n            Flags.diagnostics && {\n                name: \"protocol test\",\n                serviceClasses: [SRV_PROTO_TEST],\n                services: () => [new ProtocolTestServer()],\n            },\n            {\n                name: \"pulse oxymeter\",\n                serviceClasses: [SRV_PULSE_OXIMETER],\n                services: () => [\n                    new SensorServer<[number]>(SRV_PULSE_OXIMETER, {\n                        readingValues: [98],\n                        streamingInterval: 1000,\n                    }),\n                ],\n            },\n            {\n                name: \"power supply (5v)\",\n                serviceClasses: [SRV_POWER_SUPPLY],\n                services: () => [\n                    new PowerSupplyServer({\n                        outputVoltage: 1000,\n                        minVoltage: 0,\n                        maxVoltage: 5000,\n                    }),\n                ],\n            },\n            {\n                name: \"oxymeter + heart beat\",\n                serviceClasses: [SRV_PULSE_OXIMETER, SRV_HEART_RATE],\n                services: () => [\n                    new SensorServer<[number]>(SRV_PULSE_OXIMETER, {\n                        readingValues: [98],\n                        streamingInterval: 1000,\n                    }),\n                    new AnalogSensorServer(SRV_HEART_RATE, {\n                        readingValues: [80],\n                        streamingInterval: 1000,\n                        variant: HeartRateVariant.Finger,\n                    }),\n                ],\n            },\n            {\n                name: \"power\",\n                serviceClasses: [SRV_POWER],\n                services: () => [new PowerServer()],\n            },\n            {\n                name: \"RNG (random number generator)\",\n                serviceClasses: [SRV_RNG],\n                services: () => [new RandomNumberGeneratorServer()],\n            },\n            {\n                name: \"rain gauge\",\n                serviceClasses: [SRV_RAIN_GAUGE],\n                services: () => [new RainGaugeServer()],\n            },\n            {\n                name: \"real time clock\",\n                serviceClasses: [SRV_REAL_TIME_CLOCK],\n                services: () => [new RealTimeClockServer()],\n            },\n            {\n                name: \"relay (EM/10A)\",\n                serviceClasses: [SRV_RELAY],\n                services: () => [\n                    new JDServiceServer(SRV_RELAY, {\n                        intensityValues: [false],\n                        isActive: values => !!values?.[0],\n                        variant: RelayVariant.Electromechanical,\n                        registerValues: [\n                            {\n                                code: RelayReg.MaxSwitchingCurrent,\n                                values: [10],\n                            },\n                        ],\n                    }),\n                ],\n            },\n            {\n                name: \"relay 4x (SSR/5A)\",\n                serviceClasses: [SRV_RELAY],\n                services: () =>\n                    Array(4)\n                        .fill(0)\n                        .map(\n                            () =>\n                                new JDServiceServer(SRV_RELAY, {\n                                    intensityValues: [false],\n                                    isActive: values => !!values?.[0],\n                                    variant: RelayVariant.SolidState,\n                                    registerValues: [\n                                        {\n                                            code: RelayReg.MaxSwitchingCurrent,\n                                            values: [5],\n                                        },\n                                    ],\n                                }),\n                        ),\n            },\n            {\n                name: \"rotary encoder\",\n                serviceClasses: [SRV_ROTARY_ENCODER],\n                services: () => [new RotaryEncoderServer()],\n            },\n            {\n                name: \"rotary encoder + button\",\n                serviceClasses: [SRV_ROTARY_ENCODER, SRV_BUTTON],\n                services: () => [new RotaryEncoderServer(), new ButtonServer()],\n            },\n            {\n                name: \"rotary potentiometer\",\n                serviceClasses: [SRV_POTENTIOMETER],\n                services: () => [\n                    new AnalogSensorServer(SRV_POTENTIOMETER, {\n                        variant: PotentiometerVariant.Rotary,\n                        readingValues: [0.5],\n                    }),\n                ],\n            },\n            {\n                name: \"serial (115200/8N1)\",\n                serviceClasses: [SRV_SERIAL],\n                services: () => [new SerialServer()],\n            },\n            {\n                name: \"servo\",\n                serviceClasses: [SRV_SERVO],\n                services: () => [new ServoServer(microServoOptions)],\n                resetIn: true,\n            },\n            {\n                name: \"servo (270\u00B0)\",\n                serviceClasses: [SRV_SERVO],\n                services: () => [new ServoServer(microServo270Options)],\n                resetIn: true,\n            },\n            {\n                name: \"servo (360\u00B0)\",\n                serviceClasses: [SRV_SERVO],\n                services: () => [new ServoServer(microServo360Options)],\n                resetIn: true,\n            },\n            {\n                name: \"servo x 2\",\n                serviceClasses: [SRV_SERVO],\n                resetIn: true,\n                services: () =>\n                    Array(2)\n                        .fill(0)\n                        .map(\n                            (_, i) =>\n                                new ServoServer({\n                                    ...microServoOptions,\n                                    instanceName: `S${i}`,\n                                }),\n                        ),\n            },\n            {\n                name: \"servo x 4\",\n                serviceClasses: [SRV_SERVO],\n                resetIn: true,\n                services: () =>\n                    Array(4)\n                        .fill(0)\n                        .map(\n                            (_, i) =>\n                                new ServoServer({\n                                    ...microServoOptions,\n                                    instanceName: `S${i}`,\n                                }),\n                        ),\n            },\n            {\n                name: \"servo x 6\",\n                serviceClasses: [SRV_SERVO],\n                resetIn: true,\n                services: () =>\n                    Array(6)\n                        .fill(0)\n                        .map(\n                            (_, i) =>\n                                new ServoServer({\n                                    ...microServoOptions,\n                                    instanceName: `S${i}`,\n                                }),\n                        ),\n            },\n            {\n                name: \"servo x 16\",\n                serviceClasses: [SRV_SERVO],\n                resetIn: true,\n                services: () =>\n                    Array(16)\n                        .fill(0)\n                        .map(\n                            (_, i) =>\n                                new ServoServer({\n                                    ...microServoOptions,\n                                    instanceName: `S${i}`,\n                                }),\n                        ),\n            },\n            {\n                name: \"servo (continuous)\",\n                serviceClasses: [SRV_SERVO],\n                services: () => [new ServoServer(microServoContinuousOptions)],\n                resetIn: true,\n            },\n            {\n                name: \"servo (continuous) x2\",\n                serviceClasses: [SRV_SERVO],\n                services: () =>\n                    Array(2)\n                        .fill(0)\n                        .map(\n                            (_, i) =>\n                                new ServoServer({\n                                    ...microServoContinuousOptions,\n                                    instanceName: `S${i}`,\n                                }),\n                        ),\n                resetIn: true,\n            },\n            {\n                name: \"settings\",\n                serviceClasses: [SRV_SETTINGS],\n                services: () => [new SettingsServer()],\n            },\n            {\n                name: \"slider (potentiometer)\",\n                serviceClasses: [SRV_POTENTIOMETER],\n                services: () => [\n                    new AnalogSensorServer(SRV_POTENTIOMETER, {\n                        variant: PotentiometerVariant.Slider,\n                    }),\n                ],\n            },\n            {\n                name: \"Hall sensor (potentiometer)\",\n                serviceClasses: [SRV_POTENTIOMETER],\n                services: () => [\n                    new AnalogSensorServer(SRV_POTENTIOMETER, {\n                        variant: PotentiometerVariant.Hall,\n                    }),\n                ],\n            },\n            {\n                name: \"soil moisture\",\n                serviceClasses: [SRV_SOIL_MOISTURE],\n                services: () => [\n                    new AnalogSensorServer(SRV_SOIL_MOISTURE, {\n                        readingValues: [0.5],\n                        readingError: [0.05],\n                        streamingInterval: 1000,\n                    }),\n                ],\n            },\n            {\n                name: \"speech synthesis\",\n                serviceClasses: [SRV_SPEECH_SYNTHESIS],\n                services: () => [new SpeechSynthesisServer()],\n            },\n            {\n                name: \"solenoid\",\n                serviceClasses: [SRV_SOLENOID],\n                services: () => [\n                    new JDServiceServer(SRV_SOLENOID, {\n                        intensityValues: [0],\n                    }),\n                ],\n            },\n            {\n                name: \"sound level\",\n                serviceClasses: [SRV_SOUND_LEVEL],\n                services: () => [\n                    new AnalogSensorServer(SRV_SOUND_LEVEL, soundLevel),\n                ],\n            },\n            {\n                name: \"sound spectrum\",\n                serviceClasses: [SRV_SOUND_SPECTRUM],\n                services: () => [\n                    new SensorServer<[Uint8Array]>(\n                        SRV_SOUND_SPECTRUM,\n                        soundSpectrum,\n                    ),\n                ],\n            },\n            {\n                name: \"sound player (micro:bit V2 sounds)\",\n                serviceClasses: [SRV_SOUND_PLAYER],\n                services: () => [new SoundPlayerServer(microbitSounds)],\n            },\n            {\n                name: \"switch (slide)\",\n                serviceClasses: [SRV_SWITCH],\n                services: () => [\n                    new SwitchServer({ variant: SwitchVariant.Slide }),\n                ],\n            },\n            {\n                name: \"switch (push button)\",\n                serviceClasses: [SRV_SWITCH],\n                services: () => [\n                    new SwitchServer({ variant: SwitchVariant.PushButton }),\n                ],\n            },\n            {\n                name: \"switch (toggle)\",\n                serviceClasses: [SRV_SWITCH],\n                services: () => [\n                    new SwitchServer({ variant: SwitchVariant.Toggle }),\n                ],\n            },\n            {\n                name: \"switch (tilt)\",\n                serviceClasses: [SRV_SWITCH],\n                services: () => [\n                    new SwitchServer({ variant: SwitchVariant.Tilt }),\n                ],\n            },\n            {\n                name: \"switch (proximity)\",\n                serviceClasses: [SRV_SWITCH],\n                services: () => [\n                    new SwitchServer({\n                        variant: SwitchVariant.Proximity,\n                    }),\n                ],\n            },\n            {\n                name: \"thermometer (outdoor)\",\n                serviceClasses: [SRV_TEMPERATURE],\n                services: () => [\n                    new AnalogSensorServer(\n                        SRV_TEMPERATURE,\n                        outdoorThermometerOptions,\n                    ),\n                ],\n            },\n            {\n                name: \"thermometer (soil)\",\n                serviceClasses: [SRV_TEMPERATURE],\n                services: () => [\n                    new AnalogSensorServer(\n                        SRV_TEMPERATURE,\n                        soilThermometerOptions,\n                    ),\n                ],\n            },\n            {\n                name: \"thermometer (medical)\",\n                serviceClasses: [SRV_TEMPERATURE],\n                services: () => [\n                    new AnalogSensorServer(\n                        SRV_TEMPERATURE,\n                        medicalThermometerOptions,\n                    ),\n                ],\n            },\n            {\n                name: \"traffic light\",\n                serviceClasses: [SRV_TRAFFIC_LIGHT],\n                services: () => [new TrafficLightServer()],\n            },\n            {\n                name: \"traffic crossing (4 x lights)\",\n                serviceClasses: [SRV_TRAFFIC_LIGHT],\n                services: () =>\n                    Array(4)\n                        .fill(0)\n                        .map(() => new TrafficLightServer()),\n            },\n            {\n                name: \"TVOC\",\n                serviceClasses: [SRV_TVOC],\n                services: () => [new AnalogSensorServer(SRV_TVOC, tvocOptions)],\n            },\n            {\n                name: \"UV index\",\n                serviceClasses: [SRV_UV_INDEX],\n                services: () => [\n                    new AnalogSensorServer(SRV_UV_INDEX, {\n                        readingValues: [5],\n                        minReading: 0,\n                        maxReading: 11,\n                        streamingInterval: 1000,\n                    }),\n                ],\n            },\n            {\n                name: \"vibration motor\",\n                serviceClasses: [SRV_VIBRATION_MOTOR],\n                services: () => [new VibrationMotorServer()],\n            },\n            {\n                name: \"water level\",\n                serviceClasses: [SRV_WATER_LEVEL],\n                services: () => [\n                    new AnalogSensorServer(SRV_WATER_LEVEL, {\n                        readingValues: [0.5],\n                        streamingInterval: 1000,\n                    }),\n                ],\n            },\n            {\n                name: \"water pump (relay)\",\n                serviceClasses: [SRV_RELAY],\n                services: () => [\n                    new JDServiceServer(SRV_RELAY, {\n                        intensityValues: [false],\n                        isActive: values => !!values?.[0],\n                        variant: RelayVariant.Electromechanical,\n                        registerValues: [\n                            {\n                                code: RelayReg.MaxSwitchingCurrent,\n                                values: [10],\n                            },\n                        ],\n                    }),\n                ],\n            },\n            {\n                name: \"weight scale (jewelry)\",\n                serviceClasses: [SRV_WEIGHT_SCALE],\n                services: () => [\n                    new AnalogSensorServer(SRV_WEIGHT_SCALE, {\n                        readingValues: [0.001],\n                        variant: WeightScaleVariant.Jewelry,\n                        maxReading: 0.2,\n                        minReading: 0.0005,\n                        readingResolution: 0.00001,\n                    }),\n                ],\n            },\n            {\n                name: \"weight scale (body)\",\n                serviceClasses: [SRV_WEIGHT_SCALE],\n                services: () => [\n                    new AnalogSensorServer(SRV_WEIGHT_SCALE, {\n                        readingValues: [60],\n                        variant: WeightScaleVariant.Body,\n                        maxReading: 180,\n                        readingResolution: 0.1,\n                    }),\n                ],\n            },\n            {\n                name: \"weight scale (food)\",\n                serviceClasses: [SRV_WEIGHT_SCALE],\n                services: () => [\n                    new AnalogSensorServer(SRV_WEIGHT_SCALE, {\n                        readingValues: [0.5],\n                        variant: WeightScaleVariant.Food,\n                        maxReading: 6,\n                        readingResolution: 0.001,\n                    }),\n                ],\n            },\n            {\n                name: \"wind direction\",\n                serviceClasses: [SRV_WIND_DIRECTION],\n                services: () => [\n                    new AnalogSensorServer(\n                        SRV_WIND_DIRECTION,\n                        windDirectionOptions,\n                    ),\n                ],\n            },\n            {\n                name: \"wind speed\",\n                serviceClasses: [SRV_WIND_SPEED],\n                services: () => [\n                    new AnalogSensorServer(SRV_WIND_SPEED, windSpeedOptions),\n                ],\n            },\n            {\n                name: \"weather station (wind speed, direction, rain)\",\n                serviceClasses: [\n                    SRV_WIND_SPEED,\n                    SRV_WIND_DIRECTION,\n                    SRV_RAIN_GAUGE,\n                ],\n                services: () => [\n                    new AnalogSensorServer(SRV_WIND_SPEED, windSpeedOptions),\n                    new AnalogSensorServer(\n                        SRV_WIND_DIRECTION,\n                        windDirectionOptions,\n                    ),\n                    new RainGaugeServer(),\n                ],\n            },\n            {\n                name: \"chassis (motor x 2 + sonar + light)\",\n                serviceClasses: [SRV_DISTANCE, SRV_LED, SRV_MOTOR],\n                services: () => [\n                    new MotorServer(\"L\"),\n                    new MotorServer(\"R\"),\n                    new AnalogSensorServer(SRV_DISTANCE, sonarOptions),\n                    new LedServer({\n                        numPixels: 5,\n                        variant: LedVariant.Stick,\n                    }),\n                ],\n            },\n            {\n                name: \"railway crossing (2 x lights, 2 x servos, 1 x buffer)\",\n                serviceClasses: [SRV_TRAFFIC_LIGHT, SRV_SERVO, SRV_BUZZER],\n                services: () => [\n                    new TrafficLightServer({ instanceName: \"left light\" }),\n                    new ServoServer({\n                        minAngle: 0,\n                        maxAngle: 90,\n                        instanceName: \"left arm\",\n                    }),\n                    new TrafficLightServer({ instanceName: \"right light\" }),\n                    new ServoServer({\n                        minAngle: 0,\n                        maxAngle: 90,\n                        instanceName: \"right arm\",\n                    }),\n                    new BuzzerServer({ instanceName: \"bell\" }),\n                ],\n            },\n            {\n                name: \"Arcade controller (6 x buttons)\",\n                serviceClasses: [SRV_BUTTON],\n                services: () => [\n                    new ButtonServer(\"Left\"),\n                    new ButtonServer(\"Up\"),\n                    new ButtonServer(\"Right\"),\n                    new ButtonServer(\"Down\"),\n                    new ButtonServer(\"A\"),\n                    new ButtonServer(\"B\"),\n                ],\n            },\n            {\n                name: \"micro:bit V2\",\n                serviceClasses: [\n                    SRV_DOT_MATRIX,\n                    SRV_BUTTON,\n                    SRV_ACCELEROMETER,\n                    SRV_SOUND_LEVEL,\n                    SRV_LIGHT_LEVEL,\n                    SRV_BUZZER,\n                    SRV_SOUND_PLAYER,\n                ],\n                services: () => [\n                    new DotMatrixServer(5, 5),\n                    new ButtonServer(\"A\"),\n                    new ButtonServer(\"B\"),\n                    new SensorServer<[number, number, number]>(\n                        SRV_ACCELEROMETER,\n                        {\n                            readingValues: [\n                                0.5,\n                                0.5,\n                                -(1 - (0.5 * 0.5 + 0.5 * 0.5)),\n                            ],\n                        },\n                    ),\n                    new AnalogSensorServer(SRV_SOUND_LEVEL, soundLevel),\n                    new SensorServer(SRV_LIGHT_LEVEL, {\n                        readingValues: [0.5],\n                        variant: LightLevelVariant.ReverseBiasedLED,\n                    }),\n                    new BuzzerServer(),\n                    new SoundPlayerServer(microbitSounds),\n                ],\n            },\n            <ServiceProviderDefinition>{\n                name: \"power + humidity\",\n                serviceClasses: [SRV_POWER, SRV_HUMIDITY],\n                services: () => [\n                    new PowerServer(),\n                    new AnalogSensorServer(\n                        SRV_HUMIDITY,\n                        outdoorHumidityOptions,\n                    ),\n                ],\n                factory: services => {\n                    const dev = new JDServerServiceProvider(\"power+humidity\", [\n                        services[0],\n                    ])\n                    const pwr = dev.service(1) as PowerServer\n                    pwr.allowed.on(CHANGE, () => {\n                        const allowed = !!pwr.allowed.values()[0]\n                        console.debug(`power: ${allowed ? \"on\" : \"off\"}`)\n                        if (allowed)\n                            // power + rest\n                            dev.updateServices(services)\n                        // power only\n                        else dev.updateServices([services[0]])\n                    })\n                    return dev\n                },\n            },\n            {\n                name: \"Cloud adapter (simulator)\",\n                serviceClasses: [SRV_CLOUD_ADAPTER],\n                services: () => [\n                    new CloudAdapterServer({\n                        connectionName: \"simulated\",\n                    }),\n                ],\n            },\n            {\n                name: \"ROS (simulator)\",\n                serviceClasses: [SRV_ROS],\n                services: () => [new RosServer()],\n            },\n            {\n                name: \"Display 128x64 monochrome (1bpp)\",\n                serviceClasses: [SRV_INDEXED_SCREEN],\n                services: () => [\n                    new IndexedScreenServer({\n                        width: 128,\n                        height: 64,\n                        bitsPerPixel: 1,\n                        palette: [0x000000, 0xffffff],\n                    }),\n                ],\n            },\n            {\n                name: \"Display 128x128 16colors (4bpp)\",\n                serviceClasses: [SRV_INDEXED_SCREEN],\n                services: () => [\n                    new IndexedScreenServer({\n                        width: 128,\n                        height: 128,\n                        bitsPerPixel: 4,\n                        palette: [\n                            0x000000, 0xffffff, 0xff2121, 0xff93c4, 0xff8135,\n                            0xfff609, 0x249ca3, 0x78dc52, 0x003fad, 0x87f2ff,\n                            0x8e2ec4, 0xa4839f, 0x5c406c, 0xe5cdc4, 0x91463d,\n                            0x000000,\n                        ],\n                    }),\n                ],\n            },\n            Flags.diagnostics\n                ? {\n                      name: \"WiFi (virtual, no ap)\",\n                      serviceClasses: [SRV_WIFI],\n                      services: () => [new WifiServer()],\n                  }\n                : undefined,\n            Flags.diagnostics\n                ? {\n                      name: \"WiFi (virtual, 1 AP)\",\n                      serviceClasses: [SRV_WIFI],\n                      services: () => [\n                          new WifiServer({\n                              scanResults: [\n                                  {\n                                      ssid: \"HOME\",\n                                      bssid: new Uint8Array(0),\n                                      rssi: -42,\n                                      channel: 10,\n                                      flags:\n                                          WifiAPFlags.WPS |\n                                          WifiAPFlags.IEEE_802_11B,\n                                  },\n                              ],\n                          }),\n                      ],\n                  }\n                : undefined,\n            Flags.diagnostics\n                ? {\n                      name: \"WiFi (virtual, 1 network)\",\n                      serviceClasses: [SRV_WIFI],\n                      services: () => [\n                          new WifiServer({\n                              scanResults: [\n                                  {\n                                      ssid: \"HOME\",\n                                      bssid: new Uint8Array(0),\n                                      rssi: -42,\n                                      channel: 10,\n                                      flags:\n                                          WifiAPFlags.WPS |\n                                          WifiAPFlags.IEEE_802_11B,\n                                  },\n                              ],\n                              knownNetworks: [\n                                  {\n                                      ssid: \"HOME\",\n                                      password: \"home\",\n                                      priority: 0,\n                                      flags:\n                                          WifiAPFlags.WPS |\n                                          WifiAPFlags.IEEE_802_11B,\n                                  },\n                              ],\n                          }),\n                      ],\n                  }\n                : undefined,\n        ].filter(s => !!s))\n}\n\n/**\n * Gets the list of simulated service providers\n * @category Servers\n */\nexport function serviceProviderDefinitions() {\n    return initProviders().slice(0)\n}\n\n/**\n * Adds a new service provider definition\n * @param def\n */\nexport function addServiceProviderDefinition(def: ServiceProviderDefinition) {\n    const providers = initProviders()\n    if (!providers.find(p => p.name === def.name)) providers.push(def)\n}\n\nfunction fingerPrint() {\n    try {\n        if (typeof self !== \"undefined\" && self.localStorage) {\n            const key = \"jacdac_device_fingerprint\"\n            const f =\n                self.localStorage[key] ||\n                (self.localStorage[key] = randomDeviceId())\n            return f\n        }\n    } catch (e) {\n        return \"\"\n    }\n}\n\nfunction stableSimulatorDeviceId(\n    bus: JDBus,\n    template: string,\n    salt: string,\n): string {\n    const fg = fingerPrint()\n    const others = bus.serviceProviders().filter(sp => sp.template === template)\n    const word0 = hash(stringToUint8Array(salt + template + others.length), 32)\n    const word1 = hash(\n        stringToUint8Array(salt + fg + template + others.length + 1),\n        32,\n    )\n    const id = toFullHex([word0, word1])\n    return id.slice(2)\n}\n\nexport interface ServiceProviderOptions {\n    serviceClass: number\n    serviceOffset?: number\n    constants: Record<string, PackedSimpleValue>\n}\n\nfunction applyServiceOptions(\n    services: JDServiceServer[],\n    serviceOptions: ServiceProviderOptions[],\n) {\n    serviceOptions?.forEach(({ serviceClass, serviceOffset, constants }) => {\n        const srvs = services.filter(srv => srv.serviceClass === serviceClass)\n        const service = srvs[serviceOffset || 0]\n        if (!service) {\n            console.warn(\n                `service provider: service 0x${serviceClass.toString(\n                    16,\n                )} not found at offset ${serviceOffset || 0}`,\n                { srvs },\n            )\n        } else {\n            const { specification } = service\n            Object.entries(constants).forEach(([name, value]) => {\n                const spec = specification.packets.find(\n                    pkt => isConstRegister(pkt) && pkt.name === name,\n                )\n                if (!spec)\n                    console.warn(\n                        `service provider: unknown register ${specification.name}.${name}`,\n                    )\n                else {\n                    const reg = service.register(spec.identifier)\n                    if (!reg) service.addRegister(spec.identifier, [value])\n                    else reg.setValues([value])\n                }\n            })\n        }\n    })\n}\n\n/**\n * Instantiates a new service provider instance and adds it to the bus\n * @category Servers\n */\nexport function addServiceProvider(\n    bus: JDBus,\n    definition: ServiceProviderDefinition,\n    serviceOptions?: ServiceProviderOptions[],\n) {\n    const services = definition.services()\n    applyServiceOptions(services, definition.serviceOptions)\n    applyServiceOptions(services, serviceOptions)\n    services.forEach(srv => srv.lock())\n    const salt = bus.serviceProviderIdSalt\n    const deviceId = stableSimulatorDeviceId(bus, definition.name, salt)\n    const options = {\n        resetIn: definition.resetIn,\n        deviceId,\n        deviceDescription: definition.name,\n    }\n    const d =\n        definition.factory?.(services) ||\n        new JDServerServiceProvider(definition.name, services, options)\n    bus.addServiceProvider(d)\n    return d\n}\n\n/**\n * Adds a single server device on the bus.\n * @param bus\n * @param name\n * @param server\n * @param serviceOptions\n * @returns\n */\nexport function addServer(\n    bus: JDBus,\n    name: string,\n    server: JDServiceServer,\n    serviceOptions?: ServiceProviderOptions[],\n) {\n    const services = [server]\n    return addServiceProvider(\n        bus,\n        {\n            name,\n            serviceClasses: services.map(srv => srv.serviceClass),\n            services: () => services,\n        },\n        serviceOptions,\n    )\n}\n\n/**\n * Finds the first service provider that supports the given service class\n * @category Servers\n */\nexport function serviceProviderDefinitionFromServiceClass(\n    serviceClass: number,\n) {\n    return initProviders().find(\n        provider =>\n            provider.serviceClasses.length === 1 &&\n            provider.serviceClasses[0] === serviceClass,\n    )\n}\n\nfunction syntheticServiceProvider(\n    bus: JDBus,\n    serviceClass: number,\n): ServiceProviderDefinition {\n    const specification = serviceSpecificationFromClassIdentifier(serviceClass)\n    if (!specification) return undefined\n\n    const { name } = specification\n\n    let server: JDServiceServer\n    if (isSensor(specification)) {\n        const reading = specification.packets.find(isReading)\n        if (reading.fields.length === 1 && isNumericType(reading.fields[0])) {\n            const field = reading.fields[0]\n            const { min, max, scale = 1, defl } = genFieldInfo(reading, field)\n            const value = typeof defl === \"number\" ? defl : (max - min) / 2\n            server = new AnalogSensorServer(serviceClass, {\n                readingValues: [value / scale],\n                minReading: min / scale,\n                maxReading: max / scale,\n            })\n        }\n    } else if (isActuator(specification)) {\n        const intensity = 0\n        const valueReg = specification.packets.find(\n            pkt => pkt.identifier === SystemReg.Value,\n        )\n        const {\n            min,\n            max,\n            scale = 1,\n            defl,\n        } = (valueReg && genFieldInfo(valueReg, valueReg.fields[0])) || {}\n        const value = typeof defl === \"number\" ? defl : (max - min) / 2\n        server = new JDServiceServer(serviceClass, {\n            intensityValues: [intensity],\n            valueValues: !isNaN(value) ? [value / scale] : undefined,\n        })\n    }\n\n    return (\n        server && {\n            name,\n            serviceClasses: [serviceClass],\n            services: () => [server],\n        }\n    )\n}\n\n/**\n * Starts a service provider that hosts the given service class.\n * @category Servers\n */\nexport function startServiceProviderFromServiceClass(\n    bus: JDBus,\n    serviceClass: number,\n) {\n    const provider =\n        serviceProviderDefinitionFromServiceClass(serviceClass) ||\n        syntheticServiceProvider(bus, serviceClass)\n    return provider ? addServiceProvider(bus, provider) : undefined\n}\n", "import { JDService } from \"./service\"\nimport { JDDevice } from \"./device\"\nimport { JDBus } from \"./bus\"\nimport { JDClient } from \"./client\"\nimport {\n    CHANGE,\n    EVENT,\n    SystemEvent,\n    SystemReg,\n    SystemStatusCodes,\n} from \"./constants\"\n\n/**\n * Base class for service clients\n * @category Clients\n */\nexport class JDServiceClient extends JDClient {\n    constructor(public readonly service: JDService) {\n        super()\n\n        const statusCodeChanged = this.service.event(\n            SystemEvent.StatusCodeChanged,\n        )\n        this.mount(statusCodeChanged?.subscribe(EVENT, () => this.emit(CHANGE)))\n    }\n\n    protected get device(): JDDevice {\n        return this.service.device\n    }\n\n    protected get bus(): JDBus {\n        return this.device.bus\n    }\n\n    get statusCode(): SystemStatusCodes {\n        const reg = this.service.register(SystemReg.StatusCode)\n        return reg.unpackedValue?.[0]\n    }\n\n    toString(): string {\n        return `client of ${this.service}`\n    }\n}\n", "import {\n    addServiceProvider,\n    serviceProviderDefinitionFromServiceClass,\n    ServiceProviderOptions,\n} from \"../../servers/servers\"\nimport { JDBus } from \"../bus\"\nimport {\n    CHANGE,\n    DEVICE_ANNOUNCE,\n    ERROR,\n    EVENT,\n    RoleManagerCmd,\n    ROLE_MANAGER_POLL,\n    ROLE_QUERY_DEVICE,\n    ROLE_QUERY_SELF_DEVICE,\n    ROLE_QUERY_SERVICE_INDEX,\n    ROLE_QUERY_SERVICE_OFFSET,\n    SELF_ANNOUNCE,\n    SystemEvent,\n} from \"../constants\"\nimport { JDEvent } from \"../event\"\nimport { jdpack, jdunpack, PackedSimpleValue } from \"../pack\"\nimport { Packet } from \"../packet\"\nimport { InPipeReader } from \"../pipes\"\nimport { JDService } from \"../service\"\nimport { JDServiceClient } from \"../serviceclient\"\nimport {\n    isConstRegister,\n    isInfrastructure,\n    serviceSpecificationFromClassIdentifier,\n} from \"../spec\"\nimport {\n    arrayConcatMany,\n    debounceAsync,\n    fromHex,\n    groupBy,\n    toHex,\n    toMap,\n} from \"../utils\"\n\n/**\n * A service role assigment\n * @category Clients\n */\nexport interface Role {\n    /**\n     * Identifier of the bound device\n     */\n    deviceId: string\n    /**\n     * Service class bound, for sanity check\n     */\n    serviceClass: number\n    /**\n     * Service index bound\n     */\n    serviceIndex: number\n    /**\n     * Role name\n     */\n    name: string\n    /**\n     * Query argument (optional)\n     */\n    query?: string\n}\n\n/**\n * Resolves the JDom service instance for this role.\n * @param bus\n * @param role\n * @returns\n */\nexport function resolveRoleService(bus: JDBus, role: Role) {\n    const { deviceId, serviceIndex, serviceClass } = role\n    if (!deviceId || isNaN(serviceIndex)) return undefined\n    const device = bus.device(deviceId, true)\n    const service = device?.service(serviceIndex)\n    if (service && service.serviceClass !== serviceClass) {\n        console.warn(\"unexpected service class for role\", { role })\n        return undefined\n    }\n    return service\n}\n\nfunction parentName(bus: JDBus, role: Role) {\n    if (role.query) {\n        const args = role.query.split(\"&\").map(a => a.split(\"=\", 2))\n        const deviceId = args.find(a => a[0] === ROLE_QUERY_DEVICE)?.[1]\n        if (deviceId === ROLE_QUERY_SELF_DEVICE) return bus.selfDeviceId\n        return deviceId\n    }\n    return role.name.split(\"/\", 1)[0]\n}\n\nfunction parseRole(role: Role): ServiceProviderOptions {\n    const specification = serviceSpecificationFromClassIdentifier(\n        role.serviceClass\n    )\n    if (!specification) return undefined\n    const args = role.query\n        ?.split(\"&\")\n        .map(a => a.split(\"=\", 2))\n        .filter(([n, v]) => n && v !== undefined)\n        .map(([n, v]) => ({ name: n.toLowerCase().trim(), value: v }))\n    const serviceOffset = args\n        ?.filter(arg => arg.name === ROLE_QUERY_SERVICE_OFFSET)\n        .map(arg => {\n            const i = parseInt(arg.value)\n            return isNaN(i) ? undefined : i\n        })[0]\n    const serviceIndex = args\n        ?.filter(arg => arg.name === ROLE_QUERY_SERVICE_INDEX)\n        .map(arg => {\n            const i = parseInt(arg.value)\n            return isNaN(i) ? undefined : i\n        })[0]\n    const REG_NAME_MAP: Record<string, string> = {\n        name: \"instance_name\",\n    }\n    const pktArgs = args\n        ?.map(({ name, value }) => ({\n            name: REG_NAME_MAP[name] || name,\n            value,\n        }))\n        ?.map(({ name, value }) => ({\n            name,\n            value,\n            pkt: specification.packets.find(\n                pkt => isConstRegister(pkt) && pkt.name === name\n            ),\n        }))\n        .filter(a => !!a.pkt?.packFormat)\n        .map(({ name, value, pkt }) => {\n            let simpleValue: PackedSimpleValue\n            const type = pkt.fields[0].type\n            const enumType: jdspec.EnumInfo = specification.enums?.[type]\n            if (enumType)\n                simpleValue = enumType.members[value] || parseInt(value)\n            else if (type == \"string\") simpleValue = value\n            else simpleValue = parseInt(value)\n            return { name, value: simpleValue }\n        })\n    if (\n        serviceOffset === undefined &&\n        serviceIndex === undefined &&\n        !pktArgs?.length\n    )\n        return undefined\n\n    const constants: Record<string, PackedSimpleValue> =\n        pktArgs &&\n        toMap(\n            pktArgs,\n            a => a.name,\n            a => a.value\n        )\n    const r = {\n        serviceClass: role.serviceClass,\n        serviceOffset,\n        serviceIndex,\n        constants,\n    }\n    console.debug(`role: ${role.name}`, r)\n    return r\n}\n\n/**\n * A client for the role manager service\n * @category Clients\n */\nexport class RoleManagerClient extends JDServiceClient {\n    private _roles: Role[] = []\n    private _needRefresh = true\n    private _lastRefreshAttempt = 0\n    public readonly changeEvent: JDEvent\n    public readonly startRefreshRoles: () => void\n\n    constructor(service: JDService) {\n        super(service)\n        this.changeEvent = service.event(SystemEvent.Change)\n\n        // always debounce refresh roles\n        this.startRefreshRoles = debounceAsync(\n            this.refreshRoles.bind(this),\n            200\n        )\n\n        // role manager emits change events\n        this.mount(\n            this.changeEvent.subscribe(EVENT, this.handleChange.bind(this))\n        )\n        // assign roles when need device enter the bus\n        this.mount(\n            this.bus.subscribe(DEVICE_ANNOUNCE, this.assignRoles.bind(this))\n        )\n        // clear on unmount\n        this.mount(this.clearRoles.bind(this))\n        // retry to get roles on every self-announce\n        this.mount(\n            this.bus.subscribe(\n                SELF_ANNOUNCE,\n                this.handleSelfAnnounce.bind(this)\n            )\n        )\n    }\n\n    /**\n     * @hidden\n     */\n    override toString(): string {\n        return `role manager ${this.service.toString()}`\n    }\n\n    private handleSelfAnnounce() {\n        if (\n            this._needRefresh &&\n            this.bus.timestamp - this._lastRefreshAttempt > ROLE_MANAGER_POLL\n        )\n            this.startRefreshRoles()\n    }\n\n    get roles() {\n        return this._roles\n    }\n\n    private async handleChange() {\n        this.startRefreshRoles()\n    }\n\n    private async refreshRoles() {\n        if (this.unmounted) return\n\n        this._needRefresh = false\n        await this.collectRoles()\n\n        if (this.unmounted) return\n        this.assignRoles()\n    }\n\n    private async collectRoles() {\n        //this.log(`collecting roles`)\n        this._lastRefreshAttempt = this.bus.timestamp\n        const previousRolesHash = JSON.stringify(this._roles)\n        try {\n            const inp = new InPipeReader(this.bus)\n            await this.service.sendPacketAsync(\n                inp.openCommand(RoleManagerCmd.ListRoles),\n                true\n            )\n            // collect all roles\n            const roles: Role[] = []\n            for (const buf of await inp.readData(1500)) {\n                const [devidbuf, serviceClass, serviceIndex, full] = jdunpack<\n                    [Uint8Array, number, number, string]\n                >(buf, \"b[8] u32 u8 s\")\n                const deviceId = toHex(devidbuf)\n                const [name, query] = full.split(\"?\", 2)\n                const role: Role = {\n                    deviceId,\n                    serviceClass,\n                    serviceIndex,\n                    name,\n                    query,\n                }\n                roles.push(role)\n            }\n            // store result if changed\n            if (JSON.stringify(roles) !== previousRolesHash) {\n                this.log(`roles updated`, roles)\n                this._roles = roles\n                this.emit(CHANGE)\n            }\n        } catch (e) {\n            this.log(`collect roles failed`)\n            this._needRefresh = true\n            this.emit(ERROR, e)\n        }\n    }\n\n    private assignRoles() {\n        this.bus\n            .services()\n            .filter(srv => !isInfrastructure(srv.specification))\n            .forEach(srv => this.assignRole(srv))\n    }\n\n    private assignRole(service: JDService) {\n        const deviceId = service.device.deviceId\n        const serviceIndex = service.serviceIndex\n        const role = this._roles.find(\n            r => r.deviceId === deviceId && r.serviceIndex === serviceIndex\n        )\n        if (service.role !== role?.name)\n            this.log(`role ${service} -> ${role?.name || \"\"}`, { role })\n        service.role = role?.name\n    }\n\n    private clearRoles() {\n        this.bus.services().forEach(srv => (srv.role = undefined))\n    }\n\n    hasRoleForService(service: JDService) {\n        const { serviceClass } = service\n        return !!this._roles?.find(r => r.serviceClass === serviceClass)\n    }\n\n    compatibleRoles(service: JDService): Role[] {\n        const { serviceClass } = service\n        return this._roles?.filter(r => r.serviceClass === serviceClass)\n    }\n\n    role(name: string): Role {\n        return this._roles.find(r => r.serviceIndex > 0 && r.name === name)\n    }\n\n    async setRole(service: JDService, name: string) {\n        const { device, serviceIndex } = service\n        const { deviceId } = device\n        //console.debug(`set role ${deviceId}:${serviceIndex} to ${role}`)\n\n        const previous = name && this._roles.find(r => r.name === name)\n        if (\n            previous &&\n            previous.deviceId === deviceId &&\n            previous.serviceIndex === serviceIndex\n        ) {\n            // nothing todo\n            this.log(`role unmodified, skipping`)\n            return\n        }\n\n        // set new role assignment\n        {\n            this.log(`assign role ${deviceId}[${serviceIndex}] -> ${name}`)\n            const data = jdpack<[Uint8Array, number, string]>(\"b[8] u8 s\", [\n                fromHex(deviceId),\n                serviceIndex,\n                name || \"\",\n            ])\n            await this.service.sendPacketAsync(\n                Packet.from(RoleManagerCmd.SetRole, data),\n                true\n            )\n        }\n\n        // clear previous role assignment\n        if (previous && previous.deviceId != \"0000000000000000\") {\n            this.log(`clear role ${previous.deviceId}:${previous.serviceIndex}`)\n            const data = jdpack<[Uint8Array, number, string]>(\"b[8] u8 s\", [\n                fromHex(previous.deviceId),\n                previous.serviceIndex,\n                \"\",\n            ])\n            await this.service.sendPacketAsync(\n                Packet.from(RoleManagerCmd.SetRole, data),\n                true\n            )\n        }\n    }\n\n    allRolesBound() {\n        return this._roles.every(role => !!this.bus.device(role.deviceId, true))\n    }\n\n    startSimulators() {\n        this.log(`start role sims`, { roles: this._roles })\n        const roles = this._roles.filter(\n            role => !this.bus.device(role.deviceId, true)\n        )\n        if (!roles?.length) return\n\n        this.log(`unbound roles: ${roles.length}`, { roles })\n        // collect roles that need to be bound\n        const todos = groupBy(\n            roles\n                .map(role => ({\n                    role,\n                    hostDefinition: serviceProviderDefinitionFromServiceClass(\n                        role.serviceClass\n                    ),\n                }))\n                .filter(todo => !!todo.hostDefinition),\n            todo => parentName(this.bus, todo.role) || \"\"\n        )\n        this.log(`simulateable roles`, todos)\n\n        // spawn devices with group of devices\n        const parents = Object.keys(todos)\n        parents.forEach(parent => {\n            const todo = todos[parent]\n            // no parent, spawn individual services\n            if (!parent) {\n                todo.forEach(t => {\n                    const serviceOptions = parseRole(t.role)\n                    addServiceProvider(\n                        this.bus,\n                        t.hostDefinition,\n                        serviceOptions ? [serviceOptions] : undefined\n                    )\n                })\n            } else {\n                // spawn all services into 1\n                addServiceProvider(\n                    this.bus,\n                    {\n                        name: \"\",\n                        serviceClasses: [],\n                        services: () =>\n                            arrayConcatMany(\n                                todo.map(t => t.hostDefinition.services())\n                            ),\n                    },\n                    todo.map(t => parseRole(t.role)).filter(q => !!q)\n                )\n            }\n        })\n    }\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A time scheduler to orchestrate time in the bus.\n * @category JDOM\n */\nexport interface Scheduler {\n    /**\n     * Gets the current timestamp\n     */\n    get timestamp(): number\n    /**\n     * Reset time\n     * @param delta\n     */\n    resetTime(delta: number): void\n    /**\n     * Start a timeout timer\n     */\n    setTimeout(\n        handler: (...args: any[]) => void,\n        delay: number,\n        ...args: any[]\n    ): any\n    /**\n     * Cancel an existing timeout timer\n     */\n    clearTimeout(handle: any): void\n    /**\n     * Start an interval timer\n     */\n    setInterval(\n        handler: (...args: any[]) => void,\n        delay: number,\n        ...args: any[]\n    ): any\n    /**\n     * Clear an interval timer\n     */\n    clearInterval(handle: any): void\n}\n\n/** @internal */\nexport class WallClockScheduler implements Scheduler {\n    private _now: () => number\n    private _startTime: number\n\n    constructor() {\n        this._now =\n            typeof performance !== \"undefined\"\n                ? () => performance.now()\n                : () => Date.now()\n        this._startTime = this._now()\n    }\n\n    get timestamp(): number {\n        return this._now() - this._startTime\n    }\n    resetTime(delta = 0) {\n        this._startTime = this._now() - delta\n    }\n    setTimeout(\n        handler: (...args: any[]) => void,\n        delay: number,\n        ...args: any[]\n    ): any {\n        return setTimeout(handler, delay, args)\n    }\n    clearTimeout(handle: any): void {\n        clearTimeout(handle)\n    }\n    setInterval(\n        handler: (...args: any[]) => void,\n        delay: number,\n        ...args: any[]\n    ): any {\n        return setInterval(handler, delay, args)\n    }\n    clearInterval(handle: any): void {\n        clearInterval(handle)\n    }\n}\n", "[\n  {\n    \"id\": \"yahboom-microbitledv10\",\n    \"name\": \"Microbit-LED\",\n    \"company\": \"Yahboom\",\n    \"description\": \"The expansion board integrates 24 programmable RGB lights and microphones, and you can control the on-board RGB lights by the microphone.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"yahboom-microbitledv10\",\n        \"slug\": \"pelikhan/yahboom-microbit-led-jacdac\"\n      }\n    ],\n    \"connector\": \"noConnector\",\n    \"link\": \"https://category.yahboom.net/products/rgbledb\",\n    \"storeLink\": [\n      \"https://category.yahboom.net/products/rgbledb\"\n    ],\n    \"services\": [\n      369743088,\n      346888797\n    ],\n    \"productIdentifiers\": [\n      978358865\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"yahboom-tinybitv13\",\n    \"name\": \"Tiny-Bit\",\n    \"company\": \"Yahboom\",\n    \"description\": \"Tiny:bit is a robotic car for the micro:bit education market. It is compact, easy to assemble, and easy to move in tight spaces. The Tiny:bit smart car is based on the micro:bit development board design and uses the online code programming of MakeCode Editor. Rich sensor applications allow Tiny:bit for easy interaction. The Tiny:bit smart car has a set of alligator clips on the rear that can be creative and expand.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"yahboom-tinybitv13\",\n        \"slug\": \"pelikhan/Tiny-bitLib/tree/master/jacdac\"\n      }\n    ],\n    \"connector\": \"noConnector\",\n    \"link\": \"https://category.yahboom.net/products/tinybit\",\n    \"storeLink\": [\n      \"https://category.yahboom.net/products/tinybit\"\n    ],\n    \"services\": [\n      355063095,\n      369743088,\n      369743088,\n      309087410,\n      309087410,\n      337275786,\n      346888797\n    ],\n    \"productIdentifiers\": [\n      878674793\n    ],\n    \"version\": \"1.3\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"unexpected-maker-feathers2esp32s2v20\",\n    \"name\": \"FeatherS2 ESP32-S2\",\n    \"company\": \"Unexpected Maker\",\n    \"description\": \"The full-featured ESP32-S2 based development board in a Feather format from Unexpected Maker. The FeatherS2 is a power house, fully souped up with 16 MB of Flash memory (for firmware and file storage) and 8 MB of QSPI-based external PSRAM so you can have massive storage buffers.\",\n    \"repo\": \"https://github.com/microsoft/devicescript-esp32\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-esp32/blob/main/boards/esp32s2/feather_s2.board.json\",\n    \"connector\": \"qwiic\",\n    \"link\": \"https://feathers2.io/\",\n    \"storeLink\": [\n      \"https://unexpectedmaker.com/shop/feathers2-esp32-s2\"\n    ],\n    \"services\": [\n      413852154,\n      342028028,\n      341864092,\n      471386691,\n      343122531,\n      400333340\n    ],\n    \"productIdentifiers\": [\n      824637191\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"stmicroelectronics-bl475eiot01adevicescriptv00\",\n    \"name\": \"B-L475E-IOT01A DeviceScript\",\n    \"company\": \"STMicroelectronics\",\n    \"description\": \"B-L475E-IOT01A running Jacdac firmware accessing built-in sensors and DeviceScript. Built with AzureRTOS.\",\n    \"firmwareSource\": \"https://github.com/RLeclair/jacdac-azure-rtos/tree/master/STMicroelectronics/B-L475E-IOT01A\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://github.com/RLeclair/jacdac-azure-rtos/tree/master/STMicroelectronics/B-L475E-IOT01A\",\n    \"storeLink\": [\n      \"https://www.st.com/en/evaluation-tools/b-l475e-iot01a.html\"\n    ],\n    \"services\": [\n      337754823,\n      521405449,\n      505087730,\n      382210232,\n      504462570,\n      288680491\n    ],\n    \"productIdentifiers\": [\n      954528034\n    ],\n    \"version\": \"0.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"sparkfun-gamerbitv00\",\n    \"name\": \"gamer:bit\",\n    \"company\": \"Sparkfun\",\n    \"description\": \"The SparkFun gamer:bit is a fun-filled \\\"carrier\\\" board for the micro:bit that, when combined with the micro:bit, provides you with a fully functional game system. Designed in a similar form factor to the classic Nintendo NES controller, the gamer:bit is equipped with a four-direction \\\"D-pad\\\" on the left side of the board and two action buttons on the right side of the board. The two push buttons on the micro:bit in the center function as start and select.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"sparkfun-gamerbitv00\",\n        \"slug\": \"pelikhan/pxt-gamer-bit/tree/master/jacdac\"\n      }\n    ],\n    \"connector\": \"noConnector\",\n    \"link\": \"https://www.sparkfun.com/products/retired/14215\",\n    \"storeLink\": [\n      \"https://www.sparkfun.com/products/retired/14215\"\n    ],\n    \"services\": [\n      277836886\n    ],\n    \"productIdentifiers\": [\n      929407584\n    ],\n    \"version\": \"0.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"seeed-studio-grove16x2lcdv20\",\n    \"name\": \"Grove-16x2 LCD\",\n    \"company\": \"Seeed Studio\",\n    \"description\": \"Seeedstudio Grove - 16 x 2 LCD is a I2C LCD display. 16x2 means two lines and each line has 16 columns, 32 characters in total.\",\n    \"connector\": \"grove\",\n    \"link\": \"https://wiki.seeedstudio.com/Grove-16x2_LCD_Series/\",\n    \"storeLink\": [\n      \"https://www.seeedstudio.com/Grove-16-x-2-LCD-Black-on-Yellow.html\"\n    ],\n    \"services\": [\n      523748714\n    ],\n    \"productIdentifiers\": [\n      877317536\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"seeed-studio-relayv12\",\n    \"name\": \"Relay\",\n    \"company\": \"Seeed Studio\",\n    \"description\": \"The Grove-Relay module is a digital normally-open switch. Through it, you can control circuit of high voltage with low voltage, 3.3-5V on the controller. There is an indicator LED on the board, which will light up when the controlled terminals get closed.\",\n    \"connector\": \"grove\",\n    \"link\": \"https://wiki.seeedstudio.com/Grove-Relay/\",\n    \"storeLink\": [\n      \"https://www.seeedstudio.com/Grove-Relay.html\"\n    ],\n    \"services\": [\n      406840918\n    ],\n    \"productIdentifiers\": [\n      808015809\n    ],\n    \"version\": \"1.2\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"seeed-studio-soilmoisturev14\",\n    \"name\": \"Soil Moisture\",\n    \"company\": \"Seeed Studio\",\n    \"description\": \"Soil Moisture Sensor can measure soil moisture for plants. The soil moisture sensor consists of two probes that allow the current to pass through the soil and then obtain resistance values to measure soil moisture content.\",\n    \"hardwareDesign\": \"https://wiki.seeedstudio.com/Grove-Moisture_Sensor/\",\n    \"connector\": \"grove\",\n    \"link\": \"https://www.seeedstudio.com/Grove-Moisture-Sensor.html\",\n    \"storeLink\": [\n      \"https://www.seeedstudio.com/Grove-Moisture-Sensor.html\"\n    ],\n    \"services\": [\n      491430835\n    ],\n    \"productIdentifiers\": [\n      814817380\n    ],\n    \"version\": \"1.4\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"seeed-studio-ultrasonicdistancesensorv20\",\n    \"name\": \"Ultrasonic Distance Sensor\",\n    \"company\": \"Seeed Studio\",\n    \"description\": \"This Grove - Ultrasonic ranger is a non-contact distance measurement module which works at 40KHz. When we provide a pulse trigger signal with more than 10uS through signal pin, the Grove_Ultrasonic_Ranger will issue 8 cycles of 40kHz cycle level and detect the echo. The pulse width of the echo signal is proportional to the measured distance.\",\n    \"connector\": \"grove\",\n    \"link\": \"https://www.seeedstudio.com/Grove-Ultrasonic-Distance-Sensor.html\",\n    \"storeLink\": [\n      \"https://www.seeedstudio.com/Grove-Ultrasonic-Distance-Sensor.html\"\n    ],\n    \"services\": [\n      337275786\n    ],\n    \"productIdentifiers\": [\n      1068863164\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"seeed-studio-xiaoesp32c3v00\",\n    \"name\": \"XIAO ESP32C3\",\n    \"company\": \"Seeed Studio\",\n    \"description\": \"A tiny dev-board with ESP32-C3 from Seeed.\",\n    \"repo\": \"https://github.com/microsoft/devicescript-esp32\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-esp32/blob/main/boards/esp32c3/seeed_xiao_esp32c3.board.json\",\n    \"connector\": \"noConnector\",\n    \"storeLink\": [\n      \"https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html\"\n    ],\n    \"services\": [\n      413852154,\n      342028028,\n      341864092,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      1056926545\n    ],\n    \"version\": \"0.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"roger-wagner-makerbitv10\",\n    \"name\": \"MakerBit\",\n    \"company\": \"Roger Wagner\",\n    \"description\": \"The MakerBit board provides simple and efficient connections to the features of the BBC micro:bit. Easily and quickly add lights and touch sensors to school projects, models and art installations. There are enough connecting wires and LEDs for one project. The MakerBit can control a maximum of 12 LEDs and 12 touch sensors in any one project.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"roger-wagner-makerbitv10-motor\",\n        \"slug\": \"1010Technologies/pxt-makerbit-motor/jacdac\"\n      },\n      {\n        \"target\": \"microbit\",\n        \"name\": \"roger-wagner-makerbitv10-touch\",\n        \"slug\": \"1010Technologies/pxt-makerbit-touch/jacdac\"\n      },\n      {\n        \"target\": \"microbit\",\n        \"name\": \"roger-wagner-makerbitv10-lcd1602\",\n        \"slug\": \"1010Technologies/pxt-makerbit-lcd1602/jacdac\"\n      }\n    ],\n    \"connector\": \"grove\",\n    \"link\": \"https://makerbit.com/\",\n    \"storeLink\": [\n      \"https://makerbit.com/\"\n    ],\n    \"services\": [\n      385895640,\n      343122531,\n      523748714\n    ],\n    \"productIdentifiers\": [\n      1018020097\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"raspberry-pi-picov00\",\n    \"name\": \"Pico\",\n    \"company\": \"Raspberry Pi\",\n    \"description\": \"Raspberry Pi Pico is a low-cost, high-performance microcontroller board with flexible digital interfaces.\",\n    \"repo\": \"https://github.com/microsoft/devicescript-pico\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-pico/blob/main/boards/rp2040/pico.board.json\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html\",\n    \"storeLink\": [\n      \"https://www.raspberrypi.com/products/raspberry-pi-pico/\"\n    ],\n    \"productIdentifiers\": [\n      1064181516\n    ],\n    \"version\": \"0.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"raspberry-pi-picowv00\",\n    \"name\": \"Pico W\",\n    \"company\": \"Raspberry Pi\",\n    \"description\": \"Raspberry Pi Pico is a low-cost, high-performance microcontroller board with flexible digital interfaces. Raspberry Pi Pico W adds on-board single-band 2.4GHz wireless interfaces (802.11n) using the Infineon CYW43439 while retaining the Pico form factor. \",\n    \"repo\": \"https://github.com/microsoft/devicescript-pico\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-pico/blob/main/boards/rp2040w/pico_w.board.json\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html\",\n    \"storeLink\": [\n      \"https://www.raspberrypi.com/products/raspberry-pi-pico/\"\n    ],\n    \"services\": [\n      413852154,\n      342028028,\n      341864092,\n      471386691,\n      343122531,\n      400333340\n    ],\n    \"productIdentifiers\": [\n      978399748\n    ],\n    \"version\": \"0.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"microbit-educational-foundation-microbitv2\",\n    \"name\": \"micro:bit V2\",\n    \"company\": \"microbit Educational Foundation\",\n    \"description\": \"The new micro:bit V2 has a built-in microphone and speaker to allow sound-sensing and sound-making without the need to attach another device. It also introduces capacitive touch sensing, a power-saving mode and more computing power for the classroom.\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://microsoft.github.io/jacdac-docs/clients/makecode/microbit-jukebox/\",\n    \"storeLink\": [\n      \"https://www.microbit.org/buy/\"\n    ],\n    \"productIdentifiers\": [\n      854992189,\n      888455511,\n      1035770297,\n      1049819173\n    ],\n    \"transport\": {\n      \"type\": \"usb\",\n      \"requestDescription\": \"BBC micro:bit CMSIS-DAP\"\n    },\n    \"firmwares\": [\n      {\n        \"name\": \"Micro:bit Jukebox\",\n        \"url\": \"https://github.com/microsoft/pxt-jacdac/releases/latest/download/microbit-jukebox.hex\",\n        \"productIdentifier\": 888455511\n      },\n      {\n        \"name\": \"Micro:bit MicroCode\",\n        \"url\": \"https://microsoft.github.io/microcode/assets/firmware.hex\",\n        \"productIdentifier\": 1049819173\n      }\n    ],\n    \"bootloader\": {\n      \"driveName\": \"MICROBIT\",\n      \"firmwareFormat\": \"hex\"\n    },\n    \"status\": \"stable\",\n    \"relatedDevices\": [\n      \"kittenbot-jacdaptorformicrobitv2v10\"\n    ]\n  },\n  {\n    \"id\": \"maker-go-esp32c3superminiv10\",\n    \"name\": \"ESP32-C3 SuperMini\",\n    \"company\": \"Maker go\",\n    \"description\": \"A tiny ESP32-C3 development board.\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://usa.banggood.com/ESP32-C3-Development-Board-ESP32-SuperMini-WiFi-Bluetooth-Mini-Module-p-1997449.html\",\n    \"storeLink\": [\n      \"https://usa.banggood.com/ESP32-C3-Development-Board-ESP32-SuperMini-WiFi-Bluetooth-Mini-Module-p-1997449.html\"\n    ],\n    \"services\": [\n      288680491,\n      413852154\n    ],\n    \"productIdentifiers\": [\n      1024631722\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kittenbot-accelerometerv10\",\n    \"name\": \"Accelerometer\",\n    \"company\": \"KittenBot\",\n    \"description\": \"Accelerometer sensors are devices used to measure acceleration or motion.\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"services\": [\n      521405449\n    ],\n    \"productIdentifiers\": [\n      1031216668\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"kittenbot-agilewhiskerkeyboardelite60v10\",\n    \"name\": \"AgileWhisker Keyboard Elite60\",\n    \"company\": \"KittenBot\",\n    \"description\": \"This is the first mechanical keyboard in the Jacdac system, featuring a 60% layout, a rotary encoder, RGB LED lighting, and two Jacdac interfaces. It is powered by the RP2040 microcontroller.\",\n    \"connector\": \"edgeHighCurrentProvider\",\n    \"link\": \"https://w.kittenbot.net/\",\n    \"storeLink\": [\n      \"https://w.kittenbot.net/\"\n    ],\n    \"services\": [\n      309264608,\n      414210922,\n      437330261,\n      411425820,\n      284830153\n    ],\n    \"productIdentifiers\": [\n      878230570\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kittenbot-agilewhiskernumerickeypadv10\",\n    \"name\": \"AgileWhisker Numeric Keypad\",\n    \"company\": \"KittenBot\",\n    \"description\": \"This is the first numeric keypad in the Jacdac system, featuring an OLED screen, a rotary encoder, RGB LED lighting, and one Jacdac interface. It is powered by the RP2040 microcontroller.\",\n    \"connector\": \"edgeLowCurrentProviderConsumer\",\n    \"link\": \"https://w.kittenbot.net/\",\n    \"storeLink\": [\n      \"https://w.kittenbot.net/\"\n    ],\n    \"services\": [\n      309264608,\n      414210922,\n      437330261,\n      411425820,\n      284830153,\n      523748714\n    ],\n    \"productIdentifiers\": [\n      988197346\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kittenbot-awagentv10\",\n    \"name\": \"AW Agent\",\n    \"company\": \"KittenBot\",\n    \"description\": \"AW Agent, short for AgileWhisker Agent, is a small software for PC computers that is designed to be used in conjunction with AgileWhisker Keyboard Elite60 and other keyboards. It is an open-source software. It functions as a virtual hardware within the jacdac ecosystem. It incorporates MQTT services to retrieve hardware information from the computer and trigger computer events, among other functionalities.\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://w.kittenbot.net/\",\n    \"storeLink\": [\n      \"https://w.kittenbot.net/\"\n    ],\n    \"services\": [\n      457422603,\n      289210942\n    ],\n    \"productIdentifiers\": [\n      1020385313\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kittenbot-duckybotkitv10\",\n    \"name\": \"DuckyBot Kit\",\n    \"company\": \"KittenBot\",\n    \"description\": \" Dive into the enchanting world of robotics with DuckyBot, a delightful cardboard robot shaped like a cheerful yellow duck. Engineered around the groundbreaking Jacdac Elite Module Suite, DuckyBot offers young learners a quirky and entertaining gateway into the vast realm of electronics and robotics, integrating seamlessly with Microbit and Makecode platforms.\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/duckybot-crafting-coding-and-quacking-with-robotics\"\n    ],\n    \"tags\": [\n      \"kit\",\n      \"microbit\"\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"devices\": [\n      \"kittenbot-powerv10\",\n      \"kittenbot-hapticoutputv10\",\n      \"kittenbot-accelerometerv10\",\n      \"kittenbot-relayv10\",\n      \"kittenbot-envsensorv10\",\n      \"kittenbot-rgbstripv10\",\n      \"kittenbot-servov10\",\n      \"kittenbot-ultrasonicsensorv10\",\n      \"kittenbot-hubv10\",\n      \"kittenbot-jacdaptorformicrobitv2v10\",\n      \"microbit-educational-foundation-microbitv2\"\n    ],\n    \"relatedDevices\": [\n      \"microbit-educational-foundation-microbitv2\"\n    ]\n  },\n  {\n    \"id\": \"kittenbot-envsensorv10\",\n    \"name\": \"Env Sensor\",\n    \"company\": \"KittenBot\",\n    \"description\": \"Env Sensor is a device used to measure both the temperature and humidity of the surrounding environment.\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"services\": [\n      337754823,\n      382210232\n    ],\n    \"productIdentifiers\": [\n      998683858\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"kittenbot-grapebitv10\",\n    \"name\": \"Grape:bit\",\n    \"company\": \"KittenBot\",\n    \"description\": \"Grape:bit is a programming main control board mainly for the second to third grade information technology learning and institutional teaching. Its core is the ESP32, which has the characteristics of high performance, wireless communication, and graphical programming.\",\n    \"repo\": \"https://github.com/KittenBot/devicescript-esp32/tree/grapebit\",\n    \"firmwareSource\": \"https://github.com/KittenBot/devicescript-esp32/blob/grapebit/boards/esp32c3/kitten_grapebit_c3.board.json\",\n    \"connector\": \"edgeLowCurrentProviderConsumer\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/kittenbot-grapebit-20-pack\"\n    ],\n    \"services\": [\n      288680491,\n      521405449,\n      343122531,\n      458731991,\n      282614377,\n      385895640\n    ],\n    \"productIdentifiers\": [\n      952937357\n    ],\n    \"transport\": {\n      \"type\": \"serial\",\n      \"vendorId\": 4292\n    },\n    \"firmwares\": [\n      {\n        \"name\": \"Grape:bit\",\n        \"url\": \"https://github.com/KittenBot/devicescript-esp32/releases/latest\",\n        \"productIdentifier\": 952937357\n      }\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kittenbot-hapticoutputv10\",\n    \"name\": \"Haptic Output\",\n    \"company\": \"KittenBot\",\n    \"description\": \"The Haptic Output module is essentially a vibration motor that can be used to provide haptic feedback in electronic devices.\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"services\": [\n      406832290\n    ],\n    \"productIdentifiers\": [\n      837852806\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"kittenbot-hubv10\",\n    \"name\": \"Hub\",\n    \"company\": \"KittenBot\",\n    \"description\": \"A passthrough cable hub.\",\n    \"connector\": \"edgePassive\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"tags\": [\n      \"hub\"\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kittenbot-jacdacdeveloperstoolelectronicmodulekitbv10\",\n    \"name\": \"Jacdac Developer's-tool Electronic module Kit B\",\n    \"company\": \"KittenBot\",\n    \"description\": \"Dive deep into the forefront of electronic interfacing with the Jacdac Elite Module Suite. Built on the bedrock of Microsoft's avant-garde Jacdac protocol, this suite aggregates an array of meticulously crafted modules, setting the gold standard for next-gen electronic projects.\\n\\nIt Includes:\\n\\nJacdac-Power\\tX1\\nJacdac-Haptic Output\\tX1\\nJacdac-Accelerometer\\tX1\\nJacdac-Relay\\tX1\\nJacdac-Env Sensor\\tX1\\nJacdac-RGB Strip\\tX1\\nJacdac-Servo\\tX1\\nJacdac-Ultrasonic\\tX1\\nJacdac-Hub_B\\tX1\\nJacdac Cable  10 cm\\tX2\\nJacdac Cable 35 cm\\tX2\\nJacdac Cable  100 cm\\tX1\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"tags\": [\n      \"kit\"\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"devices\": [\n      \"kittenbot-powerv10\",\n      \"kittenbot-hapticoutputv10\",\n      \"kittenbot-accelerometerv10\",\n      \"kittenbot-relayv10\",\n      \"kittenbot-envsensorv10\",\n      \"kittenbot-rgbstripv10\",\n      \"kittenbot-servov10\",\n      \"kittenbot-ultrasonicsensorv10\",\n      \"kittenbot-hubv10\"\n    ],\n    \"relatedDevices\": [\n      \"kittenbot-jacdacstarterkitawithjacdaptorformicrobitv2v10\",\n      \"kittenbot-brainrp2040v10\"\n    ]\n  },\n  {\n    \"id\": \"kittenbot-jacdacstarterkitawithjacdaptorformicrobitv2v10\",\n    \"name\": \"Jacdac Starter Kit A with Jacdaptor for micro:bit V2\",\n    \"company\": \"KittenBot\",\n    \"description\": \"A kit of Jacdac modules.\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"tags\": [\n      \"kit\",\n      \"microbit\"\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"devices\": [\n      \"kittenbot-keycapbuttonv10\",\n      \"kittenbot-lightsensorv10\",\n      \"kittenbot-magnetsensorv10\",\n      \"kittenbot-rotarybuttonv10\",\n      \"kittenbot-sliderv10\",\n      \"kittenbot-rgbringv10\",\n      \"kittenbot-hubv10\",\n      \"kittenbot-jacdaptorformicrobitv2v10\"\n    ],\n    \"relatedDevices\": [\n      \"microbit-educational-foundation-microbitv2\",\n      \"kittenbot-jacdacdeveloperstoolelectronicmodulekitbv10\",\n      \"kittenbot-brainrp2040v10\"\n    ],\n    \"requiredDevices\": [\n      \"microbit-educational-foundation-microbitv2\"\n    ],\n    \"order\": 1\n  },\n  {\n    \"id\": \"kittenbot-jacdaptorformicrobitv2v10\",\n    \"name\": \"Jacdaptor for micro:bit V2\",\n    \"company\": \"KittenBot\",\n    \"connector\": \"edgeLowCurrentProviderConsumer\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"tags\": [\n      \"adapter\",\n      \"microbit\"\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"relatedDevices\": [\n      \"microbit-educational-foundation-microbitv2\"\n    ],\n    \"requiredDevices\": [\n      \"microbit-educational-foundation-microbitv2\"\n    ],\n    \"shape\": \"ec30_1x7_r7\"\n  },\n  {\n    \"id\": \"kittenbot-keycapbuttonv10\",\n    \"name\": \"Keycap Button\",\n    \"company\": \"KittenBot\",\n    \"description\": \"A keycap keyboard button.\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      926152985\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_3x2_lr\"\n  },\n  {\n    \"id\": \"kittenbot-lightsensorv10\",\n    \"name\": \"Light Sensor\",\n    \"company\": \"KittenBot\",\n    \"description\": \"A light level sensor.\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"services\": [\n      400333340\n    ],\n    \"productIdentifiers\": [\n      973683863,\n      1017391393\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"kittenbot-magnetsensorv10\",\n    \"name\": \"Magnet Sensor\",\n    \"company\": \"KittenBot\",\n    \"description\": \"A magnetic field sensor.\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"services\": [\n      318642191\n    ],\n    \"productIdentifiers\": [\n      881631743,\n      1018441315\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"kittenbot-nanoscript2040v10\",\n    \"name\": \"NanoScript 2040\",\n    \"company\": \"KittenBot\",\n    \"description\": \"Elevate your embedded projects with our cutting-edge development board, powered by Raspberry Pi's RP2040 and tailored for DeviceScript. Experience the unmatched synergy of TypeScript in the realm of microcontroller programming, where precision, efficiency, and modern development practices converge.\",\n    \"connector\": \"edgeLowCurrentProviderConsumer\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/devicescript-enhanced-development-board-with-rp2040\"\n    ],\n    \"services\": [\n      411425820,\n      414210922,\n      524302175\n    ],\n    \"productIdentifiers\": [\n      935525573\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_3x2_r\"\n  },\n  {\n    \"id\": \"kittenbot-powerv10\",\n    \"name\": \"Power\",\n    \"company\": \"KittenBot\",\n    \"description\": \"Power module is used to supply high-current JACDAC modules such as servo modules.It can also be used to supply power to the entire JACDAC electronic system.It has overcurrent protection and a maximum output current of 1A.\",\n    \"connector\": \"edgeHighCurrentProvider\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"services\": [\n      530893146\n    ],\n    \"productIdentifiers\": [\n      1015787249\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x4_l2\"\n  },\n  {\n    \"id\": \"kittenbot-relayv10\",\n    \"name\": \"Relay\",\n    \"company\": \"KittenBot\",\n    \"description\": \"This relay module is designed for low voltage and low current applications. It's recommended to use a voltage of 5V and a current no greater than 1A.\\nWhen using a relay module, it's important to be aware of electrical safety. It's recommended that you use the relay module under adult supervision, especially if you are not familiar with electrical circuits and how to use them safely.\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"services\": [\n      406840918\n    ],\n    \"productIdentifiers\": [\n      830413461\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x2_l\"\n  },\n  {\n    \"id\": \"kittenbot-rgbringv10\",\n    \"name\": \"RGB Ring\",\n    \"company\": \"KittenBot\",\n    \"description\": \"A ring of 8 colored programmable LEDs.\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"services\": [\n      369743088\n    ],\n    \"productIdentifiers\": [\n      924243657\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_3x3_l\"\n  },\n  {\n    \"id\": \"kittenbot-rgbstripv10\",\n    \"name\": \"RGB Strip\",\n    \"company\": \"KittenBot\",\n    \"description\": \"RGB Strip module is used to drive WS2812 LED strips. If you're driving a large number of LEDs, such as more than 10, it's recommended to provide additional power to the LED strip to ensure stable and reliable operation.\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"services\": [\n      309264608\n    ],\n    \"productIdentifiers\": [\n      1033734884\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x2_l\"\n  },\n  {\n    \"id\": \"kittenbot-rotarybuttonv10\",\n    \"name\": \"Rotary Button\",\n    \"company\": \"KittenBot\",\n    \"description\": \"A rotary encoder and button.\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"services\": [\n      284830153,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      984959466\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_3x2_lr\"\n  },\n  {\n    \"id\": \"kittenbot-servov10\",\n    \"name\": \"Servo\",\n    \"company\": \"KittenBot\",\n    \"description\": \"Servo module is used to drive standard 3-wire analog servos. It has two output channels and can operate in two different current output modes: 500mA and 1A.\",\n    \"connector\": \"edgeLowCurrentProvider\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"services\": [\n      318542083\n    ],\n    \"productIdentifiers\": [\n      918447378\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_2x3_l\"\n  },\n  {\n    \"id\": \"kittenbot-sliderv10\",\n    \"name\": \"Slider\",\n    \"company\": \"KittenBot\",\n    \"description\": \"A slider.\",\n    \"storeLink\": [\n      \"https://www.amazon.com/KittenBot-Jacdac-Starter-Jacdaptor-Micro/dp/B0BQ6WMBPZ\",\n      \"https://www.kittenbot.cc/collections/frontpage/products/kittenbot-jacdac-kit-for-micro-bit\",\n      \"https://www.aliexpress.com/item/3256804237465484.html\",\n      \"https://www.pakronics.com.au/products/kittenbot-jacdac-kit-a-with-adaptor-for-micro-bit-v2-pakr-a0410\"\n    ],\n    \"services\": [\n      522667846\n    ],\n    \"productIdentifiers\": [\n      1054684252\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_5x2_lr\"\n  },\n  {\n    \"id\": \"kittenbot-ultrasonicsensorv10\",\n    \"name\": \"Ultrasonic Sensor\",\n    \"company\": \"KittenBot\",\n    \"description\": \"The Ultrasonic Distance Measurement module has a detection range of approximately 3.5 meters.\",\n    \"storeLink\": [\n      \"https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing\"\n    ],\n    \"services\": [\n      337275786\n    ],\n    \"productIdentifiers\": [\n      983895657\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"shape\": \"ec30_5x2_lr\"\n  },\n  {\n    \"id\": \"kitronik-accessbitv11\",\n    \"name\": \"ACCESS:bit\",\n    \"company\": \"Kitronik\",\n    \"description\": \"The ACCESS:bit is a bolt-on/clip-on board for the BBC microbit that simulates an access barrier.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"kitronik-accessbitv11\",\n        \"slug\": \"pelikhan/pxt-kitronik-accessbit/jacdac\"\n      }\n    ],\n    \"connector\": \"noConnector\",\n    \"link\": \"https://kitronik.co.uk/products/5646-accessbit-for-bbc-microbit\",\n    \"storeLink\": [\n      \"https://kitronik.co.uk/products/5646-accessbit-for-bbc-microbit\"\n    ],\n    \"services\": [\n      318542083\n    ],\n    \"productIdentifiers\": [\n      1053651806\n    ],\n    \"version\": \"1.1\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kitronik-airqualityboardv10\",\n    \"name\": \"Air Quality Board\",\n    \"company\": \"Kitronik\",\n    \"description\": \"The Kitronik Air Quality Board provides a complete air monitoring and reporting solution for the BBC micro:bit . The wealth of onboard sensors and connection points allow you to collect extensive air quality data that can be stored in onboard memory and displayed on the OLED screen or transferred to a computer for analysis.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"kitronik-airqualityboardv10\",\n        \"slug\": \"pelikhan/pxt-kitronik-air-quality/jacdac/\"\n      }\n    ],\n    \"connector\": \"edgeIndependent\",\n    \"link\": \"https://kitronik.co.uk/products/5674-kitronik-air-quality-board-for-bbc-micro-bit\",\n    \"storeLink\": [\n      \"https://kitronik.co.uk/products/5674-kitronik-air-quality-board-for-bbc-micro-bit\"\n    ],\n    \"services\": [\n      337754823,\n      504462570,\n      382210232,\n      379362758,\n      445323816,\n      523748714\n    ],\n    \"productIdentifiers\": [\n      854008423\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kitronik-gamezip64v12\",\n    \"name\": \"Game Zip 64\",\n    \"company\": \"Kitronik\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"kitronik-gamezip64v12\",\n        \"slug\": \"pelikhan/pxt-kitronik-zip-64/jacdac\"\n      }\n    ],\n    \"connector\": \"noConnector\",\n    \"link\": \"https://kitronik.co.uk/products/5626-game-zip-64-for-the-bbc-microbit\",\n    \"storeLink\": [\n      \"https://kitronik.co.uk/products/5626-game-zip-64-for-the-bbc-microbit\"\n    ],\n    \"services\": [\n      277836886,\n      369743088,\n      406832290\n    ],\n    \"productIdentifiers\": [\n      888103518\n    ],\n    \"version\": \"1.2\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kitronik-servolitev10\",\n    \"name\": \"SERVO:LITE\",\n    \"company\": \"Kitronik\",\n    \"description\": \"The Servo:Lite board for the BBC micro:bit is a simple board that allows you to easily connect and control low power servo motors (servo's must be capable of operating at 3.3V) using the BBC micro:bit. It is connected to the micro:bit using five bolts. Connect two servos in standard configuration and it can drive up to 3 servos if the addressable 'ZIP' LEDs aren\u2019t needed.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"kitronik-servolitev10\",\n        \"slug\": \"pelikhan/pxt-kitronik-servo-lite/jacdac\"\n      }\n    ],\n    \"connector\": \"noConnector\",\n    \"link\": \"https://kitronik.co.uk/products/5623-servolite-board-for-move-mini\",\n    \"storeLink\": [\n      \"https://kitronik.co.uk/products/5623-servolite-board-for-move-mini\"\n    ],\n    \"services\": [\n      369743088,\n      318542083,\n      318542083\n    ],\n    \"productIdentifiers\": [\n      995306847\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"kitronik-stopbitv10\",\n    \"name\": \"STOP:bit\",\n    \"company\": \"Kitronik\",\n    \"description\": \"The STOP:bit for the BBC micro:bit is the ultimate upgrade for traffic light/pedestrian crossing projects.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"kitronik-stopbit-jacdac\",\n        \"slug\": \"pelikhan/pxt-kitronik-stopbit/jacdac\"\n      }\n    ],\n    \"connector\": \"noConnector\",\n    \"link\": \"https://kitronik.co.uk/products/5642-stopbit-traffic-light-for-bbc-microbit\",\n    \"storeLink\": [\n      \"https://kitronik.co.uk/products/5642-stopbit-traffic-light-for-bbc-microbit\"\n    ],\n    \"services\": [\n      365137307\n    ],\n    \"productIdentifiers\": [\n      1058995861\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"keystudio-relaybreakoutboardv10\",\n    \"name\": \"Relay Breakout Board\",\n    \"company\": \"Keystudio\",\n    \"description\": \"Keyestudio relay breakout board for micro:bit has integrated a 4-way 5V relay module, fully compatible with micro:bit development board.\\nIt can work only need to insert micro:bit into keyestudio relay shield, then input DC5V voltage on the relay VIN/GND port, pretty simple and convenient.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"keystudio-relaybreakoutboardv10\",\n        \"slug\": \"pelikhan/keystudio-relay-breakout-jacdac\"\n      }\n    ],\n    \"connector\": \"noConnector\",\n    \"link\": \"https://www.keyestudio.com/products/keyestudio-relay-breakout-board-for-bbc-microbit\",\n    \"storeLink\": [\n      \"https://www.keyestudio.com/products/keyestudio-relay-breakout-board-for-bbc-microbit\"\n    ],\n    \"services\": [\n      406840918,\n      406840918,\n      406840918,\n      406840918\n    ],\n    \"productIdentifiers\": [\n      901245225\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"forward-education-breakoutboardrelaypumpv10\",\n    \"name\": \"Breakout Board + Relay + Pump\",\n    \"company\": \"Forward Education\",\n    \"description\": \"A micro:bit carrier board\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"forward-education-breakoutboardrelaypumpv10\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/fwd-breakout\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"services\": [\n      406840918,\n      318542083\n    ],\n    \"productIdentifiers\": [\n      873600795,\n      943529908\n    ],\n    \"tags\": [\n      \"adapter\",\n      \"microbit\"\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"forward-education-climateactionkitv10\",\n    \"name\": \"Climate Action Kit\",\n    \"company\": \"Forward Education\",\n    \"description\": \"Purpose-driven STEM education for a brighter future. \u00A0Explore climate action with our STEM kit and online lessons.\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"pxt-fwd-edu\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"tags\": [\n      \"kit\",\n      \"microbit\"\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\",\n    \"devices\": [\n      \"forward-education-linesensorv10\",\n      \"forward-education-breakoutboardrelaypumpv10\",\n      \"forward-education-ledlightsv10\",\n      \"forward-education-touchsensorv10\",\n      \"forward-education-dialbuttonv10\",\n      \"forward-education-sonarsensorv10\",\n      \"forward-education-solarsensorv10\",\n      \"forward-education-moisturesensorv10\"\n    ],\n    \"relatedDevices\": [\n      \"microbit-educational-foundation-microbitv2\"\n    ],\n    \"requiredDevices\": [\n      \"forward-education-breakoutboardrelaypumpv10\",\n      \"microbit-educational-foundation-microbitv2\"\n    ]\n  },\n  {\n    \"id\": \"forward-education-dialbuttonv10\",\n    \"name\": \"Dial Button\",\n    \"company\": \"Forward Education\",\n    \"description\": \"Dial Button is a rotary encoder and button compatible with the jacdac framework and part of the Climate Action Kit by Forward Education\\n\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"forward-education-dialbuttonv10\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/fwd-dial\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"services\": [\n      343122531,\n      284830153\n    ],\n    \"productIdentifiers\": [\n      932148851\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"forward-education-ledlightsv10\",\n    \"name\": \"LED Lights\",\n    \"company\": \"Forward Education\",\n    \"description\": \"LED Lights is a ws2812 LED ring compatible with the jacdac framework and part of the Climate Action Kit by Forward Education\\n\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"fwd-edu-led\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/fwd-led\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"services\": [\n      369743088\n    ],\n    \"productIdentifiers\": [\n      1054009247\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"forward-education-linesensorv10\",\n    \"name\": \"Line Sensor\",\n    \"company\": \"Forward Education\",\n    \"description\": \"Line Sensor is a multi-reflected light sensor compatible with the jacdac framework and part of the Climate Action Kit by Forward Education\\n\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"fwd-edu-line\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/fwd-line\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"services\": [\n      309087410,\n      309087410,\n      309087410\n    ],\n    \"productIdentifiers\": [\n      1000568338\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"forward-education-moisturesensorv10\",\n    \"name\": \"Moisture Sensor\",\n    \"company\": \"Forward Education\",\n    \"description\": \"Moisture Sensor is a capacitive soil moisture sensor compatible with the jacdac framework and part of the Climate Action Kit by Forward Education\\n\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"fwd-edu-moisture\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/fwd-moisture\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"services\": [\n      491430835\n    ],\n    \"productIdentifiers\": [\n      870361737\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"forward-education-solarsensorv10\",\n    \"name\": \"Solar Sensor\",\n    \"company\": \"Forward Education\",\n    \"description\": \"Solar Sensor is a photoresistor sensor compatible with the jacdac framework and part of the Climate Action Kit by Forward Education\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"fwd-edu-solar\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/fwd-solar\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"services\": [\n      400333340\n    ],\n    \"productIdentifiers\": [\n      1005257879\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"forward-education-sonarsensorv10\",\n    \"name\": \"Sonar Sensor\",\n    \"company\": \"Forward Education\",\n    \"description\": \"Sonar Sensor is an ultrasonic/radar sensor compatible with the jacdac framework and part of the Climate Action Kit by Forward Education\\n\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"fwd-edu-sonar\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/fwd-sonar\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"services\": [\n      337275786\n    ],\n    \"productIdentifiers\": [\n      926591985\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"forward-education-touchsensorv10\",\n    \"name\": \"Touch Sensor\",\n    \"company\": \"Forward Education\",\n    \"description\": \"Touch Sensor is a capacitive touch sensor compatible with the jacdac framework and part of the Climate Action Kit by Forward Education\\n\",\n    \"makeCodeRepo\": [\n      {\n        \"target\": \"microbit\",\n        \"name\": \"fwd-edu-touch\",\n        \"slug\": \"climate-action-kits/pxt-fwd-edu/fwd-touch\"\n      }\n    ],\n    \"link\": \"https://forwardedu.com\",\n    \"storeLink\": [\n      \"https://forwardedu.com\"\n    ],\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      1064434129\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"espressif-esp32c3rustdevkitv12a\",\n    \"name\": \"ESP32-C3-RUST-DevKit\",\n    \"company\": \"Espressif\",\n    \"description\": \"This board is based on the ESP32-C3, and includes sensors, LEDs, buttons, a battery charger, and USB type-C connector.\",\n    \"repo\": \"https://github.com/microsoft/devicescript-esp32\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-esp32/blob/main/boards/esp32c3/esp32c3_rust_devkit.board.json\",\n    \"hardwareDesign\": \"https://github.com/esp-rs/esp-rust-board\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://github.com/esp-rs/esp-rust-board\",\n    \"storeLink\": [\n      \"https://github.com/esp-rs/esp-rust-board\"\n    ],\n    \"services\": [\n      413852154,\n      342028028,\n      341864092,\n      337754823,\n      382210232,\n      471386691,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      871537753\n    ],\n    \"version\": \"1.2a\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"espressif-esp32devkitcdevicescriptv40\",\n    \"name\": \"ESP32-DevKitC DeviceScript\",\n    \"company\": \"Espressif\",\n    \"description\": \"This will also work with NodeMCU etc.\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-esp32\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-devkitc.html\",\n    \"storeLink\": [\n      \"https://www.espressif.com/en/products/devkits/esp32-devkitc\"\n    ],\n    \"services\": [\n      341864092,\n      342028028,\n      413852154,\n      288680491\n    ],\n    \"productIdentifiers\": [\n      1011907077\n    ],\n    \"transport\": {\n      \"type\": \"serial\",\n      \"vendorId\": 4292\n    },\n    \"firmwares\": [\n      {\n        \"name\": \"DeviceScript + Cloud Connector\",\n        \"url\": \"https://github.com/microsoft/devicescript-esp32/releases/latest\",\n        \"productIdentifier\": 1011907077\n      }\n    ],\n    \"version\": \"4.0\",\n    \"bootloader\": {\n      \"sequence\": \"boot-power\",\n      \"firmwareFormat\": \"bin\",\n      \"firmwareUploader\": \"https://adafruit.github.io/Adafruit_WebSerial_ESPTool/\"\n    },\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"calliope-ggmbh-calliopeminiv3v30\",\n    \"name\": \"Calliope mini V3\",\n    \"company\": \"Calliope gGmbH\",\n    \"description\": \"Calliope mini is an easy-to-program microcontroller that has quite a few internal sensors and, in addition to a pin header and two Grove connectors it also features two JacDac connectors to connect sensors and actuators directly to the board.\",\n    \"connector\": \"edgeLowCurrentProvider\",\n    \"link\": \"https://calliope.cc\",\n    \"storeLink\": [\n      \"https://shop.calliope.cc\"\n    ],\n    \"productIdentifiers\": [\n      860332754\n    ],\n    \"transport\": {\n      \"type\": \"usb\",\n      \"requestDescription\": \"Calliope mini V3 CMSIS-DAP\"\n    },\n    \"version\": \"3.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"calliope-ggmbh-calliopescd40v10\",\n    \"name\": \"Calliope SCD40\",\n    \"company\": \"Calliope gGmbH\",\n    \"description\": \"The SCD40 is a miniature CO2 sensor from Sensirion. This sensor builds on the photoacoustic NDIR sensing principle. It provides On-chip signal \\ncompensation with the build-in humidity and temperature sensor.\",\n    \"connector\": \"grove\",\n    \"link\": \"https://shop.calliope.cc/en/products/scd40-calliope-mini-co2-sensor\",\n    \"storeLink\": [\n      \"https://shop.calliope.cc/en/products/scd40-calliope-mini-co2-sensor\"\n    ],\n    \"services\": [\n      379362758,\n      382210232,\n      337754823\n    ],\n    \"productIdentifiers\": [\n      895527115\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"adafruit-qtpyesp32c3wifidevboardv10\",\n    \"name\": \"QT Py ESP32-C3 WiFi Dev Board\",\n    \"company\": \"Adafruit\",\n    \"description\": \"The ESP32-C3 integrates a rich set of peripherals, ranging from UART, I2C, I2S, remote control peripheral, LED PWM controller, general DMA controller, TWAI controller, USB Serial/JTAG controller, temperature sensor, and ADC. It also includes SPI, Dual SPI, and Quad SPI interfaces.\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-esp32\",\n    \"connector\": \"qwiic\",\n    \"link\": \"https://www.adafruit.com/product/5405\",\n    \"storeLink\": [\n      \"https://www.adafruit.com/product/5405\"\n    ],\n    \"services\": [\n      341864092,\n      342028028,\n      413852154,\n      288680491\n    ],\n    \"productIdentifiers\": [\n      866451573,\n      915657739\n    ],\n    \"firmwares\": [\n      {\n        \"name\": \"DeviceScript + Cloud Connector\",\n        \"url\": \"https://github.com/microsoft/devicescript-esp32/releases/latest\",\n        \"productIdentifier\": 915657739\n      }\n    ],\n    \"version\": \"1.0\",\n    \"bootloader\": {\n      \"sequence\": \"boot-power\",\n      \"firmwareFormat\": \"bin\",\n      \"firmwareUploader\": \"https://adafruit.github.io/Adafruit_WebSerial_ESPTool/\"\n    },\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"01space-esp32c3fh4rgbv10\",\n    \"name\": \"ESP32-C3FH4-RGB\",\n    \"company\": \"01Space\",\n    \"description\": \"Small ESP32-C3 board with 5x5 LED color matrix\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://github.com/01Space/ESP32-C3FH4-RGB\",\n    \"storeLink\": [\n      \"https://usa.banggood.com/ESP32-C3-Development-Board-RISC-V-WiFi-Bluetooth-IoT-Development-Board-Compatible-with-Python-p-1914005.html?imageAb=2&akmClientCountry=America&a=1694552315.7453&akmClientCountry=America&cur_warehouse=CN\"\n    ],\n    \"services\": [\n      288680491,\n      369743088,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      982550620\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"stable\"\n  },\n  {\n    \"id\": \"seeed-studio-xiaoesp32c3withmsr218base218v46\",\n    \"name\": \"XIAO ESP32C3 with MSR218 base\",\n    \"company\": \"Seeed Studio\",\n    \"description\": \"XIAO ESP32C3 + Prototype Carrier board for Xiao, Jacdac, Grove, Qwiic, Stemma QT, Analog.\",\n    \"repo\": \"https://github.com/microsoft/devicescript-esp32\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-esp32/blob/main/boards/esp32c3/seeed_xiao_esp32c3.board.json\",\n    \"connector\": \"edgeHighCurrentProvider\",\n    \"services\": [\n      282614377,\n      413852154,\n      342028028,\n      341864092,\n      471386691\n    ],\n    \"productIdentifiers\": [\n      917915687\n    ],\n    \"version\": \"4.6\",\n    \"designIdentifier\": \"218\",\n    \"shape\": \"ec30_4x3_l2\"\n  },\n  {\n    \"id\": \"milador-jmpressuresensorv10\",\n    \"name\": \"JM Pressure Sensor v1.0\",\n    \"company\": \"Milador\",\n    \"description\": \"JM Pressure Sensor v1.0\",\n    \"repo\": \"https://github.com/milador/jacdac-milador-modules\",\n    \"firmwareSource\": \"https://github.com/milador/jacdac-milador-modules\",\n    \"hardwareDesign\": \"https://github.com/milador/Jacdac-Pressure-Sensor/tree/develop/Hardware/PCB\",\n    \"link\": \"https://github.com/milador/Jacdac-Pressure-Sensor/\",\n    \"services\": [\n      504462570,\n      337754823\n    ],\n    \"productIdentifiers\": [\n      962878031\n    ]\n  },\n  {\n    \"id\": \"milador-pressuresensorv11\",\n    \"name\": \"Pressure Sensor\",\n    \"company\": \"Milador\",\n    \"description\": \"A Jacdac Pressure Sensor Module based on LPS33HW Absolute digital Pressure Sensor.\",\n    \"repo\": \"https://github.com/milador/jacdac-milador-modules\",\n    \"hardwareDesign\": \"https://github.com/milador/Jacdac-Pressure-Sensor/tree/develop/Hardware/PCB\",\n    \"link\": \"https://github.com/milador/Jacdac-Pressure-Sensor\",\n    \"services\": [\n      504462570,\n      337754823\n    ],\n    \"productIdentifiers\": [\n      867414479\n    ],\n    \"version\": \"1.1\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-cableextender38v10\",\n    \"name\": \"CableExtender\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Cable extender\",\n    \"connector\": \"edgePassive\",\n    \"productIdentifiers\": [\n      928595161\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"38\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-cableextender38v11\",\n    \"name\": \"CableExtender\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Cable extender\",\n    \"hardwareDesign\": \"https://github.com/microsoft/jacdac-ddk/tree/main/electronics/altium/hub-designs/JacdacCableExtender%2038-1.1\",\n    \"connector\": \"edgePassive\",\n    \"productIdentifiers\": [\n      943041789\n    ],\n    \"version\": \"1.1\",\n    \"designIdentifier\": \"38\"\n  },\n  {\n    \"id\": \"microsoft-research-co2209v43\",\n    \"name\": \"CO2\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Measures real CO2 concentration using SCD40 sensor (plus temperature and humidity)\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      337754823,\n      382210232,\n      379362758\n    ],\n    \"productIdentifiers\": [\n      1008301288\n    ],\n    \"version\": \"4.3\",\n    \"designIdentifier\": \"209\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-developerrgb117v10\",\n    \"name\": \"Developer RGB\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Developer module with 10-pin header and RGB LED\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/developer-rgb-117/profile/developer-rgb-117-v1.0.c\",\n    \"hardwareDesign\": \"https://github.com/microsoft/jacdac-ddk/tree/main/electronics/altium/module-designs/JacdacDevRgbEc30%20117-1.0\",\n    \"services\": [\n      506480888\n    ],\n    \"productIdentifiers\": [\n      851267569\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"117\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-devicescriptsimulatorv10\",\n    \"name\": \"DeviceScript Simulator\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A virtual DeviceScript Manager simulator.\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript\",\n    \"connector\": \"noConnector\",\n    \"services\": [\n      358308672\n    ],\n    \"productIdentifiers\": [\n      1072018543,\n      288680491\n    ],\n    \"version\": \"1.0\"\n  },\n  {\n    \"id\": \"microsoft-research-hub114v10\",\n    \"name\": \"Hub\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Passive hub with 6 ports\",\n    \"hardwareDesign\": \"https://github.com/microsoft/jacdac-ddk/tree/main/electronics/altium/hub-designs/JacdacEc30Hub10x40%20114-1.0\",\n    \"connector\": \"edgePassive\",\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"114\",\n    \"shape\": \"ec30_2x4_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jacdacjoystick440344v03\",\n    \"name\": \"JacdacJoystick 44-0.3\",\n    \"company\": \"Microsoft Research\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-padauk/tree/main/jm-joystick-44-0.2\",\n    \"link\": \"https://github.com/microsoft/jacdac-padauk\",\n    \"services\": [\n      277836886\n    ],\n    \"productIdentifiers\": [\n      832285283\n    ],\n    \"version\": \"0.3\",\n    \"designIdentifier\": \"44\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-jacdacmicrobitshieldlp29v03\",\n    \"name\": \"JacDacMicroBitShieldLP\",\n    \"company\": \"Microsoft Research\",\n    \"connector\": \"edgeLowCurrentProvider\",\n    \"productIdentifiers\": [\n      1009620586\n    ],\n    \"version\": \"0.3\",\n    \"designIdentifier\": \"29\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-jacdacmotiondetection54v01\",\n    \"name\": \"JacdacMotionDetection \",\n    \"company\": \"Microsoft Research\",\n    \"link\": \"https://github.com/microsoft/jacdac-padauk\",\n    \"services\": [\n      293185353\n    ],\n    \"productIdentifiers\": [\n      1030407429\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"54\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-jacdacpinheaders45v02\",\n    \"name\": \"JacdacPinHeaders \",\n    \"company\": \"Microsoft Research\",\n    \"productIdentifiers\": [\n      970939382\n    ],\n    \"version\": \"0.2\",\n    \"designIdentifier\": \"45\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-jacdactouchtest35v10\",\n    \"name\": \"JacdacTouchTest\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      677752265\n    ],\n    \"productIdentifiers\": [\n      933677864\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"35\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-jacdactouchtestelectrode36v10\",\n    \"name\": \"JacdacTouchTestElectrode\",\n    \"company\": \"Microsoft Research\",\n    \"services\": [\n      677752265\n    ],\n    \"productIdentifiers\": [\n      1026187559\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"36\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-jm3slider85v40\",\n    \"name\": \"JM-3-Slider\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Triple slider\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v4.0/profile/slider-85.c\",\n    \"services\": [\n      522667846,\n      522667846,\n      522667846\n    ],\n    \"productIdentifiers\": [\n      905702802\n    ],\n    \"version\": \"4.0\",\n    \"designIdentifier\": \"85\",\n    \"shape\": \"ec30_6x3_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmaccelerometer30v10\",\n    \"name\": \"JM Accelerometer\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-accelerometer-30-1.0/profile/accelerometer.c\",\n    \"services\": [\n      521405449\n    ],\n    \"productIdentifiers\": [\n      952491663\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"30\"\n  },\n  {\n    \"id\": \"microsoft-research-jmaccessswitchinput34v13\",\n    \"name\": \"JM Access Switch Input\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-access-switch-input-34-1.3/profile/xac.c\",\n    \"services\": [\n      343122531,\n      522667846,\n      277836886\n    ],\n    \"productIdentifiers\": [\n      964964313\n    ],\n    \"version\": \"1.3\",\n    \"designIdentifier\": \"34\"\n  },\n  {\n    \"id\": \"microsoft-research-jmaccessswitchoutputv11\",\n    \"name\": \"JM Access Switch Output\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-access-switch-output-1.1/profile/relay.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      406840918\n    ],\n    \"productIdentifiers\": [\n      942325999\n    ],\n    \"version\": \"1.1\"\n  },\n  {\n    \"id\": \"microsoft-research-jmambientlight55v01\",\n    \"name\": \"JM Ambient Light\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-padauk/tree/main/jm-ambient-lightsensor-55-0.1\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      400333340\n    ],\n    \"productIdentifiers\": [\n      896864987\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"55\"\n  },\n  {\n    \"id\": \"microsoft-research-jmanalogjoystick44v02\",\n    \"name\": \"JM Analog Joystick\",\n    \"company\": \"Microsoft Research\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-padauk/tree/main/jm-joystick-44-0.2\",\n    \"link\": \"https://github.com/microsoft/jacdac-padauk\",\n    \"services\": [\n      277836886\n    ],\n    \"productIdentifiers\": [\n      976429228\n    ],\n    \"version\": \"0.2\",\n    \"designIdentifier\": \"44\"\n  },\n  {\n    \"id\": \"microsoft-research-jmbase86v41\",\n    \"name\": \"JM Base\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A breadboard like PCB to screw mount Jacdac modules.\",\n    \"connector\": \"edgePassive\",\n    \"tags\": [\n      \"ec30\",\n      \"hub\"\n    ],\n    \"version\": \"4.1\",\n    \"designIdentifier\": \"86\"\n  },\n  {\n    \"id\": \"microsoft-research-jmbrainesp3248v03\",\n    \"name\": \"JM Brain ESP32\",\n    \"company\": \"Microsoft Research\",\n    \"connector\": \"edgeHighCurrentProvider\",\n    \"services\": [\n      342028028,\n      341864092\n    ],\n    \"productIdentifiers\": [\n      917230668,\n      983264687,\n      1067560617,\n      1038170507,\n      816040071\n    ],\n    \"transport\": {\n      \"type\": \"serial\",\n      \"vendorId\": 12346\n    },\n    \"firmwares\": [\n      {\n        \"name\": \"Azure IoT Hub Uploader\",\n        \"url\": \"https://github.com/microsoft/pxt-jacdac/releases/latest/download/uploader-esp32s2.uf2\",\n        \"productIdentifier\": 1067560617\n      },\n      {\n        \"name\": \"DeviceScript Brain + Azure IoT Hub Cloud Adapter\",\n        \"url\": \"https://github.com/microsoft/devicescript-esp32/releases/latest/download/devicescript-esp32s2.uf2\",\n        \"productIdentifier\": 1038170507\n      },\n      {\n        \"name\": \"Azure IoT Hub Cloud Adapter\",\n        \"url\": \"https://github.com/microsoft/devicescript-esp32/releases/latest/download/devicescript-esp32s2-nojacs.uf2\",\n        \"productIdentifier\": 816040071\n      }\n    ],\n    \"version\": \"0.3\",\n    \"designIdentifier\": \"48\",\n    \"bootloader\": {\n      \"sequence\": \"reset-boot\",\n      \"driveName\": \"IOT-BOOT\",\n      \"firmwareFormat\": \"uf2\",\n      \"ledAnimation\": \"blue-glow\"\n    }\n  },\n  {\n    \"id\": \"microsoft-research-jmbrainf441v02\",\n    \"name\": \"JM Brain F4\",\n    \"company\": \"Microsoft Research\",\n    \"connector\": \"edgeHighCurrentProvider\",\n    \"link\": \"https://github.com/microsoft/pxt-jacdac\",\n    \"services\": [\n      414210922,\n      411425820\n    ],\n    \"productIdentifiers\": [\n      1003209864,\n      970267564,\n      819577746,\n      1009312972\n    ],\n    \"transport\": {\n      \"type\": \"usb\"\n    },\n    \"firmwares\": [\n      {\n        \"name\": \"HID Keyboard + Mouse\",\n        \"url\": \"https://github.com/microsoft/pxt-jacdac/releases/latest/download/hid-servers-f4.uf2\",\n        \"productIdentifier\": 819577746\n      },\n      {\n        \"name\": \"HID Joystick\",\n        \"url\": \"https://github.com/microsoft/pxt-jacdac/releases/latest/download/hid-joystick-f4.uf2\",\n        \"productIdentifier\": 1009312972\n      }\n    ],\n    \"version\": \"0.2\",\n    \"designIdentifier\": \"41\",\n    \"bootloader\": {\n      \"sequence\": \"reset\",\n      \"driveName\": \"JACDACF4\",\n      \"firmwareFormat\": \"uf2\",\n      \"ledAnimation\": \"blue-glow\"\n    }\n  },\n  {\n    \"id\": \"microsoft-research-jmbrainrp204059v01\",\n    \"name\": \"JM Brain RP2040\",\n    \"company\": \"Microsoft Research\",\n    \"connector\": \"edgeHighCurrentProvider\",\n    \"link\": \"https://github.com/microsoft/pxt-jacdac\",\n    \"services\": [\n      414210922,\n      411425820\n    ],\n    \"productIdentifiers\": [\n      884301483,\n      999933064,\n      883764657,\n      983850333\n    ],\n    \"transport\": {\n      \"type\": \"usb\"\n    },\n    \"tags\": [\n      \"adapter\"\n    ],\n    \"firmwares\": [\n      {\n        \"name\": \"HID Keyboard + Mouse\",\n        \"url\": \"https://github.com/microsoft/pxt-jacdac/releases/latest/download/hid-servers-rp2040.uf2\",\n        \"productIdentifier\": 883764657\n      },\n      {\n        \"name\": \"HID Joystick\",\n        \"url\": \"https://github.com/microsoft/pxt-jacdac/releases/latest/download/hid-joystick-rp2040.uf2\",\n        \"productIdentifier\": 983850333\n      }\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"59\",\n    \"bootloader\": {\n      \"sequence\": \"reset-boot\",\n      \"driveName\": \"RPI-RP2\",\n      \"firmwareFormat\": \"uf2\"\n    }\n  },\n  {\n    \"id\": \"microsoft-research-jmbutton10v13\",\n    \"name\": \"JM Button\",\n    \"company\": \"Microsoft Research\",\n    \"link\": \"https://github.com/microsoft/jacdac-padauk\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      896566497\n    ],\n    \"version\": \"1.3\",\n    \"designIdentifier\": \"10\"\n  },\n  {\n    \"id\": \"microsoft-research-jmbutton40v02\",\n    \"name\": \"JM Button\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-button-40-0.2/profile/button.c\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      946173966\n    ],\n    \"version\": \"0.2\",\n    \"designIdentifier\": \"40\"\n  },\n  {\n    \"id\": \"microsoft-research-jmbuttonterminal62v01\",\n    \"name\": \"JM Button Terminal\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      1047530059\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"62\"\n  },\n  {\n    \"id\": \"microsoft-research-jmbuzzer89\",\n    \"name\": \"JM-Buzzer\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v4.0/profile/buzzer-89.c\",\n    \"services\": [\n      458731991\n    ],\n    \"productIdentifiers\": [\n      1073013851\n    ],\n    \"designIdentifier\": \"89\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmcapacitivesoilmoisturev33\",\n    \"name\": \"JM Capacitive Soil Moisture\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM Capacitive Soil Moisture v3.3\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.3/profile/soilmoisture.c\",\n    \"services\": [\n      491430835\n    ],\n    \"productIdentifiers\": [\n      959462330\n    ],\n    \"version\": \"3.3\"\n  },\n  {\n    \"id\": \"microsoft-research-jmclickairquality4v32\",\n    \"name\": \"JM-Click Airquality4\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.2/profile/airquality4click.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      379362758,\n      312849815\n    ],\n    \"productIdentifiers\": [\n      878106432\n    ],\n    \"version\": \"3.2\"\n  },\n  {\n    \"id\": \"microsoft-research-jmclickcolorv32\",\n    \"name\": \"JM-Click Color\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.2/profile/colorclick.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      372299111\n    ],\n    \"productIdentifiers\": [\n      1020991645\n    ],\n    \"version\": \"3.2\"\n  },\n  {\n    \"id\": \"microsoft-research-jmco2tvoctemphumsgp30sht3066v37\",\n    \"name\": \"JM CO2/TVOC/Temp/Hum SGP30+SHT30\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM CO2/TVOC/Temp/Hum SGP30+SHT30 66 v3.7\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.6/profile/co2.c\",\n    \"services\": [\n      379362758,\n      312849815,\n      337754823,\n      382210232\n    ],\n    \"productIdentifiers\": [\n      912293656\n    ],\n    \"version\": \"3.7\",\n    \"designIdentifier\": \"66\"\n  },\n  {\n    \"id\": \"microsoft-research-jmdualkey69v37\",\n    \"name\": \"JM Dual Key\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM 2Key 69 v3.7\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.6/profile/key2.c\",\n    \"services\": [\n      343122531,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      958599316\n    ],\n    \"version\": \"3.7\",\n    \"designIdentifier\": \"69\"\n  },\n  {\n    \"id\": \"microsoft-research-jmenvironment204v42\",\n    \"name\": \"JM-Environment\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      337754823,\n      382210232,\n      379362758,\n      312849815\n    ],\n    \"productIdentifiers\": [\n      842012177\n    ],\n    \"version\": \"4.2\",\n    \"designIdentifier\": \"204\",\n    \"shape\": \"ec30_2x2_l\"\n  },\n  {\n    \"id\": \"microsoft-research-jmflexv10\",\n    \"name\": \"JM Flex\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-flex-sensor-1.0/profile/flex.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      524797638\n    ],\n    \"productIdentifiers\": [\n      840841542\n    ],\n    \"version\": \"1.0\"\n  },\n  {\n    \"id\": \"microsoft-research-jmgamepadv20\",\n    \"name\": \"JM GamePad\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Lets you convert a plastic d-pad controller, so that it can be connected to a Jacdac network.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0/profile/dpad.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      501915758\n    ],\n    \"productIdentifiers\": [\n      919754666\n    ],\n    \"version\": \"2.0\"\n  },\n  {\n    \"id\": \"microsoft-research-jmhallmagneticswitch81v40\",\n    \"name\": \"JM-Hall (magnetic switch)\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM-Hall (magnetic switch) 81 v4.0\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v4.0/profile/hall-81.c\",\n    \"services\": [\n      450008066\n    ],\n    \"productIdentifiers\": [\n      920333141\n    ],\n    \"version\": \"4.0\",\n    \"designIdentifier\": \"81\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmhapticmach101v10\",\n    \"name\": \"JM Haptic MACH-1.0\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM Haptic MACH-1.0\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-haptic-1.0/profile/haptic.c\",\n    \"services\": [\n      406832290\n    ],\n    \"productIdentifiers\": [\n      1022649261\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"1\"\n  },\n  {\n    \"id\": \"microsoft-research-jmhub39v03\",\n    \"name\": \"JM Hub\",\n    \"company\": \"Microsoft Research\",\n    \"productIdentifiers\": [\n      917230668\n    ],\n    \"version\": \"0.3\",\n    \"designIdentifier\": \"39\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-jmjacscriptstarbrainv33\",\n    \"name\": \"JM Jacscript Star-Brain\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A Jacscript brain\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/star-brain/profile/devicescript.c\",\n    \"services\": [\n      288680491\n    ],\n    \"productIdentifiers\": [\n      1025500463\n    ],\n    \"transport\": {\n      \"type\": \"serial\",\n      \"vendorId\": 6790\n    },\n    \"version\": \"3.3\"\n  },\n  {\n    \"id\": \"microsoft-research-jmkeyboardkey46v12\",\n    \"name\": \"JM Keyboard Key\",\n    \"company\": \"Microsoft Research\",\n    \"link\": \"https://github.com/microsoft/jacdac-padauk\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      876567534\n    ],\n    \"version\": \"1.2\",\n    \"designIdentifier\": \"46\"\n  },\n  {\n    \"id\": \"microsoft-research-jmkeyv3768v37\",\n    \"name\": \"JM Key v3.7\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM Key 68 v3.7\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.6/profile/key.c\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      948311172\n    ],\n    \"version\": \"3.7\",\n    \"designIdentifier\": \"68\"\n  },\n  {\n    \"id\": \"microsoft-research-jmmatrix87v40\",\n    \"name\": \"JM-Matrix\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"5x5 LED dot matrix\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v4.0matrix/profile/matrix-87.c\",\n    \"services\": [\n      286070091\n    ],\n    \"productIdentifiers\": [\n      896568761\n    ],\n    \"version\": \"4.0\",\n    \"designIdentifier\": \"87\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmmicrobitshieldlp29v05\",\n    \"name\": \"JM MicroBit Shield LP\",\n    \"company\": \"Microsoft Research\",\n    \"hardwareDesign\": \"https://github.com/microsoft/jacdac-ddk/tree/main/electronics/deprecated_form_factor/altium_deprecated/reference-designs/JacdacMicroBitShieldLP%2029-0.6\",\n    \"connector\": \"edgeLowCurrentProvider\",\n    \"productIdentifiers\": [\n      974031363\n    ],\n    \"tags\": [\n      \"adapter\",\n      \"microbit\"\n    ],\n    \"version\": \"0.5\",\n    \"designIdentifier\": \"29\"\n  },\n  {\n    \"id\": \"microsoft-research-jmmoduletester91v01\",\n    \"name\": \"JM Module Tester\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A module that controls the Jacdac bus voltage and measures the bus current consumption.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-module-tester-91-0.1/board.h\",\n    \"services\": [\n      524302175,\n      420661422,\n      372485145,\n      406840918,\n      506480888\n    ],\n    \"productIdentifiers\": [\n      1031963291\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"91\",\n    \"shape\": \"ec30_5x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmmotionpirv3874v38\",\n    \"name\": \"JM Motion PIR v3.8\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM Motion PIR 74 v3.8\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.3/profile/pir.c\",\n    \"link\": \"https://aka.ms/aaaaad\",\n    \"services\": [\n      293185353\n    ],\n    \"productIdentifiers\": [\n      1060186023\n    ],\n    \"version\": \"3.8\",\n    \"designIdentifier\": \"74\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmpinheader45v02\",\n    \"name\": \"JM Pin Header\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A regulated passive adapter from Jacdac to pin headers.\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"productIdentifiers\": [\n      994328823\n    ],\n    \"version\": \"0.2\",\n    \"designIdentifier\": \"45\"\n  },\n  {\n    \"id\": \"microsoft-research-jmpressurev3872v38\",\n    \"name\": \"JM Pressure v3.8\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM Pressure MPL3115A2 72 v3.8\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.6/profile/barometer2.c\",\n    \"link\": \"https://aka.ms/aaaabb\",\n    \"services\": [\n      504462570,\n      337754823\n    ],\n    \"productIdentifiers\": [\n      869351851\n    ],\n    \"version\": \"3.8\",\n    \"designIdentifier\": \"72\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrelaymach01v10\",\n    \"name\": \"JM Relay MACH-0.1\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM Relay MACH-0.1\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-relay-1.0/profile/relay.c\",\n    \"services\": [\n      406840918\n    ],\n    \"productIdentifiers\": [\n      900132124\n    ],\n    \"version\": \"1.0\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrgb883v40\",\n    \"name\": \"JM RGB-8\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Circular 8 programmable LED display.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v4.0/profile/rgb-83.c\",\n    \"services\": [\n      369743088\n    ],\n    \"productIdentifiers\": [\n      1050545633\n    ],\n    \"version\": \"4.0\",\n    \"designIdentifier\": \"83\",\n    \"shape\": \"ec30_3x3_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrgbledbar58v01\",\n    \"name\": \"JM RGB LED Bar\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-rgb-led-bar-58-0.1/profile/npx.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      309264608\n    ],\n    \"productIdentifiers\": [\n      1046525691\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"58\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrgbledgeneric60v01\",\n    \"name\": \"JM RGB LED Generic\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-rgb-led-generic-60-0.1/profile/npx.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      309264608\n    ],\n    \"productIdentifiers\": [\n      967723905\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"60\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrgbledring37v21\",\n    \"name\": \"JM RGB LED Ring\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-rgb-led-ring-37-2.1/profile/npx.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      309264608\n    ],\n    \"productIdentifiers\": [\n      807926135\n    ],\n    \"version\": \"2.1\",\n    \"designIdentifier\": \"37\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrgbring67v37\",\n    \"name\": \"JM RGB-Ring\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM RGB-Ring 67 v3.7\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      309264608\n    ],\n    \"productIdentifiers\": [\n      946180442\n    ],\n    \"version\": \"3.7\",\n    \"designIdentifier\": \"67\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrotarybtn82v40\",\n    \"name\": \"JM Rotary + Btn\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Rotary encoder with button in the standard shape.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v4.0rot/profile/rotary-82.c\",\n    \"services\": [\n      284830153,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      1045398971\n    ],\n    \"version\": \"4.0\",\n    \"designIdentifier\": \"82\",\n    \"shape\": \"ec30_2x2_l\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrotarycontrolbuttonv11\",\n    \"name\": \"JM Rotary Control + Button\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-rotary-control-26-1.1/profile/rotary_ctrl.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      284830153,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      829647613\n    ],\n    \"version\": \"1.1\"\n  },\n  {\n    \"id\": \"microsoft-research-jmsht30temperaturehumidity64v36\",\n    \"name\": \"JM SHT30 Temperature/Humidity\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM SHT30 64 v3.6\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.6/profile/env30.c\",\n    \"services\": [\n      337754823,\n      382210232\n    ],\n    \"productIdentifiers\": [\n      819953075\n    ],\n    \"version\": \"3.6\",\n    \"designIdentifier\": \"64\"\n  },\n  {\n    \"id\": \"microsoft-research-jmsinglergbled42v01\",\n    \"name\": \"JM Single RGB LED\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      506480888\n    ],\n    \"productIdentifiers\": [\n      917828732\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"42\"\n  },\n  {\n    \"id\": \"microsoft-research-jmslider49v11\",\n    \"name\": \"JM Slider\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-slider-49-1.1/profile/slider.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      522667846\n    ],\n    \"productIdentifiers\": [\n      966423091\n    ],\n    \"version\": \"1.1\",\n    \"designIdentifier\": \"49\"\n  },\n  {\n    \"id\": \"microsoft-research-jmsoiltemperatureds18b20v33\",\n    \"name\": \"JM Soil Temperature DS18B20\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM Soil Temperature DS18B20 v3.3\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.3one/profile/soiltemp.c\",\n    \"services\": [\n      337754823\n    ],\n    \"productIdentifiers\": [\n      1039295899\n    ],\n    \"version\": \"3.3\"\n  },\n  {\n    \"id\": \"microsoft-research-jmspeechsynthesis61v33\",\n    \"name\": \"JM Speech Synthesis\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.3/profile/ttsclick.c\",\n    \"services\": [\n      302307733\n    ],\n    \"productIdentifiers\": [\n      934541191\n    ],\n    \"version\": \"3.3\",\n    \"designIdentifier\": \"61\"\n  },\n  {\n    \"id\": \"microsoft-research-jmspibridgev37\",\n    \"name\": \"JM SPI bridge\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM SPI bridge v3.7\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-spi-bridge-v3.7/profile/bridge.c\",\n    \"services\": [\n      535147631,\n      530893146\n    ],\n    \"productIdentifiers\": [\n      882232420\n    ],\n    \"tags\": [\n      \"adapter\",\n      \"pi\"\n    ],\n    \"version\": \"3.7\"\n  },\n  {\n    \"id\": \"microsoft-research-jmtemperaturehumidity18v11\",\n    \"name\": \"JM Temperature + Humidity\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-temp-humidity-18-1.1/profile/env3.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      337754823,\n      382210232\n    ],\n    \"productIdentifiers\": [\n      827772887\n    ],\n    \"version\": \"1.1\",\n    \"designIdentifier\": \"18\"\n  },\n  {\n    \"id\": \"microsoft-research-jmtemperaturehumidity202v41\",\n    \"name\": \"JM-Temperature/Humidity\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v4.0/profile/temphum-202.c\",\n    \"services\": [\n      337754823,\n      382210232\n    ],\n    \"productIdentifiers\": [\n      891386792\n    ],\n    \"version\": \"4.1\",\n    \"designIdentifier\": \"202\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-jmthermocouplemax667573v3873v38\",\n    \"name\": \"JM Thermocouple MAX6675 73 v3.8\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM Thermocouple MAX6675 v3.8\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-c/blob/main/drivers/max6675.c\",\n    \"link\": \"https://aka.ms/aaaabc\",\n    \"services\": [\n      337754823\n    ],\n    \"productIdentifiers\": [\n      1047456763\n    ],\n    \"version\": \"3.8\",\n    \"designIdentifier\": \"73\"\n  },\n  {\n    \"id\": \"microsoft-research-jmuviilluminance65v3665v36\",\n    \"name\": \"JM UVI/Illuminance 65 v3.6\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"JM UVI/Illuminance 65 v3.6\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v3.6/profile/uv.c\",\n    \"services\": [\n      510577394,\n      527306128\n    ],\n    \"productIdentifiers\": [\n      1021617002\n    ],\n    \"version\": \"3.6\",\n    \"designIdentifier\": \"65\"\n  },\n  {\n    \"id\": \"microsoft-research-makeaccessible2021kitv10\",\n    \"name\": \"MakeAccessible 2021 Kit\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A kit for the Microsoft MakeAccessible hackathon.\",\n    \"link\": \"https://www.microsoft.com/en-us/research/project/project-makeaccessible/\",\n    \"tags\": [\n      \"kit\"\n    ],\n    \"version\": \"1.0\",\n    \"devices\": [\n      \"microbit-educational-foundation-microbitv2\",\n      \"microsoft-research-jmaccelerometer30v10\",\n      \"microsoft-research-jmaccessswitchinput34v13\",\n      \"microsoft-research-jmaccessswitchoutputv11\",\n      \"microsoft-research-jmambientlight55v01\",\n      \"microsoft-research-jmanalogjoystick44v02\",\n      \"microsoft-research-jmbrainf441v02\",\n      \"microsoft-research-jmbrainrp204059v01\",\n      \"microsoft-research-jmbutton10v13\",\n      \"microsoft-research-jmbutton40v02\",\n      \"microsoft-research-jmbuttonterminal62v01\",\n      \"microsoft-research-jmclickairquality4v32\",\n      \"microsoft-research-jmclickcolorv32\",\n      \"microsoft-research-jmflexv10\",\n      \"microsoft-research-jmkeyboardkey46v10\",\n      \"microsoft-research-jmkeyboardkey46v11\",\n      \"microsoft-research-jmrgbledbar58v01\",\n      \"microsoft-research-jmrgbledgeneric60v01\",\n      \"microsoft-research-jmrgbledring37v20\",\n      \"microsoft-research-jmrgbledring37v21\",\n      \"microsoft-research-jmrotarycontrolbuttonv10\",\n      \"microsoft-research-jmrotarycontrolbuttonv11\",\n      \"microsoft-research-jmsinglergbled42v01\",\n      \"microsoft-research-jmslider49v11\",\n      \"microsoft-research-jmtemperaturehumidity18v11\"\n    ]\n  },\n  {\n    \"id\": \"microsoft-research-mikrobuscarrierboard53v01\",\n    \"name\": \"MikrobusCarrierBoard\",\n    \"company\": \"Microsoft Research\",\n    \"productIdentifiers\": [\n      961789360\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"53\",\n    \"status\": \"experimental\"\n  },\n  {\n    \"id\": \"microsoft-research-motionpir210v43\",\n    \"name\": \"Motion (PIR)\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Detects motion using infra-red\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      293185353\n    ],\n    \"productIdentifiers\": [\n      927235767\n    ],\n    \"version\": \"4.3\",\n    \"designIdentifier\": \"210\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-pressure211v43\",\n    \"name\": \"Pressure\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Measures atmospheric pressure\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      337754823,\n      504462570\n    ],\n    \"productIdentifiers\": [\n      816579443\n    ],\n    \"version\": \"4.3\",\n    \"designIdentifier\": \"211\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"microsoft-research-rp2040devicescript59v01\",\n    \"name\": \"RP2040 DeviceScript\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"RP2040 brain running DeviceScript and related services\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-pico\",\n    \"connector\": \"edgeHighCurrentProvider\",\n    \"link\": \"https://github.com/microsoft/devicescript-pico\",\n    \"services\": [\n      530893146,\n      414210922,\n      411425820,\n      437330261\n    ],\n    \"productIdentifiers\": [\n      900102307\n    ],\n    \"transport\": {\n      \"type\": \"serial\",\n      \"vendorId\": 11914\n    },\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"59\"\n  },\n  {\n    \"id\": \"microsoft-research-tact115v11\",\n    \"name\": \"Tact\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Tact style push switch.\",\n    \"hardwareDesign\": \"https://github.com/microsoft/jacdac-ddk/tree/main/electronics/altium/module-designs/JacdacTactEc30%20115-1.1\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      1059364193\n    ],\n    \"version\": \"1.1\",\n    \"designIdentifier\": \"115\",\n    \"shape\": \"ec30_1x2_l\"\n  },\n  {\n    \"id\": \"microsoft-research-temprh116v10\",\n    \"name\": \"Temp & RH\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Temperature and relative humidity sensor module.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/temp-rh-116/profile/temp-rh-116-v1.0.c\",\n    \"hardwareDesign\": \"https://github.com/microsoft/jacdac-ddk/tree/main/electronics/altium/module-designs/JacdacTempRhEc30%20116-1.0\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      337754823,\n      382210232\n    ],\n    \"productIdentifiers\": [\n      819808106\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"116\",\n    \"shape\": \"ec30_2x2_l\"\n  },\n  {\n    \"id\": \"microsoft-research-temprh116v11\",\n    \"name\": \"Temp & RH\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Temperature and relative humidity sensor module.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/temp-rh-116/profile/temp-rh-116-v1.1.c\",\n    \"hardwareDesign\": \"https://github.com/microsoft/jacdac-ddk/tree/main/electronics/altium/module-designs/JacdacTempRhEc30%20116-1.1\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      337754823,\n      382210232\n    ],\n    \"productIdentifiers\": [\n      1066966718\n    ],\n    \"version\": \"1.1\",\n    \"designIdentifier\": \"116\",\n    \"shape\": \"ec30_2x2_l\"\n  },\n  {\n    \"id\": \"microsoft-research-uviilluminance205v42\",\n    \"name\": \"UVI/Illuminance\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      510577394,\n      527306128\n    ],\n    \"productIdentifiers\": [\n      928306999\n    ],\n    \"version\": \"4.2\",\n    \"designIdentifier\": \"205\",\n    \"shape\": \"ec30_2x2_lr\"\n  },\n  {\n    \"id\": \"espressif-esp32s3devkitmv10\",\n    \"name\": \"ESP32-S3 DevKitM\",\n    \"company\": \"Espressif\",\n    \"description\": \"An ESP32-S3 dev-board with RGB LED and all pins\",\n    \"repo\": \"https://github.com/microsoft/devicescript-esp32\",\n    \"firmwareSource\": \"https://github.com/microsoft/devicescript-esp32/blob/main/boards/esp32s3/esp32s3_devkit_m.board.json\",\n    \"connector\": \"noConnector\",\n    \"link\": \"https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitm-1.html\",\n    \"services\": [\n      413852154,\n      342028028,\n      341864092\n    ],\n    \"productIdentifiers\": [\n      896848503\n    ],\n    \"version\": \"1.0\"\n  },\n  {\n    \"id\": \"microsoft-research-jmaccelerometer30v02\",\n    \"name\": \"JM Accelerometer\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      521405449\n    ],\n    \"productIdentifiers\": [\n      872001670\n    ],\n    \"version\": \"0.2\",\n    \"designIdentifier\": \"30\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmaccelerometerv20\",\n    \"name\": \"JM Accelerometer v2.0\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A 3-axis accelerometer. 16G range.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0i/profile/acc.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      521405449\n    ],\n    \"productIdentifiers\": [\n      1020174761\n    ],\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmarcadebtnv20\",\n    \"name\": \"JM ArcadeBtn v2.0\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Lets you connect a single arcade button with an LED.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0/profile/btnled.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      886919574\n    ],\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmarcadecontrolsv20\",\n    \"name\": \"JM Arcade Controls v2.0\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Lets you connect arcade buttons and joystick to a Jacdac network.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0/profile/arcade.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      501915758\n    ],\n    \"productIdentifiers\": [\n      954450524\n    ],\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmbrainesp3248v02\",\n    \"name\": \"JM Brain ESP32\",\n    \"company\": \"Microsoft Research\",\n    \"connector\": \"edgeHighCurrentProvider\",\n    \"services\": [\n      342028028\n    ],\n    \"productIdentifiers\": [\n      1067560617\n    ],\n    \"transport\": {\n      \"type\": \"serial\",\n      \"vendorId\": 12346\n    },\n    \"firmwares\": [\n      {\n        \"name\": \"IoT Uploader\",\n        \"url\": \"https://github.com/microsoft/pxt-jacdac/releases/latest/download/uploader-esp32s2.uf2\",\n        \"productIdentifier\": 1067560617\n      }\n    ],\n    \"version\": \"0.2\",\n    \"designIdentifier\": \"48\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmbuzzerv20\",\n    \"name\": \"JM Buzzer v2.0\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A simple buzzer.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0/profile/snd.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      458731991\n    ],\n    \"productIdentifiers\": [\n      854957595\n    ],\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmcrankbuttonv20\",\n    \"name\": \"JM Crank + Button\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A rotary encoder with a push button.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0/profile/crank-btn.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      284830153,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      813927310\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmcrankv20\",\n    \"name\": \"JM Crank\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A rotary encoder without a push button.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0/profile/crank.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      284830153\n    ],\n    \"productIdentifiers\": [\n      866678795\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmkeyboardkey46v10\",\n    \"name\": \"JM Keyboard Key\",\n    \"company\": \"Microsoft Research\",\n    \"link\": \"https://github.com/microsoft/jacdac-padauk\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      1067229774\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"46\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmkeyboardkey46v11\",\n    \"name\": \"JM Keyboard Key\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      343122531\n    ],\n    \"productIdentifiers\": [\n      911541523\n    ],\n    \"version\": \"1.1\",\n    \"designIdentifier\": \"46\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmmachinelearning\",\n    \"name\": \"JM Machine Learning\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Lets you run machine learning models on data coming from Jacdac network.\",\n    \"repo\": \"https://github.com/microsoft/pxt-tensorflow\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      336566904,\n      496034245\n    ],\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmmotorv21\",\n    \"name\": \"JM Motor\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Lets you control a single DC motor (up to 5V; yellow plastic ones work well).\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.1/profile/motor.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      385895640\n    ],\n    \"productIdentifiers\": [\n      809626198\n    ],\n    \"version\": \"2.1\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmpinheader45v01\",\n    \"name\": \"JM Pin Header\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A unregulated passive adapter from Jacdac to pin headers.\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"productIdentifiers\": [\n      939230090\n    ],\n    \"version\": \"0.1\",\n    \"designIdentifier\": \"45\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmpower\",\n    \"name\": \"JM Power\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"Lets you supply power to Jacdac network from a MicroUSB connection (eg. a USB battery pack).\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      530893146\n    ],\n    \"productIdentifiers\": [\n      815885628\n    ],\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmprotov20\",\n    \"name\": \"JM Proto\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A prototype multi-function board.\\n* ``0x3f9bc26a`` JM Touch-Proto v2.0\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0p/profile/proto.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"productIdentifiers\": [\n      1052138004\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmpwmnpxv20\",\n    \"name\": \"JM PWM (npx)\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A light-strip controller. Supports WS2812B, APA102, and SK9822.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      309264608\n    ],\n    \"productIdentifiers\": [\n      895762065\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmpwmnpxv21\",\n    \"name\": \"JM PWM (npx)\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A light-strip controller with MicroUSB connector for power. Supports WS2812B, APA102, and SK9822.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      309264608\n    ],\n    \"productIdentifiers\": [\n      1013705700\n    ],\n    \"version\": \"2.1\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmpwmservov20\",\n    \"name\": \"JM PWM (Servo)\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A controller for a 5V servo.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0/profile/servo.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      318542083\n    ],\n    \"productIdentifiers\": [\n      816890446\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmpwmservov21\",\n    \"name\": \"JM PWM (Servo)\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A controller for a 5V servo, with MicroUSB connector for power.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.1/profile/servo.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      318542083\n    ],\n    \"productIdentifiers\": [\n      986140247\n    ],\n    \"version\": \"2.1\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrgbledring37v20\",\n    \"name\": \"JM RGB LED Ring\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-rgb-led-ring-37-2.0/profile/npx.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      309264608\n    ],\n    \"productIdentifiers\": [\n      892295887\n    ],\n    \"version\": \"2.0\",\n    \"designIdentifier\": \"37\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmrotarycontrolbuttonv10\",\n    \"name\": \"JM Rotary Control + Button\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-rotary-control-26-1.0/profile/rotary_ctrl.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      284830153,\n      343122531\n    ],\n    \"productIdentifiers\": [\n      1060754715\n    ],\n    \"version\": \"1.0\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmslider49v10\",\n    \"name\": \"JM Slider\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-slider-49-1.0/profile/slider.c#\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      522667846\n    ],\n    \"productIdentifiers\": [\n      981005156\n    ],\n    \"version\": \"1.0\",\n    \"designIdentifier\": \"49\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmsliderv20\",\n    \"name\": \"JM Slider\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A linear potentiometer (slider).\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0/profile/slider.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      522667846\n    ],\n    \"productIdentifiers\": [\n      1043615261\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmtemperaturehumidity18v10a\",\n    \"name\": \"JM Temperature + Humidity\",\n    \"company\": \"Microsoft Research\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-temp-humidity-18-1.0A/profile/env3.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      337754823,\n      382210232\n    ],\n    \"productIdentifiers\": [\n      899442616\n    ],\n    \"version\": \"1.0A\",\n    \"designIdentifier\": \"18\",\n    \"status\": \"deprecated\"\n  },\n  {\n    \"id\": \"microsoft-research-jmtouchprotov20\",\n    \"name\": \"JM Touch-Proto\",\n    \"company\": \"Microsoft Research\",\n    \"description\": \"A multi-touch sensor based on proto board.\",\n    \"repo\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"firmwareSource\": \"https://github.com/microsoft/jacdac-msr-modules/blob/main/targets/jm-v2.0p/profile/multitouch.c\",\n    \"link\": \"https://github.com/microsoft/jacdac-msr-modules\",\n    \"services\": [\n      416636459\n    ],\n    \"productIdentifiers\": [\n      1067172458\n    ],\n    \"version\": \"2.0\",\n    \"status\": \"deprecated\"\n  }\n]", "import deviceRegistryData from \"../../jacdac-spec/dist/devices.json\"\nimport { CHANGE, DOCS_ROOT } from \"./constants\"\nimport { JDEventSource } from \"./eventsource\"\nimport { Flags } from \"./flags\"\nimport { anyRandomUint32 } from \"./random\"\nimport { serviceSpecificationFromClassIdentifier } from \"./spec\"\nimport { toFullHex, unique } from \"./utils\"\n\nfunction looksRandom(n: number) {\n    const s = n.toString(16)\n    const h = \"0123456789abcdef\"\n    for (let i = 0; i < h.length; ++i) {\n        const hh = h[i]\n        if (s.indexOf(hh + hh + hh) >= 0) return false\n    }\n    if (/f00d|dead|deaf|beef/.test(s)) return false\n    return true\n}\n\nexport interface DeviceSpecificationOptions {\n    includeDeprecated?: boolean\n    includeExperimental?: boolean\n    transport?: jdspec.TransportType | string\n}\n\nexport interface DeviceCatalogOptions {\n    /**\n     * Additional vendor ids to use when connecting to serial\n     */\n    serialVendorIds?: number[]\n}\n\n/**\n * The device catalog. May emit a CHANGE event if updated\n */\nexport class DeviceCatalog extends JDEventSource {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _specifications: jdspec.DeviceSpec[] = deviceRegistryData as any\n    readonly options: DeviceCatalogOptions\n    constructor(options?: DeviceCatalogOptions) {\n        super()\n        this.options = options || {}\n    }\n\n    /**\n     * Update specifications list and emit `change` event.\n     * @param specifications\n     */\n    update(specifications: jdspec.DeviceSpec[]) {\n        if (\n            JSON.stringify(this._specifications) !==\n            JSON.stringify(specifications)\n        ) {\n            this._specifications = specifications.slice(0)\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Query device specifications\n     * @param options\n     * @returns\n     */\n    specifications(options?: DeviceSpecificationOptions): jdspec.DeviceSpec[] {\n        const { includeDeprecated, includeExperimental, transport } =\n            options || {}\n        let r = this._specifications.slice(0)\n        if (!includeDeprecated) r = r.filter(d => d.status !== \"deprecated\")\n        if (!includeExperimental)\n            r = r.filter(d => d.status !== \"experimental\" && !!d.storeLink)\n        if (transport) r = r.filter(d => d.transport?.type === transport)\n        return r\n    }\n\n    /**\n     * Query device specification from a product identifier\n     * @param productIdentifier\n     * @returns\n     */\n    specificationFromProductIdentifier(\n        productIdentifier: number,\n    ): jdspec.DeviceSpec {\n        if (isNaN(productIdentifier)) return undefined\n\n        const spec = this._specifications.find(\n            spec => spec.productIdentifiers?.indexOf(productIdentifier) > -1,\n        )\n        return spec\n    }\n\n    specificationFromIdentifier(id: string): jdspec.DeviceSpec {\n        if (id === undefined) return undefined\n\n        const spec = this._specifications.find(spec => spec.id === id)\n        return spec\n    }\n\n    /**\n     * Gets the list of devices that use this service class\n     * @param serviceClass\n     * @category Specification\n     */\n    specificationsForService(\n        serviceClass: number,\n        options?: DeviceSpecificationOptions,\n    ): jdspec.DeviceSpec[] {\n        if (isNaN(serviceClass)) return undefined\n        return this.specifications(options).filter(\n            spec => spec.services?.indexOf(serviceClass) > -1,\n        )\n    }\n\n    /**\n     * Gets the list of vendor ids for a given transport\n     * @param type\n     * @returns\n     */\n    vendorIds(type: \"serial\" | string) {\n        const ids = this._specifications\n            .filter(spec => spec.transport?.type === type)\n            .map(spec => spec.transport.vendorId)\n        if (type === \"serial\") {\n            const { serialVendorIds } = this.options\n            if (serialVendorIds) serialVendorIds.forEach(id => ids.push(id))\n        }\n        return unique(ids.filter(v => !isNaN(v)))\n    }\n\n    /**\n     * Checks if a vendor id match the transport\n     * @param type\n     * @param id\n     * @returns\n     */\n    matchVendorId(type: string, id: number) {\n        if (isNaN(id)) return false\n        if (Flags.developerMode) return true\n        const ids = this.vendorIds(type)\n        return ids.indexOf(id) > -1\n    }\n\n    /**\n     * Generates a unique firmware identifier\n     * @returns\n     */\n    uniqueFirmwareId(decimal?: boolean) {\n        const genFirmwareId = () => {\n            const n = anyRandomUint32(1)\n            if (n === undefined) return undefined\n            return (n[0] & 0xfff_ffff) | 0x3000_0000\n        }\n\n        let id = genFirmwareId()\n        while (\n            id !== undefined &&\n            (!looksRandom(id) ||\n                deviceCatalog.specificationFromProductIdentifier(id))\n        ) {\n            id = genFirmwareId()\n        }\n        return id !== undefined && (decimal ? id.toString() : toFullHex([id]))\n    }\n\n    /**\n     * Generate a unique service identifier\n     * @returns\n     */\n    uniqueServiceId() {\n        const genServId = () => {\n            const n = anyRandomUint32(1)\n            if (n === undefined) return undefined\n            return (n[0] & 0xfff_ffff) | 0x1000_0000\n        }\n\n        let id = genServId()\n        while (\n            id !== undefined &&\n            (!looksRandom(id) || serviceSpecificationFromClassIdentifier(id))\n        ) {\n            id = genServId()\n        }\n        return id !== undefined && toFullHex([id])\n    }\n\n    /**\n     * Generate a unique device identifier\n     * @returns\n     */\n    uniqueDeviceId() {\n        const n = anyRandomUint32(2)\n        return n !== undefined && toFullHex([n[0], n[1]])\n    }\n}\n\n/**\n * Generate a URL image for jacdac-docs\n */\nexport function deviceCatalogImage(\n    specification: jdspec.DeviceSpec | undefined,\n    size?: \"avatar\" | \"lazy\" | \"catalog\" | \"preview\" | \"full\" | \"list\",\n    docsRoot?: string,\n) {\n    const sz = size || \"full\"\n    const root = docsRoot || DOCS_ROOT\n    return (\n        specification &&\n        `${root}images/devices/${identifierToUrlPath(\n            specification.id,\n        )}.${sz}.jpg`\n    )\n}\n\n/**\n * Given an identifier, generate a url path\n */\nexport function identifierToUrlPath(id: string) {\n    if (!id) return id\n\n    const escape = (s: string) => s.replace(/[.:]/g, \"\").toLowerCase()\n\n    const parts = id.split(/-/g)\n    if (parts.length === 1) return id.replace(/[.:]/g, \"\").toLowerCase()\n    return `${parts.slice(0, -1).map(escape).join(\"-\")}/${escape(\n        parts[parts.length - 1],\n    )}`\n}\n\n/**\n * The device catalog\n */\nexport const deviceCatalog = new DeviceCatalog()\n", "import { JDFrameBuffer, Packet, isLargeFrame } from \"./packet\"\nimport { JDDevice } from \"./device\"\nimport { arrayConcatMany, strcmp, toHex } from \"./utils\"\nimport {\n    JD_SERVICE_INDEX_CTRL,\n    CMD_ADVERTISEMENT_DATA,\n    DEVICE_ANNOUNCE,\n    PACKET_SEND,\n    ERROR,\n    CONNECTING,\n    DEVICE_CONNECT,\n    DEVICE_DISCONNECT,\n    PACKET_RECEIVE,\n    PACKET_RECEIVE_ANNOUNCE,\n    PACKET_EVENT,\n    PACKET_REPORT,\n    PACKET_PROCESS,\n    DEVICE_CHANGE,\n    CHANGE,\n    FIRMWARE_BLOBS_CHANGE,\n    BUS_NODE_NAME,\n    DEVICE_NODE_NAME,\n    SERVICE_NODE_NAME,\n    EVENT_NODE_NAME,\n    REGISTER_NODE_NAME,\n    FIELD_NODE_NAME,\n    JD_DEVICE_DISCONNECTED_DELAY,\n    JD_DEVICE_LOST_DELAY,\n    JD_SERVICE_INDEX_CRC_ACK,\n    SELF_ANNOUNCE,\n    TIMEOUT,\n    LATE,\n    REPORT_UPDATE,\n    REGISTER_POLL_REPORT_INTERVAL,\n    REGISTER_POLL_REPORT_MAX_INTERVAL,\n    REGISTER_OPTIONAL_POLL_COUNT,\n    PACKET_PRE_PROCESS,\n    STREAMING_DEFAULT_INTERVAL,\n    REGISTER_POLL_FIRST_REPORT_INTERVAL,\n    SERVICE_PROVIDER_ADDED,\n    SERVICE_PROVIDER_REMOVED,\n    REFRESH,\n    ROLE_MANAGER_CHANGE,\n    TIMEOUT_DISCONNECT,\n    REGISTER_POLL_STREAMING_INTERVAL,\n    REPORT_RECEIVE,\n    CMD_SET_REG,\n    PING_LOGGERS_POLL,\n    RESET_IN_TIME_US,\n    REFRESH_REGISTER_POLL,\n    META_TRACE,\n    DEVICE_CLEAN,\n    REGISTER_POLL_REPORT_VOLATILE_MAX_INTERVAL,\n    REGISTER_POLL_REPORT_VOLATILE_INTERVAL,\n    SRV_INFRASTRUCTURE,\n    CONNECTION_STATE,\n    PACKET_RECEIVE_NO_DEVICE,\n    FRAME_PROCESS,\n    FRAME_SEND,\n    DISPOSE,\n    FRAME_PROCESS_LARGE,\n} from \"./constants\"\nimport { serviceClass, shortDeviceId } from \"./pretty\"\nimport { JDNode } from \"./node\"\nimport { FirmwareBlob, sendStayInBootloaderCommand } from \"./flashing\"\nimport { JDService } from \"./service\"\nimport {\n    isConstRegister,\n    isReading,\n    isSensor,\n    loadServiceSpecifications,\n    serviceSpecifications,\n} from \"./spec\"\nimport {\n    LoggerPriority,\n    LoggerReg,\n    SensorReg,\n    SRV_LOGGER,\n    SRV_REAL_TIME_CLOCK,\n    SystemReg,\n} from \"../../src/jdom/constants\"\nimport { JDServiceProvider } from \"./servers/serviceprovider\"\nimport { RealTimeClockServer } from \"../servers/realtimeclockserver\"\nimport { SRV_ROLE_MANAGER } from \"../../src/jdom/constants\"\nimport { Transport, ConnectionState } from \"./transport/transport\"\nimport { BusStatsMonitor } from \"./busstats\"\nimport { RoleManagerClient } from \"./clients/rolemanagerclient\"\nimport { JDBridge } from \"./bridge\"\nimport { randomDeviceId } from \"./random\"\nimport {\n    ControlAnnounceFlags,\n    ControlReg,\n    SRV_CONTROL,\n    SRV_DASHBOARD,\n    SRV_PROXY,\n} from \"../../jacdac-spec/dist/specconstants\"\nimport { Scheduler, WallClockScheduler } from \"./scheduler\"\nimport { ServiceFilter } from \"./filters/servicefilter\"\nimport { DeviceFilter } from \"./filters/devicefilter\"\nimport { Flags } from \"./flags\"\nimport { stack } from \"./trace/trace\"\nimport { DeviceCatalog } from \"./catalog\"\nimport { jdunpack } from \"./pack\"\n\nexport type BusBroadcastMessageType =\n    | \"visibilitychange\"\n    | \"disconnect\"\n    | \"connectionstate\"\n\nexport interface BusBroadcastMessage {\n    id: string\n    event: BusBroadcastMessageType\n}\n\nexport interface BusBroadcastVisibilityChangeMessage\n    extends BusBroadcastMessage {\n    event: \"visibilitychange\"\n    visibilityState?: \"hidden\" | \"visible\"\n    transports: { type: string; connectionState: string }[]\n}\n\nexport interface BusBroadcastConnectionStateMessage\n    extends BusBroadcastMessage {\n    event: \"connectionstate\"\n    transports: { type: string; connectionState: string }[]\n}\n\nexport const enum BusInteractionMode {\n    /**\n     * The bus mounts a self device and actively interacts with devices, including polling registers\n     * automatically\n     */\n    Active,\n    /**\n     * The bus mounts a self device and does not poll registers automatically\n     */\n    Observer,\n    /**\n     * The bus does not emit any package\n     */\n    Passive,\n}\n\n/**\n * Creation options for a bus\n * @category JDOM\n */\nexport interface BusOptions {\n    /**\n     * The self-device device id\n     */\n    deviceId?: string\n    /**\n     * A custom scheduler to control time\n     */\n    scheduler?: Scheduler\n    /**\n     * Parent domain origin to handle iframe messages. Defaults to \"*\".\n     */\n    parentOrigin?: string\n    /**\n     * enable bus acting as a client\n     */\n    client?: boolean\n    /**\n     * Ignore role managers detected on the bus\n     */\n    disableRoleManager?: boolean\n    /**\n     * This bus is a dashboard\n     */\n    dashboard?: boolean\n    /**\n     * This bus is a proxy\n     */\n    proxy?: boolean\n    /**\n     * Stable identifier used to generate unique simulator identifier accross multiple hosted bus environment\n     */\n    serviceProviderIdSalt?: string\n    /**\n     * Broadcast reset packet\n     */\n    resetIn?: boolean\n\n    /**\n     * Additional serial connection vendor ids\n     */\n    serialVendorIds?: number[]\n\n    /**\n     * Custom services\n     */\n    services?: jdspec.ServiceSpec[]\n}\n\n/**\n * A Jacdac bus manager. This instance maintains the list of devices on the bus.\n * @category JDOM\n */\nexport class JDBus extends JDNode {\n    /**\n     * @internal\n     */\n    readonly selfDeviceId: string\n    /**\n     * A timer and interval schedular to orchestrate bus timestamps\n     * @category Scheduling\n     */\n    readonly scheduler: Scheduler\n    /**\n     * @internal\n     */\n    readonly parentOrigin: string\n    /**\n     * @internal\n     */\n    readonly serviceProviderIdSalt: string\n    private readonly _transports: Transport[] = []\n    private _bridges: JDBridge[] = []\n    private _devices: JDDevice[] = []\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _gcInterval: any\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _announceInterval: any\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _safeBootInterval: any\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _refreshRegistersInterval: any\n    private _lastPingLoggerTime = 0\n    private _lastResetInTime = 0\n    private _restartCounter = 0\n    // null means disabled\n    private _roleManager: RoleManagerClient\n    private _minLoggerPriority = LoggerPriority.Silent\n    private _firmwareBlobs: FirmwareBlob[]\n    private _gcDevicesFrozen = 0\n    private _serviceProviders: JDServiceProvider[] = []\n    private _unsubscribeBroadcastChannel: () => void\n    private _postBroadcastMessage: (\n        event: BusBroadcastMessageType,\n        msg: Partial<BusBroadcastMessage>,\n    ) => void\n    private _streaming = false\n    private _interactionMode = BusInteractionMode.Active\n    private _autoConnect = false\n    private _resetIn = false\n    // self device is a client\n    private _client = false\n    // self device is a dashboard\n    private _dashboard = false\n    // acts as a proxy\n    private _proxy = false\n\n    /**\n     * the device catalog\n     * @category JDOM\n     */\n    public readonly deviceCatalog: DeviceCatalog\n\n    /**\n     * Gets an instance that tracks packet statistics\n     * @category Diagnostics\n     **/\n    public readonly stats: BusStatsMonitor\n\n    /**\n     * Creates the bus with the given transport\n     * @param sendPacket\n     * @category Lifecycle\n     */\n    constructor(transports?: (Transport | undefined)[], options?: BusOptions) {\n        super()\n\n        const {\n            deviceId,\n            scheduler,\n            parentOrigin,\n            client,\n            disableRoleManager,\n            dashboard,\n            proxy,\n            serviceProviderIdSalt,\n            resetIn,\n            serialVendorIds,\n            services,\n        } = options || {}\n\n        this._roleManager = undefined\n        this.selfDeviceId = deviceId || randomDeviceId()\n        this.scheduler = scheduler || new WallClockScheduler()\n        this.parentOrigin = parentOrigin || \"*\"\n        this.serviceProviderIdSalt = serviceProviderIdSalt || \"\"\n        this._client = !!client\n        this._dashboard = !!dashboard\n        this._proxy = !!proxy\n        this._resetIn = !!resetIn\n        this.stats = new BusStatsMonitor(this)\n        this.deviceCatalog = new DeviceCatalog({ serialVendorIds })\n\n        // some transport may be undefined\n        transports?.filter(tr => !!tr).map(tr => this.addTransport(tr))\n        // tell loggers to send data, every now and then\n        // send resetin packets\n        this.on(SELF_ANNOUNCE, this.handleSelfAnnounce.bind(this))\n        // tell RTC clock the computer time\n        this.on(DEVICE_ANNOUNCE, this.handleRealTimeClockSync.bind(this))\n        // grab the default role manager\n        if (!disableRoleManager)\n            this.on(DEVICE_CHANGE, this.handleRoleManager.bind(this))\n        // extra services\n        if (services?.length) loadServiceSpecifications(services)\n        // start all timers\n        this.start()\n    }\n\n    private configureBroadcastChannel() {\n        if (\n            typeof BroadcastChannel === \"undefined\" ||\n            typeof self === \"undefined\" ||\n            this._unsubscribeBroadcastChannel\n        )\n            return\n\n        // the purpose of this code is to orchestrate\n        // interactions with multiple tabs and windows\n        const channel = new BroadcastChannel(\"jacdac\")\n        const postConnectionState = () => {\n            channel.postMessage(<BusBroadcastConnectionStateMessage>{\n                id: this.selfDevice.shortId,\n                event: \"connectionstate\",\n                transports: this._transports.map(tr => ({\n                    type: tr.type,\n                    connectionState: tr.connectionState,\n                })),\n            })\n        }\n        // update other windows with connection status\n        const unsubConnectionState = this.subscribe(\n            CONNECTION_STATE,\n            postConnectionState,\n        )\n        this._postBroadcastMessage = (\n            event: BusBroadcastMessageType,\n            msg: Partial<BusBroadcastMessage>,\n        ) => {\n            const bmsg = {\n                id: this.selfDevice.shortId,\n                event,\n                ...(msg || {}),\n            }\n            //console.debug(`jacdac broadcast: ${bmsg.event}`, bmsg)\n            channel.postMessage(bmsg)\n        }\n        const handleVisibilityChange = () =>\n            this._postBroadcastMessage(\"visibilitychange\", <\n                BusBroadcastVisibilityChangeMessage\n            >{\n                visibilityState: document.visibilityState,\n            })\n        const handleBroadcastMessage = async (\n            msg: MessageEvent<BusBroadcastMessage>,\n        ) => {\n            const { data } = msg\n            const { event } = data\n            //console.debug(`jacdac broadcast: received ${event}`)\n            switch (event) {\n                case \"visibilitychange\": {\n                    // automatically disconnect if another pane becomes live\n                    //console.debug(\n                    //   `broadcast ${id}: ${event} ${visibilityState}`\n                    //)\n                    const { visibilityState } =\n                        data as BusBroadcastVisibilityChangeMessage\n                    if (visibilityState === \"visible\") await this.disconnect()\n                    else if (this.autoConnect) {\n                        // let other window disconnect\n                        await this.delay(2000)\n                        await this.connect(true)\n                    }\n                    break\n                }\n                case \"disconnect\": {\n                    await this.disconnect()\n                    break\n                }\n                case \"connectionstate\": {\n                    //console.debug(`broadcast ${id}: ${event}`, transports)\n                    // if any other window is trying to connect, disconnect\n                    const { transports = [] } =\n                        data as BusBroadcastConnectionStateMessage\n                    transports\n                        .filter(\n                            tr =>\n                                tr.connectionState ===\n                                ConnectionState.Connecting,\n                        )\n                        .forEach(ctr => {\n                            this.transports\n                                .filter(tr => tr.type === ctr.type)\n                                .forEach(tr => tr.disconnect())\n                        })\n                }\n            }\n        }\n\n        channel.addEventListener(\"message\", handleBroadcastMessage, false)\n        document.addEventListener(\"visibilitychange\", handleVisibilityChange)\n        this._unsubscribeBroadcastChannel = () => {\n            unsubConnectionState()\n            document.removeEventListener(\n                \"visibilitychange\",\n                handleVisibilityChange,\n            )\n            channel.removeEventListener(\"message\", handleBroadcastMessage)\n            channel.close()\n        }\n\n        // notify other pages\n        handleVisibilityChange()\n    }\n\n    /**\n     * Broadcast a request to disconnect to all other javadac buses.\n     */\n    broadcastDisconnectRequest() {\n        this._postBroadcastMessage?.(\"disconnect\", {})\n    }\n\n    /**\n     * Indicates that this bus acts as a client device\n     * @category Lifecycle\n     */\n    get client() {\n        return this._client\n    }\n\n    /**\n     * Sets the client state\n     * @category Lifecycle\n     */\n    set client(value: boolean) {\n        if (!!value !== this._client) {\n            this._client = !!value\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Indicates if the bus is a dashboard\n     * @category Lifecycle\n     */\n    get dashboard() {\n        return this._dashboard\n    }\n\n    /**\n     * Gets the list of transports registers with the bus\n     * @category Transports and Bridges\n     */\n    get transports() {\n        return this._transports.slice(0)\n    }\n\n    /**\n     * Adds a transport to the bus. Returns unregistration handler\n     * @category Transports and Bridges\n     */\n    addTransport(transport: Transport | undefined): () => Promise<void> {\n        if (!transport || this._transports.indexOf(transport) > -1) return // already added\n\n        this._transports.push(transport)\n        transport.setBus(this)\n        const pre = () => this.preConnect(transport)\n        this.on(CONNECTING, pre)\n\n        const unmount = async () => {\n            const i = this._transports.indexOf(transport)\n            if (i > -1) {\n                this.off(CONNECTING, pre)\n                this._transports.splice(i, 1)\n                this.emit(CONNECTION_STATE)\n                await transport.disconnectBus()\n            }\n        }\n\n        transport.on(DISPOSE, unmount)\n\n        this.emit(CONNECTION_STATE)\n\n        return unmount\n    }\n\n    /**\n     * Automatically try to connect to detected devices\n     */\n    get autoConnect() {\n        return this._autoConnect\n    }\n\n    /**\n     * Sets the auto-connected mode\n     */\n    set autoConnect(value: boolean) {\n        if (value !== this._autoConnect) {\n            this._autoConnect = value\n            this.emit(CHANGE)\n\n            // auto start\n            if (\n                this.disconnected &&\n                this._autoConnect &&\n                typeof document !== \"undefined\" &&\n                document.visibilityState === \"visible\"\n            )\n                this.connect(true)\n        }\n    }\n\n    /**\n     * Gets the list of bridges registered with the bus\n     * @category Transports and Bridges\n     */\n    get bridges() {\n        return this._bridges.slice(0)\n    }\n\n    /**\n     * Add a bridge to the bus and returns a callback to remove it.\n     * @param bridge\n     * @returns callback to remove bridge\n     * @category Transports and Bridges\n     * @internal\n     */\n    addBridge(bridge: JDBridge): () => void {\n        if (this._bridges.indexOf(bridge) < 0) {\n            this._bridges.push(bridge)\n            bridge.bus = this\n            this.emit(CHANGE)\n        }\n        return () => this.removeBridge(bridge)\n    }\n\n    private removeBridge(bridge: JDBridge) {\n        const i = this._bridges.indexOf(bridge)\n        if (i > -1) {\n            this._bridges.splice(i, 1)\n            bridge.bus = undefined\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Do not send any packet on the bus\n     * @category Lifecycle\n     */\n    get passive(): boolean {\n        return this._interactionMode === BusInteractionMode.Passive\n    }\n\n    /**\n     * Sets the passive state. A passive bus does not send any packets.\n     * @category Lifecycle\n     * @deprecated\n     */\n    set passive(value: boolean) {\n        this.interactionMode = value\n            ? BusInteractionMode.Passive\n            : BusInteractionMode.Active\n    }\n\n    /**\n     * Determines how the bus interacts with services, including automatic polling of registers\n     */\n    get interactionMode(): BusInteractionMode {\n        return this._interactionMode\n    }\n\n    /**\n     * Sets how the bus interacts with services, including automatic polling of registers\n     */\n    set interactionMode(mode: BusInteractionMode) {\n        if (this._interactionMode !== mode) {\n            this._interactionMode = mode\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Indicates if reset in broadcast packets should be sent\n     */\n    get resetIn() {\n        return this._resetIn\n    }\n\n    /**\n     * Turns on or off reset in broadcast packets\n     */\n    set resetIn(value: boolean) {\n        this._resetIn = !!value\n    }\n\n    private preConnect(transport: Transport) {\n        //console.debug(`preconnect ${transport.type}`, { transport })\n        return Promise.all(\n            this._transports\n                .filter(t => t !== transport)\n                .map(t => t.disconnect()),\n        )\n    }\n\n    /**\n     * Connects the bus going through the transports chronologically. Does nothing if already connected.\n     * @param background connection was triggered automatically\n     * @category Lifecycle\n     */\n    async connect(background?: boolean) {\n        if (this.connected) return\n\n        for (const transport of this._transports) {\n            // start connection\n            await transport.connect(background)\n            // keep going if not connected\n            if (transport.connected) break\n        }\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Disconnects the bus and any connected transport.\n     * @category Lifecycle\n     */\n    async disconnect() {\n        for (const transport of this._transports) {\n            await transport.disconnect()\n        }\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Starts to process packets and updates the JDOM nodes\n     * @category Lifecycle\n     */\n    start() {\n        this.configureBroadcastChannel()\n        if (!this._announceInterval)\n            this._announceInterval = this.scheduler.setInterval(() => {\n                if (!this.passive) this.emit(SELF_ANNOUNCE)\n            }, 499)\n        this.backgroundRefreshRegisters = true\n        if (!this._gcInterval)\n            this._gcInterval = this.scheduler.setInterval(\n                this.gcDevices.bind(this),\n                JD_DEVICE_DISCONNECTED_DELAY,\n            )\n    }\n\n    /**\n     * Indicates if the bus is announcing and managing packets\n     */\n    get running() {\n        return !!this._announceInterval\n    }\n\n    /**\n     * Stops processing packets\n     * @category Lifecycle\n     */\n    async stop() {\n        await this.disconnect()\n        if (this._unsubscribeBroadcastChannel) {\n            this._postBroadcastMessage = undefined\n            this._unsubscribeBroadcastChannel()\n            this._unsubscribeBroadcastChannel = undefined\n        }\n        if (this._announceInterval) {\n            this.scheduler.clearInterval(this._announceInterval)\n            this._announceInterval = undefined\n        }\n        this.safeBoot = false\n        this.backgroundRefreshRegisters = false\n        if (this._gcInterval) {\n            this.scheduler.clearInterval(this._gcInterval)\n            this._gcInterval = undefined\n        }\n    }\n\n    /**\n     * Stops the bus and all transport connections.\n     * @category Lifecycle\n     */\n    async dispose() {\n        console.debug(`${this.id}: disposing.`)\n        this.emit(DISPOSE)\n        await this.stop()\n        this._transports.forEach(transport => transport.dispose())\n    }\n\n    /**\n     * Indicates that the bus is sending commands keep devices in bootloader mode.\n     * This property is signaled by CHANGE.\n     * @category Lifecycle\n     */\n    get safeBoot() {\n        return !!this._safeBootInterval\n    }\n\n    /**\n     * Turn on or off the safe boot mode where the bus keeps devices in bootloader mode.\n     * Triggers a CHANGE event.\n     * @category Lifecycle\n     */\n    set safeBoot(enabled: boolean) {\n        if (enabled && !this._safeBootInterval) {\n            this._safeBootInterval = this.scheduler.setInterval(() => {\n                // don't send message if any device is flashing\n                if (this._devices.some(d => d.firmwareUpdater)) return\n                sendStayInBootloaderCommand(this)\n            }, 50)\n            this.emit(CHANGE)\n        } else if (!enabled && this._safeBootInterval) {\n            this.scheduler.clearInterval(this._safeBootInterval)\n            this._safeBootInterval = undefined\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Indicates if any of the transports is connected.\n     * Some transports might be in the process of connecting or disconnecting.\n     * @category Lifecycle\n     */\n    get connected() {\n        return this._transports.some(t => t.connected)\n    }\n\n    /**\n     * Indicates if any of the transports is disconnected.\n     * Some transports might be in the process of connecting or disconnecting.\n     * @category Lifecycle\n     */\n    get disconnected() {\n        return this._transports.every(t => t.disconnected)\n    }\n\n    /**\n     * Clears known devices and service providers (simulators). Optionally reset bus timestamp.\n     * @param timestamp\n     * @category Services\n     */\n    clear(timestamp = 0) {\n        // clear hosts\n        if (this._serviceProviders?.length) {\n            this._serviceProviders.forEach(host => (host.bus = undefined))\n            this._serviceProviders = []\n        }\n        this.clearDevices()\n        this.resetTime(timestamp)\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Clears current device list and let's them repopulate\n     */\n    private clearDevices() {\n        // clear devices\n        const devs = this._devices\n        if (devs?.length) {\n            this._devices = []\n            devs.forEach(dev => {\n                dev.disconnect()\n                this.emit(DEVICE_DISCONNECT, dev)\n                this.emit(DEVICE_CHANGE, dev)\n            })\n        }\n    }\n\n    /**\n     * Gets a unique identifier for this node in the Jacdac DOM.\n     * @category JDOM\n     */\n    get id(): string {\n        return this.nodeKind\n    }\n\n    /**\n     * Gets the bus name\n     * @category JDOM\n     */\n    get name(): string {\n        return \"bus\"\n    }\n\n    /**\n     * Gets the bus name\n     * @category JDOM\n     */\n    get friendlyName(): string {\n        return this.name\n    }\n\n    /**\n     * Gets the bus name\n     * @category JDOM\n     */\n    get qualifiedName(): string {\n        return this.name\n    }\n\n    /**\n     * Returns the ``BUS_NODE_NAME``\n     * @category JDOM\n     */\n    get nodeKind(): string {\n        return BUS_NODE_NAME\n    }\n\n    /**\n     * Gets the default role manager service client, if any\n     * @category Services\n     */\n    get roleManager(): RoleManagerClient {\n        return this._roleManager\n    }\n\n    /**\n     * Specifies the current role manager\n     */\n    setRoleManagerService(service: JDService) {\n        // unchanged service\n        if (this._roleManager?.service === service) return\n\n        // service changed\n        // clean if needed\n        if (this._roleManager) {\n            //console.debug(\"unmount role manager\")\n            this._roleManager.unmount()\n            this._roleManager = undefined\n        }\n\n        // allocate new manager\n        if (service) {\n            this._roleManager = new RoleManagerClient(service)\n            this._roleManager.startRefreshRoles()\n        }\n\n        // notify listeneres\n        this.emit(ROLE_MANAGER_CHANGE)\n        this.emit(CHANGE)\n    }\n\n    /**\n     * @internal\n     */\n    toString(): string {\n        return `bus: ${this._devices?.length || 0} devices, ${\n            this._transports\n                ?.filter(tr => tr.connected)\n                .map(tr => tr.type)\n                .join(\", \") || \"\"\n        }`\n    }\n\n    /**\n     * Gets a detailled description of the devices and services connected to the bus\n     * @returns\n     * @internal\n     */\n    describe(options?: DeviceFilter) {\n        return `\ninteraction_mode: ${this.interactionMode}\nauto_connect: ${this.autoConnect}\nreset_in: ${this.resetIn}\nlast_reset_in_time: ${this.lastResetInTime}\ntransport:\n${this._transports.map(tr => `  ${tr.type}: ${tr.connectionState}`).join(\"\\n\")}\n${\n    this._bridges?.length\n        ? `bridges:\n${this._bridges\n    ?.map(\n        tr =>\n            `  ${tr.bridgeId}: recv ${tr.packetProcessed}, sent ${tr.packetSent}`,\n    )\n    .join(\"\\n\")}`\n        : \"\"\n}${this.devices(options)\n            .map(\n                dev => `device: \n  id: ${dev.shortId} (0x${dev.deviceId})\n  product: ${\n      this.deviceCatalog.specificationFromProductIdentifier(\n          dev.productIdentifier,\n      )?.name || \"?\"\n  } (0x${dev.productIdentifier?.toString(16) || \"?\"})\n  firmware_version: ${dev.firmwareVersion || \"\"}\n  uptime: ${dev.uptime || \"\"}\n  stats: ${dev.stats.toString()}\n  services:\n${dev\n    .services()\n    .slice(1)\n    .map(srv =>\n        [\n            `    ${\n                srv.specification?.shortName || srv.name\n            } (0x${srv.serviceClass.toString(16)})`,\n            ...srv\n                .registers()\n                .filter(reg => !!reg.data)\n                .map(\n                    reg =>\n                        `        ${reg.specification?.kind || \"reg\"} ${\n                            reg.name\n                        }${reg.needsRefresh ? \"*\" : \"\"}: ${\n                            reg.humanValue\n                        } (${toHex(reg.data)}) ${\n                            reg.notImplemented ? \"- not implemented\" : \"\"\n                        }\n            last data: ${reg.lastDataTimestamp | 0 || \"\"}, last get: ${\n                reg.lastGetTimestamp | 0 || \"\"\n            }, last set: ${\n                reg.lastSetTimestamp | 0 || \"\"\n            }, last gets attempts: ${reg.lastGetAttempts},`,\n                ),\n            ...srv.events\n                .filter(ev => ev.count > 0)\n                .map(ev => `        event ${ev.name}: ${ev.count}`),\n        ].join(\"\\n\"),\n    )\n    .join(\"\\n\")}\n`,\n            )\n            .join(\"\\n\")}`\n    }\n\n    /**\n     * Resolves a JDOM node from an identifier\n     * @param id node identifier\n     * @returns node if found, undefined otherwise\n     * @category JDOM\n     */\n    node(id: string): JDNode {\n        const resolve = (): JDNode => {\n            const m =\n                /^(?<type>bus|device|service|register|event|field)(:(?<dev>\\w+)(:(?<srv>\\w+)(:(?<reg>\\w+(:(?<idx>\\w+))?))?)?)?$/.exec(\n                    id,\n                )\n            if (!m) return undefined\n            const type = m.groups[\"type\"]\n            const dev = m.groups[\"dev\"]\n            const srv = parseInt(m.groups[\"srv\"], 16)\n            const reg = parseInt(m.groups[\"reg\"], 16)\n            const idx = parseInt(m.groups[\"idx\"], 16)\n            //console.log(type, this.device(dev), this.device(dev)?.service(srv), this.device(dev)?.service(srv)?.register(reg), idx)\n            switch (type) {\n                case BUS_NODE_NAME:\n                    return this\n                case DEVICE_NODE_NAME:\n                    return this.device(dev, true)\n                case SERVICE_NODE_NAME:\n                    return this.device(dev, true)?.service(srv)\n                case REGISTER_NODE_NAME:\n                    return this.device(dev, true)?.service(srv)?.register(reg)\n                case EVENT_NODE_NAME:\n                    return this.device(dev, true)?.service(srv)?.event(reg)\n                case FIELD_NODE_NAME:\n                    return this.device(dev, true)?.service(srv)?.register(reg)\n                        ?.fields[idx]\n            }\n            console.info(`node ${id} not found`)\n            return undefined\n        }\n        const node = resolve()\n        return node\n    }\n\n    private resetTime(delta = 0) {\n        this.scheduler.resetTime(delta)\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Gets the current bus-relavite time in milliseconds\n     * @category Scheduling\n     */\n    get timestamp(): number {\n        return this.scheduler.timestamp\n    }\n\n    /**\n     * Indicates if the bus should force all sensors to stream\n     * @category Lifecycle\n     */\n    get streaming(): boolean {\n        return this._streaming\n    }\n\n    /**\n     * Sets automatic streaming on and off\n     * @category Lifecycle\n     */\n    set streaming(value: boolean) {\n        this._streaming = value\n    }\n\n    /**\n     * Creates a promise that awaits for the given duration using the bus scheduler\n     * @category Scheduling\n     */\n    delay<T>(millis: number, value?: T): Promise<T | undefined> {\n        return new Promise(resolve =>\n            this.scheduler.setTimeout(() => resolve(value), millis),\n        )\n    }\n\n    /**\n     * Gets the current desired minimum logger verbosity on the bus\n     * @category Diagnostics\n     */\n    get minLoggerPriority(): LoggerPriority {\n        return this._minLoggerPriority\n    }\n\n    /**\n     * Sets the current desired minimum logger verbosity on the bus\n     * @category Diagnostics\n     */\n    set minLoggerPriority(priority: LoggerPriority) {\n        if (priority !== this._minLoggerPriority) {\n            this._lastPingLoggerTime = -Infinity\n            this._minLoggerPriority = priority\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Returns undefined\n     * @category JDOM\n     */\n    get parent(): JDNode {\n        return undefined\n    }\n\n    private async handleRealTimeClockSync(device: JDDevice) {\n        // tell time to the RTC clocks\n        if (device.hasService(SRV_REAL_TIME_CLOCK))\n            await RealTimeClockServer.syncTime(this)\n    }\n\n    private handleRoleManager(dev: JDDevice) {\n        // device restarted and refreshed services\n        if (this._roleManager?.service?.disposed) {\n            this.setRoleManagerService(undefined)\n        }\n\n        // role manager device got disconnected\n        if (!dev.connected && this._roleManager?.service?.device === dev) {\n            // find another\n            this.setRoleManagerService(undefined)\n        }\n\n        if (!this.roleManager) {\n            const service = this.services({ serviceClass: SRV_ROLE_MANAGER })[0]\n            if (service) this.setRoleManagerService(service)\n        }\n    }\n\n    async sendFrameAsync(frame: JDFrameBuffer) {\n        if (frame._jacdac_timestamp === undefined)\n            frame._jacdac_timestamp = this.timestamp\n        if (isLargeFrame(frame)) {\n            this.processLargeFrame(frame)\n            return\n        }\n        this.emit(FRAME_SEND, frame)\n        // loopback processing:\n        this.processFrame(frame, frame._jacdac_sender)\n        await Promise.all(\n            this._transports.map(transport =>\n                transport.sendPacketWhenConnectedAsync(frame),\n            ),\n        )\n    }\n\n    /**\n     * Sends a packet to the bus\n     * @param packet packet to send\n     * @internal\n     */\n    async sendPacketAsync(packet: Packet) {\n        packet.timestamp = this.timestamp\n        if (Flags.trace) packet.meta[META_TRACE] = stack()\n\n        // special debug mode to avoid dashboard interfere with packets\n        // will generate fails for acks\n        if (this.passive) return\n\n        this.emit(PACKET_SEND, packet)\n\n        await this.sendFrameAsync(packet.toBuffer())\n    }\n\n    /**\n     * Gets the list of known firmware blobs\n     * @category Firmware\n     */\n    get firmwareBlobs() {\n        return this._firmwareBlobs\n    }\n\n    /**\n     * Sets the list of known firmware blobs\n     * @category Firmware\n     */\n    set firmwareBlobs(blobs: FirmwareBlob[]) {\n        this._firmwareBlobs = blobs\n        this.emit(FIRMWARE_BLOBS_CHANGE)\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Gets the current list of known devices on the bus\n     * @category Services\n     */\n    devices(options?: DeviceFilter) {\n        if (options?.serviceName && options?.serviceClass > -1)\n            throw Error(\"serviceClass and serviceName cannot be used together\")\n        const sc =\n            options?.serviceClass > -1\n                ? options?.serviceClass\n                : serviceClass(options?.serviceName)\n\n        let r = this._devices.slice(0)\n        if (sc > -1) r = r.filter(s => s.hasService(sc))\n        if (options?.ignoreInfrastructure)\n            r = r.filter(\n                s =>\n                    s.deviceId !== this.selfDeviceId &&\n                    s.serviceClasses.indexOf(SRV_INFRASTRUCTURE) < 0,\n            )\n        if (options?.announced) r = r.filter(s => s.announced)\n        if (options?.ignoreSimulators)\n            r = r.filter(r => !this.findServiceProvider(r.deviceId))\n        if (options?.productIdentifier) r = r.filter(r => !!r.productIdentifier)\n        if (options?.physical) r = r.filter(r => !!r.isPhysical)\n        if (options?.lost !== undefined)\n            r = r.filter(r => !!r.lost === !!options?.lost)\n        return r\n    }\n\n    /**\n     * Gets the current list of service providers on the bus\n     * @category Services\n     */\n    serviceProviders(): JDServiceProvider[] {\n        return this._serviceProviders.slice(0)\n    }\n\n    /**\n     * Get a service providers for a given device\n     * @param deviceId\n     * @category Services\n     */\n    findServiceProvider(deviceId: string) {\n        return this._serviceProviders.find(d => d.deviceId === deviceId)\n    }\n\n    /**\n     * Adds the service provider to the bus and returns the associated devoce\n     * @param provider instance to add\n     * @category Services\n     */\n    addServiceProvider(provider: JDServiceProvider) {\n        if (provider && this._serviceProviders.indexOf(provider) < 0) {\n            this._serviceProviders.push(provider)\n            provider.bus = this\n\n            this.emit(SERVICE_PROVIDER_ADDED, provider)\n            this.emit(CHANGE)\n        }\n\n        return this.device(provider.deviceId)\n    }\n\n    /**\n     * Removes the service provider from the bus\n     * @param provider instance to remove\n     * @category Services\n     */\n    removeServiceProvider(provider: JDServiceProvider) {\n        if (!provider) return\n\n        const i = this._serviceProviders.indexOf(provider)\n        if (i > -1) {\n            this.removeDevice(provider.deviceId)\n            // remove host\n            this._serviceProviders.splice(i, 1)\n            provider.bus = undefined\n            this.emit(SERVICE_PROVIDER_REMOVED, provider)\n\n            // removed host\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Removes all service providers from the bus\n     * @category Services\n     */\n    clearServiceProviders() {\n        this._serviceProviders.forEach(provider => {\n            this.removeDevice(provider.deviceId)\n            provider.bus = undefined\n            this.emit(SERVICE_PROVIDER_REMOVED, provider)\n        })\n        this._serviceProviders = []\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Remove a device client by identifier\n     * @param deviceId\n     * @category Devices\n     */\n    removeDevice(deviceId: string) {\n        // remove device as well\n        const devi = this._devices.findIndex(d => d.deviceId === deviceId)\n        if (devi > -1) {\n            const dev = this._devices[devi]\n            this._devices.splice(devi, 1)\n            dev.disconnect()\n            this.emit(DEVICE_DISCONNECT, dev)\n            this.emit(DEVICE_CHANGE, dev)\n        }\n    }\n\n    /**\n     * Gets the list of devices\n     * @category JDOM\n     */\n    get children(): JDNode[] {\n        return this.devices()\n    }\n\n    /**\n     * Gets the current list of services from all the known devices on the bus\n     * @category Services\n     */\n    services(options?: ServiceFilter & DeviceFilter): JDService[] {\n        return arrayConcatMany(\n            this.devices(options).map(d => d.services(options)),\n        )\n    }\n\n    /**\n     * Gets a device on the bus\n     * @param id device identifier to query\n     * @param skipCreate do not create new device if missing\n     * @param pkt packet that generated this device query\n     * @category Services\n     */\n    device(\n        id: string,\n        skipCreate?: boolean,\n        pkt?: Packet,\n    ): JDDevice | undefined {\n        if (id === \"0000000000000000\" && !skipCreate) {\n            console.warn(\"jacdac: trying to access device 0000000000000000\")\n            return undefined\n        }\n        let d = this._devices.find(d => d.deviceId == id)\n        if (!d && !skipCreate) {\n            if (this.devicesFrozen) {\n                console.debug(`info`, `devices frozen, dropping ${id}`)\n                return undefined\n            }\n            d = new JDDevice(this, id, pkt)\n            this._devices.push(d)\n            if (Flags.diagnostics)\n                console.debug(\n                    `${id === this.selfDeviceId ? \"self\" : \"new\"} device ${\n                        d.shortId\n                    } (${id})`,\n                )\n            // stable sort\n            this._devices.sort((l, r) => strcmp(l.deviceId, r.deviceId))\n            this.emit(DEVICE_CONNECT, d)\n            this.emit(DEVICE_CHANGE, d)\n            this.emit(CHANGE)\n        }\n        return d\n    }\n\n    /**\n     * Push a context to disable cleaning device that haven't issued packets recently.\n     * @category Lifecycle\n     */\n    pushDeviceFrozen() {\n        this._gcDevicesFrozen++\n    }\n\n    /**\n     * Pop a context to disable cleaning device that haven't issued packets recently.\n     * @category Lifecycle\n     */\n    popDeviceFrozen() {\n        this._gcDevicesFrozen = Math.max(0, this._gcDevicesFrozen - 1)\n    }\n\n    /**\n     * Indicates if the device list if currently frozen.\n     * @category Lifecycle\n     */\n    get devicesFrozen() {\n        return this._gcDevicesFrozen > 0\n    }\n\n    private gcDevices() {\n        this.emit(DEVICE_CLEAN)\n        if (this.devicesFrozen) {\n            console.debug(\"devices frozen\")\n            return\n        }\n\n        const LOST_DELAY = JD_DEVICE_LOST_DELAY\n        const DISCONNECTED_DELAY = JD_DEVICE_DISCONNECTED_DELAY\n        const now = this.timestamp\n        const lostCutoff = now - LOST_DELAY\n        const disconnectedCutoff = now - DISCONNECTED_DELAY\n\n        // cycle through events and disconnect devices that are long gone\n        let changed = false\n        const devs = this._devices.slice(0)\n        while (devs.length) {\n            const dev = devs.pop()\n            if (dev === this.selfDevice) continue\n            if (dev.firmwareUpdater) continue\n            if (dev.lastSeen < disconnectedCutoff) {\n                const i = this._devices.indexOf(dev)\n                if (i > -1) this._devices.splice(i, 1)\n                dev.disconnect()\n                this.emit(DEVICE_DISCONNECT, dev)\n                this.emit(DEVICE_CHANGE, dev)\n                changed = true\n            } else if (dev.lastSeen < lostCutoff) {\n                dev.lost = true\n                changed = true\n            }\n        }\n        if (changed) {\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Ingests and process a packet received from the bus.\n     * @param pkt a jacdac packet\n     * @internal\n     */\n    private processPacket(pkt: Packet) {\n        // this is currently unused - outside code typically calls sendFrameAsync() (possibly via sendPacketAsync())\n        // which in turn calls processFrame()\n        const frame = pkt.toBuffer()\n        if (!frame._jacdac_timestamp) frame._jacdac_timestamp = this.timestamp\n        this.emit(FRAME_PROCESS, pkt.toBuffer())\n        this.processPacketCore(pkt)\n    }\n\n    // this is called by sendFrameAsync() internally and by transports\n    processFrame(frame: JDFrameBuffer, sender: string, skipCrc = false) {\n        if (sender) frame._jacdac_sender = sender\n        if (frame._jacdac_timestamp === undefined)\n            frame._jacdac_timestamp = this.timestamp\n        if (isLargeFrame(frame)) {\n            this.processLargeFrame(frame)\n            return\n        }\n        this.emit(FRAME_PROCESS, frame)\n        for (const pkt of Packet.fromFrame(\n            frame,\n            frame._jacdac_timestamp,\n            skipCrc,\n        )) {\n            if (frame._jacdac_replay) pkt.replay = true\n            this.processPacketCore(pkt)\n        }\n    }\n\n    private processLargeFrame(frame: JDFrameBuffer) {\n        if (!this.passive) {\n            // don't try to route large packet in a passive bus\n            const did = toHex(frame.slice(8, 16))\n            const device = this.device(did, true)\n            if (device) {\n                // decode the topic?\n                const [topic, data]: [string, Uint8Array] = jdunpack(\n                    frame.slice(16),\n                    \"z b\",\n                )\n                const { si, command } =\n                    /^jd\\/(?<si>\\d+)\\/(?<command>.+)$/.exec(topic)?.groups || {}\n                const serviceIndex = parseInt(si)\n                if (serviceIndex > 0) {\n                    const service = device.service(serviceIndex)\n                    const twin = service?.twin\n                    if (twin) twin.processLargeFrame(command, data)\n                }\n            }\n        }\n        this.emit(FRAME_PROCESS_LARGE, frame)\n    }\n\n    private processPacketCore(pkt: Packet) {\n        pkt.assignDevice(this)\n        if (!pkt.isMultiCommand && !pkt.device) {\n            // the device id is unknown dropping\n            if (Flags.diagnostics)\n                console.debug(`unknown pkt device ${pkt.deviceIdentifier}`, {\n                    pkt,\n                })\n            this.emit(PACKET_RECEIVE_NO_DEVICE, pkt)\n            return\n        }\n        this.emit(PACKET_PRE_PROCESS, pkt)\n        let isAnnounce = false\n        if (!pkt.device) {\n            // skip\n        } else if (pkt.isCommand) {\n            if (pkt.deviceIdentifier == this.selfDeviceId) {\n                if (pkt.requiresAck) {\n                    const ack = Packet.onlyHeader(pkt.crc)\n                    ack.serviceIndex = JD_SERVICE_INDEX_CRC_ACK\n                    ack.deviceIdentifier = this.selfDeviceId\n                    ack.sendReportAsync(this.selfDevice)\n                }\n            }\n            pkt.device.processPacket(pkt)\n        } else {\n            pkt.device.lastSeen = pkt.timestamp\n            if (pkt.serviceIndex == JD_SERVICE_INDEX_CTRL) {\n                if (pkt.serviceCommand == CMD_ADVERTISEMENT_DATA) {\n                    isAnnounce = true\n                    pkt.device.processAnnouncement(pkt)\n                } else if (\n                    pkt.isMultiCommand &&\n                    pkt.serviceCommand == (CMD_SET_REG | ControlReg.ResetIn)\n                ) {\n                    // someone else is doing reset in\n                    this._lastResetInTime = this.timestamp\n                }\n            }\n\n            pkt.device.processPacket(pkt)\n        }\n        this.emit(PACKET_PROCESS, pkt)\n        // don't spam with duplicate advertisement events\n        if (isAnnounce) {\n            this.emit(PACKET_RECEIVE_ANNOUNCE, pkt)\n        } else {\n            this.emit(PACKET_RECEIVE, pkt)\n            if (pkt.isEvent && !pkt.isRepeatedEvent)\n                this.emit(PACKET_EVENT, pkt)\n            else if (pkt.isReport) this.emit(PACKET_REPORT, pkt)\n        }\n    }\n\n    /**\n     * Gets the current list of service specifications\n     */\n    get serviceSpecifications() {\n        return serviceSpecifications()\n    }\n\n    /**\n     * Updates the current list of device and clears the bus\n     * @param services\n     */\n    setCustomServiceSpecifications(services: jdspec.ServiceSpec[]) {\n        const res = loadServiceSpecifications(services)\n        if (res.changed) {\n            this.clearDevices()\n            this.emit(CHANGE)\n        }\n        return res\n    }\n\n    /**\n     * Gets the virtual device created by this bus to handle pipes.\n     * @category Services\n     */\n    get selfDevice() {\n        return this.device(this.selfDeviceId)\n    }\n\n    private handleSelfAnnounce(): Promise<void> {\n        return Promise.all([\n            this.sendAnnounce(),\n            this.sendResetIn(),\n            this.sendPingLoggers(),\n        ]).then(() => {})\n    }\n\n    private async sendAnnounce() {\n        // we do not support any services (at least yet)\n        if (this._restartCounter < 0xf) this._restartCounter++\n        const pkt = Packet.jdpacked<[number, number[][]]>(\n            CMD_ADVERTISEMENT_DATA,\n            \"u32 r: u32\",\n            [\n                this._restartCounter |\n                    (this._client ? ControlAnnounceFlags.IsClient : 0) |\n                    ControlAnnounceFlags.SupportsBroadcast |\n                    ControlAnnounceFlags.SupportsFrames |\n                    ControlAnnounceFlags.SupportsACK,\n                [\n                    [SRV_INFRASTRUCTURE],\n                    this._dashboard ? [SRV_DASHBOARD] : undefined,\n                    this._proxy ? [SRV_PROXY] : undefined,\n                ].filter(sc => !!sc),\n            ],\n        )\n        pkt.serviceIndex = JD_SERVICE_INDEX_CTRL\n        pkt.deviceIdentifier = this.selfDeviceId\n        await pkt.sendReportAsync(this.selfDevice)\n    }\n\n    get lastResetInTime() {\n        return this._lastResetInTime\n    }\n\n    private async sendResetIn() {\n        if (!this.resetIn) return\n\n        // don't send reset if already received\n        // or no devices\n        if (!this.devices({ ignoreInfrastructure: true }).length) return\n        this._lastResetInTime = this.timestamp\n        const rst = Packet.jdpacked<[number]>(\n            CMD_SET_REG | ControlReg.ResetIn,\n            \"u32\",\n            [RESET_IN_TIME_US],\n        )\n        await rst.sendAsMultiCommandAsync(this, SRV_CONTROL)\n    }\n\n    public async sendStopStreaming(): Promise<void> {\n        //console.debug(`bus: stop streaming`)\n        const readingRegisters = this.services({\n            announced: true,\n            ignoreInfrastructure: true,\n        })\n            .map(\n                srv =>\n                    srv.readingRegister &&\n                    srv.register(SensorReg.StreamingSamples),\n            )\n            .filter(reg => !!reg)\n\n        await Promise.all(\n            readingRegisters.map(reg => reg.sendSetPackedAsync([0])),\n        )\n    }\n\n    private async sendPingLoggers() {\n        if (\n            this._minLoggerPriority < LoggerPriority.Silent &&\n            this.timestamp - this._lastPingLoggerTime > PING_LOGGERS_POLL &&\n            this.devices({\n                ignoreInfrastructure: true,\n                serviceClass: SRV_LOGGER,\n            }).length > 0\n        ) {\n            this._lastPingLoggerTime = this.timestamp\n            const pkt = Packet.jdpacked<[LoggerPriority]>(\n                CMD_SET_REG | LoggerReg.MinPriority,\n                \"u8\",\n                [this._minLoggerPriority],\n            )\n            await pkt.sendAsMultiCommandAsync(this, SRV_LOGGER)\n        }\n    }\n\n    /**\n     * Indicates if registers are automatically refreshed in the background.\n     * @category Services\n     */\n    get backgroundRefreshRegisters() {\n        return !!this._refreshRegistersInterval\n    }\n\n    /**\n     * Enables or disables automatically refreshing registers in the background.\n     * @param enabled true to automatically refresh registers\n     * @category Services\n     */\n    set backgroundRefreshRegisters(enabled: boolean) {\n        if (!!enabled !== this.backgroundRefreshRegisters) {\n            if (!enabled) {\n                if (this._refreshRegistersInterval)\n                    this.scheduler.clearInterval(this._refreshRegistersInterval)\n                this._refreshRegistersInterval = undefined\n            } else {\n                this._refreshRegistersInterval = this.scheduler.setInterval(\n                    this.handleRefreshRegisters.bind(this),\n                    REFRESH_REGISTER_POLL,\n                )\n            }\n        }\n    }\n\n    /**\n     * Cycles through all known registers and refreshes the once that have REPORT_UPDATE registered\n     */\n    private handleRefreshRegisters() {\n        // never poll registers in passive/observer mode\n        if (this.interactionMode !== BusInteractionMode.Active) return\n\n        const devices = this._devices.filter(\n            device =>\n                device.announced && // needs services\n                !device.lost && // ignore lost devices\n                // !device.hasService(SRV_PROXY) && // proxies run servers!\n                !device.firmwareUpdater,\n        )\n\n        // skip if no devices or any device is currently flashing\n        if (!devices.length) return // no devices, we're done\n\n        // collect registers\n        const registers = arrayConcatMany(\n            devices.map(device =>\n                arrayConcatMany(\n                    device.services({ specification: true }).map(service =>\n                        service\n                            .registers()\n                            // reported as not implemented\n                            .filter(reg => !reg.notImplemented)\n                            // someone is listening for reports\n                            .filter(\n                                reg =>\n                                    // automatic streaming\n                                    (this._streaming &&\n                                        reg.code === SystemReg.Reading) ||\n                                    // someone asked for the value\n                                    reg.needsRefresh ||\n                                    // listening for updates\n                                    reg.listenerCount(REPORT_RECEIVE) > 0 ||\n                                    reg.listenerCount(REPORT_UPDATE) > 0,\n                            )\n                            // ask if data is missing or non-const/status code\n                            .filter(\n                                reg =>\n                                    !reg.data ||\n                                    !isConstRegister(reg.specification),\n                            )\n                            // stop asking optional registers\n                            .filter(\n                                reg =>\n                                    !reg.specification?.optional ||\n                                    reg.lastGetAttempts <\n                                        REGISTER_OPTIONAL_POLL_COUNT,\n                            ),\n                    ),\n                ),\n            ),\n        )\n\n        // refresh values\n        for (const register of registers) {\n            const { lastGetAttempts, service, specification } = register\n            const noDataYet = !register.data\n            const age = this.timestamp - register.lastGetTimestamp\n            const backoff = lastGetAttempts\n\n            // needs refresh and first attempt\n            if (register.needsRefresh && lastGetAttempts == 0) {\n                register.sendGetAsync()\n            }\n            // streaming register? use streaming sample\n            else if (\n                isReading(specification) &&\n                isSensor(service.specification)\n            ) {\n                // compute refresh interval\n                const intervalRegister = service.register(\n                    SensorReg.StreamingInterval,\n                )\n                let interval = intervalRegister?.uintValue\n                // no interval data\n                if (interval === undefined) {\n                    // use preferred interval data or default to 50\n                    const preferredIntervalRegister = service.register(\n                        SensorReg.StreamingPreferredInterval,\n                    )\n                    const preferredInterval =\n                        preferredIntervalRegister?.uintValue\n                    interval = preferredInterval\n                    // if no interval, poll interval value\n                    if (interval === undefined) {\n                        // all async\n                        if (\n                            intervalRegister &&\n                            !intervalRegister.data &&\n                            this.timestamp - intervalRegister.lastGetTimestamp >\n                                REGISTER_POLL_STREAMING_INTERVAL\n                        )\n                            intervalRegister.sendGetAsync()\n\n                        if (\n                            preferredIntervalRegister &&\n                            !preferredIntervalRegister.data &&\n                            this.timestamp -\n                                preferredIntervalRegister.lastGetTimestamp >\n                                REGISTER_POLL_STREAMING_INTERVAL\n                        )\n                            preferredIntervalRegister.sendGetAsync()\n                    }\n                }\n                // still no interval data use from spec or default\n                if (interval === undefined)\n                    interval =\n                        specification.preferredInterval ||\n                        STREAMING_DEFAULT_INTERVAL\n                const streamingSamplesRegister = service.register(\n                    SensorReg.StreamingSamples,\n                )\n                if (streamingSamplesRegister) {\n                    const streamingSamplesAge =\n                        this.timestamp -\n                        streamingSamplesRegister.lastSetTimestamp\n                    // need to figure out when we asked for streaming\n                    const midSamplesAge = (interval * 0xff) >> 1\n                    // compute if half aged\n                    if (streamingSamplesAge > midSamplesAge) {\n                        //console.debug({ samplesAge, midSamplesAge, interval })\n                        streamingSamplesRegister.sendSetPackedAsync([0xff])\n                    }\n                }\n\n                // no data yet\n                else if (noDataYet && age > 500) {\n                    register.sendGetAsync()\n                }\n            } // regular register, ping if data is old\n            else {\n                // check age\n                const volatile = !!specification?.volatile\n                const expiration = volatile\n                    ? Math.min(\n                          REGISTER_POLL_REPORT_VOLATILE_MAX_INTERVAL,\n                          REGISTER_POLL_REPORT_VOLATILE_INTERVAL *\n                              (1 << backoff),\n                      )\n                    : Math.min(\n                          REGISTER_POLL_REPORT_MAX_INTERVAL,\n                          (noDataYet\n                              ? REGISTER_POLL_FIRST_REPORT_INTERVAL\n                              : REGISTER_POLL_REPORT_INTERVAL) *\n                              (1 << backoff),\n                      )\n                if (age > expiration) {\n                    //console.log(`bus: poll ${register.id}`, register, age, backoff, expiration)\n                    register.sendGetAsync()\n                }\n            }\n        }\n\n        // apply streaming samples to service provider\n        this.emit(REFRESH)\n        this._serviceProviders.map(host => host.emit(REFRESH))\n    }\n\n    /**\n     * Runs a promise with a timeout. Returns undefined if timeout happens before of disconnection.\n     * @param timeout duration to wait before declaring timeout\n     * @param promise promise to wrap\n     * @category Lifecycle\n     */\n    withTimeout<T>(timeout: number, promise: Promise<T>): Promise<T> {\n        return new Promise<T>((resolve, reject) => {\n            let done = false\n            const tid = setTimeout(() => {\n                if (!done) {\n                    done = true\n                    if (!this._transports.some(tr => tr.connected)) {\n                        // the bus got disconnected so all operation will\n                        // time out going further\n                        this.emit(TIMEOUT_DISCONNECT)\n                        resolve(undefined)\n                    } else {\n                        // the command timed out\n                        this.emit(TIMEOUT)\n                        this.emit(ERROR, \"Timeout (\" + timeout + \"ms)\")\n                        resolve(undefined)\n                    }\n                }\n            }, timeout)\n            promise.then(\n                v => {\n                    if (!done) {\n                        done = true\n                        clearTimeout(tid)\n                        resolve(v)\n                    } else {\n                        // we already gave up\n                        this.emit(LATE)\n                    }\n                },\n                e => {\n                    if (!done) {\n                        done = true\n                        clearTimeout(tid)\n                        reject(e)\n                    }\n                },\n            )\n        })\n    }\n}\n", "import { FIELD_NODE_NAME } from \"./constants\"\nimport { JDNode } from \"./node\"\nimport { DecodedMember } from \"./pretty\"\nimport { JDServiceMemberNode } from \"./servicemembernode\"\n\n/**\n * A Jacdac field.\n * @category JDOM\n */\nexport class JDField extends JDNode {\n    /**\n     * Gets the parent JDOM member\n     * @category JDOM\n     */\n    readonly member: JDServiceMemberNode\n    /**\n     * Gets the index in the unpacked data payload\n     * @category Specification\n     */\n    readonly index: number\n    /**\n     * Gets the field specification\n     * @category Specification\n     */\n    readonly specification: jdspec.PacketMember\n\n    /**\n     * @internal\n     */\n    constructor(\n        member: JDServiceMemberNode,\n        index: number,\n        specification: jdspec.PacketMember,\n    ) {\n        super()\n        this.member = member\n        this.index = index\n        this.specification = specification\n    }\n\n    /**\n     * Gets the JDOM node identifier\n     * @category JDOM\n     */\n    get id(): string {\n        return `${this.nodeKind}:${\n            this.member.service.device.deviceId\n        }:${this.member.service.serviceIndex.toString(\n            16,\n        )}:${this.member.code.toString(16)}:${this.index.toString(16)}`\n    }\n\n    /**\n     * Gets the JDOM name\n     * @category JDOM\n     */\n    get name(): string {\n        return this.specification.name === \"_\"\n            ? this.member.specification.name\n            : this.specification.name\n    }\n\n    /**\n     * @internal\n     */\n    get children(): JDNode[] {\n        return []\n    }\n\n    /**\n     * Gets the JDOM qualified name\n     * @category JDOM\n     */\n    get qualifiedName(): string {\n        return `${this.member.qualifiedName}.${this.name}`\n    }\n\n    /**\n     * Gets the JDOM parent\n     * @category JDOM\n     */\n    get parent(): JDNode {\n        return this.member\n    }\n\n    /**\n     * Gets the JDOM friendly name\n     * @category JDOM\n     */\n    get friendlyName() {\n        const parts = [this.member.friendlyName]\n        if (this.specification.name !== \"_\") parts.push(this.name)\n        return parts.join(\".\")\n    }\n\n    /**\n     * @internal\n     */\n    get dataTypeName(): string {\n        const parts = [this.member.service.specification.shortName, this.name]\n        return parts.join(\".\")\n    }\n\n    /**\n     * Gets the unit of the data stored in the field\n     * @category Data\n     */\n    get unit(): jdspec.Unit {\n        return this.specification.unit\n    }\n\n    /**\n     * Gets ``FIELD_NODE_NAME``\n     * @category JDOM\n     */\n    get nodeKind(): string {\n        return FIELD_NODE_NAME\n    }\n\n    /**\n     * @internal\n     */\n    get decoded(): DecodedMember {\n        const decoded = this.member.decoded\n        return decoded?.decoded[this.index]\n    }\n\n    /**\n     * Gets the decoded field value\n     * @category Data\n     */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    get value(): any {\n        return this.decoded?.value\n    }\n}\n", "import { PackedSimpleValue, PackedValues } from \"./pack\"\n\n/**\n * Unpacked data mapped as an object\n * @category Data Packing\n */\nexport interface PackedObject {\n    [index: string]: PackedSimpleValue | PackedObject | PackedObject[]\n}\n\n/**\n * Unrolls an array of packed values into a friendly object structure\n * @param data\n * @param fields\n * @returns\n * @category Data Packing\n */\nexport function unpackedToObject(\n    data: PackedValues,\n    fields: jdspec.PacketMember[],\n    defaultName?: string,\n): PackedObject {\n    if (!data || !fields) return undefined\n    const r: PackedObject = {}\n    for (let i = 0; i < data.length; ++i) {\n        const field = fields[i]\n        const value = data[i]\n        const { name, startRepeats } = field\n        const prettyName = name === \"_\" && defaultName ? defaultName : name\n\n        if (startRepeats) {\n            const repeatFields = fields.slice(i)\n            //console.log({ value, repeatFields, data })\n            r[\"repeat\"] = value.map((rdata: PackedValues) => {\n                const r: PackedObject = {}\n                for (let i = 0; i < repeatFields.length; ++i) {\n                    const field = fields[i]\n                    const value = rdata[i]\n                    const { name } = field\n                    const prettyName =\n                        name === \"_\" && defaultName ? defaultName : name\n                    r[prettyName] = value\n                }\n                return r\n            })\n            break\n        } else r[prettyName] = value\n    }\n    return r\n}\n\n/**\n * Converts an object structure into a flat packed data array\n * @param pkt\n * @param msg\n * @returns\n * @category Data Packing\n */\nexport function objectToUnpacked(\n    pkt: jdspec.PacketInfo,\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    msg: any,\n): PackedValues {\n    if (!msg) return []\n\n    if (typeof msg === \"number\" || typeof msg === \"string\")\n        return [msg as number]\n    else if (typeof msg === \"boolean\") return [msg ? 1 : 0]\n    else if (Array.isArray(msg)) {\n        // assume a packaged layout\n        return msg as PackedValues\n    } else {\n        const { fields } = pkt\n        const r: PackedValues = []\n        for (let i = 0; i < fields.length; ++i) {\n            const field = fields[i]\n            const name = field.name === \"_\" ? pkt.name : field.name\n            const value = msg[name]\n            if (field.startRepeats) {\n                const repeatFields = fields.slice(i)\n                r.push(\n                    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                    (value as any[]).map(vrow => {\n                        const arow: PackedSimpleValue[] = []\n                        for (let j = 0; j < repeatFields.length; ++j) {\n                            const rfield = repeatFields[j]\n                            const rname = rfield.name\n                            arow.push(vrow[rname])\n                        }\n                        return arow\n                    }),\n                )\n                break\n            } else {\n                r.push(value)\n            }\n        }\n\n        return r\n    }\n}\n", "import { Packet } from \"./packet\"\nimport {\n    CMD_SET_REG,\n    REPORT_RECEIVE,\n    REPORT_UPDATE,\n    CHANGE,\n    CMD_GET_REG,\n    REGISTER_NODE_NAME,\n    REGISTER_REFRESH_TIMEOUT,\n    REGISTER_REFRESH_RETRY_1,\n    REGISTER_REFRESH_RETRY_0,\n    GET_ATTEMPT,\n} from \"./constants\"\nimport { JDService } from \"./service\"\nimport { intOfBuffer, uintOfBuffer } from \"./buffer\"\nimport { bufferEq, toHex, fromUTF8, uint8ArrayToString } from \"./utils\"\nimport { DecodedPacket } from \"./pretty\"\nimport { isConstRegister, isRegister } from \"./spec\"\nimport { JDField } from \"./field\"\nimport { JDServiceMemberNode } from \"./servicemembernode\"\nimport { JDNode } from \"./node\"\nimport { jdpack, jdunpack, PackedValues } from \"./pack\"\nimport { PackedObject, unpackedToObject } from \"./packobject\"\n\n/**\n * A Jacdac register client.\n * @category JDOM\n */\nexport class JDRegister extends JDServiceMemberNode {\n    private _lastReportPkt: Packet\n    private _fields: JDField[]\n    private _lastSetTimestamp = -Infinity\n    private _lastGetTimestamp = -Infinity\n    private _lastGetAttempts = 0\n    private _needsRefresh = false\n\n    /**\n     * @internal\n     */\n    constructor(service: JDService, code: number) {\n        super(service, code, isRegister)\n    }\n\n    /**\n     * Clears all cached data from the register\n     */\n    clearData() {\n        this._lastReportPkt = undefined\n        this._lastGetTimestamp = -Infinity\n        this._lastGetAttempts = 0\n        this.emit(REPORT_RECEIVE, this)\n        this.emitPropagated(REPORT_UPDATE, this)\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Returns ``REGISTER_NODE_NAME``\n     * @category JDOM\n     */\n    get nodeKind() {\n        return REGISTER_NODE_NAME\n    }\n\n    /**\n     * Gets the list of field, if the specification is known\n     * @category JDOM\n     */\n    get fields() {\n        if (!this._fields)\n            this._fields = this.specification?.fields.map(\n                (field, index) => new JDField(this, index, field),\n            )\n        return this._fields.slice()\n    }\n\n    /**\n     * Gets the list of fields\n     * @category JDOM\n     */\n    get children(): JDNode[] {\n        return this.fields\n    }\n\n    /**\n     * Timestamp of the last ``register set`` packet\n     * @category Packets\n     */\n    get lastSetTimestamp() {\n        return this._lastSetTimestamp\n    }\n\n    /**\n     * Timestamp of the last ``register get`` packet\n     * @category Packets\n     */\n    get lastGetTimestamp() {\n        return this._lastGetTimestamp\n    }\n\n    /**\n     * Clears the get timestamp\n     * @internal\n     * @category Packets\n     */\n    clearGetTimestamp() {\n        this._lastGetTimestamp = -Infinity\n    }\n\n    /**\n     * Number of attempts to send a ``get`` packet without response\n     * @category Packets\n     */\n    get lastGetAttempts() {\n        return this._lastGetAttempts\n    }\n\n    /**\n     * Send a message to set the register value\n     * @param data packed data\n     * @param autoRefresh immediately send a ``get`` packet\n     * @returns\n     * @category Packets\n     */\n    async sendSetAsync(data: Uint8Array, autoRefresh?: boolean): Promise<void> {\n        if (this.notImplemented) return\n\n        const cmd = CMD_SET_REG | this.code\n        const pkt = Packet.from(cmd, data)\n        this._lastSetTimestamp = this.service.device.bus.timestamp\n        await this.service.sendPacketAsync(pkt, this.service.registersUseAcks)\n        if (autoRefresh) this.scheduleRefresh()\n    }\n\n    /**\n     * Requests the value of the register by sending a ``get`` packet\n     * @returns\n     * @category Packets\n     */\n    sendGetAsync(): Promise<void> {\n        if (this.notImplemented) return Promise.resolve()\n        if (isConstRegister(this.specification) && !!this.data)\n            return Promise.resolve()\n\n        this._lastGetTimestamp = this.service.device.bus.timestamp\n        this._lastGetAttempts++\n        const cmd = CMD_GET_REG | this.code\n        return this.service\n            .sendCmdAsync(cmd, undefined, this.service.registersUseAcks)\n            .then(() => {\n                this.emit(GET_ATTEMPT)\n            })\n    }\n\n    /**\n     * Send a message to set the register value\n     * @param values message to pack and send\n     * @param autoRefresh immediately send a ``get`` packet\n     * @category Packets\n     */\n    sendSetPackedAsync(\n        values: PackedValues,\n        autoRefresh?: boolean,\n    ): Promise<void> {\n        const fmt = this.specification?.packFormat\n        if (!fmt) throw new Error(\"unknown register data format\")\n        return this.sendSetAsync(jdpack(fmt, values), autoRefresh)\n    }\n\n    /**\n     * Sends a message to set the register value as a bpolean\n     * @param value\n     * @param autoRefresh\n     * @param autoRefresh immediately send a ``get`` packet\n     * @category Packets\n     */\n    sendSetBoolAsync(value: boolean, autoRefresh?: boolean): Promise<void> {\n        return this.sendSetPackedAsync([value ? 1 : 0], autoRefresh)\n    }\n\n    /**\n     * Sends a message to set the register value as a string\n     * @param value\n     * @param autoRefresh\n     * @param autoRefresh immediately send a ``get`` packet\n     * @category Packets\n     */\n    sendSetStringAsync(value: string, autoRefresh?: boolean): Promise<void> {\n        return this.sendSetPackedAsync([value || \"\"], autoRefresh)\n    }\n\n    /**\n     * Gets the raw data from the last report packet\n     * @category Data\n     */\n    get data() {\n        return this._lastReportPkt?.data\n    }\n\n    /**\n     * Gets the timestamp when received the last report with data\n     * @category Data\n     */\n    get lastDataTimestamp() {\n        return this._lastReportPkt?.timestamp\n    }\n\n    /**\n     * Get the data from the last report packet, unpacked according to the specification.\n     * @category Data\n     */\n    get unpackedValue(): PackedValues {\n        const d = this.data\n        const fmt = this.specification?.packFormat\n        try {\n            return d && fmt && jdunpack(this.data, fmt)\n        } catch (e) {\n            console.error(e)\n            return undefined\n        }\n    }\n\n    /**\n     * Gets the data from the last report packet, unpacked and hydrated into an object.\n     * @category Data\n     */\n    get objectValue(): PackedObject {\n        const { specification } = this\n        return unpackedToObject(\n            this.unpackedValue,\n            specification?.fields,\n            specification.name,\n        )\n    }\n\n    /**\n     * Gets the data as a signed integer\n     * @category Data\n     */\n    get intValue(): number {\n        const d = this.data\n        return d && intOfBuffer(d)\n    }\n\n    /**\n     * Gets the data as a unsigned integer\n     * @category Data\n     */\n    get uintValue(): number {\n        const d = this.data\n        return d && uintOfBuffer(d)\n    }\n\n    /**\n     * Gets the data as a boolean\n     * @category Data\n     */\n    get boolValue(): boolean {\n        if (this.data === undefined) return undefined\n        return !!this.intValue\n    }\n\n    /**\n     * Gets the data as a string\n     * @category Data\n     */\n    get stringValue(): string {\n        const buf = this.data\n        if (buf === undefined) return undefined\n\n        let value: string\n        try {\n            value = fromUTF8(uint8ArrayToString(buf))\n        } catch {\n            // invalid UTF8\n            value = uint8ArrayToString(buf)\n        }\n        return value\n    }\n\n    /**\n     * Gets a pretty printed represention of the data\n     * @category Data\n     */\n    get humanValue(): string {\n        return this.decoded?.decoded?.map(field => field.humanValue).join(\",\")\n    }\n\n    /**\n     * @internal\n     */\n    toString() {\n        const d = this.data\n        return `${this.id} ${d ? toHex(d) : \"\"}`\n    }\n\n    /**\n     * @internal\n     */\n    get decoded(): DecodedPacket {\n        return this._lastReportPkt?.decoded\n    }\n\n    /**\n     * Schedules to query the value for this register\n     */\n    scheduleRefresh() {\n        if (this.notImplemented) return\n        this._needsRefresh = true\n    }\n\n    get needsRefresh() {\n        return this._needsRefresh\n    }\n\n    /**\n     * Refresh the value of the register within a timeout\n     * @param skipIfValue don't refresh if any data if available\n     * @returns true if refresh OK, false if timeout or other error\n     * @category Data\n     */\n    refresh(skipIfValue?: boolean): Promise<boolean> {\n        // don't refetch not implemented\n        if (this.notImplemented) return Promise.resolve(false)\n        // don't refetch consts\n        // don't refetch if already data\n        if (!!this.data && (skipIfValue || isConstRegister(this.specification)))\n            return Promise.resolve(true)\n\n        const bus = this.service.device.bus\n        return bus.withTimeout(\n            REGISTER_REFRESH_TIMEOUT,\n            new Promise<boolean>((resolve, reject) => {\n                this.once(REPORT_RECEIVE, () => {\n                    const f = resolve\n                    resolve = null\n                    f(true)\n                })\n                // re-send get if no answer within 40ms and 90ms\n                this.sendGetAsync()\n                    .then(() => bus.delay(REGISTER_REFRESH_RETRY_0))\n                    .then(() => {\n                        if (resolve)\n                            return this.sendGetAsync().then(() =>\n                                bus.delay(REGISTER_REFRESH_RETRY_1),\n                            )\n                    })\n                    .then(() => {\n                        if (resolve) return this.sendGetAsync()\n                    })\n                    .catch(e => reject(e))\n            }),\n        )\n    }\n\n    /**\n     * @internal\n     */\n    processPacket(pkt: Packet) {\n        if (this.notImplemented) return\n        if (pkt.isRegisterGet) this.processReport(pkt)\n        else if (pkt.isRegisterSet) {\n            // another device sent a set packet to this register\n            // so most likely it's value changed\n            // clear any data caching to force updating the value\n            this.clearGetTimestamp()\n        }\n    }\n\n    setNotImplemented() {\n        console.assert(\n            !this._lastReportPkt,\n            `register reported changed not implemented`,\n            { register: this },\n        )\n        super.setNotImplemented()\n    }\n\n    private processReport(pkt: Packet) {\n        const updated = !bufferEq(this.data, pkt.data) || this._needsRefresh\n        this._lastReportPkt = pkt\n        this._lastGetAttempts = 0 // reset counter\n        this._lastGetTimestamp = this.service.device.bus.timestamp // reset time counter too\n        this._needsRefresh = false\n        this.emit(REPORT_RECEIVE, this)\n        if (updated) {\n            this.emitPropagated(REPORT_UPDATE, this)\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * @internal\n     */\n    compareTo(b: JDRegister) {\n        return this.code - b.code || this.service.compareTo(b.service)\n    }\n}\n", "import { JDNode } from \"./node\"\nimport { JDService } from \"./service\"\nimport { Packet } from \"./packet\"\nimport { CHANGE, EVENT, EVENT_NODE_NAME } from \"./constants\"\nimport { isEvent } from \"./spec\"\nimport { JDServiceMemberNode } from \"./servicemembernode\"\nimport { DecodedPacket } from \"./pretty\"\nimport { JDField } from \"./field\"\n\n/**\n * A Jacdac event client.\n * @category JDOM\n */\nexport class JDEvent extends JDServiceMemberNode {\n    private _lastReportPkt: Packet\n    private _fields: JDField[]\n    private _count = 0\n\n    /**\n     * @internal\n     */\n    constructor(service: JDService, code: number) {\n        super(service, code, isEvent)\n    }\n\n    /**\n     * Returns the ``EVENT_NODE_NAME`` identifier\n     * @category JDOM\n     */\n    get nodeKind() {\n        return EVENT_NODE_NAME\n    }\n\n    /**\n     * Gets the field node\n     * @category Service Clients\n     */\n    get fields() {\n        if (!this._fields)\n            this._fields = this.specification?.fields.map(\n                (field, index) => new JDField(this, index, field),\n            )\n        return this._fields.slice()\n    }\n\n    /**\n     * Gets the list of fields\n     * @category JDOM\n     */\n    get children(): JDNode[] {\n        return this.fields\n    }\n\n    /**\n     * Gets the raw data attached to the last event packet\n     * @category Data\n     */\n    get data() {\n        return this._lastReportPkt?.data\n    }\n\n    /**\n     * Gets the unpacked data attached to the last event packet, if the event specification is known.\n     * @category Data\n     */\n    get unpackedValue() {\n        const { packFormat } = this.specification || {}\n        return packFormat && this._lastReportPkt?.jdunpack(packFormat)\n    }\n\n    /**\n     * Gets a counter of occurences for this event.\n     * @category Data\n     */\n    get count() {\n        return this._count\n    }\n\n    /**\n     * Gets the timestamp of the last packet with data received for this event.\n     * @category Data\n     */\n    get lastDataTimestamp() {\n        return this._lastReportPkt?.timestamp\n    }\n    /**\n     * @internal\n     */\n    get decoded(): DecodedPacket {\n        return this._lastReportPkt?.decoded\n    }\n\n    /**\n     * @internal\n     */\n    processEvent(pkt: Packet) {\n        this._lastReportPkt = pkt\n        this._count++\n        this.emitPropagated(EVENT, this)\n        this.emit(CHANGE)\n    }\n}\n", "import { JDDevice } from \"./device\"\nimport { Packet } from \"./packet\"\nimport { serviceShortIdOrClass } from \"./pretty\"\nimport { JDRegister } from \"./register\"\nimport {\n    PACKET_RECEIVE,\n    PACKET_SEND,\n    SERVICE_NODE_NAME,\n    REPORT_RECEIVE,\n    SERVICE_CLIENT_ADDED,\n    SERVICE_CLIENT_REMOVED,\n    CHANGE,\n    ROLE_CHANGE,\n    CMD_REG_MASK,\n    CMD_GET_REG,\n    CMD_SET_REG,\n    COMMAND_RECEIVE,\n    ERROR_TIMEOUT,\n} from \"./constants\"\nimport { JDNode } from \"./node\"\nimport {\n    serviceSpecificationFromClassIdentifier,\n    isRegister,\n    isReading,\n    isEvent,\n    isValue,\n    isIntensity,\n    isOptionalReadingRegisterCode,\n} from \"./spec\"\nimport { JDEvent } from \"./event\"\nimport { strcmp } from \"./utils\"\nimport {\n    BaseEvent,\n    BaseReg,\n    SystemCmd,\n    SystemEvent,\n    SystemReg,\n} from \"../../jacdac-spec/dist/specconstants\"\nimport { JDServiceClient } from \"./serviceclient\"\nimport { InPipeReader } from \"./pipes\"\nimport { jdpack, jdunpack, PackedValues } from \"./pack\"\nimport { Flags } from \"./flags\"\nimport { isMixinService } from \"../../jacdac-spec/spectool/jdutils\"\nimport { JDServiceServer } from \"./servers/serviceserver\"\nimport { JDError } from \"./error\"\n\n/**\n * A Jacdac service client hosting registers, events.\n * @category JDOM\n */\nexport class JDService extends JDNode {\n    /**\n     * Gets the service class\n     * @category Control\n     */\n    readonly serviceClass: number\n    private _role: string\n    private _registers: JDRegister[]\n    private _events: JDEvent[]\n    private _reports: Packet[] = []\n    private _specification: jdspec.ServiceSpec = null\n    // packets received since last announce\n    public registersUseAcks = false\n    private readonly _clients: JDServiceClient[] = []\n\n    private _twin: JDServiceServer\n\n    /**\n     * Gets the device this service belongs to\n     * @category JDOM\n     */\n    public readonly device: JDDevice\n    /**\n     * Gets the service index in the service list\n     * @category Control\n     */\n    public readonly serviceIndex: number\n\n    /**\n     * @internal\n     */\n    constructor(device: JDDevice, serviceIndex: number) {\n        super()\n        this.device = device\n        this.serviceIndex = serviceIndex\n        this.serviceClass = this.device.serviceClassAt(this.serviceIndex)\n\n        const statusCodeChanged = this.event(BaseEvent.StatusCodeChanged)\n        statusCodeChanged.on(CHANGE, () => {\n            const statusCode = this.register(BaseReg.StatusCode)\n            statusCode?.scheduleRefresh()\n        })\n    }\n\n    get disposed() {\n        return this.device.service(this.serviceIndex) !== this\n    }\n\n    /**\n     * Gets the node identifier\n     * @category JDOM\n     */\n    get id() {\n        return `${this.nodeKind}:${\n            this.device.deviceId\n        }:${this.serviceIndex.toString(16)}`\n    }\n\n    /**\n     * Gets the ``SERVICE_NODE_NAME`` identifier\n     * @category JDOM\n     */\n    get nodeKind() {\n        return SERVICE_NODE_NAME\n    }\n\n    /**\n     * Gets the service name\n     * @category JDOM\n     */\n    get name() {\n        return serviceShortIdOrClass(this.serviceClass, \"x\").toLowerCase()\n    }\n\n    /**\n     * Gets the service name and parent names and service instance index\n     * @category JDOM\n     */\n    get friendlyName() {\n        const { instanceName, serviceInstanceIndex } = this\n        let r = `${this.device.friendlyName}.${this.name}`\n        if (instanceName) r += `.${instanceName}`\n        else if (serviceInstanceIndex > 0) r += `[${serviceInstanceIndex}]`\n        return r\n    }\n\n    /**\n     * Gets the service qualified name and service instance index\n     * @category JDOM\n     */\n    get qualifiedName() {\n        return `${this.device.qualifiedName}.${this.name}[${this.serviceInstanceIndex}]`\n    }\n\n    /**\n     * Gets the index of this service class instance. Provides a stable ordering into a list of services.\n     */\n    get serviceInstanceIndex() {\n        return this.device\n            .services({ serviceClass: this.serviceClass })\n            .indexOf(this)\n    }\n\n    /**\n     * Gets the device holding the service\n     * @category JDOM\n     */\n    get parent(): JDNode {\n        return this.device\n    }\n\n    get role(): string {\n        return this._role\n    }\n\n    set role(value: string) {\n        if (value !== this._role) {\n            this._role = value\n            this.emit(ROLE_CHANGE)\n            this.emit(CHANGE)\n        }\n    }\n\n    report(identifier: number) {\n        return this._reports.find(r => r.registerIdentifier === identifier)\n    }\n\n    get reports() {\n        return this._reports.slice(0)\n    }\n\n    get mixins() {\n        // find all 0x2 services follow this service\n        const r = []\n        const { serviceClasses, serviceLength } = this.device\n        for (\n            let i = this.serviceIndex + 1;\n            i < serviceLength && isMixinService(serviceClasses[i]);\n            ++i\n        ) {\n            r.push(this.device.service(i))\n        }\n        return r\n    }\n\n    get isMixin() {\n        return isMixinService(this.serviceClass)\n    }\n\n    get twin(): JDServiceServer {\n        return this._twin\n    }\n\n    set twin(server: JDServiceServer) {\n        if (this._twin === server) return\n\n        if (this._twin) this._twin.twin = undefined\n        this._twin = server\n        server.twin = this\n        this.emit(CHANGE)\n    }\n\n    private _readingRegister: JDRegister\n    /**\n     * Gets the ``reading`` register associated to this service, if the specification supports it.\n     * @category Registers\n     */\n    get readingRegister(): JDRegister {\n        if (!this._readingRegister) {\n            const pkt = this.specification?.packets.find(pkt => isReading(pkt))\n            this._readingRegister = pkt && this.register(pkt.identifier)\n        }\n        return this._readingRegister\n    }\n\n    private _valueRegister: JDRegister\n    /**\n     * Gets the ``value`` register associated to this service, if the specification supports it.\n     * @category Registers\n     */\n    get valueRegister(): JDRegister {\n        if (!this._valueRegister) {\n            const pkt = this.specification?.packets.find(pkt => isValue(pkt))\n            this._valueRegister = pkt && this.register(pkt.identifier)\n        }\n        return this._valueRegister\n    }\n\n    private _intensityRegister: JDRegister\n    /**\n     * Gets the ``intensity`` register associated to this service, if the specification supports it.\n     * @category Registers\n     */\n    get intensityRegister(): JDRegister {\n        if (!this._intensityRegister) {\n            const pkt = this.specification?.packets.find(pkt =>\n                isIntensity(pkt),\n            )\n            this._intensityRegister = pkt && this.register(pkt.identifier)\n        }\n        return this._intensityRegister\n    }\n\n    /**\n     * Gets the service instance name, if resolved\n     * @category Control\n     */\n    get instanceName() {\n        const r = this.register(SystemReg.InstanceName)\n        return r?.stringValue\n    }\n\n    /**\n     * Resolves the service instance name, if resolved\n     * @category Control\n     */\n    async resolveInstanceName() {\n        const r = this.register(SystemReg.InstanceName)\n        await r?.refresh()\n        return r?.stringValue\n    }\n\n    /**\n     * Gets the specification of the service. Undefined if unknown\n     * @category Services\n     */\n    get specification() {\n        if (this._specification === null)\n            this._specification = serviceSpecificationFromClassIdentifier(\n                this.serviceClass,\n            )\n        return this._specification\n    }\n\n    get events() {\n        return (\n            this.specification?.packets\n                .filter(isEvent)\n                .map(info => this.event(info.identifier)) || []\n        )\n    }\n\n    /**\n     * Gets the list of registers in the service\n     * @param options\n     * @returns\n     */\n    registers(options?: { ignoreNacks?: boolean }) {\n        if (!this._registers) {\n            const spec = this.specification\n            this._registers = (spec?.packets || [])\n                .filter(isRegister)\n                .map(pkt => new JDRegister(this, pkt.identifier))\n        }\n\n        let regs = this._registers.slice(0)\n        if (options?.ignoreNacks) regs = regs.filter(r => !r.notImplemented)\n        return regs\n    }\n\n    /**\n     * Gets the registers and events\n     * @category JDOM\n     */\n    get children(): JDNode[] {\n        return [...this.registers(), ...this.events]\n    }\n\n    /**\n     * Gets a register for the given code\n     * @param registerCode register identifier as found in the specification\n     * @returns a register instance (if found in specifiaction)\n     * @category Registers\n     */\n    register(registerCode: number): JDRegister {\n        if (isNaN(registerCode)) return undefined\n        // cache known registers\n        this.registers()\n        let register = this._registers.find(reg => reg.code === registerCode)\n        // we may not have a spec.\n        if (!register) {\n            const spec = this.specification\n            if (\n                spec &&\n                !spec.packets.some(\n                    pkt => isRegister(pkt) && pkt.identifier === registerCode,\n                )\n            ) {\n                if (\n                    Flags.diagnostics &&\n                    !isOptionalReadingRegisterCode(registerCode)\n                )\n                    console.debug(\n                        `attempting to access register ${this}.${\n                            SystemReg[registerCode] ||\n                            `0x${registerCode.toString(16)}`\n                        }`,\n                    )\n                return undefined\n            }\n            this._registers.push(\n                (register = new JDRegister(this, registerCode)),\n            )\n        }\n        return register\n    }\n\n    /**\n     * Gets an event for the given code\n     * @param eventCode event identifier as found in the specification\n     * @returns a event instance (if found in specifiaction)\n     * @category Events\n     */\n    event(eventCode: number): JDEvent {\n        if (isNaN(eventCode)) return undefined\n\n        if (!this._events) this._events = []\n        let event = this._events.find(ev => ev.code === eventCode)\n        if (!event) {\n            const spec = this.specification\n            if (\n                spec &&\n                !spec.packets.some(\n                    pkt => isEvent(pkt) && pkt.identifier === eventCode,\n                )\n            ) {\n                if (Flags.diagnostics)\n                    console.debug(\n                        `attempting to access event ${\n                            SystemEvent[eventCode] ||\n                            `0x${eventCode.toString(16)}`\n                        }`,\n                    )\n                return undefined\n            }\n            this._events.push((event = new JDEvent(this, eventCode)))\n        }\n        return event\n    }\n\n    /**\n     * Send packet to the service server\n     * @param pkt packet to send\n     * @param ack acknolegment required\n     * @category Packets\n     */\n    async sendPacketAsync(pkt: Packet, ack?: boolean) {\n        pkt.device = this.device\n        pkt.serviceIndex = this.serviceIndex\n        if (ack !== undefined) pkt.requiresAck = !!ack\n        if (pkt.requiresAck) await this.device.sendPktWithAck(pkt)\n        else await pkt.sendCmdAsync(this.device)\n        this.emit(PACKET_SEND, pkt)\n    }\n\n    /**\n     * Send a command to the service server\n     * @param pkt packet to send\n     * @param ack acknolegment required\n     * @category Packets\n     */\n    sendCmdAsync(cmd: number, data?: Uint8Array, ack?: boolean) {\n        const pkt = data ? Packet.from(cmd, data) : Packet.onlyHeader(cmd)\n        return this.sendPacketAsync(pkt, ack)\n    }\n\n    /**\n     * Packs values and sends command to the service server\n     * @param cmd packet to send\n     * @param values unpacked values, layed as specified\n     * @param ack acknolegment required\n     * @category Packets\n     */\n    sendCmdPackedAsync<TValues extends PackedValues>(\n        cmd: number,\n        values?: TValues,\n        ack?: boolean,\n    ) {\n        const spec = this.specification.packets.find(\n            pkt => pkt.kind === \"command\" && pkt.identifier === cmd,\n        )\n        const packFormat = spec?.packFormat\n        if (!packFormat) throw new Error(\"Unknown packing format\")\n        const data = values ? jdpack(packFormat, values) : undefined\n        return this.sendCmdAsync(cmd, data, ack)\n    }\n\n    /**\n     * Send a command and await response to the service server\n     * @param pkt packet to send\n     * @param ack acknolegment required\n     * @category Packets\n     */\n    sendCmdAwaitResponseAsync(pkt: Packet, timeout = 500) {\n        const { bus } = this.device\n        return new Promise<Packet>((resolve, reject) => {\n            const handleRes = (resp: Packet) => {\n                if (resp.serviceCommand == pkt.serviceCommand) {\n                    this.off(REPORT_RECEIVE, handleRes)\n                    if (resolve) resolve(resp)\n                    resolve = null\n                }\n            }\n            bus.delay(timeout).then(() => {\n                if (!resolve) return\n                resolve = null\n                this.off(REPORT_RECEIVE, handleRes)\n                reject(\n                    new JDError(\n                        `timeout (${timeout}ms) waiting for response to ${pkt}`,\n                        { code: ERROR_TIMEOUT },\n                    ),\n                )\n            })\n\n            // the handler removed either upon timeout,\n            // or on first invocation of handleRes()\n            this.on(REPORT_RECEIVE, handleRes)\n\n            // need to add handler first, in case this doesn't return before packet is sent and response is received\n            this.sendPacketAsync(pkt)\n        })\n    }\n\n    /**\n     * @internal\n     */\n    processPacket(pkt: Packet) {\n        this.emit(PACKET_RECEIVE, pkt)\n        if (pkt.isRepeatedEvent) return\n        if (pkt.isReport) {\n            this.emit(REPORT_RECEIVE, pkt)\n            if (pkt.isRegisterGet) {\n                const id = pkt.registerIdentifier\n                const reg = this.register(id)\n                if (reg) reg.processPacket(pkt)\n            } else if (pkt.isEvent) {\n                const ev = this.event(pkt.eventCode)\n                if (ev) ev.processEvent(pkt)\n            } else if (pkt.serviceCommand === SystemCmd.CommandNotImplemented) {\n                const [serviceCommand, packetCrc] =\n                    pkt.jdunpack<[number, number]>(\"u16 u16\")\n                if (\n                    serviceCommand >> 12 === CMD_GET_REG >> 12 ||\n                    serviceCommand >> 12 === CMD_SET_REG >> 12\n                ) {\n                    const regCode = serviceCommand & CMD_REG_MASK\n                    const reg = this.registers().find(r => r.code === regCode)\n                    reg?.setNotImplemented()\n                }\n            } else if (pkt.isCommand) {\n                // this is a report...\n                //console.log(\"cmd report\", { pkt })\n            }\n        } else if (pkt.isRegisterSet) {\n            const id = pkt.registerIdentifier\n            const reg = this.register(id)\n            if (reg) reg.processPacket(pkt)\n        } else if (pkt.isCommand) {\n            this.emit(COMMAND_RECEIVE, pkt)\n        }\n    }\n\n    /**\n     * @internal\n     */\n    compareTo(b: JDService): number {\n        return (\n            this.serviceClass - b.serviceClass ||\n            strcmp(this.device.deviceId, b.device.deviceId) ||\n            this.serviceIndex - b.serviceIndex\n        )\n    }\n\n    get clients(): JDServiceClient[] {\n        return this._clients?.slice(0) || []\n    }\n\n    addClient(client: JDServiceClient) {\n        if (client && this._clients.indexOf(client) < 0) {\n            this._clients.push(client)\n            this.emit(SERVICE_CLIENT_ADDED, client)\n        }\n    }\n\n    removeClient(client: JDServiceClient) {\n        const i = this._clients.indexOf(client)\n        if (i > -1) {\n            this._clients.splice(i, 1)\n            this.emit(SERVICE_CLIENT_REMOVED, client)\n        }\n    }\n\n    async receiveWithInPipe<TValues extends PackedValues>(\n        cmd: number,\n        packFormat: string,\n        timeout?: number,\n    ) {\n        const inp = new InPipeReader(this.device.bus)\n        await this.sendPacketAsync(inp.openCommand(cmd), true)\n        const recv: TValues[] = []\n        for (const buf of await inp.readData(timeout)) {\n            const values = jdunpack<TValues>(buf, packFormat)\n            recv.push(values)\n        }\n        return recv\n    }\n}\n", "import { CHANGE, ControlCmdPack } from \"./constants\"\nimport { JDEventSource } from \"./eventsource\"\nimport { jdpack, jdunpack } from \"./pack\"\nimport { Packet } from \"./packet\"\nimport { JDService } from \"./service\"\n\nfunction trgbToValues(trgb: number) {\n    return [\n        (trgb >> 16) & 0xff,\n        (trgb >> 8) & 0xff,\n        trgb & 0xff,\n        (trgb >> 24) & 0xff,\n    ]\n}\n\nexport class LEDController extends JDEventSource {\n    private _color: number\n    private _announces = 0\n\n    constructor(\n        public readonly service: JDService,\n        public readonly command: number,\n    ) {\n        super()\n    }\n\n    get color(): number {\n        return this._color\n    }\n\n    async setColor(color: number) {\n        if (color !== this._color) {\n            this._color = color\n            this._announces = 0\n\n            if (this._color !== undefined) {\n                const data = jdpack(\n                    ControlCmdPack.SetStatusLight,\n                    trgbToValues(color),\n                )\n                await this.service.sendCmdAsync(this.command, data)\n            }\n            this.emit(CHANGE)\n        }\n    }\n\n    async blink(from: number, to: number, interval: number, repeat: number) {\n        const { bus } = this.service.device\n        for (let i = 0; i < repeat; ++i) {\n            await this.setColor(from)\n            await bus.delay(interval - 1)\n            await this.setColor(to)\n            await bus.delay(interval - 1)\n        }\n    }\n\n    processAnnouncement() {\n        if (this._color === undefined) return\n        this._announces++\n        if (this._announces > 2) {\n            // jacdac will blink at least once per announce cycle\n            this._color = undefined\n            this._announces = 0\n            this.emit(CHANGE)\n        }\n    }\n\n    processPacket(pkt: Packet) {\n        const [toRed, toGreen, toBlue] = jdunpack<\n            [number, number, number, number]\n        >(pkt.data, ControlCmdPack.SetStatusLight)\n        this._color = (toRed << 16) | (toGreen << 8) | toBlue\n        this.emit(CHANGE)\n    }\n}\n", "import { Packet } from \"./packet\"\nimport {\n    JD_SERVICE_INDEX_CTRL,\n    DEVICE_ANNOUNCE,\n    DEVICE_CHANGE,\n    ANNOUNCE,\n    DISCONNECT,\n    JD_ADVERTISEMENT_0_COUNTER_MASK,\n    DEVICE_RESTART,\n    RESTART,\n    CHANGE,\n    PACKET_RECEIVE,\n    PACKET_REPORT,\n    PACKET_EVENT,\n    DEVICE_FIRMWARE_INFO,\n    ControlCmd,\n    DEVICE_NODE_NAME,\n    LOST,\n    DEVICE_LOST,\n    DEVICE_FOUND,\n    FOUND,\n    ACK_MIN_DELAY,\n    ACK_MAX_DELAY,\n    ControlReg,\n    USB_TRANSPORT,\n    PACKETIO_TRANSPORT,\n    META_ACK_FAILED,\n    ControlAnnounceFlags,\n    IDENTIFY_DURATION,\n    PACKET_ANNOUNCE,\n    BLUETOOTH_TRANSPORT,\n    ERROR,\n    SRV_CONTROL,\n    SRV_LOGGER,\n    REPORT_UPDATE,\n    SERIAL_TRANSPORT,\n    WEBSOCKET_TRANSPORT,\n    DEVICE_PACKET_ANNOUNCE,\n    SRV_PROXY,\n    SRV_UNIQUE_BRAIN,\n    CMD_EVENT_COUNTER_MASK,\n    SRV_BOOTLOADER,\n    ERROR_NO_ACK,\n} from \"./constants\"\nimport { read32, bufferEq, read16 } from \"./utils\"\nimport { getNumber, NumberFormat } from \"./buffer\"\nimport { BusInteractionMode, JDBus } from \"./bus\"\nimport { JDService } from \"./service\"\nimport { serviceClass, shortDeviceId } from \"./pretty\"\nimport { JDNode } from \"./node\"\nimport { isInstanceOf, isSensor } from \"./spec\"\nimport { FirmwareInfo, FirmwareUpdater } from \"./flashing\"\nimport { LEDController } from \"./ledcontroller\"\nimport { JDEventSource } from \"./eventsource\"\nimport { ServiceFilter } from \"./filters/servicefilter\"\nimport { randomDeviceId } from \"./random\"\nimport { Flags } from \"./flags\"\nimport { JDError } from \"./error\"\n\n/**\n * Pipe information\n * @category Runtime\n */\nexport interface PipeInfo {\n    pipeType?: string\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    localPipe?: any\n}\n\ninterface AckAwaiter {\n    pkt: Packet\n    retriesLeft: number\n    okCb: () => void\n    errCb: () => void\n}\n\nexport interface DeviceStats {\n    dropped: number\n    restarts: number\n    announce: number\n}\n\n/**\n * Collects packet statistics about the device\n * @category JDOM\n */\nexport class DeviceStatsMonitor extends JDEventSource {\n    // counter\n    private _receivedPackets = 0\n    private _restarts = 0\n    private _announce = 0\n\n    // horizon\n    private readonly _data: {\n        received: number\n        restartCounter: number\n        restarts: number\n    }[] = Array(0xf << 2)\n        .fill(0)\n        .map(() => ({ received: 0, restartCounter: 0, restarts: 0 }))\n    private _dataIndex = 0\n\n    /**\n     * @internal\n     */\n    constructor() {\n        super()\n    }\n\n    /**\n     * Number of announce packets received by the device\n     **/\n    get announce() {\n        return this._announce\n    }\n\n    /**\n     * Average packet dropped per announce period\n     * @category Statistics\n     */\n    get dropped(): number {\n        const r =\n            this._data\n                .filter(e => !!e.restartCounter) // ignore total 0\n                .reduce(\n                    (s, e) => s + Math.max(e.restartCounter - e.received, 0),\n                    0,\n                ) / this._data.length || 0\n        return r\n    }\n\n    /**\n     * Number of restarts within the last 64 announce packets\n     */\n    get restarts(): number {\n        const r = this._data.reduce((s, e) => s + e.restarts, 0)\n        return r\n    }\n\n    /**\n     * Gets the current stats\n     */\n    private get current(): DeviceStats {\n        const { dropped, restarts, announce } = this\n        return { dropped, restarts, announce }\n    }\n\n    /**\n     * @internal\n     */\n    processAnnouncement(pkt: Packet) {\n        this._announce++\n\n        const { current: oldCurrent } = this\n        // collect metrics\n        const received = this._receivedPackets\n        const restartCounter = pkt.data[2]\n        const restarts = this._restarts\n\n        this._data[this._dataIndex] = { received, restartCounter, restarts }\n        this._dataIndex = (this._dataIndex + 1) % this._data.length\n\n        // reset counter\n        this._receivedPackets = 0\n        this._restarts = 0\n\n        const { current } = this\n        if (\n            oldCurrent.dropped !== current.dropped ||\n            oldCurrent.restarts !== current.restarts\n        )\n            this.emit(CHANGE)\n    }\n\n    /**\n     * @internal\n     */\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    processPacket(pkt: Packet) {\n        this._receivedPackets++\n    }\n\n    /**\n     * @internal\n     */\n    processRestart() {\n        this._restarts++\n        this._announce = 0\n    }\n\n    toString() {\n        const { current } = this\n        const { announce, dropped, restarts } = current\n        return `announce ${announce}, drop ${Math.floor(\n            dropped,\n        )}, restart ${restarts}`\n    }\n}\n\n/**\n * A Jacdac device hosting services.\n * @category JDOM\n */\nexport class JDDevice extends JDNode {\n    /**\n     * Indicates if the device is connected to a bus\n     * @category Lifecycle\n     */\n    connected: boolean\n    private _source: string\n    private _replay: boolean\n    private _lost: boolean\n    private _servicesData: Uint8Array\n    private _statusLight: LEDController\n    /**\n     * Timestamp when the device was first seen\n     */\n    readonly created: number\n    /**\n     * Timestamp of the last packet received from the device\n     * @category Lifecycle\n     */\n    lastSeen: number\n    /**\n     * Timestamp of the last service update packet received from the device\n     * @category Lifecycle\n     */\n    lastServiceUpdate: number\n    private _shortId: string\n    private _anonymizedId: string\n    private _services: JDService[]\n    private _ports: Record<string, PipeInfo>\n    private _ackAwaiting: AckAwaiter[]\n    private _firmwareUpdater: FirmwareUpdater\n    private _identifying: boolean\n    private _eventCounter: number\n    /**\n     * Gets the bus this device belongs to\n     * @category JDOM\n     */\n    public readonly bus: JDBus\n    /**\n     * Gets the device identifier\n     * @category Control\n     */\n    public readonly deviceId: string\n\n    /**\n     * Gets a random device id for the lifetime of this object.\n     */\n    public get anonymizedDeviceId() {\n        if (!this._anonymizedId) this._anonymizedId = randomDeviceId()\n        return this._anonymizedId\n    }\n\n    /**\n     * @internal\n     */\n    constructor(bus: JDBus, deviceId: string, pkt?: Packet) {\n        super()\n        this.bus = bus\n        this.deviceId = deviceId\n        this.connected = true\n        this._lost = false\n        this._identifying = false\n        this.created = this.lastSeen = bus.timestamp\n\n        this._source = pkt?.sender\n        this._replay = !!pkt?.replay\n    }\n\n    /**\n     * Quality of service statistics for this device\n     * @category Diagnostics\n     */\n    readonly stats = new DeviceStatsMonitor()\n\n    /**\n     * Gets a description of the device.\n     * @returns a descriptive string for this device\n     * @category Diagnostics\n     */\n    describe() {\n        const ignoredServices = [SRV_CONTROL, SRV_LOGGER]\n        return (\n            this.toString() +\n            (this.isPhysical ? \"\" : \" (sim)\") +\n            \": \" +\n            this.services()\n                .filter(srv => ignoredServices.indexOf(srv.serviceClass) < 0)\n                .map(\n                    s =>\n                        s.instanceName ||\n                        s.specification?.camelName ||\n                        s.serviceClass.toString(16),\n                )\n                .join(\", \")\n        )\n    }\n\n    /**\n     * Gets a unique identifier for this device in the bus\n     * @category JDOM\n     */\n    get id() {\n        return `${this.nodeKind}:${this.deviceId}`\n    }\n\n    /**\n     * Gets the short id of the device\n     * @category JDOM\n     */\n    get name() {\n        return this.shortId\n    }\n\n    /**\n     * Identifies node as a device\n     * @category JDOM\n     */\n    get nodeKind() {\n        return DEVICE_NODE_NAME\n    }\n\n    /**\n     * Indicates if the devices is a physical device, not emulated.\n     * @category Transport\n     */\n    get isPhysical() {\n        return (\n            this._source === USB_TRANSPORT ||\n            this._source === BLUETOOTH_TRANSPORT ||\n            this._source === SERIAL_TRANSPORT ||\n            this._source === PACKETIO_TRANSPORT ||\n            this._source === WEBSOCKET_TRANSPORT\n        )\n    }\n\n    /**\n     * Indicates the source of packets\n     * @category Transport\n     */\n    get source() {\n        return this._source\n    }\n\n    /**\n     * Indicates if the device is part of a trace replay\n     * @category Transport\n     */\n    get replay() {\n        return this._replay\n    }\n\n    /**\n     * Gets the device short name\n     * @category JDOM\n     */\n    get friendlyName() {\n        return this.shortId\n    }\n\n    /**\n     * Gets the device short name\n     * @category JDOM\n     */\n    get qualifiedName() {\n        return this.shortId\n    }\n\n    /**\n     * Indicates if service information is available.\n     * This happens after a announce packet has been received.\n     * @category Lifecycle\n     */\n    get announced(): boolean {\n        return !!this._servicesData?.length\n    }\n\n    /**\n     * Gets the control announce flag from the annouce packet.\n     * @category Control\n     */\n    get announceFlags(): ControlAnnounceFlags {\n        return this._servicesData ? read16(this._servicesData, 0) : 0\n    }\n\n    /**\n     * Gets the restart counter from the announce packet.\n     * @category Control\n     */\n    get restartCounter(): number {\n        return this.announceFlags & ControlAnnounceFlags.RestartCounterSteady\n    }\n\n    /**\n     * Gets the status light announce flags from the announce packet.\n     * @category Control\n     */\n    get statusLightFlags(): ControlAnnounceFlags {\n        return this.announceFlags & ControlAnnounceFlags.StatusLightRgbFade\n    }\n\n    /**\n     * Indicates if the device is announced as a client\n     * @category Control\n     */\n    get isClient() {\n        return !!(this.announceFlags & ControlAnnounceFlags.IsClient)\n    }\n\n    /**\n     * Gets the number of packets sent since the last announce packet,\n     * as read from the announce packet.\n     * @category Control\n     */\n    get packetCount(): number {\n        return this._servicesData?.[2] || 0\n    }\n\n    /**\n     * Gets the device short identifier\n     * @category JDOM\n     */\n    get shortId() {\n        // TODO measure if caching is worth it\n        if (!this._shortId) this._shortId = shortDeviceId(this.deviceId)\n        return this._shortId\n    }\n\n    /**\n     * Gets the bus instance hosting this device.\n     * @category JDOM\n     */\n    get parent(): JDNode {\n        return this.bus\n    }\n\n    /**\n     * Gets the firmware information if any.\n     * @category Firmware\n     */\n    get firmwareInfo(): FirmwareInfo {\n        const ctrl = this.service(JD_SERVICE_INDEX_CTRL)\n\n        const productIdentifier = ctrl?.register(ControlReg.ProductIdentifier)\n            ?.uintValue\n        const bootloaderProductIdentifier = ctrl?.register(\n            ControlReg.BootloaderProductIdentifier,\n        )?.uintValue\n        const ready =\n            productIdentifier !== undefined ||\n            bootloaderProductIdentifier !== undefined\n        if (!ready) return undefined\n\n        const deviceId = this.deviceId\n        const name = ctrl?.register(ControlReg.DeviceDescription)?.stringValue\n        const version = this.firmwareVersion\n        return {\n            deviceId,\n            name,\n            version,\n            productIdentifier,\n            bootloaderProductIdentifier,\n        }\n    }\n\n    private refreshFirmwareInfo() {\n        if (this.bus.interactionMode !== BusInteractionMode.Active) return\n\n        const ctrl = this.service(JD_SERVICE_INDEX_CTRL)\n        if (!ctrl) return\n\n        // force refresh\n        this.emitPropagated(DEVICE_FIRMWARE_INFO)\n        const firmwareRegs = [\n            ControlReg.ProductIdentifier,\n            ControlReg.FirmwareVersion,\n            ControlReg.BootloaderProductIdentifier,\n            ControlReg.DeviceDescription,\n        ]\n        firmwareRegs\n            .map(code => ctrl.register(code))\n            .filter(reg => !!reg)\n            .forEach(reg =>\n                reg.once(REPORT_UPDATE, () => {\n                    this.emitPropagated(DEVICE_FIRMWARE_INFO)\n                    this.emitPropagated(CHANGE)\n                }),\n            )\n    }\n\n    /**\n     * Indicates if no packet from this device has been observed in a while.\n     * @category Lifecycle\n     */\n    get lost() {\n        return this._lost\n    }\n\n    /**\n     * Sets the lost status\n     * @category Lifecycle\n     * @internal\n     */\n    set lost(v: boolean) {\n        if (!!v === this._lost) return\n\n        // something changed\n        this._lost = !!v\n        if (this.lost) {\n            this.emit(LOST)\n            this.bus.emit(DEVICE_LOST, this)\n        } else {\n            this.emit(FOUND)\n            this.bus.emit(DEVICE_FOUND, this)\n        }\n        this.emit(CHANGE)\n        this.bus.emit(DEVICE_CHANGE, this)\n        this.bus.emit(CHANGE)\n    }\n\n    /**\n     * Firmware updater, defined if a firmware update is in progress\n     */\n    get firmwareUpdater(): FirmwareUpdater {\n        return this._firmwareUpdater\n    }\n\n    /**\n     * Sets the flashing sequence state\n     * @category Firmware\n     */\n    set firmwareUpdater(value: FirmwareUpdater) {\n        if (value !== this._firmwareUpdater) {\n            this._firmwareUpdater = value\n            if (!this._firmwareUpdater) {\n                // clear firmware info\n                const reg = this.service(0)?.register(\n                    ControlReg.FirmwareVersion,\n                )\n                reg?.clearData()\n            }\n            this.emit(CHANGE)\n            this.bus.emit(DEVICE_CHANGE, this)\n            this.bus.emit(CHANGE)\n            if (this._firmwareUpdater) this.bus.sendStopStreaming()\n        }\n    }\n\n    /**\n     * Gets the number of events received by the service clients in this device\n     * @category Lifecycle\n     */\n    get eventCounter() {\n        return this._eventCounter\n    }\n\n    /**\n     * @internal\n     */\n    set eventCounter(v: number) {\n        this._eventCounter = v\n    }\n\n    /**\n     * Indicates if the device contains at least one service matching the service class\n     * @param serviceClass service class to match\n     * @returns true if at least one service present\n     * @category Services\n     */\n    hasService(serviceClass: number): boolean {\n        if (!this.announced) return false\n        if (serviceClass === 0) return true\n\n        // skip first 4 bytes\n        for (let i = 4; i < this._servicesData.length; i += 4) {\n            const sc = getNumber(this._servicesData, NumberFormat.UInt32LE, i)\n            if (isInstanceOf(sc, serviceClass)) return true\n        }\n        return false\n    }\n\n    /**\n     * Gets or allocates a pipe port\n     * @param id identifier of the port\n     * @returns a pipe port\n     * @category Services\n     */\n    port(id: number) {\n        if (!this._ports) this._ports = {}\n        const key = id + \"\"\n        const ex = this._ports[key]\n        if (!ex) return (this._ports[key] = {})\n        return ex\n    }\n\n    /**\n     * Indicates if the service is in bootloader mode\n     * @category Services\n     */\n    get bootloader() {\n        return this.hasService(SRV_BOOTLOADER)\n    }\n\n    /**\n     * Gets the number of services hosted by the device\n     * @category Services\n     */\n    get serviceLength() {\n        if (!this.announced) return 0\n        return this._servicesData.length >> 2\n    }\n\n    /**\n     * Gets the service class at a given index\n     * @param index index of the service\n     * @returns service class\n     * @category Services\n     */\n    serviceClassAt(index: number): number {\n        if (index == 0) return 0\n\n        index <<= 2\n        if (!this.announced || index + 4 > this._servicesData.length)\n            return undefined\n        return read32(this._servicesData, index)\n    }\n\n    /**\n     * Gets the list of service classes\n     * @category Services\n     */\n    get serviceClasses(): number[] {\n        const r = []\n        const n = this.serviceLength\n        for (let i = 0; i < n; ++i) r.push(this.serviceClassAt(i))\n        return r\n    }\n\n    private initServices(force?: boolean) {\n        if (force) this._services = undefined\n\n        if (!this._services && this._servicesData) {\n            this._statusLight = undefined\n            const n = this.serviceLength\n            const s = []\n            for (let i = 0; i < n; ++i) s.push(new JDService(this, i))\n            this._services = s\n            this.lastServiceUpdate = this.bus.timestamp\n            this.refreshFirmwareInfo()\n            this.emitPropagated(CHANGE)\n        }\n    }\n\n    /**\n     * Gets the service client at the given service index\n     * @param serviceIndex index of the service client\n     * @returns service client\n     * @category Services\n     */\n    service(serviceIndex: number): JDService {\n        if (!this.announced) return undefined\n        this.initServices()\n        serviceIndex = serviceIndex | 0\n        return this._services && this._services[serviceIndex]\n    }\n\n    /**\n     * Gets a filtered list of service clients.\n     * @param options filters for services\n     * @returns services matching the filter\n     * @category Services\n     */\n    services(options?: ServiceFilter): JDService[] {\n        if (!this.announced) return []\n\n        if (options?.serviceIndex >= 0)\n            return [this.service(options?.serviceIndex)]\n\n        if (options?.serviceName && options?.serviceClass > -1)\n            throw Error(\"serviceClass and serviceName cannot be used together\")\n        let sc = serviceClass(options?.serviceName)\n        if (sc === undefined || sc < 0) sc = options?.serviceClass\n        if (sc === undefined) sc = -1\n\n        this.initServices()\n        let r = this._services?.slice() || []\n        if (sc > -1) r = r.filter(s => s.serviceClass == sc)\n\n        if (options?.specification) r = r.filter(s => !!s.specification)\n\n        if (options?.sensor) r = r.filter(s => isSensor(s.specification))\n\n        const mixins = options?.mixins\n        if (mixins !== undefined) r = r.filter(s => s.isMixin === mixins)\n\n        return r\n    }\n\n    /**\n     * Gets the list of child services.\n     * @category JDOM\n     */\n    get children(): JDNode[] {\n        return this.services()\n    }\n\n    /**\n     * @internal\n     */\n    sendCtrlCommand(cmd: number, payload: Uint8Array = null) {\n        const pkt = !payload\n            ? Packet.onlyHeader(cmd)\n            : Packet.from(cmd, payload)\n        pkt.serviceIndex = JD_SERVICE_INDEX_CTRL\n        return pkt.sendCmdAsync(this)\n    }\n\n    /**\n     * @internal\n     */\n    processAnnouncement(pkt: Packet) {\n        this.stats.processAnnouncement(pkt)\n\n        const w0 = this._servicesData\n            ? getNumber(this._servicesData, NumberFormat.UInt32LE, 0)\n            : 0\n        const w1 = getNumber(pkt.data, NumberFormat.UInt32LE, 0)\n        const restarted =\n            w1 &&\n            (w1 & JD_ADVERTISEMENT_0_COUNTER_MASK) <\n                (w0 & JD_ADVERTISEMENT_0_COUNTER_MASK)\n\n        // compare service data\n        let servicesChanged = !bufferEq(pkt.data, this._servicesData, 4)\n        this._servicesData = pkt.data\n\n        // check for restart\n        if (restarted) {\n            this.stats.processRestart()\n\n            this.bus.emit(DEVICE_RESTART, this)\n            this.emit(RESTART)\n\n            // always re-compute services on device restart - eg., const registers might have changed\n            servicesChanged = true\n\n            this._eventCounter = undefined\n\n            // In fact the spec says that the service can *only* change on device restart,\n            // but we are more lenient here.\n        }\n\n        // notify that services got updated\n        if (servicesChanged) {\n            this.initServices(true)\n            // make sure pkt.isRepeatedAnnounce is correct - important during reply\n            this.lastServiceUpdate = pkt.timestamp\n            this.bus.emit(DEVICE_ANNOUNCE, this)\n            this.emit(ANNOUNCE)\n        }\n\n        // notify that we've received an announce packet\n        this.bus.emit(DEVICE_PACKET_ANNOUNCE, this)\n        this.emit(PACKET_ANNOUNCE)\n\n        // notify of any changes\n        if (servicesChanged) {\n            this.bus.emit(DEVICE_CHANGE, this)\n            this.bus.emit(CHANGE)\n            this.emit(CHANGE)\n        }\n\n        // update status led\n        this.statusLight?.processAnnouncement()\n    }\n\n    /**\n     * Check if the device is still there\n     * @returns true if the device is there, undefined on timeout\n     */\n    ping() {\n        return this.bus.withTimeout(\n            200,\n            new Promise<boolean>((resolve, reject) => {\n                this.once(PACKET_ANNOUNCE, () => {\n                    const f = resolve\n                    resolve = null\n                    if (f) f(true)\n                })\n                // ask for announce\n                this.sendCtrlCommand(ControlCmd.Services).then(\n                    () => {},\n                    err => {\n                        if (resolve) {\n                            resolve = null\n                            reject(err)\n                        }\n                    },\n                )\n            }),\n        )\n    }\n\n    private markRepeatedEvent(pkt: Packet) {\n        if (!pkt.isEvent || !pkt.isReport) return\n\n        // is it first event we get?\n        if (this.eventCounter === undefined) {\n            this.eventCounter = pkt.eventCounter\n            return\n        }\n\n        const ec = (this.eventCounter || 0) + 1\n        // how many packets ahead and behind current are we?\n        const ahead = (pkt.eventCounter - ec) & CMD_EVENT_COUNTER_MASK\n        const behind = (ec - pkt.eventCounter) & CMD_EVENT_COUNTER_MASK\n        // ahead == behind == 0 is the usual case, otherwise\n        // behind < 60 means this is an old event (or retransmission of something we already processed)\n        const old = behind < 60\n        const missed5 = ahead < 5\n        const isahead = ahead > 0\n\n        // ahead < 5 means we missed at most 5 events,\n        // so we ignore this one and rely on retransmission\n        // of the missed events, and then eventually the current event\n        if (isahead && (old || missed5)) {\n            pkt.isRepeatedEvent = true\n        } else {\n            // update device counter\n            this.eventCounter = pkt.eventCounter\n        }\n    }\n\n    /**\n     * @internal\n     */\n    processPacket(pkt: Packet) {\n        this.markRepeatedEvent(pkt)\n        this.stats.processPacket(pkt)\n        this.lost = false\n        this.emit(PACKET_RECEIVE, pkt)\n        if (pkt.isReport) this.emit(PACKET_REPORT, pkt)\n        else if (pkt.isEvent) this.emit(PACKET_EVENT, pkt)\n\n        const service = this.service(pkt.serviceIndex)\n        if (service) service.processPacket(pkt)\n\n        // status light handling\n        if (\n            pkt.serviceIndex == JD_SERVICE_INDEX_CTRL &&\n            pkt.isCommand &&\n            pkt.serviceCommand == ControlCmd.SetStatusLight\n        )\n            pkt.device.statusLight?.processPacket(pkt)\n    }\n\n    /**\n     * @internal\n     */\n    disconnect() {\n        this.connected = false\n        this.emit(DISCONNECT)\n        this.emit(CHANGE)\n    }\n\n    /**\n     * Gets a controller for the status light. Returns undefined if the device does not support a status light.\n     * @category Control\n     */\n    get statusLight(): LEDController {\n        if (\n            !this._statusLight &&\n            this.statusLightFlags !== ControlAnnounceFlags.StatusLightNone\n        )\n            this._statusLight = new LEDController(\n                this.service(0),\n                ControlCmd.SetStatusLight,\n            )\n        return this._statusLight\n    }\n\n    /**\n     * Sends an ``identify`` command to the device\n     * @category Lifecycle\n     */\n    async identify() {\n        if (this._identifying) return\n\n        try {\n            this._identifying = true\n            this.emit(CHANGE)\n            const statusLight = this.statusLight\n            if (statusLight) await statusLight.blink(0x0000ff, 0, 262, 4)\n            else {\n                const ctrl = this.service(0)\n                await ctrl.sendCmdAsync(ControlCmd.Identify, undefined, false)\n                await this.bus.delay(IDENTIFY_DURATION)\n            }\n        } catch (e) {\n            this.emit(ERROR, e)\n        } finally {\n            this._identifying = false\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Indicates the device should be identifying.\n     * @category Lifecycle\n     */\n    get identifying() {\n        return this._identifying\n    }\n\n    /**\n     * Sends a ``reset`` command to the device\n     * @category Lifecycle\n     */\n    reset() {\n        return this.sendCtrlCommand(ControlCmd.Reset)\n    }\n\n    /**\n     * Send command to enter proxy/dongle mode\n     * @returns\n     */\n    startProxy() {\n        return this.sendCtrlCommand(ControlCmd.Proxy)\n    }\n\n    /**\n     * Tries to retrive the product identifier from the device\n     * @param retry number of attempts\n     * @returns promise that returns product identifier if received\n     * @category Control\n     */\n    async resolveProductIdentifier(retry = 0): Promise<number> {\n        const register = this.service(0)?.register(ControlReg.ProductIdentifier)\n        if (!register) return undefined\n\n        while (retry-- >= 0 && register.data === undefined)\n            await register.refresh(true)\n        return register.uintValue\n    }\n\n    /**\n     * Returns the product identifier synchronously. If needed, tries to refresh the value in the background.\n     * @category Control\n     */\n    get productIdentifier(): number {\n        const reg = this.service(0)?.register(ControlReg.ProductIdentifier)\n        const v = reg?.uintValue\n        if (reg && v === undefined) reg.scheduleRefresh()\n        return v\n    }\n\n    /**\n     * Gets the elapsed time since boot in milli-seconds\n     * @category Control\n     */\n    get uptime(): number {\n        const reg = this.service(0)?.register(ControlReg.Uptime)\n        const v = reg?.unpackedValue?.[0]\n        if (reg && v === undefined) reg.scheduleRefresh()\n        let uptime: number = undefined\n        if (v !== undefined) {\n            // compute offset\n            uptime = v / 1000 + this.bus.timestamp - reg.lastDataTimestamp\n        }\n        return uptime\n    }\n\n    /**\n     * Tries to retrive the firmware version from the device\n     * @param retry number of attempts\n     * @returns promise that returns firmware if received\n     * @category Control\n     */\n    async resolveFirmwareVersion(retry = 0): Promise<string> {\n        const register = this.service(0)?.register(ControlReg.FirmwareVersion)\n        if (!register) return undefined\n        while (retry-- >= 0 && register.data === undefined)\n            await register.refresh(true)\n        return register.stringValue\n    }\n\n    /**\n     * Returns the firmware version synchronously. If needed, tries to refresh the value in the background.\n     * @category Control\n     */\n    get firmwareVersion(): string {\n        const reg = this.service(0)?.register(ControlReg.FirmwareVersion)\n        const v = reg?.stringValue\n        if (reg && v === undefined) reg.scheduleRefresh()\n        return v\n    }\n\n    /**\n     * Indicates if the device is in proxy mode\n     */\n    get proxy() {\n        return this.serviceClasses.indexOf(SRV_PROXY) > -1\n    }\n\n    /**\n     * Indicates if the device is a unique brain\n     */\n    get brain() {\n        return this.serviceClasses.indexOf(SRV_UNIQUE_BRAIN) > -1\n    }\n\n    private initAcks() {\n        if (this._ackAwaiting) return\n\n        let drops = 0\n        let resends = 0\n        this._ackAwaiting = []\n        const cleanUp = this.subscribe(PACKET_REPORT, (rep: Packet) => {\n            if (!rep.isCRCAck) return\n            let numdone = 0\n            for (const aa of this._ackAwaiting) {\n                if (aa.pkt && aa.pkt.crc == rep.serviceCommand) {\n                    //console.log(`ack`, aa.pkt)\n                    aa.pkt = null\n                    numdone++\n                    aa.okCb()\n                }\n            }\n            if (numdone)\n                this._ackAwaiting = this._ackAwaiting.filter(aa => !!aa.pkt)\n        })\n\n        const resend = () => {\n            let numdrop = 0\n            for (const aa of this._ackAwaiting) {\n                if (aa.pkt) {\n                    if (--aa.retriesLeft < 0) {\n                        drops++\n                        aa.pkt.meta[META_ACK_FAILED] = true\n                        aa.pkt = null\n                        aa.errCb()\n                        numdrop++\n                        if (Flags.diagnostics)\n                            console.debug(\n                                `ack: ${this.shortId} drop ${aa.pkt} (${drops} drops, ${resends} resends)`,\n                            )\n                    } else {\n                        resends++\n                        aa.pkt.sendCmdAsync(this)\n                        if (Flags.diagnostics)\n                            console.debug(\n                                `ack: ${this.shortId} resend ${aa.pkt} (${drops} drops, ${resends} resends)`,\n                            )\n                    }\n                }\n            }\n            if (numdrop)\n                this._ackAwaiting = this._ackAwaiting.filter(aa => !!aa.pkt)\n\n            if (Flags.diagnostics)\n                console.debug(\n                    `ack: ${this.shortId} awaits ${this._ackAwaiting.length}`,\n                )\n            if (this._ackAwaiting.length > 0) {\n                this.bus.scheduler.setTimeout(\n                    resend,\n                    Math.random() * (ACK_MAX_DELAY - ACK_MIN_DELAY) +\n                        ACK_MIN_DELAY,\n                )\n            } else {\n                this._ackAwaiting = undefined\n                cleanUp()\n            }\n        }\n\n        // start loop\n        this.bus.scheduler.setTimeout(resend, 40)\n    }\n\n    /**\n     * @internal\n     */\n    sendPktWithAck(pkt: Packet) {\n        // no acks possible when bus is passive\n        pkt.requiresAck = !this.bus.passive\n        this.initAcks()\n        return new Promise<void>((resolve, reject) => {\n            const ack = {\n                pkt,\n                retriesLeft: 4,\n                okCb: resolve,\n                errCb: () => {\n                    const e = new JDError(\"no ACK for \" + pkt.toString(), {\n                        code: ERROR_NO_ACK,\n                    })\n                    reject(e)\n                },\n            }\n            this._ackAwaiting.push(ack)\n            pkt.sendCmdAsync(this)\n        })\n    }\n\n    /**\n     * @internal\n     */\n    async floodPing(numPkts = 100, size = 32) {\n        const pkt = Packet.jdpacked(ControlCmd.FloodPing, \"u32 u32 u8\", [\n            numPkts,\n            0x1000,\n            size,\n        ])\n        pkt.serviceIndex = JD_SERVICE_INDEX_CTRL\n        await this.sendPktWithAck(pkt)\n    }\n}\n", "import { JDBus } from \"../bus\"\nimport { JDClient } from \"../client\"\nimport { CHANGE, PROGRESS } from \"../constants\"\nimport { JDFrameBuffer } from \"../packet\"\nimport { Trace } from \"./trace\"\n\n/**\n * A player for packet traces.\n * @category Trace\n */\nexport class TracePlayer extends JDClient {\n    private _trace: Trace\n    private _busStartTimestamp = 0\n    private _index = 0\n    private _interval: any\n    private _lastProgressEmit = 0\n\n    constructor(public readonly bus: JDBus, public speed: number = 1) {\n        super()\n        this.tick = this.tick.bind(this)\n\n        // always stop when unmounting\n        this.mount(() => this.stop())\n    }\n\n    get running() {\n        return !!this._interval\n    }\n\n    get trace() {\n        return this._trace\n    }\n\n    set trace(t: Trace) {\n        if (t !== this._trace) {\n            this.stop()\n            this._trace = t\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Gets the adjusted timestamp\n     */\n    get elapsed() {\n        return (this.bus.timestamp - this._busStartTimestamp) * this.speed\n    }\n\n    get progress() {\n        if (!this.trace) return 0\n        return Math.max(0, Math.min(1, this.elapsed / this.trace.duration))\n    }\n\n    get length() {\n        return this.trace?.length || 0\n    }\n\n    start() {\n        if (this._interval || !this._trace) return // already running\n\n        // this is the reference start time of this run\n        this._busStartTimestamp = this.bus.timestamp\n        this._index = 0\n        this._interval = this.bus.scheduler.setInterval(this.tick, 50)\n        this.emit(CHANGE)\n        this.emitProgress(true)\n    }\n\n    stop() {\n        if (this._interval) {\n            this.bus.scheduler.clearInterval(this._interval)\n            this._interval = undefined\n            this.emitProgress(true)\n            this.emit(CHANGE)\n        }\n    }\n\n    private tick() {\n        if (!this._trace) return\n\n        const busElapsed = this.elapsed\n        const packets = this.trace.frames\n        const packetStart = packets[0]?._jacdac_timestamp || 0\n\n        while (this._index < packets.length) {\n            const packet = packets[this._index]\n            const packetElapsed = packet._jacdac_timestamp - packetStart\n            if (packetElapsed > busElapsed) break // wait to catch up\n            // clone packet and send\n            const pkt = packet.slice() as JDFrameBuffer\n            pkt._jacdac_timestamp = this._busStartTimestamp + packetElapsed\n            pkt._jacdac_replay = true\n            this.bus.processFrame(pkt, undefined)\n            this._index++\n        }\n\n        //console.log(`replay ${this._index} ${nframes} frames, ${npackets} packets`)\n        this.emitProgress()\n        if (this._index >= packets.length) this.stop()\n    }\n\n    private emitProgress(force?: boolean) {\n        if (force || this.bus.timestamp - this._lastProgressEmit > 250) {\n            this.emit(PROGRESS, this.progress)\n            this._lastProgressEmit = this.bus.timestamp\n        }\n    }\n}\n\n", "import { arrayConcatMany, fromHex } from \"./utils\"\nimport { JDBus } from \"./bus\"\nimport { JDFrameBuffer, Packet } from \"./packet\"\nimport { TracePlayer } from \"./trace/traceplayer\"\nimport { Trace } from \"./trace/trace\"\nimport { META_TRACE, META_TRACE_DESCRIPTION } from \"./constants\"\n\n/**\n * Parse a trace text file\n * @param contents\n * @returns\n * @category Trace\n */\nexport function parseTrace(contents: string): Trace {\n    const description: string[] = []\n    const packets: JDFrameBuffer[] = []\n    contents?.split(/\\r?\\n/).forEach(ln => {\n        // parse data\n        const m = /^(\\d+.?\\d*)\\s+([a-f0-9]{12,})/i.exec(ln)\n        if (!m) {\n            // might be a stack trace\n            if (/^\\s+at\\s/.test(ln)) {\n                const lastPacket = packets[packets.length - 1]\n                if (lastPacket) {\n                    let trace =\n                        (lastPacket._jacdac_meta[META_TRACE] as string) || \"\"\n                    trace += ln + \"\\n\"\n                    lastPacket._jacdac_meta[META_TRACE] = trace\n                }\n            } else {\n                // probably junk data\n                if (packets.length == 0) description.push(ln)\n            }\n            return\n        }\n\n        const timestamp = parseInt(m[1])\n        const data = fromHex(m[2]) as JDFrameBuffer\n        data._jacdac_meta = {\n            [META_TRACE_DESCRIPTION]: ln.substring(m[0].length).trim(),\n        }\n        data._jacdac_timestamp = timestamp\n        packets.push(data)\n    })\n    if (packets.length)\n        return new Trace(packets, {\n            description: description.join(\"\\n\").trim(),\n        })\n    else return undefined\n}\n\n/**\n * Parses a logic analyzer log into a trace\n * @param logcontents\n * @returns\n * @category Trace\n */\nexport function parseLogicLog(logcontents: string): JDFrameBuffer[] {\n    if (!logcontents) return undefined\n\n    const res: JDFrameBuffer[] = []\n    let frameBytes = []\n    let lastTime = 0\n    for (const ln of logcontents.split(/\\r?\\n/)) {\n        let m = /^JD (\\d+) ([0-9a-f]+)/i.exec(ln)\n        if (m) {\n            const f = fromHex(m[2]) as JDFrameBuffer\n            f._jacdac_timestamp = parseInt(m[1])\n            res.push(f)\n            continue\n        }\n\n        // this is format of trace.jd.txt file saved from website\n        m = /^([\\d\\.]+)\\s+([0-9a-f]{32,512})\\s+/i.exec(ln)\n        if (m) {\n            const f = fromHex(m[2]) as JDFrameBuffer\n            ;(f._jacdac_timestamp = parseFloat(m[1]) | 0), res.push(f)\n            continue\n        }\n\n        /** Windows, logic 1.*\nTime [s],Value,Parity Error,Framing Error\n0.042909760000000,0x00,,Error\n0.042980320000000,0xD4,,\n...\n0.043240160000000,0x27,,\n0.043250080000000,0x1F,,\n0.043264800000000,0x00,,Error\n0.063968960000000,0x00,,Error\n         */\n        m = /^([\\d.]+),(?:Async Serial,)?.*(0x[A-F0-9][A-F0-9])/.exec(ln)\n        if (!m) continue\n        const tm = parseFloat(m[1])\n        if (lastTime && tm - lastTime > 0.1) {\n            const f = new Uint8Array(frameBytes) as JDFrameBuffer\n            f._jacdac_timestamp = lastTime * 1000\n            f._jacdac_meta = { info: \"timeout\" }\n            res.push(f)\n            frameBytes = []\n            lastTime = 0\n        }\n\n        lastTime = tm\n        if (/(framing error|Error)/.test(ln)) {\n            if (frameBytes.length > 0) {\n                const f = new Uint8Array(frameBytes) as JDFrameBuffer\n                f._jacdac_timestamp = lastTime * 1000\n                res.push(f)\n            }\n            frameBytes = []\n            lastTime = 0\n        } else {\n            frameBytes.push(parseInt(m[2]))\n        }\n    }\n\n    return res\n}\n\n/**\n * Replays a parsed logic log\n * @param bus\n * @param frames\n * @param speed\n * @category Trace\n */\nexport function replayLogicLog(\n    bus: JDBus,\n    frames: JDFrameBuffer[],\n    speed?: number,\n): void {\n    const player = new TracePlayer(bus, speed)\n    player.trace = new Trace(frames)\n    bus.clear(frames[0]?._jacdac_timestamp)\n    player.start()\n}\n", "import * as U from \"./utils\"\nimport { Packet } from \"./packet\"\nimport { JDDevice } from \"./device\"\nimport { PACKET_REPORT, CMD_GET_REG, JD_SERVICE_INDEX_CTRL } from \"./constants\"\nimport { ControlReg } from \"../../jacdac-spec/dist/specconstants\"\n\n/**\n * @internal\n */\nexport async function packetSpeedTest(dev: JDDevice) {\n    const pingCmd = CMD_GET_REG | ControlReg.ProductIdentifier\n\n    dev.on(PACKET_REPORT, onPacket)\n    const t0 = Date.now()\n    let lastSend = Date.now()\n    let numpkt = 0\n    let timeouts = 0\n    let numrecv = 0\n    let done = false\n\n    await ask()\n    while (numpkt < 100) {\n        await U.delay(50)\n        const now = Date.now()\n        if (now - t0 > 3000) break\n        if (now - lastSend > 100) {\n            timeouts++\n            await ask()\n        }\n    }\n    done = true\n    await U.delay(250)\n    dev.off(PACKET_REPORT, onPacket)\n    const ms = Date.now() - t0\n\n    const pktsPerSecond = numpkt / (ms / 1000)\n    const dropRate = (100 * (numpkt - numrecv)) / numpkt\n\n    return {\n        msg: `${pktsPerSecond.toFixed(1)} pkts/s; ${dropRate.toFixed(\n            2,\n        )}% dropped`,\n        pktsPerSecond,\n        dropRate,\n    }\n\n    async function ask() {\n        lastSend = Date.now()\n        numpkt++\n        await dev.sendCtrlCommand(pingCmd)\n    }\n\n    async function onPacket(p: Packet) {\n        if (\n            p.serviceIndex == JD_SERVICE_INDEX_CTRL &&\n            p.serviceCommand == pingCmd\n        ) {\n            numrecv++\n            if (!done) await ask()\n        }\n    }\n}\n", "import { setNumber, sizeOfNumberFormat } from \"./buffer\"\nimport { CMD_SET_REG, JD_SERIAL_MAX_PAYLOAD_SIZE } from \"./constants\"\nimport { PackedValues } from \"./pack\"\nimport { Packet } from \"./packet\"\nimport {\n    clampToStorage,\n    isRegister,\n    numberFormatFromStorageType,\n    scaleFloatToInt,\n} from \"./spec\"\nimport { stringToUint8Array, toUTF8 } from \"./utils\"\n\n/**\n * @internal\n */\nexport function packArguments(info: jdspec.PacketInfo, args: PackedValues) {\n    let repeatIdx = -1\n    let numReps = 0\n    let argIdx = 0\n    let dst = 0\n\n    const buf = new Uint8Array(256)\n\n    for (let i = 0; i < info.fields.length; ++argIdx, ++i) {\n        if (argIdx >= args.length && numReps > 0) break\n        const arg0 = argIdx < args.length ? args[argIdx] : 0\n        const fld = info.fields[i]\n\n        if (repeatIdx == -1 && fld.startRepeats) repeatIdx = i\n\n        const arg1 =\n            fld.type == \"string0\" && typeof arg0 == \"string\"\n                ? arg0 + \"\\u0000\"\n                : arg0\n\n        const arg =\n            typeof arg1 == \"boolean\"\n                ? arg1\n                    ? 1\n                    : 0\n                : typeof arg1 == \"string\"\n                ? stringToUint8Array(toUTF8(arg1))\n                : arg1\n\n        if (typeof arg == \"number\") {\n            const intVal = scaleFloatToInt(arg, fld)\n            if (fld.storage == 0)\n                throw new Error(`expecting ${fld.type} got number`)\n\n            const fmt = numberFormatFromStorageType(fld.storage)\n            setNumber(buf, fmt, dst, clampToStorage(intVal, fld.storage))\n            dst += sizeOfNumberFormat(fmt)\n        } else {\n            let size = Math.abs(fld.storage)\n            if (typeof arg1 == \"string\") {\n                if (size == 0) size = arg.length\n                const argCut = arg.slice(0, size)\n                buf.set(argCut, dst)\n                dst += size\n            } else if (size == 0 || size == arg.length) {\n                buf.set(arg, dst)\n                dst += arg.length\n            } else {\n                throw new Error(\n                    `expecting ${Math.abs(fld.storage)} bytes; got ${\n                        arg.length\n                    }`,\n                )\n            }\n        }\n\n        if (dst >= JD_SERIAL_MAX_PAYLOAD_SIZE)\n            throw new Error(\n                `jacdac packet length too large, ${dst} > ${JD_SERIAL_MAX_PAYLOAD_SIZE} bytes`,\n            )\n\n        if (repeatIdx != -1 && i + 1 >= info.fields.length) {\n            i = repeatIdx - 1\n            numReps++\n        }\n    }\n\n    const cmd = isRegister(info)\n        ? info.identifier | CMD_SET_REG\n        : info.identifier\n    const pkt = Packet.from(cmd, buf.slice(0, dst))\n    if (info.kind != \"report\") pkt.isCommand = true\n    return pkt\n}\n", "import {\n    ControlReg,\n    LoggerReg,\n    SRV_CONTROL,\n    SRV_LOGGER,\n} from \"../../jacdac-spec/dist/specconstants\"\nimport { JDBus } from \"./bus\"\nimport { Packet } from \"./packet\"\nimport { isInstanceOf, serviceSpecificationFromName } from \"./spec\"\n\n/**\n * @category Trace\n * @internal\n */\nexport type CompiledPacketFilter = (pkt: Packet) => boolean\n\n/**\n * @category Trace\n * @internal\n */\nexport interface PacketFilterProps {\n    announce?: boolean\n    repeatedAnnounce?: boolean\n    resetIn?: boolean\n    minPriority?: boolean\n    requiresAck?: boolean\n    ack?: boolean\n    log?: boolean\n    productIdentifiers?: number[]\n    flags?: string[]\n    regGet?: boolean\n    regSet?: boolean\n    devices?: Record<string, { from?: boolean; to?: boolean }>\n    selfDevice?: boolean\n    serviceClasses?: number[]\n    pkts?: string[]\n    before?: number\n    after?: number\n    grouping?: boolean\n    pipes?: boolean\n    port?: number\n    collapseAck?: boolean\n    collapsePipes?: boolean\n    collapseGets?: boolean\n    collapseNotImplemented?: boolean\n    errors?: boolean\n}\n\n/**\n * @internal\n */\nexport interface PacketFilter {\n    source: string\n    props: PacketFilterProps\n    filter: CompiledPacketFilter\n}\n\n/**\n * Given a filter text, compiles packet filter\n * @param bus\n * @param text\n * @returns\n * @category Trace\n */\nexport function parsePacketFilter(bus: JDBus, text: string): PacketFilter {\n    if (!text) {\n        return {\n            source: text,\n            props: {\n                grouping: true,\n            },\n            filter: () => true,\n        }\n    }\n\n    const flags = new Set<string>()\n    const serviceClasses = new Set<number>()\n    const pkts = new Set<string>()\n    const productIdentifiers = new Set<number>()\n    let repeatedAnnounce: boolean = undefined\n    let announce: boolean = undefined\n    let resetIn: boolean = undefined\n    let minPriority: boolean = undefined\n    let regGet: boolean = undefined\n    let regSet: boolean = undefined\n    let requiresAck: boolean = undefined\n    let ack: boolean = undefined\n    let log: boolean = undefined\n    let before: number = undefined\n    let after: number = undefined\n    const devices: Record<string, { from: boolean; to: boolean }> = {}\n    let grouping = true\n    let pipes: boolean = undefined\n    let port: number = undefined\n    let collapseAck = true\n    let collapsePipes = true\n    let collapseGets = true\n    let collapseNotImplemented = true\n    let errors: boolean = undefined\n    let selfDevice: boolean = undefined\n    text.split(/\\s+/g).forEach(part => {\n        const [, prefix, , value] =\n            /([a-z\\-_]+)([:=]([^\\s]+))?/.exec(part) || []\n        switch (prefix || \"\") {\n            case \"kind\":\n            case \"k\":\n                if (!value) break\n                flags.add(value.toLowerCase())\n                break\n            case \"service\":\n            case \"srv\": {\n                if (!value) break\n                const service = serviceSpecificationFromName(value)\n                const serviceClass =\n                    service?.classIdentifier || parseInt(value, 16)\n                if (serviceClass !== undefined && !isNaN(serviceClass))\n                    serviceClasses.add(serviceClass)\n                break\n            }\n            case \"announce\":\n            case \"a\":\n                announce = parseBoolean(value)\n                break\n            case \"repeated-announce\":\n            case \"ra\":\n                repeatedAnnounce = parseBoolean(value)\n                break\n            case \"self\":\n                selfDevice = parseBoolean(value)\n                break\n            case \"reset-in\":\n            case \"ri\":\n            case \"resetin\":\n                resetIn = parseBoolean(value)\n                break\n            case \"errors\":\n                errors = parseBoolean(value)\n                break\n            case \"min-priority\":\n            case \"minpri\":\n            case \"minpriority\":\n            case \"mi\":\n                minPriority = parseBoolean(value)\n                break\n            case \"requires-ack\":\n                requiresAck = parseBoolean(value)\n                break\n            case \"ack\":\n                ack = parseBoolean(value)\n                break\n            case \"collapse-ack\":\n                collapseAck = parseBoolean(value)\n                break\n            case \"collapse-notimpl\":\n            case \"collapse-not-implemeneted\":\n                collapseNotImplemented = parseBoolean(value)\n                break\n            case \"device\":\n            case \"dev\":\n            case \"to\":\n            case \"from\": {\n                if (!value) break\n                // resolve device by name\n                const deviceId = bus\n                    .devices()\n                    .find(d => d.shortId === value || d.name === value)\n                    ?.deviceId\n                if (deviceId) {\n                    const data =\n                        devices[deviceId] ||\n                        (devices[deviceId] = { from: false, to: false })\n                    if (prefix === \"from\") data.from = true\n                    else if (prefix === \"to\") data.to = true\n                }\n                break\n            }\n            case \"pid\":\n            case \"product-identifier\": {\n                if (!value) return\n                // find register\n                const pid = parseInt(value.replace(/^0?x/, \"\"), 16)\n                if (!isNaN(pid)) productIdentifiers.add(pid)\n                break\n            }\n            case \"pkt\":\n            case \"reg\":\n            case \"register\":\n            case \"cmd\":\n            case \"command\":\n            case \"ev\":\n            case \"event\": {\n                if (!value) return\n                // find register\n                const id = parseInt(value.replace(/^0?x/, \"\"), 16)\n                if (!isNaN(id)) pkts.add(id.toString(16))\n                // support name\n                pkts.add(value)\n                break\n            }\n            case \"reg-get\":\n            case \"get\":\n                regGet = parseBoolean(value)\n                break\n            case \"reg-set\":\n            case \"set\":\n                regSet = parseBoolean(value)\n                break\n            case \"log\":\n                log = parseBoolean(value)\n                break\n            case \"before\":\n                before = parseTimestamp(value)\n                break\n            case \"after\":\n                after = parseTimestamp(value)\n                break\n            case \"grouping\":\n                grouping = parseBoolean(value)\n                break\n            case \"pipes\":\n                pipes = parseBoolean(value)\n                break\n            case \"collapse-pipe\":\n            case \"collapse-pipes\":\n                collapsePipes = parseBoolean(value)\n                break\n            case \"collapse-get\":\n            case \"collapse-gets\":\n                collapseGets = parseBoolean(value)\n                break\n            case \"port\":\n                port = parseInt(value)\n                break\n        }\n    })\n\n    const props = {\n        announce,\n        repeatedAnnounce,\n        resetIn,\n        minPriority,\n        requiresAck,\n        ack,\n        collapseAck,\n        collapseNotImplemented,\n        log,\n        productIdentifiers:\n            !!productIdentifiers.size && Array.from(productIdentifiers.keys()),\n        flags: !!flags.size && Array.from(flags.keys()),\n        regGet,\n        regSet,\n        devices,\n        selfDevice,\n        serviceClasses:\n            !!serviceClasses.size && Array.from(serviceClasses.keys()),\n        pkts: !!pkts.size && Array.from(pkts.keys()),\n        before,\n        after,\n        grouping,\n        pipes,\n        collapsePipes,\n        collapseGets,\n        port,\n        errors,\n    }\n    const filter = compileFilter(props)\n    return {\n        source: text,\n        props,\n        filter,\n    }\n    function parseBoolean(value: string) {\n        if (value === \"false\" || value === \"no\") return false\n        else if (value === \"true\" || value === \"yes\" || !value) return true\n        else return undefined\n    }\n    function parseTimestamp(value: string) {\n        const t = parseInt(value)\n        return isNaN(t) ? undefined : t\n    }\n}\n\nfunction compileFilter(props: PacketFilterProps) {\n    const {\n        announce,\n        repeatedAnnounce,\n        resetIn,\n        minPriority,\n        requiresAck,\n        ack,\n        log,\n        productIdentifiers,\n        flags,\n        regGet,\n        regSet,\n        devices,\n        selfDevice,\n        serviceClasses,\n        pkts,\n        before,\n        after,\n        pipes,\n        port,\n        errors,\n    } = props\n\n    const filters: CompiledPacketFilter[] = []\n    if (before !== undefined) filters.push(pkt => pkt.timestamp <= before)\n    if (after !== undefined) filters.push(pkt => pkt.timestamp >= after)\n    if (announce !== undefined) filters.push(pkt => pkt.isAnnounce === announce)\n    if (repeatedAnnounce !== undefined)\n        filters.push(\n            pkt =>\n                (!pkt.isAnnounce || pkt.isRepeatedAnnounce) ===\n                repeatedAnnounce,\n        )\n    if (resetIn !== undefined)\n        filters.push(\n            pkt =>\n                !!(\n                    pkt.isRegisterSet &&\n                    pkt.serviceClass === SRV_CONTROL &&\n                    pkt.registerIdentifier === ControlReg.ResetIn\n                ) === resetIn,\n        )\n    if (minPriority !== undefined)\n        filters.push(\n            pkt =>\n                (pkt.isRegisterSet &&\n                    pkt.serviceClass == SRV_LOGGER &&\n                    pkt.registerIdentifier === LoggerReg.MinPriority) ===\n                minPriority,\n        )\n    if (requiresAck !== undefined)\n        filters.push(pkt => pkt.requiresAck === requiresAck)\n    if (ack !== undefined) filters.push(pkt => pkt.isCRCAck === ack)\n    if (flags) filters.push(pkt => hasAnyFlag(pkt))\n    if (pipes !== undefined) filters.push(pkt => pkt.isPipe)\n    if (port !== undefined) filters.push(pkt => pkt.pipePort === port)\n\n    if (regGet !== undefined && regSet !== undefined)\n        filters.push(\n            pkt => pkt.isRegisterGet === regGet && pkt.isRegisterSet === regSet,\n        )\n    else if (regGet !== undefined)\n        filters.push(pkt => pkt.isRegisterGet === regGet)\n    else if (regSet !== undefined)\n        filters.push(pkt => pkt.isRegisterSet === regSet)\n\n    if (log !== undefined)\n        filters.push(\n            pkt => (pkt.serviceClass === SRV_LOGGER && pkt.isReport) === log,\n        )\n    if (selfDevice !== undefined) {\n        filters.push(pkt => {\n            const { device } = pkt\n            if (!device) return true\n            return (device === device.bus.selfDevice) === selfDevice\n        })\n    }\n    if (Object.keys(devices).length)\n        filters.push(pkt => {\n            if (!pkt.device) return false\n            const f = devices[pkt.device.deviceId]\n            return (\n                !!f && (!f.from || !pkt.isCommand) && (!f.to || pkt.isCommand)\n            )\n        })\n    if (serviceClasses) {\n        filters.push(pkt =>\n            serviceClasses.some(serviceClass =>\n                isInstanceOf(pkt.serviceClass, serviceClass),\n            ),\n        )\n    }\n    if (pkts) {\n        filters.push(\n            pkt =>\n                pkts.indexOf(pkt.decoded?.info.identifier.toString(16)) > -1 ||\n                pkts.indexOf(pkt.decoded?.info.name) > -1,\n        )\n    }\n    if (productIdentifiers)\n        filters.push(pkt => {\n            const fwid = pkt.device?.productIdentifier\n            return fwid === undefined || productIdentifiers.indexOf(fwid) > -1\n        })\n\n    if (errors !== undefined)\n        filters.push(pkt => !!pkt.decoded?.error === errors)\n\n    const filter: CompiledPacketFilter = (pkt: Packet) =>\n        filters.every(filter => filter(pkt))\n    return filter\n\n    function hasAnyFlag(pkt: Packet) {\n        const k = pkt.decoded?.info.kind\n        return !!k && flags.indexOf(k) > -1\n    }\n}\n", "import { JDBus } from \"../bus\"\nimport { JDClient } from \"../client\"\nimport { CHANGE, FRAME_PROCESS, START, STOP } from \"../constants\"\nimport { JDFrameBuffer } from \"../packet\"\nimport { Trace } from \"./trace\"\n\nconst RECORDING_TRACE_MAX_ITEMS = 100000\n\n/**\n * A recorder of packets to create traces.\n * @category Trace\n */\nexport class TraceRecorder extends JDClient {\n    public maxRecordingLength = RECORDING_TRACE_MAX_ITEMS\n    private _trace: Trace\n    private _subscription: () => void\n\n    constructor(public readonly bus: JDBus) {\n        super()\n        this.handleFrame = this.handleFrame.bind(this)\n\n        this.mount(() => this._subscription?.())\n    }\n\n    start() {\n        if (this.recording) return\n\n        this._subscription = this.bus.subscribe(FRAME_PROCESS, this.handleFrame)\n        this._trace = new Trace([], { maxLength: this.maxRecordingLength })\n        this.emit(START)\n        this.emit(CHANGE)\n    }\n\n    stop() {\n        if (!this.recording) return\n\n        this._subscription?.()\n        this._subscription = undefined\n        const t = this._trace\n        this._trace = undefined\n        this.emit(STOP)\n        this.emit(CHANGE)\n\n        return t\n    }\n\n    get recording() {\n        return !!this._trace\n    }\n\n    get trace() {\n        return this._trace\n    }\n\n    private handleFrame(pkt: JDFrameBuffer) {\n        // record packets in traces\n        this._trace.addFrame(pkt)\n        // notify that this packet has been processed\n        this.emit(FRAME_PROCESS, pkt)\n    }\n}\n", "import { JDBus } from \"../bus\"\nimport { JDClient } from \"../client\"\nimport {\n    CHANGE,\n    DEVICE_ANNOUNCE,\n    FRAME_PROCESS,\n    META_ACK,\n    META_GET,\n    META_NOT_IMPLEMENTED,\n    META_PIPE,\n    PACKET_PROCESS,\n    SystemCmd,\n    TRACE_FILTER_HORIZON,\n} from \"../constants\"\nimport { JDFrameBuffer, Packet } from \"../packet\"\nimport { PacketFilter, parsePacketFilter } from \"../packetfilter\"\nimport { Trace } from \"./trace\"\nimport { throttle, toHex } from \"../utils\"\n\nconst TRACE_MAX_ITEMS = 1000\nconst FILTERED_TRACE_MAX_ITEMS = 100\nconst DUPLICATE_PACKET_MERGE_HORIZON_MAX_DISTANCE = 10\nconst DUPLICATE_PACKET_MERGE_HORIZON_MAX_TIME = 5000\n\n/**\n * A grouped packet\n * @category Trace\n */\nexport interface TracePacketProps {\n    /**\n     * Unique key used for React lists\n     */\n    key: string\n    /**\n     * Identifier to match packets together\n     */\n    hash: string\n    /**\n     * The packet\n     */\n    packet: Packet\n    count?: number\n}\n\n/**\n * A filtered view over a packet trace\n * @category Trace\n */\nexport class TraceView extends JDClient {\n    private id = \"v\" + Math.random()\n    private _maxFilteredLength = FILTERED_TRACE_MAX_ITEMS\n\n    private _paused = false\n    private _trace: Trace\n    private _filter: string\n    private _packetFilter: PacketFilter = undefined\n    private _filteredPackets: TracePacketProps[] = []\n    private _allPackets: Packet[] = []\n\n    public silent = false\n    private notifyPacketsChanged: () => void\n\n    constructor(\n        public readonly bus: JDBus,\n        filter: string,\n        throttleDelay = 200\n    ) {\n        super()\n        this._trace = new Trace([], { maxLength: TRACE_MAX_ITEMS })\n        this.handleFrame = this.handleFrame.bind(this)\n        this.handlePacket = this.handlePacket.bind(this)\n        this.handleFilterUpdate = this.handleFilterUpdate.bind(this)\n\n        this.notifyPacketsChanged = throttle(() => {\n            if (!this.silent) this.setFilteredPackets()\n        }, throttleDelay)\n\n        this.mount(this.bus.subscribe(FRAME_PROCESS, this.handleFrame))\n        this.mount(this.bus.subscribe(PACKET_PROCESS, this.handlePacket))\n        this.mount(this.bus.subscribe(DEVICE_ANNOUNCE, this.handleFilterUpdate))\n\n        this.filter = filter\n    }\n\n    /**\n     * No new packet is added to the filtered view\n     */\n    get paused() {\n        return this._paused\n    }\n\n    set paused(v: boolean) {\n        if (v !== this._paused) {\n            this._paused = v\n            if (!this._paused) {\n                this.refreshFilter()\n                this.emit(CHANGE)\n            }\n        }\n    }\n\n    get trace() {\n        return this._trace\n    }\n\n    set trace(t: Trace) {\n        if (t !== this._trace) {\n            this._trace = t\n            this._allPackets = t.toPackets(this.bus)\n            this.refreshFilter()\n            this.emit(CHANGE)\n        }\n    }\n\n    get filteredPackets() {\n        return this._filteredPackets\n    }\n\n    get filter() {\n        return this._filter\n    }\n\n    set filter(f: string) {\n        if (f !== this._filter) {\n            this._filter = f\n            this.refreshFilter()\n            this.emit(CHANGE)\n        }\n    }\n\n    get maxFilteredLength() {\n        return this._maxFilteredLength\n    }\n\n    set maxFilteredLength(v: number) {\n        if (this._maxFilteredLength !== v) {\n            this._maxFilteredLength = v\n            this.refreshFilter()\n            this.emit(CHANGE)\n        }\n    }\n\n    private setFilteredPackets() {\n        // always clone for React\n        this._filteredPackets = this._filteredPackets.slice(\n            0,\n            this._filteredPackets.length > this.maxFilteredLength * 1.1\n                ? this.maxFilteredLength\n                : this._filteredPackets.length\n        )\n        this.emit(CHANGE)\n    }\n\n    clear() {\n        this.trace = new Trace([], { maxLength: TRACE_MAX_ITEMS })\n        this._filteredPackets = []\n        this.setFilteredPackets()\n        this.emit(CHANGE)\n    }\n\n    private handleFilterUpdate() {\n        this.refreshFilter()\n    }\n\n    private refreshFilter() {\n        this.id = \"view\" + Math.random()\n        this._packetFilter = parsePacketFilter(this.bus, this._filter)\n        this._filteredPackets = []\n        const packets = this._allPackets\n        // reapply filter to existing trace\n        for (\n            let i = packets.length - 1;\n            i >= 0 && this._filteredPackets.length < this.maxFilteredLength;\n            --i\n        ) {\n            const pkt = packets[i]\n            if (this._packetFilter?.filter(pkt)) {\n                this.addFilteredPacket(pkt)\n            }\n        }\n        this._filteredPackets = this._filteredPackets.reverse()\n        this.notifyPacketsChanged?.()\n    }\n\n    private handlePacket(pkt: Packet) {\n        if (this._paused) return\n        this._allPackets.push(pkt)\n        if (this._allPackets.length > TRACE_MAX_ITEMS * 1.5)\n            this._allPackets = this._allPackets.slice(-TRACE_MAX_ITEMS)\n        // add packet to live list\n        if (this._packetFilter?.filter(pkt)) {\n            this.addFilteredPacket(pkt)\n            // debounced notification of changes\n            this.notifyPacketsChanged?.()\n        }\n    }\n\n    private handleFrame(frame: JDFrameBuffer) {\n        if (this._paused) return\n        // remember packet\n        this._trace.addFrame(frame)\n    }\n\n    private addFilteredPacket(packet: Packet) {\n        if (packet.meta[this.id]) return\n        packet.meta[this.id] = true\n\n        // keep in filtered view\n        let filtered = true\n        const hash = toHex(packet.toBuffer())\n        if (this._packetFilter?.props.grouping) {\n            const old = this._filteredPackets\n                .slice(0, DUPLICATE_PACKET_MERGE_HORIZON_MAX_DISTANCE)\n                .find(\n                    p =>\n                        packet.timestamp - p.packet.timestamp <\n                            DUPLICATE_PACKET_MERGE_HORIZON_MAX_TIME &&\n                        p.hash === hash\n                )\n            if (old) {\n                old.count++\n                filtered = false\n            }\n        }\n\n        // collapse acks\n        if (packet.isCRCAck) {\n            const pkts = this._allPackets\n            const crc = packet.serviceCommand\n            const did = packet.deviceIdentifier\n            const m = Math.max(0, pkts.length - TRACE_FILTER_HORIZON) // max scan 100 packets back\n            for (let i = pkts.length - 1; i >= m; i--) {\n                const old = pkts[i]\n                if (\n                    old.requiresAck &&\n                    old.deviceIdentifier === did &&\n                    old.crc === crc\n                ) {\n                    old.meta[META_ACK] = packet\n                    if (this._packetFilter?.props.collapseAck) filtered = false\n                    break\n                }\n            }\n        }\n\n        // track command not supported\n        if (packet.serviceCommand === SystemCmd.CommandNotImplemented) {\n            const pkts = this._allPackets\n            const [sc, crc] = packet.jdunpack<[number, number]>(\"u16 u16\")\n            const m = Math.max(0, pkts.length - TRACE_FILTER_HORIZON) // max scan 100 packets back\n            for (let i = pkts.length - 1; i >= m; i--) {\n                const old = pkts[i]\n                if (old.crc === crc && old.serviceCommand === sc) {\n                    old.meta[META_NOT_IMPLEMENTED] = packet\n                    if (this._packetFilter?.props.collapseNotImplemented)\n                        filtered = false\n                    break\n                }\n            }\n        }\n\n        // report coming back\n        if (packet.isRegisterGet && packet.isReport && !packet.meta[META_GET]) {\n            const pkts = this._allPackets\n            const did = packet.deviceIdentifier\n            const si = packet.serviceIndex\n            const rid = packet.registerIdentifier\n            const m = Math.max(0, pkts.length - TRACE_FILTER_HORIZON) // max scan 100 packets back\n            for (let i = pkts.length - 1; i >= m; i--) {\n                const old = pkts[i]\n                if (\n                    old.isRegisterGet &&\n                    old.isCommand &&\n                    old.deviceIdentifier === did &&\n                    old.serviceIndex === si &&\n                    old.registerIdentifier === rid\n                ) {\n                    // response from a get command\n                    packet.meta[META_GET] = old\n                    if (this._packetFilter?.props.collapseGets) {\n                        // remove old\n                        this._filteredPackets.splice(i, 1)\n                        // keep new\n                    }\n                    break\n                }\n            }\n        }\n        // collapse pipes\n        if (\n            this._packetFilter?.props.collapsePipes &&\n            packet.isPipe &&\n            packet.isCommand\n        ) {\n            const pkts = this._filteredPackets\n            const m = Math.min(pkts.length, TRACE_FILTER_HORIZON) // max scan 100 packets back\n            const port = packet.pipePort\n            const did = packet.deviceIdentifier\n            for (let i = 0; i < m; ++i) {\n                const old = pkts[i].packet\n                if (old.deviceIdentifier === did && old.pipePort === port) {\n                    let pipePackets = old.meta[META_PIPE] as Packet[]\n                    if (!pipePackets) pipePackets = old.meta[META_PIPE] = []\n                    pipePackets[packet.pipeCount] = packet\n                    filtered = false\n                    break\n                }\n            }\n        }\n\n        if (filtered) {\n            const key = packet.timestamp + hash\n            this._filteredPackets.unshift({\n                key,\n                hash,\n                packet,\n                count: 1,\n            })\n        }\n    }\n}\n", "import {\n    LIGHT_PROG_COL1_SET,\n    LIGHT_PROG_FADE,\n    LIGHT_PROG_FADE_HSV,\n    LIGHT_PROG_MODE,\n    LIGHT_PROG_MODE1,\n    LIGHT_PROG_RANGE,\n    LIGHT_PROG_ROTATE_BACK,\n    LIGHT_PROG_ROTATE_FWD,\n    LIGHT_PROG_SET_ALL,\n    LIGHT_PROG_SHOW,\n} from \"./lightconstants\"\nimport { fromHex } from \"./utils\"\n\nfunction cmdCode(cmd: string) {\n    switch (cmd) {\n        case \"setall\":\n            return LIGHT_PROG_SET_ALL\n        case \"fade\":\n            return LIGHT_PROG_FADE\n        case \"fadehsv\":\n            return LIGHT_PROG_FADE_HSV\n        case \"rotfwd\":\n            return LIGHT_PROG_ROTATE_FWD\n        case \"rotback\":\n            return LIGHT_PROG_ROTATE_BACK\n        case \"show\":\n        case \"wait\":\n            return LIGHT_PROG_SHOW\n        case \"range\":\n            return LIGHT_PROG_RANGE\n        case \"mode\":\n            return LIGHT_PROG_MODE\n        case \"tmpmode\":\n            return LIGHT_PROG_MODE1\n        case \"setone\":\n            return LIGHT_PROG_COL1_SET\n        case \"mult\":\n            return 0x100\n        default:\n            return undefined\n    }\n}\n\nfunction isWhiteSpace(code: number) {\n    return code == 32 || code == 13 || code == 10 || code == 9\n}\n\n/**\n * Encodes a light command into a buffer\n * @param format\n * @param args\n * @returns\n * @category Data Packing\n */\nexport function lightEncode(format: string, args: (number | number[])[]) {\n    // tokens are white-space separated\n    // % - number from args[]\n    // # - color from args[]\n    // #0123ff - color\n    // 123 - number\n    // commands: set, fade, fadehsv, rotfwd, rotback, pause\n    // fadehsv 0 12 #00ffff #ffffff\n\n    const outarr: number[] = []\n    let colors: number[] = []\n    let pos = 0\n    let currcmd = 0\n\n    function pushNumber(n: number) {\n        if (n == null || (n | 0) != n || n < 0 || n >= 16383)\n            throw new Error(\"number out of range: \" + n)\n        if (n < 128) outarr.push(n)\n        else {\n            outarr.push(0x80 | (n >> 8))\n            outarr.push(n & 0xff)\n        }\n    }\n\n    function flush() {\n        if (currcmd == 0xcf) {\n            if (colors.length != 1) throw new Error(\"setone requires 1 color\")\n        } else {\n            if (colors.length == 0) return\n            if (colors.length <= 3) outarr.push(0xc0 | colors.length)\n            else {\n                outarr.push(0xc0)\n                outarr.push(colors.length)\n            }\n        }\n        for (const c of colors) {\n            outarr.push((c >> 16) & 0xff)\n            outarr.push((c >> 8) & 0xff)\n            outarr.push((c >> 0) & 0xff)\n        }\n        colors = []\n    }\n\n    function nextToken() {\n        while (isWhiteSpace(format.charCodeAt(pos))) pos++\n        const beg = pos\n        while (pos < format.length && !isWhiteSpace(format.charCodeAt(pos)))\n            pos++\n        return format.slice(beg, pos)\n    }\n\n    while (pos < format.length) {\n        const token = nextToken()\n        const t0 = token.charCodeAt(0)\n        if (97 <= t0 && t0 <= 122) {\n            // a-z\n            flush()\n            currcmd = cmdCode(token)\n            if (currcmd == undefined)\n                throw new Error(\"unknown light command: \" + token)\n            if (currcmd == 0x100) {\n                const f = parseFloat(nextToken())\n                if (isNaN(f) || f < 0 || f > 2)\n                    throw new Error(\"expecting scale\")\n                outarr.push(0xd8) // tmpmode\n                outarr.push(3) // mult\n                outarr.push(0xd0) // setall\n                const mm = Math.round(128 * f) & 0xff\n                outarr.push(0xc1)\n                outarr.push(mm)\n                outarr.push(mm)\n                outarr.push(mm)\n            } else {\n                outarr.push(currcmd)\n            }\n        } else if (48 <= t0 && t0 <= 57) {\n            // 0-9\n            pushNumber(parseInt(token))\n        } else if (t0 == 37) {\n            // %\n            if (args.length == 0) throw new Error(\"out of args, %\")\n            const v = args.shift()\n            if (typeof v != \"number\") throw new Error(\"expecting number\")\n            pushNumber(v)\n        } else if (t0 == 35) {\n            // #\n            if (token.length == 1) {\n                if (args.length == 0) throw new Error(\"out of args, #\")\n                const v = args.shift()\n                if (typeof v === \"number\") colors.push(v)\n                else if (Array.isArray(v)) for (const vv of v) colors.push(vv)\n                else throw Error(\"invalid number \" + v)\n            } else {\n                if (token.length == 7) {\n                    const b = fromHex(token.slice(1))\n                    const c = (b[0] << 16) | (b[1] << 8) | b[2]\n                    colors.push(c)\n                } else {\n                    throw new Error(\"invalid color: \" + token)\n                }\n            }\n        }\n    }\n    flush()\n\n    return new Uint8Array(outarr)\n}\n", "export interface Setting {\n    get(): string | undefined\n    set(v: string): void\n}\n\nexport function localStorageSetting(key: string): Setting {\n    if (typeof self !== \"undefined\" && self.localStorage) {\n        return {\n            get: () => self.localStorage.getItem(key) ?? undefined,\n            set: v => self.localStorage.setItem(key, v),\n        }\n    }\n    return undefined\n}\n", "import { Setting } from \"./setting\"\n\nlet settingsPath = \"\"\nexport function nodeSetting(key: string): Setting {\n    let v: string\n    let keyPath: string\n    const fs = require(\"fs\")\n    function init() {\n        if (!settingsPath) {\n            const jd = process.env[\"HOME\"] + \"/.jacdac\"\n            try {\n                fs.mkdirSync(jd)\n            } catch {}\n            settingsPath = jd + \"/settings\"\n            try {\n                fs.mkdirSync(settingsPath)\n            } catch {}\n        }\n        if (!keyPath) {\n            keyPath =\n                settingsPath +\n                \"/\" +\n                key.replace(/[^a-z_\\-]/g, c => c.charCodeAt(0) + \"\")\n            try {\n                v = fs.readFileSync(keyPath, \"utf8\")\n            } catch {\n                v = undefined\n            }\n        }\n    }\n    function get() {\n        init()\n        return v\n    }\n    function set(nv: string) {\n        init()\n        if (v !== nv) {\n            v = nv\n            fs.writeFileSync(keyPath, nv, \"utf8\")\n        }\n    }\n    return { get, set }\n}\n", "import { JDBus } from \"../bus\"\nimport {\n    CHANGE,\n    DEVICE_DISCONNECT,\n    REGISTER_PRE_GET,\n    RoleManagerCmd,\n    RoleManagerEvent,\n    RoleManagerReg,\n    SRV_ROLE_MANAGER,\n} from \"../constants\"\nimport { JDDevice } from \"../device\"\nimport { jdpack } from \"../pack\"\nimport { Packet } from \"../packet\"\nimport { OutPipe } from \"../pipes\"\nimport { JDRegisterServer } from \"./registerserver\"\nimport { JDServiceServer } from \"./serviceserver\"\nimport { debounce, fromHex, strcmp, toHex } from \"../utils\"\nimport { Setting } from \"../setting\"\n\nclass Role {\n    device: JDDevice\n    serviceIndex: number\n    constructor(public name: string, public classIdentifier: number) {}\n    clear() {\n        this.device = undefined\n        this.serviceIndex = undefined\n    }\n    isAssigned() {\n        return this.device != undefined\n    }\n    assignment() {\n        if (this.isAssigned())\n            return this.device.deviceId + \":\" + this.serviceIndex\n        return undefined\n    }\n    toString() {\n        const binding = this.device\n            ? this.device + \":\" + this.serviceIndex\n            : \"?\"\n        return `${this.name}[${binding}]`\n    }\n}\n\nexport class RoleManagerServer extends JDServiceServer {\n    private roles: Role[] = []\n    private assignmentCache: Record<string, string> // role name -> deviceId : serviceIndex\n    private autoBindEnabled: JDRegisterServer<[boolean]>\n\n    constructor(private bus: JDBus, readonly roleStore?: Setting) {\n        super(SRV_ROLE_MANAGER)\n\n        this.assignmentCache = this.read()\n\n        this.changed = debounce(this.changed.bind(this), 100)\n\n        this.addCommand(RoleManagerCmd.SetRole, this.handleSet.bind(this))\n        this.addCommand(RoleManagerCmd.ListRoles, this.handleList.bind(this))\n        this.addCommand(\n            RoleManagerCmd.ClearAllRoles,\n            this.handleClearAssignments.bind(this)\n        )\n\n        const alloc = this.addRegister(RoleManagerReg.AllRolesAllocated)\n        alloc.on(REGISTER_PRE_GET, () => {\n            const allDone = this.roles.every(r => r.isAssigned())\n            alloc.setValues([allDone ? 1 : 0])\n        })\n\n        this.autoBindEnabled = this.addRegister(RoleManagerReg.AutoBind, [true])\n\n        this.initForBus()\n    }\n\n    private changed() {\n        console.log(\"CHANGE: \" + this.roles.join(\", \"))\n        this.emit(CHANGE)\n        this.sendEvent(RoleManagerEvent.Change)\n    }\n\n    private initForBus() {\n        for (const r of this.roles) {\n            this.setFromCache(r)\n        }\n        this.bus.scheduler.setInterval(() => this.autoBind(), 980)\n        this.bus.on(DEVICE_DISCONNECT, (dev: JDDevice) => {\n            let numCleared = 0\n            for (const r of this.roles) {\n                if (r.device == dev) {\n                    r.clear()\n                    numCleared++\n                }\n            }\n            if (numCleared) this.changed()\n        })\n    }\n\n    private autoBind() {\n        if (!this.autoBindEnabled.values()[0]) return\n\n        const usedBindings: Record<string, boolean> = {}\n        let numUnbound = 0\n        for (const r of this.roles)\n            if (r.isAssigned()) usedBindings[r.assignment()] = true\n            else numUnbound++\n        if (numUnbound == 0) return\n\n        const devs = this.bus.devices()\n        devs.sort((a, b) => strcmp(a.deviceId, b.deviceId))\n        const assignedRoles: Role[] = []\n        const roles = this.roles.slice()\n        roles.sort((a, b) => strcmp(a.name, b.name))\n        for (const r of roles) {\n            if (!r.isAssigned())\n                for (const d of devs) {\n                    const len = d.serviceLength\n                    for (let i = 1; i < len; ++i) {\n                        if (\n                            r.classIdentifier == d.serviceClassAt(i) &&\n                            !usedBindings[d.deviceId + \":\" + i]\n                        ) {\n                            this.setRoleCore(r.name, d, i)\n                            usedBindings[r.assignment()] = true\n                            assignedRoles.push(r)\n                        }\n                    }\n                }\n        }\n\n        if (assignedRoles.length) {\n            this.save()\n            this.changed()\n        }\n    }\n\n    private setFromCache(r: Role) {\n        if (r.isAssigned()) return\n        const cached = this.assignmentCache[r.name]\n        if (typeof cached != \"string\") return\n        const [devId, idx_] = cached.split(\":\")\n        const dev = this.bus.device(devId, true)\n        const idx = parseInt(idx_)\n        if (!dev || !idx) return\n        if (dev.serviceClassAt(idx) != r.classIdentifier) return\n        this.setRole(r.name, dev, idx)\n    }\n\n    public deleteRoles() {\n        this.roles = []\n        this.changed()\n    }\n\n    public clearAssignments() {\n        for (const r of this.roles) r.clear()\n        this.assignmentCache = {}\n        this.save()\n        this.changed()\n    }\n\n    public addRole(name: string, classIdenitifer: number) {\n        let r = this.lookup(name)\n        if (!r) {\n            this.roles.push((r = new Role(name, classIdenitifer)))\n        } else {\n            if (r.classIdentifier == classIdenitifer) return\n            r.classIdentifier = classIdenitifer\n            if (r.device) {\n                delete this.assignmentCache[r.name]\n                this.save()\n            }\n            r.clear()\n        }\n        this.setFromCache(r)\n        this.changed()\n    }\n\n    private setRoleCore(name: string, dev: JDDevice, serviceIndex: number) {\n        const r = this.lookup(name)\n        if (r) {\n            if (r.device == dev && r.serviceIndex == serviceIndex) return\n            for (const role of this.roles) {\n                if (role.device == dev && role.serviceIndex == serviceIndex) {\n                    role.clear()\n                    delete this.assignmentCache[role.name]\n                }\n            }\n            r.device = dev\n            r.serviceIndex = serviceIndex\n            this.assignmentCache[r.name] = r.assignment()\n        }\n    }\n\n    public setRole(name: string, dev: JDDevice, serviceIndex: number) {\n        this.setRoleCore(name, dev, serviceIndex)\n        this.save()\n        this.changed()\n    }\n\n    public getRole(\n        name: string\n    ): { device: JDDevice; serviceIndex: number } | undefined {\n        const r = this.lookup(name)\n        if (r) return { device: r.device, serviceIndex: r.serviceIndex }\n        else return undefined\n    }\n\n    private lookup(name: string) {\n        return this.roles.find(r => r.name == name)\n    }\n\n    private async handleSet(pkt: Packet) {\n        const [deviceId, serviceIdx, role] =\n            pkt.jdunpack<[Uint8Array, number, string]>(\"b[8] u8 s\")\n        const dev = this.bus.device(toHex(deviceId), true, pkt)\n        if (dev) this.setRole(role, dev, serviceIdx)\n    }\n\n    private async handleList(pkt: Packet) {\n        const pipe = OutPipe.from(this.bus, pkt, true)\n        await pipe.respondForEach(this.roles, r => {\n            const id = r.device ? fromHex(r.device.deviceId) : new Uint8Array(8)\n            return jdpack<[Uint8Array, number, number, string]>(\n                \"b[8] u32 u8 s\",\n                [id, r.classIdentifier, r.serviceIndex || 0, r.name]\n            )\n        })\n    }\n\n    private handleClearAssignments() {\n        this.clearAssignments()\n    }\n\n    private read(): Record<string, string> {\n        if (!this.roleStore) return {}\n\n        try {\n            return JSON.parse(this.roleStore.get() || \"{}\")\n        } catch (e) {\n            console.debug(e)\n            return {}\n        }\n    }\n\n    private save() {\n        this.roleStore?.set(JSON.stringify(this.assignmentCache))\n    }\n}\n", "/**\n * @internal\n */\nexport function hsvToCss(\n    hue: number,\n    saturation: number,\n    value: number,\n    brightness: number,\n    monochrome?: boolean,\n) {\n    const csshue = (hue * 360) / 0xff\n    const csssat = (monochrome ? 0xff : saturation) / 0xff\n    const cssval = value / 0xff\n    const [h, s, l] = hsv_to_hsl(csshue, csssat, cssval)\n    const mixl = 0.3\n    const alpha = (mixl + (1 - mixl) * l) * brightness\n\n    return `hsla(${h}, ${s * 100}%, ${l * 100}%, ${alpha}`\n}\n\nfunction hsv_to_hsl(h: number, s: number, v: number) {\n    // both hsv and hsl values are in [0, 1]\n    const l = ((2 - s) * v) / 2\n\n    if (l != 0) {\n        if (l == 1) {\n            s = 0\n        } else if (l < 0.5) {\n            s = (s * v) / (l * 2)\n        } else {\n            s = (s * v) / (2 - l * 2)\n        }\n    }\n\n    return [h, s, l]\n}\n", "import { JDBus } from \"./bus\"\nimport { JDClient } from \"./client\"\nimport { CHANGE, FRAME_PROCESS } from \"./constants\"\nimport { JDFrameBuffer } from \"./packet\"\nimport { randomDeviceId } from \"./random\"\n\n/**\n * A client that bridges received and sent packets to a parent iframe.\n * @category JDOM\n */\nexport abstract class JDBridge extends JDClient {\n    private _bus: JDBus\n    readonly bridgeId: string\n    packetSent = 0\n    packetProcessed = 0\n    currFrame: JDFrameBuffer\n\n    constructor(\n        name: string,\n        public readonly infrastructure: boolean = false,\n    ) {\n        super()\n        this.bridgeId = `bridge-${name}-` + randomDeviceId()\n        this.handleSendFrame = this.handleSendFrame.bind(this)\n    }\n\n    get bus() {\n        return this._bus\n    }\n\n    set bus(newBus: JDBus) {\n        if (newBus !== this._bus) {\n            if (this._bus) this.unmount()\n            this._bus = newBus\n            if (this._bus) {\n                this.mount(\n                    this._bus.subscribe(FRAME_PROCESS, this.handleSendFrame),\n                )\n                this.mount(this._bus.addBridge(this))\n            }\n            this.emit(CHANGE)\n        }\n    }\n\n    /**\n     * Decodes and distributes a payload\n     * @param data\n     */\n    receiveFrameOrPacket(data: JDFrameBuffer, sender?: string) {\n        const bus = this._bus\n        if (!bus) return\n\n        this.packetProcessed++\n        if (sender) data._jacdac_sender = sender\n        if (!data._jacdac_sender) data._jacdac_sender = this.bridgeId\n\n        this.currFrame = data // block self-loops\n        // send to native bus and process on JS bus\n        bus.sendFrameAsync(data)\n        this.emit(FRAME_PROCESS, data)\n        this.currFrame = null\n    }\n\n    private handleSendFrame(frame: JDFrameBuffer) {\n        if (\n            !this._bus ||\n            this.currFrame == frame ||\n            frame._jacdac_sender === this.bridgeId\n        )\n            return\n        this.packetSent++\n        this.sendPacket(frame, frame._jacdac_sender)\n    }\n\n    /**\n     * Sends packet data over the bridge\n     * @param pkt\n     */\n    protected abstract sendPacket(data: Uint8Array, sender: string): void\n}\n\nclass ProxyBridge extends JDBridge {\n    constructor(\n        readonly _sendPacket: (pkt: Uint8Array, sender: string) => void,\n    ) {\n        super(\"proxy\", true)\n    }\n    protected sendPacket(data: Uint8Array, sender: string): void {\n        this._sendPacket(data, sender)\n    }\n}\n\nexport function createProxyBridge(\n    sendPacket: (pkt: Uint8Array, sender: string) => void,\n) {\n    return new ProxyBridge(sendPacket)\n}\n", "import { CHANGE, SettingsCmd } from \"../constants\"\nimport { jdpack, jdunpack } from \"../pack\"\nimport { Packet } from \"../packet\"\nimport { InPipeReader } from \"../pipes\"\nimport { JDService } from \"../service\"\nimport { JDServiceClient } from \"../serviceclient\"\nimport { bufferToString, stringToBuffer } from \"../utils\"\n\n/**\n * A settings service client implementation.\n * @category Clients\n */\nexport class SettingsClient extends JDServiceClient {\n    constructor(service: JDService) {\n        super(service)\n        service.registersUseAcks = true\n    }\n\n    async clear() {\n        await this.service.sendCmdAsync(SettingsCmd.Clear)\n    }\n\n    async listKeys(): Promise<string[]> {\n        const inp = new InPipeReader(this.bus)\n        await this.service.sendPacketAsync(\n            inp.openCommand(SettingsCmd.ListKeys),\n            true\n        )\n        const { output } = await inp.readAll()\n        const keys = output.map(pkt => pkt.stringData)\n        return keys.filter(k => !!k)\n    }\n\n    async list(): Promise<{ key: string; value?: Uint8Array }[]> {\n        const inp = new InPipeReader(this.bus)\n        await this.service.sendPacketAsync(\n            inp.openCommand(SettingsCmd.List),\n            true\n        )\n        const { output } = await inp.readAll()\n        return output\n            .map(pkt => {\n                const [key, value] = pkt.jdunpack<[string, Uint8Array]>(\"z b\")\n                return key && { key, value }\n            })\n            .filter(kv => !!kv)\n    }\n\n    async setValue(key: string, value: Uint8Array) {\n        key = key.trim()\n        if (value === undefined) {\n            await this.deleteValue(key)\n        } else {\n            const pkt = Packet.from(\n                SettingsCmd.Set,\n                jdpack(\"z b\", [key, value])\n            )\n            await this.service.sendPacketAsync(pkt, true)\n            this.emit(CHANGE)\n        }\n    }\n\n    async setStringValue(key: string, value: string) {\n        await this.setValue(key, value ? stringToBuffer(value) : undefined)\n    }\n\n    async getValue(key: string): Promise<Uint8Array> {\n        if (!key) return undefined\n\n        key = key.trim()\n        const pkt = Packet.from(SettingsCmd.Get, jdpack(\"s\", [key]))\n        const resp = await this.service.sendCmdAwaitResponseAsync(pkt)\n        const [rkey, value] = jdunpack<[string, Uint8Array]>(resp.data, \"z b\")\n        if (key !== rkey) {\n            console.error(\n                `device returned different key, got \"${rkey}\", expected \"${key}\"`\n            )\n            return undefined\n        }\n        return value\n    }\n\n    async getStringValue(key: string) {\n        const value = await this.getValue(key)\n        return value && bufferToString(value)\n    }\n\n    async deleteValue(key: string) {\n        if (!key) return\n        key = key.trim()\n        const pkt = Packet.from(SettingsCmd.Delete, jdpack(\"s\", [key]))\n        await this.service.sendPacketAsync(pkt)\n\n        this.emit(CHANGE)\n    }\n}\n", "import {\n    CHANGE,\n    EVENT,\n    DeviceScriptManagerCmd,\n    DeviceScriptManagerEvent,\n    DeviceScriptManagerReg,\n} from \"../constants\"\nimport { jdpack } from \"../pack\"\nimport { OutPipe } from \"../pipes\"\nimport { JDService } from \"../service\"\nimport { JDServiceClient } from \"../serviceclient\"\n\nexport class DeviceScriptManagerClient extends JDServiceClient {\n    constructor(service: JDService) {\n        super(service)\n\n        // report events\n        const changeEvent = service.event(\n            DeviceScriptManagerEvent.ProgramChange\n        )\n        this.mount(changeEvent.subscribe(EVENT, () => this.emit(CHANGE)))\n        this.mount(\n            changeEvent.subscribe(EVENT, () =>\n                this.emit(DeviceScriptManagerClient.PROGRAM_CHANGE)\n            )\n        )\n\n        const panicEvent = service.event(DeviceScriptManagerEvent.ProgramPanic)\n        this.mount(\n            panicEvent.subscribe(EVENT, (args: unknown[]) =>\n                this.emit(\n                    DeviceScriptManagerClient.PROGRAM_PANIC,\n                    ...(args || [])\n                )\n            )\n        )\n    }\n\n    static PROGRAM_CHANGE = \"programChange\"\n    static PROGRAM_PANIC = \"programPanic\"\n\n    deployBytecode(bytecode: Uint8Array, onProgress?: (p: number) => void) {\n        return OutPipe.sendBytes(\n            this.service,\n            DeviceScriptManagerCmd.DeployBytecode,\n            bytecode,\n            onProgress\n        )\n    }\n\n    async setRunning(value: boolean) {\n        const reg = this.service.register(DeviceScriptManagerReg.Running)\n        await reg.sendSetAsync(jdpack(\"u8\", [value ? 1 : 0]))\n    }\n\n    async setAutoStart(value: boolean) {\n        const reg = this.service.register(DeviceScriptManagerReg.Autostart)\n        await reg.sendSetAsync(jdpack(\"u8\", [value ? 1 : 0]))\n    }\n}\n", "import { Packet } from \"../packet\"\nimport { Flags } from \"../flags\"\nimport { bufferConcat } from \"../utils\"\nimport {\n    BLUETOOTH_JACDAC_TX_CHARACTERISTIC,\n    BLUETOOTH_JACDAC_RX_CHARACTERISTIC,\n    BLUETOOTH_JACDAC_SERVICE,\n    BLUETOOTH_TRANSPORT,\n} from \"../constants\"\nimport { Transport } from \"./transport\"\n\nconst JD_BLE_FIRST_CHUNK_FLAG = 0x80\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface WebBluetoothOptions {}\n\n/**\n * Indicates with Web Bluetooth transport are enabled\n * @category Transport\n */\nexport function isWebBluetoothEnabled(): boolean {\n    return !!Flags.webBluetooth\n}\n\n/**\n * Indicates with Web Bluetooth is supported in this environment\n * @category Transport\n */\nexport function isWebBluetoothSupported(): boolean {\n    try {\n        return (\n            typeof navigator !== \"undefined\" &&\n            !!navigator.bluetooth &&\n            !!navigator.bluetooth.requestDevice\n        )\n    } catch (e) {\n        return false\n    }\n}\n\nfunction bleRequestDevice(\n    options?: RequestDeviceOptions\n): Promise<BluetoothDevice> {\n    // disabled\n    if (!Flags.webBluetooth) return Promise.resolve(undefined)\n\n    try {\n        console.debug(`bluetooth request`, { options })\n        return navigator?.bluetooth?.requestDevice?.(options)\n    } catch (e) {\n        if (Flags.diagnostics) console.warn(e)\n        return undefined\n    }\n}\n\nfunction bleGetDevices(): Promise<BluetoothDevice[]> {\n    // disabled\n    if (!Flags.webBluetooth) return Promise.resolve([])\n\n    try {\n        return navigator?.bluetooth?.getDevices() || Promise.resolve([])\n    } catch (e) {\n        if (Flags.diagnostics) console.warn(e)\n        return Promise.resolve([])\n    }\n}\n\nclass BluetoothTransport extends Transport {\n    private _device: BluetoothDevice\n    private _server: BluetoothRemoteGATTServer\n    private _service: BluetoothRemoteGATTService\n    private _rxCharacteristic: BluetoothRemoteGATTCharacteristic\n    private _txCharacteristic: BluetoothRemoteGATTCharacteristic\n    private _rxBuffer: Uint8Array\n    private _rxChunkCounter: number\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    constructor(options?: WebBluetoothOptions) {\n        super(BLUETOOTH_TRANSPORT, { checkPulse: true })\n\n        this.handleDisconnected = this.handleDisconnected.bind(this)\n        this.handleCharacteristicChanged =\n            this.handleCharacteristicChanged.bind(this)\n    }\n\n    description(): string {\n        return this._device?.name\n    }\n\n    protected async transportConnectAsync(background: boolean) {\n        // get a device\n        if (background) {\n            const devices = await bleGetDevices()\n            this._device = devices?.[0]\n        } else {\n            const device = await bleRequestDevice({\n                filters: [{ namePrefix: \"BBC micro:bit\" }],\n                optionalServices: [BLUETOOTH_JACDAC_SERVICE],\n            })\n            this._device = device\n        }\n\n        if (!this._device?.gatt) throw new Error(\"Device not found\")\n\n        // listen for disconnection\n        this._device.addEventListener(\n            \"gattserverdisconnected\",\n            this.handleDisconnected,\n            false\n        )\n\n        // connect to gatt\n        this._server = await this._device.gatt.connect()\n        // connect to service\n        this._service = await this._server.getPrimaryService(\n            BLUETOOTH_JACDAC_SERVICE\n        )\n        // connect to characteristic\n        this._rxCharacteristic = await this._service.getCharacteristic(\n            BLUETOOTH_JACDAC_RX_CHARACTERISTIC\n        )\n\n        this._txCharacteristic = await this._service.getCharacteristic(\n            BLUETOOTH_JACDAC_TX_CHARACTERISTIC\n        )\n        // listen for incoming packet\n        this._rxCharacteristic.addEventListener(\n            \"characteristicvaluechanged\",\n            this.handleCharacteristicChanged,\n            false\n        )\n        // start listening\n        await this._rxCharacteristic.startNotifications()\n    }\n\n    protected async transportSendPacketAsync(data: Uint8Array) {\n        if (!this._txCharacteristic) {\n            console.debug(`trying to send Bluetooth packet while disconnected`)\n            return\n        }\n\n        const length = data.length\n\n        const totalChunks = Math.ceil(data.length / 18)\n        let remainingChunks = totalChunks == 0 ? 0 : totalChunks - 1\n        let sent = 0\n        while (sent < length) {\n            const n = Math.min(18, length - sent)\n            const chunk = data.slice(sent, sent + n)\n            const header = new Uint8Array(2)\n            header[0] = totalChunks & 0x7f\n\n            if (sent == 0) header[0] |= JD_BLE_FIRST_CHUNK_FLAG\n\n            header[1] = remainingChunks\n            this._txCharacteristic.writeValueWithoutResponse(\n                bufferConcat(header, chunk)\n            )\n            sent += n\n            remainingChunks = remainingChunks == 0 ? 0 : remainingChunks - 1\n            console.debug(\n                `chunk: ${chunk.toString()} [${remainingChunks} chunks remaining]`\n            )\n        }\n    }\n\n    protected async transportDisconnectAsync() {\n        if (!this._device) return\n\n        console.debug(`ble: disconnecting`)\n        try {\n            this._rxCharacteristic?.removeEventListener(\n                \"characteristicvaluechanged\",\n                this.handleCharacteristicChanged\n            )\n            this._device?.removeEventListener(\n                \"gattserverdisconnected\",\n                this.handleDisconnected\n            )\n            this._server.disconnect()\n        } finally {\n            this._rxCharacteristic = undefined\n            this._txCharacteristic = undefined\n            this._service = undefined\n            this._server = undefined\n            this._device = undefined\n            this._rxBuffer = undefined\n        }\n    }\n\n    private handleDisconnected() {\n        // start disconnecting\n        this.disconnect()\n    }\n\n    private handleCharacteristicChanged() {\n        const data = new Uint8Array(this._rxCharacteristic.value.buffer)\n        const packetData = data.slice(2)\n        console.debug(`received length ${data.length}`)\n\n        if (data[0] & JD_BLE_FIRST_CHUNK_FLAG) {\n            if (this._rxBuffer)\n                console.error(\n                    `Dropped buffer. Chunks remaining: ${this._rxChunkCounter}`\n                )\n            this._rxBuffer = new Uint8Array()\n            this._rxChunkCounter = data[0] & 0x7f\n            console.debug(`Initial chunk counter: ${this._rxChunkCounter}`)\n        }\n\n        this._rxChunkCounter =\n            this._rxChunkCounter == 0 ? 0 : this._rxChunkCounter - 1\n        console.debug(\n            `after modification chunk counter: ${this._rxChunkCounter}`\n        )\n\n        if (data[1] !== this._rxChunkCounter)\n            console.error(\n                `Data out of order. Expected chunk: ${this._rxChunkCounter} Got chunk: ${data[1]}`\n            )\n        else this._rxBuffer = bufferConcat(this._rxBuffer, packetData)\n\n        if (this._rxChunkCounter == 0) {\n            this.bus.processFrame(this._rxBuffer, BLUETOOTH_TRANSPORT)\n            this._rxBuffer = undefined\n            this._rxChunkCounter = 0\n        }\n    }\n}\n\n/**\n * Creates a transport that uses Web Bluetooth\n * @category Transport\n */\nexport function createBluetoothTransport(\n    options?: WebBluetoothOptions\n): Transport {\n    return isWebBluetoothSupported() && new BluetoothTransport(options)\n}\n", "import { Proto } from \"./proto\"\nimport {\n    assert,\n    PromiseBuffer,\n    PromiseQueue,\n    memcpy,\n    write32,\n    write16,\n    read16,\n    encodeU32LE,\n    read32,\n    bufferToString,\n} from \"../utils\"\nimport { HF2_TIMEOUT } from \"../constants\"\nimport { isCancelError, isTimeoutError, throwError } from \"../error\"\n\n// see https://github.com/microsoft/uf2/blob/main/hf2.md for full spec\nexport const HF2_DEVICE_MAJOR = 42\nexport const HF2_CMD_BININFO = 0x0001 // no arguments\nexport const HF2_MODE_BOOTLOADER = 0x01\nexport const HF2_MODE_USERSPACE = 0x02\n/*\nstruct HF2_BININFO_Result {\n    uint32_t mode;\n    uint32_t flash_page_size;\n    uint32_t flash_num_pages;\n    uint32_t max_message_size;\n};\n*/\n\nexport const HF2_CMD_INFO = 0x0002\n// no arguments\n// results is utf8 character array\n\nexport const HF2_CMD_RESET_INTO_APP = 0x0003 // no arguments, no result\n\nexport const HF2_CMD_RESET_INTO_BOOTLOADER = 0x0004 // no arguments, no result\n\nexport const HF2_CMD_START_FLASH = 0x0005 // no arguments, no result\n\nexport const HF2_CMD_WRITE_FLASH_PAGE = 0x0006\n/*\nstruct HF2_WRITE_FLASH_PAGE_Command {\n    uint32_t target_addr;\n    uint32_t data[flash_page_size];\n};\n*/\n// no result\n\nexport const HF2_CMD_CHKSUM_PAGES = 0x0007\n/*\nstruct HF2_CHKSUM_PAGES_Command {\n    uint32_t target_addr;\n    uint32_t num_pages;\n};\nstruct HF2_CHKSUM_PAGES_Result {\n    uint16_t chksums[num_pages];\n};\n*/\n\nexport const HF2_CMD_READ_WORDS = 0x0008\n/*\nstruct HF2_READ_WORDS_Command {\n    uint32_t target_addr;\n    uint32_t num_words;\n};\nstruct HF2_READ_WORDS_Result {\n    uint32_t words[num_words];\n};\n*/\n\nexport const HF2_CMD_WRITE_WORDS = 0x0009\n/*\nstruct HF2_WRITE_WORDS_Command {\n    uint32_t target_addr;\n    uint32_t num_words;\n    uint32_t words[num_words];\n};\n*/\n// no result\n\nexport const HF2_CMD_DMESG = 0x0010\n// no arguments\n// results is utf8 character array\n\nexport const HF2_FLAG_SERIAL_OUT = 0x80\nexport const HF2_FLAG_SERIAL_ERR = 0xc0\nexport const HF2_FLAG_CMDPKT_LAST = 0x40\nexport const HF2_FLAG_CMDPKT_BODY = 0x00\nexport const HF2_FLAG_MASK = 0xc0\nexport const HF2_SIZE_MASK = 63\n\nexport const HF2_STATUS_OK = 0x00\nexport const HF2_STATUS_INVALID_CMD = 0x01\nexport const HF2_STATUS_EXEC_ERR = 0x02\nexport const HF2_STATUS_EVENT = 0x80\n\n// the eventId is overlayed on the tag+status; the mask corresponds\n// to the HF2_STATUS_EVENT above\nexport const HF2_EV_MASK = 0x800000\n\nexport const HF2_CMD_JDS_CONFIG = 0x0020\nexport const HF2_CMD_JDS_SEND = 0x0021\nexport const HF2_EV_JDS_PACKET = 0x800020\n\nexport interface HF2_IO {\n    // This is set to true when the IO object is used for Jacdac-USB protocol (not HF2), which\n    // is not 64-byte-packet-based.\n    isFreeFlowing?: boolean\n    onData: (v: Uint8Array) => void\n    onError: (e: Error) => void\n    onLog?: (line: string) => void\n    connectAsync(background: boolean): Promise<Proto>\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    log(msg: string, v?: any): void\n    disconnectAsync(): Promise<void>\n    error(msg: string, code?: string): void\n    sendPacketAsync(pkt: Uint8Array): Promise<void>\n    description?: () => string\n}\n\nexport class HF2Proto implements Proto {\n    eventHandlers: Record<string, (buf: Uint8Array) => void> = {}\n    msgs = new PromiseBuffer<Uint8Array>()\n    cmdSeq = (Math.random() * 0xffff) | 0\n    private lock = new PromiseQueue()\n\n    constructor(private io: HF2_IO) {\n        let frames: Uint8Array[] = []\n\n        io.onData = buf => {\n            const tp = buf[0] & HF2_FLAG_MASK\n            const len = buf[0] & 63\n            //console.log(`msg tp=${tp} len=${len}`)\n            const frame = new Uint8Array(len)\n            memcpy(frame, 0, buf, 1, len)\n            if (tp & HF2_FLAG_SERIAL_OUT) {\n                this.onSerial(frame, tp == HF2_FLAG_SERIAL_ERR)\n                return\n            }\n            frames.push(frame)\n            if (tp == HF2_FLAG_CMDPKT_BODY) {\n                return\n            } else {\n                assert(tp == HF2_FLAG_CMDPKT_LAST)\n                let total = 0\n                for (const f of frames) total += f.length\n                const r = new Uint8Array(total)\n                let ptr = 0\n                for (const f of frames) {\n                    memcpy(r, ptr, f)\n                    ptr += f.length\n                }\n                frames = []\n                if (r[2] & HF2_STATUS_EVENT) {\n                    // asynchronous event\n                    this.handleEvent(r)\n                } else {\n                    this.msgs.push(r)\n                }\n            }\n        }\n    }\n\n    error(m: string) {\n        return this.io?.error(m)\n    }\n\n    talkAsync(cmd: number, data?: Uint8Array): Promise<Uint8Array> {\n        if (!this.io) throwError(\"hf2: rogue instance\")\n\n        let len = 8\n        if (data) len += data.length\n        const pkt = new Uint8Array(len)\n        const seq = ++this.cmdSeq & 0xffff\n        write32(pkt, 0, cmd)\n        write16(pkt, 4, seq)\n        write16(pkt, 6, 0)\n        if (data) memcpy(pkt, 8, data, 0, data.length)\n        let numSkipped = 0\n        const handleReturnAsync = (): Promise<Uint8Array> =>\n            this.msgs\n                .shiftAsync(HF2_TIMEOUT) // we wait up to a second\n                .then(res => {\n                    if (read16(res, 0) != seq) {\n                        if (numSkipped < 3) {\n                            numSkipped++\n                            this.io.log(\n                                `message out of sync, (${seq} vs ${read16(\n                                    res,\n                                    0\n                                )}); will re-try`\n                            )\n                            return handleReturnAsync()\n                        }\n                        this.error(\"out of sync\")\n                    }\n                    let info = \"\"\n                    if (res[3]) info = \"; info=\" + res[3]\n                    switch (res[2]) {\n                        case HF2_STATUS_OK:\n                            return res.slice(4)\n                        case HF2_STATUS_INVALID_CMD:\n                            this.error(\"invalid command\" + info)\n                            break\n                        case HF2_STATUS_EXEC_ERR:\n                            this.error(\"execution error\" + info)\n                            break\n                        default:\n                            this.error(\"error \" + res[2] + info)\n                            break\n                    }\n                    return null\n                })\n                .catch(e => {\n                    console.debug(`hf2 error: ${e.message}; cmd=${cmd}`)\n                    if (this.io) {\n                        if (!isTimeoutError(e)) this.error(e)\n                    }\n                    return null\n                })\n\n        return this.enqueueTalk(async () => {\n            if (!this.io) return null // disconnected\n            return await this.sendMsgAsync(pkt).then(handleReturnAsync)\n        })\n    }\n\n    private async enqueueTalk<T>(talk: () => Promise<T>): Promise<T> {\n        try {\n            if (!this.io) return undefined\n            return this.lock.enqueue(\"talk\", talk)\n        } catch (e) {\n            if (!this.io) return\n            if (isCancelError(e)) return\n            throw e\n        }\n    }\n\n    private sendMsgAsync(buf: Uint8Array, serial = 0): Promise<void> {\n        // Util.assert(buf.length <= this.maxMsgSize)\n        const frame = new Uint8Array(64)\n        const loop = (pos: number): Promise<void> => {\n            let len = buf.length - pos\n            if (len <= 0) return Promise.resolve()\n            if (len > 63) {\n                len = 63\n                frame[0] = HF2_FLAG_CMDPKT_BODY\n            } else {\n                frame[0] = HF2_FLAG_CMDPKT_LAST\n            }\n            if (serial)\n                frame[0] =\n                    serial == 1 ? HF2_FLAG_SERIAL_OUT : HF2_FLAG_SERIAL_ERR\n            frame[0] |= len\n            for (let i = 0; i < len; ++i) frame[i + 1] = buf[pos + i]\n            if (!this.io) return Promise.resolve()\n            return this.io.sendPacketAsync(frame).then(() => loop(pos + len))\n        }\n        return loop(0)\n    }\n\n    onEvent(id: number, f: (buf: Uint8Array) => void) {\n        assert(!!(id & HF2_EV_MASK))\n        this.eventHandlers[id + \"\"] = f\n    }\n\n    onJDMessage(f: (buf: Uint8Array) => void) {\n        this.talkAsync(HF2_CMD_JDS_CONFIG, encodeU32LE([1]))\n        this.onEvent(HF2_EV_JDS_PACKET, f)\n    }\n\n    sendJDMessageAsync(buf: Uint8Array) {\n        return this.talkAsync(HF2_CMD_JDS_SEND, buf).then(() => {})\n    }\n\n    handleEvent(buf: Uint8Array) {\n        const evid = read32(buf, 0)\n        const f = this.eventHandlers[evid + \"\"]\n        if (f) {\n            f(buf.slice(4))\n        } else {\n            this.io.log(\"unhandled event: \" + evid.toString(16))\n            // We can get these before we're ready to recv; this is fine.\n            //if (evid === 0x800020) {\n            //    this.io.onError(new Error(\"hf2 corrupted\"))\n            //}\n        }\n    }\n    onSerial(data: Uint8Array, iserr: boolean) {\n        // TODO: reenable?\n        //const line = bufferToString(data).replace(/[\\r\\n]*$/, \"\")\n        //const msg = `hf2: ${line}`\n        //if (iserr) console.log(msg)\n        //else console.debug(msg)\n    }\n\n    async postConnectAsync() {\n        await this.checkMode()\n        const buf = await this.talkAsync(HF2_CMD_INFO)\n        this.io.log(\"connected to \" + bufferToString(buf))\n    }\n\n    private async checkMode() {\n        // first check that we are not talking to a bootloader\n        const info = await this.talkAsync(HF2_CMD_BININFO)\n        if (!info) throwError(\"device disconnected\")\n\n        const mode = read32(info, 0)\n        this.io.log(`mode ${mode}`)\n        if (mode == HF2_MODE_USERSPACE) {\n            // all good\n            this.io.log(`device in user-space mode`)\n        } else if (mode == HF2_MODE_BOOTLOADER) {\n            this.io.log(\n                `device in bootloader mode, reseting into user-space mode`\n            )\n            await this.talkAsync(HF2_CMD_RESET_INTO_APP)\n            // and fail\n            throwError(\"Device in bootloader mode\")\n        } else {\n            // unknown mdoe\n            throwError(\"Unknown device operation mode\")\n        }\n    }\n\n    async disconnectAsync() {\n        if (this.io) {\n            const io = this.io\n            this.io = undefined\n            await io.disconnectAsync()\n        }\n    }\n}\n", "import { Proto } from \"./proto\"\nimport { USBIO } from \"./usbio\"\nimport {\n    delay,\n    PromiseQueue,\n    write32,\n    read32,\n    uint8ArrayToString,\n    fromHex,\n    bufferConcat,\n    fromUTF8,\n} from \"../utils\"\nimport { Flags } from \"../flags\"\nimport {\n    ERROR_MICROBIT_INVALID_MEMORY,\n    ERROR_MICROBIT_JACDAC_MISSING,\n    ERROR_MICROBIT_UNKNOWN,\n    ERROR_MICROBIT_V1,\n} from \"../constants\"\nimport { errorCode, isCancelError } from \"../error\"\n\nexport const MICROBIT_V2_VENDOR_ID = 3368\nexport const MICROBIT_V2_PRODUCT_ID = 516\n\n// it seems writing via debugger interface at page boundry doesn't work\n// the page is at most 4096; use 1024 (1 << 10) just in case\nconst pageShift = 10\n\ninterface SendItem {\n    buf: Uint8Array\n    cb: () => void\n}\nexport class CMSISProto implements Proto {\n    private readonly q = new PromiseQueue()\n    private sendQ: SendItem[] = []\n    private irqn: number\n    private xchgAddr: number\n    private _onJDMsg: (buf: Uint8Array) => void\n    private pendingSerial: Uint8Array\n    private lastPendingSerial: number\n    private lastSend: number\n    private lastXchg: number\n    private recvTo: () => void\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _lastInterval: any\n\n    constructor(private io: USBIO) {}\n\n    private startRecvToLoop() {\n        console.assert(!this._lastInterval)\n\n        let last = this.recvTo\n        // do not use bus schedulere here\n        this._lastInterval = setInterval(() => {\n            if (!this.io) this.stopRecvToLoop()\n            if (last && last == this.recvTo) {\n                last()\n            }\n            last = this.recvTo\n        }, 200)\n    }\n\n    private stopRecvToLoop() {\n        if (this._lastInterval) {\n            clearInterval(this._lastInterval)\n            this._lastInterval = undefined\n        }\n    }\n\n    private error(msg: string, code?: string) {\n        this.stopRecvToLoop()\n        this.io?.error(msg, code)\n        // clear state\n        this.xchgAddr = null\n    }\n\n    onJDMessage(f: (buf: Uint8Array) => void): void {\n        this._onJDMsg = f\n    }\n\n    sendJDMessageAsync(buf: Uint8Array): Promise<void> {\n        if (buf.length & 3) {\n            const tmp = new Uint8Array((buf.length + 3) & ~3)\n            tmp.set(buf)\n            buf = tmp\n        }\n        return new Promise<void>(resolve => {\n            this.sendQ.push({\n                buf,\n                cb: resolve,\n            })\n        })\n    }\n\n    async disconnectAsync() {\n        if (this.io) {\n            console.debug(`micro:bit: disconnect proto`)\n            this.stopRecvToLoop()\n            this._onJDMsg = () => console.warn(\"rogue jd callback\")\n            const io = this.io\n            this.io = undefined\n            if (io) await io.disconnectAsync()\n        }\n    }\n\n    private recvAsync() {\n        return new Promise<Uint8Array>((resolve, reject) => {\n            // io may have been cleared\n            if (!this.io) {\n                reject(new Error(\"USB disconnected\"))\n                return\n            }\n            this.io.recvPacketAsync().then(\n                v => {\n                    const f = resolve\n                    resolve = null\n                    if (f) {\n                        this.recvTo = null\n                        f(v)\n                    }\n                },\n                err => {\n                    if (resolve) {\n                        resolve = null\n                        this.recvTo = null\n                        reject(err)\n                    }\n                }\n            )\n            this.recvTo = () => {\n                if (resolve) {\n                    resolve = null\n                    reject(new Error(\"CMSIS recv timeout\"))\n                }\n            }\n        })\n    }\n\n    private talkAsync(cmds: ArrayLike<number>) {\n        return this.q.enqueue(\"talk\", async () => {\n            if (!this.io) {\n                this.error(\"micro:bit disconnected\")\n                return // disconnected\n            }\n            //console.log(\"TALK\", cmds)\n            await this.io.sendPacketAsync(new Uint8Array(cmds))\n            if (!this.io) {\n                this.error(\"micro:bit disconnected\")\n                return // disconnected\n            }\n            let response = await this.recvAsync()\n            if (response[0] !== cmds[0]) {\n                const msg = `Bad response for ${cmds[0]} -> ${response[0]}, try again`\n                console.debug(msg, { cmds, response })\n                try {\n                    response = await this.recvAsync()\n                } catch (e) {\n                    // throw the original error in case of timeout\n                    this.error(msg)\n                }\n                if (response[0] !== cmds[0]) this.error(msg)\n            }\n            return response\n        })\n    }\n\n    private talkHexAsync(str: string) {\n        return this.talkAsync(fromHex(str.replace(/ /g, \"\")))\n    }\n\n    private decodeString(buf: Uint8Array) {\n        const len = buf[1]\n        const ss = buf.slice(2, 2 + len)\n        return uint8ArrayToString(ss)\n    }\n\n    private async setBaudRate() {\n        const setBaud = [0x82, 0, 0, 0, 0]\n        write32(setBaud, 1, 115200)\n        await this.talkAsync(setBaud) // this reset the board on 0255\n    }\n\n    private async xchgLoop() {\n        let currSend: SendItem\n        while (this.io) {\n            const now = Date.now()\n            if (\n                Flags.diagnostics &&\n                this.lastXchg &&\n                now - this.lastXchg > 50\n            ) {\n                console.warn(\"slow xchg: \" + (now - this.lastXchg) + \"ms\")\n            }\n            this.lastXchg = now\n\n            let numev = 0\n            let inp = await this.readBytes(this.xchgAddr + 12, 256, true)\n            if (inp[2]) {\n                await this.writeWord(this.xchgAddr + 12, 0)\n                await this.triggerIRQ()\n                inp = inp.slice(0, inp[2] + 12)\n                this._onJDMsg(inp)\n                numev++\n            }\n\n            let sendFree = false\n            if (currSend) {\n                const send = await this.readBytes(this.xchgAddr + 12 + 256, 4)\n                if (!send[2]) {\n                    currSend.cb()\n                    currSend = null\n                    sendFree = true\n                    numev++\n                }\n            }\n\n            if (!currSend && this.sendQ.length) {\n                if (!sendFree) {\n                    const send = await this.readBytes(\n                        this.xchgAddr + 12 + 256,\n                        4\n                    )\n                    if (!send[2]) sendFree = true\n                }\n                if (sendFree) {\n                    currSend = this.sendQ.shift()\n                    const bbody = currSend.buf.slice(4)\n                    await this.writeWords(\n                        this.xchgAddr + 12 + 256 + 4,\n                        new Uint32Array(bbody.buffer)\n                    )\n                    const bhead = currSend.buf.slice(0, 4)\n                    await this.writeWords(\n                        this.xchgAddr + 12 + 256,\n                        new Uint32Array(bhead.buffer)\n                    )\n                    await this.triggerIRQ()\n                    this.lastSend = Date.now()\n                    numev++\n                } else {\n                    if (this.lastSend) {\n                        const d = Date.now() - this.lastSend\n                        if (d > 50) {\n                            this.lastSend = 0\n                            console.warn(\"failed to send packet fast enough\")\n                        }\n                    }\n                }\n            }\n\n            // Disable serial - it interferes with other consoles\n            // if (await this.readSerial()) numev++\n\n            if (numev == 0) {\n                // no data on either side, wait as little as possible\n                // the browser will eventually throttle this call\n                // https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#reasons_for_delays_longer_than_specified\n                await delay(0)\n            }\n        }\n    }\n\n    private async readSerial() {\n        let buf = await this.talkAsync([0x83])\n        const len = buf?.[1]\n        if (len) {\n            buf = buf.slice(2, 2 + len)\n            if (this.pendingSerial) buf = bufferConcat(this.pendingSerial, buf)\n            let ptr = 0\n            let beg = 0\n            while (ptr < buf.length) {\n                if (buf[ptr] == 10 || buf[ptr] == 13) {\n                    // const line = buf.slice(beg, ptr)\n                    // if (line.length)\n                    //     console.debug(\n                    //         \"microbit: \" + fromUTF8(uint8ArrayToString(line))\n                    //     )\n                    beg = ptr + 1\n                }\n                ptr++\n            }\n            buf = buf.slice(beg)\n            this.pendingSerial = buf.length ? buf : null\n            if (this.pendingSerial) this.lastPendingSerial = Date.now()\n        } else if (this.pendingSerial) {\n            const d = Date.now() - this.lastPendingSerial\n            if (d > 500) {\n                const s = fromUTF8(uint8ArrayToString(this.pendingSerial))\n                this.pendingSerial = null\n                console.debug(\"SERIAL[TO]: \" + s)\n            }\n        }\n\n        return len\n    }\n\n    private async talkStringAsync(...cmds: number[]) {\n        return this.talkAsync(cmds).then(buf => this.decodeString(buf))\n    }\n\n    private async readDP(reg: number) {\n        const nums = [0x05, 0, 1, 2 | reg, 0, 0, 0, 0]\n        const buf = await this.talkAsync(nums)\n        return read32(buf, 3)\n    }\n\n    private async setupTAR(addr: number) {\n        const nums = [5, 0, 2, 1, 0x52, 0, 0, 0x23, 5, 0, 0, 0, 0]\n        write32(nums, 9, addr)\n        await this.talkAsync(nums)\n    }\n\n    private async writeWords(addr: number, data: Uint32Array) {\n        const pstart = addr >> pageShift\n        const pend = (addr + data.length * 4 - 1) >> pageShift\n        if (pstart == pend) {\n            return this.writeWordsCore(addr, data)\n        } else {\n            const addrend = ((addr >> pageShift) + 1) << pageShift\n            const len = (addrend - addr) >> 2\n            await this.writeWords(addr, data.slice(0, len))\n            await this.writeWords(addrend, data.slice(len))\n        }\n    }\n\n    private async writeWordsCore(addr: number, data: Uint32Array) {\n        await this.setupTAR(addr)\n\n        const MAX = 0xe\n        let ptr = 0\n        const reqHd = [6, 0, MAX, 0, 0xd]\n        for (let i = 0; i < MAX * 4; ++i) reqHd.push(0)\n        const req = new Uint8Array(reqHd)\n        let overhang = 1\n        let ptrTX = 0\n        const count = data.length\n        const dataBytes = new Uint8Array(data.buffer)\n        let lastCh = MAX\n\n        //console.log(\"WRITE\", addr.toString(16), data)\n\n        await this.q.enqueue(\"talk\", async () => {\n            while (ptr < count) {\n                const ch = Math.min(count - ptrTX, MAX)\n                if (ch) {\n                    req[2] = ch\n                    req.set(dataBytes.slice(ptrTX * 4, (ptrTX + ch) * 4), 5)\n                    if (!this.io) {\n                        this.error(\"disconnected\")\n                        return\n                    }\n                    await this.io.sendPacketAsync(\n                        ch == MAX ? req : req.slice(0, 5 + 4 * ch)\n                    )\n                    ptrTX += ch\n                    lastCh = ch\n                }\n                if (overhang-- > 0) continue\n                const buf = await this.recvAsync()\n                if (buf[0] != req[0])\n                    this.error(`bad response, ${buf[0]} != ${req[0]}`)\n                if (buf[1] != MAX && buf[1] != lastCh)\n                    this.error(\n                        `bad response, ${buf[1]} != ${MAX} && ${buf[1]} != ${lastCh}`\n                    )\n                ptr += buf[1]\n            }\n        })\n    }\n\n    private async readBytes(addr: number, count: number, jdmode = false) {\n        if (addr & 3 || count & 3) this.error(\"unaligned\")\n        const b = await this.readWords(addr, count >> 2, jdmode)\n        return new Uint8Array(b.buffer)\n    }\n\n    private async readWords(\n        addr: number,\n        count: number,\n        jdmode = false\n    ): Promise<Uint32Array> {\n        const pstart = addr >> pageShift\n        const pend = (addr + count * 4 - 1) >> pageShift\n        if (pstart == pend) {\n            return this.readWordsCore(addr, count, jdmode)\n        } else {\n            const addrend = ((addr >> pageShift) + 1) << pageShift\n            const len = (addrend - addr) >> 2\n            const b0 = await this.readWords(addr, len, jdmode)\n            if (jdmode && b0.length < len) return b0\n            const b1 = await this.readWords(addrend, count - len)\n            const res = new Uint32Array(count)\n            res.set(b0)\n            res.set(b1, len)\n            return res\n        }\n    }\n\n    private async readWordsCore(addr: number, count: number, jdmode: boolean) {\n        await this.setupTAR(addr)\n        const MAX = 0xe\n        const res = new Uint32Array(count)\n        let ptr = 0\n        const req = new Uint8Array([6, 0, MAX, 0, 0xf])\n        let overhang = 1\n        let ptrTX = 0\n\n        // console.log(\"READ\", addr.toString(16), count)\n        let numPending = 0\n        await this.q.enqueue(\"talk\", async () => {\n            while (ptr < count || numPending) {\n                const ch = Math.min(count - ptrTX, MAX)\n                if (ch > 0) {\n                    req[2] = ch\n                    numPending++\n                    if (!this.io) {\n                        this.error(\"disconnected\")\n                        return\n                    }\n                    await this.io.sendPacketAsync(req)\n                    ptrTX += ch\n                }\n                if (overhang-- > 0) continue\n                const buf = await this.recvAsync()\n                numPending--\n                if (buf[0] != req[0]) {\n                    this.error(\"bad response\")\n                    return\n                }\n                const len = buf[1]\n                const words = new Uint32Array(\n                    buf.slice(4, (1 + len) * 4).buffer\n                )\n                if (words.length != len) {\n                    this.error(\"bad response2\")\n                    return\n                }\n                res.set(words, ptr)\n                // limit transfer, according to JD frame size\n                if (jdmode && ptr == 0) {\n                    const frmsz = new Uint8Array(res.buffer)[2]\n                    const words = (frmsz + 12 + 3) >> 2\n                    if (count > words) count = words\n                }\n                ptr += words.length\n            }\n        })\n\n        return res\n    }\n\n    private async findExchange() {\n        const memStart = 0x2000_0000\n        const memStop = memStart + 128 * 1024\n        const checkSize = 1024\n\n        let p0 = 0x20006000\n        let p1 = 0x20006000 + checkSize\n\n        const check = async (addr: number) => {\n            if (addr < memStart) return null\n            if (addr + checkSize > memStop) return null\n            const buf = await this.readWords(addr, checkSize >> 2)\n            for (let i = 0; i < buf.length; ++i) {\n                if (buf[i] == 0x786d444a && buf[i + 1] == 0xb0a6c0e9)\n                    return addr + (i << 2)\n            }\n            return 0\n        }\n\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n            const a0 = await check(p0)\n            if (a0) return a0\n            const a1 = await check(p1)\n            if (a1) return a1\n            if (a0 === null && a1 === null) return null\n            p0 -= checkSize\n            p1 += checkSize\n        }\n    }\n\n    private async triggerIRQ() {\n        const addr = 0xe000e200 + (this.irqn >> 5) * 4\n        const data = new Uint32Array([1 << (this.irqn & 31)])\n        await this.writeWords(addr, data)\n    }\n\n    private writeWord(addr: number, val: number) {\n        return this.writeWords(addr, new Uint32Array([val]))\n    }\n\n    private async reset() {\n        await this.writeWord(0xe000edfc, 0) // DEMCR\n        await this.writeWord(0xe000ed0c, 0x05fa0000 | (1 << 2)) // AIRCR\n    }\n\n    async postConnectAsync() {\n        this.startRecvToLoop()\n        const devid = await this.talkStringAsync(0x80)\n        if (/^9902/.test(devid)) {\n            this.error(\n                `micro:bit v1 is not supported. sorry.`,\n                ERROR_MICROBIT_V1\n            )\n            return\n        }\n        if (!/^990[3456789]/.test(devid)) {\n            this.error(\n                `Invalid Vendor0 response: ` + devid,\n                ERROR_MICROBIT_UNKNOWN\n            )\n            return\n        }\n\n        this.io.log(\"DAPLink v\" + (await this.talkStringAsync(0x00, 0x04)))\n\n        await this.setBaudRate() // this may reset the board\n\n        const freq = [0x11, 0, 0, 0, 0]\n        write32(freq, 1, 10_000_000)\n        await this.talkAsync(freq)\n\n        const inits = [\n            \"02 00\", // connect\n            \"04 00 64 00 00 00\", // configure delays\n            // SWD switch\n            \"12 38 FF FF FF FF FF FF FF\", // ones\n            \"12 10 9E E7\", // SWD\n            \"12 38 FF FF FF FF FF FF FF\", // ones\n            \"12 08 00\", // zero\n            // read DPIDR\n            \"05 00 01 02 00 00 00 00\",\n            // clear errors\n            \"05 00 03 00 04 00 00 00 08 00 00 00 00 04 00 00 00 50\",\n        ]\n\n        for (const ini of inits) await this.talkHexAsync(ini)\n\n        for (let i = 0; i < 100; ++i) {\n            const st = await this.readDP(4)\n            const mask = (1 << 29) | (1 << 31)\n            if ((st & mask) == mask) break\n            await delay(20)\n        }\n\n        await this.reset()\n        await delay(1000) // the actual minimum until mbbridge starts seems to be 700ms; give it some more time just in case\n\n        const xchg = await this.findExchange()\n        if (xchg === null) {\n            this.error(\n                `exchange address not found; add jacdac to your project`,\n                ERROR_MICROBIT_JACDAC_MISSING\n            )\n            return\n        }\n        this.xchgAddr = xchg\n        const info = await this.readBytes(xchg, 16)\n        this.irqn = info[8]\n        if (info[12 + 2] != 0xff) {\n            this.error(\n                \"invalid memory; try power-cycling the micro:bit\",\n                ERROR_MICROBIT_INVALID_MEMORY\n            )\n            return\n        }\n        // clear initial lock\n        await this.writeWord(xchg + 12, 0)\n        this.io.log(\n            `exchange address: 0x${xchg.toString(16)}; irqn=${this.irqn}`\n        )\n\n        /* async */ this.xchgLoop().catch(e => {\n            if (!isCancelError(e)) console.debug(e)\n            this.error(e?.message || \"an error occured\", errorCode(e))\n        })\n    }\n}\n", "import { HF2Proto, HF2_DEVICE_MAJOR, HF2_IO } from \"./hf2\"\nimport {\n    CMSISProto,\n    MICROBIT_V2_PRODUCT_ID,\n    MICROBIT_V2_VENDOR_ID,\n} from \"./microbit\"\nimport { Observable } from \"../observable\"\nimport { Proto } from \"./proto\"\nimport { assert, delay } from \"../utils\"\nimport { Flags } from \"../flags\"\nimport { JDError, errorCode, isCancelError, throwError } from \"../error\"\nimport { ERROR_TRANSPORT_HF2_NOT_SUPPORTED } from \"../constants\"\n\nexport const USB_FILTERS = {\n    filters: [\n        {\n            // hf2 devices (incl. arcade)\n            classCode: 255,\n            subclassCode: HF2_DEVICE_MAJOR,\n        },\n        {\n            // micro:bit v2\n            vendorId: MICROBIT_V2_VENDOR_ID,\n            productId: MICROBIT_V2_PRODUCT_ID,\n        },\n    ],\n}\n\nconst controlTransferGetReport = 0x01\nconst controlTransferSetReport = 0x09\nconst controlTransferOutReport = 0x200\nconst controlTransferInReport = 0x100\n\nexport interface USBOptions {\n    requestDevice?: (options: USBDeviceRequestOptions) => Promise<USBDevice>\n    getDevices: (options: USBDeviceRequestOptions) => Promise<USBDevice[]>\n    connectObservable?: Observable<void>\n    disconnectObservable?: Observable<void>\n}\n\nexport class USBIO implements HF2_IO {\n    private dev: USBDevice\n    private iface: USBInterface\n    private altIface: USBAlternateInterface\n    private epIn: USBEndpoint\n    private epOut: USBEndpoint\n    private readLoopStarted = false\n    private ready = false\n    private rawMode = false\n\n    constructor(public readonly options: USBOptions) {}\n\n    description() {\n        return this.dev?.productName\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    onData = (v: Uint8Array) => {}\n    onError = (e: Error) => {\n        console.warn(`usb error: ${errorCode(e) || \"\"} ${e ? e.stack : e}`)\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    log(msg: string, v?: any) {\n        if (Flags.diagnostics) {\n            if (v != undefined) console.debug(\"usb: \" + msg, v)\n            else console.debug(\"usb: \" + msg)\n        }\n    }\n\n    private mkProto(): Proto {\n        return this.isMicrobit() ? new CMSISProto(this) : new HF2Proto(this)\n    }\n\n    private clearDev() {\n        if (this.dev) {\n            this.dev = null\n            this.epIn = null\n            this.epOut = null\n            this.onData = () => console.warn(\"rogue hf2 onData\")\n        }\n    }\n\n    disconnectAsync(): Promise<void> {\n        this.ready = false\n        if (!this.dev) return Promise.resolve()\n        console.debug(\"close device\")\n        return this.dev\n            .close()\n            .catch(e => {\n                // just ignore errors closing, most likely device just disconnected\n                if (!isCancelError(e)) console.debug(e)\n            })\n            .then(() => {\n                this.clearDev()\n                return delay(500)\n            })\n    }\n\n    recvPacketAsync(): Promise<Uint8Array> {\n        if (!this.rawMode) this.error(\"rawMode required\")\n        return this.recvPacketCoreAsync()\n    }\n\n    private recvPacketCoreAsync(): Promise<Uint8Array> {\n        const final = (res: USBInTransferResult) => {\n            if (res.status != \"ok\") this.error(\"USB IN transfer failed\")\n            const arr = new Uint8Array(res.data.buffer)\n            if (arr.length == 0) return this.recvPacketCoreAsync()\n            return arr\n        }\n\n        if (!this.dev) return Promise.reject(new Error(\"Disconnected\"))\n\n        if (!this.epIn) {\n            return this.dev\n                .controlTransferIn(\n                    {\n                        requestType: \"class\",\n                        recipient: \"interface\",\n                        request: controlTransferGetReport,\n                        value: controlTransferInReport,\n                        index: this.iface.interfaceNumber,\n                    },\n                    64\n                )\n                .then(final)\n        }\n\n        return this.dev.transferIn(this.epIn.endpointNumber, 64).then(final)\n    }\n\n    error(msg: string, code?: string) {\n        const e = new JDError(\n            `device ${this.dev ? this.dev.productName : \"n/a\"} (${msg})`,\n            { code }\n        )\n        this.onError(e)\n    }\n\n    private async readLoop() {\n        if (this.rawMode || this.readLoopStarted) return\n        this.readLoopStarted = true\n        console.debug(\"usb: start read loop\")\n\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n            if (!this.ready) {\n                break\n                //await delay(300)\n                //continue\n            }\n\n            try {\n                const buf = await this.recvPacketCoreAsync()\n\n                if (buf[0]) {\n                    // we've got data; retry reading immedietly after processing it\n                    this.onData(buf)\n                } else {\n                    // throttle down if no data coming\n                    await delay(5)\n                }\n            } catch (err) {\n                if (this.dev) {\n                    if (!isCancelError(err)) this.onError(err)\n                    await this.disconnectAsync()\n                }\n                await delay(300)\n            }\n        }\n    }\n\n    sendPacketAsync(pkt: Uint8Array) {\n        if (!this.dev) return Promise.reject(new Error(\"Disconnected\"))\n        assert(pkt.length <= 64)\n        if (!this.epOut) {\n            return this.dev\n                .controlTransferOut(\n                    {\n                        requestType: \"class\",\n                        recipient: \"interface\",\n                        request: controlTransferSetReport,\n                        value: controlTransferOutReport,\n                        index: this.iface.interfaceNumber,\n                    },\n                    pkt\n                )\n                .then(res => {\n                    if (res.status != \"ok\")\n                        this.error(\"USB CTRL OUT transfer failed\")\n                })\n        }\n        return this.dev\n            .transferOut(this.epOut.endpointNumber, pkt)\n            .then(res => {\n                if (res.status != \"ok\") this.error(\"USB OUT transfer failed\")\n            })\n    }\n\n    private isMicrobit() {\n        return (\n            this.dev && this.dev.productId == 516 && this.dev.vendorId == 3368\n        )\n    }\n\n    private checkDevice() {\n        this.iface = undefined\n        this.altIface = undefined\n        if (!this.dev) return false\n        console.debug(\n            \"usb: connect device \" +\n                this.dev.manufacturerName +\n                \" \" +\n                this.dev.productName\n        )\n        // resolve interfaces\n        const subcl = this.isMicrobit() ? 0 : HF2_DEVICE_MAJOR\n        for (const iface of this.dev.configuration.interfaces) {\n            const alt = iface.alternates[0]\n            if (alt.interfaceClass == 0xff && alt.interfaceSubclass == subcl) {\n                this.iface = iface\n                this.altIface = alt\n                break\n            }\n        }\n        if (this.isMicrobit()) this.rawMode = true\n        return !!this.iface\n    }\n\n    private async tryReconnectAsync(deviceId?: string) {\n        try {\n            const devices = await this.options.getDevices(USB_FILTERS)\n            this.dev = deviceId\n                ? devices.find(dev => dev.serialNumber === deviceId)\n                : devices[0]\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            this.dev = undefined\n        }\n    }\n\n    private async requestDeviceAsync() {\n        try {\n            this.dev = await this.options.requestDevice(USB_FILTERS)\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            this.dev = undefined\n        }\n    }\n\n    async connectAsync(background: boolean, deviceId?: string) {\n        await this.tryReconnectAsync(deviceId)\n        if (!this.dev && !background) await this.requestDeviceAsync()\n        // background call and no device, just give up for now\n        if (!this.dev && background)\n            throwError(\"usb: device not paired\", { cancel: true })\n\n        // let's connect\n        await this.openDeviceAsync()\n\n        const proto = this.mkProto()\n        try {\n            await proto.postConnectAsync()\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            await proto.disconnectAsync()\n            throw e\n        }\n        return proto\n    }\n\n    private async openDeviceAsync() {\n        if (!this.dev) throwError(\"usb: device not found\", { cancel: true })\n        if (!this.checkDevice())\n            throwError(\"usb: device does not support HF2\", {\n                code: ERROR_TRANSPORT_HF2_NOT_SUPPORTED,\n            })\n\n        await this.dev.open()\n        await this.dev.selectConfiguration(1)\n        if (this.altIface.endpoints.length) {\n            this.epIn = this.altIface.endpoints.filter(\n                e => e.direction == \"in\"\n            )[0]\n            this.epOut = this.altIface.endpoints.filter(\n                e => e.direction == \"out\"\n            )[0]\n            assert(this.epIn.packetSize == 64)\n            assert(this.epOut.packetSize == 64)\n        }\n        console.debug(`usb: claim interface ${this.iface.interfaceNumber}`)\n        await this.dev.claimInterface(this.iface.interfaceNumber)\n        console.debug(\"usb: all connected\")\n        this.ready = true\n        /* no await */ this.readLoop()\n    }\n}\n", "import { Proto } from \"./proto\"\nimport {\n    PromiseQueue,\n    read16,\n    crc,\n    bufferConcat,\n    delay,\n    bufferEq,\n    uint8ArrayToString,\n    fromUTF8,\n    read32,\n    toHex,\n} from \"../utils\"\nimport { HF2_IO } from \"./hf2\"\nimport {\n    ERROR_TRANSPORT_HF2_NOT_SUPPORTED,\n    JD_DEVICE_IDENTIFIER_BROADCAST_HIGH_MARK,\n    JD_FRAME_FLAG_COMMAND,\n    JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS,\n    JD_FRAME_FLAG_LOOPBACK,\n    JD_SERVICE_INDEX_BROADCAST,\n    SRV_USB_BRIDGE,\n    UsbBridgeCmd,\n    UsbBridgeQByte,\n} from \"../constants\"\nimport { jdpack } from \"../pack\"\nimport { isCancelError, throwError } from \"../error\"\n\nexport class JdUsbProto implements Proto {\n    private lock = new PromiseQueue()\n    private frameHandler = (b: Uint8Array) => {}\n\n    private hf2Resp: Uint8Array\n    private isHF2: boolean\n\n    private usb_rx_was_magic = 0\n    private usb_rx_state = 0\n    private usb_rx_ptr = 0\n    private rxbuf = new Uint8Array(256)\n    private numFrames = 0\n\n    constructor(private io: HF2_IO) {\n        io.isFreeFlowing = true\n        let acc: Uint8Array = null\n        io.onData = buf => {\n            if (acc) {\n                buf = bufferConcat(acc, buf)\n                acc = null\n            }\n            if (this.hf2Resp) {\n                this.io?.log(`read ${toHex(buf.slice(0, 20))}...`)\n                if (buf.length < this.hf2Resp.length) {\n                    acc = buf\n                    return\n                }\n                if (\n                    bufferEq(\n                        this.hf2Resp,\n                        buf.slice(1, 1 + this.hf2Resp.length),\n                    )\n                )\n                    this.isHF2 = true\n                this.hf2Resp = null\n            }\n            if (this.isHF2) return\n            this.decodeFrame(buf)\n        }\n    }\n\n    private logError(msg: string) {\n        console.error(\"JDUSB Error: \" + msg)\n    }\n\n    private handleProcessingFrame(fr: Uint8Array) {\n        const cmd = read16(fr, 14)\n        this.io?.log(\"processing frame: 0x\" + cmd.toString(16))\n    }\n\n    private handleFrame(fr: Uint8Array) {\n        this.numFrames++\n        const sz = fr[2] + 12\n        if (fr.length < 4 || fr.length < sz) {\n            this.logError(\"short frm\")\n            return\n        }\n        fr = fr.slice(0, sz)\n        const c = crc(fr.slice(2))\n        if (fr[0] != (c & 0xff) || fr[1] != c >> 8) {\n            this.logError(\"crc err\")\n            return\n        }\n\n        if (\n            (fr[3] & JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS) != 0 &&\n            read32(fr, 4) == SRV_USB_BRIDGE\n        ) {\n            this.handleProcessingFrame(fr)\n        } else {\n            this.frameHandler(fr)\n        }\n    }\n\n    private decodeFrame(buf: Uint8Array) {\n        let serialBuf: number[] = []\n        const jd_usb_serial_cb = (c: number) => {\n            serialBuf.push(c)\n        }\n\n        const frame_error = () => {\n            // break out of frame state\n            this.usb_rx_state = 0\n            // pass on accumulated data as serial\n            for (let j = 0; j < this.usb_rx_ptr; ++j) {\n                jd_usb_serial_cb(this.rxbuf[j])\n            }\n            this.usb_rx_ptr = 0\n        }\n\n        for (let i = 0; i < buf.length; ++i) {\n            let c = buf[i]\n            if (this.usb_rx_was_magic) {\n                if (c == UsbBridgeQByte.Magic) {\n                    if (this.usb_rx_state) {\n                        this.logError(\"dual magic\")\n                        frame_error()\n                        continue\n                    }\n                    // 'c' will be passed to jd_usb_serial_cb() below\n                } else {\n                    this.usb_rx_was_magic = 0\n                    switch (c) {\n                        case UsbBridgeQByte.LiteralMagic:\n                            c = UsbBridgeQByte.Magic\n                            break\n                        case UsbBridgeQByte.FrameStart:\n                            if (this.usb_rx_ptr) {\n                                this.logError(\"second begin\")\n                                frame_error()\n                            }\n                            this.usb_rx_state = c\n                            continue\n                        case UsbBridgeQByte.FrameEnd:\n                            if (this.usb_rx_state) {\n                                this.usb_rx_state = 0\n                                const fr = this.rxbuf.slice(0, this.usb_rx_ptr)\n                                this.handleFrame(fr)\n                                this.usb_rx_ptr = 0\n                            } else {\n                                this.logError(\"mismatched stop\")\n                            }\n                            continue\n\n                        case UsbBridgeQByte.SerialGap:\n                            if (serialBuf.length > 0)\n                                this.onSerial(new Uint8Array(serialBuf), false)\n                            serialBuf = []\n                            this.onSerialGap()\n                            continue\n\n                        case UsbBridgeQByte.FrameGap:\n                            this.onFrameGap()\n                            continue\n\n                        case UsbBridgeQByte.Reserved:\n                            continue // ignore\n\n                        default:\n                            if (this.usb_rx_state) {\n                                this.logError(\"invalid quote\")\n                                frame_error()\n                            }\n                            // either way, pass on directly\n                            jd_usb_serial_cb(UsbBridgeQByte.Magic)\n                            // c = c;\n                            break\n                    }\n                }\n            } else if (c == UsbBridgeQByte.Magic) {\n                this.usb_rx_was_magic = 1\n                continue\n            }\n\n            if (this.usb_rx_state) {\n                if (this.usb_rx_ptr >= this.rxbuf.length) {\n                    this.logError(\"frame ovf\")\n                    frame_error()\n                } else {\n                    this.rxbuf[this.usb_rx_ptr++] = c\n                }\n            } else {\n                jd_usb_serial_cb(c)\n            }\n        }\n\n        if (serialBuf.length > 0)\n            this.onSerial(new Uint8Array(serialBuf), false)\n    }\n\n    error(m: string) {\n        return this.io?.error(m)\n    }\n\n    private processingPkt(serviceCommand: number) {\n        const f = jdpack(\"u16 u8 u8 u32 u32 u8 u8 u16\", [\n            0, // crc\n            4, // _size\n            JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS |\n                JD_FRAME_FLAG_COMMAND |\n                JD_FRAME_FLAG_LOOPBACK,\n            SRV_USB_BRIDGE,\n            JD_DEVICE_IDENTIFIER_BROADCAST_HIGH_MARK,\n            0, // service size\n            JD_SERVICE_INDEX_BROADCAST,\n            serviceCommand,\n        ])\n        const c = crc(f.slice(2))\n        f[0] = c & 0xff\n        f[1] = c >> 8\n        return f\n    }\n\n    private encodeFrame(buf: Uint8Array) {\n        const c = crc(buf.slice(2))\n        if (buf[0] + (buf[1] << 8) != c) throw new Error(\"bad crc\")\n\n        const outp: number[] = []\n\n        outp.push(UsbBridgeQByte.Magic)\n        outp.push(UsbBridgeQByte.FrameStart)\n\n        for (let ptr = 0; ptr < buf.length; ptr++) {\n            const b = buf[ptr]\n            outp.push(b)\n            if (b == UsbBridgeQByte.Magic)\n                outp.push(UsbBridgeQByte.LiteralMagic)\n        }\n\n        outp.push(UsbBridgeQByte.Magic)\n        outp.push(UsbBridgeQByte.FrameEnd)\n\n        const res: Uint8Array[] = []\n        for (let i = 0; i < outp.length; i += 64) {\n            res.push(new Uint8Array(outp.slice(i, i + 64)))\n        }\n\n        return res\n    }\n\n    async detectHF2() {\n        const pkt_en = this.encodeFrame(\n            this.processingPkt(UsbBridgeCmd.EnablePackets),\n        )[0]\n        // tag0,1 are arbitrary, but should be somewhat unusual\n        const tag0 = 0x81\n        const tag1 = 0x42\n        const hf2_bininfo = new Uint8Array([\n            0x48,\n            0x01,\n            0x00,\n            0x00,\n            0x00,\n            tag0,\n            tag1,\n            0x00,\n            0x00,\n        ])\n        this.hf2Resp = new Uint8Array([tag0, tag1, 0, 0])\n        let frameToSend = hf2_bininfo\n        while (frameToSend.length + pkt_en.length < 64) {\n            frameToSend = bufferConcat(frameToSend, pkt_en)\n        }\n        return this.enqueueTalk(async () => {\n            for (let i = 0; i < 10; ++i) {\n                this.io?.log(`detect hf2 ${i}...`)\n                await this.io?.sendPacketAsync(frameToSend)\n                await delay(200)\n                if (!this.io) return\n                if (this.hf2Resp == null) {\n                    if (this.isHF2) {\n                        this.io.log(\"switching to HF2\")\n                        this.io.isFreeFlowing = false\n                        return true\n                    } else {\n                        this.io.log(\"detected JDUSB\")\n                        return false\n                    }\n                }\n            }\n            throwError(\n                \"JDUSB: can't connect, no HF2 nor JDUSB; port=\" +\n                    (this.io.description?.() ?? \"\"),\n                {\n                    code: ERROR_TRANSPORT_HF2_NOT_SUPPORTED,\n                },\n            )\n        })\n    }\n\n    private async enqueueTalk<T>(talk: () => Promise<T>): Promise<T> {\n        try {\n            if (!this.io) return undefined\n            return this.lock.enqueue(\"talk\", talk)\n        } catch (e) {\n            if (!this.io) return\n            if (isCancelError(e)) return\n            throw e\n        }\n    }\n\n    onJDMessage(f: (buf: Uint8Array) => void) {\n        this.frameHandler = f\n    }\n\n    async sendJDMessageAsync(fr: Uint8Array) {\n        this.enqueueTalk(async () => {\n            for (const buf of this.encodeFrame(fr)) {\n                if (!this.io) break\n                await this.io.sendPacketAsync(buf)\n            }\n        })\n    }\n\n    private serialData: Uint8Array\n    private serialTimeout: any\n    private colorState = \"\"\n    onLog: (line: string, lineWithColor: string) => void\n\n    private fromUTF(line: Uint8Array) {\n        let str = uint8ArrayToString(line)\n        try {\n            str = fromUTF8(str)\n        } catch {}\n        return str\n    }\n\n    private flushSerial() {\n        if (this.serialData) {\n            console.debug(\"DEV-N: \" + this.fromUTF(this.serialData))\n            this.serialData = null\n        }\n    }\n\n    private onSerialGap() {\n        this.flushSerial()\n        console.debug(\"DEV-S: [...some serial output skipped...]\")\n    }\n\n    private onFrameGap() {\n        console.debug(\"DEV-S: [...some Jacdac packets skipped...]\")\n    }\n\n    private onSerial(data: Uint8Array, iserr: boolean) {\n        if (this.serialTimeout !== undefined) {\n            clearTimeout(this.serialTimeout)\n            this.serialTimeout = undefined\n        }\n\n        let start = 0\n        for (let i = 0; i < data.length; ++i) {\n            if (data[i] == 13 || data[i] == 10) {\n                let line = data.slice(start, i)\n                if (this.serialData) {\n                    line = bufferConcat(this.serialData, line)\n                    this.serialData = null\n                }\n                if (line.length > 0) {\n                    const sline = this.fromUTF(line)\n                    // prepend this to line, to keep color from the previous line if any\n                    const prevColor = this.colorState\n                    const nocolors = sline.replace(/\\x1B\\[[0-9;]+m/, f => {\n                        this.colorState = f // keep last color state\n                        return \"\"\n                    })\n                    const withcolors = prevColor + sline\n                    this.onLog?.(nocolors, withcolors)\n                    // see overrideConsoleDebug() in devicescript before changing the next line\n                    console.debug(\"DEV: \" + nocolors)\n                }\n                start = i + 1\n            }\n        }\n\n        if (start < data.length) {\n            if (this.serialData)\n                this.serialData = bufferConcat(\n                    this.serialData,\n                    data.slice(start),\n                )\n            else this.serialData = data.slice(start)\n            this.serialTimeout = setTimeout(() => {\n                this.serialTimeout = undefined\n                this.flushSerial()\n            }, 300)\n        }\n    }\n\n    async postConnectAsync() {\n        for (let i = 0; i < 100; ++i) {\n            await this.sendJDMessageAsync(\n                this.processingPkt(UsbBridgeCmd.EnablePackets),\n            )\n            await this.sendJDMessageAsync(\n                this.processingPkt(UsbBridgeCmd.EnableLog),\n            )\n            await delay(100)\n            if (this.numFrames > 0) break\n            if (!this.io) break\n            this.io.log(`waiting for response ${i}...`)\n        }\n        this.io?.log(\"connected\")\n    }\n\n    async disconnectAsync() {\n        if (this.io) {\n            const io = this.io\n            this.io = undefined\n            await io.disconnectAsync()\n        }\n    }\n}\n", "import { HF2Proto, HF2_IO } from \"./hf2\"\nimport { Proto } from \"./proto\"\nimport { assert, bufferConcat, delay } from \"../utils\"\nimport { Flags } from \"../flags\"\nimport { JDError, errorCode, isCancelError, throwError } from \"../error\"\nimport { JDBus } from \"../bus\"\nimport { JdUsbProto } from \"./jdusb\"\n\nexport class WebSerialIO implements HF2_IO {\n    private dev: SerialPort\n    private readLoopStarted = false\n    ready = false\n    private writer: WritableStreamDefaultWriter<Uint8Array>\n    private reader: ReadableStreamDefaultReader<Uint8Array>\n    isFreeFlowing = true\n\n    constructor(readonly bus: JDBus) {}\n\n    description() {\n        const info = this.dev?.getInfo()\n        return info\n            ? `vendor: ${info.usbVendorId}, product: ${info.usbProductId}`\n            : undefined\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    onData = (v: Uint8Array) => {}\n    onError = (e: Error) => {\n        console.warn(\n            `webserial error: ${errorCode(e) || \"\"} ${e ? e.stack : e}`,\n        )\n    }\n    onLog: (line: string) => void\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    log(msg: string, v?: any) {\n        if (Flags.diagnostics) {\n            if (v != undefined) console.debug(\"webserial: \" + msg, v)\n            else console.debug(\"webserial: \" + msg)\n        }\n    }\n\n    private clearDev() {\n        if (this.dev) {\n            this.dev = null\n            this.onData = () => console.warn(\"webserial: rogue hf2 onData\")\n        }\n    }\n\n    disconnectAsync(): Promise<void> {\n        this.ready = false\n        if (!this.dev) return Promise.resolve()\n        console.debug(\"webserial: close device\")\n        return this.cancelStreams()\n            .catch(e => {\n                // just ignore errors closing, most likely device just disconnected\n                if (!isCancelError(e)) console.debug(e)\n            })\n            .then(() => {\n                this.clearDev()\n                return delay(500)\n            })\n    }\n\n    private devInfo() {\n        if (!this.dev) return \"n/a\"\n        const h = (n: number) => (\"000\" + n.toString(16)).slice(-4)\n        const info = this.dev.getInfo()\n        return h(info.usbVendorId) + \":\" + h(info.usbProductId)\n    }\n\n    error(msg: string, code?: string) {\n        const e = new JDError(`webserial: device ${this.devInfo()} (${msg})`, {\n            code,\n        })\n        this.onError(e)\n    }\n\n    private async cancelStreams() {\n        if (this.reader)\n            try {\n                await this.reader.cancel()\n                this.reader.releaseLock()\n                // eslint-disable-next-line no-empty\n            } catch {}\n        try {\n            this.writer.releaseLock()\n            // eslint-disable-next-line no-empty\n        } catch {}\n        await this.dev.close()\n    }\n\n    private async readLoop() {\n        if (this.readLoopStarted) return\n\n        this.readLoopStarted = true\n        console.debug(\"webserial: start read loop\")\n\n        const readpkt = async (\n            reader: ReadableStreamDefaultReader<Uint8Array>,\n        ) => {\n            let value: Uint8Array = null\n            for (;;) {\n                const tmp = await reader.read()\n                if (tmp.done || !this.dev) return null // reader cancelled\n                if (this.isFreeFlowing) return tmp.value\n                if (!value) value = tmp.value\n                else value = bufferConcat(value, tmp.value)\n                // Despite the fact that the device always sends full 64 bytes USB packets\n                // the Windows serial driver will sometimes give only one character, and then the remaining\n                // 63 in the second read - this must be going through some UART abstraction layers I guess... \u00AF\\_(\u30C4)_/\u00AF\n                if (value && (value.length & 63) == 0) return value\n            }\n        }\n\n        for (;;) {\n            const reader = this.dev?.readable?.getReader()\n            if (!reader) {\n                await delay(100)\n                continue\n            }\n            this.reader = reader\n            console.debug(\"start new read loop round\")\n            try {\n                // eslint-disable-next-line no-constant-condition\n                for (;;) {\n                    const value = await readpkt(reader)\n                    if (!value) break\n                    // console.log(\"Recv\", toHex(value))\n                    if (!this.isFreeFlowing && value.length > 64)\n                        for (let i = 0; i < value.length; i += 64) {\n                            this.onData(value.slice(i, i + 64))\n                        }\n                    else this.onData(value)\n                }\n            } catch (e) {\n                if (this.dev) {\n                    if (!isCancelError(e)) this.onError(e)\n                }\n                await delay(100)\n            } finally {\n                try {\n                    reader.releaseLock()\n                    // eslint-disable-next-line no-empty\n                } catch (e) {}\n                await delay(100)\n            }\n        }\n    }\n\n    sendPacketAsync(pkt: Uint8Array) {\n        if (!this.dev || !this.writer)\n            return Promise.reject(new Error(\"Disconnected\"))\n        assert(pkt.length <= 64)\n        // console.log(\"Send\", toHex(pkt))\n        if (pkt.length < 64) {\n            const p = pkt\n            pkt = new Uint8Array(64)\n            pkt.set(p)\n        }\n        return this.writer.write(pkt)\n    }\n\n    private async tryReconnectAsync() {\n        const matchFilter = (port: SerialPort) => {\n            const info = port?.getInfo()\n            const usbVendorId = info?.usbVendorId\n            return this.bus.deviceCatalog.matchVendorId(\"serial\", usbVendorId)\n        }\n        try {\n            const ports = await navigator.serial.getPorts()\n            const filtered = ports.filter(matchFilter)\n            this.dev = filtered[0]\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            this.dev = undefined\n        }\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    private async requestDeviceAsync(deviceId?: string) {\n        const vendorIds = this.bus.deviceCatalog.vendorIds(\"serial\")\n        const options: SerialPortRequestOptions = Flags.developerMode\n            ? {}\n            : {\n                  filters: vendorIds.map(usbVendorId => ({ usbVendorId })),\n              }\n        try {\n            console.debug(\"request serial\", { options })\n            this.dev = await navigator.serial.requestPort(options)\n            // TODO: deviceid\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            this.dev = undefined\n        }\n    }\n\n    async connectAsync(background: boolean, deviceId?: string) {\n        await this.tryReconnectAsync()\n        if (!this.dev && !background) await this.requestDeviceAsync(deviceId)\n        // background call and no device, just give up for now\n        if (!this.dev && background)\n            throwError(\"device not paired\", { cancel: true })\n\n        // let's connect\n        await this.openDeviceAsync()\n        const jdusb = new JdUsbProto(this)\n        jdusb.onLog = line => {\n            // we've receive a log message from the device, and it needs to make its way back to the devtools\n            this.onLog?.(line)\n        }\n        let proto: Proto = jdusb\n        try {\n            const isHF2 = await jdusb.detectHF2()\n            if (isHF2) proto = new HF2Proto(this)\n            await proto.postConnectAsync()\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            await proto.disconnectAsync()\n            throw e\n        }\n        return proto\n    }\n\n    private async openDeviceAsync() {\n        if (!this.dev) throwError(\"device not found\", { cancel: true })\n\n        await this.dev.open({\n            baudRate: 1500000,\n            bufferSize: 32 * 1024,\n        })\n\n        this.writer = this.dev.writable?.getWriter()\n        if (!this.writer) throwError(\"no writer\")\n        this.ready = true\n        /* no await */ this.readLoop()\n    }\n}\n", "import { Observable, Observer } from \"../observable\"\n\n/**\n * @internal\n */\nexport class EventTargetObservable<TEvent> implements Observable<TEvent> {\n    constructor(\n        public readonly element: EventTarget,\n        public readonly eventName: string\n    ) {}\n\n    subscribe(observer: Observer<TEvent>): { unsubscribe: () => void } {\n        const handler: EventListener = (ev: Event) =>\n            !!observer.next && observer.next(<TEvent>(<any>ev))\n        this.element.addEventListener(this.eventName, handler, false)\n        return {\n            unsubscribe: () =>\n                this.element.removeEventListener(this.eventName, handler),\n        }\n    }\n}\n\n", "import { Packet } from \"../packet\"\nimport { EventTargetObservable } from \"./eventtargetobservable\"\nimport { Flags } from \"../flags\"\nimport { USB_TRANSPORT } from \"../constants\"\nimport { Transport } from \"./transport\"\nimport { JDBus, BusOptions } from \"../bus\"\nimport { Proto } from \"./proto\"\nimport { USBIO, USBOptions } from \"./usbio\"\n\nexport function isWebUSBEnabled(): boolean {\n    return !!Flags.webUSB\n}\n\nexport function isWebUSBSupported(): boolean {\n    try {\n        return (\n            typeof navigator !== \"undefined\" &&\n            !!navigator.usb &&\n            !!navigator.usb.getDevices\n        )\n    } catch (e) {\n        return false\n    }\n}\n\nexport function usbRequestDevice(\n    options?: USBDeviceRequestOptions\n): Promise<USBDevice> {\n    // disabled\n    if (!Flags.webUSB) return Promise.resolve(undefined)\n\n    try {\n        return navigator?.usb?.requestDevice?.(options)\n    } catch (e) {\n        if (Flags.diagnostics) console.warn(e)\n        return undefined\n    }\n}\n\nfunction usbGetDevices(): Promise<USBDevice[]> {\n    // disabled\n    if (!Flags.webUSB) return Promise.resolve([])\n\n    try {\n        return navigator?.usb?.getDevices() || Promise.resolve([])\n    } catch (e) {\n        if (Flags.diagnostics) console.warn(e)\n        return Promise.resolve([])\n    }\n}\n\nclass WebUSBTransport extends Transport {\n    private transport: USBIO\n    private hf2: Proto\n    constructor(public readonly options: USBOptions) {\n        super(USB_TRANSPORT, {\n            ...options,\n            checkPulse: true,\n            disconnectOnError: true,\n        })\n    }\n\n    description() {\n        return this.transport?.description()\n    }\n\n    protected async transportConnectAsync(background: boolean) {\n        this.transport = new USBIO(this.options)\n        this.transport.onError = e => this.errorHandler(USB_TRANSPORT, e)\n        this.hf2 = await this.transport.connectAsync(background)\n        this.hf2.onJDMessage(this.handleFrame.bind(this))\n    }\n\n    protected async transportSendPacketAsync(buf: Uint8Array) {\n        if (!this.hf2) throw new Error(\"hf2 transport disconnected\")\n        await this.hf2.sendJDMessageAsync(buf)\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    protected async transportDisconnectAsync(background?: boolean) {\n        const h = this.hf2\n        this.hf2 = undefined\n        this.transport = undefined\n        if (h) await h.disconnectAsync()\n    }\n\n    protected override get pulseTimeout() {\n        // don't interfere with manual WebUSB flashing (micro:bit + MakeCode)\n        return 60000\n    }\n}\n\nfunction defaultOptions(): USBOptions {\n    return (\n        isWebUSBSupported() && {\n            getDevices: usbGetDevices,\n            requestDevice: usbRequestDevice,\n            connectObservable: new EventTargetObservable(\n                navigator.usb,\n                \"connect\"\n            ),\n            disconnectObservable: new EventTargetObservable(\n                navigator.usb,\n                \"disconnect\"\n            ),\n        }\n    )\n}\n\nexport function createUSBTransport(options?: USBOptions): Transport {\n    if (!options) options = defaultOptions()\n    return options && new WebUSBTransport(options)\n}\n\nexport function createUSBBus(usbOptions?: USBOptions, options?: BusOptions) {\n    return new JDBus([createUSBTransport(usbOptions)], options)\n}\n", "import { USB_TRANSPORT } from \"../constants\"\nimport { EventTargetObservable } from \"./eventtargetobservable\"\nimport { Flags } from \"../flags\"\nimport { Packet } from \"../packet\"\nimport { Transport, TransportOptions } from \"./transport\"\nimport {\n    TransportConnectMessage,\n    TransportMessage,\n    TransportPacketMessage,\n} from \"./transportmessages\"\nimport { isWebUSBEnabled, usbRequestDevice } from \"./usb\"\nimport { USB_FILTERS } from \"./usbio\"\n\nclass WorkerTransport extends Transport {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private pending: {\n        [id: string]: {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            resolve: (t: any) => void\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            reject: (e: any) => void\n        }\n    } = {}\n\n    constructor(\n        public readonly type: string,\n        public readonly worker: Worker,\n        public readonly options: {\n            requestDevice: () => Promise<string>\n        } & TransportOptions\n    ) {\n        super(type, options)\n        this.worker.addEventListener(\"message\", this.handleMessage.bind(this))\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private postMessageAsync<T>(msg: TransportMessage) {\n        const id = (msg.id = \"\" + Math.random())\n        const p = new Promise<T>((resolve, reject) => {\n            this.worker.postMessage(msg)\n            this.pending[id] = { resolve, reject }\n        })\n        return p\n    }\n\n    private handleMessage(ev: MessageEvent) {\n        const data: TransportMessage = ev.data\n        const { jacdac, type } = data || {}\n        if (!jacdac) return // not our message\n        switch (type) {\n            case \"packet\": {\n                const { payload } = data as TransportPacketMessage\n                //debug(`wt: packet`, payload)\n                this.handleFrame(payload)\n                break\n            }\n            case \"frame\": {\n                const { payload } = data as TransportPacketMessage\n                //debug(`wt: frame`, payload)\n                this.handleFrame(payload)\n                break\n            }\n            case \"connect\":\n            case \"disconnect\": {\n                const { id, error } = data\n                const { resolve, reject } = this.pending[id] || {}\n                if (resolve) {\n                    delete this.pending[id]\n                    if (error) reject(error)\n                    else resolve(undefined)\n                }\n                break\n            }\n            case \"error\": {\n                const { error, background, type } = data as TransportMessage\n                if (Flags.diagnostics) console.debug(data)\n                if (!background) this.errorHandler(type, error)\n                break\n            }\n        }\n    }\n\n    protected async transportSendPacketAsync(buf: Uint8Array): Promise<void> {\n        // don't wait\n        this.worker.postMessage(<TransportPacketMessage>{\n            jacdac: true,\n            type: \"packet\",\n            payload: buf,\n        })\n    }\n\n    protected async transportConnectAsync(background?: boolean) {\n        let deviceId: string\n        if (!background) {\n            // request permission first\n            deviceId = await this.options.requestDevice()\n        }\n\n        // try connect\n        await this.postMessageAsync<void>(<TransportConnectMessage>{\n            jacdac: true,\n            type: \"connect\",\n            deviceId,\n            background,\n        })\n    }\n\n    protected transportDisconnectAsync(background?: boolean): Promise<void> {\n        return this.postMessageAsync<void>(<TransportMessage>{\n            jacdac: true,\n            type: \"disconnect\",\n            background,\n        })\n    }\n}\n\nexport function createUSBWorkerTransport(worker: Worker) {\n    return (\n        isWebUSBEnabled() &&\n        new WorkerTransport(USB_TRANSPORT, worker, {\n            checkPulse: true,\n            requestDevice: () =>\n                usbRequestDevice(USB_FILTERS).then(dev => dev?.serialNumber),\n            connectObservable: new EventTargetObservable(\n                navigator.usb,\n                \"connect\"\n            ),\n            disconnectObservable: new EventTargetObservable(\n                navigator.usb,\n                \"disconnect\"\n            ),\n        })\n    )\n}\n", "import { Flags } from \"../flags\"\nimport { SERIAL_TRANSPORT } from \"../constants\"\nimport { Transport } from \"./transport\"\nimport { Proto } from \"./proto\"\nimport { WebSerialIO } from \"./webserialio\"\nimport { HF2_IO } from \"./hf2\"\nimport { Observable } from \"../observable\"\nimport { EventTargetObservable } from \"./eventtargetobservable\"\nimport { JDBus } from \"../bus\"\n\nexport function isWebSerialEnabled(): boolean {\n    return !!Flags.webSerial\n}\n\nexport function isWebSerialSupported(): boolean {\n    try {\n        return (\n            typeof navigator !== \"undefined\" &&\n            !!navigator.serial &&\n            !!navigator.serial.getPorts\n        )\n    } catch (e) {\n        return false\n    }\n}\n\nexport interface WebSerialOptions {\n    mkTransport: (bus: JDBus) => HF2_IO\n    connectObservable?: Observable<void>\n    disconnectObservable?: Observable<void>\n}\n\nexport class WebSerialTransport extends Transport {\n    private mkTransport: (bus: JDBus) => HF2_IO\n    private hf2: Proto\n    private transport: HF2_IO\n    constructor(options: WebSerialOptions) {\n        super(SERIAL_TRANSPORT, { ...options, checkPulse: true })\n        this.mkTransport = options.mkTransport\n    }\n\n    description(): string {\n        return this.transport?.description()\n    }\n\n    protected async transportConnectAsync(background: boolean) {\n        this.transport = this.mkTransport(this.bus)\n        this.transport.onError = e => this.errorHandler(SERIAL_TRANSPORT, e)\n        this.transport.onLog = line => this.handleLog(line)\n        this.hf2 = await this.transport.connectAsync(background)\n        this.hf2.onJDMessage(this.handleFrame.bind(this))\n    }\n\n    protected async transportSendPacketAsync(buf: Uint8Array) {\n        if (!this.hf2) throw new Error(\"hf2 transport disconnected\")\n        await this.hf2.sendJDMessageAsync(buf)\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    protected async transportDisconnectAsync(background?: boolean) {\n        const h = this.hf2\n        this.hf2 = undefined\n        this.transport = undefined\n        if (h) await h.disconnectAsync()\n    }\n}\n\nfunction defaultOptions(): WebSerialOptions {\n    if (!isWebSerialSupported()) return undefined\n    const connectObservable = new EventTargetObservable(\n        navigator.serial,\n        \"connect\"\n    )\n    const disconnectObservable = new EventTargetObservable(\n        navigator.serial,\n        \"disconnect\"\n    )\n    return {\n        mkTransport: (bus: JDBus) => new WebSerialIO(bus),\n        connectObservable,\n        disconnectObservable,\n    }\n}\n\n/**\n * Creates a transport over a Web Serial connection\n * @category Transport\n */\nexport function createWebSerialTransport(\n    options?: WebSerialOptions\n): Transport {\n    if (!options) options = defaultOptions()\n    return options && new WebSerialTransport(options)\n}\n", "import { JDBridge } from \"../bridge\"\nimport { inIFrame } from \"../iframeclient\"\n\nclass IFrameBridge extends JDBridge {\n    constructor(readonly targetOrigin: string) {\n        super(\"iframe\")\n        this.handleMessage = this.handleMessage.bind(this)\n        window.addEventListener(\"message\", this.handleMessage, false)\n        this.mount(() =>\n            window.removeEventListener(\"message\", this.handleMessage)\n        )\n        //console.debug(`jacdac: iframe bridge created`)\n    }\n\n    private handleMessage(msg: MessageEvent) {\n        const { data } = msg\n        if (data.channel === \"jacdac\" && data.type === \"messagepacket\") {\n            const payload: Uint8Array = data.data\n            this.receiveFrameOrPacket(payload)\n        }\n    }\n\n    protected sendPacket(data: Uint8Array, sender: string): void {\n        const msg = {\n            type: \"messagepacket\",\n            channel: \"jacdac\",\n            data,\n            sender,\n            broadcast: true,\n        }\n        window.parent.postMessage(msg, this.targetOrigin)\n    }\n}\n\nexport function createIFrameBridge(parentOrigin = \"*\"): JDBridge {\n    return inIFrame() && new IFrameBridge(parentOrigin)\n}\n", "import {\n    ERROR_TRANSPORT_CLOSED,\n    ERROR_TRANSPORT_WEBSOCKET_NOT_SUPPORTED,\n    FRAME_SEND_DISCONNECT,\n    SIDE_DATA,\n    WEBSOCKET_TRANSPORT,\n} from \"../constants\"\nimport { throwError } from \"../error\"\nimport { JSONTryParse } from \"../utils\"\nimport { Transport, TransportOptions } from \"./transport\"\n\nconst RECONNECT_TIMEOUT = 5000\n\n/**\n * Transport creation options for web sockets\n * @category Transport\n */\nexport interface WebSocketTransportOptions extends TransportOptions {\n    protocols: string | string[]\n    WebSocket?: any\n}\n\n/**\n * Indicates if web sockets are supported by this platform. Checks that WebSocket and Blob are supported.\n * @returns\n */\nexport function isWebSocketTransportSupported() {\n    return (\n        typeof WebSocket !== \"undefined\" && typeof globalThis.Blob !== undefined\n    )\n}\n\nexport class WebSocketTransport extends Transport {\n    private readonly protocols: string | string[]\n    private ws: WebSocket\n    private lastConnectTimestamp = 0\n    private WebSocket: any\n\n    constructor(readonly url: string, options?: WebSocketTransportOptions) {\n        super(WEBSOCKET_TRANSPORT, options)\n        this.WebSocket = options?.WebSocket || WebSocket\n        this.protocols = options?.protocols\n        this.on(FRAME_SEND_DISCONNECT, this.handleSendDisconnect.bind(this))\n    }\n\n    description() {\n        return this.url\n    }\n\n    private handleSendDisconnect() {\n        const now = this.bus.timestamp\n        if (now - this.lastConnectTimestamp > RECONNECT_TIMEOUT) {\n            this.lastConnectTimestamp = now\n            this.connect(true)\n        }\n    }\n\n    protected transportConnectAsync(background?: boolean): Promise<void> {\n        return new Promise<void>((resolve, reject) => {\n            this.ws = new this.WebSocket(this.url, this.protocols)\n            if (this.ws.binaryType != \"arraybuffer\")\n                this.ws.binaryType = \"arraybuffer\"\n            this.ws.onopen = () => {\n                const f = resolve\n                resolve = null\n                if (f) f()\n            }\n            this.ws.onerror = err => {\n                this.disconnect(background)\n                if (resolve) {\n                    resolve = null\n                    reject(err)\n                }\n            }\n            this.ws.onclose = () => this.disconnect(background)\n            this.ws.onmessage = (ev: MessageEvent<ArrayBuffer | string>) => {\n                const { data } = ev\n                if (typeof data == \"string\") {\n                    const d = JSONTryParse(data, null)\n                    if (d) this.emit(SIDE_DATA, d)\n                } else {\n                    const buffer = new Uint8Array(data)\n                    this.handleFrame(buffer)\n                }\n            }\n        })\n    }\n\n    protected transportSendPacketAsync(data: Uint8Array): Promise<void> {\n        if (this.ws?.readyState === this.WebSocket.OPEN) {\n            this.ws.send(data)\n        }\n        return Promise.resolve()\n    }\n\n    override sendSideData(data: any): Promise<void> {\n        if (this.ws?.readyState === this.WebSocket.OPEN) {\n            this.ws.send(JSON.stringify(data))\n            return Promise.resolve()\n        } else {\n            throwError(`socket closed, can't send side data`, {\n                code: ERROR_TRANSPORT_CLOSED,\n            })\n        }\n    }\n\n    protected transportDisconnectAsync(background?: boolean): Promise<void> {\n        try {\n            this.ws?.close()\n            this.ws = undefined\n        } catch (e) {\n            if (!background) throw e\n        }\n        return Promise.resolve()\n    }\n\n    toString() {\n        return `websocket transport (state: ${this.ws?.readyState})`\n    }\n}\n\n/**\n * Creates a transport over a web socket connection. In Node.js, you will need to provide a WebSocket, Blob polyfill.\n *\n * ```javascript\n * import \"websocket-polyfill\"\n * import { Blob } from \"buffer\"\n * globalThis.Blob = Blob\n * ```\n * @category transport\n */\nexport function createWebSocketTransport(\n    url: string,\n    options?: WebSocketTransportOptions\n): WebSocketTransport {\n    if (!isWebSocketTransportSupported())\n        throwError(\"WebSocket not supported\", {\n            code: ERROR_TRANSPORT_WEBSOCKET_NOT_SUPPORTED,\n        })\n    return new WebSocketTransport(url, options)\n}\n", "import { JDBus, BusOptions } from \"../bus\"\nimport { createUSBTransport, isWebUSBSupported } from \"./usb\"\nimport {\n    createWebSerialTransport,\n    isWebSerialSupported,\n    WebSerialOptions,\n} from \"./webserial\"\nimport {\n    createBluetoothTransport,\n    isWebBluetoothSupported,\n    WebBluetoothOptions,\n} from \"./bluetooth\"\nimport { USBOptions } from \"./usbio\"\nimport { createIFrameBridge } from \"../bridges/iframebridge\"\nimport {\n    createWebSocketTransport,\n    WebSocketTransportOptions,\n} from \"./websockettransport\"\n\n/**\n * Options to instantiate a bus. By default, the bus acts as a client.\n */\nexport interface WebBusOptions extends BusOptions {\n    /**\n     * USB connection options, set to null to disable USB\n     */\n    usbOptions?: USBOptions | null\n\n    /**\n     * WebSerial connection options, set to null to disable serial\n     */\n    serialOptions?: WebSerialOptions | null\n\n    /**\n     * WebBluetooth connection options, set to null to disable BLE\n     */\n    bluetoothOptions?: WebBluetoothOptions | null\n\n    /**\n     * Specify target origin for iframe messages\n     */\n    iframeTargetOrigin?: string\n}\n\n/**\n * Creates a Jacdac bus using WebUSB, WebSerial or WebBluetooth\n * @param options\n * @returns\n * @category Transport\n */\nexport function createWebBus(options?: WebBusOptions) {\n    const {\n        usbOptions,\n        serialOptions,\n        bluetoothOptions,\n        iframeTargetOrigin,\n        client = true,\n        ...rest\n    } = options || {}\n    const bus = new JDBus(\n        [\n            usbOptions !== null ? createUSBTransport(usbOptions) : undefined,\n            serialOptions !== null\n                ? createWebSerialTransport(serialOptions)\n                : undefined,\n            bluetoothOptions !== null\n                ? createBluetoothTransport(bluetoothOptions)\n                : undefined,\n        ],\n        { client, ...rest }\n    )\n    const iframeBridge =\n        iframeTargetOrigin !== null && createIFrameBridge(iframeTargetOrigin)\n    if (iframeBridge) iframeBridge.bus = bus\n    return bus\n}\n\n/**\n * Indicates if any of the USB/Serial/Bluetooth transports is supported\n * @returns\n * @category Transport\n */\nexport function isWebTransportSupported() {\n    return (\n        isWebUSBSupported() ||\n        isWebSerialSupported() ||\n        isWebBluetoothSupported()\n    )\n}\n\n/**\n * Create a bus that opens a websocket connection to the local debug server (ws://127.0.0.1:8081)\n * @param options\n * @returns\n */\nexport function createWebSocketBus(options?: {\n    url?: string\n    busOptions?: BusOptions\n    webSocketOptions?: WebSocketTransportOptions\n}) {\n    const {\n        url = \"ws://127.0.0.1:8081/\",\n        webSocketOptions,\n        busOptions = {},\n    } = options || {}\n    const ws = createWebSocketTransport(url, webSocketOptions)\n    const bus = new JDBus([ws], {\n        disableRoleManager: true,\n        client: false,\n        ...busOptions,\n    })\n    bus.autoConnect = true\n    return bus\n}\n", "import {\n    BOUND,\n    CHANGE,\n    DEVICE_ANNOUNCE,\n    DEVICE_DISCONNECT,\n    ROLE_BOUND,\n    ROLE_UNBOUND,\n    UNBOUND,\n} from \"./constants\"\nimport { JDBus } from \"./bus\"\nimport { JDDevice } from \"./device\"\nimport { JDService } from \"./service\"\nimport { serviceSpecificationFromClassIdentifier } from \"./spec\"\nimport { JDClient } from \"./client\"\n\nexport function escapeRoleName(role: string) {\n    const m = /^(.+)(\\?|\\[)/.exec(role)\n    const roleName = m?.[1] || role\n    return roleName\n}\n\n/**\n * A binding from a name to a service\n * @category Roles\n */\nexport interface RoleBinding {\n    role: string\n    serviceClass: number\n    preferredDeviceId?: string\n    preferredServiceIndex?: number\n}\n\nexport interface LiveRoleBinding extends RoleBinding {\n    service?: JDService\n}\n\n/**\n * A role manager\n * @category Roles\n */\nexport class RoleManager extends JDClient {\n    private readonly _roles: LiveRoleBinding[] = []\n\n    /**\n     * Gets the bus for this role\n     */\n    public readonly bus: JDBus\n\n    constructor(bus: JDBus, configuration?: RoleBinding[]) {\n        super()\n        this.bus = bus\n        this.mount(\n            this.bus.subscribe(DEVICE_ANNOUNCE, this.addServices.bind(this)),\n        )\n        this.mount(\n            this.bus.subscribe(\n                DEVICE_DISCONNECT,\n                this.removeServices.bind(this),\n            ),\n        )\n        this.updateRoles(configuration || [])\n    }\n\n    /**\n     * Indicates if all roles are bound.\n     */\n    get isBound() {\n        return this._roles.every(({ service }) => !!service)\n    }\n\n    /**\n     * Gets the list of roles tracked by the manager\n     */\n    roles(bound: boolean = undefined): LiveRoleBinding[] {\n        if (bound !== undefined)\n            return this._roles.filter(({ service }) => !!service === bound)\n        else return this._roles.slice(0)\n    }\n\n    /**\n     * Saves roles status\n     * @returns\n     */\n    saveRoles(): RoleBinding[] {\n        return this._roles.map(({ service, ...rest }) => ({\n            ...rest,\n            serviceId: service?.id,\n        }))\n    }\n\n    private get hash() {\n        return JSON.stringify(this.saveRoles())\n    }\n\n    /**\n     * Updates the list of roles\n     * @param newRoles\n     */\n    updateRoles(newRoles: RoleBinding[]) {\n        const oldBound = this.isBound\n        const oldHash = this.hash\n\n        // remove unknown roles\n        const supportedNewRoles = newRoles.filter(({ serviceClass }) =>\n            serviceSpecificationFromClassIdentifier(serviceClass),\n        )\n\n        // ensure that preferred deviceid/service index is unique\n        const preferreds: Set<string> = new Set()\n        for (const role of supportedNewRoles.filter(\n            r => !!r.preferredDeviceId,\n        )) {\n            const key =\n                role.preferredDeviceId + (role.preferredServiceIndex || -1)\n            if (preferreds.has(key)) {\n                role.preferredDeviceId = undefined\n                role.preferredServiceIndex = undefined\n            } else preferreds.add(key)\n        }\n\n        // unbind removed roles\n        let i = 0\n        while (i < this._roles.length) {\n            const role = this._roles[i]\n            if (!supportedNewRoles.find(r => r.role === role.role)) {\n                this._roles.splice(i, 1)\n                this.emit(ROLE_UNBOUND, role.role)\n            } else {\n                i++\n            }\n        }\n\n        // update or add roles\n        for (const newRole of supportedNewRoles) {\n            const existingRole = this._roles.find(r => r.role === newRole.role)\n            if (!existingRole) {\n                // added role\n                this._roles.push({ ...newRole })\n            } else {\n                const bindingChanged =\n                    existingRole.serviceClass !== newRole.serviceClass ||\n                    existingRole.preferredDeviceId !=\n                        newRole.preferredDeviceId ||\n                    existingRole.preferredServiceIndex !=\n                        newRole.preferredServiceIndex\n\n                existingRole.serviceClass = newRole.serviceClass\n                existingRole.preferredDeviceId = newRole.preferredDeviceId\n                existingRole.preferredServiceIndex =\n                    newRole.preferredServiceIndex\n                // unbinding existing service\n                if (existingRole.service && bindingChanged) {\n                    existingRole.service = undefined\n                    this.emit(ROLE_UNBOUND, existingRole.role)\n                }\n            }\n\n            if (newRole.preferredDeviceId) {\n                // make sure that the preferred device id is free\n                const otherBinding = this._roles.find(\n                    r =>\n                        r.service &&\n                        r.service.device.deviceId ===\n                            newRole.preferredDeviceId &&\n                        (isNaN(newRole.preferredServiceIndex) ||\n                            r.service.serviceIndex ===\n                                newRole.preferredServiceIndex),\n                )\n                if (otherBinding) {\n                    otherBinding.service = undefined\n                    this.emit(ROLE_UNBOUND, otherBinding.role)\n                }\n            }\n            // role unmodified\n        }\n        // bound services\n        const changed = oldHash !== this.hash\n        this.bindServices(changed)\n        this.emitBoundEvents(oldBound)\n    }\n\n    /**\n     * Resolves the service bound to a given role.\n     * @param role\n     * @returns\n     */\n    public service(role: string): JDService {\n        return this._roles.find(r => r.role === role)?.service\n    }\n\n    /**\n     * Updates or creates a new role\n     * @param role name of the role\n     * @param serviceClass desired service class\n     * @param preferredDeviceId optional preferred device id\n     * @returns\n     */\n    public updateRole(\n        role: string,\n        serviceClass: number,\n        preferredDeviceId?: string,\n        preferredServiceIndex?: number,\n    ) {\n        const newRoles = this._roles.slice(0).map(r => ({ ...r }))\n        let binding = newRoles.find(r => r.role === role)\n        if (binding) {\n            binding.service = undefined\n            binding.preferredDeviceId = preferredDeviceId\n            binding.preferredServiceIndex = preferredServiceIndex\n        } else {\n            binding = {\n                role,\n                serviceClass,\n                preferredDeviceId,\n                preferredServiceIndex,\n            }\n            newRoles.push(binding)\n        }\n        // find any other binding with the same preferences and clear it\n        if (preferredDeviceId) {\n            const other = this._roles.find(\n                r =>\n                    r !== binding &&\n                    r.preferredDeviceId === preferredDeviceId &&\n                    r.preferredServiceIndex === preferredServiceIndex,\n            )\n            if (other) {\n                other.preferredDeviceId = undefined\n                other.preferredServiceIndex = undefined\n            }\n        }\n        this.updateRoles(newRoles)\n    }\n\n    private emitBoundEvents(oldBound: boolean) {\n        const bound = this.isBound\n        if (oldBound !== bound) this.emit(bound ? BOUND : UNBOUND)\n    }\n\n    // TODO: need to respect other (unbound) role's preferredDeviceId\n    private bindRole(role: LiveRoleBinding) {\n        // find a service that is not yet allocated\n        const bound = this.roles(true)\n        const unboundServices = this.bus\n            .services({\n                ignoreInfrastructure: true,\n                serviceClass: role.serviceClass,\n            })\n            .filter(s => !bound.find(r => r.service === s))\n        const boundServices = bound.map(r => r.service).filter(srv => !!srv)\n\n        // pick the first unbound service\n        let theOne = unboundServices[0]\n\n        // if there are constraint, try a better fit\n        if (role.preferredDeviceId) {\n            const newOne = [...unboundServices, ...boundServices].find(\n                s =>\n                    s.device.deviceId === role.preferredDeviceId &&\n                    (isNaN(role.preferredServiceIndex) ||\n                        role.preferredServiceIndex === s.serviceIndex),\n            )\n            if (newOne) {\n                theOne = newOne\n            }\n        }\n\n        if (theOne) {\n            role.service = theOne\n            this.emit(ROLE_BOUND, role.role)\n            return true\n        } else return false\n    }\n\n    private bindServices(changed?: boolean) {\n        const r = this.roles().sort((l, r) => {\n            let c = 0\n            if (r.preferredDeviceId || l.preferredDeviceId)\n                c = -(l.preferredDeviceId || \"\").localeCompare(\n                    r.preferredDeviceId || \"\",\n                )\n            if (c != 0) return c\n            if (\n                !isNaN(l.preferredServiceIndex) ||\n                !isNaN(r.preferredServiceIndex)\n            )\n                c =\n                    -(l.preferredServiceIndex || 0) +\n                    (r.preferredServiceIndex || 0)\n            return c\n        })\n        r.forEach(binding => {\n            if (this.bindRole(binding)) changed = true\n        })\n        if (changed) this.emit(CHANGE)\n    }\n\n    private addServices(dev: JDDevice) {\n        if (dev === this.bus.selfDevice) return\n        this.bindServices()\n    }\n\n    private removeServices(dev: JDDevice) {\n        let changed = false\n        this._roles\n            .filter(r => r.service?.device === dev)\n            .forEach(r => {\n                r.service = undefined\n                this.emit(ROLE_UNBOUND, r.role)\n                changed = true\n            })\n        this.bindServices(changed)\n    }\n\n    toString() {\n        return this._roles\n            .map(({ role, service }) => `${role}->${service || \"?\"}`)\n            .join(\",\")\n    }\n}\n\n/**\n * Tracks a set of roles\n * @param bus bus hosting the devices\n * @param bindings map of role names to device service pairs\n * @param onUpdate callback to run whenver role assignments change\n * @param options Additional options\n * @returns A unsubscribe callback to cleanup handlers\n * @category Roles\n */\nexport function startRoles<\n    TRoles extends Record<\n        string,\n        {\n            serviceClass: number\n            preferredDeviceId?: string\n            preferredServiceIndex?: number\n        }\n    >,\n>(\n    bus: JDBus,\n    bindings: TRoles,\n    onUpdate: (roles: Record<keyof TRoles, JDService>) => void,\n    options?: {\n        /**\n         * Calls update even if not all role around bound\n         */\n        incomplete?: boolean\n    },\n) {\n    const { incomplete } = options || {}\n    const roleManager = new RoleManager(bus)\n    roleManager.updateRoles(\n        Object.keys(bindings).map(role => ({\n            role,\n            serviceClass: bindings[role].serviceClass,\n            preferredDeviceId: bindings[role].preferredDeviceId,\n            preferredServiceIndex: bindings[role].preferredServiceIndex,\n        })),\n    )\n    const roles = () => {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const r: Record<keyof TRoles, JDService> = {} as any\n        for (const key in bindings) {\n            const srv = roleManager.service(key)\n            if (srv) r[key] = srv\n        }\n        return r\n    }\n    const update = () => {\n        if (!incomplete && !roleManager.isBound) return\n        onUpdate(roles())\n    }\n    const unsubscribe = roleManager.subscribe(CHANGE, update)\n    update()\n    return unsubscribe\n}\n\n/*\nfunction test(bus: JDBus) {\n    const bindings = {\n        thermo1: { serviceClass: SRV_BUTTON },\n        thermo2: { serviceClass: SRV_BUTTON },\n    }\n    trackRoles(\n        bus,\n        bindings,\n        ({ thermo1, thermo2 }) => {\n            console.log({ thermo1, thermo2 })\n        },\n        { incomplete: true }\n    )\n}\n*/\n", "import { JDBus } from \"./bus\"\nimport { isSensor, serviceSpecifications } from \"./spec\"\nimport { toMap } from \"./utils\"\n\nlet _sensorSpecs: jdspec.ServiceSpec[]\n\n/**\n * Gets the list of sensor specifications available\n * @returns\n */\nexport function sensorSpecifications() {\n    if (!_sensorSpecs) {\n        _sensorSpecs = serviceSpecifications().filter(\n            srv => !srv.shortName.startsWith(\"_\") && isSensor(srv),\n        )\n    }\n    return _sensorSpecs\n}\n\n/**\n * Collects and flattens all sensor data into a serializable object\n * @param bus\n * @returns\n */\nexport function snapshotSensors(\n    bus: JDBus,\n    sparse?: boolean,\n): Record<string, number[] | Record<string, number>[]> {\n    const r = toMap(\n        sensorSpecifications(),\n        srv => srv.camelName,\n        srv => {\n            const r = bus\n                .services({\n                    serviceClass: srv.classIdentifier,\n                    ignoreInfrastructure: true,\n                    announced: true,\n                })\n                .map(srv => {\n                    const reg = srv.readingRegister\n                    const spec = reg.specification\n                    return spec.fields.length === 1\n                        ? reg.unpackedValue?.[0] || 0\n                        : reg.objectValue || {}\n                })\n            return sparse && !r.length ? undefined : r\n        },\n        sparse,\n    )\n    return r\n}\n", "import { JDBridge } from \"../bridge\"\nimport { CLOSE } from \"../constants\"\n\nexport class WebSocketBridge extends JDBridge {\n    private _ws: WebSocket\n    private _startPromise: Promise<void>\n\n    constructor(\n        name: string,\n        readonly url: string,\n        readonly protocols?: string | string[]\n    ) {\n        super(name, true)\n\n        this.mount(() => this.close())\n    }\n\n    private close() {\n        console.debug(`web bridge closed`, { url: this.url })\n        const opened = !!this._ws || !!this._startPromise\n        try {\n            this._ws?.close()\n            this._ws = undefined\n            this._startPromise = undefined\n        } catch (e) {\n            console.warn(e)\n        }\n        if (opened) this.emit(CLOSE)\n    }\n\n    async connect() {\n        if (this._ws) return Promise.resolve()\n        if (!this._startPromise) {\n            this._startPromise = new Promise<void>((resolve, reject) => {\n                const ws = new WebSocket(this.url, this.protocols)\n                ws.binaryType = \"arraybuffer\"\n                ws.onopen = () => {\n                    this._ws = ws\n                    this._startPromise = undefined\n                    console.debug(`web bridge opened`, { url: this.url })\n                    resolve()\n                }\n                ws.onerror = e => {\n                    console.debug(`web bridge error`, { url: this.url })\n                    this.close()\n                    reject()\n                }\n                ws.onclose = ev => {\n                    console.debug(`web bridge onclose`, { ev })\n                    this.close()\n                }\n                ws.onmessage = (ev: MessageEvent<ArrayBuffer>) => {\n                    const { data } = ev\n                    const buffer = new Uint8Array(data)\n                    this.receiveFrameOrPacket(buffer)\n                }\n            })\n        }\n        return this._startPromise\n    }\n\n    protected sendPacket(data: Uint8Array, sender: string): void {\n        this.connect()\n        this._ws?.send(data)\n    }\n}\n", "import { NODESOCKET_TRANSPORT } from \"../constants\"\nimport { bufferConcat } from \"../utils\"\nimport { Transport, TransportOptions } from \"./transport\"\n\n/**\n * Transport creation options for TCP sockets\n * @category Transport\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface NodeSocketTransportOptions extends TransportOptions {}\n\nclass NodeSocketTransport extends Transport {\n    private sock: any\n\n    constructor(\n        readonly port: number = 8082,\n        readonly host: string = \"127.0.0.1\",\n        options?: NodeSocketTransportOptions\n    ) {\n        super(NODESOCKET_TRANSPORT, options)\n    }\n\n    description(): string {\n        return `${this.host}:${this.port}`\n    }\n\n    protected transportConnectAsync(background?: boolean): Promise<void> {\n        return new Promise(resolve => {\n            // eslint-disable-next-line @typescript-eslint/no-var-requires\n            const net = require(\"net\")\n            this.sock = net.createConnection(this.port, this.host, resolve)\n            this.sock.on(\"error\", (e: any) => {\n                if (!background) console.error(e)\n                this.disconnect(background)\n            })\n            this.sock.on(\"end\", () => this.disconnect(background))\n            this.sock.setNoDelay()\n\n            let acc: Uint8Array\n            this.sock.on(\"data\", (buf: Uint8Array) => {\n                if (acc) {\n                    buf = bufferConcat(acc, buf)\n                    acc = null\n                } else {\n                    buf = new Uint8Array(buf)\n                }\n                while (buf) {\n                    const endp = buf[0] + 1\n                    if (buf.length >= endp) {\n                        const pkt = buf.slice(1, endp)\n                        if (buf.length > endp) buf = buf.slice(endp)\n                        else buf = null\n                        this.handleFrame(pkt)\n                    } else {\n                        acc = buf\n                        buf = null\n                    }\n                }\n            })\n        })\n    }\n\n    protected transportSendPacketAsync(data: Uint8Array): Promise<void> {\n        const buf = new Uint8Array(1 + data.length)\n        buf[0] = data.length\n        buf.set(data, 1)\n        this.sock.write(buf)\n        return Promise.resolve()\n    }\n\n    protected transportDisconnectAsync(background?: boolean): Promise<void> {\n        try {\n            this.sock?.end()\n            this.sock = undefined\n        } catch (e) {\n            if (!background) throw e\n        }\n        return Promise.resolve()\n    }\n\n    toString() {\n        return `socket transport (local port: ${this.sock?.localPort})`\n    }\n}\n\n/**\n * Creates a transport over a TCP socket connection\n * @category transport\n */\nexport function createNodeSocketTransport(\n    port?: number,\n    host?: string,\n    options?: NodeSocketTransportOptions\n) {\n    return new NodeSocketTransport(port, host, options)\n}\n", "import { Packet } from \"../packet\"\nimport { crc, read16 } from \"../utils\"\nimport { Transport, TransportOptions } from \"./transport\"\n\nconst debug = (msg: any) => {} //console.debug\n\nexport interface SpiTransportOptions extends TransportOptions {\n    /**\n     * Physical index of the TX ready pin\n     */\n    txReadyPin: number\n    /**\n     * Physical index of the RX ready pin\n     */\n    rxReadyPin: number\n    /**\n     * Physical index of the RESET pin\n     */\n    resetPin: number\n    /**\n     * SPI bus id, default 0\n     */\n    spiBusId: number\n}\n\nconst XFER_SIZE = 256\nconst SPI_TRANSFER_ATTEMPT_COUNT = 10\n\ninterface Rpio {\n    INPUT: number\n    OUTPUT: number\n    PULL_DOWN: number\n    HIGH: number\n    LOW: number\n    POLL_HIGH: number\n    init(options?: { gpiomem?: boolean; mapping?: \"physical\" }): void\n    open(pin: number, mode: number, flags?: number): void\n    close(pin: number): void\n    write(pin: number, value: number): void\n    read(pin: number): number\n    mode(pin: number, mode: number, flags?: number): void\n    poll(pin: number, cb: () => void, direction?: number): void\n}\n\ninterface SpiDev {\n    MODE0: number\n    openSync(busNumber: number, deviceNumber: number): SpiDevice\n}\ninterface SpiMessage {\n    byteLength: number\n    sendBuffer?: Buffer\n    receiveBuffer?: Buffer\n    speedHz?: number\n    microSecondDelay?: number\n    bitsPerWord?: number\n    chipSelectChange?: boolean\n}\ninterface SpiDevice {\n    transferSync(messages: SpiMessage[]): SpiDevice\n    closeSync(): void\n}\n\n/**\n * A SPI bridge using https://www.npmjs.com/package/rpio\n */\nclass SpiTransport extends Transport {\n    private readonly sendQueue: Uint8Array[] = []\n    private readonly receiveQueue: Uint8Array[] = []\n    private spiDevice: SpiDevice\n\n    constructor(\n        readonly rpio: Rpio,\n        readonly spi: SpiDev,\n        readonly options: SpiTransportOptions\n    ) {\n        super(\"spi\", options)\n        this.handleRxPinRising = this.handleRxPinRising.bind(this)\n        this.handleTxPinRising = this.handleTxPinRising.bind(this)\n\n        this.rpio.init({\n            gpiomem: true,\n            mapping: \"physical\",\n        })\n    }\n\n    protected async transportConnectAsync(background?: boolean): Promise<void> {\n        try {\n            await this.internalTransportConnectAsync()\n        } catch (e) {\n            console.debug(e)\n            console.error(\"SPI configuration failed: make sure to install rpio\")\n            this.disconnectRpio()\n            throw e\n        }\n    }\n\n    private async internalTransportConnectAsync(): Promise<void> {\n        debug(\"spi: connecting...\")\n\n        const { txReadyPin, rxReadyPin, resetPin } = this.options\n        const { HIGH, LOW, POLL_HIGH, PULL_DOWN, INPUT, OUTPUT } = this.rpio\n\n        debug(\"spi: setup pins\")\n\n        this.rpio.open(txReadyPin, INPUT, PULL_DOWN) // pull down\n        this.rpio.open(rxReadyPin, INPUT, PULL_DOWN) // pull down\n        this.rpio.open(resetPin, OUTPUT)\n\n        debug(\"spi: reset bridge\")\n\n        this.rpio.write(resetPin, LOW)\n        await this.bus.delay(10)\n        this.rpio.write(resetPin, HIGH)\n\n        this.rpio.mode(resetPin, INPUT)\n\n        debug(\"spi: connect spi\")\n\n        this.spiDevice = this.spi.openSync(0, 0)\n\n        this.rpio.poll(rxReadyPin, this.handleRxPinRising, POLL_HIGH)\n        this.rpio.poll(txReadyPin, this.handleTxPinRising, POLL_HIGH)\n\n        debug(\"spi: ready\")\n        await this.transfer()\n    }\n\n    protected async transportDisconnectAsync(\n        // eslint-disable-next-line @typescript-eslint/no-unused-vars\n        background?: boolean\n    ): Promise<void> {\n        this.disconnectRpio()\n    }\n\n    private disconnectRpio() {\n        try {\n            const { txReadyPin, rxReadyPin, resetPin } = this.options\n\n            this.rpio.close(txReadyPin)\n            this.rpio.close(rxReadyPin)\n            this.rpio.close(resetPin)\n\n            this.spiDevice?.closeSync()\n            this.spiDevice = undefined\n            //this.rpio.spiEnd()\n        } catch (e) {\n            console.debug(e)\n        }\n    }\n\n    private handleRxPinRising() {\n        //Console.WriteLine($\"rx rise\");\n        this.transfer()\n    }\n\n    private handleTxPinRising() {\n        //Console.WriteLine($\"tx rise\");\n        this.transfer()\n    }\n\n    protected async transportSendPacketAsync(p: Uint8Array): Promise<void> {\n        this.sendQueue.push(p)\n        this.transfer()\n    }\n\n    private async transfer() {\n        let todo = true\n        while (todo) {\n            todo = await this.transferFrame()\n            while (this.receiveQueue.length > 0) {\n                const frame = this.receiveQueue.shift()\n                this.handleFrame(frame, true)\n            }\n        }\n    }\n\n    private async transferFrame(): Promise<boolean> {\n        // much be in a locked context\n        const { txReadyPin, rxReadyPin } = this.options\n        const { HIGH } = this.rpio\n        const txReady = this.rpio.read(txReadyPin) == HIGH\n        const rxReady = this.rpio.read(rxReadyPin) == HIGH\n        const sendtx = this.sendQueue.length > 0 && txReady\n\n        if (!sendtx && !rxReady) return false\n\n        // allocate transfer buffers\n        const txqueue = new Uint8Array(XFER_SIZE)\n        const rxqueue = new Uint8Array(txqueue.length)\n\n        // assemble packets into send buffer\n        let txq_ptr = 0\n        while (\n            this.sendQueue.length > 0 &&\n            txq_ptr + this.sendQueue[0].length < XFER_SIZE\n        ) {\n            const pkt = this.sendQueue.shift()\n            txqueue.set(pkt, txq_ptr)\n            txq_ptr += (pkt.length + 3) & ~3\n        }\n\n        if (txq_ptr == 0 && !rxReady) return false // nothing to transfer, nothing to receive\n\n        // attempt transfer\n        const ok: boolean = await this.attemptTransferBuffers(txqueue, rxqueue)\n        if (!ok) {\n            debug(\"transfer failed\")\n            return false\n        }\n\n        if (rxReady) {\n            // consume received frame if any\n            let framep = 0\n            while (framep + 4 < XFER_SIZE) {\n                const frame2 = rxqueue[framep + 2]\n                if (frame2 == 0) break\n                let sz = frame2 + 12\n                if (framep + sz > XFER_SIZE) {\n                    debug(`packet overflow ${framep} + ${sz} > ${XFER_SIZE}`)\n                    break\n                }\n                const frame0 = rxqueue[framep]\n                const frame1 = rxqueue[framep + 1]\n                const frame3 = rxqueue[framep + 3]\n\n                if (frame0 == 0xff && frame1 == 0xff && frame3 == 0xff) {\n                    // skip bogus packet\n                } else {\n                    const computed = crc(rxqueue.slice(framep + 2, framep + sz))\n                    const actual = read16(rxqueue, framep)\n                    if (computed != actual) {\n                        debug(`invalid crc ${computed} != ${actual}`)\n                        break\n                    }\n                    const frame = rxqueue.slice(framep, framep + sz)\n                    this.receiveQueue.push(frame)\n                }\n                sz = (sz + 3) & ~3\n                framep += sz\n            }\n        }\n        return true\n    }\n\n    private async attemptTransferBuffers(\n        txqueue: Uint8Array,\n        rxqueue: Uint8Array\n    ) {\n        // attempt transfer\n        for (let i = 0; i < SPI_TRANSFER_ATTEMPT_COUNT; i++) {\n            try {\n                const msg: SpiMessage = {\n                    sendBuffer: Buffer.from(txqueue),\n                    receiveBuffer: Buffer.alloc(rxqueue.length),\n                    byteLength: txqueue.length,\n                    speedHz: 15600000,\n                }\n                this.spiDevice.transferSync([msg])\n                msg.receiveBuffer.copy(rxqueue, 0, 0, rxqueue.length)\n                return true\n            } catch (ex) {\n                debug(ex)\n                await this.bus.delay(1)\n            }\n        }\n        return false\n    }\n}\n\n// use physical pin index\nconst RPI_PIN_TX_READY = 18 // GPIO 24\nconst RPI_PIN_RX_READY = 22 // GPIO 25\nconst RPI_PIN_RST = 15 // GPIO 22\nconst RPI_SPI_BUS_ID = 0\n\n/**\n * A transport for a JacHAT type of adapter.\n * Requires to install the `rpio` package.\n * @param rpio module loaded with require\n * @param spi module loaded with require\n * @param options\n */\nexport function createNodeSPITransport(\n    rpio: Rpio,\n    spi: SpiDev,\n    options?: SpiTransportOptions\n): Transport {\n    if (!options) {\n        options = {\n            txReadyPin: RPI_PIN_TX_READY,\n            rxReadyPin: RPI_PIN_RX_READY,\n            resetPin: RPI_PIN_RST,\n            spiBusId: RPI_SPI_BUS_ID,\n        }\n    }\n    return new SpiTransport(rpio, spi, options)\n}\n", "import { HF2Proto, HF2_IO } from \"./hf2\"\nimport { Proto } from \"./proto\"\nimport { assert, bufferConcat, delay } from \"../utils\"\nimport { Flags } from \"../flags\"\nimport { JDError, errorCode, isCancelError, throwError } from \"../error\"\nimport { WebSerialTransport } from \"./webserial\"\nimport { Transport } from \"./transport\"\nimport { Observable } from \"../observable\"\nimport { CONNECT, DISCONNECT } from \"../constants\"\nimport { JDEventSource } from \"../eventsource\"\nimport { JDBus } from \"../bus\"\nimport { JdUsbProto } from \"./jdusb\"\n\nconst SCAN_INTERVAL = 2500\n\ninterface Port {\n    path: string\n    manufacturer: string\n    serialNumber: string\n    pnpId: string\n    locationId: string\n    vendorId: string\n    productId: string\n}\n\nfunction toPromise<T>(f: (cb: (err: Error, res: T) => void) => void) {\n    return new Promise<T>((resolve, reject) =>\n        f((err, result) => {\n            if (err) reject(err)\n            else resolve(result)\n        })\n    )\n}\n\nasync function listPorts(bus: JDBus, serialPort: any) {\n    const ports: Port[] = await serialPort.list()\n    return ports.filter(\n        p =>\n            /^(PX|JD)/.test(p.serialNumber) ||\n            bus.deviceCatalog.matchVendorId(\"serial\", parseInt(p.vendorId, 16))\n    )\n}\n\nasync function cancelStreams(dev: any) {\n    await toPromise(cb => {\n        if (!dev.isOpen) cb(undefined, undefined)\n        else dev.close(cb)\n    })\n}\n\n/**\n * @internal\n */\nclass NodeWebSerialIO implements HF2_IO {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private dev: any\n    private port: Port\n    isFreeFlowing = true\n\n    /**\n     *\n     * @param SerialPort ``require(\"serialport\")``\n     */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    constructor(readonly bus: JDBus, private SerialPort: any) {}\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    onData = (v: Uint8Array) => {}\n    onError = (e: Error) => {\n        console.warn(`serial error: ${errorCode(e) || \"\"} ${e ? e.stack : e}`)\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    log(msg: string, v?: any) {\n        if (Flags.diagnostics) {\n            if (v != undefined) console.debug(\"serial: \" + msg, v)\n            else console.debug(\"serial: \" + msg)\n        }\n    }\n\n    private clearDev() {\n        if (this.dev) {\n            this.dev = null\n            this.port = null\n        }\n    }\n\n    disconnectAsync(): Promise<void> {\n        const d = this.dev\n        if (!d) return Promise.resolve()\n\n        this.clearDev()\n        return cancelStreams(d)\n            .catch(e => {\n                // just ignore errors closing, most likely device just disconnected\n                if (!isCancelError(e)) console.debug(e)\n            })\n            .then(() => delay(500))\n    }\n\n    description() {\n        return this.port\n            ? `${this.port.path}, vendor: ${this.port.vendorId}, product: ${this.port.productId}`\n            : undefined\n    }\n\n    private devInfo() {\n        if (!this.port) return \"n/a\"\n        return this.port.vendorId + \":\" + this.port.productId\n    }\n\n    error(msg: string, code?: string) {\n        const e = new JDError(`serial device ${this.devInfo()} (${msg})`, {\n            code,\n        })\n        this.onError(e)\n    }\n\n    sendPacketAsync(pkt: Uint8Array) {\n        if (!this.dev) {\n            // device is disconnecting\n            return Promise.resolve()\n        }\n        assert(pkt.length <= 64)\n        // console.log(\"Send\", toHex(pkt))\n        if (pkt.length < 64) {\n            const p = pkt\n            pkt = new Uint8Array(64)\n            pkt.set(p)\n        }\n        return toPromise<void>(cb => this.dev.write(pkt, undefined, cb)).catch(\n            e => {\n                this.error(\"write error: \" + e.message)\n            }\n        )\n    }\n\n    private async tryReconnectAsync(deviceId?: string) {\n        try {\n            this.dev = undefined\n            this.port = undefined\n\n            const ports = await listPorts(this.bus, this.SerialPort)\n            this.port = ports?.[0]\n            if (this.port) {\n                console.debug(`serial: found ${this.port.serialNumber}`)\n                await toPromise(cb => {\n                    this.dev = new this.SerialPort(\n                        { path: this.port.path, baudRate: 1500000 },\n                        cb\n                    )\n                })\n                let tmpdata: Uint8Array\n                this.dev.on(\"data\", (buf: Uint8Array) => {\n                    if (this.isFreeFlowing) {\n                        this.onData(buf)\n                        return\n                    }\n\n                    if (tmpdata) buf = bufferConcat(tmpdata, buf)\n                    tmpdata = null\n\n                    // This was only observed with WebSerial, but better safe than sorry\n                    if (buf.length & 63) {\n                        tmpdata = buf\n                        return\n                    }\n\n                    if (buf.length > 64)\n                        for (let i = 0; i < buf.length; i += 64) {\n                            this.onData(buf.slice(i, i + 64))\n                        }\n                    else this.onData(buf)\n                })\n                this.dev.on(\"error\", (err: any) => {\n                    this.error(err.messsage || err + \"\")\n                })\n                this.dev.on(\"close\", () => this.disconnectAsync())\n            }\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            this.dev = undefined\n            this.port = undefined\n        }\n    }\n\n    async connectAsync(background: boolean, deviceId?: string) {\n        await this.tryReconnectAsync(deviceId)\n        if (!this.dev && background)\n            throwError(\"can't find suitable device\", { cancel: true })\n        if (!this.dev) throwError(\"device not found\", { cancel: true })\n        console.debug(`serial: found ${this.devInfo()}`)\n\n        const jdusb = new JdUsbProto(this)\n        let proto: Proto = jdusb\n        try {\n            const isHF2 = await jdusb.detectHF2()\n            if (isHF2) proto = new HF2Proto(this)\n            await proto.postConnectAsync()\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            await proto.disconnectAsync()\n            throw e\n        }\n\n        return proto\n    }\n}\n\nclass SerialPortWatch extends JDEventSource {\n    bus: JDBus\n    constructor(readonly SerialPort: any) {\n        super()\n\n        this.watch()\n    }\n\n    watch() {\n        let knownPortIds: string[] = []\n        const interval = setInterval(async () => {\n            if (!this.bus) return\n\n            const ports: Port[] = await listPorts(this.bus, this.SerialPort)\n            const portIds = ports.map(port => port.serialNumber || port.path)\n            const added = portIds.filter(id => knownPortIds.indexOf(id) < 0)\n            const removed = knownPortIds.filter(id => portIds.indexOf(id) < 0)\n            if (added.length || removed.length)\n                console.debug(\n                    `detected serial port change + ${added.join(\n                        \", \"\n                    )} - ${removed.join(\", \")}`\n                )\n\n            knownPortIds = portIds\n            if (added.length) this.emit(CONNECT)\n            if (removed.length) this.emit(DISCONNECT)\n        }, SCAN_INTERVAL)\n        return {\n            unsubscribe: () => clearInterval(interval),\n        }\n    }\n}\n\n/**\n * Creates a transport over a Web Serial connection\n * @param SerialPort the serialport node package\n * @category Transport\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function createNodeWebSerialTransport(SerialPort: any): Transport {\n    const watch = new SerialPortWatch(SerialPort)\n    const connectObservable: Observable<void> = {\n        subscribe: observer => ({\n            unsubscribe: watch.subscribe(CONNECT, observer.next),\n        }),\n    }\n    const disconnectObservable: Observable<void> = {\n        subscribe: observer => ({\n            unsubscribe: watch.subscribe(DISCONNECT, observer.next),\n        }),\n    }\n    return new WebSerialTransport({\n        mkTransport: (bus: JDBus) => {\n            watch.bus = bus\n            return new NodeWebSerialIO(bus, SerialPort)\n        },\n        connectObservable,\n        disconnectObservable,\n    })\n}\n", "import { isCancelError } from \"../error\"\nimport { EventTargetObservable } from \"./eventtargetobservable\"\nimport { HF2_DEVICE_MAJOR } from \"./hf2\"\nimport { MICROBIT_V2_PRODUCT_ID, MICROBIT_V2_VENDOR_ID } from \"./microbit\"\nimport { USBOptions } from \"./usbio\"\n\nexport function createNodeUSBOptions(WebUSB: any): USBOptions {\n    console.debug(`jacdac: creating usb transport`)\n    async function devicesFound(devices: USBDevice[]): Promise<USBDevice> {\n        for (const device of devices) {\n            const { vendorId, productId, deviceVersionMajor } = device\n            // microbit v2\n            if (\n                vendorId === MICROBIT_V2_VENDOR_ID &&\n                productId === MICROBIT_V2_PRODUCT_ID\n            ) {\n                console.debug(`usb: found micro:bit v2`)\n                return device\n            }\n            // jacdac device\n            else if (deviceVersionMajor == HF2_DEVICE_MAJOR) {\n                for (const iface of device.configuration.interfaces) {\n                    const alt = iface.alternates[0]\n                    if (\n                        alt.interfaceClass == 0xff &&\n                        alt.interfaceSubclass == HF2_DEVICE_MAJOR\n                    ) {\n                        return device\n                    }\n                }\n            }\n        }\n\n        return undefined\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-var-requires\n    const usb = new WebUSB({\n        devicesFound,\n        allowAllDevices: true\n    })\n\n    async function requestDevice(\n        options: USBDeviceRequestOptions\n    ): Promise<USBDevice> {\n        console.debug(`usb: requesting device...`)\n        try {\n            const device = await usb.requestDevice(options)\n            return device\n        } catch (e) {\n            if (!isCancelError(e)) console.debug(e)\n            return undefined\n        }\n    }\n\n    async function getDevices(\n        options: USBDeviceRequestOptions\n    ): Promise<USBDevice[]> {\n        //const devices = await usb.getDevices()\n        //return devices\n        const dev = await requestDevice(options)\n        return dev ? [dev] : []\n    }\n\n    const connectObservable = new EventTargetObservable(usb, \"connect\")\n    const disconnectObservable = new EventTargetObservable(usb, \"disconnect\")\n\n    return {\n        getDevices,\n        requestDevice,\n        connectObservable,\n        disconnectObservable,\n    }\n}\n", "import { createProxyBridge } from \"./bridge\"\nimport { JDBus } from \"./bus\"\nimport { randomDeviceId } from \"./random\"\n\nexport function startDevTools() {\n    if (\n        typeof window !== \"undefined\" &&\n        !/^https:\\/\\/microsoft.github.io\\/jacdac-docs\\//.test(\n            window.location.href,\n        )\n    )\n        window.location.href = `https://microsoft.github.io/jacdac-docs/clients/javascript/devtools.html#${window.location.href}`\n}\n\n/**\n * Starts an external or in-page hosted developer tool window for jacdac\n * @param bus\n * @returns function to remove the devtools\n */\nexport function injectDevTools(\n    bus: JDBus,\n    options?: {\n        dashboardUrl?: string\n    },\n): () => void {\n    // check that dev tools haven't been injected already\n    if (\n        typeof window === \"undefined\" ||\n        document.getElementById(\"jacdac-dev-tools\")\n    )\n        return undefined\n\n    // inject style\n    if (!document.getElementById(\"jacdac-dev-tools-style\")) {\n        const style = document.createElement(\"style\")\n        style.id = \"jacdac-dev-tools-style\"\n        style.innerText = `\n        #jacdac-dev-tools {\n            position: fixed;\n            overflow: hide;\n            box-shadow: 4px 4px 4px 4px #ccc;\n            width: 40rem;\n            height: min(48rem, 64%);\n            background: #fff;\n            z-index: 1000000;\n            \n            transition: left 0.5s, right 0.5s, bottom 0.5s, top 0.5s, width 0.5s, height 0.5s, opacity 1s;\n            left:2rem;\n            bottom: 2rem;        \n          }\n          #jacdac-dev-tools button {\n            float: right;\n            margin-right: 0.5rem;\n          }\n          #jacdac-dev-tools.right {\n            left: calc(100% - 42rem);\n          }\n          #jacdac-dev-tools.tall {\n            height: calc(100% - 4rem);\n          }\n          #jacdac-dev-tools.shallow {\n            height: max(22rem, 30%);\n          }\n          #jacdac-dev-tools > .header {\n            font-size: 0.8rem;\n            font-family: monospace;\n            margin: 0.2rem;\n            height: 1.5rem;\n          }\n          #jacdac-dev-tools > iframe {\n            height: calc(100% - 1.5rem);\n            width: 100%;\n            border: none;\n          }    \n        `\n        document.head.appendChild(style)\n    }\n\n    const {\n        dashboardUrl = \"https://microsoft.github.io/jacdac-docs/dashboard/\",\n    } = options || {}\n    const frameid = randomDeviceId()\n\n    const container = document.createElement(\"div\")\n    container.id = \"jacdac-dev-tools\"\n    container.classList.add(\"right\")\n    const header = document.createElement(\"div\")\n    header.className = \"header\"\n    container.append(header)\n\n    const iframe = document.createElement(\"iframe\")\n    iframe.allow =\n        \"gamepad; microphone; camera; accelerometer; gyroscope; ambient-light-sensor; magnetometer\"\n    iframe.sandbox.add(\n        \"allow-forms\",\n        \"allow-downloads-without-user-activation\",\n        \"allow-downloads\",\n        \"allow-popups\",\n        \"allow-popups-to-escape-sandbox\",\n        \"allow-same-origin\",\n        \"allow-scripts\",\n    )\n    iframe.src = `${dashboardUrl}?embed=1&connect=0&transient=1#${frameid}`\n    container.append(iframe)\n    document.body.insertBefore(container, document.body.firstElementChild)\n\n    // send packets to dashboard iframe\n    const unsub = bus.addBridge(\n        createProxyBridge((data, sender) => {\n            iframe.contentWindow?.postMessage({\n                type: \"messagepacket\",\n                channel: \"jacdac\",\n                data,\n                sender,\n            })\n        }),\n    )\n    const cleanup = () => {\n        unsub?.()\n        container.remove()\n    }\n\n    const addButton = (\n        text: string,\n        onclick: (btn: HTMLButtonElement) => void,\n    ) => {\n        const btn = document.createElement(\"button\")\n        btn.innerText = text\n        btn.onclick = () => onclick(btn)\n\n        header.append(btn)\n    }\n\n    addButton(\"close\", cleanup)\n    addButton(\">>>\", () => container.classList.add(\"right\"))\n    const up = \"^\"\n    const mid = \"-\"\n    const low = \".\"\n    addButton(up, btn => {\n        if (btn.innerText === up) {\n            btn.innerText = low\n            container.classList.remove(\"shallow\")\n            container.classList.add(\"tall\")\n        } else if (btn.innerText === low) {\n            btn.innerText = mid\n            container.classList.add(\"shallow\")\n            container.classList.remove(\"tall\")\n        } else {\n            btn.innerText = up\n            container.classList.remove(\"shallow\")\n            container.classList.remove(\"tall\")\n        }\n    })\n    addButton(\"<<<\", () => container.classList.remove(\"right\"))\n    return cleanup\n}\n", "export interface Version {\n    major: number\n    minor: number\n    patch: number\n    pre: string[]\n    build: string[]\n}\n\nfunction cmp(a: Version, b: Version) {\n    if (!a)\n        if (!b) return 0\n        else return 1\n    else if (!b) return -1\n    else {\n        let d = a.major - b.major || a.minor - b.minor || a.patch - b.patch\n        if (d) return d\n        if (a.pre.length == 0 && b.pre.length > 0) return 1\n        if (a.pre.length > 0 && b.pre.length == 0) return -1\n        for (let i = 0; i < a.pre.length + 1; ++i) {\n            const aa = a.pre[i]\n            const bb = b.pre[i]\n            if (!aa)\n                if (!bb) return 0\n                else return -1\n            else if (!bb) return 1\n            else if (/^\\d+$/.test(aa))\n                if (/^\\d+$/.test(bb)) {\n                    d = parseInt(aa) - parseInt(bb)\n                    if (d) return d\n                } else return -1\n            else if (/^\\d+$/.test(bb)) return 1\n            else {\n                d = strcmp(aa, bb)\n                if (d) return d\n            }\n        }\n        return 0\n    }\n}\n\nexport function versionTryParse(v: string): Version {\n    if (!v) return null\n    if (\"*\" === v) {\n        return {\n            major: Number.MAX_SAFE_INTEGER,\n            minor: Number.MAX_SAFE_INTEGER,\n            patch: Number.MAX_SAFE_INTEGER,\n            pre: [],\n            build: [],\n        }\n    }\n    if (/^v\\d/i.test(v)) v = v.slice(1)\n    const m =\n        /^(\\d+)\\.(\\d+)\\.(\\d+)(-([0-9a-zA-Z\\-\\.]+))?(\\+([0-9a-zA-Z\\-\\.]+))?$/.exec(\n            v,\n        )\n    if (m)\n        return {\n            major: parseInt(m[1]),\n            minor: parseInt(m[2]),\n            patch: parseInt(m[3]),\n            pre: m[5] ? m[5].split(\".\") : [],\n            build: m[7] ? m[7].split(\".\") : [],\n        }\n    return null\n}\n\nfunction strcmp(a: string, b: string) {\n    if (a === b) return 0\n    if (a < b) return -1\n    else return 1\n}\n\nexport function semverCmp(a: string, b: string) {\n    const aa = versionTryParse(a)\n    const bb = versionTryParse(b)\n    if (!aa && !bb) return strcmp(a, b)\n    else return cmp(aa, bb)\n}\n", "import { JDBus } from \"../jdom/bus\"\nimport { JDClient } from \"../jdom/client\"\nimport { GamepadVariant } from \"../jdom/constants\"\nimport { JDServerServiceProvider } from \"../jdom/servers/serverserviceprovider\"\nimport { GamepadServer, GAMEPAD_ARCADE_BUTTONS } from \"./gamepadserver\"\n\nexport class GamepadHostManager extends JDClient {\n    private providers: {\n        deviceProvider: JDServerServiceProvider\n        service: GamepadServer\n        timestamp: number\n    }[] = []\n    private ticking = false\n\n    static start(bus: JDBus) {\n        if (\n            typeof window !== \"undefined\" &&\n            window.navigator &&\n            window.navigator.getGamepads\n        ) {\n            return new GamepadHostManager(bus)\n        }\n        return undefined\n    }\n\n    constructor(readonly bus: JDBus) {\n        super()\n        this.handleGamepadConnected = this.handleGamepadConnected.bind(this)\n        this.handleGamepadDisconnected =\n            this.handleGamepadDisconnected.bind(this)\n\n        this.mount(this.removeEventListener.bind(this))\n        this.addEventListeners()\n    }\n\n    private addEventListeners() {\n        if (typeof window === \"undefined\") return\n\n        window.addEventListener(\n            \"gamepadconnected\",\n            this.handleGamepadConnected,\n            false,\n        )\n        window.addEventListener(\n            \"gamepaddisconnected\",\n            this.handleGamepadDisconnected,\n            false,\n        )\n    }\n\n    private removeEventListener() {\n        if (typeof window === \"undefined\") return\n\n        window.removeEventListener(\n            \"gamepadconnected\",\n            this.handleGamepadConnected,\n        )\n        window.removeEventListener(\n            \"gamepaddisconnected\",\n            this.handleGamepadDisconnected,\n        )\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    private handleGamepadConnected(event: GamepadEvent) {\n        console.debug(\"gamepad connected\")\n        if (!this.ticking) this.tick()\n    }\n\n    private handleGamepadDisconnected(event: GamepadEvent) {\n        console.debug(\"gamepad disconnected\")\n        const { gamepad } = event\n        const { index } = gamepad\n        const provider = this.providers[index]\n        if (provider) {\n            this.bus.removeServiceProvider(provider.deviceProvider)\n            this.providers[index] = undefined\n        }\n        if (!this.ticking) this.tick()\n    }\n\n    private pollGamepads() {\n        try {\n            const r = navigator.getGamepads()\n            return r\n        } catch (e) {\n            return undefined\n        }\n    }\n\n    private update() {\n        const gamepads = this.pollGamepads()\n\n        const now = this.bus.timestamp\n        for (let i = 0; i < gamepads?.length; ++i) {\n            const gamepad = gamepads[i]\n            if (!gamepad) continue\n            // allocated host if needed\n            let host = this.providers[i]\n            if (!host) {\n                const service = new GamepadServer({\n                    variant: GamepadVariant.Gamepad,\n                    buttonsAvailable: GAMEPAD_ARCADE_BUTTONS,\n                })\n                const deviceHost = new JDServerServiceProvider(\"gamepad\", [\n                    service,\n                ])\n                this.bus.addServiceProvider(deviceHost)\n                this.providers[i] = host = {\n                    service,\n                    deviceProvider: deviceHost,\n                    timestamp: now,\n                }\n            }\n            // update state\n            host.timestamp = now\n            host.service.update(gamepad)\n        }\n    }\n\n    private tick() {\n        this.ticking = true\n        this.update()\n        if (this.providers.some(h => h !== undefined))\n            window.requestAnimationFrame(() => this.tick())\n        else this.ticking = false\n    }\n}\n", "import {\n    LoggerCmd,\n    LoggerPriority,\n    LoggerReg,\n    SRV_LOGGER,\n} from \"../jdom/constants\"\nimport { Packet } from \"../jdom/packet\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\n\nexport class LoggerServer extends JDServiceServer {\n    readonly minPriority: JDRegisterServer<[LoggerPriority]>\n\n    constructor() {\n        super(SRV_LOGGER)\n\n        this.minPriority = this.addRegister(LoggerReg.MinPriority, [\n            LoggerPriority.Silent,\n        ])\n    }\n\n    async report(priority: LoggerCmd, msg: string) {\n        const pkt = Packet.jdpacked<[string]>(priority, \"s\", [msg])\n        await this.sendPacketAsync(pkt)\n    }\n}\n", "import {\n    CHANGE,\n    SRV_VERIFIED_TELEMETRY,\n    VerifiedTelemetryCmd,\n    VerifiedTelemetryEvent,\n    VerifiedTelemetryFingerprintType,\n    VerifiedTelemetryReg,\n    VerifiedTelemetryStatus,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer, JDServerOptions } from \"../jdom/servers/serviceserver\"\n\nexport class VerifiedTelemetryServer extends JDServiceServer {\n    readonly telemetryStatus: JDRegisterServer<[VerifiedTelemetryStatus]>\n    readonly telemetryStatusInterval: JDRegisterServer<[number]>\n    readonly fingerprintType: JDRegisterServer<\n        [VerifiedTelemetryFingerprintType]\n    >\n    readonly fingerprintTemplate: JDRegisterServer<[number, Uint8Array]>\n\n    constructor(\n        options?: {\n            fingerprintType?: VerifiedTelemetryFingerprintType\n            telemetryStatusInterval?: number\n        } & JDServerOptions,\n    ) {\n        super(SRV_VERIFIED_TELEMETRY, options)\n\n        const {\n            fingerprintType = VerifiedTelemetryFingerprintType.FallCurve,\n            telemetryStatusInterval = 5000,\n        } = options || {}\n\n        this.telemetryStatus = this.addRegister(\n            VerifiedTelemetryReg.TelemetryStatus,\n            [VerifiedTelemetryStatus.Working],\n        )\n        this.telemetryStatusInterval = this.addRegister(\n            VerifiedTelemetryReg.TelemetryStatusInterval,\n            [telemetryStatusInterval],\n        )\n        this.fingerprintType = this.addRegister<\n            [VerifiedTelemetryFingerprintType]\n        >(VerifiedTelemetryReg.FingerprintType, [fingerprintType])\n\n        this.fingerprintTemplate = this.addRegister(\n            VerifiedTelemetryReg.FingerprintTemplate,\n            [50, new Uint8Array(0)],\n        )\n        this.addCommand(\n            VerifiedTelemetryCmd.ResetFingerprintTemplate,\n            this.handleResetTelemetryTemplate.bind(this),\n        )\n        this.addCommand(\n            VerifiedTelemetryCmd.RetrainFingerprintTemplate,\n            this.handleRetrainTelemetryTemplate.bind(this),\n        )\n\n        // events\n        this.telemetryStatus.on(CHANGE, () =>\n            this.sendEvent(\n                VerifiedTelemetryEvent.TelemetryStatusChange,\n                this.telemetryStatus.data,\n            ),\n        )\n        this.fingerprintTemplate.on(CHANGE, () =>\n            this.sendEvent(VerifiedTelemetryEvent.FingerprintTemplateChange),\n        )\n    }\n\n    private handleResetTelemetryTemplate() {\n        this.fingerprintTemplate.setValues([50, new Uint8Array(0)])\n    }\n\n    private handleRetrainTelemetryTemplate() {\n        this.fingerprintTemplate.setValues([50, new Uint8Array(0)])\n    }\n}\n", "import { fnv1 } from \"../jdom/utils\"\nimport {\n    CHANGE,\n    DeviceScriptManagerCmd,\n    DeviceScriptManagerEvent,\n    DeviceScriptManagerReg,\n    SRV_DEVICE_SCRIPT_MANAGER,\n} from \"../jdom/constants\"\nimport { JDRegisterServer } from \"../jdom/servers/registerserver\"\nimport { JDServiceServer } from \"../jdom/servers/serviceserver\"\nimport { OutPipe } from \"../jdom/pipes\"\nimport { Packet } from \"../jdom/packet\"\n\nexport class DeviceScriptManagerServer extends JDServiceServer {\n    readonly running: JDRegisterServer<[boolean]>\n    readonly autoStart: JDRegisterServer<[boolean]>\n    readonly programSize: JDRegisterServer<[number]>\n    readonly programHash: JDRegisterServer<[number]>\n\n    private _binary: Uint8Array = new Uint8Array(0)\n    private _debugInfo: unknown\n\n    static PROGRAM_CHANGE = \"programChange\"\n\n    constructor() {\n        super(SRV_DEVICE_SCRIPT_MANAGER)\n\n        this.running = this.addRegister(DeviceScriptManagerReg.Running, [false])\n        this.autoStart = this.addRegister(DeviceScriptManagerReg.Autostart, [\n            true,\n        ])\n        this.programSize = this.addRegister(\n            DeviceScriptManagerReg.ProgramSize,\n            [this._binary.length],\n        )\n        this.programHash = this.addRegister(\n            DeviceScriptManagerReg.ProgramHash,\n            [fnv1(this._binary)],\n        )\n\n        this.addCommand(\n            DeviceScriptManagerCmd.DeployBytecode,\n            this.handleDeployBytecode.bind(this),\n        )\n        this.addCommand(\n            DeviceScriptManagerCmd.ReadBytecode,\n            this.handleReadBytecode.bind(this),\n        )\n    }\n\n    get binary() {\n        return this._binary\n    }\n\n    get debugInfo() {\n        return this._debugInfo\n    }\n\n    setBytecode(binary: Uint8Array, debugInfo: unknown) {\n        binary = binary || new Uint8Array(0)\n        const [hash] = this.programHash.values()\n        const valueHash = fnv1(binary)\n\n        if (hash !== valueHash) {\n            this._binary = binary\n            this._debugInfo = debugInfo\n            this.programSize.setValues([binary.length])\n            this.programHash.setValues([valueHash])\n            this.emit(DeviceScriptManagerServer.PROGRAM_CHANGE)\n            this.emit(CHANGE)\n            this.sendEvent(DeviceScriptManagerEvent.ProgramChange)\n        }\n    }\n\n    private handleDeployBytecode(pkt: Packet) {\n        console.debug(`devicescript server: deploy`, { pkt })\n    }\n\n    private async handleReadBytecode(pkt: Packet) {\n        const pipe = OutPipe.from(this.device.bus, pkt, true)\n        await pipe.sendBytes(this._binary)\n        await pipe.close()\n    }\n}\n"],
  "mappings": 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Q,qBAAqB,KAAa;AACtC,YAAQ,MAAM,+BAA+B,EAAE,IAAI,CAAC;AAAA,EACxD;AAAA,EAEA,MAAc,mBAAmB,KAAa;AAC1C,UAAM,OAAO,QAAQ,KAAK,KAAK,OAAO,KAAK,KAAK,IAAI;AACpD,UAAM,KAAK,UAAU,KAAK,OAAO;AACjC,UAAM,KAAK,MAAM;AAAA,EACrB;AACJ;AAtEO,IAAM,4BAAN;AAAM,0BASF,iBAAiB;",
  "names": ["SystemReadingThreshold", "SystemStatusCodes", "SystemCmd", "SystemCmdPack", "SystemReg", "SystemRegPack", "SystemEvent", "SystemEventPack", "BaseCmd", "BaseCmdPack", "BaseReg", "BaseRegPack", "BaseEvent", "BaseEventPack", "SensorReg", "SensorRegPack", "AccelerometerReg", "AccelerometerRegPack", "AccelerometerEvent", "AcidityReg", "AcidityRegPack", "AirPressureReg", "AirPressureRegPack", "AirQualityIndexReg", "AirQualityIndexRegPack", "ArcadeGamepadButton", "ArcadeGamepadReg", "ArcadeGamepadRegPack", "ArcadeGamepadEvent", "ArcadeGamepadEventPack", "ArcadeSoundCmd", "ArcadeSoundCmdPack", "ArcadeSoundReg", "ArcadeSoundRegPack", "BarcodeReaderFormat", "BarcodeReaderReg", "BarcodeReaderRegPack", "BarcodeReaderEvent", "BarcodeReaderEventPack", "BitRadioReg", "BitRadioRegPack", "BitRadioCmd", "BitRadioCmdPack", "BootloaderError", "BootloaderCmd", "BootloaderCmdPack", "BrailleDisplayReg", "BrailleDisplayRegPack", "BridgeReg", "BridgeRegPack", "ButtonReg", "ButtonRegPack", "ButtonEvent", "ButtonEventPack", "BuzzerReg", "BuzzerRegPack", "BuzzerCmd", "BuzzerCmdPack", "CapacitiveButtonReg", "CapacitiveButtonRegPack", "CapacitiveButtonCmd", "CharacterScreenVariant", "CharacterScreenTextDirection", "CharacterScreenReg", "CharacterScreenRegPack", "CloudAdapterCmd", "CloudAdapterCmdPack", "CloudAdapterReg", "CloudAdapterRegPack", "CloudAdapterEvent", "CloudAdapterEventPack", "CloudConfigurationConnectionStatus", "CloudConfigurationReg", "CloudConfigurationRegPack", "CloudConfigurationCmd", "CloudConfigurationCmdPack", "CloudConfigurationEvent", "CloudConfigurationEventPack", "CodalMessageBusCmd", "CodalMessageBusCmdPack", "CodalMessageBusEvent", "CodalMessageBusEventPack", "ColorReg", "ColorRegPack", "CompassReg", "CompassRegPack", "CompassCmd", "ControlAnnounceFlags", "ControlCmd", "ControlCmdPack", "ControlPipe", "ControlPipePack", "ControlReg", "ControlRegPack", "DcCurrentMeasurementReg", "DcCurrentMeasurementRegPack", "DcVoltageMeasurementVoltageMeasurementType", "DcVoltageMeasurementReg", "DcVoltageMeasurementRegPack", "DeviceScriptConditionCmd", "DeviceScriptConditionEvent", "DevsDbgValueTag", "DevsDbgValueSpecial", "DevsDbgFunIdx", "DevsDbgFiberHandle", "DevsDbgProgramCounter", "DevsDbgObjStackFrame", "DevsDbgString", "DevsDbgStepFlags", "DevsDbgSuspensionType", "DevsDbgCmd", "DevsDbgCmdPack", "DevsDbgPipe", "DevsDbgPipePack", "DevsDbgReg", "DevsDbgRegPack", "DevsDbgEvent", "DevsDbgEventPack", "DeviceScriptManagerCmd", "DeviceScriptManagerCmdPack", "DeviceScriptManagerPipe", "DeviceScriptManagerPipePack", "DeviceScriptManagerReg", "DeviceScriptManagerRegPack", "DeviceScriptManagerEvent", "DeviceScriptManagerEventPack", "DistanceVariant", "DistanceReg", "DistanceRegPack", "DmxReg", "DmxRegPack", "DmxCmd", "DmxCmdPack", "DotMatrixVariant", "DotMatrixReg", "DotMatrixRegPack", "DualMotorsReg", "DualMotorsRegPack", "ECO2Variant", "ECO2Reg", "ECO2RegPack", "FlexReg", "FlexRegPack", "GamepadButtons", "GamepadVariant", "GamepadReg", "GamepadRegPack", "GamepadEvent", "GamepadEventPack", "GPIOMode", "GPIOCapabilities", "GPIOReg", "GPIORegPack", "GPIOCmd", "GPIOCmdPack", "GyroscopeReg", "GyroscopeRegPack", "HeartRateVariant", "HeartRateReg", "HeartRateRegPack", "HidJoystickReg", "HidJoystickRegPack", "HidJoystickCmd", "HidJoystickCmdPack", "HidKeyboardSelector", "HidKeyboardModifiers", "HidKeyboardAction", "HidKeyboardCmd", "HidKeyboardCmdPack", "HidMouseButton", "HidMouseButtonEvent", "HidMouseCmd", "HidMouseCmdPack", "HumidityReg", "HumidityRegPack", "I2CStatus", "I2CReg", "I2CRegPack", "I2CCmd", "I2CCmdPack", "IlluminanceReg", "IlluminanceRegPack", "IndexedScreenCmd", "IndexedScreenCmdPack", "IndexedScreenReg", "IndexedScreenRegPack", "KeyboardClientEvent", "KeyboardClientEventPack", "LedVariant", "LedReg", "LedRegPack", "LedSingleVariant", "LedSingleCmd", "LedSingleCmdPack", "LedSingleReg", "LedSingleRegPack", "LedStripLightType", "LedStripVariant", "LedStripReg", "LedStripRegPack", "LedStripCmd", "LedStripCmdPack", "LightBulbReg", "LightBulbRegPack", "LightLevelVariant", "LightLevelReg", "LightLevelRegPack", "LoggerPriority", "LoggerReg", "LoggerRegPack", "LoggerCmd", "LoggerCmdPack", "MagneticFieldLevelVariant", "MagneticFieldLevelReg", "MagneticFieldLevelRegPack", "MagneticFieldLevelEvent", "MagnetometerReg", "MagnetometerRegPack", "MagnetometerCmd", "MatrixKeypadVariant", "MatrixKeypadReg", "MatrixKeypadRegPack", "MatrixKeypadEvent", "MatrixKeypadEventPack", "MicrophoneCmd", "MicrophoneCmdPack", "MicrophoneReg", "MicrophoneRegPack", "MidiOutputReg", "MidiOutputRegPack", "MidiOutputCmd", "MidiOutputCmdPack", "ModelRunnerModelFormat", "ModelRunnerCmd", "ModelRunnerCmdPack", "ModelRunnerReg", "ModelRunnerRegPack", "MotionVariant", "MotionReg", "MotionRegPack", "MotionEvent", "MotorReg", "MotorRegPack", "MultitouchReg", "MultitouchRegPack", "MultitouchEvent", "MultitouchEventPack", "PCControllerCmd", "PCControllerCmdPack", "PCMonitorReg", "PCMonitorRegPack", "PlanarPositionVariant", "PlanarPositionReg", "PlanarPositionRegPack", "PotentiometerVariant", "PotentiometerReg", "PotentiometerRegPack", "PowerPowerStatus", "PowerReg", "PowerRegPack", "PowerCmd", "PowerEvent", "PowerEventPack", "PowerSupplyReg", "PowerSupplyRegPack", "PressureButtonReg", "PressureButtonRegPack", "ProtoTestReg", "ProtoTestRegPack", "ProtoTestEvent", "ProtoTestEventPack", "ProtoTestCmd", "ProtoTestCmdPack", "ProtoTestPipe", "ProtoTestPipePack", "PulseOximeterReg", "PulseOximeterRegPack", "RainGaugeReg", "RainGaugeRegPack", "RealTimeClockVariant", "RealTimeClockReg", "RealTimeClockRegPack", "RealTimeClockCmd", "RealTimeClockCmdPack", "ReflectedLightVariant", "ReflectedLightReg", "ReflectedLightRegPack", "RelayVariant", "RelayReg", "RelayRegPack", "RngVariant", "RngReg", "RngRegPack", "RoleManagerReg", "RoleManagerRegPack", "RoleManagerCmd", "RoleManagerCmdPack", "RoleManagerPipe", "RoleManagerPipePack", "RoleManagerEvent", "RosCmd", "RosCmdPack", "RotaryEncoderReg", "RotaryEncoderRegPack", "RoverReg", "RoverRegPack", "SatNavReg", "SatNavRegPack", "SatNavEvent", "SensorAggregatorSampleType", "SensorAggregatorReg", "SensorAggregatorRegPack", "SerialParityType", "SerialReg", "SerialRegPack", "SerialCmd", "SerialCmdPack", "ServoReg", "ServoRegPack", "SettingsCmd", "SettingsCmdPack", "SettingsPipe", "SettingsPipePack", "SettingsEvent", "SevenSegmentDisplayReg", "SevenSegmentDisplayRegPack", "SevenSegmentDisplayCmd", "SevenSegmentDisplayCmdPack", "SoilMoistureVariant", "SoilMoistureReg", "SoilMoistureRegPack", "SolenoidVariant", "SolenoidReg", "SolenoidRegPack", "SoundLevelReg", "SoundLevelRegPack", "SoundLevelEvent", "SoundPlayerReg", "SoundPlayerRegPack", "SoundPlayerCmd", "SoundPlayerCmdPack", "SoundPlayerPipe", "SoundPlayerPipePack", "SoundRecorderWithPlaybackStatus", "SoundRecorderWithPlaybackCmd", "SoundRecorderWithPlaybackCmdPack", "SoundRecorderWithPlaybackReg", "SoundRecorderWithPlaybackRegPack", "SoundSpectrumReg", "SoundSpectrumRegPack", "SpeechSynthesisReg", "SpeechSynthesisRegPack", "SpeechSynthesisCmd", "SpeechSynthesisCmdPack", "SwitchVariant", "SwitchReg", "SwitchRegPack", "SwitchEvent", "TcpTcpError", "TcpCmd", "TcpCmdPack", "TcpPipeCmd", "TcpPipeCmdPack", "TcpPipe", "TcpPipePack", "TemperatureVariant", "TemperatureReg", "TemperatureRegPack", "TimeseriesAggregatorCmd", "TimeseriesAggregatorCmdPack", "TimeseriesAggregatorReg", "TimeseriesAggregatorRegPack", "TrafficLightReg", "TrafficLightRegPack", "TvocReg", "TvocRegPack", "UsbBridgeQByte", "UsbBridgeCmd", "UvIndexVariant", "UvIndexReg", "UvIndexRegPack", "VerifiedTelemetryStatus", "VerifiedTelemetryFingerprintType", "VerifiedTelemetryReg", "VerifiedTelemetryRegPack", "VerifiedTelemetryCmd", "VerifiedTelemetryEvent", "VerifiedTelemetryEventPack", "VibrationMotorCmd", "VibrationMotorCmdPack", "VibrationMotorReg", "VibrationMotorRegPack", "WaterLevelVariant", "WaterLevelReg", "WaterLevelRegPack", "WeightScaleVariant", "WeightScaleReg", "WeightScaleRegPack", "WeightScaleCmd", "WeightScaleCmdPack", "WifiAPFlags", "WifiCmd", "WifiCmdPack", "WifiPipe", "WifiPipePack", "WifiReg", "WifiRegPack", "WifiEvent", "WifiEventPack", "WindDirectionReg", "WindDirectionRegPack", "WindSpeedReg", "WindSpeedRegPack", "WsskStreamingType", "WsskDataType", "WsskCmd", "WsskCmdPack", "serviceClass", "r", "range", "unique", "packed", "isSet", "warn", "looksRandom", "clone", "m", "en", "isReading", "pick", "values", "crc", "rgb", "toHex", "delay", "values", "ellipse", "toHex", "NumberFormat", "isRegister", "toHex", "RegisterType", "prettyUnit", "toHex", "values", "isSet", "isRegister", "serviceClass", "timestamp", "toHex", "pkt", "toHex", "eventName", "listener", "isRegister", "values", "serviceClass", "values", "isRegister", "serviceClass", "values", "ConnectionState", "timestamp", "timestamp", "crc", "toHex", "n", "values", "values", "serviceClass", "values", "minAngle", "maxAngle", "payload", "toHex", "toHex", "timestamp", "values", "network", "SCALE0", "timestamp", "toHex", "value", "values", "serviceClass", "serviceClass", "toHex", "delay", "spec", "serviceClass", "BusInteractionMode", "timestamp", "toHex", "r", "d", "r", "i", "field", "value", "name", "prettyName", "isRegister", "values", "toHex", "packFormat", "pkt", "isRegister", "values", "packFormat", "serviceClass", "timestamp", "isRegister", "log", "serviceClass", "filter", "hash", "toHex", "crc", "toHex", "words", "toHex", "type", "defaultOptions", "serviceClass", "r", "r", "srv", "debug", "strcmp", "hash"]
}
