]> rtime.felk.cvut.cz Git - orte/eurobot.git/blob - orte/java/src/org/ocera/orte/JOrte.java
bfaf9cf3219dc2cac146f1281fcb89f06d479a70
[orte/eurobot.git] / orte / java / src / org / ocera / orte / JOrte.java
1 /* JOrte.java */
2
3 /**
4  * Class JOrte prodies basic method for work with ORTE.
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 package org.ocera.orte;
25
26
27 public class JOrte {
28
29    public static
30    void init()
31    {
32      jORTEInit();
33      System.out.println(":j: JORTE initialized..");
34    }
35
36    public static
37    void sleepMs(long msec)
38    {
39     jORTESleepMs(msec);
40    }
41
42    public static
43    void verbositySetOptions(String opt)
44    {
45     jORTEVerbositySetOptions(opt);
46    }
47
48    public static
49    void verbositySetLogFile(String logfile)
50    {
51     jORTEVerbositySetLogFile(logfile);
52    }
53
54    public static
55    void appSendThread(long dhandle)
56    {
57     jORTEAppSendThread(dhandle);
58    }
59
60
61
62   /* ****************************************************************** *
63    *                                                                    *
64    *                         native methods                             *
65    *                                                                    *
66    * ****************************************************************** */
67
68
69   /**
70    * jORTEInit - initialization of ORTE layer
71    *
72    *
73    * @return void
74    */
75    private static native
76    void jORTEInit();
77
78
79   /**
80    * jORTESleepMs - suspend calling thread for given time in ms
81    *
82    *
83    * @param d given time in milisec.
84    * @return void
85    */
86    private static native
87    void jORTESleepMs(long msec);
88
89
90   /**
91    * jORTEVerbositySetOptions -
92    *
93    *
94    * @return void
95    */
96    private static native
97    void jORTEVerbositySetOptions(String opt);
98
99
100   /**
101    * jORTEVerbositySetLogFile -
102    *
103    *
104    * @return void
105    */
106    private static native
107    void jORTEVerbositySetLogFile(String logfile);
108
109
110   /**
111    * jORTEVerbositySetLogFile -
112    *
113    *
114    * @return void
115    */
116    private static native
117    void jORTEAppSendThread(long dhandle);
118
119
120 }