CAN CoreX 2.3.1
Table-driven CAN, CAN FD, ISO-TP, network simulation, and bus monitoring library
Loading...
Searching...
No Matches
CCX_net_t Struct Reference

CAN network structure. More...

#include <can_corex_net.h>

Data Fields

CCX_net_node_t NodeList [12]
CCX_net_tnext

Detailed Description

CAN network structure.

Represents a virtual CAN network connecting multiple CAN instances. Networks are managed as a global linked list.

Note
Architecture:
  • Multiple networks can exist simultaneously (global linked list)
  • Each network can have up to CCX_MAX_INSTANCE_IN_NETWORK nodes
  • Messages are automatically replicated between nodes based on settings
  • Network simulation happens in CCX_RX_PushMsg and CCX_TX_PushMsg
Example - ECU Network Simulation:
// Create 3 ECU instances
CCX_instance_t ecu_engine, ecu_transmission, ecu_dashboard;
// Initialize network
CCX_net_t vehicle_network;
CCX_net_init(&vehicle_network);
// Add ECUs to network
vehicle_network.NodeList[0].NodeInstance = &ecu_engine;
vehicle_network.NodeList[0].NodeSettings.Replication = CCX_NET_TX_RX_REPLICATION;
vehicle_network.NodeList[0].NodeSettings.NodeType = CCX_NET_NODE_IN_NET;
vehicle_network.NodeList[1].NodeInstance = &ecu_transmission;
vehicle_network.NodeList[1].NodeSettings.Replication = CCX_NET_TX_RX_REPLICATION;
vehicle_network.NodeList[1].NodeSettings.NodeType = CCX_NET_NODE_IN_NET;
vehicle_network.NodeList[2].NodeInstance = &ecu_dashboard;
vehicle_network.NodeList[2].NodeSettings.Replication = CCX_NET_TX_REPLICATION;
vehicle_network.NodeList[2].NodeSettings.NodeType = CCX_NET_NODE_IN_NET;
// Now: engine sends RPM → transmission and dashboard receive it automatically
CCX_net_status_t CCX_net_init(CCX_net_t *net)
Initialize a CAN network.
Definition can_corex.h:460
CAN network structure.
Definition can_corex_net.h:139

The documentation for this struct was generated from the following file: