Changeset 11178 for fact/FADctrl


Ignore:
Timestamp:
06/24/11 15:21:35 (13 years ago)
Author:
ogrimm
Message:
FADctrl publishes PLL lock status
Location:
fact/FADctrl
Files:
3 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
Note: See TracChangeset for help on using the changeset viewer.