max_ble_hci.data_params — MAX BLE HCI 0.1.0 documentation

# max_ble_hci.data_params

Contains data classes used for HCI function parameters/returns.

class AdvParams(interval_min: int = 96, interval_max: int = 96, adv_type: int = 3, own_addr_type: AddrType = AddrType.PUBLIC, peer_addr_type: AddrType = AddrType.PUBLIC, peer_addr: int = 0, channel_map: int = 7, filter_policy: int = 0)

  Bases: `object`

  Advertising parameters data container.

  adv_type: int = 3

    Advertising type.

  channel_map: int = 7

    Advertising channel map.

  filter_policy: int = 0

    Advertising filter policy.

  interval_max: int = 96

    Maximum advertising interval.

  interval_min: int = 96

    Minimum advertising interval.

  own_addr_type: AddrType = 0

    Own device address type.

  peer_addr: int = 0

    Connectable peer device address.

  peer_addr_type: AddrType = 0

    Connectable peer device address type.

class AdvPktStats(tx_adv: int | None = None, rx_req: int | None = None, rx_req_crc: int | None = None, rx_req_timeout: int | None = None, tx_resp: int | None = None, err_adv: int | None = None, rx_setup: int | None = None, tx_setup: int | None = None, rx_isr: int | None = None, tx_isr: int | None = None, tx_chain: int | None = None)

  Bases: `object`

  Advertising statistics data container.

  err_adv: int = None

    Number of advertising transaction errors.

  rx_isr: int = None

    RX ISR processing watermark in microseconds.

  rx_req: int = None

    Number of advertising requests received correctly.

  rx_req_crc: int = None

    Number of advertising requests received with a CRC error.

  rx_req_timeout: int = None

    Number of RX timeouts.

  rx_setup: int = None

    RX packet setup watermark in microseconds.

  tx_adv: int = None

    Number of sent advertising packets.

  tx_chain: int | None = None

    Number of chain packets sent.

    Note

    Value is only returned when retrieving auxiliary advertising statistics.

  tx_isr: int = None

    TX ISR processing watermark in microseconds.

  tx_resp: int = None

    Number of response packets sent.

  tx_setup: int = None

    TX packet setup watermark in microseconds.

class ConnParams(peer_addr: int, scan_interval: int = 256, scan_window: int = 256, init_filter_policy: int = 0, peer_addr_type: AddrType = AddrType.PUBLIC, own_addr_type: AddrType = AddrType.PUBLIC, conn_interval_min: int = 6, conn_interval_max: int = 6, max_latency: int = 0, sup_timeout: int = 100, min_ce_length: int = 3856, max_ce_length: int = 3856)

  Bases: `object`

  Connection parameters data container.

  conn_interval_max: int = 6

    Connection interval maximum.

  conn_interval_min: int = 6

    Connection interval minimum.

  init_filter_policy: int = 0

    Initiator filter policy.

  max_ce_length: int = 3856

    Maximum connection event length.

  max_latency: int = 0

    Maximum peripheral latency.

  min_ce_length: int = 3856

    Minimum connection event length.

  own_addr_type: AddrType = 0

    Own device address type.

  peer_addr: int

    Connectable peer device address.

  peer_addr_type: AddrType = 0

    Connectable peer device address type.

  scan_interval: int = 256

    Scan interval.

  scan_window: int = 256

    Scan duration.

  sup_timeout: int = 100

    Supervision timeout.

class DataPktStats(rx_data: int, rx_data_crc: int, rx_data_timeout: int, tx_data: int, err_data: int, rx_setup: int, tx_setup: int, rx_isr: int, tx_isr: int)

  Bases: `object`

  Generic data stats container for CM and DTM.

  err_data

    Number of data transaction errors.

  per(peer_tx_data: int | None = None) → float

    Calculate PER.

    Calculates the Packet Error Rate of the current set of statistics. If number of peer TX packets is not provided, the value is inferred from the number of correctly received packets, the number of CRC errors, and the number of timeouts recorded by the receiver.

    Parameters:

      peer_tx_data (Optional[int], optional) – Number of packets transmitted by the peer device.

    Returns:

      Calculated PER value.

    Return type:

      float

  rx_data

    Number of packets received correctly.

  rx_data_crc

    Number of packets received with a CRC error.

  rx_data_timeout

    Number of RX timeouts.

  rx_isr

    RX ISR processing watermark in microseconds.

  rx_setup

    RX packet setup watermark in microseconds.

  tx_data

    Number of correctly transmitted packets.

  tx_isr

    TX ISR processing watermark in microseconds.

  tx_setup

    TX packet setup watermark in microseconds.

