CorrelatorModeRow.h
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 CorrelatorModeRow_CLASS
00035 #define CorrelatorModeRow_CLASS
00036
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044
00045
00046
00047
00048
00049
00050
00051 #include <Tag.h>
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 #include "CBasebandName.h"
00063
00064
00065
00066
00067
00068 #include "CAccumMode.h"
00069
00070
00071
00072
00073
00074
00075
00076 #include "CAxisName.h"
00077
00078
00079
00080 #include "CFilterMode.h"
00081
00082
00083
00084 #include "CCorrelatorName.h"
00085
00086
00087
00088
00089 #include <ConversionException.h>
00090 #include <NoSuchRow.h>
00091 #include <IllegalAccessException.h>
00092
00093 #include <RowTransformer.h>
00094
00095
00096
00097
00098
00099
00100 namespace asdm {
00101
00102
00103
00104
00105
00106 class CorrelatorModeRow;
00107 typedef void (CorrelatorModeRow::*CorrelatorModeAttributeFromBin) (EndianIStream& eis);
00108 typedef void (CorrelatorModeRow::*CorrelatorModeAttributeFromText) (const string& s);
00109
00116 class CorrelatorModeRow {
00117 friend class asdm::CorrelatorModeTable;
00118 friend class asdm::RowTransformer<CorrelatorModeRow>;
00119
00120
00121 public:
00122
00123 virtual ~CorrelatorModeRow();
00124
00128 CorrelatorModeTable &getTable() const;
00129
00134 bool isAdded() const;
00135
00137
00139
00140
00141
00142
00143
00144
00145
00146
00151 Tag getCorrelatorModeId() const;
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00171 int getNumBaseband() const;
00172
00173
00174
00175
00183 void setNumBaseband (int numBaseband);
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00201 vector<BasebandNameMod::BasebandName > getBasebandNames() const;
00202
00203
00204
00205
00213 void setBasebandNames (vector<BasebandNameMod::BasebandName > basebandNames);
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00231 vector<int > getBasebandConfig() const;
00232
00233
00234
00235
00243 void setBasebandConfig (vector<int > basebandConfig);
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00261 AccumModeMod::AccumMode getAccumMode() const;
00262
00263
00264
00265
00273 void setAccumMode (AccumModeMod::AccumMode accumMode);
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00291 int getBinMode() const;
00292
00293
00294
00295
00303 void setBinMode (int binMode);
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00321 int getNumAxes() const;
00322
00323
00324
00325
00333 void setNumAxes (int numAxes);
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00351 vector<AxisNameMod::AxisName > getAxesOrderArray() const;
00352
00353
00354
00355
00363 void setAxesOrderArray (vector<AxisNameMod::AxisName > axesOrderArray);
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00381 vector<FilterModeMod::FilterMode > getFilterMode() const;
00382
00383
00384
00385
00393 void setFilterMode (vector<FilterModeMod::FilterMode > filterMode);
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00411 CorrelatorNameMod::CorrelatorName getCorrelatorName() const;
00412
00413
00414
00415
00423 void setCorrelatorName (CorrelatorNameMod::CorrelatorName correlatorName);
00424
00425
00426
00427
00428
00429
00431
00433
00435
00437
00438
00439
00440
00464 bool compareNoAutoInc(int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode, int binMode, int numAxes, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName);
00465
00466
00467
00468
00492 bool compareRequiredValue(int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode, int binMode, int numAxes, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName);
00493
00494
00503 bool equalByRequiredValue(CorrelatorModeRow* x) ;
00504
00505 #ifndef WITHOUT_ACS
00506
00510 asdmIDL::CorrelatorModeRowIDL *toIDL() const;
00511
00519 void toIDL(asdmIDL::CorrelatorModeRowIDL& x) const;
00520 #endif
00521
00522 #ifndef WITHOUT_ACS
00523
00528 void setFromIDL (asdmIDL::CorrelatorModeRowIDL x) ;
00529 #endif
00530
00535 std::string toXML() const;
00536
00543 void setFromXML (std::string rowDoc) ;
00544
00547
00549
00550 std::map<std::string, CorrelatorModeAttributeFromBin> fromBinMethods;
00551 void correlatorModeIdFromBin( EndianIStream& eis);
00552 void numBasebandFromBin( EndianIStream& eis);
00553 void basebandNamesFromBin( EndianIStream& eis);
00554 void basebandConfigFromBin( EndianIStream& eis);
00555 void accumModeFromBin( EndianIStream& eis);
00556 void binModeFromBin( EndianIStream& eis);
00557 void numAxesFromBin( EndianIStream& eis);
00558 void axesOrderArrayFromBin( EndianIStream& eis);
00559 void filterModeFromBin( EndianIStream& eis);
00560 void correlatorNameFromBin( EndianIStream& eis);
00561
00562
00563
00571 static CorrelatorModeRow* fromBin(EndianIStream& eis, CorrelatorModeTable& table, const std::vector<std::string>& attributesSeq);
00572
00579 void fromText(const std::string& attributeName, const std::string& t);
00581
00582 private:
00586 CorrelatorModeTable &table;
00590 bool hasBeenAdded;
00591
00592
00593 void isAdded(bool added);
00594
00595
00604 CorrelatorModeRow (CorrelatorModeTable &table);
00605
00623 CorrelatorModeRow (CorrelatorModeTable &table, CorrelatorModeRow &row);
00624
00626
00628
00629
00630
00631
00632
00633
00634 Tag correlatorModeId;
00635
00636
00637
00638
00648 void setCorrelatorModeId (Tag correlatorModeId);
00649
00650
00651
00652
00653
00654
00655
00656
00657 int numBaseband;
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668 vector<BasebandNameMod::BasebandName > basebandNames;
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679 vector<int > basebandConfig;
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690 AccumModeMod::AccumMode accumMode;
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701 int binMode;
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712 int numAxes;
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723 vector<AxisNameMod::AxisName > axesOrderArray;
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734 vector<FilterModeMod::FilterMode > filterMode;
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745 CorrelatorNameMod::CorrelatorName correlatorName;
00746
00747
00748
00749
00750
00752
00754
00756
00758
00759
00760
00762
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00780
00782 std::map<std::string, CorrelatorModeAttributeFromText> fromTextMethods;
00783
00784 void correlatorModeIdFromText (const string & s);
00785
00786
00787 void numBasebandFromText (const string & s);
00788
00789
00790 void basebandNamesFromText (const string & s);
00791
00792
00793 void basebandConfigFromText (const string & s);
00794
00795
00796 void accumModeFromText (const string & s);
00797
00798
00799 void binModeFromText (const string & s);
00800
00801
00802 void numAxesFromText (const string & s);
00803
00804
00805 void axesOrderArrayFromText (const string & s);
00806
00807
00808 void filterModeFromText (const string & s);
00809
00810
00811 void correlatorNameFromText (const string & s);
00812
00813
00814
00815
00820 void toBin(EndianOSStream& eoss);
00821
00831 };
00832
00833 }
00834
00835 #endif