Package org.yamcs.mdb

Class Mdb

All Implemented Interfaces:
Serializable

public class Mdb extends XtceDb
Wraps an Mdb object.

Offers persistence capabilities for selected subtrees.

See Also:
  • Constructor Details

  • Method Details

    • addParameter

      public void addParameter(Parameter p, boolean addSpaceSystem, boolean addParameterType) throws IOException
      Throws:
      IOException
    • addParameters

      public void addParameters(List<Parameter> parameters, boolean createSpaceSystems, boolean createParameterTypes) throws IOException
      Adds parameters to the MDB after which it persist the corresponding subtree to the file

      If any of spacesystems of the parameters are not writable, an IllegalArgumentException will be thrown and no parameter will be added

      Throws:
      IOException
    • addParameterType

      public void addParameterType(ParameterType ptype, boolean createSpaceSystem) throws IOException
      Throws:
      IOException
    • addParameterTypes

      public void addParameterTypes(List<ParameterType> ptypeList, boolean createSpaceSystem) throws IOException
      Throws:
      IOException
    • createSystemParameter

      public SystemParameter createSystemParameter(String parameterQualifiedNamed, ParameterType ptype, String shortDescription)
      Creates and returns a system parameter with the given qualified name. If the parameter already exists it is returned.
      Parameters:
      parameterQualifiedNamed - - the name of the parmaeter to be created. It must start with XtceDb.YAMCS_SPACESYSTEM_NAME
      ptype -
      Returns:
      the parameter created or already existing.
      Throws:
      IllegalArgumentException - if the parameterQualifiedNamed does not start with XtceDb.YAMCS_SPACESYSTEM_NAME
    • addSystemParameterType

      public ParameterType addSystemParameterType(ParameterType ptype)
      Adds a parameter type to the MDB. The type has to have the qualified name set and start with XtceDb.YAMCS_SPACESYSTEM_NAME.

      If a type with the same name already exists, it is returned instead. No check is performed that the existing type and the new type are the same or even compatible.

      Parameters:
      ptype -
      Returns: