Zephyr API Documentation  3.6.99
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>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
27
34void dummy_mcumgr_add_data(uint8_t *data, uint16_t data_size);
35
43
54
59
66
73
83
88
93
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_DUMMY_H_ */
Public kernel APIs.
Buffer management.
bool smp_dummy_get_status(void)
Returns status on if the dummy SMP system is active.
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 ...
int smp_dummy_tx_pkt(const uint8_t *data, int len)
Converts input data to go out through the internal SMPC buffer.
void smp_dummy_disable(void)
Disables the dummy SMP module (will not process sent/received data)
uint16_t smp_dummy_get_receive_pos(void)
Gets current receive buffer position.
void dummy_mcumgr_add_data(uint8_t *data, uint16_t data_size)
Adds SMPC data to the internal buffer to be processed.
struct net_buf * smp_dummy_get_outgoing(void)
Processes a single line (fragment) coming from the mcumgr response to be used in tests.
uint16_t smp_dummy_get_send_pos(void)
Gets current send buffer position.
void smp_dummy_add_data(void)
Calls dummy_mcumgr_add_data with the internal SMPC receive buffer.
void smp_dummy_clear_state(void)
Clears internal dummy SMP state and resets semaphore.
void smp_dummy_enable(void)
Enabled the dummy SMP module (will process sent/received data)
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Network buffer representation.
Definition: buf.h:1004
uint8_t * data
Pointer to the start of data in the buffer.
Definition: buf.h:1030
uint16_t len
Length of the data behind the data pointer.
Definition: buf.h:1033