introduction of gogolib4java xiong hongyu july 20, 2011
TRANSCRIPT
![Page 1: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/1.jpg)
Introduction of gogolib4java
Xiong HongyuJuly 20, 2011
![Page 2: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/2.jpg)
Software Libraries of GoGo Board Except GoGo Monitor
Microworlds Netlogo Scratch
C# Flash c/c++ visual basic
![Page 3: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/3.jpg)
Java API for GoGo Board
![Page 4: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/4.jpg)
gogolib4java
• http://code.google.com/p/gogolib4java/• Java API to work with GoGo Board.
GoGoClient
GoGoSerialPort
![Page 5: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/5.jpg)
Current Class Summary of gogolib• GoGoClient
– class to communicate with one GoGo Server embedded in GoGo Monitor
• GoGoSessionManager– class to manage multiple connections to GoGo Server
• GoGoSerialPort– class to work with local connected GoGo Board
• GoGoConsole– a Command-Line application to manipulate local connected GoGo Board
• GoGoMonitor– a GUI application to manipulate local connected GoGo Board
![Page 6: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/6.jpg)
GoGoClient Class
• Class to work with a remote GoGoServer
![Page 7: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/7.jpg)
Example1 Beep.java• import kr.ac.scnu.cn.gogolib.GoGoClient;
• public class Beep• {• public static void main(String[] argv)throws Exception{• // connect to local running GoGo Monitor • GoGoClient ggClient = new GoGoClient("localhost", 9873);• • ggClient.beep();• System.out.println(ggClient.receive());• • ggClient.close();• }• }
![Page 8: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/8.jpg)
Example2 LedController.java• import kr.ac.scnu.cn.gogolib.GoGoClient;
• public class LedController• {• public static void main(String[] argv)throws Exception{• // connect to local running GoGo Monitor • GoGoClient ggClient = new GoGoClient("localhost", 9873);• • //the argument should be 'on' or 'off'• if( argv[0].equalsIgnoreCase("on"))• ggClient.ledOn();• if( argv[0].equalsIgnoreCase("off"))• ggClient.ledOff();• • System.out.println(ggClient.receive());• ggClient.close();• }• }
![Page 9: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/9.jpg)
GoGoSerialPort Class
• GoGoSerialPort
Serial Port Connection
![Page 10: Introduction of gogolib4java Xiong Hongyu July 20, 2011](https://reader035.vdocuments.us/reader035/viewer/2022071709/56649f475503460f94c68f3c/html5/thumbnails/10.jpg)
GoGoMonitor class
• PING COMMAND