messages

Defines messages transmitted between purpledrop microcontroller and driver via the USB channel

class purpledrop.messages.ActiveCapacitanceMsg(fill_data: Optional[bytes] = None)[source]
ID = 3
fill(fill_data)[source]
static predictSize(buf: bytes) int[source]
class purpledrop.messages.BulkCapacitanceMsg(fill_data: Optional[bytes] = None)[source]
ID = 2
fill(buf)[source]
static predictSize(buf: bytes) int[source]
class purpledrop.messages.CalibrateCommandMsg(fill_data: Optional[bytes] = None)[source]
CAP_OFFSET_CMD = 0
ID = 13
fill(fill_data: bytes)[source]
static predictSize(buf: bytes) int[source]
to_bytes() bytes[source]
class purpledrop.messages.CommandAckMsg(fill_data: Optional[bytes] = None)[source]
ID = 4
fill(buf)[source]
static predictSize(buf: bytes) int[source]
class purpledrop.messages.DataBlobMsg(fill_data: Optional[bytes] = None)[source]
ID = 10
OFFSET_CALIBRATION_ID = 1
SOFTWARE_VERSION_ID = 0
fill(fill_data: bytes)[source]
static predictSize(buf: bytes) int[source]
to_bytes() bytes[source]
class purpledrop.messages.DutyCycleUpdatedMsg(fill_data: Optional[bytes] = None)[source]
ID = 15
fill(fill_data: bytes)[source]
static predictSize(buf: bytes) int[source]
class purpledrop.messages.ElectrodeEnableMsg(fill_data: Optional[bytes] = None)[source]
ID = 0
static predictSize(buf: bytes) int[source]
to_bytes()[source]
class purpledrop.messages.FeedbackCommandMsg(fill_data: Optional[bytes] = None)[source]
DIFFERENTIAL = 2
DISABLED = 0
ID = 16
NORMAL = 1
to_bytes() bytes[source]
class purpledrop.messages.GpioControlMsg(fill_data: Optional[bytes] = None)[source]
ID = 14
OUTPUT_FLAG = 2
READ_FLAG = 128
VALUE_FLAG = 1
fill(fill_data: bytes)[source]
property output_enable
static predictSize(buf: bytes) int[source]
property read
to_bytes() bytes[source]
property value
class purpledrop.messages.HvRegulatorMsg(fill_data: Optional[bytes] = None)[source]
ID = 8
fill(buf: bytes)[source]
static predictSize(buf: bytes) int[source]
to_bytes() bytes[source]
class purpledrop.messages.ParameterDescriptorMsg(fill_data: Optional[bytes] = None)[source]
ID = 12
fill(fill_data: bytes)[source]
static predictSize(buf: bytes) int[source]
to_bytes() bytes[source]
class purpledrop.messages.PurpleDropMessage[source]
classmethod findClassById(id: int) Optional[Type][source]
classmethod from_bytes(buf: bytes) object[source]
classmethod predictSize(buf: bytes) int[source]
to_bytes() bytes[source]
class purpledrop.messages.SetGainMsg(fill_data: Optional[bytes] = None)[source]
ID = 11
static predictSize(buf: bytes) int[source]
to_bytes()[source]
class purpledrop.messages.SetParameterMsg(fill_data: Optional[bytes] = None)[source]
ID = 6
fill(fill_data: bytes)[source]
param_idx() int[source]
param_value_float() float[source]
param_value_int() int[source]
static predictSize(buf: bytes) int[source]
set_param_idx(value: int)[source]
set_param_value_float(value: float)[source]
set_param_value_int(value: int)[source]
set_write_flag(flag: bool)[source]
to_bytes() bytes[source]
write_flag() bool[source]
class purpledrop.messages.SetPwmMsg(fill_data: Optional[bytes] = None)[source]
ID = 9
fill(buf: bytes)[source]
to_bytes() bytes[source]
class purpledrop.messages.TemperatureMsg(fill_data: Optional[bytes] = None)[source]
ID = 7
fill(buf: bytes)[source]
static predictSize(buf: bytes) int[source]
to_bytes() bytes[source]