use of org.ccsds.schema.sois.seds.InterfaceDeclarationType in project CCDD by nasa.
the class CcddEDSHandler method unbuildSpaceSystems.
/**
********************************************************************************************
* Extract the telemetry and/or command information from the space system. This is a recursive
* method
*
* @param namespace
* name space
*
* @param importFileName
* import file name
*
* @throws CCDDException
* If an input error is detected
********************************************************************************************
*/
private void unbuildSpaceSystems(NamespaceType namespace, ImportType importType) throws CCDDException {
// Get the table name based on the space system name and the path to this system. Convert
// the name to be a valid table name
String tableName = convertPathToTableName(namespace.getName());
boolean hasParameter = false;
boolean hasCommand = false;
// sets
for (InterfaceDeclarationType intfcDecType : namespace.getDeclaredInterfaceSet().getInterface()) {
// Check if the interface contains a parameter set
if (intfcDecType.getParameterSet() != null && !intfcDecType.getParameterSet().getParameter().isEmpty()) {
hasParameter = true;
}
// Check if the interface contains a command set
if (intfcDecType.getCommandSet() != null && !intfcDecType.getCommandSet().getCommand().isEmpty()) {
hasCommand = true;
}
}
// sets
for (InterfaceDeclarationType intfcDecType : namespace.getDeclaredInterfaceSet().getInterface()) {
// Check if the interface contains a parameter set
if (intfcDecType.getParameterSet() != null && !intfcDecType.getParameterSet().getParameter().isEmpty()) {
// Build the structure table from the telemetry data
importStructureTable(namespace, intfcDecType.getParameterSet().getParameter(), tableName, hasCommand);
}
// Check if the interface contains a command set
if (intfcDecType.getCommandSet() != null && !intfcDecType.getCommandSet().getCommand().isEmpty()) {
// Build the structure table from the telemetry data
importCommandTable(namespace, intfcDecType.getCommandSet().getCommand(), tableName, hasParameter);
}
// Check if the data from only the first table is to be read and one has been found
if (importType == ImportType.FIRST_DATA_ONLY && (isTelemetry || isCommand)) {
break;
}
}
}
Aggregations