Changeset 23195 for trunk/ppArith
- Timestamp:
- Mar 5, 2009, 11:07:57 AM (17 years ago)
- Location:
- trunk/ppArith/src
- Files:
-
- 4 edited
-
ppArith.c (modified) (1 diff)
-
ppArith.h (modified) (4 diffs)
-
ppArithLoop.c (modified) (1 diff)
-
ppArithVersion.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppArith/src/ppArith.c
r21378 r23195 34 34 } 35 35 36 ppArithVersionPrint(); 37 36 38 if (!ppArithArguments(argc, argv, config)) { 37 39 psErrorStackPrint(stderr, "Error reading arguments.\n"); -
trunk/ppArith/src/ppArith.h
r21244 r23195 22 22 * Parse the arguments 23 23 */ 24 bool ppArithArguments(int argc, char *argv[], ///< Command-line arguments 25 pmConfig *config ///< Configuration 24 bool ppArithArguments(int argc, char *argv[], ///< Command-line arguments 25 pmConfig *config ///< Configuration 26 26 ); 27 27 … … 29 29 * Parse the camera input 30 30 */ 31 bool ppArithCamera(pmConfig *config ///< Configuration 31 bool ppArithCamera(pmConfig *config ///< Configuration 32 32 ); 33 33 … … 35 35 * Loop over the FPA hierarchy 36 36 */ 37 bool ppArithLoop(pmConfig *config ///< Configuration 37 bool ppArithLoop(pmConfig *config ///< Configuration 38 38 ); 39 39 … … 41 41 * Perform arithmetic on the readout 42 42 */ 43 bool ppArithReadout(pmReadout *output, ///< Output readout 44 const pmReadout *input1, ///< Input readout 45 const pmReadout *input2, ///< Input readout 46 const pmConfig *config, ///< Configuration 47 const pmFPAview *view ///< View of readout on which to operate 43 bool ppArithReadout(pmReadout *output, ///< Output readout 44 const pmReadout *input1, ///< Input readout 45 const pmReadout *input2, ///< Input readout 46 const pmConfig *config, ///< Configuration 47 const pmFPAview *view ///< View of readout on which to operate 48 48 ); 49 49 50 50 /** 51 * Put the program version information into a metadata51 * Put the program version information into header 52 52 */ 53 void ppArithVersionMetadata(psMetadata *metadata ///< Metadatato populate53 bool ppArithVersionHeader(psMetadata *header ///< Header to populate 54 54 ); 55 56 /// Print version information 57 void ppArithVersionPrint(void); 55 58 56 59 ///@} -
trunk/ppArith/src/ppArithLoop.c
r21378 r23195 113 113 hdu->header = psMetadataAlloc(); 114 114 } 115 ppArithVersion Metadata(hdu->header);115 ppArithVersionHeader(hdu->header); 116 116 lastHDU = hdu; 117 117 } -
trunk/ppArith/src/ppArithVersion.c
r23124 r23195 59 59 }; 60 60 61 void ppArithVersionMetadata(psMetadata *metadata)61 bool ppArithVersionHeader(psMetadata *header) 62 62 { 63 PS_ASSERT_METADATA_NON_NULL(metadata,); 63 PS_ASSERT_METADATA_NON_NULL(header, false); 64 65 psTime *time = psTimeGetNow(PS_TIME_TAI); // The time now 66 psString timeString = psTimeToISO(time); // The time in an ISO string 67 psFree(time); 68 psString history = NULL; // History string 69 psStringAppend(&history, "ppArith at %s", timeString); 70 psFree(timeString); 71 psMetadataAddStr(header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, NULL, history); 72 psFree(history); 73 74 psLibVersionHeader(header); 75 psModulesVersionHeader(header); 76 ppStatsVersionHeader(header); 77 78 psString version = ppArithVersion(); // Software version 79 psString source = ppArithSource(); // Software source 80 81 psMetadataAddStr(header, PS_LIST_TAIL, "IPP.PPARITH.VERSION", PS_META_REPLACE, 82 "Software version", version); 83 psMetadataAddStr(header, PS_LIST_TAIL, "IPP.PPARITH.SOURCE", PS_META_REPLACE, 84 "S/W source", source); 85 86 psFree(version); 87 psFree(source); 88 89 return true; 90 } 91 92 void ppArithVersionPrint(void) 93 { 94 psTime *time = psTimeGetNow(PS_TIME_TAI); // The time now 95 psString timeString = psTimeToISO(time); // The time in an ISO string 96 psFree(time); 97 psLogMsg("ppArith", PS_LOG_INFO, "ppArith at %s", timeString); 98 psFree(timeString); 64 99 65 100 psString pslib = psLibVersionLong();// psLib version … … 68 103 psString ppArith = ppArithVersionLong(); // ppArith version 69 104 70 psTime *time = psTimeGetNow(PS_TIME_TAI); // The time now 71 psString timeString = psTimeToISO(time); // The time in an ISO string 72 psFree(time); 73 psString head = NULL; // Head string 74 psStringAppend(&head, "ppArith processing at %s. Component information:", timeString); 75 psFree(timeString); 105 psLogMsg("ppArith", PS_LOG_INFO, "%s", pslib); 106 psLogMsg("ppArith", PS_LOG_INFO, "%s", psmodules); 107 psLogMsg("ppArith", PS_LOG_INFO, "%s", ppStats); 108 psLogMsg("ppArith", PS_LOG_INFO, "%s", ppArith); 76 109 77 psMetadataAddStr(metadata, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, head, "");78 psMetadataAddStr(metadata, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, pslib, "");79 psMetadataAddStr(metadata, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, psmodules, "");80 psMetadataAddStr(metadata, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, ppStats, "");81 psMetadataAddStr(metadata, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, ppArith, "");82 83 psFree(head);84 110 psFree(pslib); 85 111 psFree(psmodules);
Note:
See TracChangeset
for help on using the changeset viewer.
