C# Samples

Top  Previous  Next

These sample applications demonstrate various ways to use the C# interface for the Runtime API. To build and run the sample applications written for the C# interface in Windows, open the solution file (examples.sln) in Visual Studio 2013 and later. To run the applications on Linux instead, there are two options for building and running them as listed below.

1.Open the solution file (examples.sln) in the MonoDevelop open-source IDE.

2.Use the Mono development platform to build and run the solution file from the terminal:

a)Use the xbuild tool to build the solution file.

b)Use mono to run the executable located in <SAMPLE FOLDER>/bin/x64/Debug/.

 

Note: The solution file containing these examples is compatible with Visual Studio 2013 and higher.

 

Jump to an application description in the following table:

 

Example

Complex Multi-Engine Asynchronous

Pass Script to FreeFlyer Through a GUI

 

 

Complex Multi-Engine Asynchronous

This example demonstrates a more complex usage of the runtime API in which four engines are used to execute two Mission Plans asynchronously and asynchronous data is used to coordinate information between the Mission Plans and the application. In this application, the C# runtime API interface is used to read and synch the epochs of a set of two line elements (TLEs). The first Mission Plan that is run reads the epoch of an input TLE and returns it to the application. This Mission Plan is executed asynchronously for each TLE in the set. The application then finds the latest epoch from the set and asynchronously calls the second Mission Plan to synch the TLEs to the latest epoch and report the results to file.

 

For more information on the topics covered by this example, see the Using the Runtime API and Asynchronous Programming guides.

 

Pass Script to FreeFlyer Through a GUI

This application uses a WinForm GUI interface to obtain arbitrary FreeFlyer script that is then executed via the C# runtime API interface within the FreeFlyer engine. This example demonstrates a very powerful concept of using FreeFlyer entirely as a service where even the code itself is generated outside of the FreeFlyer GUI.

 

The GUI that takes in the script from the user to use with the runtime API.

The GUI that takes in the script from the user to use with the runtime API.

 

Note: This example requires the GTK# package to function on Linux.

 

For more information on the topics covered by this example, see the Using the Runtime API guide.