nRF51 SDK
|
Record Access Control Point library. More...
Data Structures | |
struct | ble_racp_value_t |
Record Access Control Point value structure. More... | |
Functions | |
void | ble_racp_decode (uint8_t data_len, uint8_t *p_data, ble_racp_value_t *p_racp_val) |
Function for decoding a Record Access Control Point write. More... | |
uint8_t | ble_racp_encode (const ble_racp_value_t *p_racp_val, uint8_t *p_data) |
Function for encoding a Record Access Control Point response. More... | |
Record Access Control Point library.
#define RACP_OPCODE_ABORT_OPERATION 3 |
Record Access Control Point opcode - Abort operation.
#define RACP_OPCODE_DELETE_RECS 2 |
Record Access Control Point opcode - Delete stored records.
#define RACP_OPCODE_NUM_RECS_RESPONSE 5 |
Record Access Control Point opcode - Number of stored records response.
#define RACP_OPCODE_REPORT_NUM_RECS 4 |
Record Access Control Point opcode - Report number of stored records.
#define RACP_OPCODE_REPORT_RECS 1 |
Record Access Control Point opcode - Report stored records.
#define RACP_OPCODE_RESERVED 0 |
Record Access Control Point opcodes.
Record Access Control Point opcode - Reserved for future use.
#define RACP_OPCODE_RESPONSE_CODE 6 |
Record Access Control Point opcode - Response code.
#define RACP_OPERATOR_ALL 1 |
Record Access Control Point operator - All records.
#define RACP_OPERATOR_FIRST 5 |
Record Access Control Point operator - First record (i.e. oldest record).
#define RACP_OPERATOR_GREATER_OR_EQUAL 3 |
Record Access Control Point operator - Greater than or equal to.
#define RACP_OPERATOR_LAST 6 |
Record Access Control Point operator - Last record (i.e. most recent record).
#define RACP_OPERATOR_LESS_OR_EQUAL 2 |
Record Access Control Point operator - Less than or equal to.
#define RACP_OPERATOR_NULL 0 |
Record Access Control Point operators.
Record Access Control Point operator - Null.
#define RACP_OPERATOR_RANGE 4 |
Record Access Control Point operator - Within range of (inclusive).
#define RACP_OPERATOR_RFU_START 7 |
Record Access Control Point operator - Start of Reserved for Future Use area.
#define RACP_RESPONSE_ABORT_FAILED 7 |
Record Access Control Point response code - Abort could not be completed.
#define RACP_RESPONSE_INVALID_OPERAND 5 |
Record Access Control Point response code - Operand not valid for service.
#define RACP_RESPONSE_INVALID_OPERATOR 3 |
Record Access Control Point response code - Operator not valid for service.
#define RACP_RESPONSE_NO_RECORDS_FOUND 6 |
Record Access Control Point response code - No matching records found.
#define RACP_RESPONSE_OPCODE_UNSUPPORTED 2 |
Record Access Control Point response code - Unsupported op code received.
#define RACP_RESPONSE_OPERAND_UNSUPPORTED 9 |
Record Access Control Point response code - Unsupported operand.
#define RACP_RESPONSE_OPERATOR_UNSUPPORTED 4 |
Record Access Control Point response code - Unsupported operator.
#define RACP_RESPONSE_PROCEDURE_NOT_DONE 8 |
Record Access Control Point response code - Procedure could not be completed.
#define RACP_RESPONSE_RESERVED 0 |
Record Access Control Point response codes.
Record Access Control Point response code - Reserved for future use.
#define RACP_RESPONSE_SUCCESS 1 |
Record Access Control Point response code - Successful operation.
void ble_racp_decode | ( | uint8_t | data_len, |
uint8_t * | p_data, | ||
ble_racp_value_t * | p_racp_val | ||
) |
Function for decoding a Record Access Control Point write.
This call decodes a write to the Record Access Control Point.
[in] | data_len | Length of data in received write. |
[in] | p_data | Pointer to received data. |
[out] | p_racp_val | Pointer to decoded Record Access Control Point write. |
uint8_t ble_racp_encode | ( | const ble_racp_value_t * | p_racp_val, |
uint8_t * | p_data | ||
) |
Function for encoding a Record Access Control Point response.
This call encodes a response from the Record Access Control Point response.
[in] | p_racp_val | Pointer to Record Access Control Point to encode. |
[out] | p_data | Pointer to where encoded data is written. NOTE! It is calling routines respsonsibility to make sure. |