Skip to content

Commit

Permalink
Remove dest_channel_id from NetworkChannel (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
LasseRosenow authored Nov 13, 2024
1 parent ebcfa91 commit fde8ec6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions include/reactor-uc/network_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ typedef struct FederatedConnectionBundle FederatedConnectionBundle;
typedef struct NetworkChannel NetworkChannel;

struct NetworkChannel {
/**
* @brief Used to identify this NetworkChannel among other NetworkChannels at the other federate.
*/
size_t dest_channel_id;

/**
* @brief Expected time until a connection is established after calling @p try_connect.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/platform/posix/tcp_ip_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ static void TcpIpChannel_free(NetworkChannel *untyped_self) {
self->super.close_connection((NetworkChannel *)self);
}

NetworkChannelState TcpIpChannel_get_state(NetworkChannel *untyped_self) {
static NetworkChannelState TcpIpChannel_get_connection_state(NetworkChannel *untyped_self) {
TcpIpChannel *self = (TcpIpChannel *)untyped_self;
return self->state;
}
Expand All @@ -486,12 +486,12 @@ void TcpIpChannel_ctor(TcpIpChannel *self, const char *host, unsigned short port
self->fd = 0;
self->state = NETWORK_CHANNEL_STATE_UNINITIALIZED;

self->super.get_connection_state = TcpIpChannel_get_connection_state;
self->super.open_connection = TcpIpChannel_open_connection;
self->super.try_connect = TcpIpChannel_try_connect;
self->super.close_connection = TcpIpChannel_close_connection;
self->super.send_blocking = TcpIpChannel_send_blocking;
self->super.register_receive_callback = TcpIpChannel_register_receive_callback;
self->super.get_connection_state = TcpIpChannel_get_state;
self->super.free = TcpIpChannel_free;
self->super.expected_try_connect_duration = MSEC(10); // Needed for Zephyr
self->receive_callback = NULL;
Expand Down

0 comments on commit fde8ec6

Please sign in to comment.