rusEFI
The most advanced open source ECU
controllers
lua
can_filter.h
Go to the documentation of this file.
1
// can_filter.h
2
3
#pragma once
4
5
#define FILTER_SPECIFIC 0x1FFFFFFF
6
#define ANY_BUS -1
7
#define NO_CALLBACK -1
8
9
struct
CanFilter
{
10
int32_t
Id
;
11
int32_t
Mask
;
12
13
int
Bus
;
14
int
Callback
;
15
16
bool
accept
(
int
p_Id) {
17
return
(p_Id & this->Mask) ==
Id
;
18
}
19
};
20
21
// Called when the user script is unloaded, resets any CAN rx filters
22
void
resetLuaCanRx
();
23
// Adds a frame ID to listen to
24
void
addLuaCanRxFilter
(int32_t eid, uint32_t mask,
int
bus,
int
callback);
25
26
CanFilter
*
getFilterForId
(
size_t
busIndex,
int
Id);
addLuaCanRxFilter
void addLuaCanRxFilter(int32_t eid, uint32_t mask, int bus, int callback)
Definition:
can_filter.cpp:29
resetLuaCanRx
void resetLuaCanRx()
Definition:
can_filter.cpp:24
getFilterForId
CanFilter * getFilterForId(size_t busIndex, int Id)
Definition:
can_filter.cpp:10
CanFilter
Definition:
can_filter.h:9
CanFilter::Id
int32_t Id
Definition:
can_filter.h:10
CanFilter::Callback
int Callback
Definition:
can_filter.h:14
CanFilter::Mask
int32_t Mask
Definition:
can_filter.h:11
CanFilter::Bus
int Bus
Definition:
can_filter.h:13
CanFilter::accept
bool accept(int p_Id)
Definition:
can_filter.h:16
Generated on Thu May 23 2024 00:06:42 for rusEFI by
1.9.1