Internal used types of GoMacH. More...

Detailed Description

Internal used types of GoMacH.

Definition in file gomach/types.h.

#include <stdint.h>
#include <stdbool.h>
#include "kernel_types.h"
#include "xtimer.h"
#include "net/gnrc.h"
#include "net/gnrc/gomach/hdr.h"
+ Include dependency graph for gomach/types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gnrc_gomach_l2_id_t
 GoMacH internal L2 address structure. More...
 
struct  gnrc_gomach_slosch_unit_t
 GoMacH's slot-schedule-unit. More...
 
struct  gnrc_gomach_vtdma_manag_t
 GoMacH's vTDMA (dynamic slots allocation) management unit. More...
 
struct  gnrc_gomach_dupchk_unit_t
 GoMacH's data structure for recording sender's past TX information. More...
 
struct  gnrc_gomach_dupchk_t
 GoMacH's data structure for recording TX information for avoiding receiving duplicate packets. More...
 
struct  gnrc_gomach_packet_info_t
 Type to pass information about packet parsing. More...
 
struct  gnrc_gomach_vtdma_t
 Sender's vTDMA (dynamic slots allocation) management unit. More...
 
struct  gnrc_gomach_timeout_t
 GoMacH's timeout structure. More...
 
struct  gomach
 GoMacH's specific structure for storing internal states. More...
 
#define GNRC_GOMACH_EVENT_RTT_TYPE   (0x4300)
 GoMacH RTT event type.
 
#define GNRC_GOMACH_EVENT_RTT_NEW_CYCLE   (0x4301)
 GoMacH RTT new cycle start event type.
 
#define GNRC_GOMACH_EVENT_TIMEOUT_TYPE   (0x4400)
 GoMacH timeout event type.
 
#define GNRC_GOMACH_PHASE_UNINITIALIZED   (0)
 GoMacH uninitialized phase value.
 
#define GNRC_GOMACH_PHASE_MAX   (-1)
 GoMacH max phase value.
 
#define GNRC_GOMACH_DUPCHK_BUFFER_SIZE   (8U)
 GoMacH check duplicate packet buffer size.
 
#define GNRC_GOMACH_TIMEOUT_COUNT   (6U)
 The default largest number of parallel timeouts in GoMacH.
 
#define GNRC_GOMACH_SLOSCH_UNIT_COUNT   (11U)
 The default number of slot-schedule-unit gnrc_gomach_slosch_unit_t in GoMacH.
 
#define GNRC_GOMACH_TYPE_UNKNOWN   (0U)
 MAC type of unknown in GoMacH for indicating that the node's phase is unknown.
 
#define GNRC_GOMACH_TYPE_KNOWN   (1U)
 MAC type of known in GoMacH for indicating that the node's phase is known.
 
#define GNRC_GOMACH_ENABLE_DUTYCYLE_RECORD   (0U)
 Enable/disable duty-cycle record and print out. More...
 
#define GNRC_GOMACH_TIMEOUT_INIT   { {}, {}, false, GNRC_GOMACH_TIMEOUT_DISABLED }
 Static initializer for gnrc_gomach_timeout_t.
 
enum  gnrc_gomach_bcast_state_t {
  GNRC_GOMACH_BCAST_INIT, GNRC_GOMACH_BCAST_SEND, GNRC_GOMACH_BCAST_WAIT_TX_FINISH, GNRC_GOMACH_BCAST_WAIT_NEXT_TX,
  GNRC_GOMACH_BCAST_END
}
 State-machine states of Broadcast procedure of GoMacH. More...
 
enum  gnrc_gomach_t2k_state_t {
  GNRC_GOMACH_T2K_INIT, GNRC_GOMACH_T2K_WAIT_CP, GNRC_GOMACH_T2K_TRANS_IN_CP, GNRC_GOMACH_T2K_WAIT_CPTX_FEEDBACK,
  GNRC_GOMACH_T2K_WAIT_BEACON, GNRC_GOMACH_T2K_WAIT_SLOTS, GNRC_GOMACH_T2K_VTDMA_TRANS, GNRC_GOMACH_T2K_WAIT_VTDMA_FEEDBACK,
  GNRC_GOMACH_T2K_END
}
 State-machine states of Transmission-to-phase-known (t2k) procedure of GoMacH. More...
 
enum  gnrc_gomach_t2u_state_t {
  GNRC_GOMACH_T2U_INIT, GNRC_GOMACH_T2U_PREAMBLE_PREPARE, GNRC_GOMACH_T2U_SEND_PREAMBLE, GNRC_GOMACH_T2U_WAIT_PREAMBLE_TX,
  GNRC_GOMACH_T2U_WAIT_PREAMBLE_ACK, GNRC_GOMACH_T2U_SEND_DATA, GNRC_GOMACH_T2U_WAIT_DATA_TX, GNRC_GOMACH_T2U_END
}
 State-machine states of Transmission-to-phase-unknown (t2u) procedure of GoMacH. More...
 
enum  gnrc_gomach_basic_state_t { GNRC_GOMACH_INIT, GNRC_GOMACH_LISTEN, GNRC_GOMACH_TRANSMIT }
 State-machine states of basic management procedure of GoMacH. More...
 
