Rifartek Middleware  Programming Training Course How to use WebRobot
Course Outline <ul><li>WebRobot </li></ul><ul><ul><li>Script Integration Development </li></ul></ul><ul><li>CliRobot </li>...
WebRobot Script Integration
RFID and Web System <ul><li>Traditional JSP-based Web System </li></ul>JSP Container Tomcat HTTP Request http://localhost:...
Steps to development RFID Web system <ul><li>Prepare WebRobot related files </li></ul><ul><li>Use integration component to...
Steps to development RFID Web system – 1. Prepare related files |-- CompanyCer.cer |-- about.gif |-- connect.jpg |-- datas...
Steps to development RFID Web system – 1. Prepare related files (Cont.) |-- CompanyCer.cer |-- about.gif |-- connect.jpg |...
Steps to development RFID Web system – 2. Bridge WebRobot (1/4) index2.jsp <%@ page language=“java” contentType=“text/html...
Steps to development RFID Web system – 2. Bridge WebRobot (2/4) <ul><li>The integrated WebRobot </li></ul>index2.jsp
Steps to development RFID Web system – 2. Bridge WebRobot (3/4) <ul><li>Steps </li></ul><ul><ul><li>Specify ServRobot IP <...
Steps to development RFID Web system – 2. Bridge WebRobot (4/4) <ul><li>WebRobot Panel </li></ul><ul><ul><li>module pass <...
Steps to development RFID Web system – 3. Setup target JS (1/5) <ul><li>Create a Javascript method  </li></ul><ul><ul><li>...
Steps to development RFID Web system – 3. Setup target JS (2/5) <ul><li>Before do anything further, do your one favor </li...
Steps to development RFID Web system – 3. Setup target JS (3/5) <ul><li>Click “script” button </li></ul><ul><ul><li>The “R...
Steps to development RFID Web system – 3. Setup target JS (4/5) <ul><li>A little bit different… </li></ul>index4.jsp
Steps to development RFID Web system – 3. Setup target JS (5/5) <ul><li>Result of index4.jsp </li></ul>index4.jsp
Steps to development RFID Web system – 4. Extend JS (1/4) index5.jsp Split RFID ID and antenna number
Steps to development RFID Web system – 4. Extend JS (2/4) index5.jsp
Steps to development RFID Web system – 4. Extend JS (3/4) index6.jsp More about HEX to ASCII using Javascript “fromCharCod...
Steps to development RFID Web system – 4. Extend JS (4/4) index6.jsp
Ex: Logistics Application
Exercise: logistics.jsp (1/13) logistics.jsp
Exercise: logistics.jsp (2/13) logistics.jsp We want to count total cases read  We want to show pallet ID in this area We ...
Exercise: logistics.jsp (3/13) logistics.jsp Increase activate button and debug area
Exercise: logistics.jsp (4/13) Pending RFID ID Clear old history data Return if status is not in activation status logisti...
Exercise: logistics.jsp (5/13) <ul><li>Processing of Pallet and case </li></ul>Put pallet RFID ID Put cases RFID IDs logis...
Exercise: logistics.jsp (6/13) <ul><li>Use Javascript array (Hashtable) to increase search speed </li></ul>logistics.jsp P...
Exercise: logistics.jsp (7/13) <ul><li>update case list </li></ul>logistics.jsp Retrieve each case ID one by one
Exercise: logistics.jsp (8/13) logistics.jsp
Exercise: logistics.jsp (9/13) <ul><li>Save to database  </li></ul>logistics.jsp Prepare HTML element for DB
Exercise: logistics.jsp (10/13) <ul><li>insert database in logistics_action.jsp </li></ul>logistics_action.jsp
Exercise: logistics.jsp (11/13) <ul><li>Result </li></ul>logistics.jsp
Exercise: logistics.jsp (12/13) <ul><li>Insert data using Database module </li></ul><ul><ul><li>The wCall() method </li></...
Exercise: logistics.jsp (12/13) logistics.jsp
Upcoming SlideShare
Loading in …5
×

Rifartek Robot Training Course - How to use WebRobot

