WISP ERT (Client)
1.0.0
The WISP Extended Runtime (WISP side)
|
Functions | |
static wtp_status_t | wtp_handle_open (wtp_t *self, wio_buf_t *buf) |
Handle WTP open packet. More... | |
static wtp_status_t | wtp_handle_ack (wtp_t *self, wio_buf_t *buf) |
Handle WTP acknowledgement packet. More... | |
static wtp_status_t | wtp_handle_msg_packet (wtp_t *self, wio_buf_t *buf, bool begin_msg) |
Handle WTP message packet. More... | |
static wtp_status_t | wtp_handle_begin_msg (wtp_t *self, wio_buf_t *buf) |
Handle WTP begin message packet. More... | |
static wtp_status_t | wtp_handle_cont_msg (wtp_t *self, wio_buf_t *buf) |
Handle WTP continue message packet. More... | |
static wtp_status_t | wtp_handle_set_param (wtp_t *self, wio_buf_t *buf) |
Handle WTP set parameter message packet. More... | |
wtp_status_t | wtp_init (wtp_t *self, uint8_t *epc_mem, uint16_t epc_buf_size, uint8_t *read_mem, uint8_t *write_mem, uint16_t window_size, uint16_t timeout, uint16_t tx_buf_size, uint16_t rx_buf_size, uint8_t n_send, uint8_t n_recv) |
Initialize WTP endpoint. More... | |
wtp_status_t | wtp_fini (wtp_t *self) |
Finalize WTP endpoint. More... | |
wtp_status_t | wtp_connect (wtp_t *self) |
Connect to WTP server. More... | |
wtp_status_t | wtp_close (wtp_t *self) |
Disconnect from WTP server. More... | |
wtp_status_t | wtp_send (wtp_t *self, uint8_t *data, uint16_t size, void *cb_data, wio_callback_t cb) |
Send message to WTP server. More... | |
wtp_status_t | wtp_recv (wtp_t *self, void *cb_data, wio_callback_t cb) |
Receive message from WTP server. More... | |
wtp_status_t | wtp_on_event (wtp_t *self, wtp_event_t event, void *cb_data, wio_callback_t cb) |
Set WTP event handler. More... | |
wtp_status_t | wtp_trigger_event (wtp_t *self, wtp_event_t event, wtp_status_t status, void *result) |
Trigger WTP event. More... | |
wtp_status_t | wtp_load_read_mem (wtp_t *self) |
Load RFID READ memory for WTP communication. More... | |
wtp_status_t | wtp_handle_blockwrite (wtp_t *self) |
Handle RFID BLOCKWRITE operation. More... | |
wtp_status_t | wtp_verify_checksum (wtp_t *self, wio_buf_t *write_buf) |
Verify the checksum of received WTP packet. More... | |
uint8_t | wtp_xor_checksum (uint8_t *mem, uint16_t begin, uint16_t end) |
WTP Xor checksum function. More... | |
Variables | |
wtp_pkt_handler_t | wtp_pkt_handlers [] |
WTP packet handlers. More... | |
wtp_status_t wtp_close | ( | wtp_t * | self | ) |
Disconnect from WTP server.
wtp_status_t wtp_connect | ( | wtp_t * | self | ) |
Connect to WTP server.
wtp_status_t wtp_fini | ( | wtp_t * | self | ) |
Finalize WTP endpoint.
|
static |
Handle WTP acknowledgement packet.
self | WTP endpoint instance. |
buf | Received packets buffer. |
|
static |
Handle WTP begin message packet.
self | WTP endpoint instance. |
buf | Received packets buffer. |
wtp_status_t wtp_handle_blockwrite | ( | wtp_t * | self | ) |
Handle RFID BLOCKWRITE operation.
|
static |
Handle WTP continue message packet.
self | WTP endpoint instance. |
buf | Received packets buffer. |
|
static |
Handle WTP message packet.
self | WTP endpoint instance. |
buf | Received packets buffer. |
begin_msg | True for WTP_PKT_BEGIN_MSG and false for WTP_PKT_CONT_MSG. |
|
static |
Handle WTP open packet.
self | WTP endpoint instance. |
buf | Received packets buffer. |
|
static |
Handle WTP set parameter message packet.
self | WTP endpoint instance. |
buf | Received packets buffer. |
wtp_status_t wtp_init | ( | wtp_t * | self, |
uint8_t * | epc_mem, | ||
uint16_t | epc_buf_size, | ||
uint8_t * | read_mem, | ||
uint8_t * | write_mem, | ||
uint16_t | window_size, | ||
uint16_t | timeout, | ||
uint16_t | tx_buf_size, | ||
uint16_t | rx_buf_size, | ||
uint8_t | n_send, | ||
uint8_t | n_recv | ||
) |
Initialize WTP endpoint.
wtp_status_t wtp_load_read_mem | ( | wtp_t * | self | ) |
Load RFID READ memory for WTP communication.
wtp_status_t wtp_on_event | ( | wtp_t * | self, |
wtp_event_t | event, | ||
void * | cb_data, | ||
wio_callback_t | cb | ||
) |
Set WTP event handler.
wtp_status_t wtp_recv | ( | wtp_t * | self, |
void * | cb_data, | ||
wio_callback_t | cb | ||
) |
Receive message from WTP server.
wtp_status_t wtp_send | ( | wtp_t * | self, |
uint8_t * | data, | ||
uint16_t | size, | ||
void * | cb_data, | ||
wio_callback_t | cb | ||
) |
Send message to WTP server.
wtp_status_t wtp_trigger_event | ( | wtp_t * | self, |
wtp_event_t | event, | ||
wtp_status_t | status, | ||
void * | result | ||
) |
Trigger WTP event.
wtp_status_t wtp_verify_checksum | ( | wtp_t * | self, |
wio_buf_t * | write_buf | ||
) |
Verify the checksum of received WTP packet.
uint8_t wtp_xor_checksum | ( | uint8_t * | mem, |
uint16_t | begin, | ||
uint16_t | end | ||
) |
WTP Xor checksum function.
wtp_pkt_handler_t wtp_pkt_handlers |
WTP packet handlers.