]> rtime.felk.cvut.cz Git - orte.git/blob - orte/java/src/org/ocera/orte/examples/robot/RoboCallback.java
ROBOT_DEMO: add robot demo for Android
[orte.git] / orte / java / src / org / ocera / orte / examples / robot / RoboCallback.java
1 /* MyCallback.java */
2
3 /**
4  * Class Mycallback.
5  * 
6  * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
7  * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
8  * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
9  * @author dedication to Kj
10  * @version 0.1
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  */
23
24 import org.ocera.orte.types.MessageData;
25 import org.ocera.orte.types.RecvInfo;
26 //import org.ocera.orte.types.SequenceNumber;
27
28 /**
29  * @author pokorl
30  *
31  * TODO To change the template for this generated type comment go to
32  * Window - Preferences - Java - Code Style - Code Templates
33  */
34
35 class RoboCallback extends org.ocera.orte.SubscriptionCallback
36 {
37     static public int cnt = 0;
38         int i;
39         int num;
40     //SequenceNumber sn; // only for test purposes
41
42         /** constructor */
43     public RoboCallback()
44         {
45       // init
46       i = 0; 
47           num = 0;
48           System.out.println(":j: MyCallback created..");
49         }
50
51     /** CallBack method
52      * @param recieved info
53      * @param message data instance 
54      * @return void
55      * */
56     public void callback(RecvInfo info, MessageData msg)
57         {
58       //System.out.println(":j: MyCallback: new data received!");
59           cnt++;
60         }
61
62
63 }