Python

class dragonradio.AutoGain

Bases: pybind11_builtins.pybind11_object

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.AutoGain, arg0: int) → None

Reset the 0dBFS estimate

property soft_tx_gain_0dBFS

Soft TX gain (dBFS)

class dragonradio.Channel

Bases: pybind11_builtins.pybind11_object

property bw

Bandwidth

property fc

Frequency shift from center

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

Return true if channels intersect, false otherwise

class dragonradio.ChannelSynthesizer

Bases: _dragonradio.Synthesizer

property high_water_mark

Maximum number of modulated samples to queue.

class dragonradio.Channelizer

Bases: pybind11_builtins.pybind11_object

property channels
property rx_rate
property source
class dragonradio.Channels

Bases: pybind11_builtins.pybind11_object

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

Add an item to the end of the list

clear(self: _dragonradio.Channels) → None

Clear the contents

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

Return the number of times x appears in the list

extend(*args, **kwargs)

Overloaded function.

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

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

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

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

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

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

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

Remove and return the last item

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

Remove and return the item at index i

remove(self: _dragonradio.Channels, x: Tuple[_dragonradio.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.Clock

Bases: pybind11_builtins.pybind11_object

property offset
property skew
property t0
class dragonradio.Controller

Bases: pybind11_builtins.pybind11_object

property min_channel_bandwidth

Minimum channel bandwidth

property net_in
property net_out
property net_queue
property radio_in
property radio_out
class dragonradio.Demodulator

Bases: pybind11_builtins.pybind11_object

demodulate(self: _dragonradio.Demodulator, arg0: numpy.ndarray[complex64]) → List[Tuple[Optional[_dragonradio.Header], Optional[bytes]]]

Demodulate a signal

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

Reset demodulator state

class dragonradio.DeviceType

Bases: pybind11_builtins.pybind11_object

Members:

N210

X310

Unknown

N210 = DeviceType.N210
Unknown = DeviceType.Unknown
X310 = DeviceType.X310
__entries = {'N210': (DeviceType.N210, None), 'Unknown': (DeviceType.Unknown, None), 'X310': (DeviceType.X310, None)}
property name

handle) -> str

Type

(self

class dragonradio.DoubleEstimator

Bases: pybind11_builtins.pybind11_object

property nsamples

The number of samples used in the estimate

reset(self: _dragonradio.DoubleEstimator, arg0: float) → None

Reset the estimate

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

Update the estimate

property value

The value of the estimator

class dragonradio.DoubleMean

Bases: _dragonradio.DoubleEstimator

remove(self: _dragonradio.DoubleMean, arg0: float) → None

Remove a value used to estimate the mean

class dragonradio.DoubleWindowedMean

Bases: _dragonradio.DoubleEstimator

property window_size

Number of samples in window

class dragonradio.DownsamplerCCC

Bases: _dragonradio.PfbCCC, _dragonradio.ResamplerCC

class dragonradio.DownsamplerCCF

Bases: _dragonradio.PfbCCF, _dragonradio.ResamplerCC

class dragonradio.DummyController

Bases: _dragonradio.Controller

class dragonradio.ExtendedHeader

Bases: pybind11_builtins.pybind11_object

property ack

Sequence number being ACK’ed

property data_len

Length of packet data

property dest

Destination node

property src

Source node

class dragonradio.FDChannelizer

Bases: _dragonradio.Channelizer

L = 38400
N = 51200
P = 12801
V = 4
class dragonradio.FDMA

Bases: _dragonradio.MAC

class dragonradio.FDSlotSynthesizer

Bases: _dragonradio.SlotSynthesizer

class dragonradio.FDSynthesizer

Bases: _dragonradio.ChannelSynthesizer

class dragonradio.FIRCCC

Bases: _dragonradio.FilterCC

property delay

Return filter delay

property taps

Filter taps

class dragonradio.FIRCCF

Bases: _dragonradio.FilterCC

property delay

Return filter delay

property taps

Filter taps

class dragonradio.FilterCC

Bases: pybind11_builtins.pybind11_object

execute(self: _dragonradio.FilterCC, arg0: numpy.ndarray[complex64]) → numpy.ndarray[complex64]

Execute the filter

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

Return filter group delay of given frequency

reset(self: _dragonradio.FilterCC) → None

Reset the filter’s state

class dragonradio.FloatEstimator

Bases: pybind11_builtins.pybind11_object

property nsamples

The number of samples used in the estimate

reset(self: _dragonradio.FloatEstimator, arg0: float) → None

Reset the estimate

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

Update the estimate

property value

The value of the estimator

class dragonradio.FloatMean

Bases: _dragonradio.FloatEstimator

remove(self: _dragonradio.FloatMean, arg0: float) → None

Remove a value used to estimate the mean

class dragonradio.FloatWindowedMean

Bases: _dragonradio.FloatEstimator

property window_size

Number of samples in window

class dragonradio.FlowPerformance

Bases: pybind11_builtins.pybind11_object

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

Get flow sink statistics

getSources(self: _dragonradio.FlowPerformance, arg0: bool) → Dict[int, _dragonradio.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.FlowStats

Bases: pybind11_builtins.pybind11_object

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.Gain

Bases: pybind11_builtins.pybind11_object

property dB
property lin
class dragonradio.Header

Bases: pybind11_builtins.pybind11_object

property curhop

Current hop

property flags

Flag

property nexthop

Next hop

property seq

Packet sequence number

class dragonradio.HeaderFlags

Bases: pybind11_builtins.pybind11_object

property ack

ACK flag

property compressed

Is packet compressed?

property has_control

Does packet have control information?

property has_data

Does packet have data?

property syn

SYN flag

class dragonradio.IQBuf

Bases: pybind11_builtins.pybind11_object

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.LiquidBaseNCO

Bases: _dragonradio.NCO

class dragonradio.LiquidFIRCCC

Bases: _dragonradio.FilterCC

property delay

Return filter delay

property taps

Filter taps

class dragonradio.LiquidIIRCCC

Bases: _dragonradio.FilterCC

class dragonradio.LiquidMSResampCCF

Bases: _dragonradio.ResamplerCC

class dragonradio.LiquidNCO

Bases: _dragonradio.LiquidBaseNCO

class dragonradio.LiquidVCO

Bases: _dragonradio.LiquidBaseNCO

class dragonradio.Load

Bases: pybind11_builtins.pybind11_object

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.Logger

Bases: pybind11_builtins.pybind11_object

close(self: _dragonradio.Logger) → None
logEvent(self: _dragonradio.Logger, arg0: str) → None

Log an event

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

Log a snapshot

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

Overloaded function.

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

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

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

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

singleton = None
class dragonradio.MAC

Bases: pybind11_builtins.pybind11_object

getLoad(self: _dragonradio.MAC) → MAC::Load

Get current load

property min_channel_bandwidth

Minimum channel bandwidth

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

Get current load and reset load counters

reconfigure(self: _dragonradio.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.MAC) → None

Tell MAC to stop processing packets.

class dragonradio.MCS

Bases: pybind11_builtins.pybind11_object

property rate

Approximate rate (bps)

class dragonradio.MCSEntry

Bases: pybind11_builtins.pybind11_object

property autogain

AutoGain for MCS

property mcs

Modulation and coding scheme

property valid

Is this MCS valid?

class dragonradio.MPStats

Bases: pybind11_builtins.pybind11_object

property nbytes

Number of bytes

property npackets

Number of packets

class dragonradio.MPStatsVector

Bases: pybind11_builtins.pybind11_object

append(self: List[_dragonradio.MPStats], x: _dragonradio.MPStats) → None

Add an item to the end of the list

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

Clear the contents

extend(*args, **kwargs)

Overloaded function.

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

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

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

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

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

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

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

Remove and return the last item

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

Remove and return the item at index i

class dragonradio.Mandate

Bases: pybind11_builtins.pybind11_object

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.MandateMap

Bases: pybind11_builtins.pybind11_object

items(self: _dragonradio.MandateMap) → iterator
class dragonradio.MandateQueue

Bases: _dragonradio.Queue

FIFO = QueueType.FIFO
LIFO = QueueType.LIFO
class QueueType

Bases: pybind11_builtins.pybind11_object

Members:

FIFO

LIFO

FIFO = QueueType.FIFO
LIFO = QueueType.LIFO
__entries = {'FIFO': (QueueType.FIFO, None), 'LIFO': (QueueType.LIFO, None)}
property name

handle) -> str

Type

(self

property bonus_phase

Flag indicating whether or not to have a bonus phase

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

Get flow queue’s priority

getFlowQueueType(self: _dragonradio.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.MandateQueue, arg0: int, arg1: Tuple[int, float]) → None

Set flow queue’s priority

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

Set flow queue’s type

class dragonradio.MixingRationalResamplerCCC

Bases: _dragonradio.RationalResamplerCCC

property bandpass_taps

Prototype bandpass filter taps

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

Resample signal and mix down

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

Mix up and resample signal

property shift

Mixing frequency shift

class dragonradio.ModPacket

Bases: pybind11_builtins.pybind11_object

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.Modulator

Bases: pybind11_builtins.pybind11_object

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

Modulate a packet

class dragonradio.MonoTimePoint

Bases: pybind11_builtins.pybind11_object

property frac_secs

Fractional seconds

property full_secs

Full seconds

property secs

Seconds

property wall_time
class dragonradio.MonoTimeWindowEstimator

Bases: _dragonradio.DoubleEstimator

property end

The end of the time window (sec)

property start

The start of the time window (sec)

property time_window

The time window (sec)

class dragonradio.MonoTimeWindowMax

Bases: _dragonradio.MonoTimeWindowEstimator

class dragonradio.MonoTimeWindowMean

Bases: _dragonradio.MonoTimeWindowEstimator

class dragonradio.MonoTimeWindowMeanRate

Bases: _dragonradio.MonoTimeWindowMean

class dragonradio.MonoTimeWindowMin

Bases: _dragonradio.MonoTimeWindowEstimator

class dragonradio.MultichannelSynthesizer

Bases: _dragonradio.SlotSynthesizer

class dragonradio.NCO

Bases: pybind11_builtins.pybind11_object

property frequency

Frequency in radians per sample

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

Mix signal down

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

Mix signal up

property phase

Phase in radians

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

Reset NCO state given frequency in radians per sample

class dragonradio.Net

Bases: pybind11_builtins.pybind11_object

addNode(self: _dragonradio.Net, arg0: int) → _dragonradio.Node
property my_node_id
property nodes

Nodes in the network

property time_master
class dragonradio.NetFilter

Bases: _dragonradio.NetProcessor

class dragonradio.NetFirewall

Bases: _dragonradio.NetProcessor

property allow_broadcasts

Allow broadcast packets?

property allowed

Set of allowed ports

property enabled

Is the firewall enabled?

class dragonradio.NetInPull

Bases: pybind11_builtins.pybind11_object

disconnect(self: _dragonradio.NetInPull) → None
class dragonradio.NetInPush

Bases: pybind11_builtins.pybind11_object

disconnect(self: _dragonradio.NetInPush) → None
class dragonradio.NetNoop

Bases: _dragonradio.NetProcessor

class dragonradio.NetOutPull

Bases: pybind11_builtins.pybind11_object

disconnect(self: _dragonradio.NetOutPull) → None
class dragonradio.NetOutPush

Bases: pybind11_builtins.pybind11_object

disconnect(self: _dragonradio.NetOutPush) → None
class dragonradio.NetPacket

Bases: _dragonradio.Packet

property deadline

Packet delivery deadline

property g

Multiplicative TX gain

property mcsidx

MCS to use

class dragonradio.NetProcessor

Bases: pybind11_builtins.pybind11_object

property input
property output
class dragonradio.Node

Bases: pybind11_builtins.pybind11_object

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 mcsidx

MCS index

property soft_tx_gain

Soft TX gain (dBFS)

property timestamps

Timestamps received from this node

class dragonradio.OverlapTDChannelizer

Bases: _dragonradio.Channelizer

property cur_demod
property enforce_ordering
property prev_demod
class dragonradio.PHY

Bases: pybind11_builtins.pybind11_object

getMinRXRateOversample(self: _dragonradio.PHY) → int
getMinTXRateOversample(self: _dragonradio.PHY) → int
getModulatedSize(self: _dragonradio.PHY, arg0: int, arg1: int) → int
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.PHY) → PacketDemodulator
mkPacketModulator(self: _dragonradio.PHY) → PacketModulator
static mkRadioPacket(arg0: _dragonradio.Header, arg1: Optional[bytes]) → _dragonradio.RadioPacket
updateAutoGain(self: _dragonradio.PHY, arg0: _dragonradio.NetPacket, arg1: float, arg2: IQBuf) → None
class dragonradio.PMOutput

Bases: pybind11_builtins.pybind11_object

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.Packet

Bases: pybind11_builtins.pybind11_object

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.PacketCompressor

Bases: pybind11_builtins.pybind11_object

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.PacketDemodulator

Bases: pybind11_builtins.pybind11_object

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

Bases: pybind11_builtins.pybind11_object

property has_selective_ack

Set if packet contains a selective ACK

property has_seq

Set if packet has been assigned a sequence number

property invalid_header

Is header invalid?

property invalid_payload

Is payload invalid?

property retransmission

Is this a retransmission?

property timestamp

Set if packet should be timestamped

class dragonradio.PacketModulator

Bases: pybind11_builtins.pybind11_object

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

Bases: pybind11_builtins.pybind11_object

property channel_taps

Per-channel taps (reversed)

property nchannels

Number of channels

property taps

Prototype filter taps

class dragonradio.PfbCCF

Bases: pybind11_builtins.pybind11_object

property channel_taps

Per-channel taps (reversed)

property nchannels

Number of channels

property taps

Prototype filter taps

class dragonradio.Queue

Bases: pybind11_builtins.pybind11_object

property pop
property push
property transmission_delay

Transmission delay (sec)

class dragonradio.RadioConfig

Bases: pybind11_builtins.pybind11_object

property debug

Output debug messages to the console

property log_invalid_headers

Log invalid headers?

property mtu

Maximum Transmission Unit (bytes)

property node_id

Current node’s ID

property snapshot_collector

Snapshot collector

property verbose

Output verbose messages to the console

property verbose_packet_trace

Display packets written to tun/tap device?

class dragonradio.RadioFirewall

Bases: _dragonradio.RadioProcessor

property allow_broadcasts

Allow broadcast packets?

property allowed

Set of allowed ports

property enabled

Is the firewall enabled?

class dragonradio.RadioInPull

Bases: pybind11_builtins.pybind11_object

disconnect(self: _dragonradio.RadioInPull) → None
class dragonradio.RadioInPush

Bases: pybind11_builtins.pybind11_object

disconnect(self: _dragonradio.RadioInPush) → None
class dragonradio.RadioNoop

Bases: _dragonradio.RadioProcessor

class dragonradio.RadioOutPull

Bases: pybind11_builtins.pybind11_object

disconnect(self: _dragonradio.RadioOutPull) → None
class dragonradio.RadioOutPush

Bases: pybind11_builtins.pybind11_object

disconnect(self: _dragonradio.RadioOutPush) → None
class dragonradio.RadioPacket

Bases: _dragonradio.Packet

property cfo

CFO

property channel

Channel

property evm

EVM

property rssi

RSSI

class dragonradio.RadioProcessor

Bases: pybind11_builtins.pybind11_object

property input
property output
class dragonradio.RationalResamplerCCC

Bases: _dragonradio.PfbCCC, _dragonradio.ResamplerCC

property down_rate

Downsample rate

property up_rate

Upsample rate

class dragonradio.RationalResamplerCCF

Bases: _dragonradio.PfbCCF, _dragonradio.ResamplerCC

property down_rate

Downsample rate

property up_rate

Upsample rate

class dragonradio.ReceiveWindow

Bases: pybind11_builtins.pybind11_object

property long_evm

Long-term EVM (dB)

property long_rssi

Long-term RSSI (dB)

class dragonradio.ReceiveWindows

Bases: pybind11_builtins.pybind11_object

class dragonradio.ResamplerCC

Bases: pybind11_builtins.pybind11_object

property delay

Resampling delay

property rate

Resampling rate

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

Resample signal

reset(self: _dragonradio.ResamplerCC) → None

Reset resampler state

class dragonradio.Score

Bases: pybind11_builtins.pybind11_object

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.ScoreMap

Bases: pybind11_builtins.pybind11_object

items(self: Dict[int, _dragonradio.Scores]) → iterator
class dragonradio.Scorer

Bases: pybind11_builtins.pybind11_object

property scores

Scores

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

Set mandates

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

Update statistics for received data

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

Update scores up to given MP

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

Update statistics for sent data

class dragonradio.Scores

Bases: pybind11_builtins.pybind11_object

append(self: _dragonradio.Scores, x: _dragonradio.Score) → None

Add an item to the end of the list

clear(self: _dragonradio.Scores) → None

Clear the contents

extend(*args, **kwargs)

Overloaded function.

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

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

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

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

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

Insert an item at a given position.

property invalid_mp

First invalid MP

pop(*args, **kwargs)

Overloaded function.

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

Remove and return the last item

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

Remove and return the item at index i

class dragonradio.SelfTX

Bases: pybind11_builtins.pybind11_object

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.SendWindow

Bases: pybind11_builtins.pybind11_object

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_per

Short-term packet error rate (unitless)

class dragonradio.SendWindows

Bases: pybind11_builtins.pybind11_object

class dragonradio.SimpleQueue

Bases: _dragonradio.Queue

FIFO = QueueType.FIFO
LIFO = QueueType.LIFO
class QueueType

Bases: pybind11_builtins.pybind11_object

Members:

FIFO

LIFO

FIFO = QueueType.FIFO
LIFO = QueueType.LIFO
__entries = {'FIFO': (QueueType.FIFO, None), 'LIFO': (QueueType.LIFO, None)}
property name

handle) -> str

Type

(self

class dragonradio.SlotSynthesizer

Bases: _dragonradio.Synthesizer

property superslots

Flag indicating whether or not to use superslots.

class dragonradio.SlottedALOHA

Bases: _dragonradio.SlottedMAC

property p

Probability of transmission in a given slot

property slotidx

Slot index to transmit in

class dragonradio.SlottedMAC

Bases: _dragonradio.MAC

property guard_size

Guard size (sec)

property slot_send_lead_time

Slot send lead time (sec)

property slot_size

Slot size (sec)

class dragonradio.SmartController

Bases: _dragonradio.Controller

property ack_delay

ACK delay (sec)

property ack_delay_estimation_window

ACK delay estimation window (sec)

property ack_gain
broadcastHello(self: _dragonradio.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 echoed_timestamps

Our timestamps echoed by the time master

property enforce_ordering
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 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

resetMCSTransitionProbabilities(self: _dragonradio.SmartController) → None

Reset all AMC transition probabilties to 1.0

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

class dragonradio.Snapshot

Bases: pybind11_builtins.pybind11_object

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.SnapshotCollector

Bases: pybind11_builtins.pybind11_object

property active

Is snapshot collection active?

finish(self: _dragonradio.SnapshotCollector) → _dragonradio.Snapshot

Finish snapshot collection, returning the collected snapshot

start(self: _dragonradio.SnapshotCollector) → None

Start snapshot collection

stop(self: _dragonradio.SnapshotCollector) → None

Stop snapshot collection

class dragonradio.Synthesizer

Bases: pybind11_builtins.pybind11_object

property channels

TX channels

property schedule

MAC schedule

property sink
property tx_rate
class dragonradio.TDChannelizer

Bases: _dragonradio.Channelizer

class dragonradio.TDMA

Bases: _dragonradio.SlottedMAC

property nslots

The number of TDMA slots.

class dragonradio.TDSlotSynthesizer

Bases: _dragonradio.SlotSynthesizer

class dragonradio.TDSynthesizer

Bases: _dragonradio.ChannelSynthesizer

class dragonradio.TableNCO

Bases: _dragonradio.NCO

class dragonradio.TimePoint

Bases: pybind11_builtins.pybind11_object

property frac_secs

Fractional seconds

property full_secs

Full seconds

property mono_time
property secs

Seconds

class dragonradio.TimeWindowEstimator

Bases: _dragonradio.DoubleEstimator

property end

The end of the time window (sec)

property start

The start of the time window (sec)

property time_window

The time window (sec)

class dragonradio.TimeWindowMax

Bases: _dragonradio.TimeWindowEstimator

class dragonradio.TimeWindowMean

Bases: _dragonradio.TimeWindowEstimator

class dragonradio.TimeWindowMeanRate

Bases: _dragonradio.TimeWindowMean

class dragonradio.TimeWindowMin

Bases: _dragonradio.TimeWindowEstimator

class dragonradio.TunTap

Bases: pybind11_builtins.pybind11_object

property mtu
property sink
property source
class dragonradio.USRP

Bases: pybind11_builtins.pybind11_object

property auto_dc_offset
property clock_rate
property clock_source
property clock_sources
property device_type
getClockSource(self: _dragonradio.USRP, arg0: int) → str
getTimeSource(self: _dragonradio.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.USRP, arg0: str, arg1: int) → None
setTimeSource(self: _dragonradio.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.UpsamplerCCC

Bases: _dragonradio.PfbCCC, _dragonradio.ResamplerCC

class dragonradio.UpsamplerCCF

Bases: _dragonradio.PfbCCF, _dragonradio.ResamplerCC

class dragonradio.WindowC

Bases: pybind11_builtins.pybind11_object

add(self: _dragonradio.WindowC, arg0: complex) → None

Add element to window

reset(self: _dragonradio.WindowC) → None

Reset window

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

Resize window

property size

Window size

property window

Get values in the window

class dragonradio.WorkQueue

Bases: pybind11_builtins.pybind11_object

addThreads(self: _dragonradio.WorkQueue, arg0: int) → None

Add workers

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

compress fc32 samples using FLAC

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

convert sc16 buffer to a fc32 buffer

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

convert fc32 buffer to a sc16 buffer

dragonradio.decompressFLAC(arg0: numpy.ndarray[int8]) → numpy.ndarray[complex64]

decompress fc32 samples using FLAC

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

Use the Remez exchange algorithm to design an equiripple filter

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

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

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

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

dragonradio.kaiser(arg0: int, arg1: float, arg2: float) → List[float]
dragonradio.parks_mcclellan(arg0: int, arg1: float, arg2: float) → List[float]
class dragonradio.liquid.CRCScheme

Members:

unknown

none

checksum

crc8

crc16

crc24

crc32

__entries = {'checksum': (CRCScheme.checksum, None), 'crc16': (CRCScheme.crc16, None), 'crc24': (CRCScheme.crc24, None), 'crc32': (CRCScheme.crc32, None), 'crc8': (CRCScheme.crc8, None), 'none': (CRCScheme.none, None), 'unknown': (CRCScheme.unknown, None)}
checksum = CRCScheme.checksum
crc16 = CRCScheme.crc16
crc24 = CRCScheme.crc24
crc32 = CRCScheme.crc32
crc8 = CRCScheme.crc8
property name

handle) -> str

Type

(self

none = CRCScheme.none
unknown = CRCScheme.unknown
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

__entries = {'g2412': (FECScheme.g2412, None), 'h128': (FECScheme.h128, None), 'h74': (FECScheme.h74, None), 'h84': (FECScheme.h84, None), 'none': (FECScheme.none, None), 'rep3': (FECScheme.rep3, None), 'rep5': (FECScheme.rep5, None), 'rs8': (FECScheme.rs8, None), 'secded2216': (FECScheme.secded2216, None), 'secded3932': (FECScheme.secded3932, None), 'secded7264': (FECScheme.secded7264, None), 'unknown': (FECScheme.unknown, None), 'v27': (FECScheme.v27, None), 'v27p23': (FECScheme.v27p23, None), 'v27p34': (FECScheme.v27p34, None), 'v27p45': (FECScheme.v27p45, None), 'v27p56': (FECScheme.v27p56, None), 'v27p67': (FECScheme.v27p67, None), 'v27p78': (FECScheme.v27p78, None), 'v29': (FECScheme.v29, None), 'v29p23': (FECScheme.v29p23, None), 'v29p34': (FECScheme.v29p34, None), 'v29p45': (FECScheme.v29p45, None), 'v29p56': (FECScheme.v29p56, None), 'v29p67': (FECScheme.v29p67, None), 'v29p78': (FECScheme.v29p78, None), 'v39': (FECScheme.v39, None), 'v615': (FECScheme.v615, None)}
g2412 = FECScheme.g2412
h128 = FECScheme.h128
h74 = FECScheme.h74
h84 = FECScheme.h84
property name

handle) -> str

Type

(self

none = FECScheme.none
rep3 = FECScheme.rep3
rep5 = FECScheme.rep5
rs8 = FECScheme.rs8
secded2216 = FECScheme.secded2216
secded3932 = FECScheme.secded3932
secded7264 = FECScheme.secded7264
unknown = FECScheme.unknown
v27 = FECScheme.v27
v27p23 = FECScheme.v27p23
v27p34 = FECScheme.v27p34
v27p45 = FECScheme.v27p45
v27p56 = FECScheme.v27p56
v27p67 = FECScheme.v27p67
v27p78 = FECScheme.v27p78
v29 = FECScheme.v29
v29p23 = FECScheme.v29p23
v29p34 = FECScheme.v29p34
v29p45 = FECScheme.v29p45
v29p56 = FECScheme.v29p56
v29p67 = FECScheme.v29p67
v29p78 = FECScheme.v29p78
v39 = FECScheme.v39
v615 = FECScheme.v615
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[complex64]) → List[Tuple[Optional[_dragonradio.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
__entries = {'V29': (ModulationScheme.V29, None), 'apsk128': (ModulationScheme.apsk128, None), 'apsk16': (ModulationScheme.apsk16, None), 'apsk256': (ModulationScheme.apsk256, None), 'apsk32': (ModulationScheme.apsk32, None), 'apsk4': (ModulationScheme.apsk4, None), 'apsk64': (ModulationScheme.apsk64, None), 'apsk8': (ModulationScheme.apsk8, None), 'arb': (ModulationScheme.arb, None), 'arb128opt': (ModulationScheme.arb128opt, None), 'arb16opt': (ModulationScheme.arb16opt, None), 'arb256opt': (ModulationScheme.arb256opt, None), 'arb32opt': (ModulationScheme.arb32opt, None), 'arb64opt': (ModulationScheme.arb64opt, None), 'arb64vt': (ModulationScheme.arb64vt, None), 'ask128': (ModulationScheme.ask128, None), 'ask16': (ModulationScheme.ask16, None), 'ask2': (ModulationScheme.ask2, None), 'ask256': (ModulationScheme.ask256, None), 'ask32': (ModulationScheme.ask32, None), 'ask4': (ModulationScheme.ask4, None), 'ask64': (ModulationScheme.ask64, None), 'ask8': (ModulationScheme.ask8, None), 'bpsk': (ModulationScheme.bpsk, None), 'dpsk128': (ModulationScheme.dpsk128, None), 'dpsk16': (ModulationScheme.dpsk16, None), 'dpsk2': (ModulationScheme.dpsk2, None), 'dpsk256': (ModulationScheme.dpsk256, None), 'dpsk32': (ModulationScheme.dpsk32, None), 'dpsk4': (ModulationScheme.dpsk4, None), 'dpsk64': (ModulationScheme.dpsk64, None), 'dpsk8': (ModulationScheme.dpsk8, None), 'ook': (ModulationScheme.ook, None), 'psk128': (ModulationScheme.psk128, None), 'psk16': (ModulationScheme.psk16, None), 'psk2': (ModulationScheme.psk2, None), 'psk256': (ModulationScheme.psk256, None), 'psk32': (ModulationScheme.psk32, None), 'psk4': (ModulationScheme.psk4, None), 'psk64': (ModulationScheme.psk64, None), 'psk8': (ModulationScheme.psk8, None), 'qam128': (ModulationScheme.qam128, None), 'qam16': (ModulationScheme.qam16, None), 'qam256': (ModulationScheme.qam256, None), 'qam32': (ModulationScheme.qam32, None), 'qam4': (ModulationScheme.qam4, None), 'qam64': (ModulationScheme.qam64, None), 'qam8': (ModulationScheme.qam8, None), 'qpsk': (ModulationScheme.qpsk, None), 'sqam128': (ModulationScheme.sqam128, None), 'sqam32': (ModulationScheme.sqam32, None), 'unknown': (ModulationScheme.unknown, None)}
apsk128 = ModulationScheme.apsk128
apsk16 = ModulationScheme.apsk16
apsk256 = ModulationScheme.apsk256
apsk32 = ModulationScheme.apsk32
apsk4 = ModulationScheme.apsk4
apsk64 = ModulationScheme.apsk64
apsk8 = ModulationScheme.apsk8
arb = ModulationScheme.arb
arb128opt = ModulationScheme.arb128opt
arb16opt = ModulationScheme.arb16opt
arb256opt = ModulationScheme.arb256opt
arb32opt = ModulationScheme.arb32opt
arb64opt = ModulationScheme.arb64opt
arb64vt = ModulationScheme.arb64vt
ask128 = ModulationScheme.ask128
ask16 = ModulationScheme.ask16
ask2 = ModulationScheme.ask2
ask256 = ModulationScheme.ask256
ask32 = ModulationScheme.ask32
ask4 = ModulationScheme.ask4
ask64 = ModulationScheme.ask64
ask8 = ModulationScheme.ask8
bpsk = ModulationScheme.bpsk
dpsk128 = ModulationScheme.dpsk128
dpsk16 = ModulationScheme.dpsk16
dpsk2 = ModulationScheme.dpsk2
dpsk256 = ModulationScheme.dpsk256
dpsk32 = ModulationScheme.dpsk32
dpsk4 = ModulationScheme.dpsk4
dpsk64 = ModulationScheme.dpsk64
dpsk8 = ModulationScheme.dpsk8
property name

handle) -> str

Type

(self

ook = ModulationScheme.ook
psk128 = ModulationScheme.psk128
psk16 = ModulationScheme.psk16
psk2 = ModulationScheme.psk2
psk256 = ModulationScheme.psk256
psk32 = ModulationScheme.psk32
psk4 = ModulationScheme.psk4
psk64 = ModulationScheme.psk64
psk8 = ModulationScheme.psk8
qam128 = ModulationScheme.qam128
qam16 = ModulationScheme.qam16
qam256 = ModulationScheme.qam256
qam32 = ModulationScheme.qam32
qam4 = ModulationScheme.qam4
qam64 = ModulationScheme.qam64
qam8 = ModulationScheme.qam8
qpsk = ModulationScheme.qpsk
sqam128 = ModulationScheme.sqam128
sqam32 = ModulationScheme.sqam32
unknown = ModulationScheme.unknown
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

class dragonradio.gpsd.GPSLocation[source]

A GPS location

alt

Altitude

lat

Latitude

lon

Longitude

timestamp

Timestamp of last update

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.Channel
property bw

Bandwidth

property fc

Frequency shift from center

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

Return true if channels intersect, false otherwise

class dragonradio.radio.Channels
append(self: _dragonradio.Channels, x: Tuple[_dragonradio.Channel, List[complex]]) → None

Add an item to the end of the list

clear(self: _dragonradio.Channels) → None

Clear the contents

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

Return the number of times x appears in the list

extend(*args, **kwargs)

Overloaded function.

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

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

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

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

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

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

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

Remove and return the last item

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

Remove and return the item at index i

remove(self: _dragonradio.Channels, x: Tuple[_dragonradio.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.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_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

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

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

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_finish_wait

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

snapshot_period

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

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

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.ExtendAction(option_strings, *args, **kwargs)[source]

Add a list of values to an argument’s value

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.MCS
property check

Data validity check

property fec0

Inner FEC

property fec1

Outer FEC

property ms

Modulation scheme

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

configureRadioConfig()[source]

Configure the singleton RadioConfig object

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

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 0x7f048b549220: type object at 0x390be70>, '__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>, 'configureRadioConfig': <function Radio.configureRadioConfig>, 'configureSimpleMACSchedule': <function Radio.configureSimpleMACSchedule>, 'configureSnapshots': <function Radio.configureSnapshots>, 'configureTDMA': <function Radio.configureTDMA>, 'configureUSRP': <function Radio.configureUSRP>, 'configureValidDecimationRates': <function Radio.configureValidDecimationRates>, 'deleteMAC': <function Radio.deleteMAC>, '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

dragonradio.radio.getNodeIdFromHostname()[source]

Determine node ID from hostname

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.timestampRegression(echoed, master)[source]

Perform a linear regression on timestamps to determine clock skew and delta

dragonradio.radio.timestampRegressionNoSkew(echoed, master)[source]

Perform a linear regression on timestamps to determine clock delta (assuming no skew)

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)[source]

Create a schedule that distributes slots evenly amongst nodes.

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.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