PHY

Parsing PHY messages

When processing PHY messages sent to a compatible interface, the whad_phy_get_message_type() function returns the corresponding message type (whad_phy_msgtype_t). This message type is then used to process and parse the incoming message.

The following example code shows a message processing function defined for a compatible interface that only supports PHY packet sniffing. The supported commands must also be indicated in the interface’s capabilities as described in Discovery of interface characteristics.

void process_phy_message(Message *p_message)
{
    Message response;

    switch (whad_phy_get_message_type(p_message))
    {
        case WHAD_PHY_SET_GFSK_MOD:
        {
            /* Configure PHY to GFSK mod/demod ... (custom code) */
            /* ... */

            /* Return a success message. */
            whad_generic_cmd_result(&response, WHAD_RESULT_SUCCESS);
        }
        break;

        case WHAD_PHY_SET_SNIFF_MODE:
        {
            /* Configure our interface in sniffing mode ... (custom code) */
            /* ... */

            /* Return a success message. */
            whad_generic_cmd_result(&response, WHAD_RESULT_SUCCESS);
        }
        break;

        case WHAD_PHY_START:
        {
            /* Start current mode. */
            /* ... */

            /* Return a success message. */
            whad_generic_cmd_result(&response, WHAD_RESULT_SUCCESS);
        }
        break;

        case WHAD_PHY_STOP:
        {
            /* Stop current mode. */
            /* ... */

            /* Return a success message. */
            whad_generic_cmd_result(&response, WHAD_RESULT_SUCCESS);
        }
        break;

        default:
        {
            /* Return an error message. */
            whad_generic_cmd_result(&response, WHAD_RESULT_ERROR);
        }
        break;
    }

    /* Send the response to the host. */
    whad_send_message(&response);
}

PHY API reference

Enums

enum whad_phy_lora_sf_t

Values:

enumerator PHY_LORA_SF7
enumerator PHY_LORA_SF8
enumerator PHY_LORA_SF9
enumerator PHY_LORA_SF10
enumerator PHY_LORA_SF11
enumerator PHY_LORA_SF12
enum whad_phy_lora_cr_t

Values:

enumerator PHY_LORA_CR45
enumerator PHY_LORA_CR46
enumerator PHY_LORA_CR47
enumerator PHY_LORA_CR48
enum whad_phy_endian_t

Values:

enumerator PHY_BIG_ENDIAN
enumerator PHY_LITTLE_ENDIAN
enum whad_phy_modulation_t

Values:

enumerator MOD_ASK
enumerator MOD_FSK
enumerator MOD_4FSK
enumerator MOD_GFSK
enumerator MOD_MSK
enumerator MOD_BPSK
enumerator MOD_QPSK
enumerator MOD_LORA
enum whad_phy_txpower_t

Values:

enumerator PHY_TXPOWER_LOW
enumerator PHY_TXPOWER_MEDIUM
enumerator PHY_TXPOWER_HIGH
enum whad_phy_jam_mode_t

Values:

enumerator PHY_JAM_MODE_CONTINUOUS
enumerator PHY_JAM_MODE_REACTIVE
enum whad_phy_msgtype_t

Values:

enumerator WHAD_PHY_UNKNOWN
enumerator WHAD_PHY_SET_ASK_MOD
enumerator WHAD_PHY_SET_FSK_MOD
enumerator WHAD_PHY_SET_GFSK_MOD
enumerator WHAD_PHY_SET_BPSK_MOD
enumerator WHAD_PHY_SET_QPSK_MOD
enumerator WHAD_PHY_SET_4FSK_MOD
enumerator WHAD_PHY_SET_MSK_MOD
enumerator WHAD_PHY_SET_LORA_MOD
enumerator WHAD_PHY_GET_SUPPORTED_FREQS
enumerator WHAD_PHY_SET_FREQ
enumerator WHAD_PHY_SET_DATARATE
enumerator WHAD_PHY_SET_ENDIANNESS
enumerator WHAD_PHY_SET_TX_POWER
enumerator WHAD_PHY_SET_PACKET_SIZE
enumerator WHAD_PHY_SET_SYNC_WORD
enumerator WHAD_PHY_SET_SNIFF_MODE
enumerator WHAD_PHY_SEND
enumerator WHAD_PHY_SEND_RAW
enumerator WHAD_PHY_START
enumerator WHAD_PHY_STOP
enumerator WHAD_PHY_SET_JAM_MODE
enumerator WHAD_PHY_SET_MONITOR_MODE
enumerator WHAD_PHY_PACKET_RECEIVED
enumerator WHAD_PHY_RAW_PACKET_RECEIVED
enumerator WHAD_PHY_JAMMED
enumerator WHAD_PHY_MONITOR_REPORT
enumerator WHAD_PHY_SUPPORTED_FREQS
enumerator WHAD_PHY_SEND_SCHED_PACKET
enumerator WHAD_PHY_SCHED_PACKET_RESP
enumerator WHAD_PHY_SCHED_PACKET_SENT

