Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a new hub application using DirectHub #761

Merged
merged 110 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
a1e7416
Adds support for compiling simplelink with select async callback.
balazsracz Feb 10, 2020
fff2ff4
Adds variety of code and documentation about routing.
balazsracz Feb 15, 2020
8ece440
more comments on design.
balazsracz Feb 15, 2020
80a5588
More documentation.
balazsracz Feb 16, 2020
4ef9caa
Moves documentation to a separate .md file.
balazsracz Feb 16, 2020
0ae6bf1
more docs.
balazsracz Feb 16, 2020
0178288
Merge branch 'master' of github.com:bakerstu/openmrn into bracz-direc…
balazsracz Feb 16, 2020
8a7d3c8
Starts adding the outline of directhub.
balazsracz Feb 16, 2020
d8a5615
Adds implementation of input and output.
balazsracz Feb 16, 2020
e659189
Adds the class owning the message payloads.
balazsracz Feb 16, 2020
22e2579
Adds DataBuffer with a respective pool to allocate buffers holding un…
balazsracz Feb 17, 2020
9c68404
Adds basic write flow to DirectHub.
balazsracz Feb 17, 2020
4f8e8db
Adds code to RingBuffer that allows direct writes and reads into the …
balazsracz Feb 17, 2020
78691b9
swithes DirectHub to use DataBuffer.
balazsracz Feb 17, 2020
dd1ed87
Merges LinkedDataBuffer and DataBuffer.
balazsracz Feb 17, 2020
0fc10f0
Adds implementation of the read flow.
balazsracz Feb 17, 2020
6de3725
Adds end to end test for direct hub.
balazsracz Feb 17, 2020
7132261
Adds more test cases to the end to end test.
balazsracz Feb 17, 2020
a98007f
Adds a TCP listener hub to the DirectHub classes.
balazsracz Feb 18, 2020
b2d2f49
Adds a block notifiable class that can be used as a semaphore of Barr…
balazsracz Feb 18, 2020
d6fce5e
Adds limiting the memory buffer in the hub.
balazsracz Feb 18, 2020
b1a3162
Fixes bugs in the direct hub implementation.
balazsracz Feb 18, 2020
6697d6e
Part of the code for shutdown is copied from HuBDeviceSelect.
balazsracz Feb 23, 2020
83314f8
Implements clean shutdown in the hub.
balazsracz Feb 23, 2020
4003263
Adds a unit test that tries to make the socket blocked.
balazsracz Feb 26, 2020
75cce4c
Test total bytes transmitted via blocked test.
balazsracz Feb 27, 2020
be7ffd5
Adds allocation of the limited pool barrier notifiable into the read …
balazsracz Feb 28, 2020
3caaf9e
Merge branch 'master' into bracz-direct-hub-router
balazsracz Mar 1, 2020
b057848
Adds a bunch more unittests including for race conditions etc.
balazsracz Mar 1, 2020
0b178cb
reformat
balazsracz Mar 1, 2020
412eb86
Adds test for skipping and chaining.
balazsracz Mar 1, 2020
bda595b
fix compilation error
balazsracz Mar 1, 2020
d384fcd
updates chaining test to also check for a buffer with limited size.
balazsracz Mar 1, 2020
51fe936
Adds segmenter API and gridconnect segmenter implementation.
balazsracz Mar 1, 2020
9e622c2
Adds trivial message segmenter.
balazsracz Mar 1, 2020
c4c9bff
Adds LinkedDataBufferPtr to hold the buf_ head tail skip and free ele…
balazsracz Mar 1, 2020
803f5b7
Rewrites DirectHub to use LinkedDataBufferPtr.
balazsracz Mar 1, 2020
6696891
Fix compilation errors.
balazsracz Mar 2, 2020
f0ee164
Fix broken tests due to leaked reference.
balazsracz Mar 2, 2020
024f96d
Fixes some bugs around segmentation.
balazsracz Mar 4, 2020
c666165
Adds support for calling tests with TESTARGS.
balazsracz Mar 4, 2020
f568068
Adds more expectations on correct segmenting:
balazsracz Mar 4, 2020
42c370e
Fixes a bug on calling the segmenter clear too many times.
balazsracz Mar 4, 2020
70ecb96
Adds (one direction) of a legacy conversion routine.
balazsracz Mar 6, 2020
9e03b5b
Moves the code to reassemble a linkeddatabuffer into a string as a he…
balazsracz Mar 6, 2020
e996774
Implements the reversed conversion routine.
balazsracz Mar 6, 2020
13ed147
starts adding a unit test for the legacy CAN converter.
balazsracz Mar 6, 2020
f9fe772
gc_format fixes:
balazsracz Mar 7, 2020
f56ac28
Adds tests for the new gridconnect hub to old can-hub connection.
balazsracz Mar 7, 2020
bad32e7
Ensures that notifiable blocks are reclaimed when being deleted.
balazsracz Mar 7, 2020
c96e108
Makes DirectHub delete-able.
balazsracz Mar 7, 2020
e3aba68
Fixes race conditions on exit and memory leaks.
balazsracz Mar 7, 2020
0465ed1
Fix whitespace.
balazsracz Mar 7, 2020
addec73
Reorder includes.
balazsracz Mar 7, 2020
b155643
Fixes destructor and unit tests on async notifiable block.
balazsracz Mar 7, 2020
0ce5214
Adds support for SO_RCVBUF.
balazsracz Mar 8, 2020
1a9f939
Adds better debug/logging.
balazsracz Mar 8, 2020
710a9bb
Fixes bugs in leaking buffers when the remote socket was unexpectedly…
balazsracz Mar 8, 2020
ff1f1c3
Adds support for inplace append to next data buffer.
balazsracz Mar 8, 2020
ebef72e
Adds support to requesting next() while having the lock acquired exte…
balazsracz Mar 17, 2020
0e5f960
Adds support for appending to the tail buffer instead of enqueueing a…
balazsracz Mar 17, 2020
0d1ea13
Ensures that inbounds CAN frames are sent at the topmost priority.
balazsracz Mar 17, 2020
f40c92c
Merge branch 'master' into bracz-direct-hub-router
balazsracz Mar 28, 2022
4422475
Fixes a template instantiation problem.
Apr 9, 2022
49bc1be
Merge branch 'master' of github.com:bakerstu/openmrn into bracz-direc…
balazsracz Dec 22, 2023
04c9aaf
Adds a facility to override the directhub buffer pool allocation size…
balazsracz Dec 30, 2023
c86c375
Updates documentation about incoming direct byte buffering, as the pa…
balazsracz Dec 30, 2023
19ceb97
Avoid too deep recursion in state flow.
balazsracz Dec 30, 2023
dac5d9a
Fix broken test.
balazsracz Dec 30, 2023
0475a1f
Fix comment
balazsracz Dec 30, 2023
d0890cb
Refactors blocked socket tests.
balazsracz Dec 30, 2023
28968ce
Makes main buffer pool contain only specifically allocated buffers by…
balazsracz Dec 30, 2023
ad6c8da
Adds an extra blocked socket test with the prod buffer sizes.
balazsracz Dec 30, 2023
b84727e
Fixes incorrectly set done notifiable.
balazsracz Dec 30, 2023
26ccb99
Removes expectation on total number of bytes transferred, because it …
balazsracz Dec 31, 2023
e68dbad
Improves readability in data buffer, adds additional tests on an inva…
balazsracz Dec 31, 2023
aa60f18
Adds a facility to change constant values in unit tests.
balazsracz Dec 31, 2023
7bf8b3b
Adds some verbose log messages.
balazsracz Dec 31, 2023
5ff2f5d
Adds more comments for the data and code flow.
balazsracz Dec 31, 2023
60779aa
Uses the constant override facility to restoare the blocked tests to …
balazsracz Dec 31, 2023
c2d2ac1
Makes the directhub buffer size configurable with a link option.
balazsracz Dec 31, 2023
e97d1b1
Fix whitespace.
balazsracz Dec 31, 2023
9864e0b
Merge branch 'master' into bracz-direct-hub-router
balazsracz Dec 31, 2023
cff3c6e
Fix spacing and duplicate lines in sources file after merge conflict.
balazsracz Dec 31, 2023
d10849a
Adds fork of hub application for replacing with direct_hub.
balazsracz Dec 31, 2023
971721c
Fix compile error on FdUtils under freertos.
balazsracz Jan 1, 2024
6d2c3b8
Adds a typedef for the standard string typed directhub template speci…
balazsracz Jan 1, 2024
f4d7530
Makes ClientConnection support DirectHub for gridconnect ports.
balazsracz Jan 1, 2024
2baec09
Update direct_hub application for the new classes.
balazsracz Jan 1, 2024
669f51b
Ensures that we keep the barrier pointer in a child when a CAN packet…
balazsracz Jan 1, 2024
26e7697
Updates to the app:
balazsracz Jan 2, 2024
0f7960a
Fix compile error on FdUtils under freertos.
balazsracz Jan 1, 2024
2edb40e
Ensures that we keep the barrier pointer in a child when a CAN packet…
balazsracz Jan 1, 2024
297b530
Merge branch 'bracz-direct-hub-router' into bracz-direct-hub-app
balazsracz Jan 2, 2024
67b73a1
Write a new overview / introduction to the directhub page.
balazsracz Jan 2, 2024
ed2c799
Makes the documentation up to date.
balazsracz Jan 2, 2024
3acd1f9
Merge branch 'bracz-direct-hub-router' into bracz-direct-hub-app
balazsracz Jan 2, 2024
fe2a64d
Minor updates to the docs.
balazsracz Jan 2, 2024
2e58e61
Minor updates to the docs.
balazsracz Jan 2, 2024
bdca452
Merge branch 'bracz-direct-hub-router' into bracz-direct-hub-app
balazsracz Jan 2, 2024
d869a7b
Removes limitation on wait time.
balazsracz Jan 6, 2024
3b883c7
FIx comments.
balazsracz Jun 21, 2024
39d50d2
Fix comments and reduce unnecessary log level.
balazsracz Jun 21, 2024
4820101
Remove unnecessary log.
balazsracz Jun 21, 2024
523412d
Fixed comment and adds a todo.
balazsracz Jun 21, 2024
3b9647e
Merge branch 'master' of github.com:bakerstu/openmrn into bracz-direc…
balazsracz Jun 21, 2024
6b80335
Fix test build.
balazsracz Jun 21, 2024
da9fa2c
Merge branch 'master' of github.com:bakerstu/openmrn into bracz-direc…
balazsracz Jun 21, 2024
f4b2440
Merge branch 'bracz-direct-hub-router' into bracz-direct-hub-app
balazsracz Jun 21, 2024
6326257
Fix printout.
balazsracz Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions applications/direct_hub/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBDIRS = targets
-include config.mk
include $(OPENMRNPATH)/etc/recurse.mk
1 change: 1 addition & 0 deletions applications/direct_hub/config.mk
240 changes: 240 additions & 0 deletions applications/direct_hub/main.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
/** \copyright
* Copyright (c) 2013, Balazs Racz
* All rights reserved.
*
* 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.
*
* \file main.cxx
*
* An application which acts as an openlcb hub with the GC protocol, using the
* DirectHub infrastructure.
*
* @author Balazs Racz
* @date 31 Dec 2023
*/

