Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
CanIf.hxx File Reference
#include "can_frame.h"
#include "utils/Hub.hxx"

Go to the source code of this file.

Classes

struct  CanMessageData
 Thin wrapper around struct can_frame that will allow a dispatcher select the frames by CAN ID and mask as desired by the handlers. More...
 
class  CanFrameWriteFlow
 Interface class for the asynchronous frame write flow. More...
 
class  CanFrameReadFlow
 This flow is responsible for taking data from the can HUB and sending it to the IfCan's dispatcher. More...
 
class  CanIf
 Interface class for CANbus-based protocols. More...
 

Typedefs

typedef FlowInterface< Buffer< CanMessageData > > IncomingFrameHandler
 
typedef StateFlow< Buffer< CanMessageData >, QList< 1 > > IncomingFrameFlow
 StateFlow handling incoming messages as registered to the message dispatcher.
 
typedef FlowInterface< Buffer< CanHubData > > OutgoingFrameHandler
 Base class of flow to send outgoing CAN frames to.
 

Detailed Description

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Defines a service for interfacing with a CANbus. The interface receives incoming frames from the bus device and proxies it to various handlers that the user may register for specific ranges of CAN identifiers.

Author
Balazs Racz
Date
11 May 2014

Definition in file CanIf.hxx.

Typedef Documentation

◆ IncomingFrameFlow

StateFlow handling incoming messages as registered to the message dispatcher.

Definition at line 115 of file CanIf.hxx.

◆ IncomingFrameHandler

Todo:
(balazs.racz) make these two somehow compatible with each other. It's not easy, because they use different ID functions and their size differs a bit as well.

Definition at line 112 of file CanIf.hxx.

◆ OutgoingFrameHandler

Base class of flow to send outgoing CAN frames to.

Definition at line 117 of file CanIf.hxx.