All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yamcs.scos2k.MibParameter Maven / Gradle / Ivy

Go to download

Implements SCOS 2000 MIB loader including executors for OL expressions and decoding of special SCOS 2000 data types

There is a newer version: 0.2.2
Show newest version
package org.yamcs.scos2k;

import org.yamcs.scos2k.MonitoringData.PcfRecord;
import org.yamcs.xtce.BaseDataType;
import org.yamcs.xtce.DataEncoding;
import org.yamcs.xtce.ParameterType;

public class MibParameter {
    final PcfRecord pcf;

    MibParameter(PcfRecord pcf) {
        this.pcf = pcf;
    }

    public ParameterType ptype;

    boolean hasCalibrator;

    public DataEncoding getEncoding() {
        return ((BaseDataType) ptype).getEncoding();
    }

    public boolean isSynthetic() {
        return pcf.isSynthetic();
    }

    public String name() {
        return pcf.name;
    }

    public int ptc() {
        return pcf.ptc;
    }

    public int pfc() {
        return pcf.pfc;
    }

    public String getTypeName() {
        StringBuilder sb = new StringBuilder();
        sb.append("ptcpfc_").append(pcf.ptc).append("_").append(pcf.pfc)
                .append("_").append(pcf.categ)
                .append("_").append(pcf.natur);

        sb.append("_");
        if (pcf.curtx != null) {
            sb.append(pcf.curtx);
        }

        sb.append("_");
        if (pcf.inter != null) {
            sb.append(pcf.inter);
        }

        sb.append("_").append(pcf.vplb);
        if (pcf.unit != null) {
            sb.append("_").append(pcf.unit.replace("/", "").replace("%", ""));
        }

        return sb.toString();
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy