![]() |
![]() |
VISA_Handle | VISA_create (Engine_Handle engine, String name, IALG_Params *params, size_t msgSize, String type) |
Create a new instance of an algorithm. | |
Void | VISA_delete (VISA_Handle visa) |
Delete an instance of an algorithm. | |
VISA_Handle | VISA_create2 (Engine_Handle engine, String name, IALG_Params *params, Int paramsSize, size_t msgSize, String type) |
Create a new instance of an algorithm. | |
Void | VISA_enter (VISA_Handle visa) |
Enter an algorithm's critical section. This must be called before any of the algorithm's IALG_Fxns are invoked. | |
Void | VISA_exit (VISA_Handle visa) |
Leave an algorithm's critical section. This must be called after the API has completed calling an algorithm's IALG_Fxns. | |
Ptr | VISA_getAlgHandle (VISA_Handle visa) |
Obtains an algorithm's handle. This is the handle required to be passed to the algorithm's IALG_Fxns. | |
Ptr | VISA_getAlgorithmHandle (VISA_Handle visa) |
Obtains an algorithm's handle. If the algorithm is local, this is the handle that can be passed to Algorithm APIs, not to the IALG_Fxns. | |
IALG_Fxns * | VISA_getAlgFxns (VISA_Handle visa) |
Get implementation functions for this algorithm. |
VISA_Handle VISA_create | ( | Engine_Handle | engine, | |
String | name, | |||
IALG_Params * | params, | |||
size_t | msgSize, | |||
String | type | |||
) |
Create a new instance of an algorithm.
[in] | engine | Handle to an engine in which the algorithm has been configured. |
[in] | name | Name of the algorithm to create. name is specified in the engine configuration. |
[in] | params | Creation parameters. |
[in] | msgSize | Size of the message which will be allocated in the event that this algorithm is configured to run remotely. |
[in] | type | String name of the "type" of algorithm. |
NULL | General failure. | |
non-NULL | Handle to an algorithm instance. |
type
must match the package/module name of the interface which the algorithm implements. For example, the VISA interface shipped with CE to support xDM video decoders is named "ti.sdo.ce.video.IVIDDEC". That is, the module IVIDDEC is in the package "ti.sdo.ce.video". You will, by definition, find a file named IVIDDEC.xdc in the ti.sdo.ce.video package.
When calling VISA_create(), a string comparison is done between the type
parameter and the actual name of the module (described in the previous paragraph). If these strings don't match exactly, VISA_create() will fail.
Void VISA_delete | ( | VISA_Handle | visa | ) |
Delete an instance of an algorithm.
[in] | visa | Handle to an algorithm instance to delete. |
VISA_Handle VISA_create2 | ( | Engine_Handle | engine, | |
String | name, | |||
IALG_Params * | params, | |||
Int | paramsSize, | |||
size_t | msgSize, | |||
String | type | |||
) |
Create a new instance of an algorithm.
[in] | engine | Handle to an engine in which the algorithm has been configured. |
[in] | name | Name of the algorithm to create. name is specified in the engine configuration. |
[in] | params | Creation parameters. |
[in] | paramsSize | Size of params . |
[in] | msgSize | Size of the message which will be allocated in the event that this algorithm is configured to run remotely. |
[in] | type | String name of the "type" of algorithm. |
NULL | General failure. | |
non-NULL | Handle to an algorithm instance. |
type
must match the package/module name of the interface which the algorithm implements. For example, the VISA interface shipped with CE to support xDM video decoders is named "ti.sdo.ce.video.IVIDDEC". That is, the module IVIDDEC is in the package "ti.sdo.ce.video". You will, by definition, find a file named IVIDDEC.xdc in the ti.sdo.ce.video package.
When calling VISA_create2(), a string comparison is done between the type
parameter and the actual name of the module (described in the previous paragraph). If these strings don't match exactly, VISA_create2() will fail.
VISA_create() is the preferred method to create algorithms. VISA_create2() is provided to enable creation of algorithms which violate the xDAIS spec and do not have a size
field of type "Int" as the first field of params
.
Void VISA_enter | ( | VISA_Handle | visa | ) |
Enter an algorithm's critical section. This must be called before any of the algorithm's IALG_Fxns are invoked.
[in] | visa | Handle to an algorithm instance. |
This call has the same semantics as IALG's activate fxn.
Void VISA_exit | ( | VISA_Handle | visa | ) |
Leave an algorithm's critical section. This must be called after the API has completed calling an algorithm's IALG_Fxns.
[in] | visa | Handle to an algorithm instance. |
Ptr VISA_getAlgHandle | ( | VISA_Handle | visa | ) |
Obtains an algorithm's handle. This is the handle required to be passed to the algorithm's IALG_Fxns.
[in] | visa | Handle to an algorithm instance. |
NULL | General system error | |
non-NULL | The remote algorithm's message. |
Ptr VISA_getAlgorithmHandle | ( | VISA_Handle | visa | ) |
Obtains an algorithm's handle. If the algorithm is local, this is the handle that can be passed to Algorithm APIs, not to the IALG_Fxns.
[in] | visa | Handle to an algorithm instance. |
NULL | General system error | |
non-NULL | The Algorithm handle. |
IALG_Fxns* VISA_getAlgFxns | ( | VISA_Handle | visa | ) |
Get implementation functions for this algorithm.
[in] | visa | Handle to an algorithm instance. |
NULL | An error has occurred. | |
non-NULL | The algorithm's IALG_Fxns. |
Both local and remote implementations return a non-NULL pointer. However, the IALG_Fxns functions may be NULL.
In the case of a local algorithm, the algorithm's IALG_Fxns returned. In the case of a remote algorithm, its stubs are returned. In either case, the handle passed as the first arg to the IALG_Fxns must be the value returned by VISA_getAlgHandle().