1 #include "asn1/INTEGER.h"
4 #include "stg/user_property.h"
8 bool ConnectedUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
10 int handle = users.OpenSearch();
16 while (!users.SearchNext(handle, &user))
18 if (user->GetConnected())
22 users.CloseSearch(handle);
24 ValueToOS(count, objectSyntax);
28 bool AuthorizedUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
30 int handle = users.OpenSearch();
36 while (!users.SearchNext(handle, &user))
38 if (user->GetAuthorized())
42 users.CloseSearch(handle);
44 ValueToOS(count, objectSyntax);
48 bool AlwaysOnlineUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
50 int handle = users.OpenSearch();
56 while (!users.SearchNext(handle, &user))
58 if (user->GetProperty().alwaysOnline)
62 users.CloseSearch(handle);
64 ValueToOS(count, objectSyntax);
68 bool NoCashUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
70 int handle = users.OpenSearch();
76 while (!users.SearchNext(handle, &user))
78 if (user->GetProperty().cash < 0)
82 users.CloseSearch(handle);
84 ValueToOS(count, objectSyntax);
88 bool DisabledDetailStatsUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
90 int handle = users.OpenSearch();
96 while (!users.SearchNext(handle, &user))
98 if (user->GetProperty().disabledDetailStat)
102 users.CloseSearch(handle);
104 ValueToOS(count, objectSyntax);
108 bool DisabledUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
110 int handle = users.OpenSearch();
116 while (!users.SearchNext(handle, &user))
118 if (user->GetProperty().disabled)
122 users.CloseSearch(handle);
124 ValueToOS(count, objectSyntax);
128 bool PassiveUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
130 int handle = users.OpenSearch();
136 while (!users.SearchNext(handle, &user))
138 if (user->GetProperty().passive)
142 users.CloseSearch(handle);
144 ValueToOS(count, objectSyntax);
148 bool CreditUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
150 int handle = users.OpenSearch();
156 while (!users.SearchNext(handle, &user))
158 if (user->GetProperty().credit > 0)
162 users.CloseSearch(handle);
164 ValueToOS(count, objectSyntax);
168 bool FreeMbUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
170 int handle = users.OpenSearch();
176 while (!users.SearchNext(handle, &user))
178 if (user->GetProperty().freeMb > 0)
182 users.CloseSearch(handle);
184 ValueToOS(count, objectSyntax);
188 bool TariffChangeUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
190 int handle = users.OpenSearch();
196 while (!users.SearchNext(handle, &user))
198 if (!user->GetProperty().nextTariff.ConstData().empty())
202 users.CloseSearch(handle);
204 ValueToOS(count, objectSyntax);