SHIP:Portvar

From Serious Documentation
Jump to: navigation, search

Within SHIPTide and the SHIPEngine environment every SIM has a platform section that contains its ports, for example its Glass port(s), Touch port(s), UART(s), etc. Within each port is a series of port variables or portvars that either control or expose the status of the hardware port.

For example every platform, within it's platform node, has a number of status/identification read-only portvars, including

Property Data Type Description
platform.id Integer A 32 bit hex value that consists of the Serious Integrated Inc. USB Vendor ID (0x25D8) followed by the platform specific USB Product ID for the USB device port on the SIM.
platform.vendor String Constant value of "Serious".
platform.model String Constant platform specific value holding the SIM's model name.
platform.sn String String representation of the unique 64 bit serial number every SIM has burned into its hardware at manufacturing time. Serial numbers have a specific format; for more information contact Serious.

You can refer to these within scripts, for example assigning a text element the vendor name by the script: "text.value = platform.vendor;".

For a complete description of ports and portvars for every platform, consult the GUI Reference Manuals.