can Output Error Frame
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
long canOutputErrorFrame(errorFrame, long dominant, long recessive);
Function
Outputs an Error Frame to the CAN bus. The number of dominant bits and the number of trailing recessive bits are given as arguments.
Parameters
errorFrame Variable of type errorFrame.
dominant Number of dominant bits.
recessive Number of recessive bits.
Return Values
1: OK
0: error, e.g. not supported by driver
Reference example from the CANoe 12 help. Check the required configuration, database objects and API availability in your installed version; this is not a recorded compiler or runtime test.
canOutputErrorFrame(errorFrame, 12, 0); //output Error Frame with 12 dominant bits on CAN1
canOutputErrorFrame(CAN2.errorFrame, 6, 0); //output Error Frame with 6 dominant bits on CAN2