File syn_cannm.c¶
FileList > proto > syn_cannm.c
Go to the source code of this file
AUTOSAR CAN Network Management (CanNm) Protocol Implementation.
#include "syn_cannm.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_cannm_init (SYN_CanNM_Session * session, const SYN_CanNM_Config * cfg) Initialize CAN NM Session. |
| bool | syn_cannm_process_rx_frame (SYN_CanNM_Session * session, const SYN_CAN_Frame * frame) Process an incoming CAN frame for CAN NM filtering and state machine. |
| void | syn_cannm_release_network (SYN_CanNM_Session * session) Release network request (allow transition to sleep). |
| void | syn_cannm_request_network (SYN_CanNM_Session * session) Request network active operation (keep awake / active wakeup). |
| void | syn_cannm_request_repeat_msg (SYN_CanNM_Session * session) Request Repeat Message state transition. |
| void | syn_cannm_set_user_data (SYN_CanNM_Session * session, const uint8_t * data, size_t len) Set local NM user payload bytes (6 bytes max). |
| bool | syn_cannm_step (SYN_CanNM_Session * session, uint32_t delta_ms, SYN_CAN_Frame * tx_frame) Step CAN NM state machine and timer tick. |
Public Static Functions¶
| Type | Name |
|---|---|
| void | pack_nm_tx_pdu (SYN_CanNM_Session * session, SYN_CAN_Frame * tx_frame) Pack CAN NM PDU payload into tx_frame. |
Public Functions Documentation¶
function syn_cannm_init¶
Initialize CAN NM Session.
Parameters:
sessionSession handle pointercfgConfiguration structure (or NULL for defaults)
function syn_cannm_process_rx_frame¶
Process an incoming CAN frame for CAN NM filtering and state machine.
Parameters:
sessionSession handle pointerframeIncoming CAN frame pointer
Returns:
true if frame was a valid matching CAN NM PDU
function syn_cannm_release_network¶
Release network request (allow transition to sleep).
Parameters:
sessionSession handle pointer
function syn_cannm_request_network¶
Request network active operation (keep awake / active wakeup).
Parameters:
sessionSession handle pointer
function syn_cannm_request_repeat_msg¶
Request Repeat Message state transition.
Parameters:
sessionSession handle pointer
function syn_cannm_set_user_data¶
Set local NM user payload bytes (6 bytes max).
Parameters:
sessionSession handle pointerdataData pointerlenData length (0 to 6 bytes)
function syn_cannm_step¶
Step CAN NM state machine and timer tick.
Parameters:
sessionSession handle pointerdelta_msElapsed time in millisecondstx_framePointer to CAN frame structure to receive pending CAN NM message
Returns:
true if a CAN frame is ready in tx_frame to be transmitted
Public Static Functions Documentation¶
function pack_nm_tx_pdu¶
Pack CAN NM PDU payload into tx_frame.
Parameters:
sessionPointer to CAN NM session instance.tx_framePointer to target CAN frame structure.
The documentation for this class was generated from the following file src/syntropic/proto/syn_cannm.c