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" 56 UInterface(
const uniset::ObjectId backid, CORBA::ORB_var orb = NULL,
const std::shared_ptr<uniset::ObjectIndex> oind =
nullptr );
114 UniversalIO::UIOCommand cmd,
115 long lowLimit,
long hiLimit,
bool invert =
false,
120 long lowLimit,
long hiLimit,
bool invert =
false,
133 UniversalIO::IOType getConfIOType(
const uniset::ObjectId id )
const noexcept;
153 IONotifyController_i::ThresholdsListSeq* getThresholdsList(
const uniset::ObjectId id,
174 return rep.
resolve( oind->getNameById(
id) );
192 bool waitReadyWithCancellation( const
uniset::
ObjectId id,
int msec, std::atomic_bool& cancelFlag,
int pause = 5000,
201 return oind->getIdByName(name);
207 return oind->getNameById(
id);
210 inline uniset::ObjectId getNodeId(
const std::string& fullname )
const noexcept
212 return oind->getNodeId(fullname);
217 return oind->getTextName(
id);
222 inline const std::shared_ptr<uniset::ObjectIndex> getObjectIndex() noexcept
226 inline const std::shared_ptr<uniset::Configuration> getConf() noexcept
242 inline void setCacheMaxSize(
size_t newsize ) noexcept
244 rcache.setMaxSize(newsize);
252 MaxSize(maxsize), minCallCount(cleancount) {};
261 inline void setMaxSize(
size_t ms ) noexcept
271 bool clean() noexcept;
272 inline void clear() noexcept
281 Item(): ptr(NULL), ncall(0) {}
286 bool operator<(
const CacheOfResolve::Item& rhs )
const 288 return this->ncall > rhs.ncall;
292 typedef std::unordered_map<uniset::KeyType, Item> CacheMap;
293 mutable CacheMap mcache;
295 size_t MaxSize = { 20 };
296 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;
void setValue(const uniset::ObjectId id, long value, const uniset::ObjectId node, uniset::ObjectId sup_id=uniset::DefaultObjectId) const
Выставление состояния датчика
Definition: UInterface.cc:286
Definition: CommonEventLoop.h:14
void registered(const uniset::ObjectId id, const uniset::ObjectPtr oRef, bool force=false) const
Definition: UInterface.cc:759
std::string getObjectInfo(const uniset::ObjectId id, const std::string ¶ms, const uniset::ObjectId node) const
Информация об объекте
Definition: UInterface.cc:1251
uniset::ObjectType getType(const uniset::ObjectId id, const uniset::ObjectId node) const
Definition: UInterface.cc:671
Definition: IOController_i.idl:204
long ThresholdId
Definition: UniSetTypes_i.idl:31
IOController_i::SensorInfoSeq_var getSensorSeq(const uniset::IDList &lst)
Получение состояния для списка указанных датчиков
Definition: UInterface.cc:2022
void calibrate(const IOController_i::SensorInfo &si, const IOController_i::CalibrateInfo &ci, uniset::ObjectId adminId=uniset::DefaultObjectId)
калибровка
Definition: UInterface.cc:1851
Definition: UInterface.h:52
std::shared_ptr< Configuration > uniset_conf() noexcept
Definition: Configuration.cc:91
const ObjectId DefaultObjectId
Definition: UniSetTypes.h:69
uniset::ObjectPtr resolve(const std::string &name) const
Definition: UInterface.h:167
CORBA::Object_ptr ObjectPtr
Definition: UniSetTypes.h:87
Definition: IOController_i.idl:138
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:2521
Definition: UniSetTypes_i.idl:44
Definition: MessageType.h:279
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:2515
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:1575
Definition: UniSetTypes.h:109
IOController_i::ShortMapSeq * getSensors(const uniset::ObjectId id, const uniset::ObjectId node=uniset::uniset_conf() ->getLocalNode())
Получить список датчиков
Definition: UInterface.cc:2274
Definition: IOController_i.idl:79
UniversalIO::IOType getIOType(const uniset::ObjectId id, uniset::ObjectId node) const
Definition: UInterface.cc:581
CORBA::Object_var ObjectVar
Definition: UniSetTypes.h:88
void send(const uniset::ObjectId name, const uniset::TransportMessage &msg, uniset::ObjectId node)
Definition: UInterface.cc:947
uniset::IDSeq_var askSensorsSeq(const uniset::IDList &lst, UniversalIO::UIOCommand cmd, uniset::ObjectId backid=uniset::DefaultObjectId)
Заказ по списку
Definition: UInterface.cc:2182
Definition: IOController_i.idl:57
uniset::IDSeq_var setOutputSeq(const IOController_i::OutSeq &lst, uniset::ObjectId sup_id)
Definition: UInterface.cc:2104
string< SizeOfObjectType > ObjectType
Definition: UniSetTypes_i.idl:33
Definition: UInterface.h:248
void askRemoteSensor(const uniset::ObjectId id, UniversalIO::UIOCommand cmd, const uniset::ObjectId node, uniset::ObjectId backid=uniset::DefaultObjectId) const
Definition: UInterface.cc:477
void askSensor(const uniset::ObjectId id, UniversalIO::UIOCommand cmd, uniset::ObjectId backid=uniset::DefaultObjectId) const
Универсальный заказ информации об изменении датчика
Definition: UInterface.cc:571
long getValue(const uniset::ObjectId id, const uniset::ObjectId node) const
Получение состояния датчика
Definition: UInterface.cc:117
IOController_i::ShortIOInfo getTimeChange(const uniset::ObjectId id, const uniset::ObjectId node) const
Время последнего изменения датчика
Definition: UInterface.cc:1170
long ObjectId
Definition: UniSetTypes_i.idl:30
Definition: ObjectRepository.h:45
uniset::ObjectPtr resolve(const std::string &name, const std::string &NSName="NameService") const
Definition: ObjectRepository.cc:250
std::string getNameById(const uniset::ObjectId id) const noexcept
Definition: UInterface.h:205
uniset::ObjectId getIdByName(const std::string &name) const noexcept
Definition: UInterface.h:199