Package org.yamcs.mdb
Class Mdb
java.lang.Object
org.yamcs.xtce.XtceDb
org.yamcs.mdb.Mdb
- All Implemented Interfaces:
Serializable
Wraps an
Mdb
object.
Offers persistence capabilities for selected subtrees.
- See Also:
-
Field Summary
Fields inherited from class org.yamcs.xtce.XtceDb
algorithms, commands, parameters, parameterTypes, sequenceContainers, spaceSystems, YAMCS_CMD_SPACESYSTEM_NAME, YAMCS_CMDARG_SPACESYSTEM_NAME, YAMCS_CMDHIST_SPACESYSTEM_NAME, YAMCS_SPACESYSTEM_NAME
-
Constructor Summary
ConstructorDescriptionMdb
(SpaceSystem spaceSystem, Map<String, SpaceSystemWriter> susbsystemWriters) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addParameter
(Parameter p, boolean addSpaceSystem, boolean addParameterType) void
addParameters
(List<Parameter> parameters, boolean createSpaceSystems, boolean createParameterTypes) Adds parameters to the MDB after which it persist the corresponding subtree to the filevoid
addParameterType
(ParameterType ptype, boolean createSpaceSystem) void
addParameterTypes
(List<ParameterType> ptypeList, boolean createSpaceSystem) Adds a parameter type to the MDB.createSystemParameter
(String parameterQualifiedNamed, ParameterType ptype, String shortDescription) Creates and returns a system parameter with the given qualified name.Methods inherited from class org.yamcs.xtce.XtceDb
addMetaCommand, addSpaceSystem, buildIndexMaps, containsNamespace, doAddParameter, doAddParameters, doAddParameterType, getAlgorithm, getAlgorithm, getAlgorithm, getAlgorithms, getContainerEntries, getIndirectParameterRefEntries, getInheritingContainers, getMetaCommand, getMetaCommand, getMetaCommand, getMetaCommands, getNamespaces, getNonStandardData, getNonStandardDataOfType, getParameter, getParameter, getParameter, getParameterEntries, getParameterNames, getParameters, getParameterType, getParameterType, getParameterType, getParameterTypes, getRootSequenceContainer, getRootSpaceSystem, getSequenceContainer, getSequenceContainer, getSequenceContainer, getSequenceContainers, getSpaceSystem, getSpaceSystem, getSpaceSystem, getSpaceSystems, isSystemParameter, isSystemParameter, print, setRootSequenceContainer, toNamedObjectId
-
Constructor Details
-
Mdb
-
-
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 fileIf any of spacesystems of the parameters are not writable, an IllegalArgumentException will be thrown and no parameter will be added
- Throws:
IOException
-
addParameterType
- 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 withXtceDb.YAMCS_SPACESYSTEM_NAME
ptype
-- Returns:
- the parameter created or already existing.
- Throws:
IllegalArgumentException
- if theparameterQualifiedNamed
does not start withXtceDb.YAMCS_SPACESYSTEM_NAME
-
addSystemParameterType
Adds a parameter type to the MDB. The type has to have the qualified name set and start withXtceDb.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:
-