Nasal CDU Framework: Difference between revisions
Jump to navigation
Jump to search
(→Field: Added Structure) |
(→Field) |
||
Line 39: | Line 39: | ||
var Field = { | var Field = { | ||
# "Static" | # "Static" | ||
vector byID, | |||
func registerInPropTree(path=nil), | func registerInPropTree(path=nil), | ||
func new(label,data,key_action=nil,ptp=nil), | func new(label,data,key_action=nil,ptp=nil), | ||
Line 46: | Line 46: | ||
scalar me.id, | scalar me.id, | ||
scalar me.ptp, | scalar me.ptp, | ||
func me.get_label_line(), | func me.get_label_line(), | ||
func me.get_label_line(), | func me.get_label_line(), | ||
Line 53: | Line 53: | ||
func me.enable_lsk(), | func me.enable_lsk(), | ||
func me.disable_lsk(), | func me.disable_lsk(), | ||
# "Private" | # "Private" | ||
(Line) me.label_line, | (Line) me.label_line, |
Revision as of 14:34, 7 May 2011
This page is a rather technical description of the Nasal code for the framework used to implement a Boeing style CDU.
Work in progress This article or section will be worked on in the upcoming hours or days. Note: Hcc23 is working on this. Find him in the FG IRC channel to discuss this page. See history for the latest developments. |
Note: Although this is meant as a documentation for the code, it obviously will (always) be (slightly) outdated. However, after reading through this page, the actual source code at https://gitorious.org/fg/fgdata/trees/master/Aircraft/Instruments-3d/cdu should not present any major surprises. Hcc23 10:07, 7 May 2011 (EDT)
Basic Classes
Line
The line class represents data to be shown on a row of the CDU's display matrix. This does not mean that a line has to span a complete row of the CDU's display matrix.
var Line = {
# "Static"
hash byID,
func registerInPropTree(path),
func formatOutput(input_data),
func getScreenTextVector(),
func new(line_data,ptp),
# "Public"
scalar me.id,
scalar me.ptp,
vector me.used_properties,
vector me.line_data,
scalar me.line_string_length,
scalar me.active,
func me.enable(),
func me.disable(),
};
Field
A field holds two lines, the label and the data line, as well as information about what the associated line select key does.
var Field = {
# "Static"
vector byID,
func registerInPropTree(path=nil),
func new(label,data,key_action=nil,ptp=nil),
# "Public"
scalar me.id,
scalar me.ptp,
func me.get_label_line(),
func me.get_label_line(),
func me.used_properties(),
func me.lsk_binding(),
func me.enable_lsk(),
func me.disable_lsk(),
# "Private"
(Line) me.label_line,
(Line) me.data_line,
scalar me.lsk_active,
};