2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
10 //==========================================================================
14 * @brief This file is definition of CicoSCVInfo class
16 //==========================================================================
17 #ifndef __CICO_SC_VINFO_H__
18 #define __CICO_SC_VINFO_H__
20 #include <ico_dbus_amb_efl.h>
22 //--------------------------------------------------------------------------
24 * @brief Enumerations of vehicle information property
26 //--------------------------------------------------------------------------
27 typedef enum _ico_vinfo_prop {
28 ICO_VINFO_VEHICLE_SPEED = 1, ///< vehicle speed
29 ICO_VINFO_SHIFT_POSITION, ///< shift position
30 ICO_VINFO_LIGHT_LEFT, ///< light left(Turn left)
31 ICO_VINFO_LIGHT_RIGHT, ///< light right(Turn right)
32 ICO_VINFO_NIGHT_MODE, ///< night mode
33 ICO_VINFO_DRIVING_MODE, ///< driving mode
35 ICO_VINFO_MAX ///< maximum number of type
38 //--------------------------------------------------------------------------
40 * @brief This class holds vehicle information
42 //--------------------------------------------------------------------------
46 // default constructor
47 CicoSCVInfo(int type, int prop, union dbus_value_variant value)
48 : m_type(type), m_prop(prop), m_value(value) {}
51 virtual ~CicoSCVInfo() {}
54 int getType(void) { return m_type; }
57 int getProperty(void) { return m_prop; }
60 bool getBooleanValue(void) { return (m_value.bval != 0) ? true : false; }
63 int8_t getint8Value(void) { return m_value.yval; }
66 uint8_t getUint8Value(void) { return m_value.yval; }
69 int16_t getInt16Value(void) { return m_value.i16val; }
72 uint16_t getUint16Value(void) { return m_value.ui16val; }
75 int32_t getInt32Value(void) { return m_value.i32val; }
78 uint32_t getUint32Value(void) { return m_value.ui32val; }
81 int64_t getInt64Value(void) { return m_value.i64val; }
84 uint64_t getUint64Value(void) { return m_value.ui64val; }
87 double getDoubleValue(void) { return m_value.dval; }
90 const char* getStringValue(void) { return (const char*)m_value.sval; }
93 // default constructor
96 // assignment operator
97 CicoSCVInfo& operator=(const CicoSCVInfo &object);
100 CicoSCVInfo(const CicoSCVInfo &object);
106 // property id of vehicle information
109 // vehicle information value
110 union dbus_value_variant m_value;
112 #endif // __CICO_SC_VINFO_H__
113 // vim:set expandtab ts=4 sw=4: