nRF51 SDK - S110 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Record Access Control Point

Record Access Control Point library. More...

Data Structures

struct  ble_racp_value_t
 Record Access Control Point value structure. More...
 

Macros

#define RACP_OPCODE_RESERVED   0
 Record Access Control Point opcodes. More...
 
#define RACP_OPCODE_REPORT_RECS   1
 
#define RACP_OPCODE_DELETE_RECS   2
 
#define RACP_OPCODE_ABORT_OPERATION   3
 
#define RACP_OPCODE_REPORT_NUM_RECS   4
 
#define RACP_OPCODE_NUM_RECS_RESPONSE   5
 
#define RACP_OPCODE_RESPONSE_CODE   6
 
#define RACP_OPERATOR_NULL   0
 Record Access Control Point operators. More...
 
#define RACP_OPERATOR_ALL   1
 
#define RACP_OPERATOR_LESS_OR_EQUAL   2
 
#define RACP_OPERATOR_GREATER_OR_EQUAL   3
 
#define RACP_OPERATOR_RANGE   4
 
#define RACP_OPERATOR_FIRST   5
 
#define RACP_OPERATOR_LAST   6
 
#define RACP_OPERATOR_RFU_START   7
 
#define RACP_RESPONSE_RESERVED   0
 Record Access Control Point response codes. More...
 
#define RACP_RESPONSE_SUCCESS   1
 
#define RACP_RESPONSE_OPCODE_UNSUPPORTED   2
 
#define RACP_RESPONSE_INVALID_OPERATOR   3
 
#define RACP_RESPONSE_OPERATOR_UNSUPPORTED   4
 
#define RACP_RESPONSE_INVALID_OPERAND   5
 
#define RACP_RESPONSE_NO_RECORDS_FOUND   6
 
#define RACP_RESPONSE_ABORT_FAILED   7
 
#define RACP_RESPONSE_PROCEDURE_NOT_DONE   8
 
#define RACP_RESPONSE_OPERAND_UNSUPPORTED   9
 

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...
 

Detailed Description

Record Access Control Point library.

Macro Definition Documentation

#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.

Function Documentation

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.

Parameters
[in]data_lenLength of data in received write.
[in]p_dataPointer to received data.
[out]p_racp_valPointer to decoded Record Access Control Point write.
Note
This does not do a data copy. It assumes the data pointed to by p_data is persistant until no longer needed.
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.

Parameters
[in]p_racp_valPointer to Record Access Control Point to encode.
[out]p_dataPointer to where encoded data is written. NOTE! It is calling routines respsonsibility to make sure.
Returns
Length of encoded data.