Changeset 16611 for trunk/psModules/src/config/pmConfigCamera.c
- Timestamp:
- Feb 22, 2008, 10:21:52 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfigCamera.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfigCamera.c
r15788 r16611 24 24 25 25 // Generate the skycell version of a named camera configuration 26 bool pmConfigCameraSkycellVersion(psMetadata *s ite, // The siteconfiguration26 bool pmConfigCameraSkycellVersion(psMetadata *system, // The system configuration 27 27 const char *name // Name of the un-mosaicked camera 28 28 ) 29 29 { 30 PS_ASSERT_METADATA_NON_NULL(s ite, false);30 PS_ASSERT_METADATA_NON_NULL(system, false); 31 31 PS_ASSERT_STRING_NON_EMPTY(name, false); 32 32 33 33 bool mdok; // Status of MD lookup 34 psMetadata *cameras = psMetadataLookupMetadata(&mdok, s ite, "CAMERAS"); // List of cameras34 psMetadata *cameras = psMetadataLookupMetadata(&mdok, system, "CAMERAS"); // List of cameras 35 35 if (!mdok || !cameras) { 36 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the s iteconfiguration.\n");37 return false; 38 } 39 if (!pmConfigGenerateSkycellVersion(cameras, cameras, name, s ite)) {36 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the system configuration.\n"); 37 return false; 38 } 39 if (!pmConfigGenerateSkycellVersion(cameras, cameras, name, system)) { 40 40 psError(PS_ERR_UNKNOWN, true, "Failed to build skycell camera description for %s\n", name); 41 41 return false; … … 45 45 46 46 47 bool pmConfigCameraSkycellVersionsAll(psMetadata *s ite)48 { 49 PS_ASSERT_METADATA_NON_NULL(s ite, false);47 bool pmConfigCameraSkycellVersionsAll(psMetadata *system) 48 { 49 PS_ASSERT_METADATA_NON_NULL(system, false); 50 50 51 51 bool mdok; // Status of MD lookup 52 psMetadata *cameras = psMetadataLookupMetadata(&mdok, s ite, "CAMERAS"); // List of cameras52 psMetadata *cameras = psMetadataLookupMetadata(&mdok, system, "CAMERAS"); // List of cameras 53 53 if (!mdok || !cameras) { 54 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the s iteconfiguration.\n");54 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the system configuration.\n"); 55 55 return false; 56 56 } … … 61 61 while ((camerasItem = psMetadataGetAndIncrement(camerasIter))) { 62 62 assert(camerasItem->type == PS_DATA_METADATA); // Only metadata are allowed here! 63 if (!pmConfigGenerateSkycellVersion(cameras, new, camerasItem->name, s ite)) {63 if (!pmConfigGenerateSkycellVersion(cameras, new, camerasItem->name, system)) { 64 64 psError(PS_ERR_UNKNOWN, true, "Failed to build skycell camera description for %s\n", 65 65 camerasItem->name); … … 92 92 static const char *skycellConceptName(const char *name, // Name of concept 93 93 const char **concepts, // List of concepts NOT to update 94 const psMetadata *s ite // Siteconfiguration94 const psMetadata *system // System configuration 95 95 ) 96 96 { … … 101 101 } 102 102 103 if (!s ite) {103 if (!system) { 104 104 return name; 105 105 } 106 106 bool mdok; // Status of MD lookup 107 psMetadata *skycells = psMetadataLookupMetadata(&mdok, s ite, "SKYCELLS"); // Skycell concept headers107 psMetadata *skycells = psMetadataLookupMetadata(&mdok, system, "SKYCELLS"); // Skycell concept headers 108 108 if (!skycells) { 109 109 return name; … … 121 121 psMetadata *newCameras, // New list of camera configurations 122 122 const char *name, // Name of original camera configuration 123 const psMetadata *s ite // Siteconfiguration123 const psMetadata *system // System configuration 124 124 ) 125 125 { … … 213 213 iter = psListIteratorAlloc(concepts, PS_LIST_HEAD, false); 214 214 while ((name = psListGetAndIncrement(iter))) { 215 const char *new = skycellConceptName(name, skycellConceptsFPA, s ite); // Name for skycell215 const char *new = skycellConceptName(name, skycellConceptsFPA, system); // Name for skycell 216 216 if (new) { 217 217 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, new); … … 224 224 iter = psListIteratorAlloc(concepts, PS_LIST_HEAD, false); 225 225 while ((name = psListGetAndIncrement(iter))) { 226 const char *new = skycellConceptName(name, skycellConceptsChip, s ite); // Name for skycell226 const char *new = skycellConceptName(name, skycellConceptsChip, system); // Name for skycell 227 227 if (new) { 228 228 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, new); … … 235 235 iter = psListIteratorAlloc(concepts, PS_LIST_HEAD, false); 236 236 while ((name = psListGetAndIncrement(iter))) { 237 const char *new = skycellConceptName(name, skycellConceptsCell, s ite); // Name for skycell237 const char *new = skycellConceptName(name, skycellConceptsCell, system); // Name for skycell 238 238 if (new) { 239 239 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, new); … … 299 299 300 300 // Generate the Chip and FPA mosaicked version of a named camera configuration 301 bool pmConfigCameraMosaickedVersions(psMetadata *s ite, // The siteconfiguration301 bool pmConfigCameraMosaickedVersions(psMetadata *system, // The system configuration 302 302 const char *name // Name of the un-mosaicked camera 303 303 ) 304 304 { 305 PS_ASSERT_METADATA_NON_NULL(s ite, false);305 PS_ASSERT_METADATA_NON_NULL(system, false); 306 306 PS_ASSERT_STRING_NON_EMPTY(name, false); 307 307 308 308 bool mdok; // Status of MD lookup 309 psMetadata *cameras = psMetadataLookupMetadata(&mdok, s ite, "CAMERAS"); // List of cameras309 psMetadata *cameras = psMetadataLookupMetadata(&mdok, system, "CAMERAS"); // List of cameras 310 310 if (!mdok || !cameras) { 311 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the s iteconfiguration.\n");311 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the system configuration.\n"); 312 312 return false; 313 313 } … … 325 325 // the operation putting the new entries first is now implemented in pmConfigGenerateMosaickedVersion 326 326 // Generate the Chip and FPA mosaicked version of a named camera configuration 327 bool pmConfigCameraMosaickedVersionsAll(psMetadata *s ite)328 { 329 PS_ASSERT_METADATA_NON_NULL(s ite, false);327 bool pmConfigCameraMosaickedVersionsAll(psMetadata *system) 328 { 329 PS_ASSERT_METADATA_NON_NULL(system, false); 330 330 331 331 bool mdok; // Status of MD lookup 332 psMetadata *cameras = psMetadataLookupMetadata(&mdok, s ite, "CAMERAS"); // List of cameras332 psMetadata *cameras = psMetadataLookupMetadata(&mdok, system, "CAMERAS"); // List of cameras 333 333 if (!mdok || !cameras) { 334 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the s iteconfiguration.\n");334 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the system configuration.\n"); 335 335 return false; 336 336 }
Note:
See TracChangeset
for help on using the changeset viewer.