class MemPktStats(stack: int | None = None, sys_assert_cnt: int | None = None, free_mem: int | None = None, used_mem: int | None = None, max_connections: int | None = None, conn_ctx_size: int | None = None, cs_watermark_lvl: int | None = None, ll_watermark_lvl: int | None = None, sch_watermark_lvl: int | None = None, lhci_watermark_lvl: int | None = None, max_adv_sets: int | None = None, adv_set_ctx_size: int | None = None, ext_scan_max: int | None = None, ext_scan_ctx_size: int | None = None, ext_init_ctx_size: int | None = None, max_num_ext_init: int | None = None, max_per_scanners: int | None = None, per_scan_ctx_size: int | None = None, max_cig: int | None = None, cig_ctx_size: int | None = None, cis_ctx_size: int | None = None)

  Bases: `object`

  Memory statistics data container.

  adv_set_ctx_size: int = None

    Advertising set context size in bytes.

  cig_ctx_size: int = None

    CIG context size in bytes.

  cis_ctx_size: int = None

    CIS context size in bytes.

  conn_ctx_size: int = None

    Number of bytes used for connection context.

  cs_watermark_lvl: int = None

    Critical section watermark duration in microseconds.

  ext_init_ctx_size: int = None

    Extended initiators context size in bytes.

  ext_scan_ctx_size: int = None

    Extended scanners context size in bytes.

  ext_scan_max: int = None

    Maximum number of extended scanners.

  free_mem: int = None

    Memory free for stack usage.

  lhci_watermark_lvl: int = None

    LHCI handler watermark level in microseconds.

  ll_watermark_lvl: int = None

    Link layer handler watermark level in microseconds.

  max_adv_sets: int = None

    Maximum number of advertising sets.

  max_cig: int = None

    Maximim number of CIG.

  max_connections: int = None

    Maximum number of connections allowed.

  max_num_ext_init: int = None

    Maximum number of extended initiators.

  max_per_scanners: int = None

    Maximum number of periodic scanners.

  per_scan_ctx_size: int = None

    Periodic scanners context size in bytes.

  sch_watermark_lvl: int = None

    Scheduler handler watermark level in microseconds.

  stack: int = None

    Number of bytes used by the stack.

  sys_assert_cnt: int = None

    Number of times assertions hit.

  used_mem: int = None

    Memory used by stack.

class PduPktStats(fail_pdu: int | None = None, pass_pdu: int | None = None, fail_whitelist: int | None = None, pass_whitelist: int | None = None, fail_peer_addr_match: int | None = None, pass_peer_addr_match: int | None = None, fail_local_addr_match: int | None = None, pass_local_addr_match: int | None = None, fail_peer_rpa_verify: int | None = None, pass_peer_rpa_verify: int | None = None, fail_local_rpa_verify: int | None = None, pass_local_rpa_verify: int | None = None, fail_peer_priv_addr: int | None = None, fail_local_priv_addr: int | None = None, fail_peer_addr_res_req: int | None = None, pass_peer_addr_res_req: int | None = None, pass_local_addr_res_opt: int | None = None, peer_res_addr_pend: int | None = None, local_res_addr_pend: int | None = None)

  Bases: `object`

  PDU statistics data container.

  fail_local_addr_match: int = None

    Number of PDUs failing local address match.

  fail_local_priv_addr: int = None

    Number of local addresses failing RPA requirements.

  fail_local_rpa_verify: int = None

    Number of local RPAs failing verification.

  fail_pdu: int = None

    Number of PDUs failing PDU type filter.

  fail_peer_addr_match: int = None

    Number of PDUs failing peer address match.

  fail_peer_addr_res_req: int = None

    Number of PDUs failing required peer address resolution.

  fail_peer_priv_addr: int = None

    Number of peer addresses failing RPA requirements.

  fail_peer_rpa_verify: int = None

    Number of peer RPAs failing verification.

  fail_whitelist: int = None

    Number of PDUs failing whitelist filter.

  local_res_addr_pend: int = None

    Number of local address resolutions pended.

  pass_local_addr_match: int = None

    Number of PDUs passing local address match.

  pass_local_addr_res_opt: int = None

    Number of PDUs passing optional local address resolution.

  pass_local_rpa_verify: int = None

    Number of local RPAs passing verification.

  pass_pdu: int = None

    Number of PDUs passing PDU type filter.

  pass_peer_addr_match: int = None

    Number of PDUs passing peer address match.

  pass_peer_addr_res_req: int = None

    Number of PDUs passing required peer address resolution.

  pass_peer_rpa_verify: int = None

    Number of peer RPAs passing verification.

  pass_whitelist: int = None

    Number of PDUs passing whitelist filter.

  peer_res_addr_pend: int = None

    Number of peer address resolutions pended.

