Wirepas SDK
dsap_frames.h File Reference

Go to the source code of this file.

Data Structures

struct  dsap_data_tx_req_t
 
struct  dsap_data_tx_tt_req_t
 
struct  dsap_data_tx_frag_req_t
 
struct  dsap_data_rx_ind_t
 
struct  dsap_data_rx_frag_ind_t
 
struct  dsap_data_tx_ind_t
 
struct  dsap_data_tx_cnf_t
 
union  frame_dsap
 

Enumerations

enum  dsap_tx_result_e {
  DSAP_TX_SUCCESS = 0, DSAP_TX_STACK_STOPPED = 1, DSAP_TX_INV_QOS_PARAM = 2, DSAP_TX_INV_OPTS_PARAM = 3,
  DSAP_TX_OUT_OF_MEMORY = 4, DSAP_TX_UNKNOWN_DST = 5, DSAP_TX_INV_LEN = 6, DSAP_TX_IND_FULL = 7,
  DSAP_TX_INV_PDU_ID = 8, DSAP_TX_RESV_EP = 9, DSAP_TX_ACCESS_DENIED = 10
}
 
enum  dsap_indication_e { DSAP_IND_SUCCESS = 0, DSAP_IND_TIMEOUT = 1 }
 
enum  dsap_tx_options_e { TX_OPTS_NO_IND_REQ = 0, TX_OPTS_IND_REQ = 1, TX_OPTS_UNACK_CSMA_CA = 2, TX_OPTS_HOPLIMIT_MASK = 0x3c }
 
enum  dsap_qos_e { DSAP_QOS_NORMAL = 0, DSAP_QOS_HIGH = 1, DSAP_QOS_UNACKED = 2 }
 

Macros

#define TX_OPTS_HOPLIMIT_OFFSET   2
 
#define APDU_MAX_SIZE   102
 
#define FRAME_DSAP_DATA_TX_REQ_HEADER_SIZE   (sizeof(dsap_data_tx_req_t) - APDU_MAX_SIZE)
 
#define FRAME_DSAP_DATA_TX_TT_REQ_HEADER_SIZE   (sizeof(dsap_data_tx_tt_req_t) - APDU_MAX_SIZE)
 
#define FRAME_DSAP_DATA_TX_FRAG_REQ_HEADER_SIZE   (sizeof(dsap_data_tx_frag_req_t) - APDU_MAX_SIZE)
 
#define RX_IND_INFO_QOS_MASK   0x3
 
#define RX_IND_INFO_QOS_OFFSET   0
 
#define RX_IND_INFO_HOPCOUNT_MASK   0xfc
 
#define RX_IND_INFO_HOPCOUNT_OFFSET   2
 
#define RX_IND_INFO_MAX_HOPCOUNT   (RX_IND_INFO_HOPCOUNT_MASK >> RX_IND_INFO_HOPCOUNT_OFFSET)
 
#define DSAP_FRAG_LENGTH_MASK   0x0fff
 
#define DSAP_FRAG_LAST_FLAG_MASK   0x8000
 
#define FRAME_DSAP_DATA_RX_IND_HEADER_SIZE   (sizeof(dsap_data_rx_ind_t) - APDU_MAX_SIZE)
 
#define FRAME_DSAP_DATA_RX_FRAG_IND_HEADER_SIZE   (sizeof(dsap_data_rx_frag_ind_t) - APDU_MAX_SIZE)
 

Data Structure Documentation

◆ dsap_data_tx_req_t

struct dsap_data_tx_req_t

Definition at line 57 of file dsap_frames.h.

Data Fields
uint8_t apdu[102]
pduid_t apdu_id
uint8_t apdu_len
w_addr_t dst_addr
ep_t dst_endpoint
uint8_t qos
ep_t src_endpoint
uint8_t tx_opts

◆ dsap_data_tx_tt_req_t

struct dsap_data_tx_tt_req_t

Definition at line 74 of file dsap_frames.h.

Data Fields
uint8_t apdu[102]
pduid_t apdu_id
uint8_t apdu_len
w_addr_t dst_addr
ep_t dst_endpoint
uint8_t qos
uint32_t reserved
ep_t src_endpoint
uint8_t tx_opts

◆ dsap_data_tx_frag_req_t

struct dsap_data_tx_frag_req_t

Definition at line 90 of file dsap_frames.h.

Data Fields
uint8_t apdu[102]
pduid_t apdu_id
uint8_t apdu_len
w_addr_t dst_addr
ep_t dst_endpoint
uint16_t fragment_offset_flag
uint16_t full_packet_id: 12
uint8_t qos
uint32_t reserved
ep_t src_endpoint
uint8_t tx_opts

◆ dsap_data_rx_ind_t

struct dsap_data_rx_ind_t

Definition at line 129 of file dsap_frames.h.

Data Fields
uint8_t apdu[102]
uint8_t apdu_len
uint32_t delay
w_addr_t dst_addr
ep_t dst_endpoint
uint8_t info
uint8_t queued_indications
w_addr_t src_addr
ep_t src_endpoint

◆ dsap_data_rx_frag_ind_t

struct dsap_data_rx_frag_ind_t

