Changeset 23404
- Timestamp:
- Mar 18, 2009, 3:12:15 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/concepts/pmConceptsStandard.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/concepts/pmConceptsStandard.c
r23296 r23404 670 670 return timeSys; 671 671 } 672 673 // Set the corresponding TIMESYS for one of the TIME concepts 674 static bool conceptSetTimesysForTime(const char *name, // Concept name ("CELL.TIME" or "FPA.TIME") 675 const pmFPA *fpa, // FPA of interest 676 const pmChip *chip, // Chip of interest, or NULL 677 const pmCell *cell, // Cell of interest, or NULL 678 psTimeType timeSys // The time system value 679 ) 680 { 681 assert(name); 682 683 psString timesysName = psStringCopy(name); // e.g., "CELL.TIME" --> "CELL.TIMESYS" 684 psStringSubstitute(×ysName, "TIMESYS", "TIME"); 685 psMetadataItem *item = NULL; // Item with time system 686 if (cell) { 687 item = psMetadataLookup(cell->concepts, timesysName); 688 } 689 if (!item && chip) { 690 item = psMetadataLookup(chip->concepts, timesysName); 691 } 692 if (!item && fpa) { 693 item = psMetadataLookup(fpa->concepts, timesysName); 694 } 695 if (!item) { 696 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find %s in concepts when setting %s\n", 697 timesysName, name); 698 return false; 699 } 700 701 item->data.S32 = timeSys; 702 703 return true; 704 } 705 672 706 673 707 psMetadataItem *p_pmConceptParse_TIME(const psMetadataItem *concept, … … 896 930 } 897 931 898 time->type = timeSys; 932 if (jdTime || mjdTime) { 933 conceptSetTimesysForTime(pattern->name, fpa, chip, cell, PS_TIME_TAI); 934 } else { 935 time->type = timeSys; 936 } 899 937 900 938 psMetadataItem *item = psMetadataItemAllocPtr(pattern->name, PS_DATA_TIME, pattern->comment, time);
Note:
See TracChangeset
for help on using the changeset viewer.
