diff --git a/integration/service/oasis/stationfinder/cloudfinder/basic_finder.go b/integration/service/oasis/stationfinder/cloudfinder/basic_finder.go index 28700fc0d06..10cf53212fb 100644 --- a/integration/service/oasis/stationfinder/cloudfinder/basic_finder.go +++ b/integration/service/oasis/stationfinder/cloudfinder/basic_finder.go @@ -37,6 +37,7 @@ func (bf *basicFinder) getNearbyChargeStations(req *nearbychargestation.Request) bf.searchRespLock.Unlock() } +// NearbyStationsIterator provides channel which contains near by station information func (bf *basicFinder) IterateNearbyStations() <-chan *stationfindertype.ChargeStationInfo { if bf.searchResp == nil || len(bf.searchResp.Results) == 0 { c := make(chan *stationfindertype.ChargeStationInfo) diff --git a/integration/service/oasis/stationfinder/cloudfinder/dest_station_finder.go b/integration/service/oasis/stationfinder/cloudfinder/dest_station_finder.go index 223d007a379..760f2d00d15 100644 --- a/integration/service/oasis/stationfinder/cloudfinder/dest_station_finder.go +++ b/integration/service/oasis/stationfinder/cloudfinder/dest_station_finder.go @@ -43,6 +43,7 @@ func (sf *destStationFinder) prepare() { return } +// NearbyStationsIterator provides channel which contains near by station information for dest func (sf *destStationFinder) IterateNearbyStations() <-chan *stationfindertype.ChargeStationInfo { return sf.bf.IterateNearbyStations() } diff --git a/integration/service/oasis/stationfinder/cloudfinder/low_energy_location_station_finder.go b/integration/service/oasis/stationfinder/cloudfinder/low_energy_location_station_finder.go index 0836b15737f..c1d5c91d65b 100644 --- a/integration/service/oasis/stationfinder/cloudfinder/low_energy_location_station_finder.go +++ b/integration/service/oasis/stationfinder/cloudfinder/low_energy_location_station_finder.go @@ -36,6 +36,7 @@ func (sf *lowEnergyLocationStationFinder) prepare() { return } +// NearbyStationsIterator provides channel which contains near by station information for low energy location func (sf *lowEnergyLocationStationFinder) IterateNearbyStations() <-chan *stationfindertype.ChargeStationInfo { return sf.bf.IterateNearbyStations() } diff --git a/integration/service/oasis/stationfinder/cloudfinder/orig_station_finder.go b/integration/service/oasis/stationfinder/cloudfinder/orig_station_finder.go index be2e9c5b039..a6c7cc22a3d 100644 --- a/integration/service/oasis/stationfinder/cloudfinder/orig_station_finder.go +++ b/integration/service/oasis/stationfinder/cloudfinder/orig_station_finder.go @@ -37,6 +37,7 @@ func (sf *origStationFinder) prepare() { return } +// NearbyStationsIterator provides channel which contains near by station information for orig func (sf *origStationFinder) IterateNearbyStations() <-chan *stationfindertype.ChargeStationInfo { return sf.bf.IterateNearbyStations() } diff --git a/integration/service/oasis/stationfinder/localfinder/dest_station_local_finder.go b/integration/service/oasis/stationfinder/localfinder/dest_station_local_finder.go index 0c081edd0e0..a09465fb466 100644 --- a/integration/service/oasis/stationfinder/localfinder/dest_station_local_finder.go +++ b/integration/service/oasis/stationfinder/localfinder/dest_station_local_finder.go @@ -32,10 +32,12 @@ func newDestStationFinder(localFinder spatialindexer.Finder, oasisReq *oasis.Req return obj } +// NearbyStationsIterator provides channel which contains near by station information for dest func (localFinder *destStationLocalFinder) IterateNearbyStations() <-chan *stationfindertype.ChargeStationInfo { return localFinder.basicFinder.IterateNearbyStations() } +// Stop stops functionality of finder func (localFinder *destStationLocalFinder) Stop() { localFinder.basicFinder.Stop() } diff --git a/integration/service/oasis/stationfinder/localfinder/low_energy_location_local_finder.go b/integration/service/oasis/stationfinder/localfinder/low_energy_location_local_finder.go index 843779b7d94..3f476aaa3ff 100644 --- a/integration/service/oasis/stationfinder/localfinder/low_energy_location_local_finder.go +++ b/integration/service/oasis/stationfinder/localfinder/low_energy_location_local_finder.go @@ -3,10 +3,12 @@ package localfinder import ( "github.com/Telenav/osrm-backend/integration/pkg/api/nav" "github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer" - "github.com/Telenav/osrm-backend/integration/service/oasis/stationfinder/cloudfinder" "github.com/Telenav/osrm-backend/integration/service/oasis/stationfinder/stationfindertype" ) +// lowEnergySearchRadius defines search radius for low energy location +const lowEnergySearchRadius = 80000 + type lowEnergyLocationLocalFinder struct { basicFinder *basicLocalFinder } @@ -19,16 +21,18 @@ func newLowEnergyLocationLocalFinder(localFinder spatialindexer.Finder, location obj.basicFinder.getNearbyChargeStations(spatialindexer.Location{ Lat: location.Lat, Lon: location.Lon}, - cloudfinder.LowEnergyLocationCandidateNumber) + lowEnergySearchRadius) return obj } +// // NearbyStationsIterator provides channel which contains near by station information for low energy point func (localFinder *lowEnergyLocationLocalFinder) IterateNearbyStations() <-chan *stationfindertype.ChargeStationInfo { return localFinder.basicFinder.IterateNearbyStations() } +// Stop stops functionality of finder func (localFinder *lowEnergyLocationLocalFinder) Stop() { localFinder.basicFinder.Stop() } diff --git a/integration/service/oasis/stationfinder/localfinder/orig_station_local_finder.go b/integration/service/oasis/stationfinder/localfinder/orig_station_local_finder.go index 1e1b8955bc3..3e8be9dfa4e 100644 --- a/integration/service/oasis/stationfinder/localfinder/orig_station_local_finder.go +++ b/integration/service/oasis/stationfinder/localfinder/orig_station_local_finder.go @@ -27,6 +27,7 @@ func newOrigStationFinder(localFinder spatialindexer.Finder, oasisReq *oasis.Req return obj } +// NearbyStationsIterator provides channel which contains near by station information for orig func (localFinder *origStationLocalFinder) IterateNearbyStations() <-chan *stationfindertype.ChargeStationInfo { return localFinder.basicFinder.IterateNearbyStations() }