CAN Bus Functions
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.
Choose the operation from the question you need to answer. Receiving an event, requesting transmission and changing a controller are different activities; combining them while debugging can change the traffic being measured.
Select an observation before selecting an API
| Question | Start here | What the result does not establish |
|---|---|---|
| Which frame just arrived? | on message, then inspect this |
A separately declared message variable is not automatically the received frame |
| How do I request a frame transmission? | output | A call is not receiver acknowledgment |
| Is one periodic stream stable? | TIME, TIME_NS, and the filtering workflow | Mixed channels, directions or IDs do not describe one period |
| Is the controller in an error state? | ChipState and controller events | A reset does not explain the cause of the error |
| How much traffic or how many errors occurred? | Statistics functions | Aggregate counts do not identify the offending individual message |
A diagnostic order that preserves evidence
First record the channel mapping and node placement. Then inspect direction, ID type, RTR and payload length. Only after identifying the stream should you calculate intervals or compare decoded values. The timestamp walkthrough and local interval analyzer provide the next steps without changing bus behavior.
For example, a 10 ms message sent on two channels with a 5 ms phase offset can look like a 5 ms stream when channel information is discarded. Changing its timer would address the wrong cause. Retain the channel until you have selected the intended source.
Treat controller changes as a separate experiment
resetCan briefly disconnects the controller and can lose messages. The CANoe 12 reference also distinguishes its channel limitations from resetCanEx. Save the pre-reset trace and state before experimenting with recovery. Do not insert a reset into an interval-measurement path and then call the resulting gap normal jitter.
Register-level settings such as setBtr and setOcr are device dependent. Historical register examples are not universal CAN or CAN FD configuration recipes. Verify the installed help and hardware support before applying values.
Reference categories
- Message functions
- Event procedures
- Message selectors
- Controller functions
- Statistics functions
- Identifier checks
The API pages contain authorized reference material; their examples are versioned fragments unless a page explicitly supplies a complete teaching source. This task-selection guide and the linked measurement workflows are this site's analysis. A readable example or a successful website build does not mean the CAPL source has passed CANoe compilation.