Zephyr Project API
3.2.0
A Scalable Open Source RTOS
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_SMP_DUMMY_H_
12
#define ZEPHYR_INCLUDE_MGMT_MCUMGR_SMP_DUMMY_H_
13
14
#include <
zephyr/kernel.h
>
15
#include <
zephyr/net/buf.h
>
16
#include <mgmt/mgmt.h>
17
#include <
zephyr/mgmt/mcumgr/serial.h
>
18
#include <
zephyr/mgmt/mcumgr/buf.h
>
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
27
void
smp_dummy_clear_state
(
void
);
28
35
void
dummy_mcumgr_add_data
(
uint8_t
*
data
,
uint16_t
data_size);
36
43
struct
net_buf
*
smp_dummy_get_outgoing
(
void
);
44
54
bool
smp_dummy_wait_for_data
(
uint32_t
wait_time_s);
55
59
void
smp_dummy_add_data
(
void
);
60
66
uint16_t
smp_dummy_get_send_pos
(
void
);
67
73
uint16_t
smp_dummy_get_receive_pos
(
void
);
74
83
int
smp_dummy_tx_pkt
(
const
uint8_t
*
data
,
int
len
);
84
88
void
smp_dummy_enable
(
void
);
89
93
void
smp_dummy_disable
(
void
);
94
100
bool
smp_dummy_get_status
(
void
);
101
102
#endif
/* ZEPHYR_INCLUDE_MGMT_MCUMGR_SMP_DUMMY_H_ */
kernel.h
Public kernel APIs.
buf.h
buf.h
Buffer management.
serial.h
Utility functions used by the UART and shell mcumgr transports.
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:914
net_buf::len
uint16_t len
Definition:
buf.h:945
data
static fdata_t data[2]
Definition:
test_fifo_contexts.c:15
include
zephyr
mgmt
mcumgr
smp_dummy.h
Generated on Tue Feb 28 2023 15:43:19 for Zephyr Project API by
1.9.2