#include <fcntl.h>
#include <getopt.h>
#include <stdio.h>
#include <unistd.h>

#include <memory>

#include "executor/Executor.hxx"
#include "executor/Service.hxx"
#include "os/os.h"
#include "utils/ClientConnection.hxx"
#include "utils/DirectHub.hxx"
#include "utils/HubDeviceSelect.hxx"
#include "utils/SocketCan.hxx"
#include "utils/constants.hxx"

Executor<1> g_executor("g_executor", 0, 1024);
Service g_service(&g_executor);

std::unique_ptr<ByteDirectHubInterface> g_direct_hub {create_hub(&g_executor)};

CanHubFlow can_hub0(&g_service);

OVERRIDE_CONST(gc_generate_newlines, 1);
OVERRIDE_CONST(gridconnect_tcp_snd_buffer_size, 8192);
OVERRIDE_CONST(gridconnect_tcp_rcv_buffer_size, 8192);
OVERRIDE_CONST(gridconnect_tcp_notsent_lowat_buffer_size, 1024);

int port = 12021;
const char *device_path = nullptr;
const char *socket_can_path = nullptr;
int upstream_port = 12021;
const char *upstream_host = nullptr;
bool timestamped = false;
bool export_mdns = false;
const char *mdns_name = "openmrn_hub";
bool printpackets = false;

