modelTextIcon4x32

Icon of a 4x32 text screen (generated by make_text_icons.py): shows textCode of Internal.Devices.PartialTextDisplay, which it extends

Extends from Internal.Devices.PartialTextDisplay (Behaviour of the large text screens: each message received through displayLink is written under the last written line, the screen scrolls up once full).

Information

Base class generated by make_text_icons.py (folder tools/ of the repository) - do not edit by hand: change the script and run it again. Icon of a 4-line, 32-column text screen: cell k shows the character whose ASCII code is textCode[k], line i, column j being k = (i - 1)*32 + j. It extends Internal.Devices.PartialTextDisplay, which declares the array and fills it: the names of a DynamicSelect are resolved in the class that carries the icon, so the array must be in scope here (declared by a sibling base class, it is not found and the screen stays empty in replay).

Same technique as Internal.Icons.TwoLineTextIcon (a String is not stored in the results, an Integer is) and same tolerant comparison (abs(code - N) < 0.5, robust to the interpolation of the replay). Character set: space, digits, letters and ! " # & ' ( ) * + , - . / : < = > ? _; any other character is shown as a space.

Parameters

TypeNameDefaultDescription
IntegernLines (from PartialTextDisplay)Number of lines of the screen - fixed by the extending display, consistent with its generated icon
BooleanlogReceived (from PartialTextDisplay)trueAlso write each received message in the simulation log (turn off when several displays share the same link, to avoid duplicate lines)
IntegernCols (from PartialTextDisplay)Interfaces.TEXT_DISPLAY_COLSNumber of columns

Connectors

TypeNameDefaultDescription

Components

TypeNameDefaultDescription
Integer[nLines*nCols]textCode (from PartialTextDisplay)ASCII codes shown on the icon, line after line: line i, column j at index (i - 1)*nCols + j
Integerfilled (from PartialTextDisplay)Number of lines written so far (at most nLines)