Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Step Routine
Include: connector_api.h More...
Functions | |
| connector_status_t | connector_step (connector_handle_t const handle) |
| Executes a small portion of Cloud Connector in a non-blocking call. | |
Detailed Description
Include: connector_api.h
Function Documentation
| connector_status_t connector_step | ( | connector_handle_t const | handle ) |
Executes a small portion of Cloud Connector in a non-blocking call.
This non-blocking function is used to execute a portion Cloud Connector after it's been successfully initialized with an connector_init() call. This function performs a sequence of operations or events and then returns. This allows applications to perform other tasks, especially in non-threading environment. For more information on the differences between connector_run() and connector_step() see the Cloud Connector threading model.
This function is similar to connector_run() except this is the non-blocking variant. This function would normally be made from system control loop or state machine. This function must be repeatedly made to maintain Cloud Connector state.
See Cloud Connector threading model section for more information on the differences between connector_run() and connector_step().
- Parameters:
-
[in] handle Handle returned from connector_init
- Return values:
-
connector_init_error Cloud Connector was not properly initialized. The application requires a call to connector_init() prior to calling this function. connector_abort Cloud Connector was aborted by callback function. connector_invalid_data_size An application callback returned an invalid response_length. This is an application callback defect and should be corrected. To locate the faulty callback, enable CONNECTOR_DEBUG. For more information on debugging, see the section on how to implement debug support. connector_invalid_data_range An application callback returned invalid response_data. This is an application callback defect and should be corrected. To locate the faulty callback, enable CONNECTOR_DEBUG. For more information on debugging, see the section on how to implement debug support. connector_invalid_payload_packet Cloud Connector received invalid payload message. connector_keepalive_error Cloud Connector did not receive keep alive messages. Device Cloud may be offline. connector_bad_version Device Cloud rejected version number. connector_exceed_timeout Callback exceeded timeout value before it returned. connector_unsupported_security Cloud Connector received a packet with unsupported security. connector_invalid_data An application callback returned unexpected NULL response_data. This is an application callback defect and should be corrected. To locate the faulty callback, enable CONNECTOR_DEBUG. For more information on debugging, see the section on how to implement debug support. connector_device_terminated Cloud Connector was terminated by user via connector_initiate_action() call. connector_idle Cloud Connector is idling. Cloud Connector has no message to process and relinquishes other task execution. connector_working Cloud Connector is processing a message and should be called at the earliest possible time. connector_pending Cloud Connector is busy or waiting to process a message and relinquishes other task execution connector_active Cloud Connector is busy or waiting to process a message and should be called at the earliest possible time
Example Usage:
connector_status_t status; connector_handle_t connector_handle = connector_init(application_callback); for (;;) { status = connector_step(connector_handle); other_system_tasks(); }
Definition at line 443 of file connector_api.c.
Generated on Tue Jul 12 2022 19:18:38 by
1.7.2