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
240 inline void setCacheMaxSize(
size_t newsize ) noexcept
242 rcache.setMaxSize(newsize);
250 MaxSize(maxsize), minCallCount(cleancount) {};
259 inline void setMaxSize(
size_t ms ) noexcept
269 bool clean() noexcept;
270 inline void clear() noexcept
279 Item(): ptr(NULL), ncall(0) {}
284 bool operator<(
const CacheOfResolve::Item& rhs )
const 286 return this->ncall > rhs.ncall;
290 typedef std::unordered_map<uniset::KeyType, Item> CacheMap;
291 mutable CacheMap mcache;
293 size_t MaxSize = { 20 };
294 size_t minCallCount = { 20 };
307 mutable CosNaming::NamingContext_var localctx;
308 mutable CORBA::ORB_var orb;
310 std::shared_ptr<uniset::ObjectIndex> oind;
311 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: CallbackTimer.h:29
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:1105
uniset::ObjectType getType(const uniset::ObjectId id, const uniset::ObjectId node) const
Definition: UInterface.cc:671
Definition: IOController_i.idl:203
long ThresholdId
Definition: UniSetTypes_i.idl:31
IOController_i::SensorInfoSeq_var getSensorSeq(const uniset::IDList &lst)
Получение состояния для списка указанных датчиков
Definition: UInterface.cc:1876
void calibrate(const IOController_i::SensorInfo &si, const IOController_i::CalibrateInfo &ci, uniset::ObjectId adminId=uniset::DefaultObjectId)
калибровка
Definition: UInterface.cc:1705
Definition: UInterface.h:52
std::shared_ptr< Configuration > uniset_conf() noexcept
Definition: Configuration.cc:90
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:96
Definition: IOController_i.idl:137
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:2375
Definition: UniSetTypes_i.idl:44
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:2369
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:1429
Definition: UniSetTypes.h:118
IOController_i::ShortMapSeq * getSensors(const uniset::ObjectId id, const uniset::ObjectId node=uniset::uniset_conf() ->getLocalNode())
Получить список датчиков
Definition: UInterface.cc:2128
Definition: IOController_i.idl:78
UniversalIO::IOType getIOType(const uniset::ObjectId id, uniset::ObjectId node) const
Definition: UInterface.cc:581
CORBA::Object_var ObjectVar
Definition: UniSetTypes.h:97
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:2036
Definition: IOController_i.idl:56
uniset::IDSeq_var setOutputSeq(const IOController_i::OutSeq &lst, uniset::ObjectId sup_id)
Definition: UInterface.cc:1958
string< SizeOfObjectType > ObjectType
Definition: UniSetTypes_i.idl:33
Definition: UInterface.h:246
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:1024
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