Find a control by its Name interface
#include <aoi.h> const AOICtrl_t *AoFindName(const char *name, const char *interface, int32_t version);
libaoi.so
This function finds a control with the name, that also has the interface and version specified. Controls are named if they have a string interface called Name declared in their interfaces list.
A pointer to an AOICtrl_t structure for a control with a matched name, if one exists, and NULL if no control is found.
Here's an example of a Name interface declaration:
AOInterface_t pnm_idecoder_interface[] = { { "Name", 0, "pnm_idecoder" }, { "Description", 0, "PNM Image Reader" }, ... (other interfaces) { 0, 0, 0 }, };
If the above interfaces were already added to the list of available interfaces, and you wanted to find the AOI control for the pnm_idecoder interface, you would write code like:
AOICtrl_t *ctrl; ctrl = AoFindName( "pnm_idecoder", NULL, 0 ); // now we can use the ctrl to find specific interfaces, etc.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |