summaryrefslogtreecommitdiff
path: root/src/gateway/dlt_gateway_types.h
diff options
context:
space:
mode:
authorChristoph Lipka <clipka@jp.adit-jv.com>2015-12-01 11:11:51 +0900
committerLutz Helwing <lutz_helwing@mentor.com>2015-12-16 10:41:36 +0100
commitc4f073db44a36cfa96a17032afedbf36e4afc3b6 (patch)
tree97be20ed225465770e06eafa83e39a5089e8d531 /src/gateway/dlt_gateway_types.h
parentf54b52d764a7ea0f4c80e6124f5d89d3968d2906 (diff)
downloadDLT-daemon-c4f073db44a36cfa96a17032afedbf36e4afc3b6.tar.gz
MultiNode: Reconnection after connection loss
The Gateway DLT Daemon will try to reconnect to a passive node once after the connection was lost. The maximum number of reconnects can be configured by changing the DLT_GATEWAY_RECONNECT_MAX definition. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Diffstat (limited to 'src/gateway/dlt_gateway_types.h')
-rw-r--r--src/gateway/dlt_gateway_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gateway/dlt_gateway_types.h b/src/gateway/dlt_gateway_types.h
index b1247dd..ad841c1 100644
--- a/src/gateway/dlt_gateway_types.h
+++ b/src/gateway/dlt_gateway_types.h
@@ -63,6 +63,8 @@
#define DLT_GATEWAY_CONFIG_PATH CONFIGURATION_FILES_DIR "/dlt_gateway.conf"
#define DLT_GATEWAY_TIMER_INTERVAL 1
+#define DLT_GATEWAY_RECONNECT_MAX 1 /* reconnect once after connection loss */
+
typedef enum
{
DLT_GATEWAY_UNINITIALIZED,
@@ -92,6 +94,7 @@ typedef struct {
connection_trigger trigger; /* connection trigger */
int timeout; /* connection timeout */
int timeout_cnt; /* connection timeout counter */
+ int reconnect_cnt; /* reconnection counter */
DltClient client; /* DltClient structure */
} DltGatewayConnection;