automotive-message-broker  0.12
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
AsyncRangePropertyRequest

getRangePropertyAsync is used for getting a range of properties that are within the specified time or sequence parameters.

Parameters
requestthe request containing the property and other information required by the query
Returns
a pointer to the reply. vehicleSpeedFromLastWeek;

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);