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

@@ -63,6 +63,15 @@ MQTTSN_topicTypes Topic::getType(void)
return _type;
}
Topic* Topic::duplicate(void)
{
Topic* newTopic = new Topic();
newTopic->_type = _type;
newTopic->_topicId = _topicId;
newTopic->_topicName = new string(_topicName->c_str());
return newTopic;
}
bool Topic::isMatch(string* topicName)
{
string::size_type tlen = _topicName->size();
@@ -354,6 +363,16 @@ void Topics::eraseNormal(void)
}
}
Topic* Topics::getFirstTopic(void)
{
return _first;
}
Topic* Topics::getNextTopic(Topic* topic)
{
return topic->_next;
}
void Topics::print(void)
{
Topic* topic = _first;