This package contains functions to interact with the environment.
Extends from Modelica.Icons.FunctionsPackage
(Icon for packages containing functions).
Name | Description |
---|---|
command | Execute command in default shell |
exit | Terminate execution of Modelica environment |
getEnvironmentVariable | Get content of environment variable |
getPid | Retrieve the current process id |
getTime | Retrieve the local time (in the local time zone) |
getWorkDirectory | Get full path name of work directory |
setEnvironmentVariable | Set content of local environment variable |
setWorkDirectory | Set work directory |
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
String | directory | Full path name of work directory |
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
String | directory | New work directory |
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
String | name | Name of environment variable |
Boolean | convertToSlash | True, if native directory separators in environment variable shall be changed to '/' |
Type | Name | Description |
---|---|---|
String | content | Content of environment variable (empty, if not existent) |
Boolean | exist | = true, if environment variable exists; = false, if it does not exist |
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
String | name | Name of environment variable |
String | content | Value of the environment variable |
Boolean | convertFromSlash | True, if '/' in environment variable shall be changed to native directory separators |
(ms, sec, min, hour, day, mon, year) = System.getTime();
Returns the local time at the time instant this function was called. All returned values are of type Integer and have the following meaning:
Argument Range Description ms 0 .. 999 Milli-seconds after seconds sec 0 .. 59 Seconds after minute min 0 .. 59 Minutes after hour hour 0 .. 23 Hours after midnight day 1 .. 31 Day of month mon 1 .. 12 Current month year ≥ 2015 Current year
(ms, sec, min, hour, mon, year) = getTime() // = (281, 30, 13, 10, 15, 2, 2015) // Feb. 15, 2015 at 10:13 after 30.281 s
This function is impure!
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Integer | ms | Millisecond |
Integer | sec | Second |
Integer | min | Minute |
Integer | hour | Hour |
Integer | day | Day |
Integer | mon | Month |
Integer | year | Year |
pid = System.getPid();
Returns the pid (process identification) of the process in which this function is called. This is an impure function and the returned value depends on the operating system.
getPid() // = 3044
This function is impure!
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Integer | pid | Process ID |
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
String | string | String to be passed to shell |
Type | Name | Description |
---|---|---|
Integer | result | Return value from command (depends on environment) |
Extends from ModelicaServices.System.exit
(Terminate execution of Modelica environment).
Type | Name | Description |
---|---|---|
Integer | status | Result to be returned by environment (0 means success) |