29#include <unordered_map>
31#include <omniORB4/CORBA.h>
32#include "Exceptions.h"
33#include "UniSetTypes.h"
34#include "ObjectIndex.h"
35#include "ObjectRepository.h"
36#include "IOController_i.hh"
37#include "MessageType.h"
38#include "Configuration.h"
39#ifndef DISABLE_REST_API
40#include "UHttpClient.h"
58 UInterface(
const uniset::ObjectId backid, CORBA::ORB_var orb = NULL,
const std::shared_ptr<uniset::ObjectIndex> oind =
nullptr );
121 UniversalIO::UIOCommand cmd,
122 long lowLimit,
long hiLimit,
bool invert =
false,
127 long lowLimit,
long hiLimit,
bool invert =
false,
140 UniversalIO::IOType getConfIOType(
const uniset::ObjectId id )
const noexcept;
160 IONotifyController_i::ThresholdsListSeq* getThresholdsList(
const uniset::ObjectId id,
191 bool waitReadyWithCancellation(
const uniset::ObjectId id,
int msec, std::atomic_bool& cancelFlag,
int pause = 5000,
200 return oind->getIdByName(name);
206 return oind->getNameById(
id);
209 inline uniset::ObjectId getNodeId(
const std::string& fullname )
const noexcept
211 return oind->getNodeId(fullname);
216 return oind->getTextName(
id);
221 inline const std::shared_ptr<uniset::ObjectIndex> getObjectIndex() noexcept
225 inline const std::shared_ptr<uniset::Configuration> getConf() noexcept
249 inline void setCacheMaxSize(
size_t newsize )
noexcept
251 rcache.setMaxSize(newsize);
259 MaxSize(maxsize), minCallCount(cleancount) {};
268 inline void setMaxSize(
size_t ms )
noexcept
278 bool clean()
noexcept;
279 inline void clear()
noexcept
288 Item(): ptr(NULL), ncall(0) {}
293 bool operator<(
const CacheOfResolve::Item& rhs )
const
295 return this->ncall > rhs.ncall;
299 typedef std::unordered_map<uniset::KeyType, Item> CacheMap;
300 mutable CacheMap mcache;
302 size_t MaxSize = { 20 };
303 size_t minCallCount = { 20 };
317 mutable CosNaming::NamingContext_var localctx;
318 mutable CORBA::ORB_var orb;
320 std::shared_ptr<uniset::ObjectIndex> oind;
321 std::shared_ptr<uniset::Configuration> uconf;
322#ifndef DISABLE_REST_API
Definition UniSetTypes.h:117
Definition ObjectRepository.h:46
Definition MessageType.h:283
Definition UHttpClient.h:32
Definition UInterface.h:256
Definition UInterface.h:55
void setValue(const uniset::ObjectId id, long value, const uniset::ObjectId node, uniset::ObjectId sup_id=uniset::DefaultObjectId) const
Выставление состояния датчика
Definition UInterface.cc:376
UniversalIO::IOType getIOType(const uniset::ObjectId id, uniset::ObjectId node) const
Definition UInterface.cc:686
IOController_i::ShortIOInfo getTimeChange(const uniset::ObjectId id, const uniset::ObjectId node) const
Время последнего изменения датчика
Definition UInterface.cc:1318
std::string getObjectInfo(const uniset::ObjectId id, const std::string ¶ms, const uniset::ObjectId node) const
Информация об объекте
Definition UInterface.cc:1404
std::string getNameById(const uniset::ObjectId id) const noexcept
Definition UInterface.h:204
void registered(const uniset::ObjectId id, const uniset::ObjectPtr oRef, bool force=false) const
Definition UInterface.cc:874
void askRemoteSensor(const uniset::ObjectId id, UniversalIO::UIOCommand cmd, const uniset::ObjectId node, uniset::ObjectId backid=uniset::DefaultObjectId) const
Definition UInterface.cc:577
bool waitWorking(const uniset::ObjectId id, int msec, int pause=3000, const uniset::ObjectId node=uniset::uniset_conf() ->getLocalNode()) noexcept
used for check 'getValue'
Definition UInterface.cc:2849
uniset::ObjectId getIdByName(const std::string &name) const noexcept
Definition UInterface.h:198
void askThreshold(const uniset::ObjectId sensorId, const uniset::ThresholdId tid, UniversalIO::UIOCommand cmd, long lowLimit, long hiLimit, bool invert=false, uniset::ObjectId backid=uniset::DefaultObjectId) const
Заказ информации об изменении порога
Definition UInterface.cc:1767
void askSensor(const uniset::ObjectId id, UniversalIO::UIOCommand cmd, uniset::ObjectId backid=uniset::DefaultObjectId) const
Универсальный заказ информации об изменении датчика
Definition UInterface.cc:676
uniset::IDSeq_var askSensorsSeq(const uniset::IDList &lst, UniversalIO::UIOCommand cmd, uniset::ObjectId backid=uniset::DefaultObjectId)
Заказ по списку
Definition UInterface.cc:2490
void send(const uniset::ObjectId name, const uniset::TransportMessage &msg, uniset::ObjectId node)
Definition UInterface.cc:1095
uniset::IDSeq_var setOutputSeq(const IOController_i::OutSeq &lst, uniset::ObjectId sup_id)
Definition UInterface.cc:2407
IOController_i::SensorInfoSeq_var getSensorSeq(const uniset::IDList &lst)
Получение состояния для списка указанных датчиков
Definition UInterface.cc:2239
long getValue(const uniset::ObjectId id, const uniset::ObjectId node) const
Получение состояния датчика
Definition UInterface.cc:117
bool waitReady(const uniset::ObjectId id, int msec, int pause=5000, const uniset::ObjectId node=uniset::uniset_conf() ->getLocalNode()) noexcept
used for check 'isExist'
Definition UInterface.cc:2843
uniset::ObjectType getType(const uniset::ObjectId id, const uniset::ObjectId node) const
Definition UInterface.cc:781
void calibrate(const IOController_i::SensorInfo &si, const IOController_i::CalibrateInfo &ci, uniset::ObjectId adminId=uniset::DefaultObjectId)
калибровка
Definition UInterface.cc:2058
IOController_i::ShortMapSeq * getSensors(const uniset::ObjectId id, const uniset::ObjectId node=uniset::uniset_conf() ->getLocalNode())
Получить список датчиков
Definition UInterface.cc:2587
IOController_i::SensorIOInfo getSensorIOInfo(const IOController_i::SensorInfo &si)
Получение состояния информации о датчике
Definition UInterface.cc:2326
Definition AccessConfig.h:30
CORBA::Object_ptr ObjectPtr
Definition UniSetTypes.h:94
CORBA::Object_var ObjectVar
Definition UniSetTypes.h:95
string< SizeOfObjectType > ObjectType
Definition UniSetTypes_i.idl:33
long ThresholdId
Definition UniSetTypes_i.idl:31
const ObjectId DefaultObjectId
Definition UniSetTypes.h:71
std::shared_ptr< Configuration > uniset_conf() noexcept
Definition Configuration.cc:106
long ObjectId
Definition UniSetTypes_i.idl:30
Definition IOController_i.idl:89
Definition IOController_i.idl:103
Definition IOController_i.idl:64
Definition IOController_i.idl:150
Definition IOController_i.idl:216
Definition UniSetTypes_i.idl:45