Abstract base data provider for MQTT data provider classes providing MQTT messaging functionality.  
 More...
#include <AbstractFunctionalMqttDataProvider.qc.dox.h>
 | 
| 
  | constructor (AbstractMqttDataProvider prev) | 
|   | Creates the object from another object of the same class. 
  | 
|   | 
| 
  | constructor (*hash< auto > options) | 
|   | Creates the object from constructor options. 
  | 
|   | 
|   | observersReady () | 
|   | Called when all observers have been added to the object.  
  | 
|   | 
|   | stopEvents () | 
|   | Called to stop generating events.  
  | 
|   | 
 | 
| 
const  | ProviderInfo = ... | 
|   | Provider info. 
  | 
|   | 
| 
const  | ConstructorOptions = ... | 
|   | Constructor options. 
  | 
|   | 
| 
const  | EVENT_MQTT_MESSAGE = "mqtt-message-event" | 
|   | MQTT message event constant. 
  | 
|   | 
| const  | MESSAGE_MQTT_MESSAGE = "message" | 
|   | MQTT message type.  
  | 
|   | 
 | 
| 
  | stop () | 
|   | Disconnects the client and stops generating events. 
  | 
|   | 
| 
  | start () | 
|   | Connects and starts receiving messages. 
  | 
|   | 
| 
  | connect () | 
|   | Connects to the server if necessary. 
  | 
|   | 
| 
  | messageReceived (Method method, *list< auto > args) | 
|   | Qore callback for IMqttMessageListener.messageArrived(java.lang.String topic, MqttMessage message) 
  | 
|   | 
| hash< string, hash< DataProviderMessageInfo > >  | getEventTypesImpl () | 
|   | Returns a hash of all supported event types.  
  | 
|   | 
| hash< string, hash< DataProviderMessageInfo > >  | getMessageTypesImpl () | 
|   | Returns the description of an outbound message, if any.  
  | 
|   | 
|   | sendMessageImpl (string message_id, auto msg, *hash< auto > send_message_options) | 
|   | Sends a message from message-capable data providers.  
  | 
|   | 
| 
  | constructor () | 
|   | Creates the object without any arguments for child classes. 
  | 
|   | 
| 
  | constructor (AbstractMqttDataProvider prev) | 
|   | Creates the object from another object of the same class for child classes. 
  | 
|   | 
 | 
| 
static hash< auto >  | getClient (hash< auto > copts) | 
|   | Returns a client for the given options. 
  | 
|   | 
| 
MqttClient  | client | 
|   | The MQTT client itself. 
  | 
|   | 
| 
MqttConnectOptions  | opts | 
|   | Connection options. 
  | 
|   | 
| 
string  | topic | 
|   | Subscription topic filter. 
  | 
|   | 
| 
int  | qos | 
|   | Subscription QoS. 
  | 
|   | 
| 
string  | message_format | 
|   | Message payload format. 
  | 
|   | 
| 
string  | encoding | 
|   | Encoding for message_format "string". 
  | 
|   | 
Abstract base data provider for MQTT data provider classes providing MQTT messaging functionality. 
 
◆ getEventTypesImpl()
  
  
      
        
          | hash< string, hash< DataProviderMessageInfo > > MqttDataProvider::AbstractFunctionalMqttDataProvider::getEventTypesImpl  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Returns a hash of all supported event types. 
- Returns
 - a hash of all supported event types
 
- Note
 - only called if the provider supports the observer pattern / event API 
 
 
 
◆ getMessageTypesImpl()
  
  
      
        
          | hash< string, hash< DataProviderMessageInfo > > MqttDataProvider::AbstractFunctionalMqttDataProvider::getMessageTypesImpl  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Returns the description of an outbound message, if any. 
- Returns
 - the message type for this provider
 
- Note
 - only called if the provider supports sending messages 
 
 
 
◆ observersReady()
      
        
          | MqttDataProvider::AbstractFunctionalMqttDataProvider::observersReady  | 
          ( | 
           | ) | 
           | 
        
      
 
Called when all observers have been added to the object. 
This method is meant to trigger event generation 
 
 
◆ sendMessageImpl()
  
  
      
        
          | MqttDataProvider::AbstractFunctionalMqttDataProvider::sendMessageImpl  | 
          ( | 
          string  | 
          message_id,  | 
         
        
           | 
           | 
          auto  | 
          msg,  | 
         
        
           | 
           | 
          *hash< auto >  | 
          send_message_options  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
Sends a message from message-capable data providers. 
- Parameters
 - 
  
    | msg | the message to send  | 
    | send_message_options | the options for sending the message  | 
  
   
 
 
◆ stopEvents()
      
        
          | MqttDataProvider::AbstractFunctionalMqttDataProvider::stopEvents  | 
          ( | 
           | ) | 
           | 
        
      
 
Called to stop generating events. 
Stops polling for new events 
 
 
◆ MESSAGE_MQTT_MESSAGE
      
        
          | const MqttDataProvider::AbstractFunctionalMqttDataProvider::MESSAGE_MQTT_MESSAGE = "message" | 
        
      
 
MQTT message type. 
Publishes an MQTT message to the given topic 
 
 
The documentation for this class was generated from the following file:
- doxygen/qlib/MqttDataProvider/AbstractFunctionalMqttDataProvider.qc.dox.h