Giter VIP home page Giter VIP logo

xtce-rs's Introduction

xtce-rs

Prototype software for working with XTCE from Rust.

For the moment it can load an XTCE file and can do some TM processing.

xtce-rs's People

Contributors

fqqb avatar jdiez17 avatar xpromache avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

eclaus jdiez17

xtce-rs's Issues

Support for multiple space systems

Hi! I'm trying to use xtce-rs to extract arguments from command buffers (and in the future I'd also like to create commands/telemetry containers in Rust from given parameters).

I'm new to XTCE/YAMCS and such but I have found the ACubeSAT yamcs instance which contains XTCE descriptions for many PUS services, which I'd also like to use in my project.

My first naïve attempt was to do something like this:

use std::path::Path;
use xtce_rs::{mdb::MissionDatabase, parser, proc::containers::process};
use env_logger;


fn main() {
    env_logger::init();
    let mut mdb = MissionDatabase::new();
    let paths = [
        "yamcs-instance/src/main/yamcs/mdb/common/dt/base-dt.xml",
        //"yamcs-instance/src/main/yamcs/mdb/common/dt/dt.xml",
        "yamcs-instance/src/main/yamcs/mdb/services/ST[03].xml"
    ];

    for path in paths {
        println!("Parsing {}", path);
        parser::parse(&mut mdb, Path::new(path)).unwrap();
    }
}

I got an UndefinedReference("/base-dt/uint8_t", ParameterType) - meaning that it could not find a reference to the /base-dt/ SpaceSystem. Looking into the parser::parse() function it is obvious why it doesn't work; the NameTree is created reinitalized on every call to parse.

I also tried futzing around with making my own parse function that takes a mutable NameTree but I still wasn't able to parse multiple XTCE files.

So my questions are:

  • is it right that splitting the telecommand/telemetry definitons into multiple files / space systems is the recommended approach?
  • do you have any pointers on how to parse multiple XTCE files in xtce-rs?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.