Python

class dragonradio.liquid.CRCScheme

Members:

unknown

none

checksum

crc8

crc16

crc24

crc32

checksum = <CRCScheme.checksum: 2>
crc16 = <CRCScheme.crc16: 4>
crc24 = <CRCScheme.crc24: 5>
crc32 = <CRCScheme.crc32: 6>
crc8 = <CRCScheme.crc8: 3>
property name
none = <CRCScheme.none: 1>
unknown = <CRCScheme.unknown: 0>
property value
class dragonradio.liquid.FECScheme

Members:

unknown

none

rep3

rep5

h74

h84

h128

g2412

secded2216

secded3932

secded7264

v27

v29

v39

v615

v27p23

v27p34

v27p45

v27p56

v27p67

v27p78

v29p23

v29p34

v29p45

v29p56

v29p67

v29p78

rs8

g2412 = <FECScheme.g2412: 7>
h128 = <FECScheme.h128: 6>
h74 = <FECScheme.h74: 4>
h84 = <FECScheme.h84: 5>
property name
none = <FECScheme.none: 1>
rep3 = <FECScheme.rep3: 2>
rep5 = <FECScheme.rep5: 3>
rs8 = <FECScheme.rs8: 27>
secded2216 = <FECScheme.secded2216: 8>
secded3932 = <FECScheme.secded3932: 9>
secded7264 = <FECScheme.secded7264: 10>
unknown = <FECScheme.unknown: 0>
v27 = <FECScheme.v27: 11>
v27p23 = <FECScheme.v27p23: 15>
v27p34 = <FECScheme.v27p34: 16>
v27p45 = <FECScheme.v27p45: 17>
v27p56 = <FECScheme.v27p56: 18>
v27p67 = <FECScheme.v27p67: 19>
v27p78 = <FECScheme.v27p78: 20>
v29 = <FECScheme.v29: 12>
v29p23 = <FECScheme.v29p23: 21>
v29p34 = <FECScheme.v29p34: 22>
v29p45 = <FECScheme.v29p45: 23>
v29p56 = <FECScheme.v29p56: 24>
v29p67 = <FECScheme.v29p67: 25>
v29p78 = <FECScheme.v29p78: 26>
v39 = <FECScheme.v39: 13>
v615 = <FECScheme.v615: 14>
property value
class dragonradio.liquid.FlexFrame
class dragonradio.liquid.FlexFrameDemodulator
class dragonradio.liquid.FlexFrameModulator
class dragonradio.liquid.FrameStats
property cfo

Carrier Frequency Offset (f/Fs)

property check

Data validity check (crc, checksum)

property end_counter

Sample offset of end of demodulated packet

property evm

Error Vector Magnitude (dB)

property fec0

Forward Error-Correction (inner)

property fec1

Forward Error-Correction (outer)

property mod_bps

Modulation depth (bits/symbol)

property mod_scheme

Modulation scheme

property rssi

Received Signal Strength Indicator (dB)

property start_counter

Sample offset of start of demodulated packet

class dragonradio.liquid.LiquidDemodulator
demodulate(self: _dragonradio.liquid.LiquidDemodulator, arg0: numpy.ndarray[numpy.complex64]) List[Tuple[Optional[_dragonradio.radio.Header], Optional[bytes], _dragonradio.liquid.FrameStats]]

Demodulate a signal

property header_mcs

Header MCS

property soft_header

Use soft decoding for header

property soft_payload

Use soft decoding for payload

class dragonradio.liquid.LiquidModulator
property header_mcs

Header MCS

property payload_mcs

Payload MCS

class dragonradio.liquid.LiquidPHY
property header_mcs
property soft_header
property soft_payload
class dragonradio.liquid.MCS
property check

Data validity check

property fec0

Inner FEC

property fec1

Outer FEC

property ms

Modulation scheme

class dragonradio.liquid.ModulationScheme

Members:

unknown

psk2

psk4

psk8

psk16

psk32

psk64

psk128

psk256

dpsk2

dpsk4

dpsk8

dpsk16

dpsk32

dpsk64

dpsk128

dpsk256

ask2

ask4

ask8

ask16

ask32

ask64

ask128

ask256

qam4

qam8

qam16

qam32

qam64

qam128

qam256

apsk4

apsk8

apsk16

apsk32

apsk64

apsk128

apsk256

bpsk

qpsk

ook

sqam32

sqam128

V29

arb16opt

arb32opt

arb64opt

arb128opt

arb256opt

arb64vt

arb

V29 = <ModulationScheme.V29: 44>
apsk128 = <ModulationScheme.apsk128: 37>
apsk16 = <ModulationScheme.apsk16: 34>
apsk256 = <ModulationScheme.apsk256: 38>
apsk32 = <ModulationScheme.apsk32: 35>
apsk4 = <ModulationScheme.apsk4: 32>
apsk64 = <ModulationScheme.apsk64: 36>
apsk8 = <ModulationScheme.apsk8: 33>
arb = <ModulationScheme.arb: 51>
arb128opt = <ModulationScheme.arb128opt: 48>
arb16opt = <ModulationScheme.arb16opt: 45>
arb256opt = <ModulationScheme.arb256opt: 49>
arb32opt = <ModulationScheme.arb32opt: 46>
arb64opt = <ModulationScheme.arb64opt: 47>
arb64vt = <ModulationScheme.arb64vt: 50>
ask128 = <ModulationScheme.ask128: 23>
ask16 = <ModulationScheme.ask16: 20>
ask2 = <ModulationScheme.ask2: 17>
ask256 = <ModulationScheme.ask256: 24>
ask32 = <ModulationScheme.ask32: 21>
ask4 = <ModulationScheme.ask4: 18>
ask64 = <ModulationScheme.ask64: 22>
ask8 = <ModulationScheme.ask8: 19>
bpsk = <ModulationScheme.bpsk: 39>
dpsk128 = <ModulationScheme.dpsk128: 15>
dpsk16 = <ModulationScheme.dpsk16: 12>
dpsk2 = <ModulationScheme.dpsk2: 9>
dpsk256 = <ModulationScheme.dpsk256: 16>
dpsk32 = <ModulationScheme.dpsk32: 13>
dpsk4 = <ModulationScheme.dpsk4: 10>
dpsk64 = <ModulationScheme.dpsk64: 14>
dpsk8 = <ModulationScheme.dpsk8: 11>
property name
ook = <ModulationScheme.ook: 41>
psk128 = <ModulationScheme.psk128: 7>
psk16 = <ModulationScheme.psk16: 4>
psk2 = <ModulationScheme.psk2: 1>
psk256 = <ModulationScheme.psk256: 8>
psk32 = <ModulationScheme.psk32: 5>
psk4 = <ModulationScheme.psk4: 2>
psk64 = <ModulationScheme.psk64: 6>
psk8 = <ModulationScheme.psk8: 3>
qam128 = <ModulationScheme.qam128: 30>
qam16 = <ModulationScheme.qam16: 27>
qam256 = <ModulationScheme.qam256: 31>
qam32 = <ModulationScheme.qam32: 28>
qam4 = <ModulationScheme.qam4: 25>
qam64 = <ModulationScheme.qam64: 29>
qam8 = <ModulationScheme.qam8: 26>
qpsk = <ModulationScheme.qpsk: 40>
sqam128 = <ModulationScheme.sqam128: 43>
sqam32 = <ModulationScheme.sqam32: 42>
unknown = <ModulationScheme.unknown: 0>
property value
class dragonradio.liquid.NewFlexFrame
class dragonradio.liquid.NewFlexFrameDemodulator
class dragonradio.liquid.NewFlexFrameModulator
class dragonradio.liquid.OFDM
property subcarriers
class dragonradio.liquid.OFDMDemodulator
class dragonradio.liquid.OFDMModulator

Channel planning

dragonradio.channels.defaultChannelPlan(bandwidth, cbw, cgbw=0, egbw=0, maximize_channel_guard_bandwidth=True)[source]

