|
Open Model Railroad Network (OpenMRN)
|
Publicly visible API for the gridconnect-to-CAN bridge. More...
#include <GridConnectHub.hxx>
Public Member Functions | |
| virtual bool | shutdown ()=0 |
| Unregisters *this from the pipes. | |
Static Public Member Functions | |
| static GCAdapterBase * | CreateGridConnectAdapter (HubFlow *gc_side, CanHubFlow *can_side, bool double_bytes) |
| This function connects an ASCII (GridConnect-format) CAN adapter to a binary CAN adapter, performing the necessary format conversions inbetween. | |
| static GCAdapterBase * | CreateGridConnectAdapter (HubFlow *gc_side_read, HubFlow *gc_side_write, CanHubFlow *can_side, bool double_bytes) |
| Creates a gridconnect-CAN bridge with separate pipes for reading (parsing) from the GC side and writing (formatting) to the GC side. | |
Publicly visible API for the gridconnect-to-CAN bridge.
This bridge links two Hubs, one typed string, the other typed CanHubData, by parsing/rendering the packets from the gridconnect protocol.
This public-facing API allows creating and managing the bridge as necessary for production code and unittests.
Definition at line 51 of file GridConnectHub.hxx.
|
inlinevirtual |
Definition at line 54 of file GridConnectHub.hxx.
|
static |
This function connects an ASCII (GridConnect-format) CAN adapter to a binary CAN adapter, performing the necessary format conversions inbetween.
Specifically, it takes two Hub flows as input, one carrying CAN frames in GridConnect protocol, and the other carrying CAN frames in the binary protocol.
| gc_side | is the Hub that has the ASCII GridConnect traffic. |
| can_side | is the Hub that has the binary CAN traffic. |
| double_bytes | if true, any frame rendered into the GC protocol will have their characters doubled. |
Definition at line 357 of file GridConnectHub.cxx.
|
static |
Creates a gridconnect-CAN bridge with separate pipes for reading (parsing) from the GC side and writing (formatting) to the GC side.
*/
| gc_side_read | is the Hub that the GridConnect traffic is read from, to be converted and sent to binary. |
| gc_side_write | is the Hub that the coverted GridConnect traffic is written to. |
| can_side | the hub (of type struct can_frame) that the binary IO is done via. |
| double_bytes | if true, any frame rendered into the GC protocol will have their characters doubled. |
Definition at line 364 of file GridConnectHub.cxx.
|
pure virtual |
Unregisters *this from the pipes.
Implemented in GCAdapter.