void usage(const char *e)
{
fprintf(stderr,
"Usage: %s [-p port] [-d device_path] [-u upstream_host] "
"[-q upstream_port] [-m] [-n mdns_name] "
#if defined(__linux__)
"[-s socketcan_interface] "
#endif
"[-t] [-l]\n\n",
e);
fprintf(stderr,
"GridConnect CAN HUB.\nListens to a specific TCP port, "
"reads CAN packets from the incoming connections using "
"the GridConnect protocol, and forwards all incoming "
"packets to all other participants.\n\nArguments:\n");
fprintf(stderr,
"\t-p port specifies the port number to listen on, "
"default is 12021.\n");
fprintf(stderr,
"\t-d device is a path to a physical device doing "
"serial-CAN or USB-CAN. If specified, opens device and "
"adds it to the hub.\n");
#if defined(__linux__)
fprintf(stderr,
"\t-s socketcan_interface is a socketcan device (e.g. 'can0'). "
"If specified, opens device and adds it to the hub.\n");
#endif
fprintf(stderr,
"\t-u upstream_host is the host name for an upstream "
"hub. If specified, this hub will connect to an upstream "
"hub.\n");
fprintf(stderr,
"\t-q upstream_port is the port number for the upstream hub.\n");
fprintf(stderr, "\t-t prints timestamps for each packet.\n");
fprintf(stderr, "\t-l print all packets.\n");
#ifdef HAVE_AVAHI_CLIENT
fprintf(stderr, "\t-m exports the current service on mDNS.\n");
fprintf(
stderr, "\t-n mdns_name sets the exported mDNS name. Implies -m.\n");
#endif
exit(1);
}