Generate a default channel plan.

Parameters
  • bandwidth – total bandwidth

  • cbw – channel bandwidth

  • cgbw – channel guard bandwidth, i.e., minimum space between channels

  • egbw – edge guard bandwidth, i.e., minimum space from edges of spectrum

Returns

A list of Channels

Support for communicating with gpsd using asyncio

class dragonradio.gpsd.GPSDClient(loc, loop=None, server_host='127.0.0.1', server_port=6000)[source]

A client for communicating with gpsd

async connect()[source]

Connect to gpsd

async run()[source]

Run gpsd listener

async stop()[source]

Stop gpsd reader

async watch(enable)[source]

Set whether or not to watch GPS info

Support for protobuf over UDP, TCP, and ZMQ

class dragonradio.protobuf.HandlerTable[source]

Table for protobuf message handlers

class dragonradio.protobuf.ProtobufDatagramProtocol(cls=None, handler_obj=None, loop=None, **kwargs)[source]

Abstract base class of client for protobuf-over-UDP

cls

Protobuf message class of messages received by server

connected_event

Event set when connection is made

connection_lost(exc)[source]

Called when the connection is lost or closed.

The argument is an exception object or None (the latter meaning a regular EOF is received or the connection was aborted or closed).

connection_made(transport)[source]

Called when a connection is made.

The argument is the transport representing the pipe connection. To receive data, wait for data_received() calls. When the connection is closed, connection_lost() is called.

datagram_received(data, addr)[source]

Called when some datagram is received.

handler_obj

Protobuf message handler object

loop

asyncio loop

async send(msg)[source]

Serialize and send a protobuf message with its length prepended

transport

Transport associated with protocol

class dragonradio.protobuf.ProtobufProtocol(cls=None, handler_obj=None, loop=None, **kwargs)[source]

Abstract base class for protobuf-over-TCP clients

async _recvBytes(count)[source]
async _serverLoop()[source]
buffer

Received bytes

buffer_cond

Condition variable for buffer

buffer_lock

Lock for buffer

cls

Protobuf message class of messages received by server

connected_event

Event set when connection is made

connection_lost(exc)[source]

Called when the connection is lost or closed.

The argument is an exception object or None (the latter meaning a regular EOF is received or the connection was aborted or closed).

connection_made(transport)[source]

Called when a connection is made.

The argument is the transport representing the pipe connection. To receive data, wait for data_received() calls. When the connection is closed, connection_lost() is called.

data_received(data)[source]

Called when some data is received.

The argument is a bytes object.

handler_obj

Protobuf message handler object

loop

asyncio loop

async recv(cls)[source]

Receive a protobuf message of the given message class

async send(msg)[source]

Serialize and send a protobuf message with its length prepended

server_task

Server loop task

transport

Transport associated with protocol

class dragonradio.protobuf.TCPProtoClient(server_host=None, server_port=None, **kwargs)[source]

Client for protobuf-over-TCP

close()[source]

Close connection to server

open()[source]

Open connection to server

server_host

Server hostname

server_port

Server port

class dragonradio.protobuf.TCPProtoServer(handler_obj, loop=None)[source]

Server for protobuf-over-TCP

async _serverLoop(cls, listen_ip, listen_port)[source]
handler_obj

Protobuf message handler object

loop

asyncio loop

startServer(cls, listen_ip, listen_port)[source]

Start a protobuf TCP server

class dragonradio.protobuf.UDPProtoClient(server_host=None, server_port=None, **kwargs)[source]

Client for protobuf-over-UDP

close()[source]

Close connection to server

open()[source]

Open connection to server

server_host

Server hostname

server_port

Server port

class dragonradio.protobuf.UDPProtoServer(handler_obj, loop=None)[source]

Server for protobuf-over-UDP

async _serverLoop(cls, listen_ip, listen_port)[source]

Create server endpoint

handler_obj

Protobuf message handler object

loop

asyncio loop

startServer(cls, listen_ip, listen_port)[source]

Start a protobuf UDP server

class dragonradio.protobuf.ZMQProtoClient(loop=None, server_host=None, server_port=None)[source]

Protobuf-over-ZMQ client

close()[source]

Close connection to server

ctx

ZMQ context

loop

asyncio loop

open()[source]

Open connection to server

async send(msg)[source]

Send a message

server_host

Server hostname

server_port

Server port

server_sock

ZMQ server socket

class dragonradio.protobuf.ZMQProtoServer(handler_obj=None, loop=None)[source]

Protobuf-over-ZMQ server

async _serverLoop(cls, listen_ip, listen_port)[source]
handler_obj

Protobuf message handler object

loop

asyncio loop

startServer(cls, listen_ip, listen_port)[source]

Start server

dragonradio.protobuf.findHandler(obj, cls, msg)[source]

Find the handler associated with a protobuf message

dragonradio.protobuf.getTimestamp(self)[source]

Get timestamp (sec)

dragonradio.protobuf.handle(name)[source]

Indicate that a method handles a specific message. Should be used to decorate a method of a class that handles protobuf messages.

Parameters

name (str) – The name of the message the function handles.

dragonradio.protobuf.handler(message_type)[source]

Add automatic support for handling protobuf messages with a payload structure. Should be used to decorate a class handling protobuf messages.

Parameters

cls (class) – The protobuf message class handled

dragonradio.protobuf.rpc(req_cls, resp_cls)[source]

Automatically add support for synchronously waiting on the results of an RPC call. Should be used to decorate the methods of a TCPProtoClient subclass.

Parameters
  • req_cls (class) – The message class for RPC requests.

  • resp_cls (class) – The message class for RPC responses.

dragonradio.protobuf.send(cls)[source]

Automatically add support to a function for constructing and sending a protobuf message. Should be used to decorate the methods of a ZMQProtoClient subclass.

Parameters

cls (class) – The message class to send.

dragonradio.protobuf.setTimestamp(self, ts)[source]

Set timestamp (sec)

class dragonradio.radio.AutoGain
property auto_soft_tx_gain_clip_frac

Clipping threshold for automatic TX soft gain

property g_0dBFS

Soft TX gain (multiplicative factor)

recalc0dBFSEstimate(self: _dragonradio.radio.AutoGain, arg0: int) None

Reset the 0dBFS estimate

property soft_tx_gain_0dBFS

Soft TX gain (dBFS)

class dragonradio.radio.Channel
property bw

Bandwidth

property fc

Frequency shift from center

intersects(self: _dragonradio.radio.Channel, arg0: _dragonradio.radio.Channel) bool

Return true if channels intersect, false otherwise

class dragonradio.radio.ChannelSynthesizer
property high_water_mark

Maximum number of modulated samples to queue.

class dragonradio.radio.Channelizer
property channels
property rx_rate
property source
class dragonradio.radio.Channels
append(self: _dragonradio.radio.Channels, x: Tuple[_dragonradio.radio.Channel, List[complex]]) None

Add an item to the end of the list

clear(self: _dragonradio.radio.Channels) None

Clear the contents

count(self: _dragonradio.radio.Channels, x: Tuple[_dragonradio.radio.Channel, List[complex]]) int

Return the number of times x appears in the list

extend(*args, **kwargs)

Overloaded function.

  1. extend(self: _dragonradio.radio.Channels, L: _dragonradio.radio.Channels) -> None