Functions

whad_phy_msgtype_t whad_phy_get_message_type(Message *p_message)
void whad_phy_message_free(Message *p_message)
bool whad_phy_frequency_range_encode_cb(pb_ostream_t *ostream, const pb_field_t *field, void *const *arg)
whad_result_t whad_phy_set_ask_mod(Message *p_message, bool on_off_keying)

Initialize a message specifying the Amplitude Shift Keying modulation.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • on_off_keying[in] Set to true to use On/Off keying, false otherwise

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_ask_mod_parse(Message *p_message, bool *p_on_off_keying)

Parse a message specifying the Amplitude Shift Keying modulation.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_on_off_keying[inout] Pointer to the on/off keying parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_fsk_mod(Message *p_message, uint32_t deviation)

Initialize a message specifying the Frequency Shift Keying modulation.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • deviation[in] Set FSK deviation in Hz

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_fsk_mod_parse(Message *p_message, uint32_t *p_deviation)

Parse a message specifying the Frequency Shift Keying modulation.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_deviation[inout] Pointer to the output deviation parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_4fsk_mod(Message *p_message, uint32_t deviation)

Initialize a message specifying the 4 Frequency Shift Keying modulation.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • deviation[in] Set 4FSK deviation in Hz

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_4fsk_mod_parse(Message *p_message, uint32_t *p_deviation)

Parse a message specifying the 4 Frequency Shift Keying modulation.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_deviation[inout] Pointer to the output deviation parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_gfsk_mod(Message *p_message, uint32_t deviation)

Initialize a message specifying the Gaussian Frequency Shift Keying modulation.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • deviation[in] Set GFSK deviation in Hz

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_gfsk_mod_parse(Message *p_message, uint32_t *p_deviation)

Parse a message specifying the Gaussian Frequency Shift Keying modulation.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_deviation[inout] Pointer to the output deviation parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_bpsk_mod(Message *p_message)

Initialize a message specifying the Binary Phase Shift Keying modulation.

Parameters:

p_message[inout] Pointer to the message structure to initialize

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_qpsk_mod(Message *p_message, bool b_offset)

Initialize a message specifying the Quadrature Phase Shift Keying modulation.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • b_offset[in] QPSK offset

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_qpsk_mod_parse(Message *p_message, bool *p_offset)

Parse a message specifying the Quadrature Phase Shift Keying modulation.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_offset[inout] Pointer to the output offset parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_msk_mod(Message *p_message, uint32_t deviation)

Initialize a message specifying the Minimum Shift Keying modulation.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • deviation[in] Set MSK deviation in Hz

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_msk_mod_parse(Message *p_message, uint32_t *p_deviation)

Parse a message specifying the Minimum Shift Keying modulation.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_deviation[inout] Pointer to the output deviation parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_lora_mod(Message *p_message, uint32_t bandwidth, whad_phy_lora_sf_t spreading_factor, whad_phy_lora_cr_t coding_rate, uint32_t preamble_length, bool enable_crc, bool explicit_mode, bool invert_iq)