enum  gnrc_gomach_init_state_t { GNRC_GOMACH_INIT_PREPARE, GNRC_GOMACH_INIT_ANNC_SUBCHAN, GNRC_GOMACH_INIT_WAIT_FEEDBACK, GNRC_GOMACH_INIT_END }
 State-machine states of initialization procedure of GoMacH. More...
 
enum  gnrc_gomach_listen_state_t {
  GNRC_GOMACH_LISTEN_CP_INIT, GNRC_GOMACH_LISTEN_CP_LISTEN, GNRC_GOMACH_LISTEN_CP_END, GNRC_GOMACH_LISTEN_SEND_BEACON,
  GNRC_GOMACH_LISTEN_WAIT_BEACON_TX, GNRC_GOMACH_LISTEN_VTDMA_INIT, GNRC_GOMACH_LISTEN_VTDMA, GNRC_GOMACH_LISTEN_VTDMA_END,
  GNRC_GOMACH_LISTEN_SLEEP_INIT, GNRC_GOMACH_LISTEN_SLEEP, GNRC_GOMACH_LISTEN_SLEEP_END
}
 State-machine states of duty-cycled listening procedure of GoMacH. More...
 
enum  gnrc_gomach_transmit_state_t { GNRC_GOMACH_TRANS_TO_UNKNOWN, GNRC_GOMACH_TRANS_TO_KNOWN, GNRC_GOMACH_BROADCAST }
 State-machine states of basic transmission management procedure of GoMacH. More...
 
enum  gnrc_gomach_timeout_type_t {
  GNRC_GOMACH_TIMEOUT_DISABLED, GNRC_GOMACH_TIMEOUT_BCAST_FINISH, GNRC_GOMACH_TIMEOUT_BCAST_INTERVAL, GNRC_GOMACH_TIMEOUT_PREAMBLE,
  GNRC_GOMACH_TIMEOUT_MAX_PREAM_INTERVAL, GNRC_GOMACH_TIMEOUT_PREAM_DURATION, GNRC_GOMACH_TIMEOUT_WAIT_CP, GNRC_GOMACH_TIMEOUT_WAIT_BEACON,
  GNRC_GOMACH_TIMEOUT_WAIT_SLOTS, GNRC_GOMACH_TIMEOUT_CP_END, GNRC_GOMACH_TIMEOUT_CP_MAX, GNRC_GOMACH_TIMEOUT_WAIT_RX_END,
  GNRC_GOMACH_TIMEOUT_VTDMA, GNRC_GOMACH_TIMEOUT_NO_TX_ISR
}
 GoMacH timeout types. More...
 
typedef struct gomach gnrc_gomach_t
 GoMacH's specific structure for storing internal states.
 

Macro Definition Documentation

◆ GNRC_GOMACH_ENABLE_DUTYCYLE_RECORD

#define GNRC_GOMACH_ENABLE_DUTYCYLE_RECORD   (0U)

Enable/disable duty-cycle record and print out.

Set "1" to enable, set "0" to disable.

Definition at line 93 of file gomach/types.h.

Enumeration Type Documentation

◆ gnrc_gomach_basic_state_t

State-machine states of basic management procedure of GoMacH.

Enumerator
GNRC_GOMACH_INIT 

Initiate GoMacH.

GNRC_GOMACH_LISTEN 

GoMacH's duty-cycled listen procedure.

GNRC_GOMACH_TRANSMIT 

GoMacH's transmission procedure.

Definition at line 141 of file gomach/types.h.

◆ gnrc_gomach_bcast_state_t

State-machine states of Broadcast procedure of GoMacH.

Enumerator
GNRC_GOMACH_BCAST_INIT 

Initiate broadcast.

GNRC_GOMACH_BCAST_SEND 

Send broadcast packet.

GNRC_GOMACH_BCAST_WAIT_TX_FINISH 

Wait for broadcast TX finish.

GNRC_GOMACH_BCAST_WAIT_NEXT_TX 

Wait for next broadcast TX timing.

GNRC_GOMACH_BCAST_END 

End of broadcast procedure.

Definition at line 99 of file gomach/types.h.

◆ gnrc_gomach_init_state_t

State-machine states of initialization procedure of GoMacH.

Enumerator
GNRC_GOMACH_INIT_PREPARE 

Prepare the initialization procedure of GoMacH.

GNRC_GOMACH_INIT_ANNC_SUBCHAN 

Announce the sub-channel sequence of the node.

GNRC_GOMACH_INIT_WAIT_FEEDBACK 

Wait for announce TX finish.

GNRC_GOMACH_INIT_END 

End of the initialization procedure of GoMacH.

Definition at line 150 of file gomach/types.h.

◆ gnrc_gomach_listen_state_t

State-machine states of duty-cycled listening procedure of GoMacH.

Enumerator
GNRC_GOMACH_LISTEN_CP_INIT 

Initiate the listen period.

GNRC_GOMACH_LISTEN_CP_LISTEN 

Listen for incoming packets.

GNRC_GOMACH_LISTEN_CP_END 

