adi_spo2_watch.core.packets package

Submodules

adi_spo2_watch.core.packets.ad7156_packets module

class adi_spo2_watch.core.packets.ad7156_packets.AD7156DCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.ad7156_packets.AD7156DCBPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.AD7156: ['0xC8', '0x0B']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 92,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 7,
        'data': [
            [ '0x9', '0x19' ],
            [ '0xA', '0x66' ],
        ]
    }
}
class adi_spo2_watch.core.packets.ad7156_packets.AD7156RegisterReadPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.AD7156: ['0xC8', '0x0B']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 23,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.REGISTER_READ_RES: ['0x22']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 3,
        'data': [
            [ '0x10', '0x40' ],
            [ '0x11', '0xC0' ],
            [ '0x12', '0xC0' ]
        ]
    }
}
class adi_spo2_watch.core.packets.ad7156_packets.AD7156RegisterWritePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.AD7156: ['0xC8', '0x0B']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 15,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.REGISTER_WRITE_RES: ['0x24']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 1,
        'data': [
            [ '0x10', '0x11' ]
        ]
    }
}

adi_spo2_watch.core.packets.adp5360_packets module

class adi_spo2_watch.core.packets.adp5360_packets.ADP5360DCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.adp5360_packets.ADP5360DCBPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 32,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 5,
        'data': [
            [ '0x0', '0x1B58' ],
            [ '0x1', '0x1388' ],
            [ '0x2', '0x564' ],
            [ '0x3', '0x53C' ],
            [ '0x4', '0x3' ]
        ]
    }
}
class adi_spo2_watch.core.packets.adp5360_packets.ADP5360RegisterReadPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 15,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.REGISTER_READ_RES: ['0x22']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 1,
        'data': [
            [ '0x0', '0x10' ]
        ]
    }
}
class adi_spo2_watch.core.packets.adp5360_packets.ADP5360RegisterWritePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 15,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.REGISTER_WRITE_RES: ['0x24']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 1,
        'data': [
            [ '0x0', '0x10' ]
        ]
    }
}
class adi_spo2_watch.core.packets.adp5360_packets.BatteryInfoPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x12',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.GET_BAT_INFO_RES: ['0x45']>,
        'status': <PMStatus.OK: ['0x41']>,
        'timestamp': 668880834,
        'battery_status': <BatteryStatus.COMPLETE: ['0x03']>,
        'adp5360_battery_level': 100,
        'custom_battery_level': 100,
        'battery_mv': 4334
    }
}
class adi_spo2_watch.core.packets.adp5360_packets.BatteryThresholdPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xA',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.SET_BAT_THR_RES: ['0x47']>,
        'status': <PMStatus.OK: ['0x41']>
    }
}

adi_spo2_watch.core.packets.bia_packets module

class adi_spo2_watch.core.packets.bia_packets.BIADCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.bia_packets.BIADCBDCFGPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.bia_packets.BIADCBLCFGPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.bia_packets.BIADCFGPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 23,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.REGISTER_READ_RES: ['0x22']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 3,
        'data': [
            [ '0x0', '0x1' ],
            [ '0x1', '0x2' ],
            [ '0x2', '0x3' ]
        ]
    }
}
class adi_spo2_watch.core.packets.bia_packets.BIADFTPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.BIA: ['0xC3', '0x07']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 12,
        'checksum': 0
    },
    'payload': {
        'command': <BIACommand.SET_DFT_NUM_RES: ['0x47']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'dft_window': <BIADFTWindow.DFT_WINDOW_16384: ['0x00', '0x12']>
    }
}
class adi_spo2_watch.core.packets.bia_packets.BIALibraryConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.BIA: ['0xC3', '0x07']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 16,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 1,
        'data': [
            [ '0x0', '0x0' ]
        ]
    }
}
class adi_spo2_watch.core.packets.bia_packets.DCBTimingInfoPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.bia_packets.FDSStatusPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.bia_packets.HSRTIAPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.BIA: ['0xC3', '0x07']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <BIACommand.SET_HS_TRANS_IMPEDANCE_AMPLIFIER_CAL_RES: ['0x49']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'hs_resistor_tia': <HSResistorTIA.RESISTOR_1K: ['0x00', '0x01']>
    }
}

adi_spo2_watch.core.packets.command_packet module

class adi_spo2_watch.core.packets.command_packet.CommandPacket(destination=None, command=None)

Bases: object

Packet Structure:

{
    'header': {
        'source': <Application.BIA: ['0xC3', '0x07']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <BIACommand.SET_HS_TRANS_IMPEDANCE_AMPLIFIER_CAL_RES: ['0x49']>,
        'status': <CommonStatus.OK: ['0x00']>,
    }
}
static decode(data, config, start_index)
decode_packet(data)
get_dict(last_timestamp=None)
get_header(key)
get_id()
get_payload(key)
set_header(key, value)
set_payload(key, value)
to_list()

adi_spo2_watch.core.packets.common_packets module

class adi_spo2_watch.core.packets.common_packets.AlarmPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.common_packets.DecimationFactorPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.ADPD: ['0xC1', '0x10']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xD',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.GET_STREAM_DEC_FACTOR_RES: ['0x2A']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'stream_address': <Stream.ADPD6: ['0xC2', '0x16']>,
        'decimation_factor': 1
    }
}
class adi_spo2_watch.core.packets.common_packets.StreamPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.ADXL: ['0xC1', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.SUBSCRIBE_STREAM_RES: ['0x0D']>,
        'status': <CommonStatus.SUBSCRIBER_ADDED: ['0x09']>,
        'stream_address': <Stream.ADXL: ['0xC2', '0x02']>
    }
}
class adi_spo2_watch.core.packets.common_packets.StreamStatusPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.ADXL: ['0xC1', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xE',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.GET_SENSOR_STATUS_RES: ['0x11']>,
        'status': <CommonStatus.STREAM_STOPPED: ['0x03']>,
        'stream_address': <Stream.ADXL: ['0xC2', '0x02']>,
        'num_subscribers': 0,
        'num_start_registered': 0
    }
}
class adi_spo2_watch.core.packets.common_packets.VersionPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.ADPD: ['0xC1', '0x10']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x42',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.GET_VERSION_RES: ['0x01']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'major_version': 0,
        'minor_version': 3,
        'patch_version': 1,
        'version_string': 'ADPD_App',
        'build_version': 'TEST ADPD4000_VERSION STRING'
    }
}

adi_spo2_watch.core.packets.display_packets module

