SYNOPSIS
data = handle:ttnStats()
DESCRIPTION
Query statistics of a TTN network interface
Returns a table containing running statistic counters:
{
assignments_made = …, -- A new device was detected and inserted into the bus ring
device_lost = …, -- Another device dropped out of the bus
probes_answered = …, -- A bus probe had been answered
bus_resets = …, -- Bus reset counter
receive = {
pac_dropped_nomem = …, -- Received data packet was dropped due to lack of free buffers
pac_seen = …, -- Data packet was seen on the bus, regardless of destination
pac_received_total = …, -- Data packets received addressed to this station
pac_received_broadcast = …, -- Broadcast data packets received
pac_received_unicast = …, -- Unicast data packets received
},
transmit = {
pac_total = …, -- Total number of data packets transmitted
pac_retries_timeout = …, -- Data packets retried due to no answer seen from peer
pac_dropped = …, -- Data packets dropped instead of being transmitted
pac_retries_nak = …, -- Transmit retries due to receiving station responding with NAK
pac_retries_busy = …, -- Transmit retries due to receiving station had its 'ready-to-receive' bit off
tokens_sent = …, -- Token has been sent
tokens_retries = …, -- Token has been retransmitted
},
}
RETURN VALUE
On success, returns a table. On failure, returns nil. In case of an error, the error can
be retrieved using rawio:lastError().