Changeset 13921


Ignore:
Timestamp:
05/26/12 15:30:42 (13 years ago)
Author:
tbretz
Message:
Moved state definitions to header file and namespace.
Location:
trunk/FACT++/src
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/tngweather.cc

    r13887 r13921  
    1919#include "tools.h"
    2020
     21#include "HeadersTNGWeather.h"
     22
    2123#include <Soprano/Soprano>
    2224
     
    2628
    2729using namespace std;
    28 
    29 // ------------------------------------------------------------------------
    30 
    31 struct DimWeather
    32 {
    33     DimWeather() { memset(this, 0, sizeof(DimWeather)); }
    34 
    35     float fTemp10M;
    36     float fTemp5M;
    37     float fTemp2M;
    38     float fTempGround;
    39     float fDewPoint;
    40     float fHumidity;
    41     float fAirPressure;
    42     float fWindSpeed;
    43     float fWindDirection;
    44     float fDeltaM1;
    45     float fDustTotal;
    46     float fSeeing;
    47 
    48 } __attribute__((__packed__));
    49 
    50 
    51 // ------------------------------------------------------------------------
     30using namespace TNGWeather;
     31
    5232
    5333class ConnectionWeather : public Connection
     
    420400    S fWeather;
    421401
    422     enum states_t
    423     {
    424         kStateDisconnected = 1,
    425         kStateConnected,
    426         kStateReceiving,
    427     };
    428 
    429402    bool CheckEventSize(size_t has, const char *name, size_t size)
    430403    {
     
    500473
    501474        // State names
    502         AddStateName(kStateDisconnected, "NoConnection",
     475        T::AddStateName(State::kDisconnected, "NoConnection",
    503476                     "No connection to web-server could be established recently");
    504477
    505         AddStateName(kStateConnected, "Invalid",
     478        T::AddStateName(State::kConnected, "Invalid",
    506479                     "Connection to webserver can be established, but received data is not recent or invalid");
    507480
    508         AddStateName(kStateReceiving, "Valid",
     481        T::AddStateName(State::kReceiving, "Valid",
    509482                     "Connection to webserver can be established, receint data received");
    510483
Note: See TracChangeset for help on using the changeset viewer.