void parse_args(int argc, char *argv[])
{
int opt;
while ((opt = getopt(argc, argv, "hp:d:s:u:q:tlmn:")) >= 0)
{
switch (opt)
{
case 'h':
usage(argv[0]);
break;
case 'd':
device_path = optarg;
break;
#if defined(__linux__)
case 's':
socket_can_path = optarg;
break;
#endif
case 'p':
port = atoi(optarg);
break;
case 'u':
upstream_host = optarg;
break;
case 'q':
upstream_port = atoi(optarg);
break;
case 't':
timestamped = true;
break;
case 'm':
export_mdns = true;
break;
case 'n':
mdns_name = optarg;
export_mdns = true;
break;
case 'l':
printpackets = true;
break;
default:
fprintf(stderr, "Unknown option %c\n", opt);
usage(argv[0]);
}
}
}

void create_legacy_bridge() {
static bool is_created = false;
if (!is_created) {
is_created = true;
create_gc_to_legacy_can_bridge(g_direct_hub.get(), &can_hub0);
}
}

/** Entry point to application.
* @param argc number of command line arguments
* @param argv array of command line arguments
* @return 0, should never return
*/
int appl_main(int argc, char *argv[])
{
parse_args(argc, argv);
// GcPacketPrinter packet_printer(&can_hub0, timestamped);
GcPacketPrinter *packet_printer = NULL;
if (printpackets)
{
create_legacy_bridge();
packet_printer = new GcPacketPrinter(&can_hub0, timestamped);
}
fprintf(stderr, "packet_printer points to %p\n", packet_printer);
create_direct_gc_tcp_hub(g_direct_hub.get(), port);
vector<std::unique_ptr<ConnectionClient>> connections;

#ifdef HAVE_AVAHI_CLIENT
void mdns_client_start();
void mdns_publish(const char *name, uint16_t port);

if (export_mdns)
{
mdns_client_start();
mdns_publish(mdns_name, port);
}
#endif

#if defined(__linux__)
if (socket_can_path)
{
int s = socketcan_open(socket_can_path, 1);
if (s >= 0)
{
create_legacy_bridge();
new HubDeviceSelect<CanHubFlow>(&can_hub0, s);
fprintf(stderr, "Opened SocketCan %s: fd %d\n", socket_can_path, s);
}
else
{
fprintf(stderr, "Failed to open SocketCan %s.\n", socket_can_path);
}
}
#endif

if (upstream_host)
{
connections.emplace_back(new UpstreamConnectionClient(
"upstream", g_direct_hub.get(), upstream_host, upstream_port));
}

if (device_path)
{
connections.emplace_back(new DeviceConnectionClient(
"device", g_direct_hub.get(), device_path));
}

while (1)
{
for (const auto &p : connections)
{
p->ping();
}
sleep(1);
}
return 0;
}
2 changes: 2 additions & 0 deletions applications/direct_hub/subdirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SUBDIRS = \

3 changes: 3 additions & 0 deletions applications/direct_hub/targets/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBDIRS = linux.x86 \

include $(OPENMRNPATH)/etc/recurse.mk
2 changes: 2 additions & 0 deletions applications/direct_hub/targets/linux.x86/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
direct_hub
*_test
1 change: 1 addition & 0 deletions applications/direct_hub/targets/linux.x86/AvaHiMDNS.cxx
5 changes: 5 additions & 0 deletions applications/direct_hub/targets/linux.x86/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-include ../../config.mk
include $(OPENMRNPATH)/etc/prog.mk

SYSLIBRARIES += -lavahi-client -lavahi-common
CXXFLAGS += -DHAVE_AVAHI_CLIENT
1 change: 1 addition & 0 deletions applications/direct_hub/targets/linux.x86/lib/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(OPENMRNPATH)/etc/app_target_lib.mk
11 changes: 10 additions & 1 deletion src/utils/ClientConnection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,14 @@ void GCFdConnectionClient::connection_complete(int fd)
FdUtils::optimize_fd(fd);

