From 35c1b12e6b22c4eb1ea231375f18b61a661ceacd Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Thu, 24 Jul 2025 09:56:20 -0400 Subject: [PATCH 1/2] Added InterfaceConfigType.FILE_PATH option. --- .../messages/configuration.py | 9 +++++++++ .../fusion_engine/messages/configuration.h | 18 ++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/python/fusion_engine_client/messages/configuration.py b/python/fusion_engine_client/messages/configuration.py index 95556de0..8d8c7f00 100644 --- a/python/fusion_engine_client/messages/configuration.py +++ b/python/fusion_engine_client/messages/configuration.py @@ -60,6 +60,7 @@ class InterfaceConfigType(IntEnum): ENABLED = 5 DIRECTION = 6 SOCKET_TYPE = 7 + FILE_PATH = 8 class Direction(IntEnum): @@ -992,6 +993,14 @@ class InterfaceSocketTypeConfig(_conf_gen.SocketTypeVal): pass +@_conf_gen.create_interface_config_class(InterfaceConfigType.FILE_PATH, _conf_gen.StringConstruct(64)) +class InterfaceFilePathConfig(_conf_gen.StringVal): + """! + @brief The path to a local file to be written or UNIX domain socket to be used. + """ + pass + + @_conf_gen.create_interface_config_class(InterfaceConfigType.OUTPUT_DIAGNOSTICS_MESSAGES, _conf_gen.BoolConstruct) class InterfaceDiagnosticMessagesEnabled(_conf_gen.BoolVal): """! diff --git a/src/point_one/fusion_engine/messages/configuration.h b/src/point_one/fusion_engine/messages/configuration.h index 4da5f4aa..17185d44 100644 --- a/src/point_one/fusion_engine/messages/configuration.h +++ b/src/point_one/fusion_engine/messages/configuration.h @@ -1558,8 +1558,8 @@ enum class InterfaceConfigType : uint8_t { /** * Configure the network address for a client to connect to. * - * For UNIX domain sockets, this string represents the path to the local - * socket file. + * For UNIX domain sockets, this is an alias for @ref FILE_PATH and represents + * the path to the local UNIX domain socket file. * * Valid for: * - @ref TransportType::TCP @@ -1612,6 +1612,17 @@ enum class InterfaceConfigType : uint8_t { * Payload format: @ref SocketType */ SOCKET_TYPE = 7, + + /** + * Configure the path to a local file or UNIX domain socket. + * + * Valid for: + * - @ref TransportType::FILE + * - @ref TransportType::UNIX + * + * Payload format: `char[64]` containing a NULL terminated string. + */ + FILE_PATH = 8, }; /** @@ -1647,6 +1658,9 @@ P1_CONSTEXPR_FUNC const char* to_string(InterfaceConfigType type) { case InterfaceConfigType::SOCKET_TYPE: return "Socket Type"; + + case InterfaceConfigType::FILE_PATH: + return "File Path"; } return "Unrecognized Configuration"; From 78ac0d99bc3ba8ca6a8005f41300a5af52e58bbc Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Thu, 24 Jul 2025 10:03:38 -0400 Subject: [PATCH 2/2] Removed unnecssary REMOTE_ADDRESS alias for UNIX domain sockets. Use FILE_PATH instead. --- src/point_one/fusion_engine/messages/configuration.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/point_one/fusion_engine/messages/configuration.h b/src/point_one/fusion_engine/messages/configuration.h index 17185d44..b6063afd 100644 --- a/src/point_one/fusion_engine/messages/configuration.h +++ b/src/point_one/fusion_engine/messages/configuration.h @@ -1556,15 +1556,12 @@ enum class InterfaceConfigType : uint8_t { BAUD_RATE = 2, /** - * Configure the network address for a client to connect to. - * - * For UNIX domain sockets, this is an alias for @ref FILE_PATH and represents - * the path to the local UNIX domain socket file. + * Configure the remote network IP address or hostname for a client to connect + * to. * * Valid for: * - @ref TransportType::TCP * - @ref TransportType::UDP - * - @ref TransportType::UNIX * * Payload format: `char[64]` containing a NULL terminated string. */