14#ifndef ZEPHYR_INCLUDE_MGMT_MCUMGR_GRP_TRANSPORT_MGMT_TRANSPORT_MGMT_H_
15#define ZEPHYR_INCLUDE_MGMT_MCUMGR_GRP_TRANSPORT_MGMT_TRANSPORT_MGMT_H_
74#define TRANSPORT_MGMT_DIRECTION_INCOMING false
80#define TRANSPORT_MGMT_DIRECTION_OUTGOING true
120#if defined(CONFIG_MCUMGR_GRP_TRANSPORT_LOCKING) || defined(__DOXYGEN__)
122void transport_mgmt_lock(
void);
125void transport_mgmt_unlock(
void);
127#define transport_mgmt_lock() (void)0
128#define transport_mgmt_unlock() (void)0
132bool transport_mgmt_is_bridged_internal(
struct smp_transport *transport,
bool direction);
239#if defined(CONFIG_MCUMGR_GRP_TRANSPORT_GROUP_ID_CUSTOM_FUNCTION) || defined(__DOXYGEN__)
249#elif defined(CONFIG_MCUMGR_GRP_TRANSPORT_GROUP_ID_CUSTOM_VALUE)
252#define transport_mgmt_group_id() CONFIG_MCUMGR_GRP_TRANSPORT_GROUP_ID_CUSTOM_VALUE_GROUP_ID
257#define transport_mgmt_group_id() MGMT_GROUP_ID_TRANSPORT
transport_mgmt_config_type_t
Config types.
Definition transport_mgmt.h:222
int transport_mgmt_disconnect_transport(struct smp_transport *transport, bool incoming, bool outgoing)
Disconnects an active bridge.
int transport_mgmt_disconnect_all(void)
Disconnects all active bridges.
const uint16_t transport_mgmt_group_id(void)
Gets the group ID for transport management group.
struct smp_transport * transport_mgmt_get_other_transport(struct smp_transport *transport, bool direction)
Gets the other transport which is part of a bridge.
transport_mgmt_ret_code_t
Command result codes for transport management group.
Definition transport_mgmt.h:174
const struct smp_transport_bridge * transport_mgmt_get_bridge(struct smp_transport *transport, bool direction)
Gets a transport bridge context.
bool transport_mgmt_is_bridged(struct smp_transport *transport, bool direction)
Checks if a given transport is bridged or not.
int transport_mgmt_disconnect_bridge(struct smp_transport_bridge *bridge)
Disconnects an active bridge.
transport_mgmt_ids
Command IDs for transport management group.
Definition transport_mgmt.h:36
@ TRANSPORT_MGMT_CONFIG_TYPE_BOOL
Boolean.
Definition transport_mgmt.h:230
@ TRANSPORT_MGMT_CONFIG_TYPE_UINT
Unsigned integer.
Definition transport_mgmt.h:224
@ TRANSPORT_MGMT_CONFIG_TYPE_BYTE_STRING
Byte string.
Definition transport_mgmt.h:236
@ TRANSPORT_MGMT_CONFIG_TYPE_STRING
Text string.
Definition transport_mgmt.h:233
@ TRANSPORT_MGMT_CONFIG_TYPE_INT
Signed integer.
Definition transport_mgmt.h:227
@ TRANSPORT_MGMT_ERR_TRANSPORT_OUTGOING_TRANSPORT_ALREADY_BRIDGED
The outgoing transport is already bridged to another transport.
Definition transport_mgmt.h:218
@ TRANSPORT_MGMT_ERR_ALL_CONTEXTS_USED
All transport bridging context are in use.
Definition transport_mgmt.h:194
@ TRANSPORT_MGMT_ERR_UNKNOWN
Unknown error occurred.
Definition transport_mgmt.h:179
@ TRANSPORT_MGMT_ERR_TRANSPORT_MISSING_INFO_FUNCTIONS
The transport is missing the information bridging functions.
Definition transport_mgmt.h:185
@ TRANSPORT_MGMT_ERR_INVALID_TRANSPORT
Invalid, unsupported or no transport ID provided.
Definition transport_mgmt.h:188
@ TRANSPORT_MGMT_ERR_OK
No error, this is implied if there is no ret value in the response.
Definition transport_mgmt.h:176
@ TRANSPORT_MGMT_ERR_BOTH_TRANSPORT_AND_ALL_PARAMETERS
The transport or all parameters were both provided and only one should be supplied.
Definition transport_mgmt.h:197
@ TRANSPORT_MGMT_ERR_TRANSPORT_INCOMING_TRANSPORT_ALREADY_BRIDGED
The incoming transport is already bridged to another transport.
Definition transport_mgmt.h:215
@ TRANSPORT_MGMT_ERR_INVALID_MODE
Invalid, unsupported or no mode provided.
Definition transport_mgmt.h:191
@ TRANSPORT_MGMT_ERR_NOT_BRIDGED
The transport is not bridged.
Definition transport_mgmt.h:200
@ TRANSPORT_MGMT_ERR_SAME_BRIDGE_DEVICE_DISALLOWED
The transport does not support being used as both the input and output bridge device.
Definition transport_mgmt.h:206
@ TRANSPORT_MGMT_ERR_TRANSPORT_MISSING_REQUIRED_FUNCTIONS
The transport is missing the required mandatory bridging functions.
Definition transport_mgmt.h:182
@ TRANSPORT_MGMT_ERR_TRANSPORT_OUTGOING_NOT_SUPPORTED
The transport does not support being used as the outgoing part of a bridge.
Definition transport_mgmt.h:212
@ TRANSPORT_MGMT_ERR_TRANSPORT_INGOING_NOT_SUPPORTED
The transport does not support being used as the ingoing part of a bridge.
Definition transport_mgmt.h:209
@ TRANSPORT_MGMT_ID_GET_MODES
Get the supported modes of a transport.
Definition transport_mgmt.h:64
@ TRANSPORT_MGMT_ID_GET_CONFIG_DETAILS
Get the configuration details of a transport.
Definition transport_mgmt.h:67
@ TRANSPORT_MGMT_ID_RESERVED_2
Reserved for future use.
Definition transport_mgmt.h:50
@ TRANSPORT_MGMT_ID_RESERVED_1
Reserved for future use.
Definition transport_mgmt.h:47
@ TRANSPORT_MGMT_ID_RESERVED_3
Reserved for future use.
Definition transport_mgmt.h:53
@ TRANSPORT_MGMT_ID_LIST
List supported transports.
Definition transport_mgmt.h:61
@ TRANSPORT_MGMT_ID_STATUS
Returns current bridge status.
Definition transport_mgmt.h:44
@ TRANSPORT_MGMT_ID_CONNECT
Used to connect (bridge) to another transport.
Definition transport_mgmt.h:38
@ TRANSPORT_MGMT_ID_DISCONNECT
Used to disconnect current bridge or all bridges.
Definition transport_mgmt.h:41
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Bridged transport context.
Definition smp.h:263
SMP transport object for sending SMP responses.
Definition smp.h:241