TxtSmartFactoryLib  0.8.0
Smart Factory Library
ft::TxtMqttFactoryClient Class Reference

#include <TxtMqttFactoryClient.h>

Collaboration diagram for ft::TxtMqttFactoryClient:

Public Member Functions

 TxtMqttFactoryClient (std::string clientname, std::string host, std::string port, std::string mqtt_user, mqtt::binary_ref mqtt_pass, bool bretained=false, int iqos=1)
 
virtual ~TxtMqttFactoryClient ()
 
bool is_connected ()
 
bool connect (long int timeout)
 
void disconnect (long int timeout)
 
void set_callback (mqtt::callback &cb)
 
bool start_consume (long int timeout)
 
void publishLDR (double timestamp_s, int16_t ldr, long timeout)
 
void publishPtuPos (float pan, float tilt, long timeout)
 
void publishCam (const std::string sdata, long timeout)
 
void publishBme680 (int64_t timestamp, float iaq, uint8_t iaq_accuracy, float temperature, float humidity, float pressure, float raw_temperature, float raw_humidity, float gas, long timeout)
 
void publishAlert (bool st, const std::string id, const std::string sdata, int code, long timeout)
 
void publishBroadcast (double timestamp_s, const std::string sw, const std::string ver, const std::string message, long timeout)
 
void publishStateSLD (TxtLEDSCode_t code, const std::string desc, long timeout, int active=-1, const std::string target="")
 
void publishStateVGR (TxtLEDSCode_t code, const std::string desc, long timeout, int active=-1, const std::string target="")
 
void publishStateDSI (TxtLEDSCode_t code, const std::string desc, long timeout, int active=-1, const std::string target="")
 
void publishStateDSO (TxtLEDSCode_t code, const std::string desc, long timeout, int active=-1, const std::string target="")
 
void publishStateMPO (TxtLEDSCode_t code, const std::string desc, long timeout, int active=-1, const std::string target="")
 
void publishStateHBW (TxtLEDSCode_t code, const std::string desc, long timeout, int active=-1, const std::string target="")
 
void publishStock (Stock_map_t map_wps, long timeout)
 
void publishStateOrder (TxtOrderState ord_state, long timeout)
 
void publishNfcDS (TxtWorkpiece wp, History_map_t map_hist, long timeout)
 
void publishStationBroadcast (const std::string station, double timestamp_s, const std::string sw, const std::string ver, const std::string message, long timeout)
 
void publishSSC_Joy (TxtJoysticksData jd, long timeout)
 
void publishMPO_Ack (TxtMpoAckCode_t code, long timeout)
 
void publishVGR_Do (TxtVgrDoCode_t code, TxtWorkpiece *wp, long timeout)
 
void publishHBW_Ack (TxtHbwAckCode_t code, TxtWorkpiece *wp, long timeout)
 
void publishSLD_Ack (TxtSldAckCode_t code, TxtWPType_t type, int value, long timeout)
 

Protected Member Functions

void publishStateStation (const std::string station, TxtLEDSCode_t code, const std::string desc, long timeout, int active=-1, const std::string target="")
 
void subTopic (const std::string &topicFilter, long int timeout)
 
void unsubTopic (const std::string &topicFilter, long int timeout)
 

Protected Attributes

std::string clientname
 
mqtt::string host
 
mqtt::string port
 
mqtt::string mqtt_user
 
mqtt::binary_ref mqtt_pass
 
bool bretained
 
int iqos
 
mqtt::async_client cli
 
mqtt::connect_options connOpts
 
pthread_mutex_t m_mutex
 
action_listener_subscribe aListSub
 
action_listener_publish aListPub
 

Constructor & Destructor Documentation

ft::TxtMqttFactoryClient::TxtMqttFactoryClient ( std::string  clientname,
std::string  host,
std::string  port,
std::string  mqtt_user,
mqtt::binary_ref  mqtt_pass,
bool  bretained = false,
int  iqos = 1 
)
virtual ft::TxtMqttFactoryClient::~TxtMqttFactoryClient ( )
virtual

Member Function Documentation