class adi_spo2_watch.core.packets.display_packets.EnableDisplayPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.DISPLAY: ['0xC5', '0x03']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xB',
        'checksum': '0x0'
    },
    'payload': {
        'command': <DisplayCommand.BACKLIGHT_CONTROL_RES: ['0x45']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'enabled': False
    }
}
class adi_spo2_watch.core.packets.display_packets.SetDisplayPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.DISPLAY: ['0xC5', '0x03']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xB',
        'checksum': '0x0'
    },
    'payload': {
        'command': <DisplayCommand.BACKLIGHT_CONTROL_RES: ['0x45']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'enabled': False
    }
}

adi_spo2_watch.core.packets.ecg_packets module

class adi_spo2_watch.core.packets.ecg_packets.ECGDCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.ecg_packets.ECGDCBPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.ECG: ['0xC3', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 28,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.ERROR_NO_DCB: ['0x98']>,
        'size': 0,
        'data': [ ]
    }
}
class adi_spo2_watch.core.packets.ecg_packets.ECGLibraryConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.ECG: ['0xC3', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 17,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 2,
        'data': [
            [ '0x0', '0x0' ],
            [ '0x1', '0x0' ]
        ]
    }
}

adi_spo2_watch.core.packets.eda_packets module

class adi_spo2_watch.core.packets.eda_packets.DynamicScalingPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x11',
        'checksum': '0x0'
    },
    'payload': {
        'command': <EDACommand.DYNAMIC_SCALE_RES: ['0x43']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'enabled': True,
        'min_scale': <ScaleResistor.SCALE_RESISTOR_100K: ['0x14', '0x00']>,
        'max_scale': <ScaleResistor.SCALE_RESISTOR_128K: ['0x16', '0x00']>,
        'lp_resistor_tia': <ScaleResistor.SCALE_RESISTOR_100K: ['0x14', '0x00']>
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDABaselineImpedancePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 30,
        'checksum': 0
    },
    'payload': {
        'command': <EDACommand.BASELINE_IMP_SET_RES: ['0x4D']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'real_dft16': 25000.5,
        'imaginary_dft16': 25000.5,
        'real_dft8': 25000.5,
        'imaginary_dft8': 25000.5,
        'resistor_baseline': 19900
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDADCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDADCBDCFGPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDADCBLCFGPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDADCFGPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 23,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.REGISTER_READ_RES: ['0x22']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 3,
        'data': [
            [ '0x0', '0x1' ],
            [ '0x1', '0x2' ],
            [ '0x2', '0x3' ]
        ]
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDADFTPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 11,
        'checksum': 0
    },
    'payload': {
        'command': <EDACommand.SET_DFT_NUM_RES: ['0x47']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'dft_window': <EDADFTWindow.DFT_WINDOW_8: ['0x01']>
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDAGetBaselineImpedancePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 30,
        'checksum': 0
    },
    'payload': {
        'command': <EDACommand.BASELINE_IMP_SET_RES: ['0x4D']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'real_dft16': 25000.5,
        'imaginary_dft16': 25000.5,
        'real_dft8': 25000.5,
        'imaginary_dft8': 25000.5,
        'resistor_baseline': 19900
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDALibraryConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 21,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 2,
        'data': [
            [ '0x1', '0x0' ],
            [ '0x0', '0x0' ]
        ]
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDARegisterReadPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 23,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.REGISTER_READ_RES: ['0x22']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 3,
        'data': [
            [ '0x0', '0x1' ],
            [ '0x1', '0x2' ],
            [ '0x2', '0x3' ]
        ]
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDARegisterWritePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 23,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.REGISTER_READ_RES: ['0x22']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 3,
        'data': [
            [ '0x0', '0x1' ],
            [ '0x1', '0x2' ],
            [ '0x2', '0x3' ]
        ]
    }
}
class adi_spo2_watch.core.packets.eda_packets.EDASleepWakeupPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
    }
}
class adi_spo2_watch.core.packets.eda_packets.ResistorTIACalibratePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x2A',
        'checksum': '0x0'
    },
    'payload': {
        'command': <EDACommand.RESISTOR_TIA_CAL_RES: ['0x4B']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'min_scale': <ScaleResistor.SCALE_RESISTOR_100K: ['0x14', '0x00']>,
        'max_scale': <ScaleResistor.SCALE_RESISTOR_128K: ['0x16', '0x00']>,
        'lp_resistor_tia': <ScaleResistor.SCALE_RESISTOR_100K: ['0x14', '0x00']>,
        'calibrated_values_count': 3,
        'calibrated_values': [
            [ 106299, 100000 ],
            [ 127514, 120000 ],
            [ 136008, 128000 ]
        ]
    }
}

adi_spo2_watch.core.packets.fs_packets module

class adi_spo2_watch.core.packets.fs_packets.BadBlockPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xE',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.GET_BAD_BLOCKS_RES: ['0x7F']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'bad_blocks': 0
    }
}
class adi_spo2_watch.core.packets.fs_packets.ConfigFilePacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.fs_packets.DebugInfoPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x2A',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.GET_DEBUG_INFO_RES: ['0x89']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'head_pointer': 374,
        'tail_pointer': 4,
        'usb_avg_tx_time': 0,
        'usb_avg_port_write_time': 0,
        'page_read_time': 0,
        'page_write_time': 1
    }
}
class adi_spo2_watch.core.packets.fs_packets.FSStreamStatusPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xD',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.GET_STREAM_SUB_STATUS_RES: ['0x53']>,
        'status': <FSStatus.OK: ['0x41']>,
        'stream_address': <Stream.ADXL: ['0xC2', '0x02']>,
        'sub_state': 0
    }
}
class adi_spo2_watch.core.packets.fs_packets.FileCountPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.GET_NUMBER_OF_FILE_RES: ['0x71']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'file_count': 2
    }
}
class adi_spo2_watch.core.packets.fs_packets.FileInfoRequestPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x26',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.GET_FILE_INFO_RES: ['0x8D']>,
        'status': <FSStatus.OK: ['0x41']>,
    }
}
class adi_spo2_watch.core.packets.fs_packets.FileInfoResponsePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x26',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.GET_FILE_INFO_RES: ['0x8D']>,
        'status': <FSStatus.OK: ['0x41']>,
        'filename': '03123EBD.LOG',
        'start_page': 375,
        'end_page': 375,
        'file_size': 426
    }
}
class adi_spo2_watch.core.packets.fs_packets.KeyValuePairPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.fs_packets.KeyValuePairResponsePacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.fs_packets.LSRequestPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x37',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.LS_RES: ['0x49']>,
        'status': <FSStatus.OK: ['0x41']>,
    }
}
class adi_spo2_watch.core.packets.fs_packets.LSResponsePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x37',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.LS_RES: ['0x49']>,
        'status': <FSStatus.OK: ['0x41']>,
        'filename': '03043B06.LOG',
        'filetype': <FileType.DATA_FILE: ['0x01']>,
        'file_size': 160309
    }
}
class adi_spo2_watch.core.packets.fs_packets.LoggingPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xA',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.START_LOGGING_RES: ['0x77']>,
        'status': <FSStatus.OK: ['0x41']>
    }
}
class adi_spo2_watch.core.packets.fs_packets.PageInfoRequestPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x7A',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.PAGE_READ_TEST_RES: ['0x8F']>,
        'status': <FSStatus.OK: ['0x41']>,
        'page_num': 300,
        'num_bytes': 10
    }
}
class adi_spo2_watch.core.packets.fs_packets.PageInfoResponsePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x7A',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.PAGE_READ_TEST_RES: ['0x8F']>,
        'status': <FSStatus.OK: ['0x41']>,
        'page_num': 300,
        'ecc_zone_status': 0,
        'next_page': 301,
        'occupied': 1,
        'data_region_status': 0,
        'data': [ 4, 0, 74, 71, 104, 6, 75, 126, 4, 0 ],
        'num_bytes': 10
    }
}
get_dict(last_timestamp=None)
class adi_spo2_watch.core.packets.fs_packets.PatternWritePacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.fs_packets.StreamBleFileResponsePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x20E',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.DOWNLOAD_LOG_RES: ['0x7B']>,
        'status': <FSStatus.OK: ['0x41']>,
        'page_chunk_number': 1,
        'page_number': 0,
        'page_chunk_size': 512,
        'page_chunk_bytes': [ 0, 195, 0, ... , 0, 0, 0, 0, 0, 0, 0 ],
        'crc16': 4312
    }
}
class adi_spo2_watch.core.packets.fs_packets.StreamDebugInfoPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x26',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.STREAM_DEBUG_INFO_RES: ['0x57']>,
        'status': <FSStatus.OK: ['0x41']>,
        'stream_address': <Stream.ADXL: ['0xC2', '0x02']>,
        'packets_received': 0,
        'packets_missed': 0,
        'last_page_read': 0,
        'last_page_read_offset': 0,
        'last_page_read_status': 0,
        'num_bytes_transferred': 0,
        'bytes_read': 0,
        'usb_cdc_write_failed': 0
    }
}
class adi_spo2_watch.core.packets.fs_packets.StreamFileChunkPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x20E',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.CHUNK_RETRANSMIT_RES: ['0x85']>,
        'status': <FSStatus.OK: ['0x41']>,
        'retransmit_type': 0,
        'page_roll_over': 1,
        'page_chunk_number': 0,
        'page_number': 2,
        'filename': 'FILENAME.LOG'
    }
}
class adi_spo2_watch.core.packets.fs_packets.StreamFileRequestPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x20E',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.DOWNLOAD_LOG_RES: ['0x7B']>,
        'status': <FSStatus.OK: ['0x41']>,
        'filename': 'FILENAME.LOG'
    }
}
class adi_spo2_watch.core.packets.fs_packets.StreamFileResponsePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x20E',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.DOWNLOAD_LOG_RES: ['0x7B']>,
        'status': <FSStatus.OK: ['0x41']>,
        'page_chunk_number': 1,
        'page_number': 0,
        'page_chunk_size': 512,
        'page_chunk_bytes': [ 0, 195, 0, ... , 0, 0, 0, 0, 0, 0, 0 ],
        'crc16': 4312
    }
}
class adi_spo2_watch.core.packets.fs_packets.SystemTestInfoRequestPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.fs_packets.SystemTestInfoResponsePacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.fs_packets.VolumeInfoPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.FS: ['0xC5', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x14',
        'checksum': '0x0'
    },
    'payload': {
        'command': <FSCommand.VOL_INFO_RES: ['0x4F']>,
        'status': <FSStatus.OK: ['0x41']>,
        'total_memory': 536870656,
        'used_memory': 487424,
        'available_memory': 99
    }
}

adi_spo2_watch.core.packets.low_touch_packets module

class adi_spo2_watch.core.packets.low_touch_packets.CommandLogPacket(destination=None, command=None)

Bases: CommandPacket

add_start_command(command)
add_stop_command(command)
class adi_spo2_watch.core.packets.low_touch_packets.LTDCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.low_touch_packets.LTDCBGENPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.LT_APP: ['0xC8', '0x0A']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 242,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.ERROR_NO_DCB: ['0x98']>,
        'size': 0,
        'packet_count': 0,
        'data': [ ],
        'start_command_count': 0,
        'stop_command_count': 0
    }
}
get_dict(last_timestamp=None)
class adi_spo2_watch.core.packets.low_touch_packets.LTDCBLCFGPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 32,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 5,
        'data': [
            [ '0x0', '0x1B58' ],
            [ '0x1', '0x1388' ],
            [ '0x2', '0x564' ],
            [ '0x3', '0x53C' ],
            [ '0x4', '0x3' ]
        ]
    }
}
class adi_spo2_watch.core.packets.low_touch_packets.LTLibraryConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.LT_APP: ['0xC8', '0x0A']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 14,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 1,
        'data': [
            [ '0x0', '0x1B58' ]
        ]
    }
}
class adi_spo2_watch.core.packets.low_touch_packets.ReadCH2CapPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.LT_APP: ['0xC8', '0x0A']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <LTCommand.READ_CH2_CAP_RES: ['0x47']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'cap_value': 1179
    }
}
class adi_spo2_watch.core.packets.low_touch_packets.WristDetectPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.LT_APP: ['0xC8', '0x0A']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <LTCommand.WRIST_DETECT_RES: ['0x49']>,
        'status': <LTStatus.OK: ['0x41']>,
        'wrist_detect_status': <LTWristDetectStatus.WRIST_DETECT_OFF: ['0x2']>,
        'wrist_detect_sensor_used': <LTWristDetectSensor.LT_SENSOR_EDA: ['0x1']>,
    }
}

adi_spo2_watch.core.packets.lt_mode4_packets module

