VLCB
Toggle main menu visibility
Loading...
Searching...
No Matches
CanTransport.h
Go to the documentation of this file.
1
// Copyright (C) Sven Rosvall (sven@rosvall.ie)
2
// This file is part of VLCB-Arduino project on https://github.com/SvenRosvall/VLCB-Arduino
3
// Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
4
// The full licence can be found at: http://creativecommons.org/licenses/by-nc-sa/4.0
5
6
#pragma once
7
8
#include <Arduino.h>
9
#include "
Transport.h
"
10
11
namespace
VLCB
12
{
13
20
struct
CANFrame
21
{
22
uint32_t
id
;
23
bool
ext
;
24
bool
rtr
;
25
uint8_t
len
;
26
uint8_t
data
[8];
27
};
28
29
34
class
CanTransport
:
public
Transport
35
{
36
public
:
38
virtual
bool
available
() = 0;
39
virtual
CANFrame
getNextCanFrame
() = 0;
40
virtual
bool
sendCanFrame
(
CANFrame
*msg) = 0;
41
42
inline
virtual
byte
getHardwareType
() {
return
0; }
44
};
45
46
}
Transport.h
VLCB::CanTransport
Interface base class for CAN transport implementations.
Definition
CanTransport.h:35
VLCB::CanTransport::available
virtual bool available()=0
Check if an incoming CAN frame is available on the CAN bus.
VLCB::CanTransport::sendCanFrame
virtual bool sendCanFrame(CANFrame *msg)=0
Send a CAN frame to the CAN bus.
VLCB::CanTransport::getHardwareType
virtual byte getHardwareType()
Definition
CanTransport.h:42
VLCB::CanTransport::getNextCanFrame
virtual CANFrame getNextCanFrame()=0
Get the next CAN frame from the CAN bus.
VLCB::Transport
Interface for statistics on the transport layer.
Definition
Transport.h:13
VLCB
Definition
AbstractEventTeachingService.cpp:13
VLCB::CANFrame
Represents a CAN frame sent on the CAN bus.
Definition
CanTransport.h:21
VLCB::CANFrame::ext
bool ext
Definition
CanTransport.h:23
VLCB::CANFrame::id
uint32_t id
Definition
CanTransport.h:22
VLCB::CANFrame::len
uint8_t len
Definition
CanTransport.h:25
VLCB::CANFrame::rtr
bool rtr
Definition
CanTransport.h:24
VLCB::CANFrame::data
uint8_t data[8]
Definition
CanTransport.h:26
src
CanTransport.h
Generated by
1.18.0