P O G O
Java Generated Source Code
Description.
The generated source code will be written in the current directory exept if:
- If the device server has been loaded from an existing project.
In this case the new files will be generated in the load files directory.
- The output directory has been fixed in preference window.
Java Code Generated:
When Java code is generated, 1 file is created if it does not exit:
and it will not be overwritten during an update.
Te other file:
- ClassName.java
- ClassNameClass.java
- Command_1Cmd.java
- Command_2Cmd.java
- Command_3Cmd.java
will be updated on each generation.
- ClassName.java:
Source code file containing:
- class constructor.
- always_executed_hook method.
- attributes management methods.
- methods where the commands will be realy executed.
Your own code to access the device will take place in these methods core.
By convention these methods name use only low case characters
(i.e. the command DevReadValue will be executed by the method
dev_read_value)
Remark: these methods could be edited by a right button
double click on the command (see
graphic user interface).
- ClassNameClass.java:
Source code file containing:
- Device Factory
- Command Factory
- Attrbute Factory
- Command_1Cmd.java, Command_2Cmd.java, Command_3Cmd.java,...:
Source code file for each command class:
- Command class constructor.
- is_allowed method wehre device state is checked to allow
or not the command.
- execute method where the method to execute realy the
command is called.