FlexRay CAPL Functions
CAPL Functions » FlexRay CAPL Functions Valid for: CANoe DE • CANoe4SW DEFlexRay
- Only available with Option FlexRay.
- In Option FlexRay several APIs are provided for receiving and transmitting FlexRay frames.
ON THIS PAGE:
- Bus Statistics
- Event Procedures
- FlexRay ISO TP
- General Functions
- Object
- Test Feature Set for FlexRay
- Test Service Library for FlexRay
Bus Statistics
- frEnableStatistics: Enables or disables FlexRay statistics on a specific (Form 1) or all (Form 2) FlexRay channels.
- frGetBoundaryViolationCount: Gets the total count of boundary violations of a FlexRay channel.
- frGetBoundaryViolationRate: Gets the rate of boundary violations of a FlexRay channel in frames per second [fr/s].
- frGetBusLoadDynamic: Gets the busload of the dynamic segment for data frames of a FlexRay channel in percent.
- frGetBusLoadStatic: Gets the static busload of a FlexRay channel in percent.
- frGetBusLoadStaticDFNF: Gets the static busload for dynamic and null frames of a FlexRay channel in percent.
- frGetContentErrorCount: Gets the total count of content errors of a FlexRay channel.
- frGetContentErrorRate: Gets the content error rate of a FlexRay channel in frames per second [fr/s].
- frGetFrameCount: Gets the total count of frames on a FlexRay channel.
- frGetFrameErrorCount: Gets the total count of frame errors of a FlexRay channel.
- frGetFrameErrorRate: Gets the frame error rate of a FlexRay channel in frames per second [fr/s].
- frGetFrameRate: Gets the frame rate of a FlexRay channel in frames per second [fr/s].
- frGetNullFrameCount: Gets the total count of null frames (including null frames resulting from unused slots in cyclic multiplexing) of a FlexRay channel.
- frGetNullFrameRate: Gets the null frame rate (including null frames resulting from unused slots in cyclic multiplexing) of a FlexRay channel in frames per second [fr/s].
- frGetOffsetCorrection: Gets the offset correction of a FlexRay channel.
- frGetPOCState: Gets the current POC state of a FlexRay channel.
- frGetRateCorrection: Gets the rate correction of a FlexRay channel.
- frGetSyntaxErrorCount: Gets the total count of syntax errors of a FlexRay channel.
- frGetSyntaxErrorRate: Gets the rate of syntax errors of a FlexRay channel in frames per second [fr/s].
Event Procedures
- on frError: Is called in the event of a general error being detected on the FlexRay bus.
- on frFrame: Is called up after a frame has been received in the specified slot and cycle.
- Note: It is recommended to use on FRFrame only for the reception of valid data frames. To receive Null Frames and erroneous frames, please use the on frNullFrame or on frFrameError event procedures, since these events will not be received anymore with on frFrame from version 6.1.
- on frFrameError: Is called if an erroneous frame is received in the specified slot and cycle.
- on frNullFrame: Is called if a Null Frame is received in the specified slot and cycle.
- on frPDU: Is called when a PDU with the corresponding name is received.
- on frPocState: Is called whenever there is a change of state on the FlexRay Communication Controller’s protocol operation state machine.
- on frSlot: Is called up in each cycle after the Slot is past.
- on frStartCycle: Can be generated by FlexRay at the beginning of each communication cycle and contains the NM vector valid for this cycle.
- on frSymbol: Is called whenever a symbol (wake-up, CAS, MTS) is received.
FlexRay ISO TP CAPL Functions
The ISO TP node layer DLL (FlexRayTPISO.dll) for Vector DENoe.FlexRay implements the transport protocol to allow nodes simulated by DENoe to interact with hardware nodes attached to a FlexRay network. A detailed description of the ISO 10681-2 TP for FlexRay and the implemented CAPL functions can be found in the help FlexRay TP ISO.General Functions
- frChannelUsesCANoeNetworkSimulator: Gets whether the given channel uses the built-in network simulator.
- frEnableGateway: Activates a gateway.
- frEnableNodeTx: Enable/disable all TX frames/PDUs of the specified node.
- frGetConfiguration: Copies the FlexRay protocol parameters to a FlexRay parameter object.
- frGetFrameCRC: Returns the CRC of a received FlexRay frame.
- frGwBypassDynamic: Controls the routing for the dynamic frame part.
- frGwBypassStatic: Controls the routing for static frames.
- frOutputDynFrame: Updates the FlexRay Communication Controller’s (CC) send buffer with the current data from the send object.
- frResetStatistics: Resets FlexRay cluster statistics.
- frSendSymbol: Sends an MTS symbol in the next possible symbol window if the Communication Controller is in normal mode (synchronized).
- frSetAutoIncrement: Part of the payload of a frame will be incremented automatically on each transmission.
- frSetConfiguration: Writes the FlexRay protocol parameters from the FlexRay parameter object to the FlexRay interface’s Communication Controller.
- frSetExtOffsetRateControl: Applies the external rate and offset correction values from the FlexRay parameters for the next cycle.
- frSetKeySlot: This function configures one of two possible key slots that are to be sent for a FlexRay bus.
- frSetMode: Initializes the FlexRay bus transceivers.
- frSetPayloadLengthInByte: Sets the payload (data) length of the object in bytes.
- frSetPduFilter: Configures a filter for PDUs.
- frSetPOCState: Puts the FlexRay Communication Controller into the desired Protocol Operation Mode.
- frSetSendFrame: Configures the hardware for sending the specified message.
- frSetSendGroup: All frames in the group are sent in the current cycle, or all frames are not sent until the next possible cycle.
- frSetSendPDU: Configures the hardware to transmit the specified PDU.
- frSetTrigger: Activates the Trigger Output of the selected VN interface.
- frUpdatePDU: Updates the PDU payload in the assigned FlexRay frames.
- frUpdateStatFrame: Updates the FlexRay Communication Controller’s (CC) send buffer with the current data from the send object.
- messageTimeNS: Returns the receive time of the frame or slot in nanoseconds.
- output: Outputs the object from the program block of the analysis branch.
- resetFlexRayCC: Initializes the FlexRay Communication Controller (CC) and begins a new start-up phase for the cluster or a new integrations phase in the cluster.
- resetFlexRayCCEx: Initializes the FlexRay Communication Controller (CC) and generates the specified wake-up pattern before reintegration in the cluster or the start-up.
Objects
- frFrame: Creates a FlexRay frame object.
- frConfiguration: Create a FlexRay parameter object.
- frPDU: Creates a FlexRay PDU object.
Test Feature Set for FlexRay
- testWaitForFrFrame: Waits for the occurrence of the valid specified FlexRay frame.
- testGetWaitFrFrameData: If a valid FlexRay frame is the last event that triggers a wait instruction, the frame’s content can be called up.
- testJoinFrFrameEvent: Completes the current set of “joined events” with the FlexRay frame.
- testWaitForFrNullFrame: Waits for the occurrence of the specified FlexRay Null Frame.
- testGetWaitFrNullFrameData: If a FlexRay Null Frame is the last event that triggers a wait instruction, the frame’s content can be called up.
- testJoinFrNullFrameEvent: Completes the current set of “joined events” with the FlexRay Null Frame.
- testWaitForFrStartCycle: Waits for the occurrence of the specified FlexRay start cycle event.
- testGetWaitFrStartCycleData: If a FlexRay start cycle is the last event that triggers a wait instruction, the event’s content can be called up.
- testJoinFrStartCycleEvent: Completes the current set of “joined events” with the FlexRay start cycle event.
- testWaitForFrPDU: Waits for the occurrence of the specified FlexRay PDU event.
- testGetWaitFrPDUData: If a valid FlexRay PDU is the last event that triggers a wait instruction, the PDU’s content can be called up.
- testJoinFrPDUEvent: Completes the current set of “joined events” with the FlexRay PDU.
- testWaitForFrPOCState: Waits for the occurrence of change of state on the FlexRay Communication Controller’s protocol operation state machine.
- testGetWaitFrPOCStateData: If an event indicating a change of state on the FlexRay Communication Controller’s protocol operation state machine is the last event that triggers a wait instruction, the event’s content can be called up.
- testJoinFrPOCState: Completes the current set of “joined events” with the change of state event on the FlexRay Communication Controller’s protocol operation state machine.
- testWaitForFrFrameError: Waits for the occurrence of FlexRay erroneous frame event (frame error).
- testGetWaitFrFrameErrorData: If a FlexRay erroneous frame is the last event that triggers a wait instruction, the event’s content can be called up.
- testJoinFrFrameErrorEvent: Completes the current set of “joined events” with the FlexRay erroneous frame event.
- testWaitForFrSymbol: Waits for the occurrence of a FlexRay symbol on the bus.
- testGetWaitFrSymbolData: If a FlexRay symbol event is the last event that triggers a wait instruction, the event’s content can be called up.
- testJoinFrSymbolEvent: Completes the current set of “joined events” with the FlexRay symbol event.
Test Service Library for FlexRay
- DLC: The check condition is violated if the payload length of the message does not agree with the specified payload length of the database (useful for dynamic frames).
- Cycle Time: Checks the occurrences of cyclic messages.
- Occurrence of Messages: Checks are used to monitor the sending delay of messages which allow both cyclic and spontaneous transmission.
- Message Distance: This check is useful for spontaneous messages where one message is a result of another message; e.g. the check is used to check the processing time of the reference message.
- Absence of FlexRay Erroneous Frames: Checks the absence of erroneous frames for the specified frame/slot on the bus.
- Absence of FlexRay Null Frames: Checks the absence of Null Frames for the specified frame/slot on the bus.
- Message Count Observation: Check is used to monitor the minimum and/or maximum number for each of the defined messages within a specified cyclic time interval.
- Messages Known: This check listens to the bus and reports a violation, if a message was received that is not defined in any of the databases that are associated to the current bus.
- Node Active: This check reports a problem, if the node has not send any of its Tx messages within a given time-interval.
- Node Inactive: This check allows the observation of the end of the activity of nodes.
- No Value Change: The check is useful to observe the constancy of a signal value.
- Occurrence Count: Checks the absence of the specified message on the bus.
- Timeout: This checks creates an error event if particular time is expired.
- Value Valid: This check is useful to supervise the value of signals.
FlexRay • Exemplary Usage of FlexRay Functions in CAPL