fd_ = fd;
create_gc_port_for_can_hub(hub_, fd, &closedNotify_, use_select);

if (hub_) {
create_gc_port_for_can_hub(hub_, fd, &closedNotify_, use_select);
} else if (directHub_) {
create_port_for_fd(directHub_, fd,
std::unique_ptr<MessageSegmenter>(create_gc_message_segmenter()),
&closedNotify_);
} else {
DIE("Neither hub, nor directhub given to connection client");
}
}
27 changes: 21 additions & 6 deletions src/utils/ClientConnection.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <fcntl.h>

#include "utils/GridConnectHub.hxx"
#include "utils/DirectHub.hxx"
#include "utils/socket_listener.hxx"
#include "utils/FdUtils.hxx"

Expand Down Expand Up @@ -103,6 +104,16 @@ public:
{
}

/// Constructor.
///
/// @param name user-readable name for this port.
/// @param direct_hub gridconnect DirectHub to connect this device to.
GCFdConnectionClient(const string &name, ByteDirectHubInterface *direct_hub)
: closedNotify_(&fd_, name)
, directHub_(direct_hub)
{
}

virtual ~GCFdConnectionClient()
{
}
Expand Down Expand Up @@ -136,10 +147,12 @@ private:
/// Will be called when the descriptor experiences an error (typivcally
/// upon device closed or connection lost).
DeviceClosedNotify closedNotify_;
/// Filedes of the currently open device/socket.
/// File descriptor of the currently open device/socket.
int fd_{-1};
/// CAN hub to read-write data to.
CanHubFlow *hub_;
CanHubFlow *hub_{nullptr};
/// DirectHub to read/write data to.
ByteDirectHubInterface *directHub_{nullptr};
};

/// Connection client that opens a character device (such as an usb-serial) and
Expand All @@ -151,10 +164,11 @@ public:
/// Constructor.
///
/// @param name user-readable name of this device
/// @param hub CAN packet hub to connect this device to
/// @param hub CAN packet hub or GC DirectHub to connect this device to
/// @param dev filename of the device node to open
template<typename HubType>
DeviceConnectionClient(
const string &name, CanHubFlow *hub, const string &dev)
const string &name, HubType *hub, const string &dev)
: GCFdConnectionClient(name, hub)
, dev_(dev)
{
Expand Down Expand Up @@ -193,11 +207,12 @@ public:
/// Constructor.
///
/// @param name user-readable name that will be printed upon an error.
/// @param hub CAN hub to connect device to
/// @param hub CAN packet hub or GC DirectHub to connect this device to
/// @param host where to connect to
/// @param port where to connect to
template<typename HubType>
UpstreamConnectionClient(
const string &name, CanHubFlow *hub, const string &host, int port)
const string &name, HubType *hub, const string &host, int port)
: GCFdConnectionClient(name, hub)
, host_(host)
, port_(port)
Expand Down
8 changes: 5 additions & 3 deletions src/utils/DirectHub.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ public:
virtual void do_send() = 0;
};

typedef DirectHubInterface<uint8_t[]> ByteDirectHubInterface;

/// Creates a new byte stream typed hub.
DirectHubInterface<uint8_t[]> *create_hub(ExecutorBase *e);
ByteDirectHubInterface *create_hub(ExecutorBase *e);

/// Creates a hub port of byte stream type reading/writing a given fd. This
/// port will be automaticelly deleted upon any error reading/writing the fd
Expand All @@ -212,7 +214,7 @@ DirectHubInterface<uint8_t[]> *create_hub(ExecutorBase *e);
/// @param segmenter is an newly allocated object for the given protocol to
/// segment incoming data into messages. Transfers ownership to the function.
/// @param on_error this will be notified if the port closes due to an error.
void create_port_for_fd(DirectHubInterface<uint8_t[]> *hub, int fd,
void create_port_for_fd(ByteDirectHubInterface *hub, int fd,
std::unique_ptr<MessageSegmenter> segmenter,
Notifiable *on_error = nullptr);

Expand All @@ -221,7 +223,7 @@ void create_port_for_fd(DirectHubInterface<uint8_t[]> *hub, int fd,
/// @param hub incoming and outgoing data will be multiplexed through this hub
/// instance.
/// @param port the TCP port to listen on.
void create_direct_gc_tcp_hub(DirectHubInterface<uint8_t[]> *hub, int port);
void create_direct_gc_tcp_hub(ByteDirectHubInterface *hub, int port);

/// Creates a message segmenter for gridconnect data.
/// @return a newly allocated message segmenter that chops gridconnect packets
Expand Down
Loading