747
-1

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
747
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rifartek Robot Training Course - How to use WebRobot

  1. 1. Rifartek Middleware Programming Training Course How to use WebRobot
  2. 2. Course Outline <ul><li>WebRobot </li></ul><ul><ul><li>Script Integration Development </li></ul></ul><ul><li>CliRobot </li></ul><ul><ul><li>ZigBee integration </li></ul></ul><ul><ul><li>Plugin Development </li></ul></ul>
  3. 3. WebRobot Script Integration
  4. 4. RFID and Web System <ul><li>Traditional JSP-based Web System </li></ul>JSP Container Tomcat HTTP Request http://localhost:8080/train/index.jsp index.jsp Hello World. <br> <% int n = 5; for(int i = 1; i <= n; i++){ out.println(“Counter reaches “ + i + “<br>”); } %> Hello World. <br> Counter reaches 1<br> Counter reaches 2<br> Counter reaches 3<br> Counter reaches 4<br> Counter reaches 5<br> index.jsp
  5. 5. Steps to development RFID Web system <ul><li>Prepare WebRobot related files </li></ul><ul><li>Use integration component to bridge WebRobot into Web page </li></ul><ul><li>Click “more” button and setup WebRobot connection and script destination </li></ul><ul><li>Extend your JavaScript </li></ul>
  6. 6. Steps to development RFID Web system – 1. Prepare related files |-- CompanyCer.cer |-- about.gif |-- connect.jpg |-- datas | `--index2.data |-- disconnect.jpg |-- logo.jpg |-- mesure.gif |-- module_disconnect.jpg |-- module_read.jpg |-- module_write.jpg |-- netscape | `-- javascript | |-- JSException.class | `-- JSObject.class |-- wRobot.jar |-- wRobot.jsp `-- wRobotSave.jsp
  7. 7. Steps to development RFID Web system – 1. Prepare related files (Cont.) |-- CompanyCer.cer |-- about.gif |-- connect.jpg |-- datas | `--index2.data |-- disconnect.jpg |-- logo.jpg |-- mesure.gif |-- module_disconnect.jpg |-- module_read.jpg |-- module_write.jpg |-- netscape | `-- javascript | |-- JSException.class | `-- JSObject.class |-- wRobot.jar |-- wRobot.jsp `-- wRobotSave.jsp Certificate file for signed applet directory for WebRobot configuration for each page directory of classes for netscape compatibility Signed WebRobot jar file Helper files for easy integration
  8. 8. Steps to development RFID Web system – 2. Bridge WebRobot (1/4) index2.jsp <%@ page language=“java” contentType=“text/html;charset=UTF-8”%> <br> Hello World. <br> <%@ page language=“java” contentType=“text/html;charset=UTF-8”%> <%@ page import=“java.io.*”%> <%@ page import=“java.net.*”%> <%@ include file=“./wRobot.jsp”%> <% out.println(wRobot(getServletContext(), request, “wRobotSave.jsp”,”index.data”); %> <br> Hello World. <br> No need to change these three arguments. They help to do related Java Servlet or WebRobot configuration save tasks. Unique WebRobot configuration storage file name for each page.
  9. 9. Steps to development RFID Web system – 2. Bridge WebRobot (2/4) <ul><li>The integrated WebRobot </li></ul>index2.jsp
  10. 10. Steps to development RFID Web system – 2. Bridge WebRobot (3/4) <ul><li>Steps </li></ul><ul><ul><li>Specify ServRobot IP </li></ul></ul><ul><ul><li>click connect </li></ul></ul><ul><ul><li>click “auto connect” </li></ul></ul><ul><ul><li>click “save and exit” </li></ul></ul><ul><ul><li>The index2.jsp will automatically reload </li></ul></ul><ul><ul><li>The settings will be stored in index.data </li></ul></ul><ul><ul><li>(The same setting will be there next time) </li></ul></ul>index2.jsp Serialized Java file
  11. 11. Steps to development RFID Web system – 2. Bridge WebRobot (4/4) <ul><li>WebRobot Panel </li></ul><ul><ul><li>module pass </li></ul></ul><ul><ul><ul><li>The module password that specified in ServRobot for security authentication </li></ul></ul></ul><ul><ul><li>Duration Time </li></ul></ul><ul><ul><ul><li>How long should the WebRobot report collected data for you </li></ul></ul></ul><ul><ul><li>Distinct </li></ul></ul><ul><ul><ul><li>Whether to distinct reported data </li></ul></ul></ul><ul><ul><li>Sense and Sleep time </li></ul></ul><ul><ul><ul><li>Control how ServRobot should contact to dumb Device (Often ignore them) </li></ul></ul></ul>index2.jsp
  12. 12. Steps to development RFID Web system – 3. Setup target JS (1/5) <ul><li>Create a Javascript method </li></ul><ul><ul><li>whatever method name you like </li></ul></ul>index3.jsp
  13. 13. Steps to development RFID Web system – 3. Setup target JS (2/5) <ul><li>Before do anything further, do your one favor </li></ul><ul><ul><li>Duration time: 2000, Distinct: yes </li></ul></ul>index3.jsp
  14. 14. Steps to development RFID Web system – 3. Setup target JS (3/5) <ul><li>Click “script” button </li></ul><ul><ul><li>The “Rifartek Middlescript” panel will show up </li></ul></ul><ul><ul><li>put 「 wRobotCallme(id); 」 in Middlescript pannel </li></ul></ul><ul><ul><li>click “save” button of Middlescript panel </li></ul></ul><ul><ul><li>click “save and exit” button of wRobot panel </li></ul></ul>index3.jsp
  15. 15. Steps to development RFID Web system – 3. Setup target JS (4/5) <ul><li>A little bit different… </li></ul>index4.jsp
  16. 16. Steps to development RFID Web system – 3. Setup target JS (5/5) <ul><li>Result of index4.jsp </li></ul>index4.jsp
  17. 17. Steps to development RFID Web system – 4. Extend JS (1/4) index5.jsp Split RFID ID and antenna number
  18. 18. Steps to development RFID Web system – 4. Extend JS (2/4) index5.jsp
  19. 19. Steps to development RFID Web system – 4. Extend JS (3/4) index6.jsp More about HEX to ASCII using Javascript “fromCharCode() method”
  20. 20. Steps to development RFID Web system – 4. Extend JS (4/4) index6.jsp
  21. 21. Ex: Logistics Application
  22. 22. Exercise: logistics.jsp (1/13) logistics.jsp
  23. 23. Exercise: logistics.jsp (2/13) logistics.jsp We want to count total cases read We want to show pallet ID in this area We want to list cases IDs in this area Use button to trigger whether to process data
  24. 24. Exercise: logistics.jsp (3/13) logistics.jsp Increase activate button and debug area
  25. 25. Exercise: logistics.jsp (4/13) Pending RFID ID Clear old history data Return if status is not in activation status logistics.jsp
  26. 26. Exercise: logistics.jsp (5/13) <ul><li>Processing of Pallet and case </li></ul>Put pallet RFID ID Put cases RFID IDs logistics.jsp
  27. 27. Exercise: logistics.jsp (6/13) <ul><li>Use Javascript array (Hashtable) to increase search speed </li></ul>logistics.jsp Processing by ID type
  28. 28. Exercise: logistics.jsp (7/13) <ul><li>update case list </li></ul>logistics.jsp Retrieve each case ID one by one
  29. 29. Exercise: logistics.jsp (8/13) logistics.jsp
  30. 30. Exercise: logistics.jsp (9/13) <ul><li>Save to database </li></ul>logistics.jsp Prepare HTML element for DB
  31. 31. Exercise: logistics.jsp (10/13) <ul><li>insert database in logistics_action.jsp </li></ul>logistics_action.jsp
  32. 32. Exercise: logistics.jsp (11/13) <ul><li>Result </li></ul>logistics.jsp
  33. 33. Exercise: logistics.jsp (12/13) <ul><li>Insert data using Database module </li></ul><ul><ul><li>The wCall() method </li></ul></ul><ul><ul><li>The wCall() interface </li></ul></ul><ul><ul><ul><li>An interface that help various client to use module specific methods in backward direction </li></ul></ul></ul><ul><ul><ul><li>The first param: Module Name </li></ul></ul></ul><ul><ul><ul><li>The second param: array of arguments for that module </li></ul></ul></ul><ul><ul><ul><ul><li>[methodName, method arguments, …] </li></ul></ul></ul></ul>
  34. 34. Exercise: logistics.jsp (12/13) logistics.jsp

×