18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_CONNECTIVITY_RADIO_CELL_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_CONNECTIVITY_RADIO_CELL_H_
23 #include <core/signal.h>
34 namespace connectivity
40 typedef std::shared_ptr<RadioCell> Ptr;
63 template<
int min,
int max,
int invalid = min-1>
64 using MobileCountryCode = BoundedInteger<Mcc, min, max, invalid>;
65 template<
int min,
int max,
int invalid = min-1>
66 using MobileNetworkCode = BoundedInteger<Mnc, min, max, invalid>;
67 template<
int min,
int max,
int invalid = min-1>
68 using LocationAreaCode = BoundedInteger<Lac, min, max, invalid>;
69 template<
int min,
int max,
int invalid = min-1>
70 using TrackingAreaCode = BoundedInteger<Lac, min, max, invalid>;
71 template<
int min,
int max,
int invalid = min-1>
72 using CellId = BoundedInteger<Id, min, max, invalid>;
73 template<
int min,
int max,
int invalid = min-1>
74 using PrimaryScramblingCode = BoundedInteger<Psc, min, max, invalid>;
75 template<
int min,
int max,
int invalid = min-1>
76 using PhysicalId = BoundedInteger<Pid, min, max, invalid>;
77 template<
int min,
int max,
int invalid = min-1>
78 using ReceivedSignalStrength = BoundedInteger<Rss, min, max, invalid>;
79 template<
int min,
int max,
int invalid = min-1>
80 using ArbitraryStrengthUnit = BoundedInteger<Asu, min, max, invalid>;
81 template<
int min,
int max,
int invalid = min-1>
82 using TimingAdvance = BoundedInteger<Ta, min, max, invalid>;
89 typedef MobileCountryCode
93 std::numeric_limits<int>::max()
96 typedef MobileNetworkCode
100 std::numeric_limits<int>::max()
103 typedef LocationAreaCode
107 std::numeric_limits<int>::max()
114 std::numeric_limits<int>::max()
118 typedef ArbitraryStrengthUnit
136 typedef MobileCountryCode
140 std::numeric_limits<int>::max()
143 typedef MobileNetworkCode
147 std::numeric_limits<int>::max()
150 typedef LocationAreaCode
154 std::numeric_limits<int>::max()
161 std::numeric_limits<int>::max()
164 typedef ArbitraryStrengthUnit
182 typedef MobileCountryCode
186 std::numeric_limits<int>::max()
189 typedef MobileNetworkCode
193 std::numeric_limits<int>::max()
196 typedef TrackingAreaCode
200 std::numeric_limits<int>::max()
207 std::numeric_limits<int>::max()
214 std::numeric_limits<int>::max()
217 typedef ArbitraryStrengthUnit
239 virtual const core::Signal<>&
changed()
const = 0;
std::ostream & operator<<(std::ostream &out, State state)
Pretty prints the given state to the given output stream.
bool operator==(const RadioCell::Gsm &lhs, const RadioCell::Gsm &rhs)
Returns true iff lhs equals rhs.
LocationAreaCode< 0, 65535, std::numeric_limits< int >::max() > LAC
MobileNetworkCode< 0, 999, std::numeric_limits< int >::max() > MNC
MobileCountryCode< 0, 999, std::numeric_limits< int >::max() > MCC
CellId< 0, 65535, std::numeric_limits< int >::max() > ID
ArbitraryStrengthUnit< 0, 31, 99 > SignalStrength
Models an LTE radio cell.
MobileNetworkCode< 0, 999, std::numeric_limits< int >::max() > MNC
CellId< 0, 268435455, std::numeric_limits< int >::max() > ID
TrackingAreaCode< 0, 65535, std::numeric_limits< int >::max() > TAC
ArbitraryStrengthUnit< 0, 31, 99 > SignalStrength
MobileCountryCode< 0, 999, std::numeric_limits< int >::max() > MCC
PhysicalId< 0, 503, std::numeric_limits< int >::max() > PID
Models a UMTS radio cell.
MobileNetworkCode< 0, 999, std::numeric_limits< int >::max() > MNC
CellId< 0, 268435455, std::numeric_limits< int >::max() > ID
MobileCountryCode< 0, 999, std::numeric_limits< int >::max() > MCC
LocationAreaCode< 0, 65535, std::numeric_limits< int >::max() > LAC
ArbitraryStrengthUnit< 0, 31, 99 > SignalStrength
Models a radio cell that one of the modems in the system is connected to.
virtual Type type() const =0
Returns the type of the radio cell.
virtual const Umts & umts() const =0
Returns UMTS-specific details or throws std::runtime_error if this is not a UMTS radiocell.
virtual const Lte & lte() const =0
Returns LTE-specific details or throws std::runtime_error if this is not an LTE radiocell.
Type
Enumerates the known technologies.
virtual const core::Signal & changed() const =0
Emitted when the cell details change.
RadioCell & operator=(const RadioCell &rhs)=delete
virtual const Gsm & gsm() const =0
Returns GSM-specific details or throws std::runtime_error if this is not a GSM radiocell.
RadioCell(const RadioCell &rhs)=delete
virtual ~RadioCell()=default