Loading...
Searching...
No Matches
gomach_internal.h File Reference

GoMacH's internal functions. More...

Detailed Description

GoMacH's internal functions.

Definition in file gomach_internal.h.

#include <stdint.h>
#include "periph/rtt.h"
#include "net/gnrc/netif.h"
+ Include dependency graph for gomach_internal.h:

Go to the source code of this file.

#define GNRC_GOMACH_INFO_TX_FINISHED   (0x0008U)
 Flag to track if the transmission has finished.
 
#define GNRC_GOMACH_INFO_PKT_RECEIVED   (0x0010U)
 Flag to track if a packet has been successfully received.
 
#define GNRC_GOMACH_INTERNAL_INFO_ND_UPDATE   (0x0001U)
 Flag to track if need to update GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_QUIT_CYCLE   (0x0002U)
 Flag to track if need to quit the current cycle in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_CP_END   (0x0004U)
 Flag to track if CP period has ended in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_VTDMA_END   (0x0008U)
 Flag to track if vTDMA has ended in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_UNINTD_PREAMBLE   (0x0010U)
 Flag to track if the node has received unintended preamble.
 
#define GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLE   (0x0020U)
 Flag to track if need to quit the current cycle in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_DUTY_CYCLE_START   (0x0040U)
 Flag to track if node's duty-cycle has started in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_PHASE_BACKOFF   (0x0080U)
 Flag to track if node need to backoff its phase in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_BEACON_FAIL   (0x0200U)
 Flag to track if beacon transmission fail in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_BUFFER_FULL   (0x0400U)
 Flag to track if node's packet buffer is full in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_ENTER_NEW_CYCLE   (0x0800U)
 Flag to track if node has entered a new cycle in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLEACK   (0x1000U)
 Flag to track if node has got preamble-ACK in GoMacH.
 
#define GNRC_GOMACH_INTERNAL_INFO_ON_PUBCHAN_1   (0x2000U)
 Flag to track if node's radio is on public-channel-1.
 
#define GNRC_GOMACH_INTERNAL_INFO_MAX_PREAM_INTERV   (0x4000U)
 Flag to track if node has reached maximum preamble interval.
 
#define GNRC_GOMACH_INTERNAL_INFO_RADIO_IS_ON   (0x8000U)
 Flag to track if node has turned on its radio.
 
static void gnrc_gomach_set_tx_finish (gnrc_netif_t *netif, bool tx_finish)
 Set the GNRC_GOMACH_INFO_TX_FINISHED flag of the device.
 
