Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions python/fusion_engine_client/messages/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class InterfaceConfigType(IntEnum):
ENABLED = 5
DIRECTION = 6
SOCKET_TYPE = 7
FILE_PATH = 8


class Direction(IntEnum):
Expand Down Expand Up @@ -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):
"""!
Expand Down
21 changes: 16 additions & 5 deletions src/point_one/fusion_engine/messages/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 string represents the path to the local
* 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.
*/
Expand Down Expand Up @@ -1612,6 +1609,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,
};

/**
Expand Down Expand Up @@ -1647,6 +1655,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";
Expand Down
Loading