Version 3.0.337

This commit is contained in:
Anja Müller-Meißner 2022-08-30 15:42:25 +02:00
parent fd0e63cf10
commit 573fe77e12
2336 changed files with 33688 additions and 86082 deletions

View file

@ -1,4 +1,4 @@
using TINK.Model.Bike;
using TINK.Model.Bikes;
namespace TINK.Services.BluetoothLock
{

View file

@ -1,11 +1,11 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TINK.Model.Bike;
using TINK.Model.Bike.BluetoothLock;
using TINK.Services.BluetoothLock.Tdo;
using TINK.Model.Bikes;
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
using TINK.Model.State;
using System;
using TINK.Services.BluetoothLock.Tdo;
namespace TINK.Services.BluetoothLock
{
@ -35,17 +35,18 @@ namespace TINK.Services.BluetoothLock
public void UpdateSimulation(BikeCollection bikes)
{
var locksInfo = new List<LockInfoTdo> ();
var locksInfo = new List<LockInfoTdo>();
// Add and process locks info object
foreach (var bikeInfo in bikes.OfType<BikeInfo>())
foreach (var bikeInfo in bikes.OfType<Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo>())
{
var lockInfo = bikeInfo.LockInfo;
switch (bikeInfo.State.Value)
{
case InUseStateEnum.Disposable:
switch (lockInfo.State )
case InUseStateEnum.FeedbackPending: // State feedback pending does not exist for bluetooth locks but maches from bluetooth perspective state disposable.
switch (lockInfo.State)
{
case LockingState.Open:
case LockingState.UnknownDisconnected:

View file

@ -1,10 +1,10 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TINK.Model.Bike;
using TINK.Model.Bike.BluetoothLock;
using TINK.Model.Bikes;
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
using TINK.Services.BluetoothLock.Tdo;
using System;
namespace TINK.Services.BluetoothLock
{
@ -38,7 +38,7 @@ namespace TINK.Services.BluetoothLock
var locksInfo = new List<LockInfoTdo>();
// Add and process locks info object
foreach (var bikeInfo in bikes.OfType<BikeInfo>())
foreach (var bikeInfo in bikes.OfType<Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo>())
{
locksInfo.Add(new LockInfoTdo.Builder { Id = bikeInfo.LockInfo.Id, State = null }.Build());
}

View file

@ -9,25 +9,25 @@ namespace TINK.Services.BluetoothLock
public class LocksServicesContainerMutable : IEnumerable<string>
{
/// <summary> Manages the different types of LocksService objects.</summary>
private ServicesContainerMutable<ILocksService> LocksServices { get; }
private ServicesContainerMutableT<ILocksService> LocksServices { get; }
/// <summary> Holds the name of the default locks service to use. </summary>
public static string DefaultLocksservice => typeof(BLE.LockItByScanServicePolling).FullName;
/// <summary></summary>
/// <param name="activeLockService">Name of active lock service implementation to use.</param>
/// <param name="activeLockService">Name of active lock service implementation to use.</param>
/// <param name="locksServices">Null for production (set of lock service implentations and some fake implementation will created) hash set of services for testing purposes. </param>
public LocksServicesContainerMutable(
string activeLockService,
HashSet<ILocksService> locksServices)
{
LocksServices = new ServicesContainerMutable<ILocksService>(
LocksServices = new ServicesContainerMutableT<ILocksService>(
locksServices,
activeLockService);
}
/// <summary> Active locks service.</summary>
public ILocksService Active => LocksServices.Active;
public ILocksService Active => LocksServices.Active;
/// <summary> Sets a lock service as active locks service by name. </summary>
/// <param name="active">Name of the new locks service.</param>