class adi_spo2_watch.core.packets.lt_mode4_packets.LTMode4PrevStateEventPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 36,
        'checksum': 0
    },
    'payload': {
        'command': <User0Command.GET_PREV_ST_EVT_RES: ['0x4B']>,
        'status': <User0Status.OK: ['0x41']>,
        'intermittent_count': 1,
        'stream_data': [
            {
                'state': <User0State.END_MONITORING: ['0x06']>,
                'event': <User0Event.WATCH_ON_CRADLE_NAV_BUTTON_RESET: ['0x02']>,
                'timestamp': 1633154418511.9675
            },
            {
                'state': <User0State.END_MONITORING: ['0x06']>,
                'event': <User0Event.FINISH_LOG_TRANSFER: ['0x0B']>,
                'timestamp': 1633154737959.6863
            },
            {
                'state': <User0State.END_MONITORING: ['0x06']>,
                'event': <User0Event.WATCH_ON_CRADLE_NAV_BUTTON_RESET: ['0x02']>,
                'timestamp': 1633161548514.8425
            },
            {
                'state': <User0State.END_MONITORING: ['0x06']>,
                'event': <User0Event.WATCH_ON_CRADLE_NAV_BUTTON_RESET: ['0x02']>,
                'timestamp': 1633229664514.8113
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of data.

class adi_spo2_watch.core.packets.lt_mode4_packets.LTMode4StatePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 11,
        'checksum': 0
    },
    'payload': {
        'command': <User0Command.GET_STATE_RES: ['0x45']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'state': <User0State.END_MONITORING: ['0x06']>
    }
}

adi_spo2_watch.core.packets.pm_packets module

class adi_spo2_watch.core.packets.pm_packets.AppsHealthPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x16',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.GET_APPS_HEALTH_RES: ['0x91']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'ad5940_isr_count': 202,
        'adpd_isr_count': 3350,
        'adxl_isr_count': 1187
    }
}
class adi_spo2_watch.core.packets.pm_packets.BLEStatusPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.BootloaderVersionPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.ChipIDPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xD',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.CHIP_ID_RES: ['0x7D']>,
        'status': <PMStatus.OK: ['0x41']>,
        'chip_name': <ChipID.ADPD4K: ['0x02']>,
        'chip_id': 192
    }
}
class adi_spo2_watch.core.packets.pm_packets.ControlPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xB',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.CAP_SENSE_TEST_RES: ['0x7F']>,
        'status': <PMStatus.OK: ['0x41']>,
        'enabled': False
    }
}
class adi_spo2_watch.core.packets.pm_packets.DCBStatusPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x1A',
        'checksum': '0x0'
    },
    'payload': {
        'command': <DCBCommand.QUERY_STATUS_RES: ['0x9E']>,
        'status': <PMStatus.OK: ['0x41']>,
        'general_block': 0,
        'ad5940_block': 0,
        'adpd_block': 0,
        'adxl_block': 0,
        'ppg_block': 0,
        'ecg_block': 0,
        'eda_block': 0,
        'ad7156_block': 1,
        'pedometer_block': 0,
        'temperature_block': 0,
        'low_touch_block': 0,
        'ui_config_block': 0,
        'user0_block': 0,
        'user1_block': 0,
        'user2_block': 0,
        'user3_block': 0,
        'bia_lcfg_block': 0,
        'bia_dcfg_block': 0,
        'eda_dcfg_block': 0,
        'adp5360_block': 0,
        'session_config_block': 0,
        'temperature_correction_block': 0,
        'sh_max86178_block': 0,
        'sh_adxl367_block': 0,
    }
}
class adi_spo2_watch.core.packets.pm_packets.DG2502SWStatusPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.DateTimePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x15',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.GET_DATE_TIME_RES: ['0x53']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'year': 2021,
        'month': 3,
        'day': 12,
        'hour': 16,
        'minute': 33,
        'second': 12,
        'tz_sec': 19800
    }
}
class adi_spo2_watch.core.packets.pm_packets.DisplayDCBPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC1', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 112,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 15,
        'data': [
            [ '0x00', '0x0' ]
            ...
        ]
    }
}
class adi_spo2_watch.core.packets.pm_packets.EEPROMPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.HibernateModePacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.LDOControlPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.LDO_CONTROL_RES: ['0x7B']>,
        'status': <PMStatus.OK: ['0x41']>,
        'ldo_name': <LDO.OPTICAL: ['0x02']>,
        'enabled': False
    }
}
class adi_spo2_watch.core.packets.pm_packets.LDOStatusPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.MCUVersionPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xB',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.GET_MCU_VERSION_RES: ['0x59']>,
        'status': <PMStatus.OK: ['0x41']>,
        'mcu': <MCUType.MCU_M4: ['0x02']>
    }
}
class adi_spo2_watch.core.packets.pm_packets.PingPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x49',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.PING_RES: ['0x1B']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_num': 1,
        'data': [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... , 0, 0, 0, 0 ],
        'elapsed_time': 0.016231060028076172
    }
}
class adi_spo2_watch.core.packets.pm_packets.PowerStatePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xB',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.SET_POWER_STATE_RES: ['0x49']>,
        'status': <PMStatus.OK: ['0x41']>,
        'power_state': <PowerMode.ACTIVE: ['0x00']>
    }
}
class adi_spo2_watch.core.packets.pm_packets.SwitchControlPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.SW_CONTROL_RES: ['0x79']>,
        'status': <PMStatus.OK: ['0x41']>,
        'switch_name': <ElectrodeSwitch.ADPD4000: ['0x02']>,
        'enabled': False
    }
}
class adi_spo2_watch.core.packets.pm_packets.SyncTimerPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.SystemInfoPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x24',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.SYS_INFO_RES: ['0x4B']>,
        'status': <PMStatus.OK: ['0x41']>,
        'version': 0,
        'mac_address': 'C5-05-CA-F1-67-D5',
        'device_id': 0,
        'model_number': 0,
        'hw_id': 0,
        'bom_id': 0,
        'batch_id': 0,
        'date': 0,
        'board_type': 0
    }
}
get_dict(last_timestamp=None)
class adi_spo2_watch.core.packets.pm_packets.ToolAddressPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.TopTouchControlPacket(destination=None, command=None)

Bases: CommandPacket

class adi_spo2_watch.core.packets.pm_packets.UICRCustomerRegistersPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

adi_spo2_watch.core.packets.sensorhub_packets module

