Académique Documents
Professionnel Documents
Culture Documents
Name:
Martin Koller
at ETM since:
1988
Current role:
Software Engineer
Main responsibility:
User Interface, CTRL Scripting, Mobile UI,
HTTP Server
Data Structuring
enum classes
Stored as int
enum EngineState
{
On = 2,
Off = 4,
Automatic // will be 5 last+1
};
EngineState state;
string name;
};
EngineState state;
string name;
};
Engine e1 = Engine(Motor1);
Engine e2 = Engine(Motor2);
class Engine
{
public Engine() { counter++; }
public static int getInstanceCount() { return counter; }
class Valve
{
public open() { ... }
public close() { ... }
class Valve
{
public open() { dpSet(dpe, true); } // boolean true = open
};
handleValve(Valve &valve)
{
valve.open();
}
class Valve { };
class Engine { };
enum EngineState { };
main()
{
Valve v;
Engine e;
EngineState s;
What about UI ?
Status now:
Public Functions
Panel Events
Panel Properties
Siemens AG 2016 All rights reserved.
Page 17 April 2016 DF PL DER HMI ETM
UI Evolution OO Panels Public Functions
Example:
Usage:
if ( Machine17.hasPermission(user) )
Machine17.startTheMachine();
Where used:
uiConnect(callback, REF0.valueChanged);
callback(int value)
{
this.text = value;
}
Notation:
#property <type> <name>
<type>: int, uint, float, bool, string, color, pen, fill, font
and any user defined enum class
Siemens AG 2016 All rights reserved.
Page 24 April 2016 DF PL DER HMI ETM
UI Evolution OO Panels Properties
Scripts
enum / struct / class
Panels
public functions
#event
#property