00001 #ifndef IPC_IDL
00002 #include "ipc/ipc.idl"
00003 #define IPC_IDL
00004 #endif
00005
00006 #include "SctApi/config.h"
00007
00008 #include "sctConfIPC/configuration.idl"
00009 #include "Sct/Addressing.idl"
00010
00011 module Sct_SctApi {
00012 exception SctApiException {
00013 string detail;
00014 };
00015
00016 typedef sequence <long> DataBlock;
00017 typedef sequence <short> CharBlock;
00018 typedef sequence <CharBlock> CharMatrix;
00019 typedef sequence <string> DebugOptionList;
00020 typedef sequence <sctConf::BOCChannelConfig> BOCChannelList;
00021 typedef sequence <string> NameList;
00022 typedef sequence <double> BOCMonitorSequence;
00023
00024 struct NameValue {
00025 string name;
00026 float value;
00027 };
00028
00029 typedef short RODTriggerFirstType;
00030 typedef long RODTriggerSecondType;
00031 struct RODTrigger {
00032 RODTriggerFirstType first;
00033 RODTriggerSecondType second;
00034 };
00035
00036 typedef sequence <RODTrigger> RODTriggers;
00037 typedef sequence <short> TIMTriggers;
00038 typedef short TIMTrigger;
00039
00040 typedef sequence <NameValue> NameValueList;
00041
00042 enum BankType {PHYSICS_CONFIG, SCAN_CONFIG, CALIBRATION_CONFIG};
00043
00044 enum RunType {PHYSICS_RUN_TYPE, CALIBRATION_RUN_TYPE};
00045
00046 enum EventFormatType {NORMAL_EVENT_FORMAT, EXPANDED_EVENT_FORMAT, RAW_EVENT_FORMAT};
00047
00048 typedef sequence <BankType> BankList;
00049
00050 interface Trigger : ipc::servant {
00051 enum Source {SOURCE_UNKNOWN, SOURCE_ROD, SOURCE_TIM_INTERNAL, SOURCE_TIM_EXTERNAL};
00052
00053 void singleL1A();
00054 void doubleL1A(in unsigned short delay);
00055 void delayedL1A(in unsigned short delay);
00056 void calL1A(in unsigned short delay);
00057 void pulseL1A(in unsigned short delay);
00058 void softL1A(in unsigned short delay);
00059 void softCalL1A(in unsigned short delay, in unsigned short delay2);
00060 void softPulseL1A(in unsigned short delay, in unsigned short delay2);
00061 void softBc(in unsigned short delay);
00062 void soft();
00063 void bc();
00064 void bcL1A(in unsigned short delay);
00065 void bcCalL1A(in unsigned short delay, in unsigned short delay2);
00066 void bcPulseL1A(in unsigned short delay, in unsigned short delay2);
00067
00068 void setCommIncr(in unsigned short command, in unsigned short incr);
00069 void getCommIncr(out unsigned short command, out unsigned short incr);
00070
00071 Source getSource();
00072 void setSource(in Source s);
00073
00074 short getRandom();
00075 void setRandom(in short random);
00076
00078 double getFrequency();
00079 void setFrequency(in double freq);
00080
00081 RODTriggers getRODTriggers(in short scan_point);
00084 TIMTriggers getTIMTriggers(in short scan_point);
00085
00086 boolean isValidRODTrigger();
00087 boolean isValidTIMTrigger();
00088 boolean timNeedsSequencer();
00089
00091 void clear();
00092
00094 void addCommand(in RODTriggerFirstType first, in RODTriggerSecondType second);
00095
00096 string print();
00097 };
00098
00099
00100 interface Scan : ipc::servant {
00101
00102 typedef sequence <double> ScanPoints;
00103 typedef sequence <unsigned long> TrigPoints;
00104
00105 enum ScanOptions {full, bits32, loopCalLine, distSlave, debug, tim, nth, nth_rem, enableDataMode, ccode, ope, endoptions};
00106
00107 void configure(in unsigned short type, in double start, in double stop, in double step);
00108 void configure2(in unsigned short type, in double start, in double stop, in double step);
00109
00110 Trigger getTrigger1();
00111 Trigger getTrigger2();
00112
00113
00114 void setTrigger1(in Trigger trig)
00115 raises(SctApiException);
00116 void setTrigger2(in Trigger trig)
00117 raises(SctApiException);
00118
00119 void setScanVariable1(in unsigned short var);
00120 void setScanVariable2(in unsigned short var);
00121 unsigned short getScanVariable1();
00122 unsigned short getScanVariable2();
00123
00124 void setNTrigs(in unsigned long nTrigs);
00125 unsigned long getNTrigs();
00126
00127 TrigPoints getVariableTrigs();
00128 void setVariableTrigs(in TrigPoints trigs);
00129 void setVariableTrigRange(in unsigned short start, in unsigned short end, in unsigned long value);
00130
00131 ScanPoints getScanPoints1();
00132 ScanPoints getScanPoints2();
00133 void setScanPoints1(in ScanPoints scans);
00134 void setScanPoints2(in ScanPoints scans);
00135
00136 long getOption(in ScanOptions opt);
00137 void setOption(in ScanOptions opt, in long val);
00138
00139 string print();
00140
00141 void setScanNumber(in unsigned long scan);
00142 unsigned long getScanNumber();
00143 void setRunNumber(in unsigned long scan);
00144 unsigned long getRunNumber();
00145
00146 #if !USE_CONST_SCAN
00147 sctConf::ModuleList getModuleList(in unsigned long group);
00148 void setModuleList(in unsigned long group, in sctConf::ModuleList newList);
00149
00150 unsigned long getNGroups();
00151 void setNGroups(in unsigned short val);
00152 #endif
00153
00154 #if !USE_CONST_SCAN
00155
00156 string getStartTime();
00157 void setStartTime(in string t);
00159 string getEndTime();
00160 void setEndTime(in string t);
00161 #endif
00162 };
00163
00164 typedef sequence <Scan> ScanList;
00165
00166 interface ScanMonitor : ipc::servant {
00167 void newBin(in unsigned long prevTriggers, in unsigned short newBin);
00168 void finishScan();
00169 };
00170
00171 struct AutoConfigResult {
00172 unsigned long partition;
00173 unsigned long crate;
00174 unsigned long rod;
00175
00176 unsigned long tx;
00177 unsigned long rx;
00178 };
00179
00180 typedef sequence <AutoConfigResult> AutoResultList;
00181
00182
00184
00185
00187
00190
00191
00192
00193 interface Idiosyncrasy {
00194 Sct::Corba::UCID ucid();
00195 string uniqueName();
00196 string ipcNameOfSctApiCrateServer();
00197 string infoServiceNameOfScanStatusObject();
00198 };
00199
00200
00201
00202 interface DirectRODAccess {
00203
00204 short dspBlockDump(in unsigned long rod,
00205 in long dspStart, in long numWords, in long dspNumber);
00206 DataBlock dspBlockRead(in unsigned long rod,
00207 in long dspStart, in long numWords, in long dspNumber);
00208 short dspBlockWrite(in unsigned long rod,
00209 in DataBlock buffer, in unsigned long dspAddress, in long dspNumber);
00210
00211 unsigned long dspSingleRead(in unsigned long rod,
00212 in unsigned long dspAddr, in long dspNumber);
00213 void dspSingleWrite(in unsigned long rod,
00214 in unsigned long dspAddr, in unsigned long val, in long dspNumber);
00215
00216 DataBlock readSlaveDsp(in unsigned long rod,
00217 in short s, in unsigned long add, in unsigned long words);
00218
00219
00220
00221
00222 void printBOCSetup(in unsigned long rod);
00223 sctConf::ABCDModule getABCDModuleRaw(in unsigned long rod,
00224 in unsigned long slot, in BankType bank)
00225 raises(SctApiException);
00226 };
00227
00228
00229 interface DebugOptionsCommon {
00230 void unsetDebugOption(in string opt);
00231 void setDebugOption(in string opt);
00232 DebugOptionList listDebugOptions();
00233 void unsetBusy();
00234 };
00235 interface DebugOptionsJustCrate {
00236 DebugOptionList listEnabledDebugOptions();
00237 void standardRegisterDumpRod(in unsigned long rod);
00238
00239
00240 void testLinkOutSelect(in unsigned long rod, in unsigned long link);
00241 unsigned long testLinkOutRetrieve(in unsigned long rod);
00242
00243 unsigned long getRodSlot(in unsigned long rod);
00244 boolean isRODPresent(in unsigned long rod);
00245 };
00246 interface DebugOptionsJustTop {
00247 void standardRegisterDumpURID(in Sct::Corba::URID urid);
00248 };
00249
00250
00251 interface PrimitiveAccessLowLevel {
00252 void awaitResponse(in unsigned long rod);
00253 DataBlock getResponse(in unsigned long rod);
00254
00255 void createDebugPrimList()
00256 raises(SctApiException);
00257 void addDebugPrimList(in long index, in long id, in long version, in DataBlock body)
00258 raises(SctApiException);
00259 void sendDebugPrimList(in unsigned long rod)
00260 raises(SctApiException);
00261 void sendDebugSlavePrimList(in unsigned long rod,
00262 in unsigned long slave, in boolean await, in boolean response)
00263 raises(SctApiException);
00264
00265 void flashLED(in unsigned long rod,
00266 in unsigned short slaveNumber, in unsigned long period, in unsigned long flashes)
00267 raises(SctApiException);
00268 void echo(in unsigned long rod, in DataBlock data)
00269 raises(SctApiException);
00270 };
00271
00272
00273 interface DebugSTDOUT {
00274 void printABCDModule(in unsigned long mid);
00275 void printABCDRodModule(in unsigned long mid, in BankType bank);
00276
00277 void decodeEvent(in unsigned long partition, in unsigned long crate, in unsigned long rod,
00278 in short sl, in short index, in boolean extFlag, in boolean errorType);
00279 };
00280
00282
00283
00284
00285 interface CrateIPC;
00286 interface CrateAccessTopLevel {
00287 CrateIPC getCrate(in Sct::Corba::UCID ucid);
00288 CrateIPC getCrateLegacy(in unsigned long partition, in unsigned long crate);
00289 Sct::Corba::UCIDs getCrateUCIDs();
00290 };
00291
00292
00293
00294
00295
00296 interface ScanMethods {
00297 Scan createScan();
00298 Scan getDefaultScan();
00299
00300
00301 Trigger createTrigger();
00302
00303
00304 ScanList knownScans();
00305 };
00306
00307
00308
00309
00310
00311 interface TranslationMethods {
00312
00313 unsigned long findModuleSerial(in string sn);
00314 string convertToString(in unsigned long mid);
00315 unsigned long findModule(in unsigned short mur, in unsigned short number);
00316
00317 unsigned long findModuleRod(in unsigned long partition, in unsigned long crate, in unsigned long rod, in unsigned long channel);
00318
00319
00320
00321 unsigned long findBarrelModule(in unsigned long barrel, in unsigned long row, in short number);
00322 void convertToBarrelModule(in unsigned long mid, out unsigned long barrel, out unsigned long row, out short number);
00323
00324 unsigned long findEndcapModule(in long disk, in long ring, in long number);
00325 void convertToEndcapModule(in unsigned long mid, out long disk, out unsigned long ring, out unsigned long number);
00326 };
00327
00328
00329
00330
00331
00332 interface SctApiDDCServerMethods {
00333
00334 const string instanceName = "SctApiDDCServer";
00335
00336 void requestHardReset(in unsigned long mid);
00337 void requestIVCurve(in unsigned long mid, in float start, in float stop, in float step,
00338 in unsigned short delay, in float currentLim);
00339 void setSelect(in unsigned long mid, in boolean value);
00340 void setSelectAllInCrate(in long crate, in boolean value);
00341 void changeRunState(in long state);
00342
00343
00344
00345
00346
00347 void ddcSetSingleTimeout(in short timeout);
00348 short ddcGetSingleTimeout();
00349 void ddcSetMultipleTimeout(in short timeout);
00350 short ddcGetMultipleTimeout();
00351
00352 void ddcChangeState(in long crate, in long channel,
00353 in short state);
00354 void ddcChangeStates(in long crate, in string name,
00355 in short state);
00356 void ddcChangeStateAll(in long crate,
00357 in short state);
00358 void ddcLoadConfiguration(in long crate,
00359 in short state);
00360 void ddcHardReset(in long crate, in long channel);
00361 void ddcHardResetAll(in long crate);
00362
00363 unsigned long ddcGetChannelParameterInt(in long crate, in long channel, in string name);
00364 float ddcGetChannelParameterFloat(in long crate, in long channel, in string name);
00365 string ddcGetChannelParameterString(in long crate, in long channel, in string name);
00366
00367 unsigned long ddcGetCardParameterInt(in long crate, in long card, in string name);
00368 float ddcGetCardParameterFloat(in long crate, in long card, in string name);
00369 string ddcGetCardParameterString(in long crate, in long card, in string name);
00370
00371 unsigned long ddcGetCrateParameterInt(in long crate, in string name);
00372 float ddcGetCrateParameterFloat(in long crate, in string name);
00373 string ddcGetCrateParameterString(in long crate, in string name);
00374
00375 void ddcGetCrateParameters(in long crate, in NameList names, out NameValueList nameValues);
00376
00377
00378 void ddcSetCrateParameterFloat(in long crate, in string name, in float value);
00379 void ddcSetCardParameterFloat(in long crate, in long card, in string name, in float value);
00380 void ddcSetChannelParameterFloat(in long crate, in long channel, in string name, in float value);
00381 };
00382
00383 interface SctApiDDCServer :
00384 ipc::servant,
00385 SctApiDDCServerMethods {
00386
00387 const string instanceName = "SctApiDDCServer";
00388
00389 };
00390
00393
00399
00400
00401
00402
00403 interface TriggerRODLevel {
00404 void sendL1A(in unsigned long partition, in unsigned long crate, in unsigned long rod);
00405 void sendRodTrigger(in unsigned long partition, in unsigned long crate, in unsigned long rod, in Trigger trig);
00406 };
00407
00408
00409
00410
00411
00412 interface DoScanMethods {
00413
00414 void doScan(in Scan thisScan)
00415 raises(SctApiException);
00416 void doRawScan(in Scan thisScan, in long delay, in long width, in boolean configure, in boolean clockByTwo)
00417 raises(SctApiException);
00418 ScanMonitor startAsyncScan(in Scan thisScan)
00419 raises(SctApiException);
00420 void abortScan();
00421 boolean hasFinishedScanning();
00422 };
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440 interface ModifyABCDMethods {
00441 void modifyABCDMask(in unsigned long mid, in DataBlock mask);
00442 void modifyABCDTrims(in unsigned long mid, in CharBlock trims);
00443 void modifyABCDRC(in unsigned long mid, in unsigned long chip, in unsigned short index, in double p0, in double p1, in double p2 );
00444
00445
00446 void modifyABCDVar(in unsigned long typ, in double var);
00447 void modifyABCDModuleVar(in unsigned long mid, in unsigned long typ, in double var);
00448 void modifyABCDChipVar(in unsigned long mid, in unsigned long chip, in unsigned long typ, in double var);
00449 void modifyABCDVarAllModulesOneChip(in unsigned long chip, in unsigned long typ, in double var);
00450
00451 void modifyABCDVarROD(in unsigned long typ, in double var, in BankList banks);
00452 void modifyABCDModuleVarROD(in unsigned long mid, in unsigned long typ, in double var, in BankList banks);
00453
00454 void modifyBOCParam(in unsigned long partition, in unsigned long crate, in unsigned long rod,
00455 in unsigned long channel, in unsigned long type, in unsigned long val);
00456
00457 };
00458
00459
00460 interface ModuleConfigurationMethods {
00462 void getABCDModules(in BankType bank)
00463 raises(SctApiException);
00464 void getABCDModule(in unsigned long mid, in BankType bank)
00465 raises(SctApiException);
00466
00467 void setAutoUpdateBanks(in BankList banks);
00468
00469 void setABCDModule(in unsigned long mid, in BankList banks)
00470 raises(SctApiException);
00471 void setABCDModules(in BankList bank)
00472 raises(SctApiException);
00473
00474 void copyABCDModule(in unsigned long mid, in BankType from, in BankList to)
00475 raises(SctApiException);
00476 void copyABCDModules(in BankType from, in BankList to)
00477 raises(SctApiException);
00478
00479 void sendABCDModule(in unsigned long mid, in BankType bank, in unsigned long type)
00480 raises(SctApiException);
00481 void sendABCDModules(in BankType bank)
00482 raises(SctApiException);
00483
00484 void storeModuleConfigurations(in BankType bank)
00485 raises(SctApiException);
00486 void storeBOCConfigurations()
00487 raises(SctApiException);
00488
00489 void configureAllModules()
00490 raises(SctApiException);
00491 };
00492
00493
00494
00495 interface RetrievingConfigurationMethods {
00497 sctConf::ABCDModule retrieveModule(in unsigned long mid);
00498 BOCChannelList currentBOCSetup(in unsigned long partition, in unsigned long crate, in unsigned long rod);
00499
00500 sctConf::BOCGlobalConfig currentBOCRegisters(in unsigned long partition, in unsigned long crate, in unsigned long rod);
00501
00502 };
00503
00504
00505 interface BOCConfigurationMethods {
00506 void configureBOC(in unsigned long partition, in unsigned long crate, in unsigned long rod);
00507
00508 BOCMonitorSequence getBOCMonitorArray(in unsigned long partition, in unsigned long crate, in unsigned long rod);
00509 };
00510
00511
00512
00513 interface SavingConfigurationMethods {
00514
00515
00516 };
00517
00518
00519
00520
00521
00522 interface TriggerTIMLevel {
00523
00524 void timSetFrequency(in unsigned long partition, in unsigned long crate, in double trigFreq, in double rstFreq);
00525 void freeTriggers(in unsigned long partition, in unsigned long crate);
00526 void stopTriggers(in unsigned long partition, in unsigned long crate);
00527 void timL1A(in unsigned long partition, in unsigned long crate);
00528 void timCalL1A(in unsigned long partition, in unsigned long crate, in short delay);
00529 short timReadRegister(in unsigned long partition, in unsigned long crate, in short value);
00530 void timWriteRegister(in unsigned long partition, in unsigned long crate, in short reg, in short value);
00531
00532 unsigned long sendTriggers(in unsigned long partition, in unsigned long crate, in Trigger trig, in unsigned long ntriggers, in unsigned short point_in_scan);
00533 };
00534
00535
00536 interface AutoConfigure {
00537 AutoResultList autoConfigureScan()
00538 raises(SctApiException);
00539 };
00540
00541
00542 interface ProbeChecks {
00543 boolean checkAllModulesProbe(in string chars)
00544 raises(SctApiException);
00545 };
00546
00547
00548
00549 interface ProbeMethods {
00550 CharBlock probe(in unsigned long partition, in unsigned long crate, in unsigned long rod);
00551 CharBlock probeHarness(in unsigned long partition, in unsigned long crate, in unsigned long rod, in unsigned long harness);
00552
00553 CharBlock probeWithTrigger(in unsigned long partition, in unsigned long crate, in unsigned long rod, in Trigger trig);
00554 CharBlock probeHarnessWithTrigger(in unsigned long partition, in unsigned long crate, in unsigned long rod,
00555 in Trigger trig, in unsigned long harness);
00556 CharMatrix probeScanHarnessWithTrigger(in unsigned long partition, in unsigned long crate, in unsigned long rod,
00557 in Scan trig, in unsigned long harness);
00558 };
00559
00560
00561 interface RunControl {
00562 void initialiseAll(in unsigned long runNumber)
00563 raises(SctApiException);
00564
00565 void shutdownAll()
00566 raises(SctApiException);
00567
00568 string status();
00569 void setRunNumber(in unsigned long newRun);
00570 void setScanNumber(in unsigned long newScan);
00571 unsigned long getRunNumber();
00572 unsigned long getScanNumber();
00573
00574 boolean changeRunMode(in RunType mode);
00575
00576 boolean changeEventFormat(in EventFormatType format);
00577
00578 void standardRegisterDumpAll();
00579
00580 void lasersOff();
00581 };
00582
00583
00584
00585 interface ModuleInquiry {
00586 sctConf::ModuleList getModuleList();
00587 };
00588
00591
00592
00593 interface DeprecatedInterfaceOne {
00594
00595
00596 void loadConfiguration(in string filename)
00597 raises(SctApiException);
00598 };
00599
00600
00601
00602 interface DeprecatedInterfaceExtraRaw {
00603 void rawData(in unsigned long partition, in unsigned long crate, in unsigned long rod,
00604 in long delay, in long units, in boolean setMask);
00605 void rawDataWithTrigger(in unsigned long partition, in unsigned long crate, in unsigned long rod,
00606 in long delay, in long units, in boolean setMask, in Trigger trig);
00607 };
00608
00610
00611 interface JustCrateMethods :
00612 Sct_SctApi::DirectRODAccess,
00613 Sct_SctApi::DebugOptionsJustCrate {
00614 Idiosyncrasy getIdiosyncrasy();
00615 string getHostName();
00616 };
00617
00618 interface JustCrateMethodsTemporary :
00619 Sct_SctApi::PrimitiveAccessLowLevel,
00620 Sct_SctApi::DebugSTDOUT {
00621 };
00622
00623 interface JustTopLevel :
00624 Sct_SctApi::CrateAccessTopLevel,
00625 Sct_SctApi::DebugOptionsJustTop,
00626 Sct_SctApi::ScanMethods {
00627 };
00628
00629 interface JustTopLevelTemporary :
00630 Sct_SctApi::TranslationMethods {
00631 };
00632
00633 interface CommonToTopAndCrate :
00634 Sct_SctApi::DoScanMethods,
00635 Sct_SctApi::ModifyABCDMethods,
00636 Sct_SctApi::ModuleConfigurationMethods,
00637 Sct_SctApi::RetrievingConfigurationMethods,
00638 Sct_SctApi::BOCConfigurationMethods,
00639 Sct_SctApi::SavingConfigurationMethods,
00640 Sct_SctApi::TriggerRODLevel,
00641 Sct_SctApi::TriggerTIMLevel,
00642 Sct_SctApi::AutoConfigure,
00643 Sct_SctApi::ProbeChecks,
00644 Sct_SctApi::ProbeMethods,
00645 Sct_SctApi::RunControl,
00646 Sct_SctApi::ModuleInquiry,
00647 Sct_SctApi::DebugOptionsCommon {
00648 };
00649
00650 interface CrateIPC :
00651
00652 ipc::servant,
00653
00654
00655 Sct_SctApi::JustCrateMethods,
00656 Sct_SctApi::JustCrateMethodsTemporary,
00657
00658
00659 Sct_SctApi::JustTopLevelTemporary,
00660
00661
00662 Sct_SctApi::CommonToTopAndCrate,
00663
00664
00665 Sct_SctApi::DeprecatedInterfaceOne,
00666 Sct_SctApi::DeprecatedInterfaceExtraRaw {
00667
00668
00669
00670 };
00671
00672
00673
00674 interface SctApiIPC :
00675
00676 ipc::servant,
00677
00678
00679 Sct_SctApi::JustTopLevel,
00680 Sct_SctApi::JustTopLevelTemporary,
00681
00682
00683
00684 Sct_SctApi::CommonToTopAndCrate,
00685
00686
00687 Sct_SctApi::DeprecatedInterfaceOne {
00688
00689 const string instanceName = "SctApiImpl";
00690
00691 };
00692
00693
00694 interface SctApiIPCOriginal :
00695
00696 ipc::servant,
00697
00698
00699 Sct_SctApi::JustCrateMethods,
00700
00701
00702 Sct_SctApi::JustTopLevel,
00703
00704
00705 Sct_SctApi::CommonToTopAndCrate,
00706
00707
00708 Sct_SctApi::DeprecatedInterfaceOne,
00709 Sct_SctApi::DeprecatedInterfaceExtraRaw {
00710
00711 const string instanceName = "SctApiImpl";
00712
00713 };
00714
00715 };