protected override async Task <Train> GetObjectInfoFromController(int address, string name) { var request = new LocomotiveInformationRequest { LocomotiveAddress = (short)address }; var response = await client.Value.GetLocomotiveInformation(request); var train = new Train(address, name, response.TrainSpeed, response.TrainFunctions); return(train); }
public Task <LocomotiveInformation> GetLocomotiveInformation(LocomotiveInformationRequest request) => SendRequestWithAddressSpecificResponse(request);