PDI 0.6.1

Data exchange made easy

High-level annotations

The high-level annotation API offers a higher level of interface for the same features as the Code annotation. More...

Functions

PDI_status_t PDI_expose (const char *name, void *data, PDI_inout_t access)
 Shortly exposes some data to PDI. More...
 
PDI_status_t PDI_multi_expose (const char *event_name, const char *name, void *data, PDI_inout_t access,...)
 Performs multiple exposes at once. More...
 
PDI_status_t PDI_transaction_begin (const char *name)
 Begin a transaction in which all PDI_expose calls are grouped. More...
 
PDI_status_t PDI_transaction_end (void)
 Ends the previously opened transaction. More...
 

Detailed Description

The high-level annotation API offers a higher level of interface for the same features as the Code annotation.

Function Documentation

◆ PDI_expose()

PDI_status_t PDI_expose ( const char *  name,
void *  data,
PDI_inout_t  access 
)

Shortly exposes some data to PDI.

Equivalent to PDI_share + PDI_reclaim.

Parameters
[in]namethe data name
[in]datathe exposed data
[in]accesswhether the data can be accessed for read or write by PDI
Returns
an error status

◆ PDI_multi_expose()

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.

Parameters
[in]event_namethe name of the event that will be triggered when all data become available
[in]namethe data name
[in]datathe exposed data
[in]accesswhether 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.
Returns
an error status

◆ PDI_transaction_begin()

PDI_status_t PDI_transaction_begin ( const char *  name)

Begin a transaction in which all PDI_expose calls are grouped.

This requires a call to PDI_transaction_end to close the transaction.

Deprecated:
the transaction part of the API is deprecated, the PDI_multi_expose function should be used instead.
See also
PDI_expose the function used to expose data inside the transaction
PDI_transaction_end the function used to end the transaction
Parameters
[in]namethe name of the transaction (an event thus named will be triggered when all data become available)
Returns
an error status

◆ PDI_transaction_end()

PDI_status_t PDI_transaction_end ( void  )

Ends the previously opened transaction.

Deprecated:
the transaction part of the API is deprecated, the PDI_multi_expose function should be used instead.
See also
PDI_transaction_begin the function used to start the transaction
PDI_expose the function used to expose data inside the transaction
Returns
an error status