10#ifndef INFUSE_SDK_INCLUDE_INFUSE_EPACKET_INTERFACE_EPACKET_DUMMY_H_
11#define INFUSE_SDK_INCLUDE_INFUSE_EPACKET_INTERFACE_EPACKET_DUMMY_H_
15#include <zephyr/kernel.h>
16#include <zephyr/toolchain.h>
30#define EPACKET_DUMMY_FRAME_EXPECTED_SIZE 8
123 const void *payload,
size_t payload_len,
const void *extra,
136 const void *payload,
size_t payload_len)
struct k_fifo * epacket_dummmy_transmit_fifo_get(void)
Get the FIFO that the dummy interface "sends" packets on.
void epacket_dummy_receive_api_override(bool func_exists, int rc)
Override the behaviour of .receive_ctrl
void epacket_dummy_reset_callbacks(const struct device *dev)
Reset registered epacket callbacks.
void epacket_dummy_set_max_packet(uint16_t packet_size)
Set the maximum packet size for the interface.
void epacket_dummy_set_interface_state(const struct device *dev, bool state)
Set the interface state and run callbacks.
struct k_sem * epacket_dummy_rx_started_sem_get(void)
Get the semaphore that is given each time reception starts.
static void epacket_dummy_receive(const struct device *dev, const struct epacket_dummy_frame *header, const void *payload, size_t payload_len)
Simulate the dummy interface receiving a packet.
Definition epacket_dummy.h:134
bool epacket_dummy_receive_scheduled(void)
Is receiving currently scheduled on the interface.
void epacket_dummy_receive_extra(const struct device *dev, const struct epacket_dummy_frame *header, const void *payload, size_t payload_len, const void *extra, size_t extra_len)
Simulate the dummy interface receiving a packet.
void epacket_dummy_set_gps_timestamp(uint32_t timestamp)
Set the GPS timestamp used for received packets.
void epacket_dummy_set_tx_failure(int error_code)
If set to a non-zero value, treat all sends as errors.
ePacket dummy data frame
Definition epacket_dummy.h:33
uint8_t type
Payload type.
Definition epacket_dummy.h:35
uint16_t flags
Payload flags.
Definition epacket_dummy.h:39
uint8_t auth
Payload authentication level (epacket_auth)
Definition epacket_dummy.h:37
uint8_t payload[]
Payload bytes.
Definition epacket_dummy.h:43
uint32_t key_identifier
Key identifier.
Definition epacket_dummy.h:41