The code annotation API is the main interface to use in the code. More...
Enumerations | |
enum | PDI_inout_t { PDI_NONE = 0 , PDI_IN = 1 , PDI_OUT = 2 , PDI_INOUT = 3 } |
Access directions. More... | |
Functions | |
PDI_status_t | PDI_share (const char *name, void *data, PDI_inout_t access) |
Shares some data with PDI. | |
PDI_status_t | PDI_access (const char *name, void **buffer, PDI_inout_t inout) |
Requests for PDI to access a data buffer. | |
PDI_status_t | PDI_release (const char *name) |
Releases ownership of a data shared with PDI. | |
PDI_status_t | PDI_reclaim (const char *name) |
Reclaims ownership of a data buffer shared with PDI. | |
PDI_status_t | PDI_event (const char *event) |
Triggers a PDI "event". | |
PDI_status_t | PDI_expose (const char *name, void *data, PDI_inout_t access) |
Shortly exposes some data to PDI. | |
PDI_status_t | PDI_multi_expose (const char *event_name, const char *name, void *data, PDI_inout_t access,...) |
Performs multiple exposes at once. | |
The code annotation API is the main interface to use in the code.
It offers functions that can be called from code with no side effect by default and that can therefore be considered as annotations.
enum PDI_inout_t |
PDI_status_t PDI_share | ( | const char * | name, |
void * | data, | ||
PDI_inout_t | access | ||
) |
Shares some data with PDI.
The user code should not modify it before a call to either PDI_release or PDI_reclaim.
[in] | name | the data name |
[in,out] | data | the accessed data |
[in] | access | whether the data can be accessed for read or write by PDI |
the access parameter is a binary OR of PDI_IN & PDI_OUT.
PDI_status_t PDI_access | ( | const char * | name, |
void ** | buffer, | ||
PDI_inout_t | inout | ||
) |
Requests for PDI to access a data buffer.
[in] | name | the data name |
[in,out] | buffer | a pointer to the accessed data buffer |
[in] | inout | the access properties (PDI_IN, PDI_OUT, PDI_INOUT) |
PDI_status_t PDI_release | ( | const char * | name | ) |
PDI_status_t PDI_reclaim | ( | const char * | name | ) |
PDI_status_t PDI_event | ( | const char * | event | ) |
PDI_status_t PDI_expose | ( | const char * | name, |
void * | data, | ||
PDI_inout_t | access | ||
) |
PDI_status_t PDI_multi_expose | ( | const char * | event_name, |
const char * | name, | ||
void * | data, | ||
PDI_inout_t | access, | ||
... | |||
) |
Performs multiple exposes at once.
All the data is shared in order they were specified and reclaimed in reversed order after an event is triggered.
NULL argument indicates an end of the list.
[in] | event_name | the name of the event that will be triggered when all data become available |
[in] | name | the data name |
[in] | data | the exposed data |
[in] | access | whether the data can be accessed for read or write by PDI |
[in] | ... | (additional arguments) additional list of data to expose, each should contain name, data and access, NULL argument inidactes an end of the list. |