|
PebbleOS
|
Pebble Protocol endpoint exchanging session data with the phone. More...
Functions | |
| void | dls_endpoint_init (void) |
| Initialize the endpoint state. | |
| void | dls_endpoint_close_session (uint8_t session_id) |
| Tell the phone a session is closed. | |
| bool | dls_endpoint_send_data (DataLoggingSession *logging_session, const uint8_t *data, unsigned int num_bytes) |
| Send a chunk of session data to the phone. | |
| bool | dls_endpoint_open_session (DataLoggingSession *logging_session) |
| Announce a session to the phone. | |
Pebble Protocol endpoint exchanging session data with the phone.
Messages are sent over the system session; when there is none the functions do nothing.
| void dls_endpoint_close_session | ( | uint8_t | session_id | ) |
Tell the phone a session is closed.
| session_id | Session ID. |
| void dls_endpoint_init | ( | void | ) |
Initialize the endpoint state.
| bool dls_endpoint_open_session | ( | DataLoggingSession * | logging_session | ) |
Announce a session to the phone.
Moves the session to the opening state until the phone acks.
| logging_session | Session to open. |
| bool dls_endpoint_send_data | ( | DataLoggingSession * | logging_session, |
| const uint8_t * | data, | ||
| unsigned int | num_bytes | ||
| ) |
Send a chunk of session data to the phone.
Moves the session to the sending state until the phone acks. Does nothing if the session is still waiting for an ack.
| logging_session | Session the data belongs to. |
| data | Whole items read from the session storage. |
| num_bytes | Length of data in bytes, at most DLS_ENDPOINT_MAX_PAYLOAD. |