Name: ico-vic-amb-plugin
Summary: Automotive Message Broker is a vehicle network abstraction system.
-Version: 0.9.4
-Release: 2.1
+Version: 0.9.5
+Release: 1.1
Group: System Environment/Daemons
License: LGPL v2.1
URL: ""
BuildRequires: automotive-message-broker-devel >= 0.10.0
BuildRequires: ico-uxf-utilities-devel >= 0.9.04
BuildRequires: ico-uxf-utilities >= 0.9.04
-BuildRequires: pkgconfig(ecore)
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(edbus)
-BuildRequires: pkgconfig(dbus-1)
-BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(edbus)
+BuildRequires: pkgconfig(dbus-1)
+BuildRequires: pkgconfig(appcore-efl)
%description
Collection of plugins for automotive-message-broker
%postun -p /sbin/ldconfig
%files
+%manifest %{name}.manifest
%defattr(-,root,root,-)
%{_libdir}/automotive-message-broker/*.so
%{_sysconfdir}/ambd/AMBformat.conf
{
if (vehicleinfo->name == VehicleProperty::VehicleSpeed) {
static uint16_t prevspd = -1;
- static const uint16_t unusablespd = -1;
+ static uint16_t spdmax = -1;
uint16_t spd = vehicleinfo->value->value<uint16_t>();
- if ((prevspd == unusablespd && spd > 0) || (prevspd == 0 && spd > 0)) {
- DebugOut(3) << "PERF CHG_VIC_INF VIC-Plugin notify Code of update "
- << vehicleinfo->name
- << ". VehicleSpeed is 1km/h or more.\n";
+ if ((prevspd == spdmax && spd > 0) || (prevspd == 0 && spd > 0)) {
+ DebugOut(3) << "PERF CHG_VIC_INF VIC-Plugin notify Code of update " << vehicleinfo->name << ". VehicleSpeed is 1km/h or more.\n";
}
- else if ((prevspd == unusablespd && spd == 0) ||
- (prevspd > 0 && spd == 0)) {
- DebugOut(3) << "PERF CHG_VIC_INF VIC-Plugin notify Code of update "
- << vehicleinfo->name << ". VehicleSpeed is 0km/h.\n";
+ else if ((prevspd == spdmax && spd == 0) || (prevspd > 0 && spd == 0)) {
+ DebugOut(3) << "PERF CHG_VIC_INF VIC-Plugin notify Code of update " << vehicleinfo->name << ". VehicleSpeed is 0km/h.\n";
}
prevspd = spd;
}
break;
case ICO_UWS_EVT_RECEIVE:
{
- DebugOut(10) << "ControlWebsocket Start callback_recevie"
- << " Receive message.\n";
+ DebugOut(10) << "ControlWebsocket Start callback_recevie Receive message.\n";
GenerateCommID<void*> *idserver = GenerateCommID<void*>::getInstance();
int commid = idserver->getID(const_cast<void*>(id), -1);
StandardMessage msg;
char *buf = reinterpret_cast<char*>(detail->_ico_uws_message.recv_data);
if (strcmp(&buf[0], "VELOCITY") == 0) {
static uint16_t prevspd = -1;
- static const uint16_t unusablespd = -1;
+ static uint16_t spdmax = -1;
uint16_t spd = 0;
- memcpy(&spd,
- buf + StandardMessage::KEYEVENTTYPESIZE +
- sizeof(struct timeval) + sizeof(int),
- sizeof(uint16_t));
- if ((prevspd == unusablespd && spd > 0) ||
- (prevspd == 0 && spd > 0)) {
- DebugOut(3) << "PERF CHG_VIC_INF Receive from VIC. Message is "
- << &buf[0] << ". VELOCITY is 1km/h or more.\n";
+ memcpy(&spd, buf + StandardMessage::KEYEVENTTYPESIZE + sizeof(struct timeval) + sizeof(int), sizeof(uint16_t));
+ if ((prevspd == spdmax && spd > 0) || (prevspd == 0 && spd > 0)) {
+ DebugOut(3) << "PERF CHG_VIC_INF Receive from VIC. Message is " << &buf[0] << ". VELOCITY is 1km/h or more.\n";
}
- else if ((prevspd == unusablespd && spd == 0) ||
- (prevspd > 0 && spd == 0)) {
- DebugOut(3) << "PERF CHG_VIC_INF Receive from VIC. Message is "
- << &buf[0] << ". VELOCITY is 0km/h.\n";
+ else if ((prevspd == spdmax && spd == 0) || (prevspd > 0 && spd == 0)) {
+ DebugOut(3) << "PERF CHG_VIC_INF Receive from VIC. Message is " << &buf[0] << ". VELOCITY is 0km/h.\n";
}
prevspd = spd;
}
- container->ctrlws->receive(commid, buf,
- detail->_ico_uws_message.recv_len);
- DebugOut(10) << "ControlWebsocket End "
- << "callback_recevie Receive message.\n";
+ container->ctrlws->receive(commid, buf, detail->_ico_uws_message.recv_len);
+ DebugOut(10) << "ControlWebsocket End callback_recevie Receive message.\n";
break;
}
case ICO_UWS_EVT_ADD_FD:
char *prop;
char *eventtype;
unsigned char datatype[5];
-} vehicleinfo_key[] = {
+}
+
+vehicleinfo_key[] = {
{ "VehicleSpeed", "VELOCITY", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
{ "Speed", "VELOCITY", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
{ "Velocity", "VELOCITY", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
{ "Winker", "TURN_SIGNAL", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
{ "TurnSignal", "TURN_SIGNAL", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
{ "Turn", "TURN_SIGNAL", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
- { "lightStatus", "LIGHTSTATUS", {TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, 0} },
+ { "lightStatus", "LIGHTSTATUS", {TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, TYPE_NULL} },
{ "light", "LIGHTSTATUS", {TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, 0} },
- { "WATER_TEMP", "WATER_TEMP", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
- { "EXTERIORBRIGHTNESS", "EXTERIORBRIGHTNESS", {TYPE_UINT16, TYPE_NULL, 0, 0, 0} },
- { "EXTERIOR", "EXTERIORBRIGHTNESS", {TYPE_UINT16, TYPE_NULL, 0, 0, 0} },
- { "STEERING", "STEERING", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
- { "steering", "STEERING", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
- { "\0", "\0", {TYPE_NULL, 0, 0, 0, 0} } };
+ { "Warter_Temp", "WATER_TEMP", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
+ { "WarterTemp", "WATER_TEMP", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
+ { "ExteriorBrightness", "EXTERIORBRIGHTNESS", {TYPE_UINT16, TYPE_NULL, 0, 0, 0} },
+ { "Exterior", "EXTERIORBRIGHTNESS", {TYPE_UINT16, TYPE_NULL, 0, 0, 0} },
+ { "Steering", "STEERING", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
+ { "TripMeter", "TRIPMETER", {TYPE_INT16, TYPE_INT16, TYPE_INT16, TYPE_NULL, 0} },
+ { "Fuel", "FUEL", {TYPE_INT16, TYPE_INT16, TYPE_INT16, TYPE_INT16, TYPE_NULL} },
+ { "\0", "\0", {TYPE_NULL, 0, 0, 0, 0} }
+};
struct KeyDataMsg_t
{
exit(0);
}
-