class AbstractSink;
class AbstractSource;
+class AsyncPropertyReply;
-typedef std::function<void (void)> CompletedSignal;
+
+typedef std::function<void (AsyncPropertyReply*)> CompletedSignal;
class AsyncPropertyRequest
{
if(reply->property == VehicleProperty::VehicleSpeed)
{
reply->value = velocity;
- reply->completed();
+ reply->completed(reply);
}
else if(reply->property == VehicleProperty::EngineSpeed)
{
reply->value = engineSpeed;
- reply->completed();
+ reply->completed(reply);
}
}
AsyncPropertyRequest velocityRequest;
velocityRequest.property = VehicleProperty::VehicleSpeed;
- velocityRequest.completed = [](void) { DebugOut()<<"Velocity Async request completed"<<endl; };
+ velocityRequest.completed = [](AsyncPropertyReply* reply) { DebugOut()<<"Velocity Async request completed: "<<boost::any_cast<uint16_t>(reply->value)<<endl; };
AsyncPropertyReply* reply = routingEngine->getPropertyAsync(velocityRequest);
}