custom for >5 resources

Fork of mbedConnectorInterface by Doug Anson

Revision:
2:853f9ecc12df
Parent:
0:b438482ebbfc
Child:
4:84159d67d32d
--- a/api/Options.h	Tue Jan 27 22:52:25 2015 +0000
+++ b/api/Options.h	Tue Jan 27 23:41:34 2015 +0000
@@ -3,7 +3,7 @@
  * @brief   mbed CoAP Options (immutable OptionsBuilder instance) class header
  * @author  Doug Anson/Chris Paola
  * @version 1.0
- * @see     
+ * @see
  *
  * Copyright (c) 2014
  *
@@ -19,112 +19,117 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
- #ifndef __OPTIONS_H__
- #define __OPTIONS_H__
- 
- // Static Resources
- #include "StaticResource.h"
- 
- // Dynamic Resources
- #include "DynamicResource.h"
-  
- // include the mbed connector resource list
- #include "mbedConnectorInterface.h"
- 
- // Vector support
- #include <vector>
- 
- // Resources list
- typedef vector<StaticResource *> StaticResourcesList;
- typedef vector<DynamicResource *> DynamicResourcesList;
-   
- namespace Connector {         
-     class Options {
-         public:
-            /**
-            Default constructor
-            */
-            Options();
-            
-            /**
-            Copy constructor
-            */
-            Options(const Options &opt);
-            
-            /**
-            Destructor
-            */
-            virtual ~Options();
-            
-            /**
-            Get the node lifetime
-            */
-            char *getLifetime();
-            
-            /**
-            Get the NSP domain
-            */
-            string getDomain();
-            
-            /**
-            Get the node name
-            */
-            string getEndpointNodename();
-            
-            /**
-            Get the node type
-            */
-            string getEndpointType();
-            
-            /**
-            Get the NSP port number
-            */
-            int getNSPPortNumber();
-            
-            /**
-            Get the node radio channel list
-            */
-            uint32_t setRadioChannelList();
-            
-            /**
-            Get the NSP read update period
-            */
-            int getReadUpdatePeriod();
-            
-            /**
-            Get the NSP address
-            */
-            uint8_t *getNSPAddress();
-            
-            /**
-            Get the node MAC address
-            */
-            uint8_t *setMACAddress();
-            
-            /**
-            Get the list of static resources
-            */
-            StaticResourcesList *getStaticResourceList();
-            
-            /**
-            Get the list of dynamic resources
-            */
-            DynamicResourcesList *getDynamicResourceList();
-            
-        protected:
-            char                *m_lifetime;
-            string               m_domain;
-            string               m_node_name;
-            string               m_endpoint_type;
-            uint32_t             m_channel_list;
-            int                  m_rd_update_period;
-            int                  m_nsp_port;
-            uint8_t              m_nsp_address[NSP_IP_ADDRESS_LENGTH];
-            uint8_t              m_mac_address[NODE_MAC_ADDRESS_LENGTH];
-            StaticResourcesList  m_static_resources;
-            DynamicResourcesList m_dynamic_resources;
-     };
- }
- 
- #endif // __OPTIONS_H__
\ No newline at end of file
+
+#ifndef __OPTIONS_H__
+#define __OPTIONS_H__
+
+// Static Resources
+#include "StaticResource.h"
+
+// Dynamic Resources
+#include "DynamicResource.h"
+
+// include the mbed connector resource list
+#include "mbedConnectorInterface.h"
+
+// Vector support
+#include <vector>
+
+// Resources list
+typedef vector<StaticResource *> StaticResourcesList;
+typedef vector<DynamicResource *> DynamicResourcesList;
+
+namespace Connector {
+
+/** Options class
+ */
+class Options
+{
+public:
+    /**
+    Default constructor
+    */
+    Options();
+
+    /**
+    Copy constructor
+    */
+    Options(const Options &opt);
+
+    /**
+    Destructor
+    */
+    virtual ~Options();
+
+    /**
+    Get the node lifetime
+    */
+    char *getLifetime();
+
+    /**
+    Get the NSP domain
+    */
+    string getDomain();
+
+    /**
+    Get the node name
+    */
+    string getEndpointNodename();
+
+    /**
+    Get the node type
+    */
+    string getEndpointType();
+
+    /**
+    Get the NSP port number
+    */
+    int getNSPPortNumber();
+
+    /**
+    Get the node radio channel list
+    */
+    uint32_t setRadioChannelList();
+
+    /**
+    Get the NSP read update period
+    */
+    int getReadUpdatePeriod();
+
+    /**
+    Get the NSP address
+    */
+    uint8_t *getNSPAddress();
+
+    /**
+    Get the node MAC address
+    */
+    uint8_t *setMACAddress();
+
+    /**
+    Get the list of static resources
+    */
+    StaticResourcesList *getStaticResourceList();
+
+    /**
+    Get the list of dynamic resources
+    */
+    DynamicResourcesList *getDynamicResourceList();
+
+protected:
+    char                *m_lifetime;
+    string               m_domain;
+    string               m_node_name;
+    string               m_endpoint_type;
+    uint32_t             m_channel_list;
+    int                  m_rd_update_period;
+    int                  m_nsp_port;
+    uint8_t              m_nsp_address[NSP_IP_ADDRESS_LENGTH];
+    uint8_t              m_mac_address[NODE_MAC_ADDRESS_LENGTH];
+    StaticResourcesList  m_static_resources;
+    DynamicResourcesList m_dynamic_resources;
+};
+
+} // namespace Connector
+
+#endif // __OPTIONS_H__