|
DTNMA Reference Tools v2.2.0 - 5.ga116361
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
Mechanism to provide a "future"-type interface for execution. More...
#include <exec_status.h>
Collaboration diagram for refda_exec_status_t:Data Fields | |
| refda_exec_seq_t * | seq |
| Sequence associated with this status. | |
| void(* | on_finished )(bool failed, void *user_data) |
| An optional callback executed when target has finished but before the finished semaphore is posted. | |
| void * | on_finished_arg |
| User data for on_finished. | |
| atomic_bool | failed |
| Once finished has a value, this is an indicator that a CTRL failed. | |
| sem_t | finished |
| A semaphore which has a value when the target is finished executing and failed is marked. | |
Mechanism to provide a "future"-type interface for execution.
This allows a caller to refda_exec_add_target() to synchronize on the finish of the execution, either as success or failure. The user can either set on_finished callback or wait on the finished semaphore.
| atomic_bool refda_exec_status_t::failed |
Once finished has a value, this is an indicator that a CTRL failed.
Referenced by refda_exec_status_init(), refda_exec_status_post(), and refda_exec_status_wait().
| sem_t refda_exec_status_t::finished |
A semaphore which has a value when the target is finished executing and failed is marked.
Referenced by refda_exec_status_deinit(), refda_exec_status_init(), refda_exec_status_post(), and refda_exec_status_wait().
| void(* refda_exec_status_t::on_finished) (bool failed, void *user_data) |
An optional callback executed when target has finished but before the finished semaphore is posted.
This callback can be executed from any execution thread.
| failed | The finished failed state. | |
| [in] | user_data | A copy of the on_finished_arg for this status. |
Referenced by refda_exec_deadline_data_init(), refda_exec_status_deinit(), refda_exec_status_init(), refda_exec_status_post(), and refda_try_catch_data_init().
| void* refda_exec_status_t::on_finished_arg |
User data for on_finished.
Referenced by refda_exec_deadline_data_init(), refda_exec_status_deinit(), refda_exec_status_init(), refda_exec_status_post(), and refda_try_catch_data_init().
| refda_exec_seq_t* refda_exec_status_t::seq |
Sequence associated with this status.
This is non-null while the sequence is valid.
Referenced by refda_adm_ietf_dtnma_agent_ctrl_exec_deadline_timeout(), refda_exec_add_target(), refda_exec_status_deinit(), refda_exec_status_init(), and refda_exec_status_post().