static bool gnrc_gomach_get_tx_finish (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INFO_TX_FINISHED flag of the device.
 
static void gnrc_gomach_set_pkt_received (gnrc_netif_t *netif, bool received)
 Set the GNRC_GOMACH_INFO_PKT_RECEIVED flag of the device.
 
static bool gnrc_gomach_get_pkt_received (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INFO_PKT_RECEIVED flag of the device.
 
static void gnrc_gomach_set_quit_cycle (gnrc_netif_t *netif, bool quit)
 Set the GNRC_GOMACH_INTERNAL_INFO_QUIT_CYCLE flag of the device.
 
static bool gnrc_gomach_get_quit_cycle (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_QUIT_CYCLE flag of the device.
 
static void gnrc_gomach_set_got_preamble (gnrc_netif_t *netif, bool got_preamble)
 Set the GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLE flag of the device.
 
static bool gnrc_gomach_get_got_preamble (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLE flag of the device.
 
static void gnrc_gomach_set_cp_end (gnrc_netif_t *netif, bool cp_end)
 Set the GNRC_GOMACH_INTERNAL_INFO_CP_END flag of the device.
 
static bool gnrc_gomach_get_cp_end (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_CP_END flag of the device.
 
static void gnrc_gomach_set_vTDMA_end (gnrc_netif_t *netif, bool vtdma_end)
 Set the GNRC_GOMACH_INTERNAL_INFO_VTDMA_END flag of the device.
 
static bool gnrc_gomach_get_vTDMA_end (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_VTDMA_END flag of the device.
 
static void gnrc_gomach_set_unintd_preamble (gnrc_netif_t *netif, bool uintd_preamble)
 Set the GNRC_GOMACH_INTERNAL_INFO_UNINTD_PREAMBLE flag of the device.
 
static bool gnrc_gomach_get_unintd_preamble (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_UNINTD_PREAMBLE flag of the device.
 
static void gnrc_gomach_set_update (gnrc_netif_t *netif, bool update)
 Set the GNRC_GOMACH_INTERNAL_INFO_ND_UPDATE flag of the device.
 
static bool gnrc_gomach_get_update (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_ND_UPDATE flag of the device.
 
static void gnrc_gomach_set_duty_cycle_start (gnrc_netif_t *netif, bool start)
 Set the GNRC_GOMACH_INTERNAL_INFO_DUTY_CYCLE_START flag of the device.
 
static bool gnrc_gomach_get_duty_cycle_start (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_DUTY_CYCLE_START flag of the device.
 
static void gnrc_gomach_set_phase_backoff (gnrc_netif_t *netif, bool backoff)
 Set the GNRC_GOMACH_INTERNAL_INFO_PHASE_BACKOFF flag of the device.
 
static bool gnrc_gomach_get_phase_backoff (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_PHASE_BACKOFF flag of the device.
 
static void gnrc_gomach_set_beacon_fail (gnrc_netif_t *netif, bool fail)
 Set the GNRC_GOMACH_INTERNAL_INFO_BEACON_FAIL flag of the device.
 
static bool gnrc_gomach_get_beacon_fail (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_BEACON_FAIL flag of the device.
 
static void gnrc_gomach_set_buffer_full (gnrc_netif_t *netif, bool full)
 Set the GNRC_GOMACH_INTERNAL_INFO_BUFFER_FULL flag of the device.
 
static bool gnrc_gomach_get_buffer_full (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_BUFFER_FULL flag of the device.
 
static void gnrc_gomach_set_enter_new_cycle (gnrc_netif_t *netif, bool enter)
 Set the GNRC_GOMACH_INTERNAL_INFO_ENTER_NEW_CYCLE flag of the device.
 
static bool gnrc_gomach_get_enter_new_cycle (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_ENTER_NEW_CYCLE flag of the device.
 
static void gnrc_gomach_set_got_preamble_ack (gnrc_netif_t *netif, bool got)
 Set the GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLEACK flag of the device.
 
static bool gnrc_gomach_get_got_preamble_ack (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLEACK flag of the device.
 
static void gnrc_gomach_set_on_pubchan_1 (gnrc_netif_t *netif, bool on_pubchan_1)
 Set the GNRC_GOMACH_INTERNAL_INFO_ON_PUBCHAN_1 flag of the device.
 
static bool gnrc_gomach_get_on_pubchan_1 (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_ON_PUBCHAN_1 flag of the device.
 
static void gnrc_gomach_set_max_pream_interv (gnrc_netif_t *netif, bool max)
 Set the GNRC_GOMACH_INTERNAL_INFO_MAX_PREAM_INTERV flag of the device.
 
static bool gnrc_gomach_get_max_pream_interv (gnrc_netif_t *netif)
 Get the GNRC_GOMACH_INTERNAL_INFO_MAX_PREAM_INTERV flag of the device.
 
uint64_t gnrc_gomach_phase_now (gnrc_netif_t *netif)
 Get device's current phase.
 
void gnrc_gomach_set_netdev_state (gnrc_netif_t *netif, netopt_state_t devstate)
 Shortcut to set the state of netdev.
 
static void gnrc_gomach_set_autoack (gnrc_netif_t *netif, netopt_enable_t autoack)
 Set the auto-ACK parameter of the device.
 
static void gnrc_gomach_set_ack_req (gnrc_netif_t *netif, netopt_enable_t ack_req)
 Set the ACK-require parameter of the device.
 
static netopt_state_t gnrc_gomach_get_netdev_state (gnrc_netif_t *netif)
 Shortcut to get the state of netdev.
 
static void gnrc_gomach_turn_channel (gnrc_netif_t *netif, uint16_t channel_num)
 Turn the radio to a specific channel.
 
int _gnrc_gomach_transmit (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
 send a packet over the network interface in GoMacH
 
bool gnrc_gomach_check_duplicate (gnrc_netif_t *netif, gnrc_gomach_packet_info_t *pa_info)
 Check if the received packet is a duplicate packet.
 
int gnrc_gomach_send (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt, netopt_enable_t csma_enable)
 Send a pktsnip in GoMacH.
 
int gnrc_gomach_send_preamble_ack (gnrc_netif_t *netif, gnrc_gomach_packet_info_t *info)
 Reply a preamble-ACK packet in GoMacH.
 
int gnrc_gomach_send_beacon (gnrc_netif_t *netif)
 Broadcast a beacon packet in GoMacH.
 
int gnrc_gomach_dispatch_defer (gnrc_pktsnip_t *buffer[], gnrc_pktsnip_t *pkt)
 Store the received packet to the dispatch buffer.
 
void gnrc_gomach_indicator_update (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt, gnrc_gomach_packet_info_t *pa_info)
 Update the queue-length indicator of the packet sender.
 
void gnrc_gomach_cp_packet_process (gnrc_netif_t *netif)
 Process packets received during the CP (wake-up) period of GoMacH.
 
void gnrc_gomach_init_choose_subchannel (gnrc_netif_t *netif)
 Choose a sub-channel for a device running GoMacH.
 
int gnrc_gomach_bcast_subchann_seq (gnrc_netif_t *netif, netopt_enable_t use_csma)
 Broadcast the chosen sub-channel sequence to the device's neighbors.
 
int gnrc_gomach_send_preamble (gnrc_netif_t *netif, netopt_enable_t csma_enable)
 Send a preamble packet to the targeted neighbor.
 
void gnrc_gomach_process_preamble_ack (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
 Process the received preamble-ACK packet to get phase-locked with the sender.
 
void gnrc_gomach_process_pkt_in_wait_preamble_ack (gnrc_netif_t *netif)
 Process the received packets to when waiting for the preamble-ACK packet.
 
int gnrc_gomach_send_data (gnrc_netif_t *netif, netopt_enable_t csma_enable)
 Send a data packet to the targeted neighbor.
 
bool gnrc_gomach_find_next_tx_neighbor (gnrc_netif_t *netif)
 Find a neighbor that is next to send packet to.
 
void gnrc_gomach_beacon_process (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
 Process the received beacon packet.
 
void gnrc_gomach_packet_process_in_wait_beacon (gnrc_netif_t *netif)
 Process the received packets when waiting for the beacon during t2k procedure in GoMacH.
 
void gnrc_gomach_packet_process_in_vtdma (gnrc_netif_t *netif)
 Process the received packets in the vTDMA period in GoMacH.
 
void gnrc_gomach_update_neighbor_phase (gnrc_netif_t *netif)
 Update the TX neighbors' phases in GoMacH.
 
void gnrc_gomach_update_neighbor_pubchan (gnrc_netif_t *netif)
 Update the TX neighbors' public channel phase in GoMacH.
 

Macro Definition Documentation

◆ GNRC_GOMACH_INFO_PKT_RECEIVED

#define GNRC_GOMACH_INFO_PKT_RECEIVED   (0x0010U)

Flag to track if a packet has been successfully received.

Definition at line 39 of file gomach_internal.h.

◆ GNRC_GOMACH_INFO_TX_FINISHED

#define GNRC_GOMACH_INFO_TX_FINISHED   (0x0008U)

Flag to track if the transmission has finished.

Definition at line 34 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_BEACON_FAIL

#define GNRC_GOMACH_INTERNAL_INFO_BEACON_FAIL   (0x0200U)

Flag to track if beacon transmission fail in GoMacH.

Definition at line 84 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_BUFFER_FULL

#define GNRC_GOMACH_INTERNAL_INFO_BUFFER_FULL   (0x0400U)

Flag to track if node's packet buffer is full in GoMacH.

Definition at line 89 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_CP_END

#define GNRC_GOMACH_INTERNAL_INFO_CP_END   (0x0004U)

Flag to track if CP period has ended in GoMacH.

Definition at line 54 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_DUTY_CYCLE_START

#define GNRC_GOMACH_INTERNAL_INFO_DUTY_CYCLE_START   (0x0040U)

Flag to track if node's duty-cycle has started in GoMacH.

Definition at line 74 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_ENTER_NEW_CYCLE

#define GNRC_GOMACH_INTERNAL_INFO_ENTER_NEW_CYCLE   (0x0800U)

Flag to track if node has entered a new cycle in GoMacH.

Definition at line 94 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLE

#define GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLE   (0x0020U)

Flag to track if need to quit the current cycle in GoMacH.

Definition at line 69 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLEACK

#define GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLEACK   (0x1000U)

Flag to track if node has got preamble-ACK in GoMacH.

Definition at line 99 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_MAX_PREAM_INTERV

#define GNRC_GOMACH_INTERNAL_INFO_MAX_PREAM_INTERV   (0x4000U)

Flag to track if node has reached maximum preamble interval.

Definition at line 109 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_ND_UPDATE

#define GNRC_GOMACH_INTERNAL_INFO_ND_UPDATE   (0x0001U)

Flag to track if need to update GoMacH.

Definition at line 44 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_ON_PUBCHAN_1

#define GNRC_GOMACH_INTERNAL_INFO_ON_PUBCHAN_1   (0x2000U)

Flag to track if node's radio is on public-channel-1.

Definition at line 104 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_PHASE_BACKOFF

#define GNRC_GOMACH_INTERNAL_INFO_PHASE_BACKOFF   (0x0080U)

Flag to track if node need to backoff its phase in GoMacH.

Definition at line 79 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_QUIT_CYCLE

#define GNRC_GOMACH_INTERNAL_INFO_QUIT_CYCLE   (0x0002U)

Flag to track if need to quit the current cycle in GoMacH.

Definition at line 49 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_RADIO_IS_ON

#define GNRC_GOMACH_INTERNAL_INFO_RADIO_IS_ON   (0x8000U)

Flag to track if node has turned on its radio.

Definition at line 114 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_UNINTD_PREAMBLE

#define GNRC_GOMACH_INTERNAL_INFO_UNINTD_PREAMBLE   (0x0010U)

Flag to track if the node has received unintended preamble.

Definition at line 64 of file gomach_internal.h.

◆ GNRC_GOMACH_INTERNAL_INFO_VTDMA_END

#define GNRC_GOMACH_INTERNAL_INFO_VTDMA_END   (0x0008U)

Flag to track if vTDMA has ended in GoMacH.

Definition at line 59 of file gomach_internal.h.

Function Documentation

◆ gnrc_gomach_bcast_subchann_seq()

int gnrc_gomach_bcast_subchann_seq ( gnrc_netif_t netif,
netopt_enable_t  use_csma 
)

Broadcast the chosen sub-channel sequence to the device's neighbors.

Parameters
[in]netifthe network interface.
[in]use_csmavalue of csma-enable parameter.
Returns
>0 upon sending success.
0< upon sending failure.

◆ gnrc_gomach_beacon_process()

void gnrc_gomach_beacon_process ( gnrc_netif_t netif,
gnrc_pktsnip_t pkt 
)

Process the received beacon packet.

Parameters
[in,out]netifthe network interface.
[in]pktptr to the received beacon.

◆ gnrc_gomach_check_duplicate()

bool gnrc_gomach_check_duplicate ( gnrc_netif_t netif,
gnrc_gomach_packet_info_t pa_info 
)

Check if the received packet is a duplicate packet.

Parameters
[in]netifthe network interface.
[in]pa_infoptr to received packet's parsed information.
Returns
true if the received packet is a duplicate packet.
false if the received packet is not a duplicate packet.

◆ gnrc_gomach_cp_packet_process()

void gnrc_gomach_cp_packet_process ( gnrc_netif_t netif)

Process packets received during the CP (wake-up) period of GoMacH.

Parameters
[in,out]netifthe network interface.

◆ gnrc_gomach_dispatch_defer()

int gnrc_gomach_dispatch_defer ( gnrc_pktsnip_t buffer[],
gnrc_pktsnip_t pkt 
)

Store the received packet to the dispatch buffer.

Parameters
[in,out]bufferRX dispatch packet buffer
[in]pktreceived packet
Returns
0 if correctly stored
<0 on error

◆ gnrc_gomach_find_next_tx_neighbor()

bool gnrc_gomach_find_next_tx_neighbor ( gnrc_netif_t netif)

Find a neighbor that is next to send packet to.

Parameters
[in,out]netifthe network interface.
Returns
true, if found next TX neighbor.
false, if not found next TX neighbor.

◆ gnrc_gomach_get_beacon_fail()

static bool gnrc_gomach_get_beacon_fail ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_BEACON_FAIL flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if send beacon fail.
false upon beacon transmission success.

Definition at line 452 of file gomach_internal.h.

◆ gnrc_gomach_get_buffer_full()

static bool gnrc_gomach_get_buffer_full ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_BUFFER_FULL flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if node's packet buffer is full.
false if node's packet buffer is not full.

Definition at line 483 of file gomach_internal.h.

◆ gnrc_gomach_get_cp_end()

static bool gnrc_gomach_get_cp_end ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_CP_END flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if cp has ended.
false if cp hasn't ended yet.

Definition at line 266 of file gomach_internal.h.

◆ gnrc_gomach_get_duty_cycle_start()

static bool gnrc_gomach_get_duty_cycle_start ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_DUTY_CYCLE_START flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if duty-cycle has started.
false if duty-cycle hasn't started yet.

Definition at line 390 of file gomach_internal.h.

◆ gnrc_gomach_get_enter_new_cycle()

static bool gnrc_gomach_get_enter_new_cycle ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_ENTER_NEW_CYCLE flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if node has entered a new cycle.
false if node hasn't entered a new cycle yet.

Definition at line 514 of file gomach_internal.h.

◆ gnrc_gomach_get_got_preamble()

static bool gnrc_gomach_get_got_preamble ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLE flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if get preamble packet.
false if not get preamble packet yet.

Definition at line 235 of file gomach_internal.h.

◆ gnrc_gomach_get_got_preamble_ack()

static bool gnrc_gomach_get_got_preamble_ack ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLEACK flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if node has got preamble-ACK.
false if node hasn't got preamble-ACK yet.

Definition at line 545 of file gomach_internal.h.

◆ gnrc_gomach_get_max_pream_interv()

static bool gnrc_gomach_get_max_pream_interv ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_MAX_PREAM_INTERV flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if node has reached maximum preamble interval.
false if node hasn't reached maximum preamble interval yet.

Definition at line 607 of file gomach_internal.h.

◆ gnrc_gomach_get_netdev_state()

static netopt_state_t gnrc_gomach_get_netdev_state ( gnrc_netif_t netif)
inlinestatic

Shortcut to get the state of netdev.

Parameters
[in]netifthe network interface.
Returns
state of netdev upon success.
-ENOSYS, upon failure.

Definition at line 671 of file gomach_internal.h.

◆ gnrc_gomach_get_on_pubchan_1()

static bool gnrc_gomach_get_on_pubchan_1 ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_ON_PUBCHAN_1 flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if node is on public channel 1.
false if node is not on public channel 1.

Definition at line 576 of file gomach_internal.h.

◆ gnrc_gomach_get_phase_backoff()

static bool gnrc_gomach_get_phase_backoff ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_PHASE_BACKOFF flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if need to run phase backoff.
false if no need to run phase backoff.

Definition at line 421 of file gomach_internal.h.

◆ gnrc_gomach_get_pkt_received()

static bool gnrc_gomach_get_pkt_received ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INFO_PKT_RECEIVED flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if radio has successfully received a packet.
false if radio hasn't received a packet yet.

Definition at line 173 of file gomach_internal.h.

◆ gnrc_gomach_get_quit_cycle()

static bool gnrc_gomach_get_quit_cycle ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_QUIT_CYCLE flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if need to quit cycle.
false if no need to quit cycle.

Definition at line 204 of file gomach_internal.h.

◆ gnrc_gomach_get_tx_finish()

static bool gnrc_gomach_get_tx_finish ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INFO_TX_FINISHED flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if TX has finished.
false if TX hasn't finished yet.

Definition at line 142 of file gomach_internal.h.

◆ gnrc_gomach_get_unintd_preamble()

static bool gnrc_gomach_get_unintd_preamble ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_UNINTD_PREAMBLE flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if has received unintended-preamble.
false if hasn't received unintended-preamble yet.

Definition at line 328 of file gomach_internal.h.

◆ gnrc_gomach_get_update()

static bool gnrc_gomach_get_update ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_ND_UPDATE flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if need update GoMacH.
false if no need to update GoMacH.

Definition at line 359 of file gomach_internal.h.

◆ gnrc_gomach_get_vTDMA_end()

static bool gnrc_gomach_get_vTDMA_end ( gnrc_netif_t netif)
inlinestatic

Get the GNRC_GOMACH_INTERNAL_INFO_VTDMA_END flag of the device.

Parameters
[in]netifthe network interface.
Returns
true if vTDMA has ended.
false if vTDMA hasn't ended yet.

Definition at line 297 of file gomach_internal.h.

◆ gnrc_gomach_indicator_update()

void gnrc_gomach_indicator_update ( gnrc_netif_t netif,
gnrc_pktsnip_t pkt,
gnrc_gomach_packet_info_t pa_info 
)

Update the queue-length indicator of the packet sender.

Parameters
[in,out]netifthe network interface.
[in]pktreceived packet
[in]pa_infoptr to the info of the received packet.

◆ gnrc_gomach_init_choose_subchannel()

void gnrc_gomach_init_choose_subchannel ( gnrc_netif_t netif)

Choose a sub-channel for a device running GoMacH.

Parameters
[in,out]netifthe network interface.

◆ gnrc_gomach_packet_process_in_vtdma()

void gnrc_gomach_packet_process_in_vtdma ( gnrc_netif_t netif)

Process the received packets in the vTDMA period in GoMacH.

Parameters
[in,out]netifthe network interface.

◆ gnrc_gomach_packet_process_in_wait_beacon()

void gnrc_gomach_packet_process_in_wait_beacon ( gnrc_netif_t netif)

Process the received packets when waiting for the beacon during t2k procedure in GoMacH.

Parameters
[in,out]netifthe network interface.

◆ gnrc_gomach_phase_now()

uint64_t gnrc_gomach_phase_now ( gnrc_netif_t netif)

Get device's current phase.

Parameters
[in]netifthe network interface.
Returns
device's current phase.

◆ gnrc_gomach_process_pkt_in_wait_preamble_ack()

void gnrc_gomach_process_pkt_in_wait_preamble_ack ( gnrc_netif_t netif)

Process the received packets to when waiting for the preamble-ACK packet.

Parameters
[in,out]netifthe network interface.

◆ gnrc_gomach_process_preamble_ack()

void gnrc_gomach_process_preamble_ack ( gnrc_netif_t netif,
gnrc_pktsnip_t pkt 
)

Process the received preamble-ACK packet to get phase-locked with the sender.

Parameters
[in,out]netifthe network interface.
[in]pktptr to the received preamble-ACK.

◆ gnrc_gomach_send()

int gnrc_gomach_send ( gnrc_netif_t netif,
gnrc_pktsnip_t pkt,
netopt_enable_t  csma_enable 
)

Send a pktsnip in GoMacH.

Parameters
[in]netifthe network interface.
[in]pktptr to the packet for sending.
[in]csma_enablevalue of csma-enable parameter.
Returns
>0 upon sending success.
0< upon sending failure.

◆ gnrc_gomach_send_beacon()

int gnrc_gomach_send_beacon ( gnrc_netif_t netif)

Broadcast a beacon packet in GoMacH.

Parameters
[in]netifthe network interface.
Returns
>0 upon sending success.
0< upon sending failure.

◆ gnrc_gomach_send_data()

int gnrc_gomach_send_data ( gnrc_netif_t netif,
netopt_enable_t  csma_enable 
)

Send a data packet to the targeted neighbor.

Parameters
[in,out]netifthe network interface.
[in]csma_enablevalue of csma-enable parameter.
Returns
>0 upon sending success.
0< upon sending failure.

◆ gnrc_gomach_send_preamble()

int gnrc_gomach_send_preamble ( gnrc_netif_t netif,
netopt_enable_t  csma_enable 
)

Send a preamble packet to the targeted neighbor.

Parameters
[in]netifthe network interface.
[in]csma_enablevalue of csma-enable parameter.
Returns
>0 upon sending success.
0< upon sending failure.

◆ gnrc_gomach_send_preamble_ack()

int gnrc_gomach_send_preamble_ack ( gnrc_netif_t netif,
gnrc_gomach_packet_info_t info 
)

Reply a preamble-ACK packet in GoMacH.

Parameters
[in]netifthe network interface.
[in]infoptr to the info of the preamble packet.
Returns
>0 upon sending success.
0< upon sending failure.

◆ gnrc_gomach_set_ack_req()

static void gnrc_gomach_set_ack_req ( gnrc_netif_t netif,
netopt_enable_t  ack_req 
)
inlinestatic

Set the ACK-require parameter of the device.

Parameters
[in,out]netifthe network interface.
[in]ack_reqvalue for the ACK-require parameter.

Definition at line 653 of file gomach_internal.h.

◆ gnrc_gomach_set_autoack()

static void gnrc_gomach_set_autoack ( gnrc_netif_t netif,
netopt_enable_t  autoack 
)
inlinestatic

Set the auto-ACK parameter of the device.

Parameters
[in,out]netifthe network interface.
[in]autoackvalue for the auto-ACK parameter.

Definition at line 636 of file gomach_internal.h.

◆ gnrc_gomach_set_beacon_fail()

static void gnrc_gomach_set_beacon_fail ( gnrc_netif_t netif,
bool  fail 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_BEACON_FAIL flag of the device.

Parameters
[in,out]netifthe network interface.
[in]failvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_BEACON_FAIL flag.

Definition at line 434 of file gomach_internal.h.

◆ gnrc_gomach_set_buffer_full()

static void gnrc_gomach_set_buffer_full ( gnrc_netif_t netif,
bool  full 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_BUFFER_FULL flag of the device.

Parameters
[in,out]netifthe network interface.
[in]fullvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_BUFFER_FULL flag.

Definition at line 465 of file gomach_internal.h.

◆ gnrc_gomach_set_cp_end()

static void gnrc_gomach_set_cp_end ( gnrc_netif_t netif,
bool  cp_end 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_CP_END flag of the device.

Parameters
[in,out]netifthe network interface.
[in]cp_endvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_CP_END flag.

Definition at line 248 of file gomach_internal.h.

◆ gnrc_gomach_set_duty_cycle_start()

static void gnrc_gomach_set_duty_cycle_start ( gnrc_netif_t netif,
bool  start 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_DUTY_CYCLE_START flag of the device.

Parameters
[in,out]netifthe network interface.
[in]startvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_DUTY_CYCLE_START flag.

Definition at line 372 of file gomach_internal.h.

◆ gnrc_gomach_set_enter_new_cycle()

static void gnrc_gomach_set_enter_new_cycle ( gnrc_netif_t netif,
bool  enter 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_ENTER_NEW_CYCLE flag of the device.

Parameters
[in,out]netifthe network interface.
[in]entervalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_ENTER_NEW_CYCLE flag.

Definition at line 496 of file gomach_internal.h.

◆ gnrc_gomach_set_got_preamble()

static void gnrc_gomach_set_got_preamble ( gnrc_netif_t netif,
bool  got_preamble 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLE flag of the device.

Parameters
[in,out]netifthe network interface.
[in]got_preamblevalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLE flag.

Definition at line 217 of file gomach_internal.h.

◆ gnrc_gomach_set_got_preamble_ack()

static void gnrc_gomach_set_got_preamble_ack ( gnrc_netif_t netif,
bool  got 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLEACK flag of the device.

Parameters
[in,out]netifthe network interface.
[in]gotvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_GOT_PREAMBLEACK flag.

Definition at line 527 of file gomach_internal.h.

◆ gnrc_gomach_set_max_pream_interv()

static void gnrc_gomach_set_max_pream_interv ( gnrc_netif_t netif,
bool  max 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_MAX_PREAM_INTERV flag of the device.

Parameters
[in,out]netifthe network interface.
[in]maxvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_MAX_PREAM_INTERV flag.

Definition at line 589 of file gomach_internal.h.

◆ gnrc_gomach_set_netdev_state()

void gnrc_gomach_set_netdev_state ( gnrc_netif_t netif,
netopt_state_t  devstate 
)

Shortcut to set the state of netdev.

Parameters
[in]netifptr to the network interface
[in]devstatenew state for netdev

◆ gnrc_gomach_set_on_pubchan_1()

static void gnrc_gomach_set_on_pubchan_1 ( gnrc_netif_t netif,
bool  on_pubchan_1 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_ON_PUBCHAN_1 flag of the device.

Parameters
[in,out]netifthe network interface.
[in]on_pubchan_1value for GoMacH's GNRC_GOMACH_INTERNAL_INFO_ON_PUBCHAN_1 flag.

Definition at line 558 of file gomach_internal.h.

◆ gnrc_gomach_set_phase_backoff()

static void gnrc_gomach_set_phase_backoff ( gnrc_netif_t netif,
bool  backoff 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_PHASE_BACKOFF flag of the device.

Parameters
[in,out]netifthe network interface.
[in]backoffvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_PHASE_BACKOFF flag.

Definition at line 403 of file gomach_internal.h.

◆ gnrc_gomach_set_pkt_received()

static void gnrc_gomach_set_pkt_received ( gnrc_netif_t netif,
bool  received 
)
inlinestatic

Set the GNRC_GOMACH_INFO_PKT_RECEIVED flag of the device.

Parameters
[in,out]netifthe network interface.
[in]receivedvalue for GoMacH's GNRC_GOMACH_INFO_PKT_RECEIVED flag.

Definition at line 155 of file gomach_internal.h.

◆ gnrc_gomach_set_quit_cycle()

static void gnrc_gomach_set_quit_cycle ( gnrc_netif_t netif,
bool  quit 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_QUIT_CYCLE flag of the device.

Parameters
[in,out]netifthe network interface.
[in]quitvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_QUIT_CYCLE flag.

Definition at line 186 of file gomach_internal.h.

◆ gnrc_gomach_set_tx_finish()

static void gnrc_gomach_set_tx_finish ( gnrc_netif_t netif,
bool  tx_finish 
)
inlinestatic

Set the GNRC_GOMACH_INFO_TX_FINISHED flag of the device.

Parameters
[in,out]netifthe network interface.
[in]tx_finishvalue for GoMacH's GNRC_GOMACH_INFO_TX_FINISHED flag.

Definition at line 124 of file gomach_internal.h.

◆ gnrc_gomach_set_unintd_preamble()

static void gnrc_gomach_set_unintd_preamble ( gnrc_netif_t netif,
bool  uintd_preamble 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_UNINTD_PREAMBLE flag of the device.

Parameters
[in,out]netifthe network interface.
[in]uintd_preamblevalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_UNINTD_PREAMBLE flag.

Definition at line 310 of file gomach_internal.h.

◆ gnrc_gomach_set_update()

static void gnrc_gomach_set_update ( gnrc_netif_t netif,
bool  update 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_ND_UPDATE flag of the device.

Parameters
[in,out]netifthe network interface.
[in]updatevalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_ND_UPDATE flag.

Definition at line 341 of file gomach_internal.h.

◆ gnrc_gomach_set_vTDMA_end()

static void gnrc_gomach_set_vTDMA_end ( gnrc_netif_t netif,
bool  vtdma_end 
)
inlinestatic

Set the GNRC_GOMACH_INTERNAL_INFO_VTDMA_END flag of the device.

Parameters
[in,out]netifthe network interface.
[in]vtdma_endvalue for GoMacH's GNRC_GOMACH_INTERNAL_INFO_VTDMA_END flag.

Definition at line 279 of file gomach_internal.h.

◆ gnrc_gomach_turn_channel()

static void gnrc_gomach_turn_channel ( gnrc_netif_t netif,
uint16_t  channel_num 
)
inlinestatic

Turn the radio to a specific channel.

Parameters
[in,out]netifthe network interface.
[in]channel_numtargeted channel number to turn to.

Definition at line 693 of file gomach_internal.h.

◆ gnrc_gomach_update_neighbor_phase()

void gnrc_gomach_update_neighbor_phase ( gnrc_netif_t netif)

Update the TX neighbors' phases in GoMacH.

Parameters
[in,out]netifthe network interface.

◆ gnrc_gomach_update_neighbor_pubchan()

void gnrc_gomach_update_neighbor_pubchan ( gnrc_netif_t netif)

Update the TX neighbors' public channel phase in GoMacH.

Parameters
[in,out]netifthe network interface.