Skip to content

Commit b6c19a9

Browse files
committed
Fixed some FSUIPC class and primitive data requests bugs, added some helper classes.
More sprcifically: Added: Some Junit tests. Added: Added the LuaHelper, MacroHelper and LVarHelper classes. Added: The FSUIPCLVarLuaMacroTest.java into the FSUIPCSimpleTest project to show the usage of the added classes and to test them. Added: isConnected function to the FSUIPC class. Fixed: Constructors of primitive data request that takes initial value (constructs WRITE data request) always ended with Exception due to missing command.
1 parent 8b9e93f commit b6c19a9

File tree

270 files changed

+38556
-62336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+38556
-62336
lines changed

CHANGELOG.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
3.1.2021
2+
3+
Added: Some Junit tests.
4+
Added: Added the LuaHelper, MacroHelper and LVarHelper classes.
5+
Added: The FSUIPCLVarLuaMacroTest.java into the FSUIPCSimpleTest project to show the usage of the added classes and to test them.
6+
Added: isConnected function to the FSUIPC class.
7+
Fixed: Constructors of primitive data request that takes initial value (constructs WRITE data request) always ended with Exception due to missing command.
8+
9+
19.1.2021
10+
11+
Some internal changes and fixes in the FSUIPC class. For example, it was not possible to start processing requests again after disconnecting/connecting again. Some cleanup was not being done.
12+
13+
25.9.2020
14+
15+
First release.

FSUIPC/build.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@
7070
nbproject/build-impl.xml file.
7171
7272
-->
73+
<target name="-post-jar" description="bundle sources and javadoc in a jar" depends="javadoc">
74+
<jar compress="${jar.compress}" basedir="${src.dir}" jarfile="${dist.dir}/${application.title}-sources.jar"/>
75+
<jar compress="${jar.compress}" basedir="${test.src.dir}" jarfile="${dist.dir}/${application.title}-test.jar"/>
76+
<jar compress="${jar.compress}" basedir="${dist.javadoc.dir}" jarfile="${dist.dir}/${application.title}-javadoc.jar"/>
77+
</target>
7378
</project>

FSUIPC/fsuipc_java32.dll

381 KB
Binary file not shown.

FSUIPC/fsuipc_java64.dll

410 KB
Binary file not shown.

FSUIPC/nbproject/build-impl.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,7 @@ is divided into following sections:
16861686
</target>
16871687
<target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
16881688
<target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1689+
<target depends="debug-test-method" name="debug-single-method"/>
16891690
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
16901691
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
16911692
</target>

FSUIPC/nbproject/genfiles.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ [email protected]
44
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
55
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
66
nbproject/build-impl.xml.data.CRC32=2f6d8a78
7-
nbproject/build-impl.xml.script.CRC32=ab6d7d89
8-
nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.96.0.48
7+
nbproject/build-impl.xml.script.CRC32=d6daf9dd
8+
nbproject/build-impl.xml.stylesheet.CRC32=d549e5cc@1.97.0.48

FSUIPC/nbproject/private/private.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ do.jlink=false
55
javac.debug=true
66
javadoc.preview=true
77
jlink.strip=false
8-
user.properties.file=C:\\Users\\Murdock\\AppData\\Roaming\\NetBeans\\12.1\\build.properties
8+
user.properties.file=C:\\Users\\Murdock\\AppData\\Roaming\\NetBeans\\12.2\\build.properties

FSUIPC/nbproject/private/private.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
44
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
55
<group>
6-
<file>file:/P:/Java/Murdock_FSUIPC/FSUIPC/src/com/mouseviator/fsuipc/FSUIPC.java</file>
6+
<file>file:/P:/Java/Murdock_FSUIPC/FSUIPC/src/com/mouseviator/fsuipc/helpers/aircraft/Engine1Helper.java</file>
77
</group>
88
</open-files>
99
</project-private>

FSUIPC/nbproject/project.properties

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@ javac.source=15
5151
javac.target=15
5252
javac.test.classpath=\
5353
${javac.classpath}:\
54-
${build.classes.dir}
54+
${build.classes.dir}:\
55+
${libs.junit_4.classpath}:\
56+
${libs.hamcrest.classpath}
5557
javac.test.modulepath=\
5658
${javac.modulepath}
5759
javac.test.processorpath=\
5860
${javac.test.classpath}
5961
javadoc.additionalparam=-overview "p:\\Java\\Murdock_FSUIPC\\FSUIPC\\src\\overview.html"
6062
javadoc.author=true
6163
javadoc.encoding=${source.encoding}
62-
javadoc.html5=false
64+
javadoc.html5=true
6365
javadoc.noindex=false
6466
javadoc.nonavbar=false
6567
javadoc.notree=false

FSUIPC/src/com/mouseviator/fsuipc/FSUIPC.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import java.util.logging.Logger;
3333

3434
/**
35-
* <h3>General description</h3>
35+
* <h2>General description</h2>
3636
*
3737
* <p>
3838
* This is another FSUIPC wrapper class... This one uses {@link FSUIPCWrapper}
@@ -404,7 +404,7 @@ public static synchronized FSUIPC getInstance() {
404404
}
405405

406406
/**
407-
* This function will try to load 3native library that implements this
407+
* This function will try to load the 32bit/64bit native library that implements this
408408
* wrapper native methods. Note that it tries to determine the architecture
409409
* by reading the "sun.arch.data.model" system property and then call {@link #load32()
410410
* } or {@link #load64() } based on result. The result can also be
@@ -644,6 +644,16 @@ public int connect(FSUIPCWrapper.FSUIPCSimVersion simVersion) {
644644
}
645645
return iRet;
646646
}
647+
648+
/**
649+
* Will return the value of the internal {@link AtomicBoolean} variable that is being updated when
650+
* FSUIPC is connected/disconnected.
651+
*
652+
* @return True if FSUIPC is connected, false otherwise.
653+
*/
654+
public boolean isConnected() {
655+
return this.connected.get();
656+
}
647657

648658
/**
649659
* This method will init thread that will continuously try to connect to
@@ -933,9 +943,7 @@ public IDataRequest addOneTimeRequest(IDataRequest dataRequest) {
933943
}
934944

935945
/**
936-
* This method will add data request to the continual requests array.This
937-
* array will be emptied once successfully processed via the
938-
* {@link #processRequestsOnce()} function.
946+
* This method will add data request to the continual requests array.
939947
*
940948
* @param dataRequest Read or Write data request.
941949
* @return The passed <b>dataRequest</b> if not null, otherwise null.

0 commit comments

Comments
 (0)