Changeset 11178


Ignore:
Timestamp:
06/24/11 15:21:35 (14 years ago)
Author:
ogrimm
Message:
FADctrl publishes PLL lock status
Location:
fact
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FADBoard.cc

    r11087 r11178  
    5757  DIM_Rate = new DimService((ID.str()+"RateHz").c_str(), Status.Rate);
    5858  DIM_Frequency = new DimService((ID.str()+"Frequency").c_str(), Status.Frequency);
     59  DIM_Lock = new DimService((ID.str()+"Lock").c_str(), (char *) "S", &Status.Lock, NChips*sizeof(bool));
    5960  DIM_TriggerNum = new DimService((ID.str()+"TriggerNum").c_str(), (char *) "I", &Status.TriggerNum, sizeof(Status.TriggerNum));
    6061  DIM_Temp = new DimService((ID.str()+"Temperature").c_str(), (char *) "F", NULL, 0);
     
    99100  }
    100101
    101   delete DIM_Name;
    102   delete DIM_Status;
    103   delete DIM_ID;
    104   delete DIM_Rate;
    105   delete DIM_Frequency;
    106   delete DIM_TriggerNum;
    107   delete DIM_Temp;
    108   delete DIM_DAC;
    109   delete DIM_ROI;
     102  delete DIM_Name;                      delete DIM_Status;
     103  delete DIM_ID;                        delete DIM_Rate;
     104  delete DIM_Frequency;         delete DIM_Lock;
     105  delete DIM_TriggerNum;        delete DIM_Temp;
     106  delete DIM_DAC;                       delete DIM_ROI;
    110107  delete DIM_ACalData; 
    111108  delete[] Name;
     
    495492          Status.PhaseShift = Header->adc_clock_phase_shift;
    496493          for (unsigned int i=0; i<NChips; i++) {
    497                 if ((ntohs(Header->PLLLCK)>>12 & (1<<i)) != 0) Status.Lock[i] = true;
    498                 else Status.Lock[i] = false;
     494                if ((ntohs(Header->PLLLCK)>>12 & (1<<i)) != 0) Status.Lock[i] = 1;
     495                else Status.Lock[i] = 0;
    499496          }
    500497
     
    553550                if (PrevStatus.TriggerNum != Status.TriggerNum) DIM_TriggerNum->updateService();
    554551                if (PrevStatus.Rate != Status.Rate) DIM_Rate->updateService();
    555                
     552
     553                if (memcmp(PrevStatus.Lock, Status.Lock, sizeof(Status.Lock)) != 0) {
     554                  DIM_Lock->updateService();
     555                }
    556556                if (memcmp(PrevStatus.Temp, Status.Temp, sizeof(Status.Temp)) != 0) {
    557557                  DIM_Temp->updateService(Status.Temp, sizeof(Status.Temp));
  • fact/FADctrl/FADBoard.h

    r10980 r11178  
    2929        int Socket;
    3030        pthread_mutex_t Mutex;
    31         DimService *DIM_Name, *DIM_Status, *DIM_ID, *DIM_Frequency, *DIM_TriggerNum;
     31        DimService *DIM_Name, *DIM_Status, *DIM_ID, *DIM_Frequency, *DIM_Lock, *DIM_TriggerNum;
    3232        DimService *DIM_Rate, *DIM_Temp, *DIM_ROI, *DIM_DAC, *DIM_ACalData;
    3333
     
    6060
    6161          float Frequency;
    62           bool Lock[NChips];
     62          short Lock[NChips];
    6363          int8_t PhaseShift;
    6464
  • fact/FADctrl/History.txt

    r11087 r11178  
    33337/6/2011        DIM event service only contains active boards
    343421/6/2011       Command 'boards' takes 'none as argument
     3524/6/2011       PLL lock status published as DIM service
  • fact/tools/Edd/Edd.cc

    r11088 r11178  
    536536
    537537        for (int j=0; j<4; j++) {
     538      Line = new EddLineDisplay(Board+"Lock", j);
     539          Line->setMaximumWidth(20);
     540      Button[i/20]->Layout()->addWidget(Line, i+7, 3+j, 1, 1);
     541        }
     542
     543        for (int j=0; j<4; j++) {
    538544          Plot->AddService(Board+"Temperature", j);
    539545
    540546      Line = new EddLineDisplay(Board+"Temperature", j);
    541547          Line->setMinimumWidth(40);
    542       Button[i/20]->Layout()->addWidget(Line, i+7, 3+j, 1, 1);
     548      Button[i/20]->Layout()->addWidget(Line, i+7, 7+j, 1, 1);
    543549        }
    544550
    545551    Line = new EddLineDisplay(Board+"TriggerNum");
    546552        Line->setMinimumWidth(40);
    547     Button[i/20]->Layout()->addWidget(Line, i+7, 7, 1, 1);
     553    Button[i/20]->Layout()->addWidget(Line, i+7, 11, 1, 1);
    548554
    549555        Line = new EddLineDisplay(Board+"RateHz");
    550556        Line->setMinimumWidth(50);
    551     Button[i/20]->Layout()->addWidget(Line, i+7, 15, 1, 1);
     557    Button[i/20]->Layout()->addWidget(Line, i+7, 19, 1, 1);
    552558
    553559        Line = new EddLineDisplay(Board+"Status");
    554560        Line->setMaximumWidth(150);
    555     Button[i/20]->Layout()->addWidget(Line, i+7, 16, 1, 1);
     561    Button[i/20]->Layout()->addWidget(Line, i+7, 20, 1, 1);
    556562  }
    557563}
Note: See TracChangeset for help on using the changeset viewer.