Definition at line 149 of file dsap_frames.h.

Data Fields
uint8_t apdu[102]
uint8_t apdu_len
uint32_t delay
w_addr_t dst_addr
ep_t dst_endpoint
uint16_t fragment_offset_flag
uint16_t full_packet_id
uint8_t info
uint8_t queued_indications
w_addr_t src_addr
ep_t src_endpoint

◆ dsap_data_tx_ind_t

struct dsap_data_tx_ind_t

Definition at line 171 of file dsap_frames.h.

Data Fields
pduid_t apdu_id
w_addr_t dst_addr
ep_t dst_endpoint
uint32_t queue_delay
uint8_t queued_indications
uint8_t result
ep_t src_endpoint

◆ dsap_data_tx_cnf_t

struct dsap_data_tx_cnf_t

Definition at line 184 of file dsap_frames.h.

Data Fields
pduid_t apdu_id
uint8_t buff_cap
uint8_t result

◆ frame_dsap

union frame_dsap

Definition at line 191 of file dsap_frames.h.

Data Fields
dsap_data_rx_frag_ind_t data_rx_frag_ind
dsap_data_rx_ind_t data_rx_ind
dsap_data_tx_cnf_t data_tx_cnf
dsap_data_tx_frag_req_t data_tx_frag_req
dsap_data_tx_ind_t data_tx_ind
dsap_data_tx_req_t data_tx_req
dsap_data_tx_tt_req_t data_tx_tt_req

Enumeration Type Documentation

◆ dsap_indication_e

Enumerator
DSAP_IND_SUCCESS 
DSAP_IND_TIMEOUT 

Definition at line 26 of file dsap_frames.h.