class PoolStats(buf_size: int | None = None, num_buf: int | None = None, num_alloc: int | None = None, max_alloc: int | None = None, max_req_len: int | None = None)

  Bases: `object`

  Memory pool statistics data container.

  buf_size: int = None

    Buffer size.

  max_alloc: int = None

    Maximum number of allocations.

  max_req_len: int = None

    Maximum required length.

  num_alloc: int = None

    Number of allocations.

  num_buf: int = None

    Number of buffers.

class ScanParams(scan_type: int = 1, scan_interval: int = 256, scan_window: int = 256, addr_type: AddrType = AddrType.PUBLIC, filter_policy: int = 0)

  Bases: `object`

  Scan parameters data container.

  addr_type: AddrType = 0

    Own device address type.

  filter_policy: int = 0

    Scanning filter policy.

  scan_interval: int = 256

    Scan interval.

  scan_type: int = 1

    Scan type.

  scan_window: int = 256

    Scan duration.

class ScanPktStats(rx_adv: int | None = None, rx_adv_crc: int | None = None, rx_adv_timeout: int | None = None, tx_req: int | None = None, rx_rsp: int | None = None, rx_rsp_crc: int | None = None, rx_rsp_timeout: int | None = None, err_scan: int | None = None, rx_setup: int | None = None, tx_setup: int | None = None, rx_isr: int | None = None, tx_isr: int | None = None, rx_chain: int | None = None, rx_chain_crc: int | None = None, rx_chain_timeout: int | None = None)

  Bases: `object`

  Scanning statistics data container.

  err_scan: int = None

    Number of scan transaction errors.

  rx_adv: int = None

    Number of advertising packets received correctly.

  rx_adv_crc: int = None

    Number of advertising packets received with a CRC error.

  rx_adv_timeout: int = None

    Number of RX timeouts.

  rx_chain: int | None = None

    Number of chain packets received correctly.

    Note

    Value is only returned when retrieving auxiliary scanning statistics.

  rx_chain_crc: int | None = None

    Number of chain packets received with a CRC error.

    Note

    Value is only returned when retrieving auxiliary scanning statistics.

  rx_chain_timeout: int | None = None

    Number of chain packet RX timeouts.

    Note

    Value is only returned when retrieving auxiliary scanning statistics.

  rx_isr: int = None

    RX ISR processing watermark in microseconds.

  rx_rsp: int = None

    Number of advertising response packets received correctly.

  rx_rsp_crc: int = None

    Number of advertising response packets received with a CRC error.

  rx_rsp_timeout: int = None

    Number of advertising response RX timeouts.

  rx_setup: int = None

    RX packet setup watermark in microseconds.

  tx_isr: int = None

    TX ISR processing watermark in microseconds.

  tx_req: int = None

    Number of advertising requests sent.

  tx_setup: int = None

    TX packet setup watermark in microseconds.

class TestReport(rx_pkt_count: int | None = None, rx_oct_count: int | None = None, gen_pkt_count: int | None = None, gen_oct_count: int | None = None)

  Bases: `object`

  ISO/ACL test report data container.

  gen_oct_count: int = None

    Number of generated octets.

  gen_pkt_count: int = None

    Number of generated packets.

  rx_oct_count: int = None

    Number of octets received.

  rx_pkt_count: int = None

    Number of packets received.