Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef GainTrackingTable_CLASS
00035 #define GainTrackingTable_CLASS
00036
00037 #include <string>
00038 #include <vector>
00039 #include <map>
00040 #include <set>
00041 using std::string;
00042 using std::vector;
00043 using std::map;
00044
00045
00046
00047 #include <Angle.h>
00048 using asdm::Angle;
00049
00050 #include <Tag.h>
00051 using asdm::Tag;
00052
00053 #include <Frequency.h>
00054 using asdm::Frequency;
00055
00056 #include <ArrayTimeInterval.h>
00057 using asdm::ArrayTimeInterval;
00058
00059 #include <Complex.h>
00060 using asdm::Complex;
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 #include "CPolarizationType.h"
00081 using namespace PolarizationTypeMod;
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 #include <ConversionException.h>
00103 #include <DuplicateKey.h>
00104 #include <UniquenessViolationException.h>
00105 #include <NoSuchRow.h>
00106 #include <DuplicateKey.h>
00107 using asdm::DuplicateKey;
00108 using asdm::ConversionException;
00109 using asdm::NoSuchRow;
00110 using asdm::DuplicateKey;
00111
00112 #ifndef WITHOUT_ACS
00113 #include <asdmIDLC.h>
00114 using asdmIDL::GainTrackingTableIDL;
00115 #endif
00116
00117 #include <Representable.h>
00118
00119 namespace asdm {
00120
00121
00122
00123
00124 class ASDM;
00125 class GainTrackingRow;
00294 class GainTrackingTable : public Representable {
00295 friend class ASDM;
00296
00297 public:
00298
00299
00305 static vector<string> getKeyName();
00306
00307
00308 virtual ~GainTrackingTable();
00309
00315 ASDM &getContainer() const;
00316
00322 unsigned int size() ;
00323
00329 string getName() const;
00330
00336 static const vector<string>& getAttributesNames();
00337
00341 Entity getEntity() const;
00342
00347 void setEntity(Entity e);
00348
00356 string toXML() ;
00357
00358 #ifndef WITHOUT_ACS
00359
00365 GainTrackingTableIDL *toIDL() ;
00366 #endif
00367
00368 #ifndef WITHOUT_ACS
00369
00375 void fromIDL(GainTrackingTableIDL x) ;
00376 #endif
00377
00378
00379
00380
00381
00386 GainTrackingRow *newRow();
00387
00388
00418 GainTrackingRow *newRow(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, float attenuator, int numLO, int numReceptor, vector<double > cableDelay, double crossPolarizationDelay, vector<double > loPropagationDelay, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<double > receiverDelay);
00419
00420
00421
00434 GainTrackingRow *newRow(GainTrackingRow *row);
00435
00436
00437
00438
00439
00440
00457 GainTrackingRow* add(GainTrackingRow* x) ;
00458
00459
00460
00461
00462
00463
00464
00465
00466
00472 vector<GainTrackingRow *> get() ;
00473
00474
00482 vector <GainTrackingRow*> *getByContext(Tag antennaId, Tag spectralWindowId, int feedId);
00483
00484
00485
00486
00487
00503 GainTrackingRow* getRowByKey(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId);
00504
00505
00506
00507
00508
00540 GainTrackingRow* lookup(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, float attenuator, int numLO, int numReceptor, vector<double > cableDelay, double crossPolarizationDelay, vector<double > loPropagationDelay, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<double > receiverDelay);
00541
00542
00543 private:
00544
00553 GainTrackingTable (ASDM & container);
00554
00555 ASDM & container;
00556
00557 bool archiveAsBin;
00558 bool fileAsBin ;
00559
00560 Entity entity;
00561
00562
00563
00567 static string tableName;
00568
00572 static const vector<string> attributesNames;
00573
00577 static vector<string> initAttributesNames();
00578
00579
00583 static vector<string> key;
00584
00585
00593 GainTrackingRow* checkAndAdd(GainTrackingRow* x) ;
00594
00595
00596
00597
00605 GainTrackingRow * insertByStartTime(GainTrackingRow* x, vector<GainTrackingRow* >& row);
00606
00607
00608
00609
00610
00611
00612 vector<GainTrackingRow * > privateRows;
00613
00614
00615
00616
00617
00618
00619
00620
00621 typedef vector <GainTrackingRow* > TIME_ROWS;
00622 map<string, TIME_ROWS > context;
00623
00628 string Key(Tag antennaId, Tag spectralWindowId, int feedId) ;
00629
00630
00631
00632
00638 void getByKeyNoAutoIncNoTime(vector <GainTrackingRow*>& vin, vector <GainTrackingRow*>& vout, Tag antennaId, Tag spectralWindowId, int feedId);
00639
00640
00641
00642 void error() ;
00643
00644
00651 void fromXML(string xmlDoc) ;
00652
00657 void setFromMIMEFile(const string& directory);
00658 void setFromXMLFile(const string& directory);
00659
00667 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00668
00669
00676 void setFromMIME(const string & mimeMsg);
00677
00681 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00682
00692 void toFile(string directory);
00693
00702 void setFromFile(const string& directory);
00703
00704 };
00705
00706 }
00707
00708 #endif