Difference between revisions of "SHIP:Node:constant"

From Serious Documentation
Jump to: navigation, search
(Ancestors)
 
(9 intermediate revisions by 3 users not shown)
Line 11: Line 11:
 
Declarations of constants is via a {{Node|constant}} node, rather than embedding the declaration in the {{Node|script}} as is traditional in pure coded languages.  This permits {{Node|constant}}s to be referenced throughout [[SHIPTide]] in properties.
 
Declarations of constants is via a {{Node|constant}} node, rather than embedding the declaration in the {{Node|script}} as is traditional in pure coded languages.  This permits {{Node|constant}}s to be referenced throughout [[SHIPTide]] in properties.
  
{{Node|constant}} nodes can exist in the {{Node|layout}}, {{Node|references}}, {{Node|platform}} and {{Node|cargo}} areas.
+
{{Node|constant}} nodes can exist in the {{Node|layout}}, {{Node|resources}}, {{Node|platform}} and <!--- Remove link until page exist {{Node|cargo}} -->'''cargo''' areas.
  
 
== Ancestors ==
 
== Ancestors ==
Line 20: Line 20:
 
|-
 
|-
 
|{{:SHIP:Node:alternate|{{†}}}}
 
|{{:SHIP:Node:alternate|{{†}}}}
|-
 
|{{:SHIP:Node:audio|{{†}}}}
 
|-
 
|{{:SHIP:Node:beep|{{†}}}}
 
 
|-
 
|-
 
|{{:SHIP:Node:box|{{†}}}}
 
|{{:SHIP:Node:box|{{†}}}}
 
|-
 
|-
|{{:SHIP:Node:cargo|{{†}}}}
+
|'''cargo'''{{†}}||<!--- Remove link until page exist {{:SHIP:Node:cargo|{{†}}}}--->
 
|-
 
|-
 
|{{:SHIP:Node:constant|{{†}}}}
 
|{{:SHIP:Node:constant|{{†}}}}
Line 33: Line 29:
 
|{{:SHIP:Node:display|{{†}}}}
 
|{{:SHIP:Node:display|{{†}}}}
 
|-
 
|-
|{{:SHIP:Node:fontfamilyinfo|{{†}}}}
+
|'''fontfamilyinfo'''{{†}}||<!--- Remove link until page exist {{:SHIP:Node:fontfamilyinfo|{{†}}}}--->
|-
 
|{{:SHIP:Node:fontinfo|{{†}}}}
 
 
|-
 
|-
|{{:SHIP:Node:glass|{{†}}}}
+
|'''fontinfo'''{{†}}||<!--- Remove link until page exist {{:SHIP:Node:fontinfo|{{†}}}}--->
|-
 
|{{:SHIP:Node:gpio|{{†}}}}
 
 
|-
 
|-
 
|{{:SHIP:Node:group|{{†}}}}
 
|{{:SHIP:Node:group|{{†}}}}
Line 55: Line 47:
 
|{{:SHIP:Node:listener|{{†}}}}
 
|{{:SHIP:Node:listener|{{†}}}}
 
|-
 
|-
|{{:SHIP:Node:locale|{{†}}}}
+
|'''locale'''{{†}}||<!--- Remove link until page exist {{:SHIP:Node:locale|{{†}}}}--->
 
|-
 
|-
 
|{{:SHIP:Node:page|{{†}}}}
 
|{{:SHIP:Node:page|{{†}}}}
|-
 
|{{:SHIP:Node:portvar|{{†}}}}
 
 
|-
 
|-
 
|{{:SHIP:Node:resources|{{†}}}}
 
|{{:SHIP:Node:resources|{{†}}}}
 
|-
 
|-
|{{:SHIP:Node:splashimage|{{†}}}}
+
|'''splashimage'''{{†}}||<!--- Remove link until page exist {{:SHIP:Node:splashimage|{{†}}}}--->
 
|-
 
|-
 
|{{:SHIP:Node:text|{{†}}}}
 
|{{:SHIP:Node:text|{{†}}}}
 
|-
 
|-
 
|{{:SHIP:Node:timer|{{†}}}}
 
|{{:SHIP:Node:timer|{{†}}}}
|-
 
|{{:SHIP:Node:touch|{{†}}}}
 
 
|-
 
|-
 
|{{:SHIP:Node:variable|{{†}}}}
 
|{{:SHIP:Node:variable|{{†}}}}
|-
 
|{{:SHIP:Node:uart|{{†}}}}
 
 
|}
 
|}
 
{{†}}{{Node|constant}} nodes are permitted ''directly'' underneath these nodes.
 
{{†}}{{Node|constant}} nodes are permitted ''directly'' underneath these nodes.
  
 
== Descendants ==
 
== Descendants ==
The following nodes are permitted within {{Node|constants}}s:
+
The following nodes are permitted within {{Node|constant}}:
  
 
{| class="wikitable" style="margin: 1em auto 1em auto;"  
 
{| class="wikitable" style="margin: 1em auto 1em auto;"  
Line 97: Line 83:
 
|{{:SHIP:Property:all:name}}
 
|{{:SHIP:Property:all:name}}
 
|-
 
|-
|{{:SHIP:Property:constant:datatype}}
+
|'''datatype'''||||<!--- Remove link until page exist
 +
|{{:SHIP:Property:constant:datatype}}--->
 
|-
 
|-
|{{:SHIP:Property:constant:value}}
+
'''value'''||||<!--- Remove link until page exist
 +
|{{:SHIP:Property:constant:value}}--->
 
|-
 
|-
 
|}
 
|}

Latest revision as of 16:06, 27 October 2016

Node Home

Node Type Description
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.

constant nodes hold unchangeable values used within SHIPTide as a GUI-designer's convenience to avoid repeating numbers, colors, etc. throughout the GUI design. constants are resolved at GUI export time within SHIPTide; while the values are accessible at run-time, the nodes themselves do not appear as referenceable nodes at run-time in SHIPEngine.

Declarations of constants is via a constant node, rather than embedding the declaration in the script as is traditional in pure coded languages. This permits constants to be referenced throughout SHIPTide in properties.

constant nodes can exist in the layout, resources, platform and cargo areas.

Ancestors

The following nodes are permitted to have constants as descendants:

Node Type Description
alternate Defines a alternate translation for a text resource.
box A generic rectangular container, available as a reusable resource or layout element.
cargo
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.
display Contains the visual GUI layout for a specific LCD display/touch set.
fontfamilyinfo
fontinfo
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.
image Defines a resources area, reusable static image.
layout Top of the Layout Area within a SHIP GUI, which completely describes how the GUI is visually organized.
link Creates a communications link and binds a protocol to a physical comm port.
linkset Encompasses all the traffic between two endpoints in a link.
linkvar Describes shared variables on the given linkset.
listener Monitors one or more properties (including variable values!) for changes, and on changes invokes a script.
locale
page Visual layout area for a specific GUI "page", or "screen"
resources All reusable items, such as images, are held in the SHIP top-level node defined as the resources node
splashimage
text Defines a text resource or a visual text representation.
timer Generates delays and timed alarm events.
variable Run-time value accessible by scripts and able to generate events on change.

constant nodes are permitted directly underneath these nodes.

Descendants

The following nodes are permitted within constant:

Node Type Description
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.

Properties

value||||
Property Name Data Type Description
name** String The name used to identify this node in SHIPTide.
datatype

**available only in SHIPTide; cannot be accessed from Sail scripts at run-time.

Examples