]> rtime.felk.cvut.cz Git - orte.git/blob - orte/java/src/org/ocera/orte/tools/Conversions.java
improved JAVA interface from Lukas, update makefiles from msvc from Jan
[orte.git] / orte / java / src / org / ocera / orte / tools / Conversions.java
1 /* Conversions.java */
2
3 /**
4   * Class Conversions provides conversions between IPAddress
5   * and String and between NtpTime and String.
6   *
7   * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
8   * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
9   * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
10   * @author dedication to Kj
11   * @version 0.1
12   *
13   *
14   * This program is free software; you can redistribute it and/or modify
15   * it under the terms of the GNU General Public License as published by
16   * the Free Software Foundation; either version 2 of the License, or
17   * (at your option) any later version.
18   *
19   * This program is distributed in the hope that it will be useful,
20   * but WITHOUT ANY WARRANTY; without even the implied warranty of
21   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22   * GNU General Public License for more details.
23   *
24   */
25
26 package org.ocera.orte.tools;
27
28
29 public class Conversions {
30
31    /** load native library 'libjorte.so' */
32    static {
33       System.loadLibrary("jorte");
34    }
35
36
37   /** native methods */
38
39   /**
40    * IPAddressToString - converts and return IP address from number
41    * notation into its dot notation in string
42    *
43    * @param ipAddress source IP address in number notation
44    * @return IP address in string(dot) notation
45    */
46    public static native
47    String IPAddressToString(long ipAddress);
48
49
50   /**
51    * StringToIPAddress - converts IP and returns address from dot notation
52    * -string into its number notation
53    *
54    * @param ipAddress source IP address in string(dot) notation
55    * @return IP address in number notation
56    */
57    public static native
58    long StringToIPAddress(String ipAddress);
59
60
61
62
63 }
64