![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
Typedefs | |
| typedef void(* | UdsRspCback_t) (dmConnId_t connId, uint8_t opcode, uint8_t response, uint8_t index) |
| UDS Control Point Response Callback. More... | |
Enumerations | |
| enum | { UDSC_DBCI_HDL_IDX, UDSC_DCBI_CCC_HDL_IDX, UDSC_UI_HDL_IDX, UDSC_UCP_IDX, UDSC_UCP_CCC_HDL_IDX, UDSC_HDL_LIST_LEN } |
| UDSC service enumeration of handle indexes of characteristics to be discovered. More... | |
Functions | |
| void | UdscDiscover (dmConnId_t connId, uint16_t *pHdlList) |
| Perform service and characteristic discovery for User Data service. Parameter pHdlList must point to an array of length UDSC_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList. More... | |
| uint8_t | UdscValueUpdate (uint16_t *pHdlList, attEvt_t *pMsg) |
| Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length UDSC_HDL_LIST_LEN. If the ATT handle of the message matches a handle in the handle list the value is processed, otherwise it is ignored. More... | |
| void | UdscReadUserIndex (dmConnId_t connId, uint16_t handle) |
| Read the user index characteristic. More... | |
| void | UdscReadDatabaseChangeIncrement (dmConnId_t connId, uint16_t handle) |
| Read the database change increment characteristic. More... | |
| void | UdscWriteDatabaseChangeIncrement (dmConnId_t connId, uint16_t handle, uint32_t increment) |
| Write the database change increment characteristic. More... | |
| void | UdscRegisterNewUser (dmConnId_t connId, uint16_t handle, uint16_t consentCode) |
| Write to the user control point characteristic - Register New User. More... | |
| void | UdscConsent (dmConnId_t connId, uint16_t handle, uint8_t index, uint16_t consentCode) |
| Write to the user control point characteristic - Consent. More... | |
| void | UdscDeleteUserData (dmConnId_t connId, uint16_t handle) |
| Write to the user control point characteristic - Delete User Data. More... | |
| void | UdscClose (void) |
| Called by the application when a connection closes. More... | |
| void | UdscInit (wsfHandlerId_t handlerId, uint8_t timerEvent, UdsRspCback_t rspCback) |
| Initialize User Data Service collector callbacks. More... | |
User Control Point Opcodes | |
| #define | UDSC_UCP_OPCODE_RNU 0x01 |
| Register New User. | |
| #define | UDSC_UCP_OPCODE_CONSENT 0x02 |
| Consent. | |
| #define | UDSC_UCP_OPCODE_DUD 0x03 |
| Delete User Data. | |
| #define | UDSC_UCP_OPCODE_RESPONSE 0x20 |
| Command Response. | |
User Control Point Response Values | |
| #define | UDSC_UCP_RSP_SUCCESS 0x01 |
| Success. | |
| #define | UDSC_UCP_RSP_OP_NOT_SUPPORTED 0x02 |
| Opcode not supported. | |
| #define | UDSC_UCP_RSP_INVALID_PARAMETER 0x03 |
| Invalid Parameter. | |
| #define | UDSC_UCP_RSP_OP_FAILED 0x04 |
| Operation Failed. | |
| #define | UDSC_UCP_RSP_NOT_AUTHORIZED 0x05 |
| User Not Authorized. | |
| typedef void(* UdsRspCback_t) (dmConnId_t connId, uint8_t opcode, uint8_t response, uint8_t index) |
UDS Control Point Response Callback.
| connId | Connection ID. |
| opcode | Cmd opcode being responded to. |
| response | Response code. |
| index | User index (only set when opcode is UDSC_UCP_OPCODE_RNU) |
Definition at line 83 of file udsc_api.h.
| anonymous enum |
UDSC service enumeration of handle indexes of characteristics to be discovered.
Definition at line 36 of file udsc_api.h.
| void UdscDiscover | ( | dmConnId_t | connId, |
| uint16_t * | pHdlList | ||
| ) |
Perform service and characteristic discovery for User Data service. Parameter pHdlList must point to an array of length UDSC_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList.
| connId | Connection identifier. |
| pHdlList | Characteristic handle list. |
Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length UDSC_HDL_LIST_LEN. If the ATT handle of the message matches a handle in the handle list the value is processed, otherwise it is ignored.
| pHdlList | Characteristic handle list. |
| pMsg | ATT callback message. |
| void UdscReadUserIndex | ( | dmConnId_t | connId, |
| uint16_t | handle | ||
| ) |
Read the user index characteristic.
| connId | Connection identifier. |
| handle | Attribute handle. |
| void UdscReadDatabaseChangeIncrement | ( | dmConnId_t | connId, |
| uint16_t | handle | ||
| ) |
Read the database change increment characteristic.
| connId | Connection identifier. |
| handle | Attribute handle. |
| void UdscWriteDatabaseChangeIncrement | ( | dmConnId_t | connId, |
| uint16_t | handle, | ||
| uint32_t | increment | ||
| ) |
Write the database change increment characteristic.
| connId | Connection identifier. |
| handle | Attribute handle. |
| increment | DB Change Increment |
| void UdscRegisterNewUser | ( | dmConnId_t | connId, |
| uint16_t | handle, | ||
| uint16_t | consentCode | ||
| ) |
Write to the user control point characteristic - Register New User.
| connId | Connection identifier. |
| handle | Attribute handle. |
| consentCode | Consent code (0-9999) |
| void UdscConsent | ( | dmConnId_t | connId, |
| uint16_t | handle, | ||
| uint8_t | index, | ||
| uint16_t | consentCode | ||
| ) |
Write to the user control point characteristic - Consent.
| connId | Connection identifier. |
| handle | Attribute handle. |
| index | User Index |
| consentCode | Consent code (0-9999 - provided when user was registered) |
| void UdscDeleteUserData | ( | dmConnId_t | connId, |
| uint16_t | handle | ||
| ) |
Write to the user control point characteristic - Delete User Data.
| connId | Connection identifier. |
| handle | Attribute handle. |
| void UdscClose | ( | void | ) |
Called by the application when a connection closes.
| void UdscInit | ( | wsfHandlerId_t | handlerId, |
| uint8_t | timerEvent, | ||
| UdsRspCback_t | rspCback | ||
| ) |
Initialize User Data Service collector callbacks.
| handlerId | Application task handler ID. |
| timerEvent | Application timer event for control point timeout. |
| rspCback | Callback to receive control point response messages. |