19#ifndef NET_GNRC_GOMACH_TYPES_H
20#define NET_GNRC_GOMACH_TYPES_H
35#define GNRC_GOMACH_EVENT_RTT_TYPE (0x4300)
40#define GNRC_GOMACH_EVENT_RTT_NEW_CYCLE (0x4301)
45#define GNRC_GOMACH_EVENT_TIMEOUT_TYPE (0x4400)
50#define GNRC_GOMACH_PHASE_UNINITIALIZED (0)
55#define GNRC_GOMACH_PHASE_MAX (-1)
60#define GNRC_GOMACH_DUPCHK_BUFFER_SIZE (8U)
65#define GNRC_GOMACH_TIMEOUT_COUNT (6U)
71#define GNRC_GOMACH_SLOSCH_UNIT_COUNT (11U)
77#define GNRC_GOMACH_TYPE_UNKNOWN (0U)
83#define GNRC_GOMACH_TYPE_KNOWN (1U)
270#define GNRC_GOMACH_TIMEOUT_INIT { {}, {}, false, GNRC_GOMACH_TIMEOUT_DISABLED }
296#if (GNRC_MAC_ENABLE_DUTYCYCLE_RECORD == 1)
298 uint64_t last_radio_on_time_ms;
300 uint64_t radio_off_time_ms;
302 uint64_t system_start_time_ms;
304 uint64_t awake_duration_sum_ms;
Header definition of GoMacH.
GoMacH's data structure for recording TX information for avoiding receiving duplicate packets.
uint8_t queue_head
Check queue's head.
GoMacH's data structure for recording sender's past TX information.
uint8_t seq
Node's MAC packet sequence.
uint8_t life_cycle
Lifetime of this record unit.
gnrc_gomach_l2_addr_t node_addr
Node's address.
GoMacH internal L2 address structure.
GoMacH internal L2 address structure.
Type to pass information about packet parsing.
gnrc_gomach_l2_addr_t src_addr
Copied source address of packet.
gnrc_gomach_hdr_t * header
GoMacH header of packet.
uint8_t seq
MAC sequence of the received packet.
gnrc_gomach_l2_addr_t dst_addr
Copied destination address of packet.
GoMacH's slot-schedule-unit.
gnrc_gomach_l2_addr_t node_addr
Node's address.
uint8_t queue_indicator
Node's queue-length indicator.
GoMacH's timeout structure.
xtimer_t timer
xtimer entity.
gnrc_gomach_timeout_type_t type
GoMacH timeout type.
bool expired
Timeout expiration indicator.
GoMacH's vTDMA (dynamic slots allocation) management unit.
uint8_t sub_channel_seq
Receiver's sub-channel sequence.
uint8_t total_slots_num
Number of total allocated transmission slots.
Sender's vTDMA (dynamic slots allocation) management unit.
uint8_t slots_position
Node's own slots position.
uint8_t slots_num
Node's allocated slots number.
uint16_t sub_channel_seq
Receiver's sub-channel sequence.
GoMacH's specific structure for storing internal states.
uint32_t backoff_phase_us
Phase backoff time.
uint16_t sub_channel_seq
Sub-channel sequence.
int16_t rx_pkt_rssi
RSSI of latest received packet in dBm.
uint32_t last_wakeup
Last wake-up timing.
uint8_t rx_pkt_lqi
LQI of latest received packet.
gnrc_gomach_timeout_t timeouts[GNRC_GOMACH_TIMEOUT_COUNT]
GoMacH's timeouts.
gnrc_gomach_init_state_t init_state
Initialization state.
uint16_t subchannel_occu_flags
Sub-channel usage indicator.
uint16_t pub_channel_2
Public channel 2.
gnrc_gomach_basic_state_t basic_state
Basic state.
uint64_t last_wakeup_phase_us
Last cycle wakeup phase.
uint16_t pub_channel_1
Public channel 1.
uint16_t cur_pub_channel
Current public channel.
uint16_t gomach_info
GoMacH's internal information.
uint8_t cp_extend_count
CP extend count.
Describes a message object which can be sent between threads.
#define GNRC_GOMACH_DUPCHK_BUFFER_SIZE
GoMacH check duplicate packet buffer size.
#define GNRC_GOMACH_TIMEOUT_COUNT
The default largest number of parallel timeouts in GoMacH.
gnrc_gomach_t2k_state_t
State-machine states of Transmission-to-phase-known (t2k) procedure of GoMacH.
@ 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_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_END
End of t2k procedure.
@ GNRC_GOMACH_T2K_WAIT_VTDMA_FEEDBACK
Wait for TX finish in TX-slot.
@ GNRC_GOMACH_T2K_INIT
Initiate t2k procedure.
gnrc_gomach_timeout_type_t
GoMacH timeout types.
@ GNRC_GOMACH_TIMEOUT_PREAMBLE
Timeout of next preamble transmission.
@ GNRC_GOMACH_TIMEOUT_WAIT_CP
Timeout of waiting receiver's CP period.
@ GNRC_GOMACH_TIMEOUT_WAIT_BEACON
Timeout of waiting beacon.
@ GNRC_GOMACH_TIMEOUT_BCAST_INTERVAL
Timeout of next broadcast transmission.
@ GNRC_GOMACH_TIMEOUT_MAX_PREAM_INTERVAL
Timeout of maximum preamble interval.
@ GNRC_GOMACH_TIMEOUT_NO_TX_ISR
Timeout of maximum transmission duration.
@ GNRC_GOMACH_TIMEOUT_PREAM_DURATION
Timeout of maximum preamble duration.
@ GNRC_GOMACH_TIMEOUT_WAIT_RX_END
Timeout of waiting reception complete.
@ GNRC_GOMACH_TIMEOUT_DISABLED
Timeout is disabled.
@ GNRC_GOMACH_TIMEOUT_CP_END
Timeout of CP (wake-up) period ending.
@ GNRC_GOMACH_TIMEOUT_WAIT_SLOTS
Timeout of waiting own slots.
@ GNRC_GOMACH_TIMEOUT_VTDMA
Timeout of vTDMA period end.
@ GNRC_GOMACH_TIMEOUT_BCAST_FINISH
Timeout of broadcast procedure end.
@ GNRC_GOMACH_TIMEOUT_CP_MAX
Timeout of maximum CP duration.
gnrc_gomach_bcast_state_t
State-machine states of Broadcast procedure of GoMacH.
@ GNRC_GOMACH_BCAST_INIT
Initiate broadcast.
@ 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.
@ GNRC_GOMACH_BCAST_SEND
Send broadcast packet.
gnrc_gomach_listen_state_t
State-machine states of duty-cycled listening procedure of GoMacH.
@ GNRC_GOMACH_LISTEN_SLEEP_END
End of the sleep period.
@ GNRC_GOMACH_LISTEN_SLEEP
Turn radio off to sleep.
@ GNRC_GOMACH_LISTEN_CP_END
End of packet listen period.
@ GNRC_GOMACH_LISTEN_SEND_BEACON
Send beacon packet when needed.
@ GNRC_GOMACH_LISTEN_VTDMA_END
End of the vTDMA period.
@ GNRC_GOMACH_LISTEN_VTDMA
Listen for incoming packets in vTDMA.
@ GNRC_GOMACH_LISTEN_CP_LISTEN
Listen for incoming packets.
@ GNRC_GOMACH_LISTEN_VTDMA_INIT
Initiate the vTDMA period.
@ GNRC_GOMACH_LISTEN_WAIT_BEACON_TX
Wait for send beacon TX finish.
@ GNRC_GOMACH_LISTEN_CP_INIT
Initiate the listen period.
@ GNRC_GOMACH_LISTEN_SLEEP_INIT
Initiate the sleep period.
gnrc_gomach_basic_state_t
State-machine states of basic management procedure of GoMacH.
@ GNRC_GOMACH_INIT
Initiate GoMacH.
@ GNRC_GOMACH_TRANSMIT
GoMacH's transmission procedure.
@ GNRC_GOMACH_LISTEN
GoMacH's duty-cycled listen procedure.
gnrc_gomach_init_state_t
State-machine states of 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_PREPARE
Prepare the initialization procedure of GoMacH.
@ GNRC_GOMACH_INIT_END
End of the initialization procedure of GoMacH.
gnrc_gomach_transmit_state_t
State-machine states of basic transmission management procedure of GoMacH.
@ GNRC_GOMACH_BROADCAST
Broadcast packet in GoMacH.
@ GNRC_GOMACH_TRANS_TO_KNOWN
Transmit to phase-known node in GoMacH.
@ GNRC_GOMACH_TRANS_TO_UNKNOWN
Transmit to phase-unknown node in GoMacH.
gnrc_gomach_t2u_state_t
State-machine states of Transmission-to-phase-unknown (t2u) procedure of GoMacH.
@ GNRC_GOMACH_T2U_END
End of t2u procedure.
@ GNRC_GOMACH_T2U_SEND_PREAMBLE
Send preamble in t2u.
@ GNRC_GOMACH_T2U_PREAMBLE_PREPARE
Prepare settings before sending preamble.
@ GNRC_GOMACH_T2U_WAIT_PREAMBLE_TX
Wait for Send preamble TX finish.
@ GNRC_GOMACH_T2U_WAIT_DATA_TX
Wait for Send data TX finish.
@ GNRC_GOMACH_T2U_SEND_DATA
Send data packet to the receiver.
@ GNRC_GOMACH_T2U_WAIT_PREAMBLE_ACK
Wait for preamble-ACK from receiver.
@ GNRC_GOMACH_T2U_INIT
Initiate t2u procedure.
struct gomach gnrc_gomach_t
GoMacH's specific structure for storing internal states.
xtimer interface definitions