End of packet listen period.

GNRC_GOMACH_LISTEN_SEND_BEACON 

Send beacon packet when needed.

GNRC_GOMACH_LISTEN_WAIT_BEACON_TX 

Wait for send beacon TX finish.

GNRC_GOMACH_LISTEN_VTDMA_INIT 

Initiate the vTDMA period.

GNRC_GOMACH_LISTEN_VTDMA 

Listen for incoming packets in vTDMA.

GNRC_GOMACH_LISTEN_VTDMA_END 

End of the vTDMA period.

GNRC_GOMACH_LISTEN_SLEEP_INIT 

Initiate the sleep period.

GNRC_GOMACH_LISTEN_SLEEP 

Turn radio off to sleep.

GNRC_GOMACH_LISTEN_SLEEP_END 

End of the sleep period.

Definition at line 160 of file gomach/types.h.

◆ gnrc_gomach_t2k_state_t

State-machine states of Transmission-to-phase-known (t2k) procedure of GoMacH.

Enumerator
GNRC_GOMACH_T2K_INIT 

Initiate t2k procedure.

GNRC_GOMACH_T2K_WAIT_CP 

Wait for receiver's CP (wake-up) period.

GNRC_GOMACH_T2K_TRANS_IN_CP 

Transmit data in receiver's CP period.

GNRC_GOMACH_T2K_WAIT_CPTX_FEEDBACK 

Wait for CP transmission finish.

GNRC_GOMACH_T2K_WAIT_BEACON 

Wait receiver's beacon.

GNRC_GOMACH_T2K_WAIT_SLOTS 

Wait for the node's allocated slots period.

GNRC_GOMACH_T2K_VTDMA_TRANS 

Transmit data in allocate slots.

GNRC_GOMACH_T2K_WAIT_VTDMA_FEEDBACK 

Wait for TX finish in TX-slot.

GNRC_GOMACH_T2K_END 

End of t2k procedure.

Definition at line 111 of file gomach/types.h.

◆ gnrc_gomach_t2u_state_t

State-machine states of Transmission-to-phase-unknown (t2u) procedure of GoMacH.

Enumerator
GNRC_GOMACH_T2U_INIT 

Initiate t2u procedure.

GNRC_GOMACH_T2U_PREAMBLE_PREPARE 

Prepare settings before sending preamble.

GNRC_GOMACH_T2U_SEND_PREAMBLE 

Send preamble in t2u.

GNRC_GOMACH_T2U_WAIT_PREAMBLE_TX 

Wait for Send preamble TX finish.

GNRC_GOMACH_T2U_WAIT_PREAMBLE_ACK 

Wait for preamble-ACK from receiver.

GNRC_GOMACH_T2U_SEND_DATA 

Send data packet to the receiver.

GNRC_GOMACH_T2U_WAIT_DATA_TX 

Wait for Send data TX finish.

GNRC_GOMACH_T2U_END 

End of t2u procedure.

Definition at line 127 of file gomach/types.h.

◆ gnrc_gomach_timeout_type_t

GoMacH timeout types.

Enumerator
GNRC_GOMACH_TIMEOUT_DISABLED 

Timeout is disabled.

GNRC_GOMACH_TIMEOUT_BCAST_FINISH 

Timeout of broadcast procedure end.

GNRC_GOMACH_TIMEOUT_BCAST_INTERVAL 

Timeout of next broadcast transmission.

GNRC_GOMACH_TIMEOUT_PREAMBLE 

Timeout of next preamble transmission.

GNRC_GOMACH_TIMEOUT_MAX_PREAM_INTERVAL 

Timeout of maximum preamble interval.

GNRC_GOMACH_TIMEOUT_PREAM_DURATION 

Timeout of maximum preamble duration.

GNRC_GOMACH_TIMEOUT_WAIT_CP 

Timeout of waiting receiver's CP period.

GNRC_GOMACH_TIMEOUT_WAIT_BEACON 

Timeout of waiting beacon.

GNRC_GOMACH_TIMEOUT_WAIT_SLOTS 

Timeout of waiting own slots.

GNRC_GOMACH_TIMEOUT_CP_END 

Timeout of CP (wake-up) period ending.

GNRC_GOMACH_TIMEOUT_CP_MAX 

Timeout of maximum CP duration.

GNRC_GOMACH_TIMEOUT_WAIT_RX_END 

Timeout of waiting reception complete.

GNRC_GOMACH_TIMEOUT_VTDMA 

Timeout of vTDMA period end.

GNRC_GOMACH_TIMEOUT_NO_TX_ISR 

Timeout of maximum transmission duration.

Definition at line 186 of file gomach/types.h.

◆ gnrc_gomach_transmit_state_t

State-machine states of basic transmission management procedure of GoMacH.

Enumerator
GNRC_GOMACH_TRANS_TO_UNKNOWN 

Transmit to phase-unknown node in GoMacH.

GNRC_GOMACH_TRANS_TO_KNOWN 

Transmit to phase-known node in GoMacH.

GNRC_GOMACH_BROADCAST 

Broadcast packet in GoMacH.

Definition at line 177 of file gomach/types.h.