modelTwoLineTextIcon
Information
Purely graphical base class: it carries only the icon and the two arrays of codes it shows. The extending model decides where these codes come from — a logical link (Peripherals.Display) or a real decoded serial frame (Peripherals.UartLcd20x2).
Why ASCII codes and not a String: a String variable is never written to the simulation results, so a DynamicSelect placed on it would never animate. Internal.Functions.StringToCharCodes converts the text into an Integer[], which is stored like any numeric quantity.
Comparison with a tolerance, never with equality (abs(code - N) < 0.5): even an Integer is stored in double precision in the .mat file, and OMEdit's animated replay rebuilds it by interpolation. An exact equality against a value off by a few 1e-6 failed intermittently and made the text flicker. ASCII codes being at least 1 apart, the tolerance removes the ambiguity safely.
Character set: space, digits, upper- and lower-case letters, common punctuation (! ' , - . ?). Any character outside this set is shown as a space. The 40 cells were generated mechanically, not written by hand.
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Integer[Interfaces.DISPLAY_COLS] | line1CharCode | ASCII codes of line 1 (current message) - to be fed by the extending model, typically through Internal.Functions.StringToCharCodes | |
| Integer[Interfaces.DISPLAY_COLS] | line2CharCode | ASCII codes of line 2 (previous message), for scrolling |