]> rtime.felk.cvut.cz Git - orte.git/blob - orte/java/src/org/ocera/orte/DomainProp.java
mingw patch
[orte.git] / orte / java / src / org / ocera / orte / DomainProp.java
1 /** DomainProp.java */
2 package org.ocera.orte;
3
4
5 /**
6   * Class DomainProp XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX DOPSAT
7   *
8   * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
9   * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz
10 )
11   * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
12   * @author dedication to Kj
13   * @version 0.1
14   *
15   * This program is free software; you can redistribute it and/or modify
16   * it under the terms of the GNU General Public License as published by
17   * the Free Software Foundation; either version 2 of the License, or
18   * (at your option) any later version.
19   *
20   * This program is distributed in the hope that it will be useful,
21   * but WITHOUT ANY WARRANTY; without even the implied warranty of
22   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23   * GNU General Public License for more details.
24   *
25   */
26
27
28 public class DomainProp {
29
30
31  /* load native library 'libjorte.so' */
32   static {
33      System.loadLibrary("jorte");
34   }
35
36
37  /* handler to C struct with default domain properties  */
38   public int handle = 0;
39
40
41  /**
42   * defaultPropsCreate - create DomainProp with handle to default
43   * domain properties
44   *
45   * @return an object with handle to default domain properties
46   */
47   public static
48   DomainProp defaultPropsCreate() {
49      DomainProp prop = new DomainProp();
50      int handle = jORTEDomainPropDefaultGet();
51      prop.handle = handle;
52      return prop;
53   }
54
55
56  /* ****************************************************************** *
57   *                                                                    *
58   *                         native methods                             *
59   *                                                                    *
60   * ****************************************************************** */
61
62
63  /**
64   * jPropDefaultGet - returns handler to default properties of a domain,
65   * if occures some error return NULL.
66   *
67   * @return handler to default properties of a domain, NULL if error
68   */
69   private static native
70   int jORTEDomainPropDefaultGet();
71
72
73
74 }
75