automotive-message-broker
0.12
|
getRangePropertyAsync is used for getting a range of properties that are within the specified time or sequence parameters.
request | the request containing the property and other information required by the query |
vehicleSpeedFromLastWeek.timeBegin = amb::currentTime() - 10; vehicleSpeedFromLastWeek.timeEnd = amb::currentTime();
PropertyList requestList; requestList.push_back(VehicleProperty::VehicleSpeed); requestList.push_back(VehicleProperty::EngineSpeed);
vehicleSpeedFromLastWeek.properties = requestList; vehicleSpeedFromLastWeek.completed = [](AsyncRangePropertyReply* reply) { std::list<AbstractPropertyType*> values = reply->values; for(auto itr = values.begin(); itr != values.end(); itr++) { auto val = *itr; DebugOut(1)<<"Value from past: ("<<val->name<<"): "<<val->toString()<<" time: "<<val->timestamp<<endl; }
delete reply; };
routingEngine->getRangePropertyAsync(vehicleSpeedFromLastWeek);