Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
MQTTSNGWAdapterManager.h
00001 /************************************************************************************** 00002 * Copyright (c) 2018, Tomoaki Yamaguchi 00003 * 00004 * All rights reserved. This program and the accompanying materials 00005 * are made available under the terms of the Eclipse Public License v1.0 00006 * and Eclipse Distribution License v1.0 which accompany this distribution. 00007 * 00008 * The Eclipse Public License is available at 00009 * http://www.eclipse.org/legal/epl-v10.html 00010 * and the Eclipse Distribution License is available at 00011 * http://www.eclipse.org/org/documents/edl-v10.php. 00012 * 00013 * Contributors: 00014 * Tomoaki Yamaguchi - initial API and implementation and/or initial documentation 00015 **************************************************************************************/ 00016 00017 #ifndef MQTTSNGATEWAY_SRC_MQTTSNGWADAPTERMANAGER_H_ 00018 #define MQTTSNGATEWAY_SRC_MQTTSNGWADAPTERMANAGER_H_ 00019 00020 #include "MQTTSNGWAggregater.h" 00021 #include "MQTTSNGWQoSm1Proxy.h" 00022 namespace MQTTSNGW 00023 { 00024 class Gateway; 00025 class Client; 00026 class QoSm1Proxy; 00027 class Aggregater; 00028 class ForwarderList; 00029 class Forwarder; 00030 class MQTTSNPacket; 00031 class MQTTSNGWPacket; 00032 class ClientRecvTask; 00033 class ClientSendTask; 00034 00035 /*===================================== 00036 Class AdapterManager 00037 =====================================*/ 00038 class AdapterManager 00039 { 00040 public: 00041 AdapterManager(Gateway* gw); 00042 ~AdapterManager(void); 00043 void initialize(void); 00044 ForwarderList* getForwarderList(void); 00045 QoSm1Proxy* getQoSm1Proxy(void); 00046 Aggregater* getAggregater(void); 00047 void checkConnection(void); 00048 00049 bool isAggregatedClient(Client* client); 00050 Client* getClient(Client& client); 00051 Client* convertClient(uint16_t msgId, uint16_t* clientMsgId); 00052 int unicastToClient(Client* client, MQTTSNPacket* packet, ClientSendTask* task); 00053 bool isAggregaterActive(void); 00054 AggregateTopicElement* createClientList(Topic* topic); 00055 int addAggregateTopic(Topic* topic, Client* client); 00056 void removeAggregateTopic(Topic* topic, Client* client); 00057 void removeAggregateTopicList(Topics* topics, Client* client); 00058 00059 private: 00060 Gateway* _gateway {nullptr}; 00061 ForwarderList* _forwarders {nullptr}; 00062 QoSm1Proxy* _qosm1Proxy {nullptr}; 00063 Aggregater* _aggregater {nullptr}; 00064 }; 00065 00066 00067 00068 00069 } 00070 #endif /* MQTTSNGATEWAY_SRC_MQTTSNGWADAPTERMANAGER_H_ */
Generated on Wed Jul 13 2022 10:46:02 by
1.7.2