Loading...
Searching...
No Matches
router.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016-2018 OTA keys S.A.
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include "can/can.h"
24#include "can/pkt.h"
25
29void can_router_init(void);
30
42int can_router_register(can_reg_entry_t *entry, canid_t can_id, canid_t mask, void *param);
43
59int can_router_unregister(can_reg_entry_t *entry, canid_t can_id, canid_t mask, void *param);
60
73
87
97
107
108#ifdef __cplusplus
109}
110#endif
111
CAN memory allocation module.
struct can_reg_entry can_reg_entry_t
registry entry
struct can_frame can_frame_t
CAN frame.
Definition can.h:175
uint32_t canid_t
Controller Area Network Identifier structure.
Definition can.h:92
int can_router_register(can_reg_entry_t *entry, canid_t can_id, canid_t mask, void *param)
Register a user entry to receive a frame can_id.
void can_router_init(void)
Initialize CAN router.
int can_router_unregister(can_reg_entry_t *entry, canid_t can_id, canid_t mask, void *param)
Unregister a user entry from receiving can_id.
int can_router_free_frame(can_frame_t *frame)
Free a received frame.
int can_router_dispatch_tx_error(can_pkt_t *pkt)
Dispatch a TX error to the sender's thread.
int can_router_dispatch_tx_conf(can_pkt_t *pkt)
Dispatch a TX confirmation to the sender's thread.
int can_router_dispatch_rx_indic(can_pkt_t *pkt)
Dispatch a RX indication to subscribers threads.
A CAN packet.
Definition pkt.h:37
Definitions high-level CAN interface.