Observation
|
00001 /* HiRISE Engineering_Header 00002 00003 PIRL CVS ID: Engineering_Header.hh,v 1.28 2020/02/14 01:17:18 schaller Exp 00004 00005 Copyright (C) 2004-2020 Arizona Board of Regents on behalf of the Lunar and 00006 Planetary Laboratory at the University of Arizona. 00007 00008 Licensed under the Apache License, Version 2.0 (the "License"); you may not use 00009 this file except in compliance with the License. You may obtain a copy of the 00010 License at 00011 00012 http://www.apache.org/licenses/LICENSE-2.0 00013 00014 Unless required by applicable law or agreed to in writing, software distributed 00015 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 00016 CONDITIONS OF ANY KIND, either express or implied. See the License for the 00017 specific language governing permissions and limitations under the License. 00018 */ 00019 #ifndef _HiRISE_Engineering_Header_ 00020 #define _HiRISE_Engineering_Header_ 00021 00022 // UA::HiRISE 00023 #include "Data_Component.hh" 00024 00025 #if defined (INCLUDE_PVL) 00026 // idaeim::PVL 00027 #include "PVL.hh" 00028 #endif 00029 00030 #include <iostream> 00031 00032 namespace UA 00033 { 00034 namespace HiRISE 00035 { 00036 /******************************************************************************* 00037 Engineering_Header 00038 */ 00091 class Engineering_Header 00092 : public Data_Component 00093 { 00094 public: 00095 /*============================================================================== 00096 Constants: 00097 */ 00099 static const char* const 00100 ID; 00101 00103 static const char* const 00104 NAME; 00105 00116 enum Element 00117 { 00118 LUT_Compressed, 00119 Binning_Factor, 00120 Delta_Line_Time, 00121 TDI_Stages, 00122 Trimming, 00123 Post_Binned_Lines, 00124 FPGA_Code_Version, 00125 DLL_Locked, 00126 DLL_Reset_Count, 00127 DLL_Locked_Once, 00128 DLL_Frequency_Correct_Count, 00129 ADC_Timing_Settings, 00130 Pad, 00131 00132 // The total number of Elements: 00133 Total_Elements 00134 }; 00135 00137 static const char* 00138 NAMES[]; 00139 00141 static const Index 00142 COMPONENT_BYTES; 00143 00145 static const Index 00146 OFFSETS[]; 00147 00165 static const Index 00166 ARRAY_COUNTS[][2]; 00167 00169 static const char* const 00170 FORMAT_FILENAME; 00171 00173 enum DLL_Clock 00174 { 00175 FIRST_CLOCK, 00176 SECOND_CLOCK 00177 }; 00178 00180 enum ADC_Timing_Field 00181 { 00182 ADC_RESET_TIMING, 00183 ADC_IMAGE_TIMING 00184 }; 00185 00187 static const u_int_32 00188 ADC_TIMING_MASKS[2]; 00189 00190 /*============================================================================== 00191 Constructors 00192 */ 00199 Engineering_Header (); 00200 00211 explicit Engineering_Header (std::istream& stream); 00212 00221 Engineering_Header (const Engineering_Header& component, 00222 bool data_duplicate = true); 00223 00229 Engineering_Header& operator= (const Engineering_Header& component); 00230 00231 /*============================================================================== 00232 Accessors 00233 */ 00240 std::string id () const; 00241 00247 const char* name () const; 00248 00257 u_int_32 ADC_timing (Index channel, ADC_Timing_Field field) const; 00258 00259 /*============================================================================== 00260 Printing 00261 */ 00273 std::ostream& print 00274 (std::ostream& stream = std::cout, bool verbose = false) const; 00275 00276 #if defined (INCLUDE_PVL) 00277 /*============================================================================== 00278 PVL 00279 */ 00287 idaeim::PVL::Aggregate* PVL () const; 00288 00299 idaeim::PVL::Aggregate* PVL_description () const; 00300 00301 #endif // defined (INCLUDE_PVL) 00302 00303 /*============================================================================== 00304 Validation 00305 */ 00315 bool is_valid () const; 00316 }; 00317 00318 } // namespace HiRISE 00319 } // namespace UA 00320 #endif