Controller
class Controller
The controller is the central element of a UP application. A controller defines the smallest, intrinsically functional unit.
A controller essentially consists of two main elements: * Interface and data * [UP - Statemachine]
In addition, the controller has the definition of relations to [Child] controllers.
A controller can also be described as an instantiable type that is instantiated in the [UP - ControllerTree].
Create a controller
- By right-clicking on a package you enter the context menu.
- Open resource assist
- A new controller is created by selecting the controller element.
- In the wizard, the controller name must be entered:
NOTE: Best practice
The controller corresponds to a type that is instantiated. Therefore, the name should be capitalized.
You will automatically be taken to the newly created controller resource. The missing ControllerInterface and an incomplete state machine are marked as errors.
The ControllerInterface can be selected using Ctrl + Space. Existing interfaces are listed:
If no interfaces have been defined yet, a new one can be created directly here: