~thomas-voss/location-service/add_controller_and_service_configuration

« back to all changes in this revision

Viewing changes to include/location_service/com/ubuntu/location/connectivity/wireless_network.h

  • Committer: thomas-voss
  • Date: 2014-05-20 07:26:03 UTC
  • Revision ID: thomas.voss@canonical.com-20140520072603-avgzxsfz2lm5v6ue
Remove dbus-test runner setups as dbus-cpp provides its own fixture now.
Add documentation for space vehicle.
Adjust LTE radio cell to carry an attribute TAC instead of LAC.
Add test-cases for location::connectivity::RadioCell.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    {
59
59
        /** @brief Tags a frequency measurement for a wireless network. */
60
60
        struct Frequency {};
61
 
        /** @brief Tags the channel of a wireless network. */
62
 
        struct Channel {};
63
61
        /** @brief Tags the signal strength of a wireless network. */
64
 
        struct Strength {};
 
62
        struct SignalStrength {};
65
63
    };
66
64
 
 
65
    /** Frequency that an individual AP operates on. */
67
66
    typedef BoundedInteger
68
67
    <
69
68
        Tag::Frequency,
70
69
        2412,
71
70
        5825
72
71
    > Frequency;
73
 
    typedef BoundedInteger
74
 
    <
75
 
        Tag::Channel,
76
 
        1,
77
 
        165
78
 
    > Channel;
79
 
    typedef BoundedInteger
80
 
    <
81
 
        Tag::Strength,
 
72
 
 
73
    /** Strength of signal for an individual AP. */
 
74
    typedef BoundedInteger
 
75
    <
 
76
        Tag::SignalStrength,
82
77
        0,
83
78
        100
84
 
    > Strength;
 
79
    > SignalStrength;
85
80
 
86
81
    bool operator==(const WirelessNetwork& rhs) const
87
82
    {
89
84
               ssid == rhs.ssid &&
90
85
               mode == rhs.mode &&
91
86
               frequency == rhs.frequency &&
92
 
               channel == rhs.channel &&
93
 
               strength == rhs.strength &&
94
 
               snr == rhs.snr;
 
87
               signal_strength == rhs.signal_strength;
95
88
    }
96
89
 
97
90
    friend std::ostream& operator<<(std::ostream& out, const WirelessNetwork& wifi)
101
94
                   << "ssid: " << wifi.ssid << ", "
102
95
                   << "mode: " << wifi.mode << ", "
103
96
                   << "frequency: " << wifi.frequency << ", "
104
 
                   << "channel: " << wifi.channel << ", "
105
 
                   << "strength: " << wifi.strength << ", "
106
 
                   << "snr: " << wifi.snr
 
97
                   << "strength: " << wifi.signal_strength
107
98
                   << ")";
108
99
    }
109
100
 
111
102
    std::string ssid; ///< The SSID of the network.
112
103
    Mode mode; ///< The mode of the network.
113
104
    Frequency frequency; ///< Frequency of the network/AP.
114
 
    Channel channel; ///< Channel of the network/AP.
115
 
    Strength strength; ///< Signal quality of the network/AP in percent.
116
 
    float snr; ///< Signal-noise ratio of the specific network.
 
105
    SignalStrength signal_strength; ///< Signal quality of the network/AP in percent.
117
106
};
118
107
}
119
108
}