gls_racp.h
Go to the documentation of this file.
1 
53 #ifndef __GLS_RACP_H__
54 #define __GLS_RACP_H__
55 
56 /*
57  * INCLUDE FILES
58  ****************************************************************************************
59  */
60 #include "ble_prf_types.h"
61 #include "gr55xx_sys.h"
62 #include <stdint.h>
63 #include <stdbool.h>
64 
69 #define GLS_RACP_FILTER_SEQ_NUM_LEN 2
70 #define GLS_RACP_FILTER_USER_TIME_LEN 7
78 typedef enum
79 {
88 
90 typedef enum
91 {
100 
102 typedef enum
103 {
116 
118 typedef enum
119 {
131 typedef struct
132 {
135  union
136  {
137  struct
138  {
139  uint16_t min;
140  uint16_t max;
141  } seq_num;
142  struct
143  {
146  } time;
147  } val;
149 
151 typedef struct
152 {
156 
158 typedef struct
159 {
162  union
163  {
164  uint16_t num_of_record;
165  struct
166  {
169  } rsp;
170  } operand;
189 gls_racp_operand_t gls_racp_req_decode(const uint8_t *p_data, uint16_t length, gls_racp_req_t *p_racp_req);
190 
201 uint16_t gls_racp_rsp_encode(gls_racp_rsp_t *p_racp_rsp, uint8_t *p_encoded_buffer);
202 
216 int8_t gls_racp_user_time_compare(prf_date_time_t *p_compared_date_time, prf_date_time_t *p_base_date_time);
219 #endif
220 
gls_racp_req_t::filter
gls_racp_filter_t filter
Definition: gls_racp.h:154
GLS_RACP_FILTER_RESERVED
@ GLS_RACP_FILTER_RESERVED
Definition: gls_racp.h:120
GLS_RACP_RSP_NO_RECS_FOUND
@ GLS_RACP_RSP_NO_RECS_FOUND
Definition: gls_racp.h:110
GLS_RACP_RSP_RESERVED
@ GLS_RACP_RSP_RESERVED
Definition: gls_racp.h:104
GLS_RACP_OP_NB_OF_STRD_RECS_RSP
@ GLS_RACP_OP_NB_OF_STRD_RECS_RSP
Definition: gls_racp.h:85
GLS_RACP_OPERATOR_FIRST_REC
@ GLS_RACP_OPERATOR_FIRST_REC
Definition: gls_racp.h:97
gls_racp_rsp_t::op_code
gls_racp_op_code_t op_code
Definition: gls_racp.h:160
GLS_RACP_OPERATOR_NULL
@ GLS_RACP_OPERATOR_NULL
Definition: gls_racp.h:92
GLS_RACP_OPERATOR_ALL_RECS
@ GLS_RACP_OPERATOR_ALL_RECS
Definition: gls_racp.h:93
GLS_RACP_OP_REP_NB_OF_STRD_RECS
@ GLS_RACP_OP_REP_NB_OF_STRD_RECS
Definition: gls_racp.h:84
GLS_RACP_OP_RSP_CODE
@ GLS_RACP_OP_RSP_CODE
Definition: gls_racp.h:86
gr55xx_sys.h
GR55XX System API.
gls_racp_rsp_t::op_code_req
gls_racp_op_code_t op_code_req
Definition: gls_racp.h:167
gls_racp_rsp_t::racp_operator
gls_racp_operator_t racp_operator
Definition: gls_racp.h:161
GLS_RACP_FILTER_USER_FACING_TIME
@ GLS_RACP_FILTER_USER_FACING_TIME
Definition: gls_racp.h:122
GLS_RACP_OP_REP_STRD_RECS
@ GLS_RACP_OP_REP_STRD_RECS
Definition: gls_racp.h:81
gls_racp_user_time_compare
int8_t gls_racp_user_time_compare(prf_date_time_t *p_compared_date_time, prf_date_time_t *p_base_date_time)
Compared two date time.
GLS_RACP_FILTER_SEQ_NUMBER
@ GLS_RACP_FILTER_SEQ_NUMBER
Definition: gls_racp.h:121
gls_racp_filter_t::min
uint16_t min
Definition: gls_racp.h:139
gls_racp_filter_t::racp_operator
gls_racp_operator_t racp_operator
Definition: gls_racp.h:133
GLS_RACP_OPERATOR_WITHIN_RANGE_OF
@ GLS_RACP_OPERATOR_WITHIN_RANGE_OF
Definition: gls_racp.h:96
gls_racp_rsp_t::num_of_record
uint16_t num_of_record
Definition: gls_racp.h:164
gls_racp_rsp_encode
uint16_t gls_racp_rsp_encode(gls_racp_rsp_t *p_racp_rsp, uint8_t *p_encoded_buffer)
Encode record access control point response.
GLS_RACP_OPERATOR_GT_OR_EQ
@ GLS_RACP_OPERATOR_GT_OR_EQ
Definition: gls_racp.h:95
gls_racp_operator_t
gls_racp_operator_t
Glucose Recoerd Access Control Point Operator.
Definition: gls_racp.h:91
gls_racp_req_t
Glucose Recoerd Access Control Point request value.
Definition: gls_racp.h:152
gls_racp_filter_t::max
prf_date_time_t max
Definition: gls_racp.h:145
GLS_RACP_OP_RESERVED
@ GLS_RACP_OP_RESERVED
Definition: gls_racp.h:80
ble_prf_types.h
Profile/Service Common Types.
GLS_RACP_RSP_OPERATOR_NOT_SUP
@ GLS_RACP_RSP_OPERATOR_NOT_SUP
Definition: gls_racp.h:108
GLS_RACP_RSP_OP_CODE_NOT_SUP
@ GLS_RACP_RSP_OP_CODE_NOT_SUP
Definition: gls_racp.h:106
GLS_RACP_OPERATOR_LAST_REC
@ GLS_RACP_OPERATOR_LAST_REC
Definition: gls_racp.h:98
gls_racp_filter_t::max
uint16_t max
Definition: gls_racp.h:140
GLS_RACP_OPERATOR_LE_OR_EQ
@ GLS_RACP_OPERATOR_LE_OR_EQ
Definition: gls_racp.h:94
prf_date_time_t
The date and time structure. The packed size is 7 bytes.
Definition: ble_prf_types.h:101
gls_racp_op_code_t
gls_racp_op_code_t
Glucose Recoerd Access Control Point Operation Codes.
Definition: gls_racp.h:79
gls_racp_operand_t
gls_racp_operand_t
Glucose Recoerd Access Control Point Response codes.
Definition: gls_racp.h:103
gls_racp_filter_t::min
prf_date_time_t min
Definition: gls_racp.h:144
GLS_RACP_RSP_VALID_DECODE
@ GLS_RACP_RSP_VALID_DECODE
Definition: gls_racp.h:114
GLS_RACP_RSP_SUCCESS
@ GLS_RACP_RSP_SUCCESS
Definition: gls_racp.h:105
GLS_RACP_OP_ABORT_OP
@ GLS_RACP_OP_ABORT_OP
Definition: gls_racp.h:83
GLS_RACP_RSP_OPERAND_NOT_SUP
@ GLS_RACP_RSP_OPERAND_NOT_SUP
Definition: gls_racp.h:113
GLS_RACP_RSP_ABORT_UNSUCCESSFUL
@ GLS_RACP_RSP_ABORT_UNSUCCESSFUL
Definition: gls_racp.h:111
GLS_RACP_OP_DEL_STRD_RECS
@ GLS_RACP_OP_DEL_STRD_RECS
Definition: gls_racp.h:82
GLS_RACP_RSP_PROCEDURE_NOT_COMPLETED
@ GLS_RACP_RSP_PROCEDURE_NOT_COMPLETED
Definition: gls_racp.h:112
gls_racp_rsp_t
Glucose Recoerd Access Control Point response value.
Definition: gls_racp.h:159
gls_racp_rsp_t::status
gls_racp_operand_t status
Definition: gls_racp.h:168
gls_racp_filter_t
Glucose Recoerd Access Control Point filter value.
Definition: gls_racp.h:132
gls_racp_req_t::op_code
gls_racp_op_code_t op_code
Definition: gls_racp.h:153
gls_racp_filter_type_t
gls_racp_filter_type_t
Glucose Recoerd Access Control Point filter types.
Definition: gls_racp.h:119
gls_racp_req_decode
gls_racp_operand_t gls_racp_req_decode(const uint8_t *p_data, uint16_t length, gls_racp_req_t *p_racp_req)
Decode record access control point request.
GLS_RACP_RSP_INVALID_OPERATOR
@ GLS_RACP_RSP_INVALID_OPERATOR
Definition: gls_racp.h:107
GLS_RACP_RSP_INVALID_OPERAND
@ GLS_RACP_RSP_INVALID_OPERAND
Definition: gls_racp.h:109
gls_racp_filter_t::racp_filter_type
gls_racp_filter_type_t racp_filter_type
Definition: gls_racp.h:134