Update Aggregatting gateway can now receive PUBLISH from a broker

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2020-03-05 17:39:54 +09:00
parent 53be14f76e
commit 258d534009
22 changed files with 397 additions and 180 deletions

View File

@@ -38,28 +38,20 @@ QoSm1Proxy::~QoSm1Proxy(void)
}
void QoSm1Proxy::initialize(void)
void QoSm1Proxy::initialize(char* gwName)
{
char param[MQTTSNGW_PARAM_MAX];
if ( _gateway->hasSecureConnection() )
{
_isSecure = true;
}
if (_gateway->getParam("QoS-1", param) == 0 )
{
if (strcasecmp(param, "YES") == 0 )
{
/* Create QoS-1 Clients from clients.conf */
_gateway->getClientList()->setClientList(QOSM1PROXY_TYPE);
/* Create QoS-1 Clients from clients.conf */
_gateway->getClientList()->setClientList(QOSM1PROXY_TYPE);
/* Create a client for QoS-1 proxy */
string name = string(_gateway->getGWParams()->gatewayName) + "_QoS-1";
setup(name.c_str(), Atype_QoSm1Proxy);
_isActive = true;
}
}
/* Create a client for QoS-1 proxy */
string name = string(gwName) + string("_QoS-1");
setup(name.c_str(), Atype_QoSm1Proxy);
_isActive = true;
}