Zephyr Project API
3.7.0
A Scalable Open Source RTOS
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
11
#ifndef ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_DUMMY_H_
12
#define ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_DUMMY_H_
13
14
#include <
zephyr/kernel.h
>
15
#include <
zephyr/net/buf.h
>
16
#include <
zephyr/mgmt/mcumgr/mgmt/mgmt.h
>
17
#include <
zephyr/mgmt/mcumgr/transport/serial.h
>
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
26
void
smp_dummy_clear_state
(
void
);
27
34
void
dummy_mcumgr_add_data
(
uint8_t
*
data
,
uint16_t
data_size);
35
42
struct
net_buf
*
smp_dummy_get_outgoing
(
void
);
43
53
bool
smp_dummy_wait_for_data
(
uint32_t
wait_time_s);
54
58
void
smp_dummy_add_data
(
void
);
59
65
uint16_t
smp_dummy_get_send_pos
(
void
);
66
72
uint16_t
smp_dummy_get_receive_pos
(
void
);
73
82
int
smp_dummy_tx_pkt
(
const
uint8_t
*
data
,
int
len
);
83
87
void
smp_dummy_enable
(
void
);
88
92
void
smp_dummy_disable
(
void
);
93
99
bool
smp_dummy_get_status
(
void
);
100
101
#ifdef __cplusplus
102
}
103
#endif
104
105
#endif
/* ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_DUMMY_H_ */
kernel.h
Public kernel APIs.
mgmt.h
buf.h
Buffer management.
serial.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)
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
buf.h:1004
net_buf::len
uint16_t len
Length of the data behind the data pointer.
Definition
buf.h:1033
data
static fdata_t data[2]
Definition
test_fifo_contexts.c:15
include
zephyr
mgmt
mcumgr
transport
smp_dummy.h
Generated on Sun Sep 15 2024 17:01:30 for Zephyr Project API by
1.9.8