Skip to content

Latest commit

 

History

History

sdk

NanoSat MO Framework - SDK

Note that most of the following documentation is deprecated. Please refer to the ReadTheDocs documentation for up to date information.

The SDK contains a set of tools and example projects in order to facilitate quicker development of applications by the framework users.

The SDK depends on the NMF Mission - Software Simulator.

SDK content

Tools

  • Consumer Test Tool - allows consuming all of the services exposed by NMF through an user-friendly GUI
  • Package Assembler - allows packaging space apps into a deliverables to mission

Various space applications demonstrating the uses of the on-board framework.

Various ground applications demonstrating the uses of the ground framework.

Various supporting documents, including:

  • Space Apps Development Guide
  • Ground Apps Development Guide
  • Software Requirements Document
  • Software Design Document
  • Relevant CCSDS standards
  • CCSDS MO Services Interface Control Documents (MO ICDs)
  • Javadocs (only in the SDK Release Package) - aggregated javadocs of the CCSDS MO Framework and the NanoSat MO Framework

SDK Release package

The release packages contain binaries of the tools, most relevant examples, mission simulator GUI, and documentation.

Building a release package

Instructions:

  1. Update the MO ICDs if there were changes in the NMF MO XML files
  2. Invoke mvn clean install target on the main POM file
  3. The packaged SDK can be found under sdk-package/target

Tips:

  • Full build takes some time. Afterwards it is possible to rebuild particular sub-projects individually, or to use mvn install -Dmaven.javadoc.skip=true -Desa.nmf.sdk.assembly.quickbuild=true to speed up the intermediate build process.

Running the SDK

  1. Start the NMF Supervisor from the assembled SDK package, e.g.: $ nmf-sdk-2.0.0/bin/space/nanosat-mo-supervisor-sim/nanosat-mo-supervisor-sim.sh
  2. Start the Consumer Test tool, e.g.: $ nmf-sdk-2.0.0/bin/tools/consumer-test-tool/consumer-test-tool.sh
  3. Connect the CTT to the Supervisor by using the Directory Service MAL URI generated by the Supervisor, printed both in the log of the supervisor, and providerURIs.properties file in the Supervisor working directory. e.g: INFO: URI: maltcp://123.123.123.123:1024/nanosat-mo-supervisor-Directory
  4. Run one of the demo apps, or your own app:
    • Connect to the supervisor
    • Navigate to Apps Launcher Service
    • Select the desired app and press runApp

See section Adding an application to the SDK packaging for more details on including your own application.

Running/Debugging the application from Eclipse IDE

Importing the projects

  1. Go to "File" -> "Import..." -> "Maven" -> "Existing Maven Projects".
  2. Browse to and select the root folder of the nanosat-mo-framework repository.
  3. Uncheck "Add project(s) to working set".
  4. Finish.

All NMF subprojects should be visible inside Eclipse's package explorer.

Running the Supervisor Simulator and the Consumer Test Tool (CTT)

  1. Go to "File" -> "Import" -> "Run/Debug" -> "Launch Configurations" and click "Next".
  2. Use the "Browse..." button to navigate to your nanosat-mo-framework folder and then navigate to sdk/ and select the "launch-configs" folder.
  3. Import both provided launch configurations.
  4. You should be able to view these run configurations by going to "Run" -> "Run Configurations".
  5. Select the CTT and SupervisorSimulator profiles independently and make sure that the parameters are set according to your system.

The parameters for the SupervisorSimulator should be:

Parameter Name Value
exec.args esa.mo.nmf.nanosatmosupervisor.NanosatMOSupervisorBasicImpl
exec.executable PATH_TO_YOUR_JAVA_BIN_DIRECTORY/java
exec.workingdir PATH_TO_THE_NMF/sdk/sdk-package/target/nmf-sdk-2.1.0-SNAPSHOT/bin/space/nanosat-mo-supervisor-sim

The parameters for the CTT should be:

Parameter Name Value
exec.args -classpath %classpath esa.mo.nmf.ctt.guis.ConsumerTestToolGUI
exec.executable PATH_TO_YOUR_JAVA_BIN_DIRECTORY/java
exec.workingdir PATH_TO_THE_NMF/sdk/sdk-package/target/nmf-sdk-2.1.0-SNAPSHOT/bin/tools/consumer-test-tool

You are now able to run the SupervisorSimulator and the CTT.

You can apply the above parameters for your ground software and also for your space apps. Just make sure to enter the correct main classes and the working directories of the compiled apps (e.g. sdk-package/target/nmf-sdk-2.1.0-SNAPSHOT/bin/space/apps/APPNAME).

Fixing the "Plugin execution not covered by lifecycle configuration" message

When developing apps with Maven you may want to invoke some plugins inside your pom.xml. Occasionally, Eclipse's m2e plugin may not be able to understand when to call a certain plugin. In this case, you can add a configuration for the m2e lifecycle mapping plugin inside your pom.xml. You can use the following example (taken from the pom.xml in sdk-package/) for reference.

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>1.8</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.googlecode.maven-download-plugin</groupId>
                    <artifactId>download-maven-plugin</artifactId>
                    <versionRange>1.4.0</versionRange>
                    <goals>
                      <goal>wget</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

Simply add a pluginExecution for the corresponding plugin.

Adding an application to the SDK packaging

sdk-package project represents a self-contained reference execution environment for space and ground applications. In order to add your own application to it, follow these steps:

  1. Make sure that the application is being built and installed in your local maven repository. Note that the app can be built and maintained outside of the NMF source tree.
  2. Open the POM file of int.esa.nmf.sdk.package project (under sdk-package directory)
  3. Add your application to the list of dependencies. E.g:
    <dependency>
      <groupId>com.example</groupId>
      <artifactId>test-nmf-app</artifactId>
      <version>1.2.3-SNAPSHOT</version>
    </dependency>
  1. In the folder sdk/sdk-package/antpkg you find a file build.xml. Add a target with a name of your choice and add the name to the value of the 'depends' attribute of the build target:
    <target name="emit-myapp">
      <ant antfile="antpkg/build_shell_script.xml">
        <property name="mainClass" value="esa.mo.nmf.apps.MyApp"/>
        <property name="id" value="start_myapp"/>
        <property name="binDir" value="apps/myapp"/>
      </ant>
      <ant antfile="antpkg/build_batch_script.xml">
        <property name="mainClass" value="esa.mo.nmf.apps.MyApp"/>
        <property name="id" value="start_myapp"/>
        <property name="binDir" value="apps/myapp"/>
      </ant>
    </target>

Note: The value of the id property has to have the prefix "start_" if you want to start your app from the supervisor.
  1. Add a resource assembly entry for your application to the maven-antrun-plugin plugin execution configuration:
    <copy todir="${esa.nmf.sdk.assembly.outputdir}/bin/space/apps/test-nmf-app">
      <fileset dir="${basedir}/src/main/resources/space-common"/>
      <fileset dir="${basedir}/src/main/resources/space-app-root"/>
    </copy>

Source Code

The source code of the NanoSat MO Framework can be found on GitHub.

Bugs Reporting

Bug Reports can be submitted on: Issues

License

The NanoSat MO Framework is licensed under the European Space Agency Public License (ESA-PL) Weak Copyleft – v2.4.