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
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);
258 CacheOfResolve(
size_t maxsize,
size_t cleancount = 20 ):
259 MaxSize(maxsize), minCallCount(cleancount) {};
260 ~CacheOfResolve() {};
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
Определения UniSetTypes.h:117
ObjectId getNodeId(const std::string &name) const noexcept
Определения ObjectIndex.cc:42
virtual std::string getTextName(const uniset::ObjectId id) const noexcept=0
Определения ObjectRepository.h:46
Определения UHttpClient.h:32
Определения UInterface.h:256
void setValue(const uniset::ObjectId id, long value, const uniset::ObjectId node, uniset::ObjectId sup_id=uniset::DefaultObjectId) const
Выставление состояния датчика
Определения UInterface.cc:376
UniversalIO::IOType getIOType(const uniset::ObjectId id, uniset::ObjectId node) const
Определения UInterface.cc:686
IOController_i::ShortIOInfo getTimeChange(const uniset::ObjectId id, const uniset::ObjectId node) const
Время последнего изменения датчика
Определения UInterface.cc:1318
std::string getObjectInfo(const uniset::ObjectId id, const std::string ¶ms, const uniset::ObjectId node) const
Информация об объекте
Определения UInterface.cc:1404
std::string getNameById(const uniset::ObjectId id) const noexcept
Определения UInterface.h:204
void registered(const uniset::ObjectId id, const uniset::ObjectPtr oRef, bool force=false) const
Определения UInterface.cc:874
void askRemoteSensor(const uniset::ObjectId id, UniversalIO::UIOCommand cmd, const uniset::ObjectId node, uniset::ObjectId backid=uniset::DefaultObjectId) const
Определения 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'
Определения UInterface.cc:2849
uniset::ObjectId getIdByName(const std::string &name) const noexcept
Определения 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
Заказ информации об изменении порога
Определения UInterface.cc:1767
void askSensor(const uniset::ObjectId id, UniversalIO::UIOCommand cmd, uniset::ObjectId backid=uniset::DefaultObjectId) const
Универсальный заказ информации об изменении датчика
Определения UInterface.cc:676
uniset::IDSeq_var askSensorsSeq(const uniset::IDList &lst, UniversalIO::UIOCommand cmd, uniset::ObjectId backid=uniset::DefaultObjectId)
Заказ по списку
Определения UInterface.cc:2490
void send(const uniset::ObjectId name, const uniset::TransportMessage &msg, uniset::ObjectId node)
Определения UInterface.cc:1095
uniset::IDSeq_var setOutputSeq(const IOController_i::OutSeq &lst, uniset::ObjectId sup_id)
Определения UInterface.cc:2407
IOController_i::SensorInfoSeq_var getSensorSeq(const uniset::IDList &lst)
Получение состояния для списка указанных датчиков
Определения UInterface.cc:2239
long getValue(const uniset::ObjectId id, const uniset::ObjectId node) const
Получение состояния датчика
Определения 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'
Определения UInterface.cc:2843
uniset::ObjectType getType(const uniset::ObjectId id, const uniset::ObjectId node) const
Определения UInterface.cc:781
void calibrate(const IOController_i::SensorInfo &si, const IOController_i::CalibrateInfo &ci, uniset::ObjectId adminId=uniset::DefaultObjectId)
калибровка
Определения UInterface.cc:2058
IOController_i::ShortMapSeq * getSensors(const uniset::ObjectId id, const uniset::ObjectId node=uniset::uniset_conf() ->getLocalNode())
Получить список датчиков
Определения UInterface.cc:2587
IOController_i::SensorIOInfo getSensorIOInfo(const IOController_i::SensorInfo &si)
Получение состояния информации о датчике
Определения UInterface.cc:2326
Определения Calibration.h:27
CORBA::Object_ptr ObjectPtr
Определения UniSetTypes.h:94
CORBA::Object_var ObjectVar
Определения UniSetTypes.h:95
string< SizeOfObjectType > ObjectType
Определения UniSetTypes_i.idl:33
long ThresholdId
Определения UniSetTypes_i.idl:31
const ObjectId DefaultObjectId
Определения UniSetTypes.h:71
std::shared_ptr< Configuration > uniset_conf() noexcept
Определения Configuration.cc:106
long ObjectId
Определения UniSetTypes_i.idl:30
Определения IOController_i.idl:89
Определения IOController_i.idl:103
Определения IOController_i.idl:64
Определения IOController_i.idl:150
Определения IOController_i.idl:216