bool ft::TxtMqttFactoryClient::connect ( long int  timeout)
void ft::TxtMqttFactoryClient::disconnect ( long int  timeout)
bool ft::TxtMqttFactoryClient::is_connected ( )
inline
void ft::TxtMqttFactoryClient::publishAlert ( bool  st,
const std::string  id,
const std::string  sdata,
int  code,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishBme680 ( int64_t  timestamp,
float  iaq,
uint8_t  iaq_accuracy,
float  temperature,
float  humidity,
float  pressure,
float  raw_temperature,
float  raw_humidity,
float  gas,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishBroadcast ( double  timestamp_s,
const std::string  sw,
const std::string  ver,
const std::string  message,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishCam ( const std::string  sdata,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishHBW_Ack ( TxtHbwAckCode_t  code,
TxtWorkpiece wp,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishLDR ( double  timestamp_s,
int16_t  ldr,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishMPO_Ack ( TxtMpoAckCode_t  code,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishNfcDS ( TxtWorkpiece  wp,
History_map_t  map_hist,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishPtuPos ( float  pan,
float  tilt,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishSLD_Ack ( TxtSldAckCode_t  code,
TxtWPType_t  type,
int  value,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishSSC_Joy ( TxtJoysticksData  jd,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishStateDSI ( TxtLEDSCode_t  code,
const std::string  desc,
long  timeout,
int  active = -1,
const std::string  target = "" 
)
inline
void ft::TxtMqttFactoryClient::publishStateDSO ( TxtLEDSCode_t  code,
const std::string  desc,
long  timeout,
int  active = -1,
const std::string  target = "" 
)
inline
void ft::TxtMqttFactoryClient::publishStateHBW ( TxtLEDSCode_t  code,
const std::string  desc,
long  timeout,
int  active = -1,
const std::string  target = "" 
)
inline
void ft::TxtMqttFactoryClient::publishStateMPO ( TxtLEDSCode_t  code,
const std::string  desc,
long  timeout,
int  active = -1,
const std::string  target = "" 
)
inline
void ft::TxtMqttFactoryClient::publishStateOrder ( TxtOrderState  ord_state,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishStateSLD ( TxtLEDSCode_t  code,
const std::string  desc,
long  timeout,
int  active = -1,
const std::string  target = "" 
)
inline
void ft::TxtMqttFactoryClient::publishStateStation ( const std::string  station,
TxtLEDSCode_t  code,
const std::string  desc,
long  timeout,
int  active = -1,
const std::string  target = "" 
)
protected
void ft::TxtMqttFactoryClient::publishStateVGR ( TxtLEDSCode_t  code,
const std::string  desc,
long  timeout,
int  active = -1,
const std::string  target = "" 
)
inline
void ft::TxtMqttFactoryClient::publishStationBroadcast ( const std::string  station,
double  timestamp_s,
const std::string  sw,
const std::string  ver,
const std::string  message,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishStock ( Stock_map_t  map_wps,
long  timeout 
)
void ft::TxtMqttFactoryClient::publishVGR_Do ( TxtVgrDoCode_t  code,
TxtWorkpiece wp,
long  timeout 
)
void ft::TxtMqttFactoryClient::set_callback ( mqtt::callback &  cb)
inline
bool ft::TxtMqttFactoryClient::start_consume ( long int  timeout)
void ft::TxtMqttFactoryClient::subTopic ( const std::string &  topicFilter,
long int  timeout 
)
protected
void ft::TxtMqttFactoryClient::unsubTopic ( const std::string &  topicFilter,
long int  timeout 
)
protected

Member Data Documentation

action_listener_publish ft::TxtMqttFactoryClient::aListPub
protected
action_listener_subscribe ft::TxtMqttFactoryClient::aListSub
protected
bool ft::TxtMqttFactoryClient::bretained
protected
mqtt::async_client ft::TxtMqttFactoryClient::cli
protected
std::string ft::TxtMqttFactoryClient::clientname
protected
mqtt::connect_options ft::TxtMqttFactoryClient::connOpts
protected
mqtt::string ft::TxtMqttFactoryClient::host
protected
int ft::TxtMqttFactoryClient::iqos
protected
pthread_mutex_t ft::TxtMqttFactoryClient::m_mutex
protected
mqtt::binary_ref ft::TxtMqttFactoryClient::mqtt_pass
protected
mqtt::string ft::TxtMqttFactoryClient::mqtt_user
protected
mqtt::string ft::TxtMqttFactoryClient::port
protected

The documentation for this class was generated from the following file: