12
eWON JAVA eWON Tool Kit D. Hammond & S. Detollenaere

eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

  • Upload
    phamtu

  • View
    225

  • Download
    0

Embed Size (px)

Citation preview

Page 1: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

eWONJAVA eWON Tool Kit

D. Hammond & S. Detollenaere

Page 2: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

JAVA ETK

• ETK = eWON ToolKit• eWON runs a Java Virtual Machine which executes your third

party Java programs (Libraries).• In addition to the JAVA native APIs, The ETK offers a set of

APIs used to control and manage the eWON.

Page 3: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

JAVA IDE

• A Java IDE is required to develop your JAVA application.• Any JAVA IDE can theoretically be used. Netbeans v7 is the

one we document on our website.

Page 4: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

JAVA Application Deployment

• The code compilation produces two files. One *.jad and one *.jar• Both files need to be pushed through FTP in the /usr directory of the eWON.

• Netbeans features a FTP client to deploy your application directly from your IDE.

Page 5: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

Start the Java Application

• Starting the JAVA application can be done through different ways :

• Using the “jvmrun” (To start the JAVA program at boot) to be copied along with the *.jar and *.jad files.

• Using an URL (Only for debugging)

-heapsize 1M –classpath/usr/HelloWorld.jar -emain HelloMain

Page 6: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

Start the Java Application (2)

• heapsize : Virtual Memory allocated to the JAVA program.

• classpath : Path to the executable to start.

• emain: Name of the main class where the “main” function is located (= Entry point of the program)

-heapsize 1M –classpath /usr/HelloWorld.jar -emain HelloMain

Page 7: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

Java Application examples

• Standard Application (As developed with BASIC)

• New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP). See “Telnet” example on http://developer.ewon.biz

• New IOserver (With Java IOserver Library)

• OEM Application (Code cannot be edited). License system can be created to sell the JAVA application.

• Unconventional real use cases : • FTP Gateway (Make the link between two FTP servers)• Modem Simulator (Simulate a Modem through TELNET to allow a HMI to generate SMS

through eWON)

Page 8: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

JAVA vs. Basic

BasicScript interpreted by the firmwareNo software needed. (embedded IDE)

BASIC functions allow to manage Tags, events, configurations, files, IP sockets, Serial Ports,…

Works mainly on events

Mono-threading

eWON own BASIC functions. Only eWON uses this language.

Online debugging with breakpoints, Step by step,…

JavaCompiled code executed by the JVMIDE Software needed. (Netbeans 7)

JAVA ETK provides the same set of APIs and even more, like Server Sockets and User Led Management.

Works on events as well as using endless LOOP.

Multi-threading

Standard language. Examples and tutorials can be found on Internet (Except for ETK APIs)

Online debugging with breakpoints, Step by step,… in Netbeans

Page 9: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

https://developer.ewon.biz

eWON Programming JAVA

Website

Page 10: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

Show Time…

Page 11: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

Telnet Server

• eWON acts now as a Telnet server and listens on the TCP port 333 for incoming connection.

• The Telnet protocol provides an access to a command-line interface

• Get the Tag value by typing the Tagname.

JAVA

Telnet Server

Page 12: eWON · Java Application examples • Standard Application (As developed with BASIC) • New “Tag Publishing” Protocol (Other than Modbus TCP and SNMP)

Thank you!