upgrade and bugfix for a test

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2021-05-15 18:32:05 +09:00
parent 9c9de103df
commit f079211ea7
13 changed files with 448 additions and 334 deletions

View File

@@ -44,6 +44,7 @@ LPublishManager::LPublishManager()
_last = 0;
_elmCnt = 0;
_publishedFlg = SAVE_TASK_INDEX;
_autoConnectFlg = false;
}
LPublishManager::~LPublishManager()
@@ -115,7 +116,10 @@ void LPublishManager::sendPublish(PubElement* elm)
return;
}
theClient->getGwProxy()->connect();
if (_autoConnectFlg)
{
theClient->getGwProxy()->connect();
}
uint8_t msg[MQTTSN_MAX_MSG_LENGTH + 1];
uint8_t org = 0;
@@ -310,6 +314,11 @@ void LPublishManager::checkTimeout(void)
}
}
void LPublishManager::setAutoConnectMode(bool flg)
{
_autoConnectFlg = flg;
}
PubElement* LPublishManager::getElement(uint16_t msgId)
{
PubElement* elm = _first;