27 {
28  DSAP_IND_SUCCESS = 0,
29  DSAP_IND_TIMEOUT = 1,

◆ dsap_qos_e

enum dsap_qos_e

QOS classes of WAPS_DSAP_DATA.request

Enumerator
DSAP_QOS_NORMAL 

Normal priority packet

DSAP_QOS_HIGH 

High priority packet

DSAP_QOS_UNACKED 

Unacknowledged packet

Definition at line 45 of file dsap_frames.h.

46 {
47  DSAP_QOS_NORMAL = 0,
48  DSAP_QOS_HIGH = 1,
49  DSAP_QOS_UNACKED = 2
50 } dsap_qos_e;

◆ dsap_tx_options_e

TX options of WAPS_DSAP_DATA.request

Enumerator
TX_OPTS_NO_IND_REQ 
TX_OPTS_IND_REQ 

No indication req when pkt sent

TX_OPTS_UNACK_CSMA_CA 

Indication req

TX_OPTS_HOPLIMIT_MASK 

Unack CSMA-CA packet

Definition at line 33 of file dsap_frames.h.

34 {
35  TX_OPTS_NO_IND_REQ = 0,
36  TX_OPTS_IND_REQ = 1,
38  TX_OPTS_HOPLIMIT_MASK = 0x3c,

◆ dsap_tx_result_e

Result of transmitted packet

Enumerator
DSAP_TX_SUCCESS 
DSAP_TX_STACK_STOPPED 
DSAP_TX_INV_QOS_PARAM 
DSAP_TX_INV_OPTS_PARAM 
DSAP_TX_OUT_OF_MEMORY 
DSAP_TX_UNKNOWN_DST 
DSAP_TX_INV_LEN 
DSAP_TX_IND_FULL 
DSAP_TX_INV_PDU_ID 
DSAP_TX_RESV_EP 
DSAP_TX_ACCESS_DENIED 

Definition at line 11 of file dsap_frames.h.

12 {
13  DSAP_TX_SUCCESS = 0,
18  DSAP_TX_UNKNOWN_DST = 5, // Not used as of version 5.0
19  DSAP_TX_INV_LEN = 6,
20  DSAP_TX_IND_FULL = 7,
22  DSAP_TX_RESV_EP = 9,

Macro Definition Documentation

◆ APDU_MAX_SIZE

#define APDU_MAX_SIZE   102

Maximum size of transmittable data APDU via WAPS/DSAP interface

Definition at line 53 of file dsap_frames.h.

◆ DSAP_FRAG_LAST_FLAG_MASK

#define DSAP_FRAG_LAST_FLAG_MASK   0x8000

Definition at line 127 of file dsap_frames.h.

◆ DSAP_FRAG_LENGTH_MASK

#define DSAP_FRAG_LENGTH_MASK   0x0fff

Definition at line 124 of file dsap_frames.h.

◆ FRAME_DSAP_DATA_RX_FRAG_IND_HEADER_SIZE

#define FRAME_DSAP_DATA_RX_FRAG_IND_HEADER_SIZE   (sizeof(dsap_data_rx_frag_ind_t) - APDU_MAX_SIZE)

Definition at line 166 of file dsap_frames.h.

◆ FRAME_DSAP_DATA_RX_IND_HEADER_SIZE

#define FRAME_DSAP_DATA_RX_IND_HEADER_SIZE   (sizeof(dsap_data_rx_ind_t) - APDU_MAX_SIZE)

Definition at line 143 of file dsap_frames.h.

◆ FRAME_DSAP_DATA_TX_FRAG_REQ_HEADER_SIZE

#define FRAME_DSAP_DATA_TX_FRAG_REQ_HEADER_SIZE   (sizeof(dsap_data_tx_frag_req_t) - APDU_MAX_SIZE)

Definition at line 106 of file dsap_frames.h.

◆ FRAME_DSAP_DATA_TX_REQ_HEADER_SIZE

#define FRAME_DSAP_DATA_TX_REQ_HEADER_SIZE   (sizeof(dsap_data_tx_req_t) - APDU_MAX_SIZE)

Definition at line 69 of file dsap_frames.h.

◆ FRAME_DSAP_DATA_TX_TT_REQ_HEADER_SIZE

#define FRAME_DSAP_DATA_TX_TT_REQ_HEADER_SIZE   (sizeof(dsap_data_tx_tt_req_t) - APDU_MAX_SIZE)

Definition at line 87 of file dsap_frames.h.

◆ RX_IND_INFO_HOPCOUNT_MASK

#define RX_IND_INFO_HOPCOUNT_MASK   0xfc

Definition at line 116 of file dsap_frames.h.

◆ RX_IND_INFO_HOPCOUNT_OFFSET

#define RX_IND_INFO_HOPCOUNT_OFFSET   2

Definition at line 117 of file dsap_frames.h.

◆ RX_IND_INFO_MAX_HOPCOUNT

#define RX_IND_INFO_MAX_HOPCOUNT   (RX_IND_INFO_HOPCOUNT_MASK >> RX_IND_INFO_HOPCOUNT_OFFSET)

Definition at line 118 of file dsap_frames.h.

◆ RX_IND_INFO_QOS_MASK

#define RX_IND_INFO_QOS_MASK   0x3

Definition at line 113 of file dsap_frames.h.

◆ RX_IND_INFO_QOS_OFFSET

#define RX_IND_INFO_QOS_OFFSET   0

Definition at line 114 of file dsap_frames.h.

◆ TX_OPTS_HOPLIMIT_OFFSET

#define TX_OPTS_HOPLIMIT_OFFSET   2

Definition at line 42 of file dsap_frames.h.

dsap_indication_e
dsap_indication_e
Definition: dsap_frames.h:26
DSAP_TX_OUT_OF_MEMORY
@ DSAP_TX_OUT_OF_MEMORY
Definition: dsap_frames.h:17
DSAP_TX_INV_PDU_ID
@ DSAP_TX_INV_PDU_ID
Definition: dsap_frames.h:21
TX_OPTS_NO_IND_REQ
@ TX_OPTS_NO_IND_REQ
Definition: dsap_frames.h:35
dsap_qos_e
dsap_qos_e
Definition: dsap_frames.h:45
TX_OPTS_HOPLIMIT_MASK
@ TX_OPTS_HOPLIMIT_MASK
Definition: dsap_frames.h:38
TX_OPTS_UNACK_CSMA_CA
@ TX_OPTS_UNACK_CSMA_CA
Definition: dsap_frames.h:37
DSAP_IND_TIMEOUT
@ DSAP_IND_TIMEOUT
Definition: dsap_frames.h:29
DSAP_IND_SUCCESS
@ DSAP_IND_SUCCESS
Definition: dsap_frames.h:28
dsap_tx_options_e
dsap_tx_options_e
Definition: dsap_frames.h:33
DSAP_TX_INV_OPTS_PARAM
@ DSAP_TX_INV_OPTS_PARAM
Definition: dsap_frames.h:16
DSAP_TX_STACK_STOPPED
@ DSAP_TX_STACK_STOPPED
Definition: dsap_frames.h:14
DSAP_TX_RESV_EP
@ DSAP_TX_RESV_EP
Definition: dsap_frames.h:22
DSAP_QOS_UNACKED
@ DSAP_QOS_UNACKED
Definition: dsap_frames.h:49
DSAP_QOS_HIGH
@ DSAP_QOS_HIGH
Definition: dsap_frames.h:48
TX_OPTS_IND_REQ
@ TX_OPTS_IND_REQ
Definition: dsap_frames.h:36
DSAP_TX_INV_LEN
@ DSAP_TX_INV_LEN
Definition: dsap_frames.h:19
DSAP_TX_ACCESS_DENIED
@ DSAP_TX_ACCESS_DENIED
Definition: dsap_frames.h:23
DSAP_TX_INV_QOS_PARAM
@ DSAP_TX_INV_QOS_PARAM
Definition: dsap_frames.h:15
DSAP_TX_UNKNOWN_DST
@ DSAP_TX_UNKNOWN_DST
Definition: dsap_frames.h:18
DSAP_TX_IND_FULL
@ DSAP_TX_IND_FULL
Definition: dsap_frames.h:20
dsap_tx_result_e
dsap_tx_result_e
Definition: dsap_frames.h:11
DSAP_QOS_NORMAL
@ DSAP_QOS_NORMAL
Definition: dsap_frames.h:47
DSAP_TX_SUCCESS
@ DSAP_TX_SUCCESS
Definition: dsap_frames.h:13