Changeset 10279


Ignore:
Timestamp:
04/01/11 09:27:43 (14 years ago)
Author:
ogrimm
Message:
Frequency available as DIM service
Location:
fact/FADctrl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FADBoard.cc

    r10263 r10279  
    2323  Status.Update.tv_sec = -1;
    2424  Port = ServerPort;
    25 
     25  Status.Frequency = 0;
     26  Status.BoardID = 0;
     27 
    2628  Name = new char [Server.size()+1]; // Name in permanent memory for DIM service
    2729  strcpy(Name, Server.c_str());
     
    4951  DIM_Status = new DimService((ID.str()+"Status").c_str(), (char *) "");
    5052  DIM_ID = new DimService((ID.str()+"BoardID").c_str(), (char *) "S", NULL, 0);
     53  DIM_Frequency = new DimService((ID.str()+"Frequency").c_str(), Status.Frequency);
    5154  DIM_Temp = new DimService((ID.str()+"Temperature").c_str(), (char *) "F", NULL, 0);
    5255  DIM_DAC = new DimService((ID.str()+"DAC").c_str(), (char *) "S", NULL, 0);
     
    5457
    5558  // Create thread that connects and receives data
    56   SetStatus("Trying to connect");
     59  SetStatus("Trying to connect...");
    5760
    5861  if ((Ret = pthread_create(&Thread, NULL, (void * (*)(void *)) LaunchThread,(void *) this)) != 0) {
     
    8285  delete DIM_Status;
    8386  delete DIM_ID;
     87  delete DIM_Frequency;
    8488  delete DIM_Temp;
    8589  delete DIM_DAC;
     
    510514                LastUpdate = time(NULL);
    511515
     516                if (PrevStatus.Frequency != Status.Frequency) DIM_Frequency->updateService();
     517
    512518                if (memcmp(PrevStatus.Temp, Status.Temp, sizeof(Status.Temp)) != 0) {
    513519                  DIM_Temp->updateService(Status.Temp, sizeof(Status.Temp));
  • fact/FADctrl/FADBoard.h

    r10262 r10279  
    2828        int Socket;
    2929        pthread_mutex_t Mutex;
    30         DimService *DIM_Name, *DIM_Status, *DIM_ID, *DIM_Temp, *DIM_ROI, *DIM_DAC;
     30        DimService *DIM_Name, *DIM_Status, *DIM_ID, *DIM_Frequency, *DIM_Temp, *DIM_ROI, *DIM_DAC;
    3131
    3232        void ReadLoop();
  • fact/FADctrl/History.txt

    r10263 r10279  
    202029/3/2011       Added Status message service for each board (removed several console messages in turn)
    2121                        Limited update rate of slow control data to 1 second or interval set by 'update'
     221/4/2011        Added DIM frequency service                     
Note: See TracChangeset for help on using the changeset viewer.