Changeset 79 in tmcsimulator for trunk


Ignore:
Timestamp:
10/05/2017 12:51:23 PM (9 years ago)
Author:
jtorres
Message:

new atmsdriver package in trunk. fep_rpc_client dynamic data packing added in branches. fep_rpc_client refactored data packing code into static DataPacker? class. Added vds_data folder into config/. Added new project configuration for ATMSDriver.

Location:
trunk
Files:
15 added
6 edited
6 copied

Legend:

Unmodified
Added
Removed
  • trunk/IDE_metadata/NetBeans/TMCSim/nbproject/build-impl.xml

    r12 r79  
    5555    </target> 
    5656    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> 
    57         <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/> 
    58         <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/> 
    59         <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/> 
    60         <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/> 
    61         <condition property="platform.javac" value="${platform.home}/bin/javac"> 
    62             <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/> 
    63         </condition> 
    64         <property name="platform.javac" value="${platform.javac.tmp}"/> 
    65         <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/> 
    66         <condition property="platform.java" value="${platform.home}/bin/java"> 
    67             <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/> 
    68         </condition> 
    69         <property name="platform.java" value="${platform.java.tmp}"/> 
    70         <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/> 
    71         <condition property="platform.javadoc" value="${platform.home}/bin/javadoc"> 
    72             <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/> 
    73         </condition> 
    74         <property name="platform.javadoc" value="${platform.javadoc.tmp}"/> 
    75         <condition property="platform.invalid" value="true"> 
    76             <or> 
    77                 <contains string="${platform.javac}" substring="$${platforms."/> 
    78                 <contains string="${platform.java}" substring="$${platforms."/> 
    79                 <contains string="${platform.javadoc}" substring="$${platforms."/> 
    80             </or> 
    81         </condition> 
    82         <fail unless="platform.home">Must set platform.home</fail> 
    83         <fail unless="platform.bootcp">Must set platform.bootcp</fail> 
    84         <fail unless="platform.java">Must set platform.java</fail> 
    85         <fail unless="platform.javac">Must set platform.javac</fail> 
    86         <fail if="platform.invalid"> 
    87  The J2SE Platform is not correctly set up. 
    88  Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.  
    89  Either open the project in the IDE and setup the Platform with the same name or add it manually. 
    90  For example like this: 
    91      ant -Duser.properties.file=&lt;path_to_property_file&gt; jar (where you put the property "platforms.${platform.active}.home" in a .properties file) 
    92   or ant -Dplatforms.${platform.active}.home=&lt;path_to_JDK_home&gt; jar (where no properties file is used)  
    93   </fail> 
     57        <property name="platform.java" value="${java.home}/bin/java"/> 
    9458        <available file="${manifest.file}" property="manifest.available"/> 
    9559        <condition property="splashscreen.available"> 
     
    10973            </and> 
    11074        </condition> 
    111         <condition property="manifest.available+main.class"> 
    112             <and> 
    113                 <isset property="manifest.available"/> 
    114                 <isset property="main.class.available"/> 
     75        <condition property="profile.available"> 
     76            <and> 
     77                <isset property="javac.profile"/> 
     78                <length length="0" string="${javac.profile}" when="greater"/> 
     79                <matches pattern="1\.[89](\..*)?" string="${javac.source}"/> 
    11580            </and> 
    11681        </condition> 
    11782        <condition property="do.archive"> 
    118             <not> 
    119                 <istrue value="${jar.archive.disabled}"/> 
    120             </not> 
     83            <or> 
     84                <not> 
     85                    <istrue value="${jar.archive.disabled}"/> 
     86                </not> 
     87                <istrue value="${not.archive.disabled}"/> 
     88            </or> 
    12189        </condition> 
    12290        <condition property="do.mkdist"> 
     
    12997            </and> 
    13098        </condition> 
    131         <condition property="manifest.available+main.class+mkdist.available"> 
    132             <and> 
    133                 <istrue value="${manifest.available+main.class}"/> 
    134                 <isset property="do.mkdist"/> 
    135             </and> 
    136         </condition> 
    13799        <condition property="do.archive+manifest.available"> 
    138100            <and> 
     
    153115            </and> 
    154116        </condition> 
    155         <condition property="do.archive+manifest.available+main.class"> 
    156             <and> 
    157                 <istrue value="${manifest.available+main.class}"/> 
     117        <condition property="do.archive+profile.available"> 
     118            <and> 
     119                <isset property="profile.available"/> 
    158120                <istrue value="${do.archive}"/> 
    159121            </and> 
    160         </condition> 
    161         <condition property="manifest.available-mkdist.available"> 
    162             <or> 
    163                 <istrue value="${manifest.available}"/> 
    164                 <isset property="do.mkdist"/> 
    165             </or> 
    166         </condition> 
    167         <condition property="manifest.available+main.class-mkdist.available"> 
    168             <or> 
    169                 <istrue value="${manifest.available+main.class}"/> 
    170                 <isset property="do.mkdist"/> 
    171             </or> 
    172122        </condition> 
    173123        <condition property="have.tests"> 
     
    224174        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> 
    225175        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> 
    226             <length length="0" string="${endorsed.classpath}" when="greater"/> 
    227         </condition> 
     176            <and> 
     177                <isset property="endorsed.classpath"/> 
     178                <not> 
     179                    <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> 
     180                </not> 
     181            </and> 
     182        </condition> 
     183        <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> 
     184            <isset property="profile.available"/> 
     185        </condition> 
     186        <condition else="false" property="jdkBug6558476"> 
     187            <and> 
     188                <matches pattern="1\.[56]" string="${java.specification.version}"/> 
     189                <not> 
     190                    <os family="unix"/> 
     191                </not> 
     192            </and> 
     193        </condition> 
     194        <property name="javac.fork" value="${jdkBug6558476}"/> 
    228195        <property name="jar.index" value="false"/> 
    229196        <property name="jar.index.metainf" value="${jar.index}"/> 
     
    294261                <mkdir dir="${empty.dir}"/> 
    295262                <mkdir dir="@{apgeneratedsrcdir}"/> 
    296                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
     263                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
    297264                    <src> 
    298265                        <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 
     
    304271                    </classpath> 
    305272                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> 
     273                    <compilerarg line="${javac.profile.cmd.line.arg}"/> 
    306274                    <compilerarg line="${javac.compilerargs}"/> 
    307275                    <compilerarg value="-processorpath"/> 
     
    333301                <property location="${build.dir}/empty" name="empty.dir"/> 
    334302                <mkdir dir="${empty.dir}"/> 
    335                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
     303                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
    336304                    <src> 
    337305                        <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 
     
    343311                    </classpath> 
    344312                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> 
     313                    <compilerarg line="${javac.profile.cmd.line.arg}"/> 
    345314                    <compilerarg line="${javac.compilerargs}"/> 
    346315                    <customize/> 
     
    413382            <sequential> 
    414383                <property name="junit.forkmode" value="perTest"/> 
    415                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
     384                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
    416385                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> 
    417386                    <syspropertyset> 
     
    436405            <sequential> 
    437406                <property name="junit.forkmode" value="perTest"/> 
    438                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
     407                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
    439408                    <batchtest todir="${build.test.results.dir}"> 
    440409                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 
     
    475444                </union> 
    476445                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> 
    477                 <testng classfilesetref="test.set" failureProperty="tests.failed" jvm="${platform.java}" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="TMCSim" testname="TestNG tests" workingDir="${work.dir}"> 
     446                <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="TMCSim" testname="TestNG tests" workingDir="${work.dir}"> 
    478447                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> 
    479448                    <propertyset> 
     
    555524            <sequential> 
    556525                <property name="junit.forkmode" value="perTest"/> 
    557                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
     526                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
    558527                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> 
    559528                    <syspropertyset> 
     
    580549            <sequential> 
    581550                <property name="junit.forkmode" value="perTest"/> 
    582                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
     551                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
    583552                    <batchtest todir="${build.test.results.dir}"> 
    584553                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 
     
    760729                        <path path="@{classpath}"/> 
    761730                    </classpath> 
    762                     <bootclasspath> 
    763                         <path path="${platform.bootcp}"/> 
    764                     </bootclasspath> 
    765731                </nbjpdastart> 
    766732            </sequential> 
     
    778744    </target> 
    779745    <target name="-init-debug-args"> 
    780         <exec executable="${platform.java}" outputproperty="version-output"> 
    781             <arg value="-version"/> 
    782         </exec> 
     746        <property name="version-output" value="java version &quot;${ant.java.version}"/> 
    783747        <condition property="have-jdk-older-than-1.4"> 
    784748            <or> 
     
    805769            <element name="customize" optional="true"/> 
    806770            <sequential> 
    807                 <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> 
     771                <java classname="@{classname}" dir="${work.dir}" fork="true"> 
    808772                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
    809773                    <jvmarg line="${debug-args-line}"/> 
     
    832796            <element name="customize" optional="true"/> 
    833797            <sequential> 
    834                 <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> 
     798                <java classname="@{classname}" dir="${work.dir}" fork="true"> 
    835799                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
    836800                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> 
     
    871835                </pathconvert> 
    872836                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> 
    873                 <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> 
    874                     <fileset dir="${build.classes.dir}"/> 
     837                <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> 
     838                    <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> 
    875839                    <manifest> 
    876840                        <attribute name="Class-Path" value="${jar.classpath}"/> 
     
    884848        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> 
    885849            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> 
    886                 <j2seproject1:fileset dir="${build.classes.dir}"/> 
     850                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> 
    887851            </jar> 
    888852        </presetdef> 
     
    1000964        <!-- You can override this target in the ../build.xml file. --> 
    1001965    </target> 
    1002     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> 
    1003         <j2seproject1:jar/> 
    1004     </target> 
    1005     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> 
    1006         <j2seproject1:jar manifest="${manifest.file}"/> 
    1007     </target> 
    1008     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available"> 
    1009         <j2seproject1:jar manifest="${manifest.file}"> 
    1010             <j2seproject1:manifest> 
    1011                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/> 
    1012             </j2seproject1:manifest> 
    1013         </j2seproject1:jar> 
     966    <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> 
     967        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> 
     968        <touch file="${tmp.manifest.file}" verbose="false"/> 
     969    </target> 
     970    <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> 
     971        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> 
     972        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> 
     973    </target> 
     974    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> 
     975        <manifest file="${tmp.manifest.file}" mode="update"> 
     976            <attribute name="Main-Class" value="${main.class}"/> 
     977        </manifest> 
     978    </target> 
     979    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> 
     980        <manifest file="${tmp.manifest.file}" mode="update"> 
     981            <attribute name="Profile" value="${javac.profile}"/> 
     982        </manifest> 
     983    </target> 
     984    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> 
     985        <basename file="${application.splash}" property="splashscreen.basename"/> 
     986        <mkdir dir="${build.classes.dir}/META-INF"/> 
     987        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> 
     988        <manifest file="${tmp.manifest.file}" mode="update"> 
     989            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> 
     990        </manifest> 
     991    </target> 
     992    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> 
     993        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> 
    1014994        <echo level="info">To run this application from the command line without Ant, try:</echo> 
     995        <property location="${dist.jar}" name="dist.jar.resolved"/> 
     996        <echo level="info">java -jar "${dist.jar.resolved}"</echo> 
     997    </target> 
     998    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> 
     999        <j2seproject1:jar manifest="${tmp.manifest.file}"/> 
    10151000        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> 
    10161001        <property location="${dist.jar}" name="dist.jar.resolved"/> 
     
    10191004            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> 
    10201005        </pathconvert> 
    1021         <echo level="info">${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
    1022     </target> 
    1023     <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> 
    1024         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> 
    1025         <touch file="${tmp.manifest.file}" verbose="false"/> 
    1026     </target> 
    1027     <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> 
    1028         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> 
    1029         <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> 
    1030     </target> 
    1031     <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> 
    1032         <manifest file="${tmp.manifest.file}" mode="update"> 
    1033             <attribute name="Main-Class" value="${main.class}"/> 
    1034         </manifest> 
    1035     </target> 
    1036     <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> 
    1037         <basename file="${application.splash}" property="splashscreen.basename"/> 
    1038         <mkdir dir="${build.classes.dir}/META-INF"/> 
    1039         <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> 
    1040         <manifest file="${tmp.manifest.file}" mode="update"> 
    1041             <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> 
    1042         </manifest> 
    1043     </target> 
    1044     <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> 
    1045         <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> 
    1046         <echo level="info">To run this application from the command line without Ant, try:</echo> 
    1047         <property location="${dist.jar}" name="dist.jar.resolved"/> 
    1048         <echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo> 
    1049     </target> 
    1050     <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> 
     1006        <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> 
     1007            <isset property="main.class.available"/> 
     1008        </condition> 
     1009        <condition else="debug" property="jar.usage.level" value="info"> 
     1010            <isset property="main.class.available"/> 
     1011        </condition> 
     1012        <echo level="${jar.usage.level}" message="${jar.usage.message}"/> 
     1013    </target> 
     1014    <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> 
    10511015        <delete> 
    10521016            <fileset file="${tmp.manifest.file}"/> 
    10531017        </delete> 
    10541018    </target> 
    1055     <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> 
     1019    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> 
     1020    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> 
    10561021    <target name="-post-jar"> 
    10571022        <!-- Empty placeholder for easier customization. --> 
    10581023        <!-- You can override this target in the ../build.xml file. --> 
    10591024    </target> 
    1060     <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/> 
     1025    <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> 
     1026    <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> 
    10611027    <!-- 
    10621028                ================= 
     
    12371203            </and> 
    12381204        </condition> 
    1239         <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> 
     1205        <condition else="" property="bug5101868workaround" value="*.java"> 
     1206            <matches pattern="1\.[56](\..*)?" string="${java.version}"/> 
     1207        </condition> 
     1208        <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> 
    12401209            <classpath> 
    12411210                <path path="${javac.classpath}"/> 
    12421211            </classpath> 
    1243             <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> 
     1212            <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> 
    12441213                <filename name="**/*.java"/> 
    12451214            </fileset> 
     
    13151284    </target> 
    13161285    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> 
    1317         <j2seproject3:test testincludes="**/*Test.java"/> 
     1286        <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/> 
    13181287    </target> 
    13191288    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> 
  • trunk/IDE_metadata/NetBeans/TMCSim/nbproject/genfiles.properties

    r12 r79  
    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. 
    6 nbproject/build-impl.xml.data.CRC32=e14f63c1 
    7 nbproject/build-impl.xml.script.CRC32=53f7f34a 
    8 nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46 
     6nbproject/build-impl.xml.data.CRC32=6c7221c6 
     7nbproject/build-impl.xml.script.CRC32=5cb245d6 
     8nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 
  • trunk/IDE_metadata/NetBeans/TMCSim/nbproject/project.properties

    r59 r79  
    7272meta.inf.dir=${src.dir}/META-INF 
    7373mkdist.disabled=false 
    74 platform.active=JDK_1.7 
     74platform.active=default_platform 
    7575run.classpath=\ 
    7676    ${javac.classpath}:\ 
  • trunk/IDE_metadata/NetBeans/TMCSim/nbproject/project.xml

    r12 r79  
    55        <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> 
    66            <name>TMCSim</name> 
    7             <explicit-platform explicit-source-supported="true"/> 
    87            <source-roots> 
    98                <root id="src.dir"/> 
  • trunk/config/paramics_simulator_config.properties

    r60 r79  
    1 WorkingDirectory    = C:/paramics/ 
    2 #WorkingDirectory    = .\/ 
     1#WorkingDirectory    = C:/paramics/ 
     2WorkingDirectory    = ./ 
    33IncidentUpdateFile  = exchange.xml 
    44ParamicsStatusFile  = paramics_status.xml 
  • trunk/src/atmsdriver/ATMSDriver.java

    r77 r79  
    11package atmsdriver; 
    22 
    3 import atmsdriver.network.model.Network; 
     3import atmsdriver.model.Network; 
    44import java.io.File; 
     5import java.io.FileInputStream; 
     6import java.util.Properties; 
    57import java.util.logging.Level; 
    68import java.util.logging.Logger; 
    79 
    8 /**  
     10/** 
    911 * 
    1012 * @author John A. Torres 
    1113 * @version 09/10/2017 
    1214 */ 
    13 public class ATMSDriver { 
    14     final private String ldsFileName = "./lds_data/lookup_lds"; 
    15     final private String loopFileName = "./lds_data/lookup_loop"; 
    16     final private String networkFileName = "./networkFile.txt"; 
     15public class ATMSDriver implements Runnable { 
     16 
     17    /** ATMSDriver Error logger. */ 
     18    private static Logger ATMSDriverLogger = Logger.getLogger("atmsdriver"); 
     19 
     20    private static final String CONFIG_FILE_NAME = "atms_driver_config.properties"; 
     21 
     22    /** Properties object for the CADClient class. */ 
     23    private Properties ATMSDriverProperties; 
     24 
     25    /** 
     26     * Enumeration containing properties name values. See ATMSDriver class 
     27     * description for more information. 
     28     * 
     29     * @author John Torres 
     30     * @see ATMSDriver 
     31     */ 
     32    private static enum PROPERTIES { 
     33 
     34        LDS_FILE_NAME("LDSFileName"), 
     35        LOOP_FILE_NAME("LoopFileName"), 
     36        NETWORK_FILE_NAME("NetworkFileName"), 
     37        EXCHANGE_FILE_NAME("ExchangeFileName"); 
     38 
     39        public String name; 
     40 
     41        private PROPERTIES(String n) { 
     42            name = n; 
     43        } 
     44    } 
     45 
     46    /** Network model. */ 
    1747    final private Network network; 
    1848     
    19     public ATMSDriver() 
    20     { 
    21         File ldsFile = new File(ldsFileName); 
    22         File loopFile = new File(loopFileName); 
    23         File networkFile = new File(networkFileName); 
    24         network = new Network(ldsFile, loopFile, networkFile); 
    25         try { 
     49    /** Sleep Time (10 seconds). **/ 
     50    private static final int SLEEP_TIME = 10000; 
     51     
     52    /** Exchange Reader */ 
     53    private ExchangeReader exchangeReader; 
     54     
     55    @Override 
     56    public void run() { 
     57        // Check for packets and update the simulator 
     58        for (;;) { 
     59            // Flush the input file 
     60            ExchangeInfo exInfo = exchangeReader.parse(ATMSDriverProperties 
     61                    .getProperty(PROPERTIES.EXCHANGE_FILE_NAME.name)); 
    2662            network.toXML(); 
    27         } catch (Exception ex) { 
    28             Logger.getLogger(ATMSDriver.class.getName()).log(Level.SEVERE, null, ex); 
     63            // Update if packet is recieved 
     64            if (exInfo != null) { 
     65                System.out.println("Grabbed"); 
     66            } 
     67 
     68            // Sleep 
     69            try { 
     70                Thread.sleep(SLEEP_TIME); 
     71            } catch (InterruptedException ie) { 
     72                 
     73            } 
    2974        } 
    3075    } 
    31      
     76 
     77    public ATMSDriver(String propertiesFile) { 
     78 
     79        if (!verifyProperties(propertiesFile)) { 
     80            System.exit(0); 
     81        } 
     82 
     83        network = new Network( 
     84                new File(ATMSDriverProperties.getProperty( 
     85                                PROPERTIES.LDS_FILE_NAME.name)), 
     86                new File(ATMSDriverProperties.getProperty( 
     87                                PROPERTIES.LOOP_FILE_NAME.name)), 
     88                new File(ATMSDriverProperties.getProperty( 
     89                                PROPERTIES.NETWORK_FILE_NAME.name))); 
     90        network.toXML(); 
     91        exchangeReader = new ExchangeReader(); 
     92    } 
     93 
     94    private boolean verifyProperties(String propertiesFile) { 
     95        // Load the properties file. 
     96        try { 
     97            ATMSDriverProperties = new Properties(); 
     98            ATMSDriverProperties.load(new FileInputStream(propertiesFile)); 
     99        } catch (Exception e) { 
     100            ATMSDriverLogger.logp(Level.SEVERE, "ATMSDriver", 
     101                    "Constructor", "Exception in reading properties file.", e); 
     102        } 
     103 
     104        return true; 
     105    } 
     106 
    32107    /** 
    33      * @param args the command line arguments 
     108     * Runs the Paramics simulator. 
    34109     */ 
    35110    public static void main(String[] args) { 
    36         ATMSDriver driver = new ATMSDriver(); 
     111        try { 
     112            if (System.getProperty("ATMSDRIVER_PROPERTIES") != null) { 
     113                new Thread(new ATMSDriver(System.getProperty( 
     114                        "ATMSDRIVER_PROPERTIES"))).start(); 
     115            } else { 
     116                throw new Exception("ATMSDRIVER_PROPERTIES system property not defined."); 
     117            } 
     118        } catch (Exception e) { 
     119            ATMSDriverLogger.logp(Level.SEVERE, "ATMSDriver", "Main", 
     120                    "Error occured initializing application", e); 
     121            System.exit(-1); 
     122        } 
    37123    } 
    38      
    39124} 
  • trunk/src/atmsdriver/NetworkLoader.java

    r77 r79  
    11package atmsdriver; 
    22 
    3 import atmsdriver.network.model.FEPLine; 
    4 import atmsdriver.network.model.LoopDetectorStation; 
    5 import atmsdriver.network.model.LoopDetector; 
    6 import atmsdriver.network.model.LoopDetectorStation.DIRECTION; 
     3import atmsdriver.model.FEPLine; 
     4import atmsdriver.model.LoopDetectorStation; 
     5import atmsdriver.model.LoopDetector; 
     6import atmsdriver.model.LoopDetectorStation.DIRECTION; 
    77import java.io.File; 
    88import java.io.FileNotFoundException; 
     
    3030 * @version 09/10/2017 
    3131 */ 
    32 public class NetworkReader { 
     32public class NetworkLoader { 
    3333    // Two network config files 
    3434    private final File LDSFile; 
     
    4343     * @param loopFile contains individual LoopDetector static data 
    4444     */ 
    45     public NetworkReader(File LDSFile, File loopFile) 
     45    public NetworkLoader(File LDSFile, File loopFile) 
    4646    { 
    4747        this.LDSFile = LDSFile; 
     
    176176            } 
    177177        } catch (FileNotFoundException ex) { 
    178             Logger.getLogger(NetworkReader.class.getName()).log(Level.SEVERE, null, ex); 
     178            Logger.getLogger(NetworkLoader.class.getName()).log(Level.SEVERE, null, ex); 
    179179        } 
    180180    } 
  • trunk/src/atmsdriver/model/FEPLine.java

    r77 r79  
    1 package atmsdriver.network.model; 
     1package atmsdriver.model; 
    22 
    33import java.util.List; 
  • trunk/src/atmsdriver/model/LoopDetector.java

    r77 r79  
    1 package atmsdriver.network.model; 
     1package atmsdriver.model; 
    22 
    33import java.util.ArrayList; 
  • trunk/src/atmsdriver/model/LoopDetectorStation.java

    r77 r79  
    1 package atmsdriver.network.model; 
     1package atmsdriver.model; 
    22 
    33import java.util.List; 
  • trunk/src/atmsdriver/model/Network.java

    r77 r79  
    1 package atmsdriver.network.model; 
     1package atmsdriver.model; 
    22 
    3 import atmsdriver.NetworkReader; 
     3import atmsdriver.NetworkLoader; 
    44import java.io.File; 
    55import java.io.FileWriter; 
     6import java.io.IOException; 
    67import java.io.StringWriter; 
    78import java.io.Writer; 
     
    1415import javax.xml.transform.OutputKeys; 
    1516import javax.xml.transform.Transformer; 
     17import javax.xml.transform.TransformerConfigurationException; 
     18import javax.xml.transform.TransformerException; 
    1619import javax.xml.transform.TransformerFactory; 
    1720import javax.xml.transform.dom.DOMSource; 
     
    3134    { 
    3235        lines = (ArrayList<FEPLine>)  
    33                 new NetworkReader(LDSFile, loopFile).getFEPLines(); 
     36                new NetworkLoader(LDSFile, loopFile).getFEPLines(); 
    3437        this.networkFile = networkFile; 
    3538    } 
    3639     
    37     public void toXML() throws Exception 
     40    public void toXML() 
    3841    { 
    3942        try { 
     
    6669             
    6770             
    68         } catch (ParserConfigurationException ex) { 
     71        } catch (Exception ex) { 
    6972            Logger.getLogger(Network.class.getName()).log(Level.SEVERE, null, ex); 
    7073        } 
  • trunk/src/tmcsim/application.properties

    r66 r79  
    1 #Thu, 16 Mar 2017 12:41:52 -0700 
     1#Thu, 05 Oct 2017 10:44:21 -0700 
    22 
    3 Application.revision=65 
     3Application.revision=67 
    44 
    55Application.buildnumber=46 
Note: See TracChangeset for help on using the changeset viewer.