GNU Radio's SATELLITES Package
gr::satellites::packet_csma Class Reference

Passes packets to the output only when carrier sense is not triggering. More...

#include <packet_csma.h>

Inheritance diagram for gr::satellites::packet_csma:
gr::satellites::packet_csma_impl

Public Types

typedef std::shared_ptr< packet_csmasptr
 

Static Public Member Functions

static sptr make (size_t itemsize, bool back_to_back_priority, const std::string &len_tag_key="packet_len")
 Build the Level to Packet CSMA block. More...
 

Detailed Description

Passes packets to the output only when carrier sense is not triggering.

This block implements a CSMA system for a stream of packets delimited by packet_len tags. The block expects to receive messages from a carrier sense detector that indicate the current carrier sense state every time that the state changes. These messages should be a pair containing a bool in the cdr.

Whenever a new packet arrives to this block, the current status of the carrier sense is checked, and the packet is only propagated to the output if the carrier sense is false. Otherwise the packet is retained until carrier sense becomes false.

As an exception to this rule, if 'back_to_back_priority' is set to true and a packet arrives back-to-back (meaning that it begins in the same work() call as the end of the previous packet), then the packet is propagated to the output immediately regardless of the current state of the carrier sense. This is mainly intended as a workaround for systems in which the carrier sense might detect the packets transmitted by this system due to TX to RX leakage.

Member Typedef Documentation

◆ sptr

Member Function Documentation

◆ make()

static sptr gr::satellites::packet_csma::make ( size_t  itemsize,
bool  back_to_back_priority,
const std::string &  len_tag_key = "packet_len" 
)
static

Build the Level to Packet CSMA block.

Parameters
itemsizeSize of the items in bytes.
back_to_back_priorityTransmit back-to-back packets ignoring the carrier sense.
len_tag_keyPacket length key of the tagged stream.

The documentation for this class was generated from the following file: