Home  Contents

rawio:ttnInfo

Rawio Core4 Lua Event System

SYNOPSIS

info = handle:ttnInfo()

DESCRIPTION

Query basic information about a TTN interface.

{ tid = …, -- The TTN network ID of this station next_tid = …, -- ID of the next station in the token sequence probe_tid = …, -- ID of station that is responsible for finding new stations state = "…", -- Current TTN link state }

Link states

STOP Station stopped.
RESET Bus reset. Station waits until the bus has no traffic for some time or until it is being told to go online.
RECON Reconfiguration. Reset state has found the bus to be without traffic for some time. Station waits for another randomized time before attempting to enumerate the bus. If another station begins to enumerate during this time, this station will step back.
ENUM Initial bus enumeration. This stations sends enumeration probes to the bus in order to find other stations. The other stations stay in RESET state until this station sends out a token for the first time.
ONLINE Station is online and actively taking part of keeping the token cycling.

RETURN VALUE

On success, returns a table. On failure, returns nil. In case of an error, the error can be retrieved using rawio:lastError().