Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
Zniffer
+ Collaboration diagram for Zniffer:

Data Structures

struct  _transport_t
 Transport. More...
 
struct  comm_interface_command_t
 
struct  comm_interface_frame_t
 
struct  comm_interface_beam_start_frame_t
 Beam start frame type. More...
 
struct  comm_interface_beam_stop_frame_t
 Beam stop frame type. More...
 

Macros

#define RECEIVE_BUFFER_SIZE   32
 Receive buffer size.
 
#define TRANSMIT_BUFFER_SIZE   180
 Transmit buffer size.
 

Typedefs

typedef void * transport_handle_t
 Transport handle type.
 
typedef struct _transport_t transport_t
 Transport.
 
typedef void(* transmit_done_cb_t) (transport_handle_t transport)
 Transmit done callback type.
 

Enumerations

enum  comm_interface_parse_result_t {
  PARSE_IDLE ,
  PARSE_FRAME_RECEIVED ,
  PARSE_FRAME_SENT ,
  PARSE_FRAME_ERROR ,
  PARSE_RX_TIMEOUT ,
  PARSE_TX_TIMEOUT
}
 Parsing result enum. More...
 

Functions

void comm_interface_transmit_command (uint8_t cmd, const uint8_t *payload, uint8_t len, transmit_done_cb_t cb)
 Transmit a command to the host.
 
void comm_interface_transmit_frame (uint16_t timestamp, uint8_t ch_and_speed, uint8_t region, int8_t rssi, const uint8_t *payload, uint8_t length, transmit_done_cb_t cb)
 Transmit a frame to the host.
 
void comm_interface_transmit_beam_start (uint16_t timestamp, uint8_t ch_and_speed, uint8_t region, int8_t rssi, const uint8_t *payload, uint8_t length, transmit_done_cb_t cb)
 Transmit a beam start frame to the host.
 
void comm_interface_transmit_beam_stop (uint16_t timestamp, int8_t rssi, uint16_t counter, transmit_done_cb_t cb)
 Transmit a beam stop frame to the host.
 
void comm_interface_wait_transmit_done (void)
 
void comm_interface_init (zpal_uart_id_t uart, void(*uart_rx_event_handler)())
 Initialize the communication interface.
 
comm_interface_parse_result_t comm_interface_parse_data (void)
 Parse the incomming data.
 
comm_interface_command_tcomm_interface_get_command (void)
 Get the received command.
 

Detailed Description

Macro Definition Documentation

◆ RECEIVE_BUFFER_SIZE

#define RECEIVE_BUFFER_SIZE   32

Receive buffer size.

◆ TRANSMIT_BUFFER_SIZE

#define TRANSMIT_BUFFER_SIZE   180

Transmit buffer size.

Typedef Documentation

◆ transmit_done_cb_t

typedef void(* transmit_done_cb_t) (transport_handle_t transport)

Transmit done callback type.

◆ transport_handle_t

typedef void* transport_handle_t

Transport handle type.

◆ transport_t

typedef struct _transport_t transport_t

Transport.

Enumeration Type Documentation

◆ comm_interface_parse_result_t

Parsing result enum.

Enumerator
PARSE_IDLE 

returned if nothing special has happened

PARSE_FRAME_RECEIVED 

returned when a valid frame has been received

PARSE_FRAME_SENT 

returned if frame was ACKed by the other end

PARSE_FRAME_ERROR 

returned if frame has error in Checksum

PARSE_RX_TIMEOUT 

returned if Rx timeout has happened

PARSE_TX_TIMEOUT 

returned if Tx timeout (waiting for ACK) ahs happened

Function Documentation

◆ comm_interface_get_command()

comm_interface_command_t * comm_interface_get_command ( void )

Get the received command.

Returns
comm_interface_command_t

◆ comm_interface_init()

void comm_interface_init ( zpal_uart_id_t uart,
void(*)() uart_rx_event_handler )

Initialize the communication interface.

Parameters
uart
uart_rx_event_handler

◆ comm_interface_parse_data()

comm_interface_parse_result_t comm_interface_parse_data ( void )

Parse the incomming data.

Returns
comm_interface_parse_result_t

◆ comm_interface_transmit_beam_start()

void comm_interface_transmit_beam_start ( uint16_t timestamp,
uint8_t ch_and_speed,
uint8_t region,
int8_t rssi,
const uint8_t * payload,
uint8_t length,
transmit_done_cb_t cb )

Transmit a beam start frame to the host.

Parameters
timestamp
ch_and_speed
region
rssi
payload
length
cb

◆ comm_interface_transmit_beam_stop()

void comm_interface_transmit_beam_stop ( uint16_t timestamp,
int8_t rssi,
uint16_t counter,
transmit_done_cb_t cb )

Transmit a beam stop frame to the host.

Parameters
timestamp
rssi
counter
cb

◆ comm_interface_transmit_command()

void comm_interface_transmit_command ( uint8_t cmd,
const uint8_t * payload,
uint8_t len,
transmit_done_cb_t cb )

Transmit a command to the host.

Parameters
cmd
payload
len
cb

◆ comm_interface_transmit_frame()

void comm_interface_transmit_frame ( uint16_t timestamp,
uint8_t ch_and_speed,
uint8_t region,
int8_t rssi,
const uint8_t * payload,
uint8_t length,
transmit_done_cb_t cb )

Transmit a frame to the host.

Parameters
timestamp
ch_and_speed
region
rssi
payload
length
cb

◆ comm_interface_wait_transmit_done()

void comm_interface_wait_transmit_done ( void )

Wait for a transmission to finish (blocking)