Initialize a message specifying the LoRa modulation.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • bandwidth[in] Bandwidth in Hz

  • spreading_factor[in] Spreading factor to use

  • coding_rate[in] Coding rate to use

  • preamble_length[in] Preamble length in symbols

  • enable_crc[in] Enable CRC if set to true, disabled otherwise

  • explicit_mode[in] Enable explicit mode if set to true, disabled otherwise

  • invert_iq[in] Invert IQ if set to true (downlink)

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_lora_mod_parse(Message *p_message, whad_phy_lora_params_t *p_lora_params)

Parse a message specifying the LoRa modulation.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_lora_params[inout] Pointer to the output LoRa parameters

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_freq(Message *p_message, uint32_t frequency)

Initialize a message specifying the frequency to use.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • frequency[in] Frequency to use, in Hz

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_freq_parse(Message *p_message, uint32_t *p_freq)

Parse a message specifying the frequency to use.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_freq[inout] Pointer to the output frequency parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_datarate(Message *p_message, uint32_t datarate)

Initialize a message specifying the datarate to use.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • datarate[in] Frequency to use, in Hz

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer.

whad_result_t whad_phy_set_datarate_parse(Message *p_message, uint32_t *p_datarate)

Parse a message specifying the datarate to use.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_datarate[inout] Pointer to the output datarate parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_endianness(Message *p_message, whad_phy_endian_t endianness)

Initialize a message specifying the endianness.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • endianness[in] Packet endianness

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_set_endianness_parse(Message *p_message, whad_phy_endian_t *p_endianness)

Parse a message specifying the endianness.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_endianness[inout] Pointer to the output endianness parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_tx_power(Message *p_message, whad_phy_txpower_t tx_power)

Initialize a message specifying the transmit power.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • tx_power[in] TX power

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_set_tx_power_parse(Message *p_message, whad_phy_txpower_t *p_power)

Parse a message specifying the transmit power.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_power[inout] Pointer to the output power parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_packet_size(Message *p_message, uint32_t size)

Initialize a message specifying the packet size in bytes.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • size[in] Packet size in bytes

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_set_packet_size_parse(Message *p_message, uint32_t *p_packet_size)

Parse a message specifying the packet size in bytes.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_packet_size[inout] Pointer to the output packet size parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_set_sync_word(Message *p_message, uint8_t *p_syncword, int length)

Initialize a message specifying the synchronization word.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • p_syncword[in] Pointer to a buffer containing the synchronization word

  • length[in] Syncword length in bytes

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_set_sync_word_parse(Message *p_message, whad_phy_syncword_t *p_syncword)

Parse a message specifying the synchronization word.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_syncword[inout] Pointer to the output syncword parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_sniff_mode(Message *p_message, bool iq_stream)

Initialize a message setting the hardware in sniffing mode.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • iq_stream[in] If set to true, will capture I/Q instead of packets

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_sniff_mode_parse(Message *p_message, bool *p_iq_stream)

Parse a message setting the hardware in sniffing mode.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_iq_stream[inout] Pointer to the output iq_stream boolean parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_jam_mode(Message *p_message, whad_phy_jam_mode_t mode)

Initialize a message setting the hardware in jamming mode.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • mode[in] Jamming mode to use

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_jam_mode_parse(Message *p_message, whad_phy_jam_mode_t *p_mode)

Parse a message setting the hardware in jamming mode.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_mode[inout] Pointer to the output jamming mode parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_monitor_mode(Message *p_message)

Initialize a message setting the hardware in monitor mode.

Parameters:

p_message[inout] Pointer to the message structure to initialize

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_start(Message *p_message)

Initialize a message starting the current mode.

Parameters:

p_message[inout] Pointer to the message structure to initialize

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_stop(Message *p_message)

Initialize a message stopping the current mode.

Parameters:

p_message[inout] Pointer to the message structure to initialize

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_send(Message *p_message, uint8_t *p_packet, int length)

Initialize a message to send a raw packet.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • p_packet[in] Pointer to packet bytes to send

  • length[in] Number of bytes to send

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_send_parse(Message *p_message, whad_phy_packet_t *p_packet)

Parse a message to send a raw packet.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_packet[inout] Pointer to the packet parameters

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_send_raw_iq(Message *p_message, uint8_t *p_iq_stream, int length)

