Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
smp_dummy.h
Go to the documentation of this file.
1
/*
2
* Copyright Runtime.io 2018. All rights reserved.
3
* Copyright Laird Connectivity 2021-2022. All rights reserved.
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
12
#ifndef ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_DUMMY_H_
13
#define ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_DUMMY_H_
14
22
23
#include <
zephyr/kernel.h
>
24
#include <
zephyr/net_buf.h
>
25
#include <
zephyr/mgmt/mcumgr/mgmt/mgmt.h
>
26
#include <
zephyr/mgmt/mcumgr/transport/serial.h
>
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
35
void
smp_dummy_clear_state
(
void
);
36
43
void
dummy_mcumgr_add_data
(
uint8_t
*data,
uint16_t
data_size);
44
51
struct
net_buf
*
smp_dummy_get_outgoing
(
void
);
52
62
bool
smp_dummy_wait_for_data
(
uint32_t
wait_time_s);
63
67
void
smp_dummy_add_data
(
void
);
68
74
uint16_t
smp_dummy_get_send_pos
(
void
);
75
81
uint16_t
smp_dummy_get_receive_pos
(
void
);
82
91
int
smp_dummy_tx_pkt
(
const
uint8_t
*
data
,
int
len
);
92
96
void
smp_dummy_enable
(
void
);
97
101
void
smp_dummy_disable
(
void
);
102
108
bool
smp_dummy_get_status
(
void
);
109
110
#ifdef __cplusplus
111
}
112
#endif
113
117
118
#endif
/* ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_DUMMY_H_ */
smp_dummy_get_status
bool smp_dummy_get_status(void)
Returns status on if the dummy SMP system is active.
smp_dummy_wait_for_data
bool smp_dummy_wait_for_data(uint32_t wait_time_s)
Waits for a period of time for outgoing SMPC data to be ready and returns either when a full message ...
smp_dummy_tx_pkt
int smp_dummy_tx_pkt(const uint8_t *data, int len)
Converts input data to go out through the internal SMPC buffer.
smp_dummy_disable
void smp_dummy_disable(void)
Disables the dummy SMP module (will not process sent/received data).
smp_dummy_get_receive_pos
uint16_t smp_dummy_get_receive_pos(void)
Gets current receive buffer position.
dummy_mcumgr_add_data
void dummy_mcumgr_add_data(uint8_t *data, uint16_t data_size)
Adds SMPC data to the internal buffer to be processed.
smp_dummy_get_outgoing
struct net_buf * smp_dummy_get_outgoing(void)
Processes a single line (fragment) coming from the mcumgr response to be used in tests.
smp_dummy_get_send_pos
uint16_t smp_dummy_get_send_pos(void)
Gets current send buffer position.
smp_dummy_add_data
void smp_dummy_add_data(void)
Calls dummy_mcumgr_add_data with the internal SMPC receive buffer.
smp_dummy_clear_state
void smp_dummy_clear_state(void)
Clears internal dummy SMP state and resets semaphore.
smp_dummy_enable
void smp_dummy_enable(void)
Enabled the dummy SMP module (will process sent/received data).
kernel.h
Public kernel APIs.
mgmt.h
net_buf.h
Buffer management.
serial.h
Header file for the MCUmgr serial transport API.
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
uint16_t
__UINT16_TYPE__ uint16_t
Definition
stdint.h:89
net_buf
Network buffer representation.
Definition
net_buf.h:1015
net_buf::data
uint8_t * data
Pointer to the start of data in the buffer.
Definition
net_buf.h:1104
net_buf::len
uint16_t len
Length of the data behind the data pointer.
Definition
net_buf.h:1107
zephyr
mgmt
mcumgr
transport
smp_dummy.h
Generated on
for Zephyr API by
1.17.0