added max-age and content-format
Fork of mbedConnectorInterface by
api/Options.h@2:853f9ecc12df, 2015-01-27 (annotated)
- Committer:
- sam_grove
- Date:
- Tue Jan 27 23:41:34 2015 +0000
- Revision:
- 2:853f9ecc12df
- Parent:
- 0:b438482ebbfc
- Child:
- 4:84159d67d32d
Use auto-format on code and add markup to render class documentation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ansond | 0:b438482ebbfc | 1 | /** |
ansond | 0:b438482ebbfc | 2 | * @file Options.h |
ansond | 0:b438482ebbfc | 3 | * @brief mbed CoAP Options (immutable OptionsBuilder instance) class header |
ansond | 0:b438482ebbfc | 4 | * @author Doug Anson/Chris Paola |
ansond | 0:b438482ebbfc | 5 | * @version 1.0 |
sam_grove | 2:853f9ecc12df | 6 | * @see |
ansond | 0:b438482ebbfc | 7 | * |
ansond | 0:b438482ebbfc | 8 | * Copyright (c) 2014 |
ansond | 0:b438482ebbfc | 9 | * |
ansond | 0:b438482ebbfc | 10 | * Licensed under the Apache License, Version 2.0 (the "License"); |
ansond | 0:b438482ebbfc | 11 | * you may not use this file except in compliance with the License. |
ansond | 0:b438482ebbfc | 12 | * You may obtain a copy of the License at |
ansond | 0:b438482ebbfc | 13 | * |
ansond | 0:b438482ebbfc | 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
ansond | 0:b438482ebbfc | 15 | * |
ansond | 0:b438482ebbfc | 16 | * Unless required by applicable law or agreed to in writing, software |
ansond | 0:b438482ebbfc | 17 | * distributed under the License is distributed on an "AS IS" BASIS, |
ansond | 0:b438482ebbfc | 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
ansond | 0:b438482ebbfc | 19 | * See the License for the specific language governing permissions and |
ansond | 0:b438482ebbfc | 20 | * limitations under the License. |
ansond | 0:b438482ebbfc | 21 | */ |
sam_grove | 2:853f9ecc12df | 22 | |
sam_grove | 2:853f9ecc12df | 23 | #ifndef __OPTIONS_H__ |
sam_grove | 2:853f9ecc12df | 24 | #define __OPTIONS_H__ |
sam_grove | 2:853f9ecc12df | 25 | |
sam_grove | 2:853f9ecc12df | 26 | // Static Resources |
sam_grove | 2:853f9ecc12df | 27 | #include "StaticResource.h" |
sam_grove | 2:853f9ecc12df | 28 | |
sam_grove | 2:853f9ecc12df | 29 | // Dynamic Resources |
sam_grove | 2:853f9ecc12df | 30 | #include "DynamicResource.h" |
sam_grove | 2:853f9ecc12df | 31 | |
sam_grove | 2:853f9ecc12df | 32 | // include the mbed connector resource list |
sam_grove | 2:853f9ecc12df | 33 | #include "mbedConnectorInterface.h" |
sam_grove | 2:853f9ecc12df | 34 | |
sam_grove | 2:853f9ecc12df | 35 | // Vector support |
sam_grove | 2:853f9ecc12df | 36 | #include <vector> |
sam_grove | 2:853f9ecc12df | 37 | |
sam_grove | 2:853f9ecc12df | 38 | // Resources list |
sam_grove | 2:853f9ecc12df | 39 | typedef vector<StaticResource *> StaticResourcesList; |
sam_grove | 2:853f9ecc12df | 40 | typedef vector<DynamicResource *> DynamicResourcesList; |
sam_grove | 2:853f9ecc12df | 41 | |
sam_grove | 2:853f9ecc12df | 42 | namespace Connector { |
sam_grove | 2:853f9ecc12df | 43 | |
sam_grove | 2:853f9ecc12df | 44 | /** Options class |
sam_grove | 2:853f9ecc12df | 45 | */ |
sam_grove | 2:853f9ecc12df | 46 | class Options |
sam_grove | 2:853f9ecc12df | 47 | { |
sam_grove | 2:853f9ecc12df | 48 | public: |
sam_grove | 2:853f9ecc12df | 49 | /** |
sam_grove | 2:853f9ecc12df | 50 | Default constructor |
sam_grove | 2:853f9ecc12df | 51 | */ |
sam_grove | 2:853f9ecc12df | 52 | Options(); |
sam_grove | 2:853f9ecc12df | 53 | |
sam_grove | 2:853f9ecc12df | 54 | /** |
sam_grove | 2:853f9ecc12df | 55 | Copy constructor |
sam_grove | 2:853f9ecc12df | 56 | */ |
sam_grove | 2:853f9ecc12df | 57 | Options(const Options &opt); |
sam_grove | 2:853f9ecc12df | 58 | |
sam_grove | 2:853f9ecc12df | 59 | /** |
sam_grove | 2:853f9ecc12df | 60 | Destructor |
sam_grove | 2:853f9ecc12df | 61 | */ |
sam_grove | 2:853f9ecc12df | 62 | virtual ~Options(); |
sam_grove | 2:853f9ecc12df | 63 | |
sam_grove | 2:853f9ecc12df | 64 | /** |
sam_grove | 2:853f9ecc12df | 65 | Get the node lifetime |
sam_grove | 2:853f9ecc12df | 66 | */ |
sam_grove | 2:853f9ecc12df | 67 | char *getLifetime(); |
sam_grove | 2:853f9ecc12df | 68 | |
sam_grove | 2:853f9ecc12df | 69 | /** |
sam_grove | 2:853f9ecc12df | 70 | Get the NSP domain |
sam_grove | 2:853f9ecc12df | 71 | */ |
sam_grove | 2:853f9ecc12df | 72 | string getDomain(); |
sam_grove | 2:853f9ecc12df | 73 | |
sam_grove | 2:853f9ecc12df | 74 | /** |
sam_grove | 2:853f9ecc12df | 75 | Get the node name |
sam_grove | 2:853f9ecc12df | 76 | */ |
sam_grove | 2:853f9ecc12df | 77 | string getEndpointNodename(); |
sam_grove | 2:853f9ecc12df | 78 | |
sam_grove | 2:853f9ecc12df | 79 | /** |
sam_grove | 2:853f9ecc12df | 80 | Get the node type |
sam_grove | 2:853f9ecc12df | 81 | */ |
sam_grove | 2:853f9ecc12df | 82 | string getEndpointType(); |
sam_grove | 2:853f9ecc12df | 83 | |
sam_grove | 2:853f9ecc12df | 84 | /** |
sam_grove | 2:853f9ecc12df | 85 | Get the NSP port number |
sam_grove | 2:853f9ecc12df | 86 | */ |
sam_grove | 2:853f9ecc12df | 87 | int getNSPPortNumber(); |
sam_grove | 2:853f9ecc12df | 88 | |
sam_grove | 2:853f9ecc12df | 89 | /** |
sam_grove | 2:853f9ecc12df | 90 | Get the node radio channel list |
sam_grove | 2:853f9ecc12df | 91 | */ |
sam_grove | 2:853f9ecc12df | 92 | uint32_t setRadioChannelList(); |
sam_grove | 2:853f9ecc12df | 93 | |
sam_grove | 2:853f9ecc12df | 94 | /** |
sam_grove | 2:853f9ecc12df | 95 | Get the NSP read update period |
sam_grove | 2:853f9ecc12df | 96 | */ |
sam_grove | 2:853f9ecc12df | 97 | int getReadUpdatePeriod(); |
sam_grove | 2:853f9ecc12df | 98 | |
sam_grove | 2:853f9ecc12df | 99 | /** |
sam_grove | 2:853f9ecc12df | 100 | Get the NSP address |
sam_grove | 2:853f9ecc12df | 101 | */ |
sam_grove | 2:853f9ecc12df | 102 | uint8_t *getNSPAddress(); |
sam_grove | 2:853f9ecc12df | 103 | |
sam_grove | 2:853f9ecc12df | 104 | /** |
sam_grove | 2:853f9ecc12df | 105 | Get the node MAC address |
sam_grove | 2:853f9ecc12df | 106 | */ |
sam_grove | 2:853f9ecc12df | 107 | uint8_t *setMACAddress(); |
sam_grove | 2:853f9ecc12df | 108 | |
sam_grove | 2:853f9ecc12df | 109 | /** |
sam_grove | 2:853f9ecc12df | 110 | Get the list of static resources |
sam_grove | 2:853f9ecc12df | 111 | */ |
sam_grove | 2:853f9ecc12df | 112 | StaticResourcesList *getStaticResourceList(); |
sam_grove | 2:853f9ecc12df | 113 | |
sam_grove | 2:853f9ecc12df | 114 | /** |
sam_grove | 2:853f9ecc12df | 115 | Get the list of dynamic resources |
sam_grove | 2:853f9ecc12df | 116 | */ |
sam_grove | 2:853f9ecc12df | 117 | DynamicResourcesList *getDynamicResourceList(); |
sam_grove | 2:853f9ecc12df | 118 | |
sam_grove | 2:853f9ecc12df | 119 | protected: |
sam_grove | 2:853f9ecc12df | 120 | char *m_lifetime; |
sam_grove | 2:853f9ecc12df | 121 | string m_domain; |
sam_grove | 2:853f9ecc12df | 122 | string m_node_name; |
sam_grove | 2:853f9ecc12df | 123 | string m_endpoint_type; |
sam_grove | 2:853f9ecc12df | 124 | uint32_t m_channel_list; |
sam_grove | 2:853f9ecc12df | 125 | int m_rd_update_period; |
sam_grove | 2:853f9ecc12df | 126 | int m_nsp_port; |
sam_grove | 2:853f9ecc12df | 127 | uint8_t m_nsp_address[NSP_IP_ADDRESS_LENGTH]; |
sam_grove | 2:853f9ecc12df | 128 | uint8_t m_mac_address[NODE_MAC_ADDRESS_LENGTH]; |
sam_grove | 2:853f9ecc12df | 129 | StaticResourcesList m_static_resources; |
sam_grove | 2:853f9ecc12df | 130 | DynamicResourcesList m_dynamic_resources; |
sam_grove | 2:853f9ecc12df | 131 | }; |
sam_grove | 2:853f9ecc12df | 132 | |
sam_grove | 2:853f9ecc12df | 133 | } // namespace Connector |
sam_grove | 2:853f9ecc12df | 134 | |
sam_grove | 2:853f9ecc12df | 135 | #endif // __OPTIONS_H__ |