MQTTClient Class
(MQTTIO::MQTTClient)Inherits: | IOServer, OSAPIThread, and |
Public Types
class | AliasInfo |
class | SubscriptionResult |
Public Functions
MQTTClient() | |
~MQTTClient() override | |
AliasInfo | GetAlias(const std::string &topic) |
int | GetClientProtocolVersion() const |
double | GetFs() const |
void | IncreasePublishedCount() |
void | IncreaseSubscribedCount() |
void | NotifyWorkerThreadMessageQueueNeedsService() |
void | RemoveAlias(const std::string &topic) |
void | SetLastMessageTimestamp() |
SubscriptionResult | SubscribeToTopic(std::string topic, unsigned short qos, std::variant<unsigned int, TopicBase *> subscriber) |
void | UngracefullyCloseConnection() |
void | UnsubscribeFromTopic(std::string topic, unsigned short qos) |
Reimplemented Public Functions
virtual void | Activate() override |
virtual void | Create(const char *fullName) override |
virtual void | Destroy() override |
virtual int | GetDebugLevel() override |
virtual void | Suspend() override |
- 31 public functions inherited from IOServer
- 1 public function inherited from OSAPIThread
- 90 public functions inherited from CDPComponent
- 14 public functions inherited from OSAPITask
- 37 public functions inherited from CDPObject
- 46 public functions inherited from CDPBaseObject
- 26 public functions inherited from CDP::StudioAPI::CDPNode
- 22 public functions inherited from CDP::StudioAPI::ICDPNode
Protected Functions
void | ConnectBroker() |
std::string | GenerateClientID(const std::string &baseString) |
unsigned int | GetMaxSubscriptionId() const |
bool | IsConnectionParamsChanged() |
void | ProcessMessageQueue() |
void | PublishFromMessage(unsigned int clientHandle, const std::string_view messagePayload) |
void | PublishLWTOnConnect() |
void | PublishLWTOnDisconnect() |
void | QueueRPCMessageToWorkerThread(const MessagePacketHandle &procedure) |
void | SendConnectionStatus(unsigned int clientHandle) |
void | SetConnected(bool newStatus) |
void | SubscribeFromMessage(unsigned int clientHandle, const std::string_view messagePayload) |
void | WaitForReconnectTimeoutOrStop() |
void | on_connect(int rc, int flags, const mosquitto_property *properties) override |
void | on_disconnect(int rc, const mosquitto_property *properties) override |
void | on_log(int level, const char *log) override |
Reimplemented Protected Functions
virtual void | Configure(const char *xml) override |
virtual void | FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const override |
virtual bool | HandleXMLElement(XMLElementEx *XMLel) override |
virtual bool | IsCommProblem() override |
virtual void | Main() override |
virtual void | ProcessOffline() override |
virtual void | ProcessOnline() override |
virtual void | SetPropertyHandler(CDPPropertyBase *pProp) override |
- 1 protected function inherited from IOServer
- 1 protected function inherited from OSAPIThread
- 12 protected functions inherited from CDPComponent
- 13 protected functions inherited from CDPObject
- 1 protected function inherited from CDP::StudioAPI::CDPNode
Additional Inherited Members
- 2 static public members inherited from CDPComponent
- 6 static public members inherited from CDPObject
- 1 static public member inherited from CDPBaseObject
- 8 protected variables inherited from IOServer
- 42 protected variables inherited from CDPComponent
- 1 protected type inherited from OSAPITask
- 9 protected variables inherited from CDPObject
- 11 protected variables inherited from CDPBaseObject
Member Function Documentation
MQTTClient::MQTTClient()
Default constructs an instance of MQTTClient.
MQTTClient::~MQTTClient()
Destroys the instance of MQTTClient.
[override virtual]
void MQTTClient::Activate()
[override virtual protected]
void MQTTClient::Configure(const char *xml)
[protected]
void MQTTClient::ConnectBroker()
[override virtual]
void MQTTClient::Create(const char *fullName)
[override virtual]
void MQTTClient::Destroy()
[override virtual protected]
void MQTTClient::FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const
[protected]
std::string MQTTClient::GenerateClientID(const std::string &baseString)
AliasInfo MQTTClient::GetAlias(const std::string &topic)
int MQTTClient::GetClientProtocolVersion() const
[override virtual]
int MQTTClient::GetDebugLevel()
double MQTTClient::GetFs() const
[protected]
unsigned int MQTTClient::GetMaxSubscriptionId() const
[override virtual protected]
bool MQTTClient::HandleXMLElement(XMLElementEx *XMLel)
void MQTTClient::IncreasePublishedCount()
void MQTTClient::IncreaseSubscribedCount()
[override virtual protected]
bool MQTTClient::IsCommProblem()
[protected]
bool MQTTClient::IsConnectionParamsChanged()
[override virtual protected]
void MQTTClient::Main()
void MQTTClient::NotifyWorkerThreadMessageQueueNeedsService()
[protected]
void MQTTClient::ProcessMessageQueue()
[override virtual protected]
void MQTTClient::ProcessOffline()
[override virtual protected]
void MQTTClient::ProcessOnline()
[protected]
void MQTTClient::PublishFromMessage(unsigned int clientHandle, const std::string_view messagePayload)
[protected]
void MQTTClient::PublishLWTOnConnect()
[protected]
void MQTTClient::PublishLWTOnDisconnect()
[protected]
void MQTTClient::QueueRPCMessageToWorkerThread(const MessagePacketHandle &procedure)
void MQTTClient::RemoveAlias(const std::string &topic)
[protected]
void MQTTClient::SendConnectionStatus(unsigned int clientHandle)
[protected]
void MQTTClient::SetConnected(bool newStatus)
void MQTTClient::SetLastMessageTimestamp()
[override virtual protected]
void MQTTClient::SetPropertyHandler(CDPPropertyBase *pProp)
[protected]
void MQTTClient::SubscribeFromMessage(unsigned int clientHandle, const std::string_view messagePayload)
SubscriptionResult MQTTClient::SubscribeToTopic(std::string topic, unsigned short qos, std::variant<unsigned int, TopicBase *> subscriber)
[override virtual]
void MQTTClient::Suspend()
void MQTTClient::UngracefullyCloseConnection()
void MQTTClient::UnsubscribeFromTopic(std::string topic, unsigned short qos)
[protected]
void MQTTClient::WaitForReconnectTimeoutOrStop()
[protected]
void MQTTClient::on_connect(int rc, int flags, const mosquitto_property *properties)
[protected]
void MQTTClient::on_disconnect(int rc, const mosquitto_property *properties)
[protected]
void MQTTClient::on_log(int level, const char *log)
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.