class adi_spo2_watch.core.packets.sensorhub_packets.ADXL367CalibrationConfigCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'cal_en': True,
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.ADXL367CalibrationEnableCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'cal_en': True,
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.ADXL367ConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.LOAD_ADXL367_CFG_REQ: ['0x6A']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'device_id': <ADXL367Device.DEVICE_367: ['0x6F', '0x01']>
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.ADXL367DCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'dcb_block_index': 1,
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.ADXL367DCBPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.READ_ADXL367_DCB_REQ: ['0x6']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 15,
        'data': [
            [ '0x20', '0x0' ],
            [ '0x21', '0x0' ],
            ...
            [ '0x2D', '0x10' ],
            [ '0x2E', '0x0' ]
        ]
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.Adxl367SelfTestRequestPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.ADXL367_SELF_TEST_REQ: ['0x5C']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'meas_range':  ADXL367MeasRange.MEAS_RANGE_8G
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.Adxl367SelfTestResponsePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.ADXL367_SELF_TEST_RESP: ['0x5D']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sh_status':  '0x0',
        'result':    '0x0'
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.AlgoVersionPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.ALGO_VERSION_RESP: ['0x79']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'major':  '0x33',
        'minor':  '0x0',
        'patch':  '0x0'
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.BootloaderExitModePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.BL_EXIT_MODE_REQ: ['0x58']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'auth':  []
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.BootloaderGetOperationModePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.BL_GET_OP_MODE_REQ: ['0x05']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'mode':
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.BootloaderTestDataPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.MAX86178_SET_FS_REQ: ['0x05']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'mode':
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.DecimationRatePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.SET_DECIMATION_REQ: ['0x8E']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'en_decimation':  '0xF'
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.DownloadSensorHubPagePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.MAX86178_SET_FS_REQ: ['0x05']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'mode':
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.EraseFlashPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.BL_ERASE_FLASH_REQ: ['0x50']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'auth':  []
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.FirmwareVersionPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.FIRMWARE_VERSION_RESP: ['0x5F']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'major':  '0x33',
        'minor':  '0x0',
        'patch':  '0x0'
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.GetPageSizePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.BL_GET_PAGE_SZ_REQ: ['0x4E']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size':  '0x02', '0x00'
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.LPSelfTestPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.LP_SELF_TEST_RESP: ['0x8B']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'result': LowPowerSelfTestResult.OK
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.MAX86178ConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.LOAD_MAX86178_CFG_REQ: ['0x68']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'device_id': <MAX86178Device.DEVICE_G_R_IR: ['0x30']>
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.MAX86178DCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'dcb_block_index': 1,
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.MAX86178DCBPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.READ_MAX86178_DCB_REQ: ['0x6']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 15,
        'data': [
            [ '0x20', '0x0' ],
            [ '0x21', '0x0' ],
            ...
            [ '0x2D', '0x10' ],
            [ '0x2E', '0x0' ]
        ]
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.Max86178EcgEnPacketizationPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.ENABLE_MAX86178_ECG_PACKETIZATION_REQ: ['0x88']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'enable': True
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.RegOpPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.MAX86178_READ_REG_REQ: ['0x60']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'address':  '0x20',
        'value':  '0x07'
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.RegdumpRequestPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.SH_REG_DUMP_REQ: ['0x82']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'device_id': SHDevice
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.RegdumpResponsePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

[
    {
        'header': {
            'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
            'destination': <Application.APP_USB: ['0xC7', '0x05']>,
            'length': 242,
            'checksum': 0
        },
        'payload': {
            'command': <CommonCommand.SH_REG_DUMP_RESP: ['0x85']>,
            'status': <CommonStatus.OK: ['0x00']>,
            'device_id': '0x01'
            'num_ops': 62,
            'packet_count': 2,
            'ops': [
                [ '0x01', '0x97' ],
                [ '0x02', '0x6E' ],
                ...
                [ '0x09', '0x5' ],
                [ '0x0A', '0x0' ]
            ]
        }
    },
    {
        'header': {
            'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
            'destination': <Application.APP_USB: ['0xC7', '0x05']>,
            'length': 242,
            'checksum': 0
        },
        'payload': {
            'command': <CommonCommand.SH_REG_DUMP_RESP: ['0x85']>,
            'status': <CommonStatus.OK: ['0x00']>,
            'device_id': '0x01'
            'num_ops': 62,
            'packet_count': 2,
            'ops': [
                [ '0x1A', '0x12' ],
                [ '0x1B', '0x0' ],
                ...
                [ '0x1E', '0x0' ],
                [ '0x1F', '0x4' ]
            ]
        }
    }
]
class adi_spo2_watch.core.packets.sensorhub_packets.SHHardResetAPPModePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.HARD_RESET_REQ: ['0x82']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'wakeupmode':
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.SetAuthorizationPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.BL_SET_AUTH_REQ: ['0x05']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'auth':  []
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.SetBootLoaderModePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.BL_SET_MODE_REQ: ['0x46']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'mode':  True
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.SetFrequencyPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xB',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.SH_COMMAND_SET_FS_REQ: ['0x60']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'odr':  25
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.SetIVPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.BL_SET_IV_REQ: ['0x4A']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'nonce':  []
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.SetOpModePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.MAX86178_SET_FS_REQ: ['0x05']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'mode':  SHConfigID.SENSORHUB_RAW_MODE
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.SetPageNumberPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.BL_SET_NUM_PAGE_REQ: ['0x48']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'page_number':  '0x02', '0x00'
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.WASConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <SHCommand.SET_LCFG_RES: ['0x15']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'device_id': <ALGODevice.DEVICE_WAS: ['0x70']>
    }
}
class adi_spo2_watch.core.packets.sensorhub_packets.WASLCFGPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

[
    {
        'header': {
            'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
            'destination': <Application.APP_USB: ['0xC7', '0x05']>,
            'length': 242,
            'checksum': 0
        },
        'payload': {
            'command': <CommonCommand.GET_LCFG_RES: ['0x13']>,
            'status': <CommonStatus.OK: ['0x00']>,
            'size': 57,
            'packet_count': 2,
            'data': [
                [ '0x9', '0x97' ],
                [ '0xB', '0x6E2' ],
                ...
                [ '0x1A5', '0x5' ],
                [ '0x1A6', '0x0' ]
            ]
        }
    },
    {
        'header': {
            'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
            'destination': <Application.APP_USB: ['0xC7', '0x05']>,
            'length': 242,
            'checksum': 0
        },
        'payload': {
            'command': <CommonCommand.GET_LCFG_RES: ['0x13']>,
            'status': <CommonStatus.OK: ['0x00']>,
            'size': 10,
            'packet_count': 2,
            'data': [
                [ '0x1A7', '0x120' ],
                [ '0x1A8', '0x0' ],
                ...
                [ '0x1AF', '0x0' ],
                [ '0x1B0', '0x4' ]
            ]
        }
    }
]
class adi_spo2_watch.core.packets.sensorhub_packets.WASLibraryConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SENSORHUB: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 235,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 56,
        'data': [ '0xC0', '0x20', ... ] }
}

adi_spo2_watch.core.packets.session_manager_packets module

