![](/media/cache/profiles/debfdc81854eac26ec993b55a659c6e1.jpg.50x50_q85.jpg)
mbed client lightswitch demo
Dependencies: mbed Socket lwip-eth lwip-sys lwip
Fork of mbed-client-classic-example-lwip by
mbed-client/source/include/eventdata.h@11:cada08fc8a70, 2016-06-09 (annotated)
- Committer:
- mbedAustin
- Date:
- Thu Jun 09 17:08:36 2016 +0000
- Revision:
- 11:cada08fc8a70
Commit for public Consumption
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedAustin | 11:cada08fc8a70 | 1 | /* |
mbedAustin | 11:cada08fc8a70 | 2 | * Copyright (c) 2015 ARM Limited. All rights reserved. |
mbedAustin | 11:cada08fc8a70 | 3 | * SPDX-License-Identifier: Apache-2.0 |
mbedAustin | 11:cada08fc8a70 | 4 | * Licensed under the Apache License, Version 2.0 (the License); you may |
mbedAustin | 11:cada08fc8a70 | 5 | * not use this file except in compliance with the License. |
mbedAustin | 11:cada08fc8a70 | 6 | * You may obtain a copy of the License at |
mbedAustin | 11:cada08fc8a70 | 7 | * |
mbedAustin | 11:cada08fc8a70 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbedAustin | 11:cada08fc8a70 | 9 | * |
mbedAustin | 11:cada08fc8a70 | 10 | * Unless required by applicable law or agreed to in writing, software |
mbedAustin | 11:cada08fc8a70 | 11 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
mbedAustin | 11:cada08fc8a70 | 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbedAustin | 11:cada08fc8a70 | 13 | * See the License for the specific language governing permissions and |
mbedAustin | 11:cada08fc8a70 | 14 | * limitations under the License. |
mbedAustin | 11:cada08fc8a70 | 15 | */ |
mbedAustin | 11:cada08fc8a70 | 16 | #ifndef EVENT_DATA_H |
mbedAustin | 11:cada08fc8a70 | 17 | #define EVENT_DATA_H |
mbedAustin | 11:cada08fc8a70 | 18 | |
mbedAustin | 11:cada08fc8a70 | 19 | #include "mbed-client/m2mvector.h" |
mbedAustin | 11:cada08fc8a70 | 20 | |
mbedAustin | 11:cada08fc8a70 | 21 | //FORWARD DECLARATION |
mbedAustin | 11:cada08fc8a70 | 22 | class M2MObject; |
mbedAustin | 11:cada08fc8a70 | 23 | |
mbedAustin | 11:cada08fc8a70 | 24 | |
mbedAustin | 11:cada08fc8a70 | 25 | typedef Vector<M2MObject *> M2MObjectList; |
mbedAustin | 11:cada08fc8a70 | 26 | |
mbedAustin | 11:cada08fc8a70 | 27 | class M2MSecurity; |
mbedAustin | 11:cada08fc8a70 | 28 | |
mbedAustin | 11:cada08fc8a70 | 29 | class EventData |
mbedAustin | 11:cada08fc8a70 | 30 | { |
mbedAustin | 11:cada08fc8a70 | 31 | public: |
mbedAustin | 11:cada08fc8a70 | 32 | virtual ~EventData() {} |
mbedAustin | 11:cada08fc8a70 | 33 | }; |
mbedAustin | 11:cada08fc8a70 | 34 | |
mbedAustin | 11:cada08fc8a70 | 35 | class M2MSecurityData : public EventData |
mbedAustin | 11:cada08fc8a70 | 36 | { |
mbedAustin | 11:cada08fc8a70 | 37 | public: |
mbedAustin | 11:cada08fc8a70 | 38 | M2MSecurityData() |
mbedAustin | 11:cada08fc8a70 | 39 | :_object(NULL){} |
mbedAustin | 11:cada08fc8a70 | 40 | virtual ~M2MSecurityData() {} |
mbedAustin | 11:cada08fc8a70 | 41 | M2MSecurity *_object; |
mbedAustin | 11:cada08fc8a70 | 42 | }; |
mbedAustin | 11:cada08fc8a70 | 43 | |
mbedAustin | 11:cada08fc8a70 | 44 | class ResolvedAddressData : public EventData |
mbedAustin | 11:cada08fc8a70 | 45 | { |
mbedAustin | 11:cada08fc8a70 | 46 | public: |
mbedAustin | 11:cada08fc8a70 | 47 | ResolvedAddressData() |
mbedAustin | 11:cada08fc8a70 | 48 | :_address(NULL), |
mbedAustin | 11:cada08fc8a70 | 49 | _port(0){} |
mbedAustin | 11:cada08fc8a70 | 50 | virtual ~ResolvedAddressData() {} |
mbedAustin | 11:cada08fc8a70 | 51 | const M2MConnectionObserver::SocketAddress *_address; |
mbedAustin | 11:cada08fc8a70 | 52 | uint16_t _port; |
mbedAustin | 11:cada08fc8a70 | 53 | }; |
mbedAustin | 11:cada08fc8a70 | 54 | |
mbedAustin | 11:cada08fc8a70 | 55 | class ReceivedData : public EventData |
mbedAustin | 11:cada08fc8a70 | 56 | { |
mbedAustin | 11:cada08fc8a70 | 57 | public: |
mbedAustin | 11:cada08fc8a70 | 58 | ReceivedData() |
mbedAustin | 11:cada08fc8a70 | 59 | :_data(NULL), |
mbedAustin | 11:cada08fc8a70 | 60 | _size(0), |
mbedAustin | 11:cada08fc8a70 | 61 | _port(0), |
mbedAustin | 11:cada08fc8a70 | 62 | _address(NULL){} |
mbedAustin | 11:cada08fc8a70 | 63 | virtual ~ReceivedData() {} |
mbedAustin | 11:cada08fc8a70 | 64 | uint8_t *_data; |
mbedAustin | 11:cada08fc8a70 | 65 | uint16_t _size; |
mbedAustin | 11:cada08fc8a70 | 66 | uint16_t _port; |
mbedAustin | 11:cada08fc8a70 | 67 | const M2MConnectionObserver::SocketAddress *_address; |
mbedAustin | 11:cada08fc8a70 | 68 | }; |
mbedAustin | 11:cada08fc8a70 | 69 | |
mbedAustin | 11:cada08fc8a70 | 70 | class M2MRegisterData : public EventData |
mbedAustin | 11:cada08fc8a70 | 71 | { |
mbedAustin | 11:cada08fc8a70 | 72 | public: |
mbedAustin | 11:cada08fc8a70 | 73 | M2MRegisterData() |
mbedAustin | 11:cada08fc8a70 | 74 | :_object(NULL){} |
mbedAustin | 11:cada08fc8a70 | 75 | virtual ~M2MRegisterData() {} |
mbedAustin | 11:cada08fc8a70 | 76 | M2MSecurity *_object; |
mbedAustin | 11:cada08fc8a70 | 77 | M2MObjectList _object_list; |
mbedAustin | 11:cada08fc8a70 | 78 | }; |
mbedAustin | 11:cada08fc8a70 | 79 | |
mbedAustin | 11:cada08fc8a70 | 80 | class M2MUpdateRegisterData : public EventData |
mbedAustin | 11:cada08fc8a70 | 81 | { |
mbedAustin | 11:cada08fc8a70 | 82 | public: |
mbedAustin | 11:cada08fc8a70 | 83 | M2MUpdateRegisterData() |
mbedAustin | 11:cada08fc8a70 | 84 | :_object(NULL), |
mbedAustin | 11:cada08fc8a70 | 85 | _lifetime(0){} |
mbedAustin | 11:cada08fc8a70 | 86 | virtual ~M2MUpdateRegisterData() {} |
mbedAustin | 11:cada08fc8a70 | 87 | M2MSecurity *_object; |
mbedAustin | 11:cada08fc8a70 | 88 | uint32_t _lifetime; |
mbedAustin | 11:cada08fc8a70 | 89 | }; |
mbedAustin | 11:cada08fc8a70 | 90 | |
mbedAustin | 11:cada08fc8a70 | 91 | |
mbedAustin | 11:cada08fc8a70 | 92 | #endif //EVENT_DATA_H |
mbedAustin | 11:cada08fc8a70 | 93 |