From 379a6e5931679b7ffb7962ec16f5a0a155b34f3f Mon Sep 17 00:00:00 2001 From: Bui Nguyen Quoc Thanh Date: Tue, 7 Apr 2020 09:34:49 +0700 Subject: doc: md file for dlt_gateway.conf Signed-off-by: Bui Nguyen Quoc Thanh --- doc/CMakeLists.txt | 7 +++ doc/dlt_gateway.conf.5.md | 119 ++++++++++++++++++++++++++++++++++++++++++++++ doc/dlt_multinode.md | 33 ++++--------- 3 files changed, 135 insertions(+), 24 deletions(-) create mode 100644 doc/dlt_gateway.conf.5.md (limited to 'doc') diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 35f7213..e008626 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -94,6 +94,7 @@ if(WITH_MAN) set(MD_SRC ${MAN_SRC_DIR}/dlt.conf.5.md ${MAN_SRC_DIR}/dlt-system.conf.5.md + ${MAN_SRC_DIR}/dlt_gateway.conf.5.md ${MAN_SRC_DIR}/dlt-convert.1.md ${MAN_SRC_DIR}/dlt-sortbytimestamp.1.md ${MAN_SRC_DIR}/dlt-daemon.1.md @@ -108,6 +109,7 @@ if(WITH_MAN) set(MAN_SRC ${MAN_SRC_DIR}/dlt.conf.5 ${MAN_SRC_DIR}/dlt-system.conf.5 + ${MAN_SRC_DIR}/dlt_gateway.conf.5 ${MAN_SRC_DIR}/dlt-convert.1 ${MAN_SRC_DIR}/dlt-sortbytimestamp.1 ${MAN_SRC_DIR}/dlt-daemon.1 @@ -122,6 +124,7 @@ if(WITH_MAN) set(MAN_BUILD_SRC ${MAN_BUILD_DIR}/dlt.conf.5 ${MAN_BUILD_DIR}/dlt-system.conf.5 + ${MAN_BUILD_DIR}/dlt_gateway.conf.5 ${MAN_BUILD_DIR}/dlt-convert.1 ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 ${MAN_BUILD_DIR}/dlt-daemon.1 @@ -136,6 +139,7 @@ if(WITH_MAN) set(MAN_BUILD_GZ ${MAN_BUILD_DIR}/dlt.conf.5.gz ${MAN_BUILD_DIR}/dlt-system.conf.5.gz + ${MAN_BUILD_DIR}/dlt_gateway.conf.5.gz ${MAN_BUILD_DIR}/dlt-convert.1.gz ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1.gz ${MAN_BUILD_DIR}/dlt-daemon.1.gz @@ -150,6 +154,7 @@ if(WITH_MAN) add_custom_target(generate_man ALL COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt.conf.5.md -o ${MAN_BUILD_DIR}/dlt.conf.5 COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-system.conf.5.md -o ${MAN_BUILD_DIR}/dlt-system.conf.5 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt_gateway.conf.5.md -o ${MAN_BUILD_DIR}/dlt_gateway.conf.5 COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-convert.1.md -o ${MAN_BUILD_DIR}/dlt-convert.1 COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-sortbytimestamp.1.md -o ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-daemon.1.md -o ${MAN_BUILD_DIR}/dlt-daemon.1 @@ -163,6 +168,7 @@ if(WITH_MAN) COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt.conf.5 > ${MAN_BUILD_DIR}/dlt.conf.5.gz COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-system.conf.5 > ${MAN_BUILD_DIR}/dlt-system.conf.5.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt_gateway.conf.5 > ${MAN_BUILD_DIR}/dlt_gateway.conf.5.gz COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-convert.1 > ${MAN_BUILD_DIR}/dlt-convert.1.gz COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 > ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1.gz COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-daemon.1 > ${MAN_BUILD_DIR}/dlt-daemon.1.gz @@ -180,6 +186,7 @@ if(WITH_MAN) install(FILES ${MAN_BUILD_DIR}/dlt.conf.5.gz ${MAN_BUILD_DIR}/dlt-system.conf.5.gz + ${MAN_BUILD_DIR}/dlt_gateway.conf.5.gz DESTINATION ${MAN_INSTALL_DIR}/man5 ) diff --git a/doc/dlt_gateway.conf.5.md b/doc/dlt_gateway.conf.5.md new file mode 100644 index 0000000..61eb063 --- /dev/null +++ b/doc/dlt_gateway.conf.5.md @@ -0,0 +1,119 @@ +% DLT_GATEWAY.CONF(5) + +# NAME + +**dlt_gateway.conf** - DLT configuration file for gateway + +# DESCRIPTION + +The configuration file dlt_gateway.conf allows to configure the different runtime behaviour of gateway in Multinode feature. + +The configuration file is written in an INI file format and contains information about different connected passive nodes. + +If Multinode feature is enabled, dlt-daemon loads by default the configuration file /etc/dlt_gateway.conf. + +An alternative configuration file can be loaded by changing `GatewayConfigFile` in dlt.conf(5). + +# GENERAL SECTION + +### Interval + +Time interval for reconnection to passive Node in second. + + Default: 1 + +# PASSIVENODE SECTION + +Each passive node’s connection parameters are specified in a unique numbered separate section + +([PassiveNode{1,2, …N}]). + + Example: [PassiveNode1] + +### IPaddress + +Because TCP is the only supported communication channel, + +the IPaddress and Port of the Passive DLT Daemon has to be specified. + +IP Address of passive node. Mandatory + +### Port + +TCP port. Default 3490 is used if no port is specified. + + Default: 3490 + +### EcuID + +ECU identifier of passive node. Mandatory. + +### Connect + +With the Connect property it is possible to specify when the Gateway DLT Daemon +shall connect to the passive node. + + Default: OnStartUp + + The following values are allowed: + + OnStartup The Gateway DLT Daemon tries to connect to the Passive DLT Daemon + immediately after the Gateway DLT Daemon is started. + OnDemand The Gateway DLT Daemon tries to connect to the Passive DLT Daemon + when it receives a connection request. + +### Timeout + +Stop connecting to passive node, if not successful after 10 retries. + +After of retries, the connection to passive Node is marked as DISABLED. + +It means there is no any retry anymore. + +Set to 0 for endless retry. + + Default: 10 + +### SendControl + +Send following control messages after connection is established. Optional. + + Default: disabled + +Supported Control messages: + + DLT_SERVICE_ID_GET_LOG_INFO 0x03 + DLT_SERVICE_ID_GET_DEFAULT_LOG_LEVEL 0x04 + DLT_SERVICE_ID_GET_SOFTWARE_VERSION 0x13 + +### SendSerialHeader + +Send Serial Header with control messages. Value in dlt.conf(5) is used as default if not specified. + + Default: disabled + +### SendPeriodicControl + +Send following control messages periodically. + + Default: disabled + +Format: + + control:interval[in seconds] + +# AUTHOR + +Thanh Bui Nguyen Quoc (thanh.buinguyenquoc (at) vn (dot) bosch (dot) vn) + +# COPYRIGHT + +Copyright (C) 2020 Advanced Driver Information Technology, Bosch and DENSO. License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/. + +# BUGS + +See Github issue: + +# SEE ALSO + +**dlt.conf(5)**, **dlt-daemon(1)** diff --git a/doc/dlt_multinode.md b/doc/dlt_multinode.md index ff9c85c..bfb13aa 100644 --- a/doc/dlt_multinode.md +++ b/doc/dlt_multinode.md @@ -38,10 +38,14 @@ GatewayMode = 1 ### Gateway Configuration File -The MultiNode configuration file has to be loaded by the Gateway DLT Daemon -during startup. +The MultiNode configuration file has to be loaded by the Gateway DLT Daemon during startup. + +Example: ``` +[General] +Interval=1 + [PassiveNode1] ; IP Address. (Mandatory) IPaddress = 192.168.2.32 @@ -51,7 +55,8 @@ Port = 3495 EcuID = ECU2 ; Connection to passive node only on demand. Default ‘OnStartup’ if not specified Connect = OnDemand -; timeout in seconds +; Stop connecting to passive node, if not successful after 10 retries. +; Set to 0 for endless retry. Timeout = 10 ; Send following control messages after connection is established SendControl=0x03, 0x13 @@ -60,27 +65,7 @@ SendControl=0x03, 0x13 SendSerialHeader=1 ``` -The configuration file is written in an INI file format and contains information -about different connected passive nodes. Each passive node’s connection -parameters are specified in a unique numbered separate section -([PassiveNode{1,2, …N}]). Because TCP is the only supported communication -channel, the IPaddress and Port of the Passive DLT Daemon has to be specified. - -With the Connect property it is possible to specify when the Gateway DLT Daemon -shall connect to the passive node. The following values are allowed: -- OnStartup - The Gateway DLT Daemon tries to connect to the Passive DLT Daemon - immediately after the Gateway DLT Daemon is started. -- OnDemand - The Gateway DLT Daemon tries to connect to the Passive DLT Daemon - when it receives a connection request. - -The Timeout property specifies the time after which the Gateway DLT Daemon stops -connecting attempts to a Passive DLT Daemon. If the connection is not -established within the specified time, the Gateway DLT Daemon gives up -connecting attempts and writes an error messages to its internal log. The -following control messages are supported to be send to a passive node -automatically after connection is established: -- 0x03: Get Log Info -- 0x13: Get Software Version +For more details, please refer to [dlt_gateway.conf.5.md](dlt_gateway.conf.5.md) ## Using DLT MultiNode -- cgit v1.2.1