class adi_spo2_watch.core.packets.session_manager_packets.SessionManagerDCBPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SESSION_MANAGER_APP: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 16,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x41']>,
        'dcb_block_index': <DCBConfigBlockIndex.SESSION_CONFIG_BLOCK: ['0x14']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.session_manager_packets.SessionManagerLibraryConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SESSION_MANAGER_APP: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 16,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x41']>,
        'size': 1,
        'data': [
            [ '0x0', '0x42' ]
        ]
    }
}
class adi_spo2_watch.core.packets.session_manager_packets.SessionManagerPrevStateEventPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SESSION_MANAGER_APP: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 16,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x41']>,
        'prev_state': <SessionManagerState.STANDBY: ['0x0'],
        'prev_event': <SessionManagerEvent.INVALID: ['0x0'],
        'timestamp': 1633229664514.8113
    }
}
class adi_spo2_watch.core.packets.session_manager_packets.SessionManagerStatePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.SESSION_MANAGER_APP: ['0xC8', '0x24']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 16,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.SET_STATE_RES: ['0x42']>,
        'status': <CommonStatus.OK: ['0x41']>,
        'state': <SessionManagerState.STANDBY: ['0x0'],
    }
}

adi_spo2_watch.core.packets.stream_data_packets module

class adi_spo2_watch.core.packets.stream_data_packets.AD7156DataPacket

Bases: CommandPacket

Data

Unit

Range

CH1 Cap

pF

0 to 4pF

CH2 Cap

pF

0 to 4pF

CH1 ADC Code

ADC Code

CH2 ADC Code

ADC Code

OUT1 Val

OUT2 Val

Packet Structure:

