Wirepas SDK
attribute_frames.h File Reference

Detailed Description

Both CSAP and MSAP contain attributes for reading/writing. This header provides common frames for this purpose.

Definition in file attribute_frames.h.

Go to the source code of this file.

Data Structures

struct  read_req_t
 
struct  read_cnf_t
 
struct  write_req_t
 
struct  write_cnf_t
 
union  frame_attr
 

Enumerations

enum  attribute_result_e {
  ATTR_SUCCESS = 0, ATTR_UNSUPPORTED_ATTRIBUTE = 1, ATTR_INVALID_STACK_STATE = 2, ATTR_INV_LENGTH = 3,
  ATTR_INV_VALUE = 4, ATTR_WRITE_ONLY = 5, ATTR_ACCESS_DENIED = 6
}
 

Macros

#define WAPS_MAX_ATTR_LEN   16
 
#define FRAME_READ_CNF_HEADER_SIZE   (sizeof(read_cnf_t)-WAPS_MAX_ATTR_LEN)
 
#define FRAME_WRITE_REQ_HEADER_SIZE   (sizeof(write_req_t)-WAPS_MAX_ATTR_LEN)
 

Data Structure Documentation

◆ read_req_t

struct read_req_t

Read attribute request

Definition at line 20 of file attribute_frames.h.

Data Fields
attr_t attr_id

◆ read_cnf_t

struct read_cnf_t

Read attribute confirmation

Definition at line 38 of file attribute_frames.h.

Data Fields
uint8_t attr[16]
attr_t attr_id
uint8_t attr_len
uint8_t result

◆ write_req_t

struct write_req_t

Write attribute request

Definition at line 50 of file attribute_frames.h.

Data Fields
uint8_t attr[16]
attr_t attr_id
uint8_t attr_len

◆ write_cnf_t

struct write_cnf_t

Write attribute confirmation

Definition at line 61 of file attribute_frames.h.

Data Fields
uint8_t result

◆ frame_attr

union frame_attr

Definition at line 71 of file attribute_frames.h.

Data Fields
read_cnf_t read_cnf
read_req_t read_req
write_cnf_t write_cnf
write_req_t write_req

Enumeration Type Documentation

◆ attribute_result_e

Result of writing/reading a parameter

Enumerator
ATTR_SUCCESS 
ATTR_UNSUPPORTED_ATTRIBUTE 
ATTR_INVALID_STACK_STATE 
ATTR_INV_LENGTH 
ATTR_INV_VALUE 
ATTR_WRITE_ONLY 
ATTR_ACCESS_DENIED 

Definition at line 26 of file attribute_frames.h.

Macro Definition Documentation

◆ FRAME_READ_CNF_HEADER_SIZE

#define FRAME_READ_CNF_HEADER_SIZE   (sizeof(read_cnf_t)-WAPS_MAX_ATTR_LEN)

Definition at line 46 of file attribute_frames.h.

◆ FRAME_WRITE_REQ_HEADER_SIZE

#define FRAME_WRITE_REQ_HEADER_SIZE   (sizeof(write_req_t)-WAPS_MAX_ATTR_LEN)

Definition at line 57 of file attribute_frames.h.

◆ WAPS_MAX_ATTR_LEN

#define WAPS_MAX_ATTR_LEN   16

Definition at line 17 of file attribute_frames.h.

ATTR_SUCCESS
@ ATTR_SUCCESS
Definition: attribute_frames.h:28
ATTR_INV_VALUE
@ ATTR_INV_VALUE
Definition: attribute_frames.h:32
ATTR_WRITE_ONLY
@ ATTR_WRITE_ONLY
Definition: attribute_frames.h:33
ATTR_INVALID_STACK_STATE
@ ATTR_INVALID_STACK_STATE
Definition: attribute_frames.h:30
ATTR_INV_LENGTH
@ ATTR_INV_LENGTH
Definition: attribute_frames.h:31
attribute_result_e
attribute_result_e
Definition: attribute_frames.h:26
ATTR_UNSUPPORTED_ATTRIBUTE
@ ATTR_UNSUPPORTED_ATTRIBUTE
Definition: attribute_frames.h:29
ATTR_ACCESS_DENIED
@ ATTR_ACCESS_DENIED
Definition: attribute_frames.h:34