2 * Copyright (C) 2012 TOYOTA MOTOR CORPORATION.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef EVENTMESSAGE_H_
20 #define EVENTMESSAGE_H_
21 #include "messageformat.h"
23 class StandardMessage;
26 * This class handled the event message.
28 class EventMessage : public StandardMessage {
39 * This function will attempt to decode the message.
41 * @param msg Message to be deceded.
42 * @param size The size of the message.
45 decode(char *msg, int size);
47 * This function decodes the data portion of the event message.
49 * @param keyeventtype The name of vehicle information of MW.
50 * @param time The recordtime of vehicle information of MW.
51 * @param opt The data portion of the event message.
54 decodeOpt(char *keyeventype, timeval time, void *opt);
56 * This function will attempt to encode the message.
58 * @param name The name of vehicle information of MW.
59 * @param time The recordtime of vehicle information of MW.
60 * @param opt The data portion of the event message.
61 * @return Binary data.
64 encode(char *name, timeval time, EventOpt opt);
66 * Get the data portion of the event message.
68 * @return The data portion of the event message.
76 #endif // #ifndef EVENTMESSAGE_H_