UniSet  2.6.0
Классы | Открытые члены | Открытые статические члены | Защищенные типы | Защищенные члены | Защищенные данные | Полный список членов класса
Класс uniset::MQTTPublisher
Граф наследования:uniset::MQTTPublisher:
Inheritance graph
[см. легенду]
Граф связей класса uniset::MQTTPublisher:
Collaboration graph
[см. легенду]

Классы

struct  MQTTInfo
struct  MQTTTextInfo
struct  RangeInfo

Открытые члены

 MQTTPublisher (uniset::ObjectId objId, xmlNode *cnode, uniset::ObjectId shmID, const std::shared_ptr< SharedMemory > &ic=nullptr, const std::string &prefix="mqtt")
virtual void on_connect (int rc) override
virtual void on_message (const struct mosquitto_message *message) override
virtual void on_subscribe (int mid, int qos_count, const int *granted_qos) override
- Открытые члены inherited from UObject_SK
 UObject_SK (uniset::ObjectId id, xmlNode *node=uniset::uniset_conf()->getNode("UObject"), const std::string &argprefix="")
long getValue (uniset::ObjectId sid)
void setValue (uniset::ObjectId sid, long value)
void askSensor (uniset::ObjectId sid, UniversalIO::UIOCommand, uniset::ObjectId node=uniset::uniset_conf()->getLocalNode())
void updateValues ()
virtual uniset::SimpleInfogetInfo (const char *userparam) override
virtual bool setMsg (uniset::ObjectId code, bool state=true) noexcept
std::shared_ptr< DebugStreamlog () noexcept
std::shared_ptr
< uniset::LogAgregator
logAgregator () noexcept
void init_dlog (std::shared_ptr< DebugStream > d) noexcept
std::string dumpIO ()
std::string str (uniset::ObjectId id, bool showLinkName=true) const
std::string strval (uniset::ObjectId id, bool showLinkName=true) const
std::string dumpVars ()
std::string help () noexcept
virtual Poco::JSON::Object::Ptr httpGet (const Poco::URI::QueryParameters &p) override
virtual Poco::JSON::Object::Ptr httpRequest (const std::string &req, const Poco::URI::QueryParameters &p) override
virtual Poco::JSON::Object::Ptr httpHelp (const Poco::URI::QueryParameters &p) override
- Открытые члены inherited from uniset::UniSetObject
 UniSetObject (const std::string &name, const std::string &section)
 UniSetObject (uniset::ObjectId id)
std::shared_ptr< UniSetObjectget_ptr ()
virtual CORBA::Boolean exist () override
virtual uniset::ObjectId getId () override
const uniset::ObjectId getId () const
std::string getName () const
virtual uniset::ObjectType getType () override
const std::string getStrType ()
virtual uniset::SimpleInfoapiRequest (const char *query) override
virtual void push (const uniset::TransportMessage &msg) override
 поместить сообщение в очередь
uniset::ObjectPtr getRef () const
virtual timeout_t askTimer (uniset::TimerId timerid, timeout_t timeMS, clock_t ticks=-1, uniset::Message::Priority p=uniset::Message::High) override
- Открытые члены inherited from uniset::LT_Object
timeout_t checkTimers (UniSetObject *obj)
timeout_t getTimeInterval (uniset::TimerId timerid)
timeout_t getTimeLeft (uniset::TimerId timerid)

Открытые статические члены

static std::shared_ptr
< MQTTPublisher
init_mqttpublisher (int argc, const char *const *argv, uniset::ObjectId shmID, const std::shared_ptr< SharedMemory > &ic=nullptr, const std::string &prefix="mqtt")
static void help_print (int argc, const char *const *argv)

Защищенные типы

typedef std::unordered_map
< uniset::ObjectId, MQTTInfo
MQTTMap
typedef std::unordered_map
< uniset::ObjectId,
MQTTTextInfo
MQTTTextMap

Защищенные члены

virtual void askSensors (UniversalIO::UIOCommand cmd) override
virtual void sensorInfo (const uniset::SensorMessage *sm) override
virtual void sigterm (int signo) override
virtual bool deactivateObject () override
 Деактивиция объекта (переопределяется для необходимых действий перед деактивацией)
virtual void sysCommand (const uniset::SystemMessage *sm) override
- Защищенные члены inherited from UObject_SK
virtual void callback () noexcept override
virtual void processingMessage (const uniset::VoidMessage *msg) override
virtual void timerInfo (const uniset::TimerMessage *tm) override
virtual bool activateObject () override
 Активизация объекта (переопределяется для необходимых действий после активизации)
