added max-age and content-format
Fork of mbedConnectorInterface by
api/Options.cpp@0:b438482ebbfc, 2015-01-27 (annotated)
- Committer:
- ansond
- Date:
- Tue Jan 27 22:23:51 2015 +0000
- Revision:
- 0:b438482ebbfc
- Child:
- 2:853f9ecc12df
initial check in
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ansond | 0:b438482ebbfc | 1 | /** |
ansond | 0:b438482ebbfc | 2 | * @file Options.cpp |
ansond | 0:b438482ebbfc | 3 | * @brief mbed CoAP Options (immutable OptionsBuilder instance) class implementation |
ansond | 0:b438482ebbfc | 4 | * @author Doug Anson/Chris Paola |
ansond | 0:b438482ebbfc | 5 | * @version 1.0 |
ansond | 0:b438482ebbfc | 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 | */ |
ansond | 0:b438482ebbfc | 22 | |
ansond | 0:b438482ebbfc | 23 | #include "Options.h" |
ansond | 0:b438482ebbfc | 24 | |
ansond | 0:b438482ebbfc | 25 | namespace Connector { |
ansond | 0:b438482ebbfc | 26 | // default constructor |
ansond | 0:b438482ebbfc | 27 | Options::Options() { |
ansond | 0:b438482ebbfc | 28 | } |
ansond | 0:b438482ebbfc | 29 | |
ansond | 0:b438482ebbfc | 30 | // copy constructor |
ansond | 0:b438482ebbfc | 31 | Options::Options(const Options &opt) { |
ansond | 0:b438482ebbfc | 32 | } |
ansond | 0:b438482ebbfc | 33 | |
ansond | 0:b438482ebbfc | 34 | // destructors |
ansond | 0:b438482ebbfc | 35 | Options::~Options() { |
ansond | 0:b438482ebbfc | 36 | } |
ansond | 0:b438482ebbfc | 37 | |
ansond | 0:b438482ebbfc | 38 | // lifetime pointer |
ansond | 0:b438482ebbfc | 39 | char *Options::getLifetime() { return this->m_lifetime; } |
ansond | 0:b438482ebbfc | 40 | |
ansond | 0:b438482ebbfc | 41 | // NSP domain |
ansond | 0:b438482ebbfc | 42 | string Options::getDomain() { return this->m_domain; } |
ansond | 0:b438482ebbfc | 43 | |
ansond | 0:b438482ebbfc | 44 | // Endpoint name |
ansond | 0:b438482ebbfc | 45 | string Options::getEndpointNodename() { return this->m_node_name; } |
ansond | 0:b438482ebbfc | 46 | |
ansond | 0:b438482ebbfc | 47 | // Endpoint Type |
ansond | 0:b438482ebbfc | 48 | string Options::getEndpointType() { return this->m_endpoint_type; } |
ansond | 0:b438482ebbfc | 49 | |
ansond | 0:b438482ebbfc | 50 | // NSP Port number |
ansond | 0:b438482ebbfc | 51 | int Options::getNSPPortNumber() { return this->m_nsp_port; } |
ansond | 0:b438482ebbfc | 52 | |
ansond | 0:b438482ebbfc | 53 | // NODE Radio Channel List |
ansond | 0:b438482ebbfc | 54 | uint32_t Options::setRadioChannelList() { return this->m_channel_list; } |
ansond | 0:b438482ebbfc | 55 | |
ansond | 0:b438482ebbfc | 56 | // NSP Read update period |
ansond | 0:b438482ebbfc | 57 | int Options::getReadUpdatePeriod() { return this->m_rd_update_period; } |
ansond | 0:b438482ebbfc | 58 | |
ansond | 0:b438482ebbfc | 59 | // NSP Address |
ansond | 0:b438482ebbfc | 60 | uint8_t *Options::getNSPAddress() { return this->m_nsp_address; } |
ansond | 0:b438482ebbfc | 61 | |
ansond | 0:b438482ebbfc | 62 | // NODE MAC Address |
ansond | 0:b438482ebbfc | 63 | uint8_t *Options::setMACAddress() { return this->m_mac_address; } |
ansond | 0:b438482ebbfc | 64 | |
ansond | 0:b438482ebbfc | 65 | // Static Resources |
ansond | 0:b438482ebbfc | 66 | StaticResourcesList *Options::getStaticResourceList() { return &this->m_static_resources; } |
ansond | 0:b438482ebbfc | 67 | |
ansond | 0:b438482ebbfc | 68 | // Dynamic Resources |
ansond | 0:b438482ebbfc | 69 | DynamicResourcesList *Options::getDynamicResourceList() { return &this->m_dynamic_resources; } |
ansond | 0:b438482ebbfc | 70 | } |