Example

Dependencies:   FXAS21002 FXOS8700Q

Committer:
maygup01
Date:
Tue Nov 19 09:49:38 2019 +0000
Revision:
0:11cc2b7889af
Example

Who changed what in which revision?

UserRevisionLine numberNew contents of line
maygup01 0:11cc2b7889af 1 /*
maygup01 0:11cc2b7889af 2 * Copyright (c) 2015 ARM Limited. All rights reserved.
maygup01 0:11cc2b7889af 3 * SPDX-License-Identifier: Apache-2.0
maygup01 0:11cc2b7889af 4 * Licensed under the Apache License, Version 2.0 (the License); you may
maygup01 0:11cc2b7889af 5 * not use this file except in compliance with the License.
maygup01 0:11cc2b7889af 6 * You may obtain a copy of the License at
maygup01 0:11cc2b7889af 7 *
maygup01 0:11cc2b7889af 8 * http://www.apache.org/licenses/LICENSE-2.0
maygup01 0:11cc2b7889af 9 *
maygup01 0:11cc2b7889af 10 * Unless required by applicable law or agreed to in writing, software
maygup01 0:11cc2b7889af 11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
maygup01 0:11cc2b7889af 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
maygup01 0:11cc2b7889af 13 * See the License for the specific language governing permissions and
maygup01 0:11cc2b7889af 14 * limitations under the License.
maygup01 0:11cc2b7889af 15 */
maygup01 0:11cc2b7889af 16 #ifndef EVENT_DATA_H
maygup01 0:11cc2b7889af 17 #define EVENT_DATA_H
maygup01 0:11cc2b7889af 18
maygup01 0:11cc2b7889af 19 #include "mbed-client/m2mvector.h"
maygup01 0:11cc2b7889af 20
maygup01 0:11cc2b7889af 21 //FORWARD DECLARATION
maygup01 0:11cc2b7889af 22 class M2MObject;
maygup01 0:11cc2b7889af 23
maygup01 0:11cc2b7889af 24
maygup01 0:11cc2b7889af 25 typedef Vector<M2MObject *> M2MObjectList;
maygup01 0:11cc2b7889af 26
maygup01 0:11cc2b7889af 27 class M2MSecurity;
maygup01 0:11cc2b7889af 28
maygup01 0:11cc2b7889af 29 class EventData
maygup01 0:11cc2b7889af 30 {
maygup01 0:11cc2b7889af 31 public:
maygup01 0:11cc2b7889af 32 virtual ~EventData() {}
maygup01 0:11cc2b7889af 33 };
maygup01 0:11cc2b7889af 34
maygup01 0:11cc2b7889af 35 class M2MSecurityData : public EventData
maygup01 0:11cc2b7889af 36 {
maygup01 0:11cc2b7889af 37 public:
maygup01 0:11cc2b7889af 38 M2MSecurityData()
maygup01 0:11cc2b7889af 39 :_object(NULL){}
maygup01 0:11cc2b7889af 40 virtual ~M2MSecurityData() {}
maygup01 0:11cc2b7889af 41 M2MSecurity *_object;
maygup01 0:11cc2b7889af 42 };
maygup01 0:11cc2b7889af 43
maygup01 0:11cc2b7889af 44 class ResolvedAddressData : public EventData
maygup01 0:11cc2b7889af 45 {
maygup01 0:11cc2b7889af 46 public:
maygup01 0:11cc2b7889af 47 ResolvedAddressData()
maygup01 0:11cc2b7889af 48 :_address(NULL),
maygup01 0:11cc2b7889af 49 _port(0){}
maygup01 0:11cc2b7889af 50 virtual ~ResolvedAddressData() {}
maygup01 0:11cc2b7889af 51 const M2MConnectionObserver::SocketAddress *_address;
maygup01 0:11cc2b7889af 52 uint16_t _port;
maygup01 0:11cc2b7889af 53 };
maygup01 0:11cc2b7889af 54
maygup01 0:11cc2b7889af 55 class ReceivedData : public EventData
maygup01 0:11cc2b7889af 56 {
maygup01 0:11cc2b7889af 57 public:
maygup01 0:11cc2b7889af 58 ReceivedData()
maygup01 0:11cc2b7889af 59 :_data(NULL),
maygup01 0:11cc2b7889af 60 _size(0),
maygup01 0:11cc2b7889af 61 _port(0),
maygup01 0:11cc2b7889af 62 _address(NULL){}
maygup01 0:11cc2b7889af 63 virtual ~ReceivedData() {}
maygup01 0:11cc2b7889af 64 uint8_t *_data;
maygup01 0:11cc2b7889af 65 uint16_t _size;
maygup01 0:11cc2b7889af 66 uint16_t _port;
maygup01 0:11cc2b7889af 67 const M2MConnectionObserver::SocketAddress *_address;
maygup01 0:11cc2b7889af 68 };
maygup01 0:11cc2b7889af 69
maygup01 0:11cc2b7889af 70 class M2MRegisterData : public EventData
maygup01 0:11cc2b7889af 71 {
maygup01 0:11cc2b7889af 72 public:
maygup01 0:11cc2b7889af 73 M2MRegisterData()
maygup01 0:11cc2b7889af 74 :_object(NULL){}
maygup01 0:11cc2b7889af 75 virtual ~M2MRegisterData() {}
maygup01 0:11cc2b7889af 76 M2MSecurity *_object;
maygup01 0:11cc2b7889af 77 M2MBaseList _base_list;
maygup01 0:11cc2b7889af 78 };
maygup01 0:11cc2b7889af 79
maygup01 0:11cc2b7889af 80 class M2MUpdateRegisterData : public EventData
maygup01 0:11cc2b7889af 81 {
maygup01 0:11cc2b7889af 82 public:
maygup01 0:11cc2b7889af 83 M2MUpdateRegisterData()
maygup01 0:11cc2b7889af 84 :_object(NULL),
maygup01 0:11cc2b7889af 85 _lifetime(0){}
maygup01 0:11cc2b7889af 86 virtual ~M2MUpdateRegisterData() {}
maygup01 0:11cc2b7889af 87 M2MSecurity *_object;
maygup01 0:11cc2b7889af 88 uint32_t _lifetime;
maygup01 0:11cc2b7889af 89 M2MBaseList _base_list;
maygup01 0:11cc2b7889af 90 };
maygup01 0:11cc2b7889af 91
maygup01 0:11cc2b7889af 92
maygup01 0:11cc2b7889af 93 #endif //EVENT_DATA_H
maygup01 0:11cc2b7889af 94