virtual std::string getMonitInfo ()
virtual void httpGetUserData (Poco::JSON::Object::Ptr &jdata)
virtual Poco::JSON::Object::Ptr httpDumpIO ()
virtual Poco::JSON::Object::Ptr httpRequestLog (const Poco::URI::QueryParameters &p)
virtual void step ()
void preAskSensors (UniversalIO::UIOCommand cmd)
void preSysCommand (const uniset::SystemMessage *sm)
virtual void testMode (bool state)
void updateOutputs (bool force)
void waitSM (int wait_msec, uniset::ObjectId testID=uniset::DefaultObjectId)
uniset::ObjectId getSMTestID ()
void resetMsg ()
int getIntProp (const std::string &name)
const std::string getProp (const std::string &name)
- Защищенные члены inherited from uniset::UniSetObject
VoidMessagePtr receiveMessage ()
virtual VoidMessagePtr waitMessage (timeout_t msec=UniSetTimer::WaitUpTime)
void termWaiting ()
size_t countMessages ()
size_t getCountOfLostMessages () const
void terminate ()
void thread (bool create)
void offThread ()
void onThread ()
void setID (uniset::ObjectId id)
void setThreadPriority (Poco::Thread::Priority p)
void setMaxSizeOfMessageQueue (size_t s)
size_t getMaxSizeOfMessageQueue () const
bool isActive () const
void setActive (bool set)
virtual Poco::JSON::Object::Ptr httpGetMyInfo (Poco::JSON::Object::Ptr root)
Poco::JSON::Object::Ptr request_conf (const std::string &req, const Poco::URI::QueryParameters &p)
Poco::JSON::Object::Ptr request_conf_name (const std::string &name, const std::string &props)
- Защищенные члены inherited from uniset::LT_Object
virtual std::string getTimerName (int id)
TimersList getTimersList ()

Защищенные данные

std::shared_ptr< SMInterfaceshm
MQTTMap publist
MQTTTextMap textpublist
- Защищенные данные inherited from UObject_SK
uniset::Trigger trResetMsg
uniset::PassiveTimer ptResetMsg
int resetMsgTime
int sleep_msec
bool active
const std::string argprefix
uniset::ObjectId smTestID
uniset::PassiveTimer ptHeartBeat
uniset::ObjectId idHeartBeat
long maxHeartBeat
xmlNode * confnode
uniset::timeout_t smReadyTimeout
std::atomic_bool activated
uniset::timeout_t activateTimeout
uniset::PassiveTimer ptStartUpTimeout
int askPause
IOController_i::SensorInfo si
bool forceOut
std::shared_ptr
< uniset::LogAgregator
loga
std::shared_ptr< DebugStreammylog
std::shared_ptr
< uniset::LogServer
logserv
std::string logserv_host = {""}
int logserv_port = {0}
uniset::VMonitor vmon
- Защищенные данные inherited from uniset::UniSetObject
std::shared_ptr< UInterfaceui
std::string myname
std::string section
std::weak_ptr< UniSetManagermymngr
- Защищенные данные inherited from uniset::LT_Object
timeout_t sleepTime

Методы

bool MQTTPublisher::deactivateObject ( )
overrideprotectedvirtual

Деактивиция объекта (переопределяется для необходимых действий перед деактивацией)

Переопределяет метод предка uniset::UniSetObject.

void MQTTPublisher::help_print ( int  argc,
const char *const *  argv 
)
static

глобальная функция для вывода help-а

std::shared_ptr< MQTTPublisher > MQTTPublisher::init_mqttpublisher ( int  argc,
const char *const *  argv,
uniset::ObjectId  shmID,
const std::shared_ptr< SharedMemory > &  ic = nullptr,
const std::string &  prefix = "mqtt" 
)
static

глобальная функция для инициализации объекта

void MQTTPublisher::sigterm ( int  signo)
overrideprotectedvirtual

Функция вызываемая при приходе сигнала завершения или прерывания процесса. Переопределив ее можно выполнять специфичные для процесса действия по обработке сигнала. Например переход в безопасное состояние.

Предупреждения
В обработчике сигналов ЗАПРЕЩЕНО вызывать функции подобные exit(..), abort()!!!!

Переопределяет метод предка UObject_SK.