Wirepas SDK
attribute_frames.h
Go to the documentation of this file.
1/* Copyright 2017 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
7#ifndef ATTRIBUTE_FRAMES_H_
8#define ATTRIBUTE_FRAMES_H_
9
16/* How much space is reserved for attributes in attribute related primitive */
17#define WAPS_MAX_ATTR_LEN 16
18
20typedef struct __attribute__ ((__packed__))
21{
24
36
38typedef struct __attribute__ ((__packed__))
39{
40 uint8_t result;
42 uint8_t attr_len;
43 uint8_t attr[WAPS_MAX_ATTR_LEN];
45
46#define FRAME_READ_CNF_HEADER_SIZE \
47 (sizeof(read_cnf_t)-WAPS_MAX_ATTR_LEN)
48
50typedef struct __attribute__ ((__packed__))
51{
53 uint8_t attr_len;
54 uint8_t attr[WAPS_MAX_ATTR_LEN];
56
57#define FRAME_WRITE_REQ_HEADER_SIZE \
58 (sizeof(write_req_t)-WAPS_MAX_ATTR_LEN)
59
61typedef struct __attribute__ ((__packed__))
62{
63 uint8_t result;
65
66//assert_static(sizeof(read_cnf_t) == 20);
67//assert_static(sizeof(read_req_t) == 2);
68//assert_static(sizeof(write_req_t) == 19);
69//assert_static(sizeof(write_cnf_t) == 1);
70
78
79#endif /* ATTRIBUTE_FRAMES_H_ */
#define WAPS_MAX_ATTR_LEN
read_req_t read_req
attribute_result_e
@ ATTR_UNSUPPORTED_ATTRIBUTE
@ ATTR_INV_LENGTH
@ ATTR_ACCESS_DENIED
@ ATTR_INVALID_STACK_STATE
@ ATTR_INV_VALUE
@ ATTR_SUCCESS
@ ATTR_WRITE_ONLY
write_cnf_t write_cnf
write_req_t write_req
read_cnf_t read_cnf
uint16_t attr_t
Definition waps_frames.h:20