mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-22 15:06:26 +01:00
54 lines
1.4 KiB
C#
54 lines
1.4 KiB
C#
using System;
|
|
|
|
namespace ShareeBike.Services.BluetoothLock.Tdo
|
|
{
|
|
/// <summary> Genuine ILOCKIT state.</summary>
|
|
public enum LockitLockingState
|
|
{
|
|
Open = 0x00,
|
|
|
|
Closed = 0x01,
|
|
|
|
Unknown = 0x02,
|
|
|
|
CouldntCloseMoving = 0x03,
|
|
|
|
CouldntOpenBoltBlocked = 0x04,
|
|
|
|
CouldntCloseBoltBlocked = 0x05
|
|
}
|
|
|
|
/// <summary> Object holding info about bluetooth lock. </summary>
|
|
public class LockInfoTdo
|
|
{
|
|
private LockInfoTdo() { }
|
|
|
|
/// <summary> Identification number of bluetooth lock, 6-digits, second part of advertisement name.</summary>
|
|
public int Id { get; private set; }
|
|
|
|
/// <summary> Guid for direct connect.</summary>
|
|
public Guid Guid { get; private set; }
|
|
|
|
/// <summary> Gets the current state of the lock.</summary>
|
|
public LockitLockingState? State { get; private set; }
|
|
|
|
public class Builder
|
|
{
|
|
private LockInfoTdo lockInfoTdo = new LockInfoTdo();
|
|
|
|
/// <summary> Identification number of bluetooth lock, 6-digits, second part of advertisement name.</summary>
|
|
public int Id { get => lockInfoTdo.Id; set => lockInfoTdo.Id = value; }
|
|
|
|
/// <summary> Guid for direct connect.</summary>
|
|
public Guid Guid { get => lockInfoTdo.Guid; set => lockInfoTdo.Guid = value; }
|
|
|
|
/// <summary> Gets the current state of the lock.</summary>
|
|
public LockitLockingState? State { get => lockInfoTdo.State; set => lockInfoTdo.State = value; }
|
|
|
|
public LockInfoTdo Build()
|
|
{
|
|
return lockInfoTdo;
|
|
}
|
|
}
|
|
}
|
|
}
|