Difference between revisions of "Java Programming"
Line 28: | Line 28: | ||
The default setting of the AutoKillFiles parameter in hsyco.ini causes the automatic restart of HSYCO when user.class is changed. | The default setting of the AutoKillFiles parameter in hsyco.ini causes the automatic restart of HSYCO when user.class is changed. | ||
− | + | The [[Java Callback Methods API]] and [[Java Command and Utility Methods API]] chapters describes the callback methods and all the command and utility methods provided by userBase. | |
These methods are the only official HSYCO Java API methods. | These methods are the only official HSYCO Java API methods. | ||
You should avoid using other public methods provided by other classes within the HSYCO package. These methods could change without notice in any new HSYCO release, causing compatibility issues between your code and different versions of HSYCO. | You should avoid using other public methods provided by other classes within the HSYCO package. These methods could change without notice in any new HSYCO release, causing compatibility issues between your code and different versions of HSYCO. |
Revision as of 09:50, 18 February 2014
The Java extension of HSYCO is based on a class called user, declared in a user.java file, contained in the hsyco/com/hsyco directory and compiled in a java.class file.
The user.class file must exist for the HSYCO to work correctly, even if there is no customized Java code.
HSYCO SERVER ships with an empty user.class file pre-installed.
The user class should extend the userBase class, a skeleton class that provides methods to execute actions on the field devices, as well as internal functions, and the callback framework methods, which are the methods called by HSYCO after any event is detected.
The dummy user.java file contains only the class declaration:
/* HSYCO CONTROLLER, USER CODE
* (c) 2014 Home Systems Consulting SpA
* For information, see the Home Systems Consulting web site:
* http://www.homesystemsconsulting.com/
*/
package com.hsyco;
public class user extends userBase {
}
The HSYCO run-time environment should be restarted for user.class changes to become effective.
The default setting of the AutoKillFiles parameter in hsyco.ini causes the automatic restart of HSYCO when user.class is changed.
The Java Callback Methods API and Java Command and Utility Methods API chapters describes the callback methods and all the command and utility methods provided by userBase.
These methods are the only official HSYCO Java API methods.
You should avoid using other public methods provided by other classes within the HSYCO package. These methods could change without notice in any new HSYCO release, causing compatibility issues between your code and different versions of HSYCO.