Skip to content

Commit

Permalink
Adds override for default on whether reconnect should be on or off. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz authored Sep 19, 2022
1 parent 2419cd8 commit 4764083
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/openlcb/ConfiguredTcpConnection.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ public:
static constexpr const char *RECONNECT_MAP =
"<relation><property>0</property><value>Disabled</value></relation>"
"<relation><property>1</property><value>Enabled</value></relation>";
/// Default value for the Reconnect parameter.
static constexpr int RECONNECT_DEFAULT = 1;
};

template <class LocalParams> CDI_GROUP(TcpManualAddress);
Expand Down Expand Up @@ -149,7 +151,8 @@ CDI_GROUP_ENTRY(auto_address, TcpAutoAddress<LocalParams>,
Name(LocalParams::AUTO_ADDRESS_NAME),
Description(LocalParams::AUTO_ADDRESS_DESCR));
CDI_GROUP_ENTRY(reconnect, Uint8ConfigEntry, Name(LocalParams::RECONNECT_NAME),
Description(LocalParams::RECONNECT_DESCR), Min(0), Max(1), Default(1),
Description(LocalParams::RECONNECT_DESCR), Min(0), Max(1),
Default(LocalParams::RECONNECT_DEFAULT),
MapValues(LocalParams::RECONNECT_MAP));
/// Internal storage for the last working address. If the IP address field is
/// clear, there is no last known good address.
Expand Down

0 comments on commit 4764083

Please sign in to comment.