Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
epacket_dummy APIs

epacket_dummy API More...

Data Structures

struct  epacket_dummy_frame
 

Macros

#define EPACKET_DUMMY_FRAME_EXPECTED_SIZE   3
 

Functions

void epacket_dummy_reset_callbacks (const struct device *dev)
 Reset registered epacket callbacks.
 
struct k_fifo * epacket_dummmy_transmit_fifo_get (void)
 Get the FIFO that the dummy interface "sends" packets on.
 
void epacket_dummy_set_tx_failure (int error_code)
 If set to a non-zero value, treat all sends as errors.
 
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.
 
bool epacket_dummy_receive_scheduled (void)
 Is receiving currently scheduled on the interface.
 
void epacket_dummy_receive_api_override (bool func_exists, int rc)
 Override the behaviour of .receive_ctrl
 
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.
 
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.
 

Detailed Description

epacket_dummy API

Macro Definition Documentation

◆ EPACKET_DUMMY_FRAME_EXPECTED_SIZE

#define EPACKET_DUMMY_FRAME_EXPECTED_SIZE   3

Function Documentation

◆ epacket_dummmy_transmit_fifo_get()

struct k_fifo * epacket_dummmy_transmit_fifo_get ( void )

#include <infuse/epacket/interface/epacket_dummy.h>

Get the FIFO that the dummy interface "sends" packets on.

Returns
Pointer to the transmit FIFO

◆ epacket_dummy_receive()

static void epacket_dummy_receive ( const struct device * dev,
const struct epacket_dummy_frame * header,
const void * payload,
size_t payload_len )
inlinestatic

#include <infuse/epacket/interface/epacket_dummy.h>

Simulate the dummy interface receiving a packet.

Parameters
devDummy interface
headerPacket header
payloadPacket payload
payload_lenLength of payload

◆ epacket_dummy_receive_api_override()

void epacket_dummy_receive_api_override ( bool func_exists,
int rc )

#include <infuse/epacket/interface/epacket_dummy.h>

Override the behaviour of .receive_ctrl

Parameters
func_existsTrue to populate function in API struct, false to remove
rcReturn code of .receive_ctrl

◆ epacket_dummy_receive_extra()

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 )

#include <infuse/epacket/interface/epacket_dummy.h>

Simulate the dummy interface receiving a packet.

Parameters
devDummy interface
headerPacket header
payloadPacket payload
payload_lenLength of payload
extraExtra payload
extra_lenLength of extra payload

◆ epacket_dummy_receive_scheduled()

bool epacket_dummy_receive_scheduled ( void )

#include <infuse/epacket/interface/epacket_dummy.h>

Is receiving currently scheduled on the interface.

Return values
trueReceiving has been enabled
falseReceiving has been disabled

◆ epacket_dummy_reset_callbacks()

void epacket_dummy_reset_callbacks ( const struct device * dev)

#include <infuse/epacket/interface/epacket_dummy.h>

Reset registered epacket callbacks.

Parameters
devDummy interface

◆ epacket_dummy_set_interface_state()

void epacket_dummy_set_interface_state ( const struct device * dev,
bool state )

#include <infuse/epacket/interface/epacket_dummy.h>

Set the interface state and run callbacks.

Parameters
devDummy interface
stateNew interface state

◆ epacket_dummy_set_max_packet()

void epacket_dummy_set_max_packet ( uint16_t packet_size)

#include <infuse/epacket/interface/epacket_dummy.h>

Set the maximum packet size for the interface.

Parameters
packet_sizeNew maximum packet size

◆ epacket_dummy_set_tx_failure()

void epacket_dummy_set_tx_failure ( int error_code)

#include <infuse/epacket/interface/epacket_dummy.h>

If set to a non-zero value, treat all sends as errors.

Parameters
error_codeError code to return.