134 public POA_IONotifyController_i
138 IONotifyController(
const std::string& name,
const std::string& section, std::shared_ptr<IOConfig> ioconf =
nullptr );
154 CORBA::Long lowLimit, CORBA::Long hiLimit, CORBA::Boolean invert,
155 UniversalIO::UIOCommand cmd )
override;
159 virtual IONotifyController_i::ThresholdsListSeq* getThresholdsList()
override;
166#ifndef DISABLE_REST_API
168 virtual Poco::JSON::Object::Ptr httpHelp(
const Poco::URI::QueryParameters& p )
override;
169 virtual Poco::JSON::Object::Ptr httpRequest(
const std::string& req,
const Poco::URI::QueryParameters& p )
override;
178 UniSetObject_i_ptr ref = 0,
size_t maxAttemtps = 10 ):
180 ref(ref), attempt(maxAttemtps) {}
182 UniSetObject_i_var ref;
183 size_t attempt = { 10 };
184 size_t lostEvents = { 0 };
185 size_t smCount = { 0 };
193 typedef std::list<ConsumerInfoExt> ConsumerList;
208 typedef std::unordered_map<uniset::ObjectId, ConsumerListInfo>
AskMap;
212 typedef std::unordered_map<UThresholdInfo*, ConsumerListInfo> AskThresholdMap;
218 virtual void initItem( std::shared_ptr<USensorInfo>& usi,
IOController* ic );
233 std::shared_ptr<IOConfig> restorer;
235 void onChangeUndefinedState( std::shared_ptr<USensorInfo>& usi,
IOController* ic );
238 virtual long localSetValue( std::shared_ptr<USensorInfo>& usi,
241#ifndef DISABLE_REST_API
243 Poco::JSON::Object::Ptr request_consumers(
const std::string& req,
const Poco::URI::QueryParameters& p );
244 Poco::JSON::Object::Ptr request_lost(
const std::string& req,
const Poco::URI::QueryParameters& p );
249 void showStatisticsForConsumer( std::ostringstream& inf,
const std::string& consumer );
250 void showStatisticsForLostConsumers( std::ostringstream& inf );
251 void showStatisticsForConsusmers( std::ostringstream& inf );
252 void showStatisticsForConsumersWithLostEvent( std::ostringstream& inf );
253 void showStatisticsForSensor( std::ostringstream& inf,
const std::string& name );
259 udataConsumerList = 0
264 friend class NCRestorer;
275 std::shared_ptr<UThresholdInfo> addThresholdIfNotExist( std::shared_ptr<USensorInfo>& usi, std::shared_ptr<UThresholdInfo>& ti );
276 bool addThresholdConsumer( std::shared_ptr<UThresholdInfo>& ti,
const uniset::ConsumerInfo& ci );
279 bool removeThresholdConsumer( std::shared_ptr<USensorInfo>& usi,
280 std::shared_ptr<UThresholdInfo>& ti,
284 AskThresholdMap askTMap;
291 sigc::connection conInit;
292 sigc::connection conUndef;
297 std::mutex lostConsumersMutex;
299 struct LostConsumerInfo
301 size_t count = { 0 };
302 bool lost = {
false };
310 std::unordered_map<uniset::ObjectId, LostConsumerInfo> lostConsumers;
virtual void send(ConsumerListInfo &lst, const uniset::SensorMessage &sm, const uniset::ConsumerInfo *ci=nullptr)
посылка информации об изменении состояния датчика (всем или указанному заказчику)
Definition IONotifyController.cc:653
std::shared_ptr< UThresholdInfo > findThreshold(const uniset::ObjectId sid, const uniset::ThresholdId tid)
поиск информации о пороговом датчике
Definition IONotifyController.cc:1023