Dependencies:   MMA7660 LM75B

Committer:
MACRUM
Date:
Sat Jun 30 01:40:30 2018 +0000
Revision:
0:119624335925
Initial commit

Who changed what in which revision?

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