{
    'header': {
        'source': <Stream.AD7156: ['0xC8', '0x15']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x2C',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 0,
        'stream_data': [
            {
                'timestamp': 1751731879,
                'ch1_cap': 102,
                'ch2_cap': 1023,
                'ch1_ADCCode': 1023,
                'ch2_ADCCode': 1023,
                'OUT1_val': 1023,
                'OUT2_val': 1023,
            }
            {
                'timestamp': 1751731879,
                'ch1_cap': 102,
                'ch2_cap': 1023,
                'ch1_ADCCode': 1023,
                'ch2_ADCCode': 1023,
                'OUT1_val': 1023,
                'OUT2_val': 1023,
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.BCMDataPacket

Bases: CommandPacket

Data

Unit

Range

FFM Estimated

BMI

Kg/sq.m

15 to 50

Fat percent

Percentage

0 to 100

Packet Structure:

{
    'header': {
        'source': <Stream.BCM: ['0xC8', '0x14']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x2C',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 0,
        'ffm_estimated': 1,
        'bmi': 20.4,
        'fat_percent': 12,
        'timestamp': 1751731879,
    }
}
get_dict(last_timestamp=None)

Postprocessing.

class adi_spo2_watch.core.packets.stream_data_packets.BIADataPacket

Bases: CommandPacket

Data

Unit

Range

BIA info

bool

Leads off/Leads on

Real

Ohm

Imaginary

Ohm

Frequency Index

Hz

1 to 200,000Hz

Packet Structure:

{
    'header': {
        'source': <Stream.BIA: ['0xC4', '0x07']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x41',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 1,
        'data_type': 0,
        'stream_data': [
            {
                'timestamp': 1788107093,
                'real': 0,
                'imaginary': 0,
                'frequency_index': 82
            },
            {
                'timestamp': 1788114863,
                'real': 0,
                'imaginary': 0,
                'frequency_index': 5
            },
            {
                'timestamp': 1788122630,
                'real': 0,
                'imaginary': 0,
                'frequency_index': 8
            },
            {
                'timestamp': 1788130399,
                'real': 0,
                'imaginary': 0,
                'frequency_index': 54
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.CapSenseStreamDataPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.PM: ['0xC5', '0x00']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xC',
        'checksum': '0x0'
    },
    'payload': {
        'command': <PMCommand.CAP_SENSE_STREAM_DATA: ['0x82']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'position': 1,
        'value': 0
    }
}
class adi_spo2_watch.core.packets.stream_data_packets.ECGDataPacket

Bases: CommandPacket

Data

Unit

Range

Data Type

Depricated

Depricated

ECG Info

bool

Leads off/Leads on

HR

Not supported

Not supported

ECG data

ADC count

Packet Structure:

{
    'header': {
        'source': <Stream.ECG: ['0xC4', '0x01']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x3D',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 0,
        'data_type': 1,
        'ecg_info': 0,
        'hr': 0,
        'stream_data': [
            {
                'timestamp': 1771095376,
                'ecg_data': 12351
            },
            {
                'timestamp': 1771095703,
                'ecg_data': 12353
            },
            {
                'timestamp': 1771096030,
                'ecg_data': 52470
            },
            {
                'timestamp': 1771096357,
                'ecg_data': 41129
            },
            {
                'timestamp': 1771096676,
                'ecg_data': 63838
            },
            {
                'timestamp': 1771096995,
                'ecg_data': 63848
            },
            {
                'timestamp': 1771097314,
                'ecg_data': 63848
            },
            {
                'timestamp': 1771097633,
                'ecg_data': 63848
            },
            {
                'timestamp': 1771097954,
                'ecg_data': 63833
            },
            {
                'timestamp': 1771098273,
                'ecg_data': 63846
            },
            {
                'timestamp': 1771098592,
                'ecg_data': 63846
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.EDADataPacket

Bases: CommandPacket

Data

Unit

Range

Data Type

N/A

N/A

Real

Ohm

-32,768 to 32,767

Imaginary

Ohm

-32,768 to 32,767

Packet Structure:

{
    'header': {
        'source': <Stream.EDA: ['0xC4', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x3D',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 0,
        'data_type': 0,
        'stream_data': [
            {
                'timestamp': 1774366622,
                'real': 0,
                'imaginary': 0
            },
            {
                'timestamp': 1774374407,
                'real': 0,
                'imaginary': 16708
            },
            {
                'timestamp': 1774382157,
                'real': 16728,
                'imaginary': 3257
            },
            {
                'timestamp': 1774389924,
                'real': 3277,
                'imaginary': -20751
            },
            {
                'timestamp': 1774397691,
                'real': -20731,
                'imaginary': -15161
            },
            {
                'timestamp': 1774405458,
                'real': -15141,
                'imaginary': -30319
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.KeyStreamDataPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.DISPLAY: ['0xC5', '0x03']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0xB',
        'checksum': '0x0'
    },
    'payload': {
        'command': <DisplayCommand.KEY_STREAM_DATA: ['0x48']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'key_code': 18
    }
}
class adi_spo2_watch.core.packets.stream_data_packets.MAX30208TemperatureDataPacket

Bases: CommandPacket

Data

Unit

Range

Temperature

Degree Celsius

+0°C to +70°C

Packet Structure:

{
    'header': {
        'source': <Stream.MAX30208_TEMPERATURE_STREAM: ['0xC4', '0x06']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x14',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 2,
        'timestamp': 1779692742,
        'temperature': 30.1,
    }
}
get_dict(last_timestamp=None)

Postprocessing.

class adi_spo2_watch.core.packets.stream_data_packets.SHADXLDataPacket

Bases: CommandPacket

Data

Unit

Range

X

mg

-32,768 to 32,767mg

Y

mg

-32,768 to 32,767mg

Z

mg

-32,768 to 32,767mg

Packet Structure:

{
    'header': {
        'source': <Stream.ADXL: ['0xC8', '0x2C']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x37',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 395,
        'op_mode_id': 0,
        'stream_data': [
            {
                'timestamp': 1767361372,
                'x': -85,
                'y': 90,
                'z': 55
            },
            {
                'timestamp': 1767362027,
                'x': -80,
                'y': 88,
                'z': 55
            },
            {
                'timestamp': 1767362682,
                'x': 40,
                'y': 274,
                'z': 79
            },
            {
                'timestamp': 1767363337,
                'x': 70,
                'y': 273,
                'z': 54
            },
            {
                'timestamp': 1767363931,
                'x': 57,
                'y': 257,
                'z': 48
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.SHAMADataPacket

Bases: CommandPacket

Data

Unit

Range

Activity Class

Enum (0-4)

No activity/activity/other activity

Total activity time

Seconds

0 to 4,294,967,295

Total walk steps

Steps

0 to 4,294,967,295

Total distance

Meters

0 to 4,294,967,295

Packet Structure:

{
    'header': {
        'source': <Stream.SENSORHUB_AMA_STREAM: ['0xC8', '0x37']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 43,
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 395,
        'op_mode_id': 1,
        'stream_data': [
            {
                'timestamp': 15656161576
                'activity_class': 0,
                'total_activity_time': 0,
                'total_walk_steps': 0,
                'total_distance': 0
            },
            {
                'timestamp': 15656161576
                'activity_class': 0,
                'total_activity_time': 0,
                'total_walk_steps': 0,
                'total_distance': 0
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.SHHRMDataPacket

Bases: CommandPacket

Data

Unit

Range

HR

Beats per minute

30 - 220 bpm

HR confidence

Percent

0-100

RR

Percent

0-100

RR Confidence

Percent

0-100

Activity class

Enum (0-4)

No activity/activity/other activity

Packet Structure:

{
    'header': {
        'source': <Stream.SENSORHUB_HRM_STREAM: ['0xC8', '0x2B']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 33,
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 395,
        'op_mode_id': 1,
        'stream_data': [
            {
                'timestamp': 1767361372,
                'hr': 0,
                'hr_conf': 0,
                'rr': 11,
                'rr_conf': 0,
                'activity_class': 0,
            },
            {
                'timestamp': 1767361372,
                'hr': 0,
                'hr_conf': 0,
                'rr': 11,
                'rr_conf': 0,
                'activity_class': 0,
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.SHMAX86178BIOZDataPacket

Bases: CommandPacket

Data

Unit

Range

BioZ data

Ohms

0 to 4,294,967,295 Ohms

Packet Structure:

{
    'header': {
        'source': <Stream.SENSORHUB_MAX86178_BIOZ_STREAM: ['0xC8', '0x36']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x2C',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 0,
        'op_mode': 1,
        'timestamp': 1751731879,
        'bioz_data': [ 351762, 351755, ... ],
    }
}
get_dict(last_timestamp=None)

Postprocess BIOZ data

class adi_spo2_watch.core.packets.stream_data_packets.SHMAX86178DataPacket

Bases: CommandPacket

Data

Unit

Range

SH data

ADC count

0 to 524287

Packet Structure:

{
    'header': {
        'source': <Stream.SENSORHUB_MAX86178_STREAM1: ['0xC8', '0x27']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x2C',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 0,
        'op_mode': 1,
        'channel_num': 2,
        'timestamp': 1751731879,
        'sample_num': 2,
        'sh_data': [ 351762, 351755 ],
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.SHMAX86178ECGDataPacket

Bases: CommandPacket

Data

Unit

Range

Lead status

bool

Leads off/ Leads on

ECG data

ADC count

-32,768 to 32,767

Packet Structure:

{
    'header': {
        'source': <Stream.SENSORHUB_MAX86178_ECG_STREAM: ['0xC8', '0x32']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x2C',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 0,
        'op_mode': 1,
        'timestamp': 1751731879,
        'ecg_data': [ 35762, 35755, ... ],
    }
}
get_dict(last_timestamp=None)

Convert ECG data into signed values

class adi_spo2_watch.core.packets.stream_data_packets.SHRRDataPacket

Bases: CommandPacket

Data

Unit

Range

IR Cardiac Resp RMS Ratio

IR Range RMS Ratio

IR Green Corr Coefficient

Gree RR from IBI

IR Baseline RR

Std IBI MSec

Avg HR BPM

Beats per minute

30 to 220 bpm

Green RR from IBI Quality

RR MLP Output

Breaths per minute

5 to 40 bpm / -1 when not available

RR Median output

Depricated

Depricated

RR Confience

Depricated

Depricated

Packet Structure:

{
    'header': {
        'source': <Stream.SENSORHUB_RR_STREAM: ['0xC8', '0x2E']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 43,
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 395,
        'op_mode_id': 1,
        'stream_data': [
            {
                'timestamp': 15656161576
                'irCardiacRespRmsRatio': 0,
                'irRangeRmsRatio': 0,
                'irGreenCorrCoefficient': 0,
                'greenRrFromIbi': 0,
                'irBaselineRr': 1,
                'stdIbiMSec': 1,
                'avgHrBpm': 1,
                'greenRrFromIbiQuality': 0,
                'rr_mlp_output': 0,
                'rr_median_output': 0,
                'rr_confidence': 0
            },
            {
                'timestamp': 15656161616
                'irCardiacRespRmsRatio': 0,
                'irRangeRmsRatio': 0,
                'irGreenCorrCoefficient': 0,
                'greenRrFromIbi': 0,
                'irBaselineRr': 1,
                'stdIbiMSec': 1,
                'avgHrBpm': 1,
                'greenRrFromIbiQuality': 0,
                'rr_mlp_output': 0,
                'rr_median_output': 0,
                'rr_confidence': 0
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

class adi_spo2_watch.core.packets.stream_data_packets.SHRegConfPacket

Bases: CommandPacket

Data

Unit

Range

LED Current

mA

0 to 127.5mA

Integration time

us

0 to 117us

Burst average

integer

1 to 128

Sample average

integer

1 to 128

Packet Structure:

{
    'header': {
        'source': <Stream.SENSORHUB_REG_CONF: ['0xC8', '0x2D']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': '0x2C',
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 0,
        'op_mode': 1,
        'timestamp': 1751731879,
        'led_curr': [ 3A, 1B, 1A, 1A ],
        'tint': ['3A']
        'avg_smpl': ['2A']
        'reg_sample_average' : ['1A']
    }
}
get_dict(last_timestamp=None)

Postprocessing.

class adi_spo2_watch.core.packets.stream_data_packets.SHSPO2DataPacket

Bases: CommandPacket

Data

Unit

Range

r

Enum (0-4)

No activity/activity/other activity

SpO2 confidence

Percent

0-100

SpO2

Percent

0-100

Percent complete

Percent

0-100

Low signal quality flag

bool

0/1

Motion flag

bool

0/1

Low PI flag

bool

0/1

Unreliable R flag

bool

0/1

SpO2 state

N/A

N/A

SCD contact state

Enum (0-3)

No decision/On skin/Off skin/On object

Packet Structure:

{
    'header': {
        'source': <Stream.SENSORHUB_SPO2_STREAM: ['0xC8', '0x30']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 43,
        'checksum': '0x0'
    },
    'payload': {
        'command': <CommonCommand.STREAM_DATA: ['0x28']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'sequence_number': 395,
        'op_mode_id': 1,
        'stream_data': [
            {
                'r': 0,
                'spo2_conf': 0,
                'spo2': 0,
                'percentComplete': 0,
                'lowQualitySignalFlag': 1,
                'motionFlag': 1,
                'lowPiFlag': 1,
                'unreliableRFlag': 0,
                'spo2_state': 0,
                'scd_contact_state': 0
            },
            {
               'r': 0,
                'spo2_conf': 0,
                'spo2': 0,
                'percentComplete': 0,
                'lowQualitySignalFlag': 1,
                'motionFlag': 1,
                'lowPiFlag': 1,
                'unreliableRFlag': 0,
                'spo2_state': 0,
                'scd_contact_state': 0
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of stream data in stream_data key.

adi_spo2_watch.core.packets.user0_packets module

class adi_spo2_watch.core.packets.user0_packets.BypassUser0TimingPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 14,
        'checksum': 0
    },
    'payload': {
        'command': <User0Command.ID_OP_RES: ['0x47']>,
        'status': <User0Status.OK: ['0x41']>,
        'enabled': false
    }
}
class adi_spo2_watch.core.packets.user0_packets.User0DCBCommandPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.EDA: ['0xC3', '0x02']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 20,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 1,
        'data': [
            [ '0x0', '0x8' ]
        ]
    }
}
class adi_spo2_watch.core.packets.user0_packets.User0DCBPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 88,
        'checksum': 0
    },
    'payload': {
        'command': <DCBCommand.READ_CONFIG_RES: ['0x98']>,
        'status': <DCBStatus.OK: ['0x97']>,
        'size': 19,
        'data': [
            [ '0x00', '0x42' ],
            [ '0x01', '0x1' ],
            ...
            [ '0x11', '0xF' ],
            [ '0x12', '0x249F0' ]
        ]
    }
}
class adi_spo2_watch.core.packets.user0_packets.User0ExperimentIDPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 14,
        'checksum': 0
    },
    'payload': {
        'command': <User0Command.ID_OP_RES: ['0x47']>,
        'status': <User0Status.OK: ['0x41']>,
        'id': <User0ID.EXP_ID: ['0x01']>,
        'operation': <User0OperationMode.READ: ['0x00']>,
        'value': 9999
    }
}
class adi_spo2_watch.core.packets.user0_packets.User0HardwareIDPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 14,
        'checksum': 0
    },
    'payload': {
        'command': <User0Command.ID_OP_RES: ['0x47']>,
        'status': <User0Status.OK: ['0x41']>,
        'id': <User0ID.HW_ID: ['0x00']>,
        'operation': <User0OperationMode.READ: ['0x00']>,
        'value': 34
    }
}
class adi_spo2_watch.core.packets.user0_packets.User0LibraryConfigPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 16,
        'checksum': 0
    },
    'payload': {
        'command': <CommonCommand.READ_LCFG_RES: ['0x17']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'size': 1,
        'data': [
            [ '0x0', '0x42' ]
        ]
    }
}
class adi_spo2_watch.core.packets.user0_packets.User0PrevStateEventPacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 36,
        'checksum': 0
    },
    'payload': {
        'command': <User0Command.GET_PREV_ST_EVT_RES: ['0x4B']>,
        'status': <User0Status.OK: ['0x41']>,
        'intermittent_count': 1,
        'stream_data': [
            {
                'state': <User0State.END_MONITORING: ['0x06']>,
                'event': <User0Event.WATCH_ON_CRADLE_NAV_BUTTON_RESET: ['0x02']>,
                'timestamp': 1633154418511.9675
            },
            {
                'state': <User0State.END_MONITORING: ['0x06']>,
                'event': <User0Event.FINISH_LOG_TRANSFER: ['0x0B']>,
                'timestamp': 1633154737959.6863
            },
            {
                'state': <User0State.END_MONITORING: ['0x06']>,
                'event': <User0Event.WATCH_ON_CRADLE_NAV_BUTTON_RESET: ['0x02']>,
                'timestamp': 1633161548514.8425
            },
            {
                'state': <User0State.END_MONITORING: ['0x06']>,
                'event': <User0Event.WATCH_ON_CRADLE_NAV_BUTTON_RESET: ['0x02']>,
                'timestamp': 1633229664514.8113
            }
        ]
    }
}
get_dict(last_timestamp=None)

Reorganising of data.

class adi_spo2_watch.core.packets.user0_packets.User0StatePacket(destination=None, command=None)

Bases: CommandPacket

Packet Structure:

{
    'header': {
        'source': <Application.USER0_APP: ['0xC8', '0x0F']>,
        'destination': <Application.APP_USB: ['0xC7', '0x05']>,
        'length': 11,
        'checksum': 0
    },
    'payload': {
        'command': <User0Command.GET_STATE_RES: ['0x45']>,
        'status': <CommonStatus.OK: ['0x00']>,
        'state': <User0State.END_MONITORING: ['0x06']>
    }
}

Module contents