Copyright IXXAT Automation GmbH
UCI Programming Manual FlexRay, V1.13
External interfaces
31
Example:
A program extract for the transmission scenario should have the following struc-
ture:
UCI_FLXMSG
stcFlxMsg
= {0};
UCI_FLXTXMSGINFO astcFlxTxMsgInfo[25] = {0};
DWORD
dwTxMsgInfoCount
= {0};
DWORD
dwIndex
= 0;
//*** Query number of TX messages
UCICtrl->GetTxMsgInfoCount(&dwTxMsgInfoCount);
//*** Get all TX messages info and prototypes
for(dwIndex=0; dwIndex<dwTxMsgInfoCount; +)
{
UCICtrl->GetTxMsgInfo(dwIndex, &astcFlxTxMsgInfo[dwIndex]);
}
//*** Send a message from each configured index
for(dwIndex=0; dwIndex<dwTxMsgInfoCount; +)
{
//*** Copy prototype to message struct and set type
memcpy( &stcFlxMsg. stcDataMsg,
astcFlxTxMsgInfo[dwIndex].stcFlexRayDataMsg,
sizeof(UCI_FLXDATAMSG));
stcFlxMsg. wMessageType = UCI_FLXMSGTYPE_DATA;
//*** Send Message using message info index
UCICtrl->SendMsg(&stcFlxMsg, dwIndex);
}
For simplicity the error handling and interface retrieval is not represented.
5.1.4.11
Stop
Stops the communication by soft resetting the FlexRay controller to init mode.
This means, that no running communication is aborted and therefore no incom-
plete data frame is generated on the bus. The configuration via
is not lost.
The transmit FIFO is emptied.
can only be called when the controller is in running mode. See Fig. 4-1
Prototype:
virtual HRESULT __stdcall Stop( void );
Parameters:
none
Return value:
UCI error codes
Содержание FlexRay CCM
Страница 6: ......