packageFunctions
Text/display helpers and path resolution (no C state)
Extends from Modelica.Icons.FunctionsPackage (Icon for packages containing functions).
Contents
| Name | Description |
|---|---|
| StringToCharCodes | Converts the first n characters of s into ASCII codes (0-255), padded with spaces (32) if s is shorter - shared helper (independent of PyRuntime) for the character-by-character display on Peripherals.Display, see requirements.md decision Périphérique d'affichage pédagogique |
| ResolvePath | Resolves a URI (modelica://..., file://...) into a file path, and returns any other path unchanged (relative: resolved later from the simulation folder) - loadResource fails on an empty string or a plain path, hence this sorting, see requirements.md decision Système de fichiers |
| DisplayMessage | Message i (1 = the oldest) of a payload of the display link (messages separated by line feeds) |
| DisplayMessageCount | Number of messages in a payload of the display link (messages separated by line feeds) |
| PreviousMessageCodes | ASCII codes of line 2 of a 20x2 display after k new messages: the message before the last when k >= 2, otherwise the former line 1 |
| ScrollText | Writes the k last messages of a payload on a large text screen, one line each: under the last written line, then scrolling up once the screen is full |
| LogDisplayMessages | Writes the k last messages of a payload of the display link in the simulation log, one line each, and returns k - to be assigned to a variable, so that the call survives the initialization |