-
-users.CloseSearch(handle);
-
-ValueToOS(count, objectSyntax);
-return true;
-}
-
-bool PassiveUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
-{
-int handle = users.OpenSearch();
-if (!handle)
- return false;
-
-USER_PTR user;
-size_t count = 0;
-while (!users.SearchNext(handle, &user))
- {
- if (user->GetProperty().passive)
- ++count;
- }
-
-users.CloseSearch(handle);
-
-ValueToOS(count, objectSyntax);
-return true;
-}
-
-bool CreditUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
-{
-int handle = users.OpenSearch();
-if (!handle)
- return false;
-
-USER_PTR user;
-size_t count = 0;
-while (!users.SearchNext(handle, &user))
- {
- if (user->GetProperty().credit > 0)
- ++count;
- }
-
-users.CloseSearch(handle);
-
-ValueToOS(count, objectSyntax);
-return true;
-}
-
-bool FreeMbUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
-{
-int handle = users.OpenSearch();
-if (!handle)
- return false;
-
-USER_PTR user;
-size_t count = 0;
-while (!users.SearchNext(handle, &user))
- {
- if (user->GetProperty().freeMb > 0)
- ++count;
- }
-
-users.CloseSearch(handle);
-
-ValueToOS(count, objectSyntax);
-return true;
-}
-
-bool TariffChangeUsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
-{
-int handle = users.OpenSearch();
-if (!handle)
- return false;
-
-USER_PTR user;
-size_t count = 0;
-while (!users.SearchNext(handle, &user))
- {
- if (!user->GetProperty().nextTariff.ConstData().empty())
- ++count;
- }
-
-users.CloseSearch(handle);
-
-ValueToOS(count, objectSyntax);
-return true;