Initialize a message to send raw IQs.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • p_iq_stream[in] Pointer to IQ to send

  • length[in] Number of bytes to send

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_supported_frequencies(Message *p_message, whad_phy_frequency_range_t *p_ranges, int nb_ranges)

Initialize a message specifying the supported frequency ranges for the current device.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • p_ranges[in] Pointer to a list of supported frequency ranges

  • nb_ranges[in] Number of ranges in the provided list

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_sched_packet(Message *p_message, uint8_t *p_packet, int length, uint32_t ts_sec, uint32_t ts_usec)

Initialize a message to schedule a packet to be sent.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • p_packet[in] Pointer to a packet buffer to send

  • length[in] Packet length in bytes

  • ts_sec[in] Timestamp, seconds

  • ts_usec[in] Timestamp, microseconds

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or supported ranges pointer.

whad_result_t whad_phy_sched_packet_parse(Message *p_message, whad_phy_sched_packet_t *p_sched_packet)

Parse a message to schedule a packet to be sent.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_sched_packet[inout] Pointer to the scheduled packet parameters

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_jammed(Message *p_message, uint32_t ts_sec, uint32_t ts_usec)

Initialize a message notifying the target has been jammed.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • ts_sec[in] Timestamp, seconds

  • ts_usec[in] Timestamp, microseconds

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or payload pointer.

whad_result_t whad_phy_jammed_parse(Message *p_message, whad_phy_timestamp_t *p_timestamp)

Parse a message notifying the target has been jammed.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_timestamp[inout] Pointer to the timestamp parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_sched_packet_sent(Message *p_message, uint32_t packet_id)

Initialize a message notifying a scheduled packet has been sent.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • packet_id[in] Packet id

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or payload pointer.

whad_result_t whad_phy_sched_packet_sent_parse(Message *p_message, uint32_t *p_packet_id)

Parse a message notifying a scheduled packet has been sent.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_packet_id[inout] Pointer to the timestamp parameter

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_packet_received(Message *p_message, uint32_t frequency, int32_t rssi, uint32_t ts_sec, uint32_t ts_usec, uint8_t *payload, int length, uint8_t *syncword, int syncword_length, uint32_t deviation, uint32_t datarate, whad_phy_endian_t endianness, whad_phy_modulation_t modulation)

Initialize a message reporting a PHY packet.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • frequency[in] Frequency on which the PHY packet has been captured

  • rssi[in] Received Signal Strength Indicator in dBm

  • ts_sec[in] Timestamp (seconds) at which the packet has been received

  • ts_usec[in] Timestamp (microseconds) at which the packet has been received

  • payload[in] Pointer to the packet payload

  • length[in] Payload size in bytes

  • syncword[in] Pointer to the packet syncword

  • syncword_length[in] Syncword size in bytes

  • deviation[in] Modulation deviation (in Hz)

  • datarate[in] Modulation datarate (in bauds)

  • endianness[in] Modulation endianness (little / big endian)

  • modulation[in] Modulation in use

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or payload pointer.

whad_result_t whad_phy_packet_received_parse(Message *p_message, whad_phy_received_packet_t *p_received_pkt)

Parse a message notifying a scheduled packet has been sent.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_received_pkt[inout] Pointer to the recived packet

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.

whad_result_t whad_phy_packet_scheduled(Message *p_message, uint8_t id, bool full)

Initialize a message indicating the result of a scheduled packet request.

Parameters:
  • p_message[inout] Pointer to the message structure to initialize

  • id[in] Scheduled packet identifier

  • full[in] If set to true, indicate the scheduled packets FIFO is full

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or payload pointer.

whad_result_t whad_phy_packet_scheduled_parse(Message *p_message, whad_phy_scheduled_packet_t *p_sched_pkt)

Parse a message notifying a scheduled packet has been sent.

Parameters:
  • p_message[in] Pointer to the message structure to initialize

  • p_sched_pkt[inout] Pointer to the recived packet

Return values:
  • WHAD_SUCCESS – Success.

  • WHAD_ERROR – Invalid message pointer or parameter pointer.