class

Kozai::Transponders::Table

Inherits Reference < Object

Every transponder the station knows about.

Constructors

bundled

The table compiled into the binary. See Transponders::BUNDLED_TEXT.

Source
load(path : String) : Table

Reads a table from a file.

Source
new(all : Array(Transponder) = [] of Transponder)

Builds a table from transponders already in hand. The default is the empty table, for a station with no radio.

Source
parse(text : String, path : String | Nil = nil) : Table

Reads a table from configuration text.

Raises Config::ValueError naming the section when an entry cannot be used. A malformed transponder is not skipped quietly: the operator has just edited this file, and a receiver that stays silent because of a typo three lines up is the hardest kind of fault to find.

Source

Instance methods

all

The transponders, in the order they were read.

Source
covers?(catalog_number : Int32) : Bool

Whether anything is known about this satellite.

Source
default_for(catalog_number : Int32) : Transponder | Nil

The transponder to use for a satellite when none was asked for: the one marked default, or failing that the first that was read.

Source
empty?
Source
find(id : String) : Transponder | Nil

The transponder with this section name.

Source
for(catalog_number : Int32) : Array(Transponder)

Every transponder for a satellite, in file order.

Source
merge(other : Table) : Table

This table with other laid over it.

A section replaces one of the same name, which is how a configured file corrects a compiled-in entry rather than duplicating it — the same rule Catalog::Store#replace uses for element sets, where a later source wins for a repeated catalogue number.

Source
satellites

Catalog numbers covered, sorted.

Source
size

How many transponders are in the table.

Source