Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
Hub.hxx File Reference
#include <stdint.h>
#include <string>
#include "executor/Dispatcher.hxx"
#include "can_frame.h"

Go to the source code of this file.

Classes

class  StructContainer< S >
 Container for an arbitrary structure to pass through a Hub. More...
 
struct  CanFrameContainer
 Container for (binary) CAN frames going through Hubs. More...
 
class  HubContainer< T >
 Data type wrapper for sending data through a Hub. More...
 
class  GenericHubFlow< D >
 Templated implementation of the HubFlow. More...
 
class  DisplayPort
 This port prints all traffic from a (string-typed) hub to stdout. More...
 
class  FdHubPortInterface
 Shared base class for thread-based and select-based hub devices. More...
 
class  FdHubPortService
 Shared base class for thread-based and select-based hub devices. More...
 

Namespaces

namespace  openlcb
 

Typedefs

typedef HubContainer< string > HubData
 This class can be sent via a Buffer to a hub.
 
typedef HubContainer< CanFrameContainerCanHubData
 This class can be sent via a Buffer to a CAN hub.
 
typedef FlowInterface< Buffer< HubData > > HubPortInterface
 All ports interfacing via a hub will have to derive from this flow.
 
typedef StateFlow< Buffer< HubData >, QList< 1 > > HubPort
 Base class for a port to an ascii hub that is implemented as a stateflow.
 
typedef FlowInterface< Buffer< CanHubData > > CanHubPortInterface
 Interface class for a port to an CAN hub.
 
typedef StateFlow< Buffer< CanHubData >, QList< 1 > > CanHubPort
 Base class for a port to an CAN hub that is implemented as a stateflow.
 
typedef GenericHubFlow< HubDataHubFlow
 A generic hub that proxies packets of untyped (aka string) data.
 
typedef GenericHubFlow< CanHubDataCanHubFlow
 A hub that proxies packets of CAN frames.
 

Variables

static const uintptr_t POINTER_MASK = UINTPTR_MAX
 This should work for both 32 and 64-bit architectures.
 

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.

Implementation of the pipe dispatcher flow.

Author
Balazs Racz
Date
8 Dec 2013

Definition in file Hub.hxx.

Typedef Documentation

◆ CanHubData

This class can be sent via a Buffer to a CAN hub.

Access the data content via members CanFrameContainer::mutable_frame and CanFrameContainer::frame.

Set skipMember_ to non-NULL to skip a particular entry flow of the output.

Definition at line 134 of file Hub.hxx.

◆ CanHubFlow

A hub that proxies packets of CAN frames.

Definition at line 184 of file Hub.hxx.

◆ CanHubPort

Base class for a port to an CAN hub that is implemented as a stateflow.

Definition at line 143 of file Hub.hxx.

◆ CanHubPortInterface

Interface class for a port to an CAN hub.

Definition at line 141 of file Hub.hxx.

◆ HubData

typedef HubContainer<string> HubData

This class can be sent via a Buffer to a hub.

Access the data content via members char* data() and size_t size().

Set skipMember_ to non-NULL to skip a particular entry flow of the output.

Definition at line 125 of file Hub.hxx.

◆ HubFlow

A generic hub that proxies packets of untyped (aka string) data.

Definition at line 182 of file Hub.hxx.

◆ HubPort

Base class for a port to an ascii hub that is implemented as a stateflow.

Definition at line 139 of file Hub.hxx.

◆ HubPortInterface

All ports interfacing via a hub will have to derive from this flow.

Definition at line 137 of file Hub.hxx.

Variable Documentation

◆ POINTER_MASK

const uintptr_t POINTER_MASK = UINTPTR_MAX
static

This should work for both 32 and 64-bit architectures.

Definition at line 146 of file Hub.hxx.