Changeset 13919


Ignore:
Timestamp:
05/26/12 15:02:10 (13 years ago)
Author:
tbretz
Message:
Moved stated to own header and namespace
Location:
trunk/FACT++/src
Files:
1 added
1 edited

Legend:

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

    r13867 r13919  
    1919#include "tools.h"
    2020
     21#include "HeadersMagicWeather.h"
    2122
    2223namespace ba = boost::asio;
     
    2526
    2627using namespace std;
    27 
    28 // ------------------------------------------------------------------------
    29 
    30 struct DimWeather
    31 {
    32     DimWeather() { memset(this, 0, sizeof(DimWeather)); }
    33 
    34     uint16_t fStatus;
    35 
    36     float    fTemp;
    37     float    fDew;
    38     float    fHum;
    39     float    fPress;
    40     float    fWind;
    41     float    fGusts;
    42     float    fDir;
    43 
    44 } __attribute__((__packed__));
    45 
     28using namespace MagicWeather;
    4629
    4730// ------------------------------------------------------------------------
     
    363346    S fWeather;
    364347
    365     enum states_t
    366     {
    367         kStateDisconnected = 1,
    368         kStateConnected,
    369         kStateReceiving,
    370     };
    371 
    372348    bool CheckEventSize(size_t has, const char *name, size_t size)
    373349    {
     
    443419
    444420        // State names
    445         AddStateName(kStateDisconnected, "NoConnection",
     421        T::AddStateName(State::kDisconnected, "NoConnection",
    446422                     "No connection to web-server could be established recently");
    447423
    448         AddStateName(kStateConnected, "Invalid",
     424        T::AddStateName(State::kConnected, "Invalid",
    449425                     "Connection to webserver can be established, but received data is not recent or invalid");
    450426
    451         AddStateName(kStateReceiving, "Valid",
     427        T::AddStateName(State::kReceiving, "Valid",
    452428                     "Connection to webserver can be established, receint data received");
    453429
Note: See TracChangeset for help on using the changeset viewer.