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,
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
241 inline void setCacheMaxSize(
size_t newsize )
noexcept
243 rcache.setMaxSize(newsize);
251 MaxSize(maxsize), minCallCount(cleancount) {};
260 inline void setMaxSize(
size_t ms )
noexcept
270 bool clean()
noexcept;
271 inline void clear()
noexcept
280 Item(): ptr(NULL), ncall(0) {}
285 bool operator<(
const CacheOfResolve::Item& rhs )
const
287 return this->ncall > rhs.ncall;
291 typedef std::unordered_map<uniset::KeyType, Item> CacheMap;
292 mutable CacheMap mcache;
294 size_t MaxSize = { 20 };
295 size_t minCallCount = { 20 };
309 mutable CosNaming::NamingContext_var localctx;
310 mutable CORBA::ORB_var orb;
312 std::shared_ptr<uniset::ObjectIndex> oind;
313 std::shared_ptr<uniset::Configuration> uconf;
314#ifndef DISABLE_REST_API
Definition UniSetTypes.h:117
ObjectId getNodeId(const std::string &name) const noexcept
Definition ObjectIndex.cc:42
virtual std::string getNameById(const uniset::ObjectId id) const noexcept
Definition ObjectIndex.cc:32
virtual std::string getTextName(const uniset::ObjectId id) const noexcept=0
virtual ObjectId getIdByName(const std::string &name) const noexcept=0
Definition ObjectRepository.h:46
Definition MessageType.h:283
Definition UHttpClient.h:32
Definition UInterface.h:248
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:361
UniversalIO::IOType getIOType(const uniset::ObjectId id, uniset::ObjectId node) const
Definition UInterface.cc:656
IOController_i::ShortIOInfo getTimeChange(const uniset::ObjectId id, const uniset::ObjectId node) const
Время последнего изменения датчика
Definition UInterface.cc:1278
std::string getObjectInfo(const uniset::ObjectId id, const std::string ¶ms, const uniset::ObjectId node) const
Информация об объекте
Definition UInterface.cc:1359
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:834
void askRemoteSensor(const uniset::ObjectId id, UniversalIO::UIOCommand cmd, const uniset::ObjectId node, uniset::ObjectId backid=uniset::DefaultObjectId) const
Definition UInterface.cc:552
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:2734
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:1712
void askSensor(const uniset::ObjectId id, UniversalIO::UIOCommand cmd, uniset::ObjectId backid=uniset::DefaultObjectId) const
Универсальный заказ информации об изменении датчика
Definition UInterface.cc:646
uniset::IDSeq_var askSensorsSeq(const uniset::IDList &lst, UniversalIO::UIOCommand cmd, uniset::ObjectId backid=uniset::DefaultObjectId)
Заказ по списку
Definition UInterface.cc:2395
void send(const uniset::ObjectId name, const uniset::TransportMessage &msg, uniset::ObjectId node)
Definition UInterface.cc:1055
uniset::IDSeq_var setOutputSeq(const IOController_i::OutSeq &lst, uniset::ObjectId sup_id)
Definition UInterface.cc:2317
IOController_i::SensorInfoSeq_var getSensorSeq(const uniset::IDList &lst)
Получение состояния для списка указанных датчиков
Definition UInterface.cc:2159
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:2728
uniset::ObjectType getType(const uniset::ObjectId id, const uniset::ObjectId node) const
Definition UInterface.cc:746
void calibrate(const IOController_i::SensorInfo &si, const IOController_i::CalibrateInfo &ci, uniset::ObjectId adminId=uniset::DefaultObjectId)
калибровка
Definition UInterface.cc:1988
IOController_i::ShortMapSeq * getSensors(const uniset::ObjectId id, const uniset::ObjectId node=uniset::uniset_conf() ->getLocalNode())
Получить список датчиков
Definition UInterface.cc:2487
IOController_i::SensorIOInfo getSensorIOInfo(const IOController_i::SensorInfo &si)
Получение состояния информации о датчике
Definition UInterface.cc:2241
Definition Calibration.h:27
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:90
long ObjectId
Definition UniSetTypes_i.idl:30
Definition IOController_i.idl:83
Definition IOController_i.idl:97
Definition IOController_i.idl:58
Definition IOController_i.idl:144
Definition IOController_i.idl:210
Definition UniSetTypes_i.idl:45