Copyright IXXAT Automation GmbH
UCI Programming Manual FlexRay, V1.13
Annex
65
6.2.2.3
XAT_EnumHWEntry
Function:
HRESULT XATREG_CALLATTR
XAT_EnumHwEntry
( ENUM_CALLBACK fp_callback, void * vp_context);
Description:
Enumerates all registered IXXAT PC/CAN-interfaces. For each en-
try the Call-back-function transferred in the parameter
fp_callback is called up.
Parameter:
fp_callback (in)
Pointer to the Call-back-function which is called up for each en-
try.
vp_context (in)
Optional context. Is passed on to the Call-back-function.
Return value:
ERROR_SUCCESS –> success
HRESULT errorcode otherwise
Example:
short EnumCallback ( int i_index
, int i_hw_key
, char* name
, char* value
, char* valuehex
, void* vp_context)
{
// callback for hardware entry?
if ( 0 == i_index )
{
// get hardware configuration
XAT_BoardCFG sConfig;
if ( ERROR_SUCCESS == XAT_GetConfig(i_hw_key, &sConfig) )
{
// using the attributes of sConfig you may open the board
// via VCI2_PrepareBoard function
}
return 0;
}
int main(int argc, char* argv[])
{
...
XAT_EnumHwEntry( EnumCallback, 0 );
...
}
Содержание FlexRay CCM
Страница 6: ......