Copyright IXXAT Automation GmbH
UCI Programming Manual FlexRay, V1.13
External interfaces
27
Parameters:
pMsg
IN
Pointer to union structure to which the method can copy the
RX message.
Return value:
UCI error codes
Example:
A program extract for the reception scenario should have the following structure:
UCI_FLXMSG stcFlxMsg = {0};
DWORD
dwTimeout = 5000;
HANDLE
hRxEvent
= NULL;
UCICtrl->GetRxEventHandle(&hRxEvent);
while(again) // until abort through user
{
// wait for at least one message, timeout in ms
if(WAIT_OBJECT_0 == WaitForSingleObject(hRxEvent, dwTimeout))
{
// read until FIFO is empty
while ( UCI_OK == UCICtrl->GetMsg(&stcFlxMsg))
{
switch(stcFlxMsg. wMessageType)
{
case UCI_FLXMSGTYPE_DATA:
// proceed data msg
break;
case UCI_FLXMSGTYPE_STATUS:
// proceed status msg
break;
default:
break;
}
}
}
}
For simplicity the error handling and interface retrieval is not represented.
Содержание FlexRay CCM
Страница 6: ......