Extend the list by appending all the items in the given list

  1. extend(self: _dragonradio.radio.Channels, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(self: _dragonradio.radio.Channels, i: int, x: Tuple[_dragonradio.radio.Channel, List[complex]]) None

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

  1. pop(self: _dragonradio.radio.Channels) -> Tuple[_dragonradio.radio.Channel, List[complex]]

Remove and return the last item

  1. pop(self: _dragonradio.radio.Channels, i: int) -> Tuple[_dragonradio.radio.Channel, List[complex]]

Remove and return the item at index i

remove(self: _dragonradio.radio.Channels, x: Tuple[_dragonradio.radio.Channel, List[complex]]) None

Remove the first item from the list whose value is x. It is an error if there is no such item.

class dragonradio.radio.Clock
class dragonradio.radio.Config[source]

Radio configuration

addArguments(parser)[source]

Populate an ArgumentParser with arguments corresponding to configuration parameters.

aloha_prob

Probability of transmission in a given slot for ALOHA

arq

Should ARQ be enabled?

arq_ack_delay

Maximum delay before an explicit ACK is sent (sec)

arq_ack_delay_estimation_window

Time window over which to estimate ACK delay (sec)

arq_ack_gain_db

Gain to be applied to ACK packets (dB)

arq_broadcast_gain_db

Gain to be applied to broadcast packets (dB)

arq_decrease_retrans_mcsidx

Decrease MCS index for retransmitted packets with a deadline

arq_enforce_ordering

Should ARQ enforce packet ordering?

arq_explicit_nak_win

Maximum number of NAKs to send during NAK window

arq_explicit_nak_win_duration

Duration of NAK window (sec)

arq_max_retransmissions

Maximum number of times a packet is allowed to be retransmitted

arq_max_sacks

Maximum number of SACKs in a packet

arq_mcu

Maximum number of extra bytes beyond MTU to be used for control information

arq_min_retransmission_delay

Minimum duration of retransmission timer (sec)

arq_move_along

Move the send window along even when it’s full

arq_retransmission_delay

Default duration of retransmission timer (sec)

arq_retransmission_delay_slop

Safety factor for retransmission timer estimator

arq_sack_delay

Maximum time to wait for a regular packet to have a SACK attached (sec)

arq_selective_ack

Send selective ACKs?

arq_selective_ack_feedback_delay

Maximum time to wait before counting a selective NAK as a TX failure

arq_window

ARQ window size

bandwidth

Radio bandwidth to use

channel_bandwidth

Default channel bandwidth for FDMA

clock_noskew

Assume no clock skew relative to master

clock_source

Clock source for the USRP device

clock_sync_period

Period at which clock is synchronized

demod_overlap_size

Size of demodulation overlap if using the overlapping demodulator (seconds)

external_net

IP network for external network

frequency

Radio frequency

guard_size

Size of slot guard interval (seconds)

internal_net

IP network for internal radio network

loadColosseumIni(path)[source]

Load configuration parameters from a colosseum_config.ini file.

loadConfig(path)[source]

Load configuration parameters from a radio.conf file in libconf format.

property log_level

Log level

property logdir

Log directory

mac

Mac

mac_accurate_tx_timestamps

True if MAC should provide more accurate TX timestamps at a potential performance cost

mac_timed_tx_delay

Delay for timed TX

mandate_bonus_phase

Flag indicating whether or not to have a bonus phase

max_bandwidth

Max bandwidth radio can handle

max_performance_age

Performance reports may be from a measurement period no older than this many seconds

mergeConfig(config)[source]

Merge a configuration into this configuration

mtu

“Maximum Transmission Unit

neighbor_discovery_period

Neighbor discovery period at radio startup (sec)

packet_compression

Enable packet compression?

parser()[source]

Create an argument parser and populate it with arguments.

queue

Network queue to use

red_gentle

Gentle RED

red_max_p

RED maximum packet drop probability

red_max_thresh

RED maximum queue threshold

red_min_thresh

RED minimum queue threshold

red_w_q

RED queue weight (for EWMA)

rx_bandwidth

If set, always receive at this bandwidth. Otherwise, calculate receive bandwidth based on RX oversample factor and radio bandwidth.

rx_oversample_factor

Oversample factor on RX

slot_send_lead_time

Lead time needed for slot transmission (seconds)

slot_size

Total slot duration, including guard interval (seconds)

snapshot_duration

Duration of each snapshot (sec)

snapshot_finalize_wait

How long to wait for demodulation to finish after stopping a snapshot (sec)

snapshot_frequency

How often to take a snapshot (sec)

spec_chan_trim_hi

Trim this fraction of the bandwidth from the high edge of channel when predicting

spec_chan_trim_lo

Trim this fraction of the bandwidth from the low edge of channel when predicting

spec_future_period

How far into the future to predict spectrum usage

stats_ignore_window

Ignore flow statistics during this (most recent) time window

superslots

True if slots should be combined into superslots

tail_drop_max_size

Tail drop queue maximum size (bytes)

tap_iface

Tap interface to use

tap_ipaddr

printf-style string specifying node IP address

tap_macaddr

printf-style string specifying node MAC address

time_source

Time source for the USRP device

traffic_iface

Name of Colosseum traffic interface

transmission_delay

Estimated packet transmission delay (seconds)

tx_bandwidth

If set, always transmit at this bandwidth. Otherwise, calculate transmit bandwidth based on TX oversample factor and channel bandwidth.

tx_oversample_factor

Oversample factor on TX

class dragonradio.radio.Controller
property min_channel_bandwidth

Minimum channel bandwidth

property net_in
property net_out
property net_queue
property radio_in
property radio_out
class dragonradio.radio.Demodulator
demodulate(self: _dragonradio.radio.Demodulator, arg0: numpy.ndarray[numpy.complex64]) List[Tuple[Optional[_dragonradio.radio.Header], Optional[bytes]]]

Demodulate a signal

property is_frame_open
reset(self: _dragonradio.radio.Demodulator) None

Reset demodulator state

class dragonradio.radio.DeviceType

Members:

N210

X310

Unknown

N210 = <DeviceType.N210: 0>
Unknown = <DeviceType.Unknown: 2>
X310 = <DeviceType.X310: 1>
property name
property value
class dragonradio.radio.DoubleEstimator
property size

The number of samples used in the estimate

update(self: _dragonradio.radio.DoubleEstimator, arg0: float) None

Update the estimate

property value

The value of the estimator

class dragonradio.radio.DoubleMean
remove(self: _dragonradio.radio.DoubleMean, arg0: float) None

Remove a value used to estimate the mean

reset(self: _dragonradio.radio.DoubleMean, arg0: float) None

Reset the estimate

class dragonradio.radio.DoubleWindowedMean
reset(self: _dragonradio.radio.DoubleWindowedMean) None

Reset the estimate

property window_size

Number of samples in window

class dragonradio.radio.DownsamplerCCC
class dragonradio.radio.DownsamplerCCF
class dragonradio.radio.DummyController
class dragonradio.radio.EventCategory

Members:

SYSTEM

SCHEDULER

NET

TUNTAP

TIMESYNC

AMC

ARQ

MAC

PHY

USRP

AMC = <EventCategory.AMC: 5>
ARQ = <EventCategory.ARQ: 6>
MAC = <EventCategory.MAC: 7>
NET = <EventCategory.NET: 2>
PHY = <EventCategory.PHY: 8>
SCHEDULER = <EventCategory.SCHEDULER: 1>
SYSTEM = <EventCategory.SYSTEM: 0>
TIMESYNC = <EventCategory.TIMESYNC: 4>
TUNTAP = <EventCategory.TUNTAP: 3>
USRP = <EventCategory.USRP: 9>
property name
property value
class dragonradio.radio.ExtendAction(option_strings, *args, **kwargs)[source]

Add a list of values to an argument’s value

class dragonradio.radio.ExtendedHeader
property ack

Sequence number being ACK’ed

property data_len

Length of packet data

property dest

Destination node

property src

Source node

class dragonradio.radio.FDChannelizer
L = 38400
N = 51200
P = 12801
V = 4
class dragonradio.radio.FDMA
property accurate_tx_timestamps

Increase timestamp accuracy at a potential cost to performance

property timed_tx_delay

Delay for timed TX (sec)

class dragonradio.radio.FDSlotSynthesizer
class dragonradio.radio.FDSynthesizer
class dragonradio.radio.FIRCCC
property delay

Return filter delay

property taps

Filter taps

class dragonradio.radio.FIRCCF
property delay

Return filter delay

property taps

Filter taps

class dragonradio.radio.FilterCC
execute(self: _dragonradio.radio.FilterCC, arg0: numpy.ndarray[numpy.complex64]) numpy.ndarray[numpy.complex64]

Execute the filter

groupDelay(self: _dragonradio.radio.FilterCC, arg0: float) float

Return filter group delay of given frequency

reset(self: _dragonradio.radio.FilterCC) None

Reset the filter’s state

class dragonradio.radio.FloatEstimator
property size

The number of samples used in the estimate

update(self: _dragonradio.radio.FloatEstimator, arg0: float) None

Update the estimate

property value

The value of the estimator

class dragonradio.radio.FloatMean
remove(self: _dragonradio.radio.FloatMean, arg0: float) None

Remove a value used to estimate the mean

reset(self: _dragonradio.radio.FloatMean, arg0: float) None

Reset the estimate

class dragonradio.radio.FloatWindowedMean
reset(self: _dragonradio.radio.FloatWindowedMean) None

Reset the estimate

property window_size

Number of samples in window

class dragonradio.radio.FlowPerformance
getSinks(self: _dragonradio.radio.FlowPerformance, arg0: bool) Dict[int, _dragonradio.radio.FlowStats]

Get flow sink statistics

getSources(self: _dragonradio.radio.FlowPerformance, arg0: bool) Dict[int, _dragonradio.radio.FlowStats]

Get flow source statistics

property mandates

Mandates

property mp

Measurement period (sec)

property net_in

Network packet input port

property net_out

Network packet output port

property radio_in

Radio packet input port

property radio_out

Radio packet output port

property start

Match start time in seconds since epoch

class dragonradio.radio.FlowStats
property dest

Flow destinations

property flow_uid

Flow UID

property low_mp

Lowest MP modified

property src

Flow source

property stats

Flow statistics per-measuremnt period

class dragonradio.radio.GPSLocation
property alt

Altitude

property lat

Latitude

property lon

Longitude

property timestamp

Timestamp of last update

class dragonradio.radio.Gain
property dB
property lin
class dragonradio.radio.Header
property curhop

Current hop

property flags

Flag

property nexthop

Next hop

property seq

Packet sequence number

class dragonradio.radio.HeaderFlags
property ack

ACK flag

property compressed

Is packet compressed?

property has_control

Does packet have control information?

property has_seq

Is the packet sequenced?

property syn

SYN flag

property team

Team

class dragonradio.radio.IQBuf
property data

IQ data

property delay

Signal delay

property fc

Sample senter frequency

property fs

Sample rate

property timestamp

IQ buffer timestamp in seconds

class dragonradio.radio.LiquidBaseNCO
class dragonradio.radio.LiquidFIRCCC
property delay

Return filter delay

property taps

Filter taps

class dragonradio.radio.LiquidIIRCCC
class dragonradio.radio.LiquidMSResampCCF
class dragonradio.radio.LiquidNCO
class dragonradio.radio.LiquidVCO
class dragonradio.radio.Load
property end

End of load measurement period (sec)

property nsamples

Load per channel measured in number of samples

property period

Measurement period (sec)

property start

Start of load measurement period (sec)

class dragonradio.radio.LoadConfigAction(option_strings, *args, **kwargs)[source]

Load configuration parameters from a file in libconf format.

class dragonradio.radio.LogLevelAction(option_strings, *args, **kwargs)[source]

Set log level along with verbose and debug flags

class dragonradio.radio.Logger
close(self: _dragonradio.logging.Logger) None
logEvent(self: _dragonradio.logging.Logger, arg0: str) None

Log an event

logSnapshot(self: _dragonradio.logging.Logger, arg0: Snapshot) None

Log a snapshot

property log_arq_events
property log_events
property log_recv_packets
property log_recv_symbols
property log_sent_iq
property log_sent_packets
property log_slots
property log_tx_records
setAttribute(*args, **kwargs)

Overloaded function.

  1. setAttribute(self: _dragonradio.logging.Logger, arg0: str, arg1: str) -> None

  2. setAttribute(self: _dragonradio.logging.Logger, arg0: str, arg1: int) -> None

  3. setAttribute(self: _dragonradio.logging.Logger, arg0: str, arg1: int) -> None

  4. setAttribute(self: _dragonradio.logging.Logger, arg0: str, arg1: float) -> None

singleton = None
class dragonradio.radio.MAC
getLoad(self: _dragonradio.radio.MAC) MAC::Load

Get current load

property min_channel_bandwidth

Minimum channel bandwidth

popLoad(self: _dragonradio.radio.MAC) MAC::Load

Get current load and reset load counters

reconfigure(self: _dragonradio.radio.MAC) None

Force the MAC to reconfigure after PHY parameters, e.g., TX rate, change.

property schedule

MAC schedule specifying on which channels this node may transmit in each schedule slot.

stop(self: _dragonradio.radio.MAC) None

Tell MAC to stop processing packets.

class dragonradio.radio.MCS
property check

Data validity check

property fec0

Inner FEC

property fec1

Outer FEC

property ms

Modulation scheme

class dragonradio.radio.MCSEntry
property autogain

AutoGain for MCS

property mcs

Modulation and coding scheme

property valid

Is this MCS valid?

class dragonradio.radio.MPStats
property nbytes

Number of bytes

property npackets

Number of packets

class dragonradio.radio.MPStatsVector
append(self: List[_dragonradio.radio.MPStats], x: _dragonradio.radio.MPStats) None

Add an item to the end of the list

clear(self: List[_dragonradio.radio.MPStats]) None

Clear the contents

extend(*args, **kwargs)

Overloaded function.

  1. extend(self: List[_dragonradio.radio.MPStats], L: List[_dragonradio.radio.MPStats]) -> None

Extend the list by appending all the items in the given list

  1. extend(self: List[_dragonradio.radio.MPStats], L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(self: List[_dragonradio.radio.MPStats], i: int, x: _dragonradio.radio.MPStats) None

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

  1. pop(self: List[_dragonradio.radio.MPStats]) -> _dragonradio.radio.MPStats

Remove and return the last item

  1. pop(self: List[_dragonradio.radio.MPStats], i: int) -> _dragonradio.radio.MPStats

Remove and return the item at index i

class dragonradio.radio.Mandate
property achieved_duration

Achieved duration

property file_transfer_deadline_s

File transfer delivery deadline (sec)

property flow_uid

Flow UID)

property hold_period

Steady state period required for mandate success (sec)

property mandated_latency

Maximum latency (sec)

property max_latency_s

Maximum latency allowed for a packet (sec)

property min_throughput_bps

Minimum throughput (bps)

property point_value

Point value

property radio_ids

Nodes in flow

property scalar_performance

Scalar performance

class dragonradio.radio.MandateMap
items(self: _dragonradio.radio.MandateMap) Iterator
class dragonradio.radio.MandateQueue
FIFO = <QueueType.FIFO: 0>
LIFO = <QueueType.LIFO: 1>
class QueueType

Members:

FIFO

LIFO

FIFO = <QueueType.FIFO: 0>
LIFO = <QueueType.LIFO: 1>
property name
property value
property bonus_phase

Flag indicating whether or not to have a bonus phase

getFlowQueuePriority(self: _dragonradio.radio.MandateQueue, arg0: int) Tuple[int, float]

Get flow queue’s priority

getFlowQueueType(self: _dragonradio.radio.MandateQueue, arg0: int) MandateQueue<std::shared_ptr<NetPacket> >::QueueType

Get flow queue’s type

property mandates

Mandates

property queue_priorities

Queue priorities

setFlowQueuePriority(self: _dragonradio.radio.MandateQueue, arg0: int, arg1: Tuple[int, float]) None

Set flow queue’s priority

setFlowQueueType(self: _dragonradio.radio.MandateQueue, arg0: int, arg1: MandateQueue<std::shared_ptr<NetPacket> >::QueueType) None

Set flow queue’s type

class dragonradio.radio.MixingRationalResamplerCCC
property bandpass_taps

Prototype bandpass filter taps

resampleMixDown(self: _dragonradio.radio.MixingRationalResamplerCCC, arg0: numpy.ndarray[numpy.complex64]) numpy.ndarray[numpy.complex64]

Resample signal and mix down

resampleMixUp(self: _dragonradio.radio.MixingRationalResamplerCCC, arg0: numpy.ndarray[numpy.complex64]) numpy.ndarray[numpy.complex64]

Mix up and resample signal

property shift

Mixing frequency shift

class dragonradio.radio.ModPacket
property chanidx

Index of channel

property channel

Channel

property nsamples

Number of modulated samples

property offset

Offset of start of packet from beginning of sample buffer

property pkt

The un-modulated packet

property samples

Buffer containing the modulated samples

property start

Offset of start of packet from start of slot, in number of samples

class dragonradio.radio.Modulator
modulate(self: _dragonradio.radio.Modulator, arg0: _dragonradio.radio.Header, arg1: buffer) numpy.ndarray[numpy.complex64]

Modulate a packet

class dragonradio.radio.MonoTimePoint
property frac_secs

Fractional seconds

property full_secs

Full seconds

property secs

Seconds

property wall_time
class dragonradio.radio.MonoTimeWindowEstimator
property end

The end of the time window (sec)

reset(self: _dragonradio.radio.MonoTimeWindowEstimator) None

Reset the estimate

property start

The start of the time window (sec)

property time_window

The time window (sec)

class dragonradio.radio.MonoTimeWindowMax
class dragonradio.radio.MonoTimeWindowMean
class dragonradio.radio.MonoTimeWindowMeanRate
class dragonradio.radio.MonoTimeWindowMin
class dragonradio.radio.MultichannelSynthesizer
class dragonradio.radio.NCO
property frequency

Frequency in radians per sample

mix_down(self: _dragonradio.radio.NCO, arg0: numpy.ndarray[numpy.complex64]) numpy.ndarray[numpy.complex64]

Mix signal down

mix_up(self: _dragonradio.radio.NCO, arg0: numpy.ndarray[numpy.complex64]) numpy.ndarray[numpy.complex64]

Mix signal up

property phase

Phase in radians

reset(self: _dragonradio.radio.NCO, arg0: float) None

Reset NCO state given frequency in radians per sample

class dragonradio.radio.NetFilter
class dragonradio.radio.NetFirewall
property allow_broadcasts

Allow broadcast packets?

property allowed

Set of allowed ports

property enabled

Is the firewall enabled?

class dragonradio.radio.NetInPull
disconnect(self: _dragonradio.radio.NetInPull) None
class dragonradio.radio.NetInPush
disconnect(self: _dragonradio.radio.NetInPush) None
class dragonradio.radio.NetNoop
class dragonradio.radio.NetOutPull
disconnect(self: _dragonradio.radio.NetOutPull) None
class dragonradio.radio.NetOutPush
disconnect(self: _dragonradio.radio.NetOutPush) None
class dragonradio.radio.NetPacket
property deadline

Packet delivery deadline

property g

Multiplicative TX gain

property mcsidx

MCS to use

class dragonradio.radio.NetProcessor
property input
property output
class dragonradio.radio.Node
property can_transmit

Flag indicating whether or not this node can transmit

property g

Soft TX gain (multiplicative)

property id

Node ID

property is_gateway

Flag indicating whether or not this node is the gateway

property loc
property mcsidx

MCS index

property soft_tx_gain

Soft TX gain (dBFS)

property timestamps

Timestamps received from this node

property timestamps_recv

Timestamps received by this node

property timestamps_sent

Timestamps sent by this node

class dragonradio.radio.OverlapTDChannelizer
property cur_demod
property enforce_ordering
property prev_demod
class dragonradio.radio.PHY
getMinRXRateOversample(self: _dragonradio.radio.PHY) int
getMinTXRateOversample(self: _dragonradio.radio.PHY) int
getModulatedSize(self: _dragonradio.radio.PHY, arg0: int, arg1: int) int
log_invalid_headers = False
property mcs_table

Table of modulation and coding schemes

property min_rx_rate_oversample

Minimum oversample rate needed for RX

property min_tx_rate_oversample

Minimum oversample rate needed for TX

mkPacketDemodulator(self: _dragonradio.radio.PHY) PacketDemodulator
mkPacketModulator(self: _dragonradio.radio.PHY) PacketModulator
static mkRadioPacket(arg0: _dragonradio.radio.Header, arg1: Optional[bytes]) _dragonradio.radio.RadioPacket
node_id = 0
property snapshot_collector
team = 0
updateAutoGain(self: _dragonradio.radio.PHY, arg0: _dragonradio.radio.NetPacket, arg1: float, arg2: IQBuf) None
class dragonradio.radio.PMOutput
property Q

convergence parameter value

property delta

The final reference error

property h

Final filter coefficients

property iter

Number of iterations that were necessary to achieve convergence

property x

Reference set used to generate the final filter

class dragonradio.radio.Packet
property ehdr

Extended header

property flow_uid

Flow UID

property hdr

Packet header

property internal_flags

Internal flags

property payload

Payload

property payload_size

Payload size

property timestamp

Packet timestamp

class dragonradio.radio.PacketCompressor
property enabled

Is packet compression enabled?

property net_in

Network packet input port

property net_out

Network packet output port

property radio_in

Radio packet input port

property radio_out

Radio packet output port

class dragonradio.radio.PacketDemodulator
demodulate(self: _dragonradio.radio.PacketDemodulator, arg0: complex, arg1: int) None
isFrameOpen(self: _dragonradio.radio.PacketDemodulator) bool
reset(self: _dragonradio.radio.PacketDemodulator, arg0: Channel) None
timestamp(self: _dragonradio.radio.PacketDemodulator, arg0: _dragonradio.radio.MonoTimePoint, arg1: Optional[int], arg2: int, arg3: int, arg4: float, arg5: float) None
class dragonradio.radio.PacketInternalFlags
property assigned_seq

Set if packet has been assigned a sequence number

property has_selective_ack

Set if packet contains a selective ACK

property invalid_header

Is header invalid?

property invalid_payload

Is payload invalid?

property retransmission

Is this a retransmission?

class dragonradio.radio.PacketModulator
modulate(self: _dragonradio.radio.PacketModulator, arg0: _dragonradio.radio.NetPacket, arg1: float, arg2: _dragonradio.radio.ModPacket) None
class dragonradio.radio.PfbCCC
property channel_taps

Per-channel taps (reversed)

property nchannels

Number of channels

property taps

Prototype filter taps

class dragonradio.radio.PfbCCF
property channel_taps

Per-channel taps (reversed)

property nchannels

Number of channels

property taps

Prototype filter taps

class dragonradio.radio.Queue
property pop
property push
property transmission_delay

Transmission delay (sec)

class dragonradio.radio.REDQueue
property gentle

Be gentle?

property max_p

Maximum packet drop probability

property max_thresh

Maximum threshold (bytes)

property min_thresh

Minimum threshold (bytes)

property w_q

Queue weight (for EWMA)

class dragonradio.radio.Radio(config, mac, loop=None)[source]

Radio configuration, setup, and maintenance

async _stop()[source]

Task to stop the radio and all associated tasks

property bandwidth

Bandwidth

channels

Channels

config

Config object for radio

configureALOHA()[source]

Configure ALOHA MAC

configureComponents()[source]

Hook up all the radio components

configureDefaultChannels()[source]

Configure default channels

configureFDMA()[source]

Configures a FDMA MAC.

configureLogging()[source]

Configure radio logging

configureMAC(mac)[source]

Configure MAC

configureSimpleMACSchedule(fdma_mac=False)[source]

Set a simple static schedule.

configureSnapshots()[source]

Configure snapshots

configureTDMA(nslots)[source]

Configures a TDMA MAC with ‘nslots’ slots.

This function sets up a TDMA MAC for a schedule with nslots slots, but it does not claim any of the slots. After calling this function, the node will not transmit until it is given a slot.

Parameters

nslots – The number of slots in the schedule

configureUSRP()[source]

Construct USRP object from configuration parameters

configureValidDecimationRates()[source]

Determine valid decimation and interpolation rates

deleteMAC()[source]

Delete the current MAC

environmentDiscontinuity()[source]
property evm_thresholds

EVM thresholds for each MCS

finishConfiguringMAC()[source]

Finish configuring MAC

property frequency

Center frequency

genChannelizerTaps(channel)[source]

Generate channelizer filter taps for given channel

genSynthesizerTaps(channel)[source]

Generate synthesizer filter taps for given channel

getRadioLogPath()[source]

Determine where the HDF5 log file created by the low-level radio will live.

property header_mcs

Header MCS

installALOHASchedule()[source]

Install a schedule for an ALOHA MAC.

This installs a schedule with one slot per channel. If we are not resampling on TX, it installs a schedule with one slot.

installMACSchedule(sched, fdma_mac=False)[source]

Install a MAC schedule.

Parameters
  • sched – The schedule, which is a nchannels X nslots array of node IDs.

  • fdma_mac – If True, use the FDMA MAC

lock

Lock protecting radio configuration

logger

Our DragonRadio logger

mac

The radio’s MAC

mac_schedule

Our MAC schedule

property mcs_table

MCS table

mkAutoGain()[source]

Construct an AutoGain object according to configuration parameters

mkChannelizer()[source]

Construct a Channelizer according to configuration parameters

mkController(evm_thresholds)[source]

Construct a Controller according to configuration parameters

mkNetQueue()[source]

Construct a network queue according to configuration parameters

mkPHY(header_mcs, mcs_table)[source]

Construct a PHY from configuration parameters

mkSynthesizer(slotted)[source]

Construct a Synthesizer according to configuration parameters

node_id

This node’s ID

reconfigureBandwidthAndFrequency(bandwidth, frequency)[source]

Reconfigure the radio for the given bandwidth and frequency

replaceSynthesizer(slotted)[source]

Replace the synthesizer

rx_rate

Current RX rate. None if not yet set.

setALOHAChannel(channel_idx)[source]

Set the transmission channel for the ALOHA MAC.

setChannelizerChannels(channels)[source]

Set channelizer’s channels.

setChannels(channels)[source]

Set current channels.

This function will configure the necessary RX and TX rates and initialize the synthesizer and channelizer.

setRXChannels(channels)[source]

Configure RX chain for channels

setRXRate(rate)[source]

Set RX rate

setSynthesizerChannels(channels)[source]

Set synthesizer’s channels.

setTXChannel(channel_idx)[source]

Set the transmission channel.

If we are upsampling on TX, this is a no-op. Otherwise we configure the radio’s frequency and bandwidth and synthesizer for the new, single channel.

setTXChannels(channels)[source]

Configure TX chain for channels

setTXRate(rate)[source]

Set TX rate

async snapshotTask()[source]

Snapshot logging task

start(user_ns={'__classcell__': <cell at 0x7f3732eb69d0: type object>, '__del__': <function Radio.__del__>, '__doc__': 'Radio configuration, setup, and maintenance', '__init__': <function Radio.__init__>, '__module__': 'dragonradio.radio.radio', '__qualname__': 'Radio', '_stop': <function Radio._stop>, 'bandwidth': <property object>, 'configureALOHA': <function Radio.configureALOHA>, 'configureComponents': <function Radio.configureComponents>, 'configureDefaultChannels': <function Radio.configureDefaultChannels>, 'configureFDMA': <function Radio.configureFDMA>, 'configureLogging': <function Radio.configureLogging>, 'configureMAC': <function Radio.configureMAC>, 'configureSimpleMACSchedule': <function Radio.configureSimpleMACSchedule>, 'configureSnapshots': <function Radio.configureSnapshots>, 'configureTDMA': <function Radio.configureTDMA>, 'configureUSRP': <function Radio.configureUSRP>, 'configureValidDecimationRates': <function Radio.configureValidDecimationRates>, 'deleteMAC': <function Radio.deleteMAC>, 'environmentDiscontinuity': <function Radio.environmentDiscontinuity>, 'evm_thresholds': <property object>, 'finishConfiguringMAC': <function Radio.finishConfiguringMAC>, 'frequency': <property object>, 'genChannelizerTaps': <function Radio.genChannelizerTaps>, 'genSynthesizerTaps': <function Radio.genSynthesizerTaps>, 'getRadioLogPath': <function Radio.getRadioLogPath>, 'header_mcs': <property object>, 'installALOHASchedule': <function Radio.installALOHASchedule>, 'installMACSchedule': <function Radio.installMACSchedule>, 'mcs_table': <property object>, 'mkAutoGain': <function Radio.mkAutoGain>, 'mkChannelizer': <function Radio.mkChannelizer>, 'mkController': <function Radio.mkController>, 'mkNetQueue': <function Radio.mkNetQueue>, 'mkPHY': <function Radio.mkPHY>, 'mkSynthesizer': <function Radio.mkSynthesizer>, 'reconfigureBandwidthAndFrequency': <function Radio.reconfigureBandwidthAndFrequency>, 'replaceSynthesizer': <function Radio.replaceSynthesizer>, 'setALOHAChannel': <function Radio.setALOHAChannel>, 'setChannelizerChannels': <function Radio.setChannelizerChannels>, 'setChannels': <function Radio.setChannels>, 'setRXChannels': <function Radio.setRXChannels>, 'setRXRate': <function Radio.setRXRate>, 'setSynthesizerChannels': <function Radio.setSynthesizerChannels>, 'setTXChannel': <function Radio.setTXChannel>, 'setTXChannels': <function Radio.setTXChannels>, 'setTXRate': <function Radio.setTXRate>, 'snapshotTask': <function Radio.snapshotTask>, 'start': <function Radio.start>, 'startSnapshots': <function Radio.startSnapshots>, 'stop': <function Radio.stop>, 'synchronizeClock': <function Radio.synchronizeClock>, 'validRate': <function Radio.validRate>})[source]

Start the radio

startSnapshots()[source]

Start the snapshot logger

stop()[source]

Stop the radio and all associated tasks

synchronizeClock()[source]

Use timestamps to synchronize our clock with the time master (the gateway)

tx_channel_idx

Default TX channel index

tx_rate

Current TX rate. None if not yet set.

validRate(min_rate, clock_rate)[source]

Find a valid rate no less than min_rate given the clock rate clock_rate.

Parameters
  • min_rate – The minimum desired rate

  • clock_rate – The radio clock rate

Returns

A rate no less than rate min_rate that is supported by the hardware

class dragonradio.radio.RadioFirewall
property allow_broadcasts

Allow broadcast packets?

property allowed

Set of allowed ports

property enabled

Is the firewall enabled?

class dragonradio.radio.RadioInPull
disconnect(self: _dragonradio.radio.RadioInPull) None
class dragonradio.radio.RadioInPush
disconnect(self: _dragonradio.radio.RadioInPush) None
class dragonradio.radio.RadioNet
addNode(self: _dragonradio.radio.RadioNet, arg0: int) _dragonradio.radio.Node
getNode(self: _dragonradio.radio.RadioNet, arg0: int) _dragonradio.radio.Node
property new_node_callback
property nodes

Nodes in the network

property this_node
property this_node_id
property time_master
class dragonradio.radio.RadioNoop
class dragonradio.radio.RadioOutPull
disconnect(self: _dragonradio.radio.RadioOutPull) None
class dragonradio.radio.RadioOutPush
disconnect(self: _dragonradio.radio.RadioOutPush) None
class dragonradio.radio.RadioPacket
property cfo

CFO

property channel

Channel

property evm

EVM

property rssi

RSSI

class dragonradio.radio.RadioProcessor
property input
property output
class dragonradio.radio.RationalResamplerCCC
property down_rate

Downsample rate

property up_rate

Upsample rate

class dragonradio.radio.RationalResamplerCCF
property down_rate

Downsample rate

property up_rate

Upsample rate

class dragonradio.radio.ReceiveWindow
property long_evm

Long-term EVM (dB)

property long_rssi

Long-term RSSI (dB)

property short_evm

Short-term EVM (dB)

property short_rssi

Short-term RSSI (dB)

class dragonradio.radio.ReceiveWindows
class dragonradio.radio.ResamplerCC
property delay

Resampling delay

property rate

Resampling rate

resample(self: _dragonradio.radio.ResamplerCC, arg0: numpy.ndarray[numpy.complex64]) numpy.ndarray[numpy.complex64]

Resample signal

reset(self: _dragonradio.radio.ResamplerCC) None

Reset resampler state

class dragonradio.radio.Score
property achieved_duration

Number of consecutive MP’s in which goal has been met

property goal

Was goal met in MP?

property goal_stable

Was goal stable in MP?

property mp_score

Score for this MP

property nbytes_recv

Number of bytes sent

property nbytes_sent

Number of bytes sent

property npackets_recv

Number of packets sent

property npackets_sent

Number of packets sent

property update_timestamp_recv

Timestamp of last update for receive statistics

property update_timestamp_sent

Timestamp of last update for send statistics

class dragonradio.radio.ScoreMap
items(self: Dict[int, _dragonradio.radio.Scores]) Iterator
class dragonradio.radio.Scorer
property scores

Scores

setMandates(self: _dragonradio.radio.Scorer, arg0: _dragonradio.radio.MandateMap) None

Set mandates

updateReceivedStatistics(self: _dragonradio.radio.Scorer, arg0: int, arg1: float, arg2: int, arg3: List[int], arg4: List[int]) None

Update statistics for received data

updateScore(self: _dragonradio.radio.Scorer, arg0: int) None

Update scores up to given MP

updateSentStatistics(self: _dragonradio.radio.Scorer, arg0: int, arg1: float, arg2: int, arg3: List[int], arg4: List[int]) None

Update statistics for sent data

class dragonradio.radio.Scores
append(self: _dragonradio.radio.Scores, x: _dragonradio.radio.Score) None

Add an item to the end of the list

clear(self: _dragonradio.radio.Scores) None

Clear the contents

extend(*args, **kwargs)

Overloaded function.

  1. extend(self: _dragonradio.radio.Scores, L: _dragonradio.radio.Scores) -> None

Extend the list by appending all the items in the given list

  1. extend(self: _dragonradio.radio.Scores, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(self: _dragonradio.radio.Scores, i: int, x: _dragonradio.radio.Score) None

Insert an item at a given position.

property invalid_mp

First invalid MP

pop(*args, **kwargs)

Overloaded function.

  1. pop(self: _dragonradio.radio.Scores) -> _dragonradio.radio.Score

Remove and return the last item

  1. pop(self: _dragonradio.radio.Scores, i: int) -> _dragonradio.radio.Score

Remove and return the item at index i

class dragonradio.radio.SelfTX
property end

Snapshot sample offset of end of packet

property fc

Center frequency of packet

property fs

Sample frequency of packet

property start

Snapshot sample offset of start of packet

class dragonradio.radio.SendWindow
property long_evm

Long-term EVM (dB)

property long_per

Long-term packet error rate (unitless)

property long_rssi

Long-term RSSI (dB)

property short_evm

Short-term EVM (dB)

property short_per

Short-term packet error rate (unitless)

property short_rssi

Short-term RSSI (dB)

class dragonradio.radio.SendWindows
class dragonradio.radio.SimpleQueue
FIFO = <QueueType.FIFO: 0>
LIFO = <QueueType.LIFO: 1>
class QueueType

Members:

FIFO

LIFO

FIFO = <QueueType.FIFO: 0>
LIFO = <QueueType.LIFO: 1>
property name
property value
class dragonradio.radio.SizedQueue
property hi_priority_flows

High-priority flows?

class dragonradio.radio.SlotSynthesizer
property superslots

Flag indicating whether or not to use superslots.

class dragonradio.radio.SlottedALOHA
property p

Probability of transmission in a given slot

property slotidx

Slot index to transmit in

class dragonradio.radio.SlottedMAC
property guard_size

Guard size (sec)

property slot_send_lead_time

Slot send lead time (sec)

property slot_size

Slot size (sec)

class dragonradio.radio.SmartController
property ack_delay

ACK delay (sec)

property ack_delay_estimation_window

ACK delay estimation window (sec)

property ack_gain
broadcastHello(self: _dragonradio.radio.SmartController) None
property broadcast_gain
property decrease_retrans_mcsidx

Should we decrease the MCS index of retransmitted packets with a deadline?

property demod_always_ordered
property enforce_ordering
environmentDiscontinuity(self: _dragonradio.radio.SmartController) None

Inform the controller that an environmental discontinuity has ocurred

property explicit_nak_window

Explicit NAK window size

property explicit_nak_window_duration

Explicit NAK window duration

property long_per_window

Time window used to calculate long-term PE

property long_stats_window

Time window used to calculate long-term statistics, e.g., EVM and RSSI

property max_retransmissions
property max_sacks

Maximum number of SACKs in a packet

property mcs_fast_adjustment_period

MCS fast adjustment period after environmnet discontinuity

property mcsidx_ack

ACK MCS index

property mcsidx_alpha

MCS index learning alpha

property mcsidx_broadcast

Broadcast MCS index

property mcsidx_down_per_threshold

PER threshold for decreasing modulation level

property mcsidx_init

Initial MCS index

property mcsidx_max

Maximum MCS index

property mcsidx_min

Minimum MCS index

property mcsidx_prob_floor

MCS transition probability floor

property mcsidx_up_per_threshold

PER threshold for increasing modulation level

property mcu

Maximum number of extra control bytes beyond MTU

property min_retransmission_delay

Minimum retransmission delay (sec)

property move_along

Should we always move the send window along even if it’s full?

property recv

Receive windows

property retransmission_delay

Retransmission delay (sec)

property retransmission_delay_slop

Retransmission delay safety factor

property sack_delay

SACK delay (sec)

property selective_ack

Send selective ACK’s?

property selective_ack_feedback_delay

Selective ACK feedback delay (sec)

property send

Send windows

property short_per_window

Time window used to calculate short-term PER

property short_stats_window

Time window used to calculate long-term statistics, e.g., EVM and RSSI

class dragonradio.radio.Snapshot
property combined_slots

Combined IQ data for all slots in snapshot

property selftx

Self-transmission events

property slots

Slots in snapshot (IQ data)

property timestamp

Snapshot timestamp

class dragonradio.radio.SnapshotCollector
property active

Is snapshot collection active?

finalize(self: _dragonradio.radio.SnapshotCollector) _dragonradio.radio.Snapshot

Finalize snapshot collection, returning the collected snapshot

next(self: _dragonradio.radio.SnapshotCollector) _dragonradio.radio.Snapshot

Get current snapshot and start a new snapshot immediately

start(self: _dragonradio.radio.SnapshotCollector) None

Start snapshot collection

stop(self: _dragonradio.radio.SnapshotCollector) None

Stop snapshot collection

class dragonradio.radio.Synthesizer
property channels

TX channels

property schedule

MAC schedule

property sink
property tx_rate
class dragonradio.radio.TDChannelizer
class dragonradio.radio.TDMA
property nslots

The number of TDMA slots.

class dragonradio.radio.TDSlotSynthesizer
class dragonradio.radio.TDSynthesizer
class dragonradio.radio.TableNCO
class dragonradio.radio.TailDropQueue
property max_size

Maximum queue size (bytes)

class dragonradio.radio.TunTap
property mtu
property sink
property source
class dragonradio.radio.USRP
property auto_dc_offset
property clock_rate
property clock_source
property clock_sources
property device_type
getClockSource(self: _dragonradio.radio.USRP, arg0: int) str
getTimeSource(self: _dragonradio.radio.USRP, arg0: int) str
property rx_frequency
property rx_gain
property rx_max_samps
property rx_max_samps_factor
property rx_rate
setClockSource(self: _dragonradio.radio.USRP, arg0: str, arg1: int) None
setTimeSource(self: _dragonradio.radio.USRP, arg0: str, arg1: int) None
property time_source
property time_sources
property tx_frequency
property tx_gain
property tx_max_samps
property tx_max_samps_factor
property tx_rate
class dragonradio.radio.UpsamplerCCC
class dragonradio.radio.UpsamplerCCF
class dragonradio.radio.WallClock
property offset
property skew
property t0
class dragonradio.radio.WallTimePoint
property frac_secs

Fractional seconds

property full_secs

Full seconds

property mono_time
property secs

Seconds

class dragonradio.radio.WallTimeWindowEstimator
property end

The end of the time window (sec)

reset(self: _dragonradio.radio.WallTimeWindowEstimator) None

Reset the estimate

property start

The start of the time window (sec)

property time_window

The time window (sec)

class dragonradio.radio.WallTimeWindowMax
class dragonradio.radio.WallTimeWindowMean
class dragonradio.radio.WallTimeWindowMeanRate
class dragonradio.radio.WallTimeWindowMin
class dragonradio.radio.WindowC
add(self: _dragonradio.radio.WindowC, arg0: complex) None

Add element to window

reset(self: _dragonradio.radio.WindowC) None

Reset window

resize(self: _dragonradio.radio.WindowC, arg0: int) None

Resize window

property size

Window size

property window

Get values in the window

class dragonradio.radio.WorkQueue
addThreads(self: _dragonradio.radio.WorkQueue, arg0: int) None

Add workers

dragonradio.radio.butter_lowpass(arg0: int, arg1: float, arg2: float, arg3: float, arg4: float) Tuple[List[float], List[float]]
dragonradio.radio.compressIQData(arg0: numpy.ndarray[numpy.complex64]) bytes

compress fc32 samples

dragonradio.radio.convert2fc32(arg0: numpy.ndarray[numpy.int16]) numpy.ndarray[numpy.complex64]

convert sc16 buffer to a fc32 buffer

dragonradio.radio.convert2sc16(arg0: numpy.ndarray[numpy.complex64]) numpy.ndarray[numpy.int16]

convert fc32 buffer to a sc16 buffer

dragonradio.radio.decompressIQData(arg0: numpy.ndarray[numpy.int8]) numpy.ndarray[numpy.complex64]

decompress fc32 samples

dragonradio.radio.firpm(numtaps: int, bands: List[float], desired: List[float], w: List[float], fs: float = 2.0, epsT: float = 0.01, Nmax: int = 4) _dragonradio.radio.PMOutput

Use the Remez exchange algorithm to design an equiripple filter

dragonradio.radio.firpm1f(numtaps: int, bands: List[float], desired: List[float], w: List[float], fs: float = 2.0, epsT: float = 0.01, Nmax: int = 4) _dragonradio.radio.PMOutput

Use the Remez exchange algorithm to design a filter with 1/f rolloff

dragonradio.radio.firpm1f2(numtaps: int, bands: List[float], desired: List[float], w: List[float], fs: float = 2.0, epsT: float = 0.01, Nmax: int = 4) _dragonradio.radio.PMOutput

Use the Remez exchange algorithm to design a filter with 1/f^2 rolloff

dragonradio.radio.getNodeIdFromHostname()[source]

Determine node ID from hostname

dragonradio.radio.kaiser(arg0: int, arg1: float, arg2: float) List[float]
dragonradio.radio.parks_mcclellan(arg0: int, arg1: float, arg2: float) List[float]
dragonradio.radio.parser()[source]

Return the default configuration parser.

dragonradio.radio.pformat(object, indent=1, width=80, depth=None, *, compact=False, sort_dicts=True)[source]

Format a Python object into a pretty-printed representation.

dragonradio.radio.setLogLevel(arg0: _dragonradio.logging.EventCategory, arg1: int) None

Set log level

dragonradio.radio.setPrintLogLevel(arg0: _dragonradio.logging.EventCategory, arg1: int) None

Set printing log level

MAC schedule construction

dragonradio.schedule.bestScheduleChannel(sched, node_id)[source]

Choose the best single channel for the given node to use from the schedule.

If the schedule allows the given node to transmit on multiple channels, pick the channel with the most air time.

Parameters
  • sched – A schedule

  • node_id – A node

Returns

The best channel to transmit on

dragonradio.schedule.fairMACSchedule(nchannels, nslots, nodes, k=3, assignments={})[source]

Create a schedule that distributes slots evenly amongst nodes.

Parameters
  • nchannels (int) – The number of channels

  • nslots (int) – The number of time slots

  • nodes (List[int]) – The nodes

  • k (int, optional) – The desired channel separation. Defaults to 3.

  • assignments (Dict[int, int], optional) – Map from nodes to assigned channels. Defaults to {}.

Returns

A schedule consisting of a nchannels X nslots array of node IDs.

Return type

[type]

dragonradio.schedule.fullChannelMACSchedule(nchannels, nslots, nodes, k)[source]

Create a greedy schedule that gives each node its own channel.

Parameters
  • nchannels – The number of channels

  • nslots – The number of time slots

  • nodes – The nodes

  • k – The desired channel separation

Returns

A schedule consisting of a nchannels X nslots array of node IDs.

dragonradio.schedule.pureTDMASchedule(nodes)[source]

Create a pure TDMA schedule that gives each node a single slot.

Parameters

nodes – The nodes

Returns

A schedule consisting of a 1 X nslots array of node IDs.

Filter design

dragonradio.signal.bellangerord(delta1, delta2, fs, deltaf)[source]

Estimate filter order.

Uses equation (5.32) from Bellanger to estimate filter order.

Parameters
  • delta1 – Passband ripple

  • delta2 – Stopband ripple

  • fs – Sample rate

  • deltaf – transition bandwidth

Returns

Filter order

dragonradio.signal.firpm1f(N, wp, ws, fs)[source]

Use firpm library to calculate minimax optimal low-pass filter with $1/f$ rolloff.

Parameters
  • N – number of taps

  • wp – Passband frequency

  • ws – Stopband frequency

  • fs – Sample rate

Returns

Filter taps.

dragonradio.signal.firpm1f2(N, wp, ws, fs)[source]

Use firpm library to calculate minimax optimal low-pass filter with $1/{f^2}$ rolloff.

Parameters
  • N – number of taps

  • wp – Passband frequency

  • ws – Stopband frequency

  • fs – Sample rate

Returns

Filter taps.

dragonradio.signal.lowpass(wp, ws, fs, ftype='kaiser', atten=60, Nmax=301)[source]

Calculate a low-pass filter, estimating the number of taps needed.

Parameters
  • wp – Passband frequency

  • ws – Stopband frequency

  • ftype – Type of filter. One of ‘kaiser’, ‘firpm1f’, or ‘firpm1f2’

  • atten – desired attenuation (dB)

  • Nmax – Maximum number of taps

Returns

Filter taps.

dragonradio.signal.lowpassIter(wp, ws, fs, f, atten=90, n_max=400)[source]

Design a lowpass filter using f by iterating to minimize the number of taps needed.

Parameters
  • wp – Passband frequency

  • ws – Stopband frequency

  • fs – Sample rate

  • f – Function to design filter

  • atten – desired attenuation (dB)

  • n_max – Maximum semi-length of filter

Returns

Filter taps.

dragonradio.signal.remez1f(numtaps, bands, desired, weight=None, Hz=None, ftype='bandpass', maxiter=25, grid_density=16, fs=None)[source]

Calculate the minimax optimal filter using the Remez exchange algorithm, but with $1/f$ rolloff.

See:

https://dsp.stackexchange.com/questions/37709/convert-a-park-mcclellan-fir-solution-to-achieve-stop-band-roll-off