FRDM K64F Metronome

Committer:
ram54288
Date:
Sun May 14 18:37:05 2017 +0000
Revision:
0:dbad57390bd1
Initial commit

Who changed what in which revision?

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