observe updates
Fork of mbedConnectorInterface by
Embed:
(wiki syntax)
Show/hide line numbers
ConnectorEndpoint.h
00001 /** 00002 * @file Endpoint.h 00003 * @brief mbed CoAP Endpoint base class 00004 * @author Doug Anson/Chris Paola 00005 * @version 1.0 00006 * @see 00007 * 00008 * Copyright (c) 2014 00009 * 00010 * Licensed under the Apache License, Version 2.0 (the "License"); 00011 * you may not use this file except in compliance with the License. 00012 * You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, software 00017 * distributed under the License is distributed on an "AS IS" BASIS, 00018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 * See the License for the specific language governing permissions and 00020 * limitations under the License. 00021 */ 00022 00023 #ifndef __CONNECTOR_ENDPOINT_H__ 00024 #define __CONNECTOR_ENDPOINT_H__ 00025 00026 // Support for Logging/Debug output 00027 #include "Logger.h" 00028 00029 // Options support 00030 #include "Options.h" 00031 00032 // Connector namespace 00033 namespace Connector { 00034 00035 /** Endpoint class 00036 */ 00037 class Endpoint 00038 { 00039 00040 public: 00041 /** 00042 Default Constructor 00043 */ 00044 Endpoint(const Logger *logger,const Options *ob); 00045 00046 /** 00047 Copy Constructor 00048 @param ob input endpoint instance to deep copy 00049 */ 00050 Endpoint(const Endpoint &ep); 00051 00052 /** 00053 Destructor 00054 */ 00055 virtual ~Endpoint(); 00056 00057 /** 00058 Register the endpoint with mbed Device Server 00059 */ 00060 void register_endpoint(); 00061 00062 /** 00063 Plumb the lower RF network stack 00064 @param canActAsRouterNode input boolean indicating whether this node can act as a router node or not. 00065 */ 00066 static void plumbNetwork(bool canActAsRouterNode = false); 00067 00068 /** 00069 Initialize the endpoint's configuration and begin the endpoint's main even loop 00070 */ 00071 static void start(); 00072 00073 private: 00074 Logger *m_logger; 00075 Options *m_options; 00076 00077 // access the logger 00078 Logger *logger(); 00079 }; 00080 00081 } // namespace Connector 00082 00083 #endif // __CONNECTOR_ENDPOINT_H__
Generated on Wed Jul 13 2022 02:11:49 by 1.7.2