Skip to content

lsst-ts/ts_mtm2_controller

Repository files navigation

M2 Controller

This is the M2 control system.

Install the Rust in cRIO and Run the Application

Follow here to install the Rust in cRIO.

To avoid the stack overflow, do the following in the cRIO:

ulimit -s unlimited

To run the application in the simulation mode by cargo, do:

cargo run -- -s

You can interrupt the running application by ctrl + c.

To get more information, do:

cargo run -- -h

Build the Executable

Do the following to build the executable:

cargo build --release

This will generate an optimized executable in the target/release/ directory, which is suitable for distribution.

Deployment

The details can follow deployment.

Configuration Files

See the config/ directory for the configuration files:

Script

Some useful scripts are in script/ directory.

  1. m2: Initialization file in the Linux system.

Log Data

The logging files contain the mirror position are in the log/ directory.

System Log

While the application is running, you can see the system log in the log/application.log. The logging level can be changed by the -l option when starting the application.

Code Format

To format the code, do:

.githooks/pre-commit

Docker File

The docker file is here that contains the dependencies to generate the test and coverage reports to support the CI integration.

Unit Test

Each module and function have the related unit tests. Since the CI test is needed, you can use the cargo-nextest instead of the built-in test framework. Do the following to run all tests:

cargo nextest run

To test a single module, do:

cargo nextest run --lib $module_name

To generate the junit.xml (ouput path is target/nextest/ci/junit.xml), do:

cargo nextest run --profile ci

Software Architecture

See here for the design of software.

UML Diagrams

The UML diagrams are used to detail the system design for each subsystem in the doc/ directory. The GitHub supports the Mermaid natively. You can use the online editor to edit them.

Version History

See here for the version history.

About

M2 controller in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages