8 #include "stg/tariffs.h"
10 #include "asn1/ObjectSyntax.h"
14 virtual bool GetValue(ObjectSyntax_t * objectSyntax) = 0;
17 typedef std::map<std::string, Sensor *> Sensors;
19 void Int2OS(ObjectSyntax_t * dst, long src);
21 class TotalUsersSensor : public Sensor {
23 TotalUsersSensor(const USERS & u)
26 virtual ~TotalUsersSensor() {}
28 bool GetValue(ObjectSyntax_t * objectSyntax)
30 Int2OS(objectSyntax, users.GetUserNum());
38 class ConnectedUsersSensor : public Sensor {
40 ConnectedUsersSensor(USERS & u)
43 virtual ~ConnectedUsersSensor() {}
45 bool GetValue(ObjectSyntax_t * objectSyntax);
51 class AuthorizedUsersSensor : public Sensor {
53 AuthorizedUsersSensor(USERS & u)
56 virtual ~AuthorizedUsersSensor() {}
58 bool GetValue(ObjectSyntax_t * objectSyntax);
64 class AlwaysOnlineUsersSensor : public Sensor {
66 AlwaysOnlineUsersSensor(USERS & u)
69 virtual ~AlwaysOnlineUsersSensor() {}
71 bool GetValue(ObjectSyntax_t * objectSyntax);
77 class NoCashUsersSensor : public Sensor {
79 NoCashUsersSensor(USERS & u)
82 virtual ~NoCashUsersSensor() {}
84 bool GetValue(ObjectSyntax_t * objectSyntax);
90 class DisabledDetailStatsUsersSensor : public Sensor {
92 DisabledDetailStatsUsersSensor(USERS & u)
95 virtual ~DisabledDetailStatsUsersSensor() {}
97 bool GetValue(ObjectSyntax_t * objectSyntax);
103 class DisabledUsersSensor : public Sensor {
105 DisabledUsersSensor(USERS & u)
108 virtual ~DisabledUsersSensor() {}
110 bool GetValue(ObjectSyntax_t * objectSyntax);
116 class PassiveUsersSensor : public Sensor {
118 PassiveUsersSensor(USERS & u)
121 virtual ~PassiveUsersSensor() {}
123 bool GetValue(ObjectSyntax_t * objectSyntax);
129 class CreditUsersSensor : public Sensor {
131 CreditUsersSensor(USERS & u)
134 virtual ~CreditUsersSensor() {}
136 bool GetValue(ObjectSyntax_t * objectSyntax);
142 class FreeMbUsersSensor : public Sensor {
144 FreeMbUsersSensor(USERS & u)
147 virtual ~FreeMbUsersSensor() {}
149 bool GetValue(ObjectSyntax_t * objectSyntax);
155 class TariffChangeUsersSensor : public Sensor {
157 TariffChangeUsersSensor(USERS & u)
160 virtual ~TariffChangeUsersSensor() {}
162 bool GetValue(ObjectSyntax_t * objectSyntax);
168 class TotalTariffsSensor : public Sensor {
170 TotalTariffsSensor(const TARIFFS & t)
173 virtual ~TotalTariffsSensor() {}
175 bool GetValue(ObjectSyntax_t * objectSyntax)
177 Int2OS(objectSyntax, tariffs.GetTariffsNum());
182 const TARIFFS & tariffs;