ait.core.table module¶
AIT Table Converter
The ait.core.table module provides the dictionary for translating tables.
-
class
ait.core.table.
FSWColDefn
(*args, **kwargs)¶ Bases:
object
FSWColDefn - Argument Definition
Argument Definitions encapsulate all information required to define a single column. This includes the column name, its description, units, type, byte position within a command, name-value enumerations, and allowed value ranges. Name, type, and byte position are required. All others are optional.
-
__init__
(*args, **kwargs)¶ Creates a new Column Definition.
-
bytes
¶ The argument bytes.
-
enum
¶ The argument enumeration.
-
format
¶ The argument format.
-
items
¶ The argument items.
-
name
¶
-
type
¶ The argument type.
-
units
¶ The argument units.
-
values
¶ The argument values.
-
-
class
ait.core.table.
FSWTab
(defn, *args)¶ Bases:
object
Table object that contains column definitions
Commands reference their Command Definition and may contain arguments.
-
__init__
(defn, *args)¶ Creates a new Command based on the given command definition and command arguments.
-
coldefns
¶ The table column definitions.
-
fswheaderdefns
¶ The table fsw header definitions.
-
-
class
ait.core.table.
FSWTabDefn
(*args, **kwargs)¶ Bases:
object
Table Definition
FSW Table Definitions encapsulate all information required to define a single column. This includes the column name, its opcode, subsystem, description and a list of argument definitions. Name and opcode are required. All others are optional.
-
__init__
(*args, **kwargs)¶ Creates a new Command Definition.
-
convertValue
(strval)¶
-
toBinary
(tabfile, stream, fswbin_f, verbose, version)¶
-
toText
(stream, fswtab_f, verbose, version)¶
-
MagicNumber
= 3075¶
-
coldefns
¶
-
delimiter
¶
-
fswheaderdefns
¶
-
name
¶
-
rows
¶
-
size
¶
-
uptype
¶
-
-
class
ait.core.table.
FSWTabDict
(*args, **kwargs)¶ Bases:
dict
Table dictionary object
Table Dictionaries provide a Python dictionary (i.e. hashtable) interface mapping Tables names to Column Definitions.
-
__init__
(*args, **kwargs)¶ Creates a new Command Dictionary from the given command dictionary filename.
-
add
(defn)¶ Adds the given Command Definition to this Command Dictionary.
-
create
(name, *args)¶ Creates a new command with the given arguments.
-
load
(filename)¶ Loads Command Definitions from the given YAML file into this Command Dictionary.
-
-
class
ait.core.table.
FSWTabDictCache
(filename=None)¶ Bases:
object
-
__init__
(filename=None)¶ x.__init__(…) initializes x; see help(type(x)) for signature
-
dirty
()¶
-
load
()¶
-
update
()¶
-
-
ait.core.table.
YAMLCtor_FSWColDefn
(loader, node)¶
-
ait.core.table.
YAMLCtor_FSWTabDefn
(loader, node)¶
-
ait.core.table.
getDefaultFSWTabDict
()¶
-
ait.core.table.
hash_file
(filename)¶ “This function returns the SHA-1 hash of the file passed into it
-
ait.core.table.
writeToBinary
(fswtabdict, tabletype, tabfile, verbose, outbin=None, version=0, binfilemessages=None)¶
-
ait.core.table.
writeToText
(fswtabdict, tabletype, binfile, verbose, version, outpath=None, messages=None)¶