Changeset 151


Ignore:
Timestamp:
Jan 18, 2010, 1:10:57 PM (11 years ago)
Author:
ogrimm
Message:
DColl publishes also current data file name
Location:
Evidence
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • Evidence/Config.cc

    r145 r151  
    1616\********************************************************************/
    1717
    18 #define DEFAULT_CONFIG "../../config/Evidence.conf"
     18#define DEFAULT_CONFIG "../config/Evidence.conf"
    1919#define SERVER_NAME "Config"
    2020
  • Evidence/DColl.cc

    r145 r151  
    4949               
    5050    unsigned int NumItems;
     51        char *Filename;
    5152    FILE *DataFile;
    5253    FILE *LogFile;
     
    5455        int DataSizeLastUpdate, LogSizeLastUpdate;
    5556        char *DataDir;
    56     DimService *LogSizeService, *DataSizeService;
     57    DimService *LogSizeService, *DataSizeService, *DataFilename;
    5758    int HistSize;
    5859        int SizeUpdateDelay;
     
    7980
    8081  // Initialization to prevent freeing unallocated memory
     82  Filename = NULL;
    8183  DataFile = NULL;
    8284  LogFile = NULL;
     
    105107  LogCommand = new DimCommand("DColl/Log", (char *) "C", this);
    106108             
    107   // Create services for file sizes
     109  // Create services for file sizes and data file name
    108110  DataSizekB = 0;
    109111  DataSizeService = new DimService(SERVER_NAME "/DataSizekB", DataSizekB);
     
    111113  LogSizekB = FileSize(LogFile);
    112114  LogSizeService = new DimService(SERVER_NAME "/LogSizekB", LogSizekB);
     115
     116  DataFilename = new DimService(SERVER_NAME "/CurrentFile", (char *) "");
    113117
    114118  // Count how many minimum change value regular expressions are present
     
    162166  free(List);
    163167
     168  delete DataFilename;
    164169  //delete LogSizeService; // These create segmentation faults?!
    165170  //delete DataSizeService;
    166171
    167172  delete LogCommand;
     173  free(Filename);
    168174
    169175  // Close files
     
    243249        if (mktime(T) == -1) State(ERROR, "mktime() failed, check filename");
    244250
    245         char *Filename;
     251        free(Filename);
    246252        if (MakeString(&Filename, "%s/%d%02d%02d.slow", DataDir, T->tm_year+1900, T->tm_mon+1, T->tm_mday) == -1) State(FATAL, "Could not create filename, MakeString() failed");
    247253        if ((DataFile = fopen(Filename, "a")) == NULL) {
     
    249255        }
    250256        else State(INFO, "Opened data file '%s'", Filename);
    251         free(Filename);
     257        DataFilename->updateService(Filename);
    252258       
    253259        // Calculate time for next file opening
  • Evidence/Edd/Edd.cc

    r142 r151  
    597597  MainLayout = new QGridLayout(MainWidget);
    598598
     599  Value = new Edd_Indicator("Alarm/Status");
     600  Value->setMaximumWidth(200);
     601  MainLayout->addWidget(Value, 0, 0, 1, 2);     
     602
     603  Value = new Edd_Indicator("Alarm/MasterAlarm");
     604  MainLayout->addWidget(Value, 0, 1, 1, 1);
     605
     606  Textout = new Edd_Textout("Alarm/Summary");
     607  Textout->Accumulate = false;
     608  Textout->setMaximumWidth(200);
     609  Textout->setMaximumHeight(150);
     610  MainLayout->addWidget(Textout, 1, 0, 1, 2);
     611
     612  Value = new Edd_Indicator("DColl/Status");
     613  Value->setMaximumWidth(200);
     614  MainLayout->addWidget(Value, 3, 0, 1, 2);     
     615
    599616  Value = new Edd_Indicator("DColl/DataSizekB");
    600   MainLayout->addWidget(Value, 3, 5, 1, 1);
     617  MainLayout->addWidget(Value, 4, 0, 1, 1);
    601618
    602619  Value = new Edd_Indicator("DColl/LogSizekB");
    603   MainLayout->addWidget(Value, 4, 5, 1, 1);
     620  MainLayout->addWidget(Value, 4, 1, 1, 1);
     621
     622  Value = new Edd_Indicator("DColl/CurrentFile");
     623  Value->setMaximumWidth(400);
     624  MainLayout->addWidget(Value, 5, 0, 1, 3);
     625
     626  Value = new Edd_Indicator("Config/Status");
     627  Value->setMaximumWidth(200);
     628  MainLayout->addWidget(Value, 6, 0, 1, 2);     
    604629
    605630  Value = new Edd_Indicator("Config/ModifyTime");
    606631  Value->setMaximumWidth(200);
    607632  Value->ShowAsTime = true;
    608   MainLayout->addWidget(Value, 5, 5, 1, 1);
    609 
    610   Value = new Edd_Indicator("Alarm/MasterAlarm");
    611   MainLayout->addWidget(Value, 2, 0, 1, 1);
    612 
    613   Textout = new Edd_Textout("Alarm/Summary");
    614   Textout->Accumulate = false;
    615   MainLayout->addWidget(Textout, 3, 0, 2, 1);
     633  MainLayout->addWidget(Value, 7, 0, 1, 1);
     634
    616635
    617636  // Layout of all widgets
Note: See TracChangeset for help on using the changeset viewer.