using EVCB_OCPP.Packet.Messages.Basic; using EVCB_OCPP.WSServer.Dto; namespace EVCB_OCPP.WSServer.Service.WsService { public class WsClientData : WsSession { /// /// 根據unique id來儲存.取出OCPP Request /// public Queue queue = new Queue(); public EVCB_OCPP20.Packet.Messages.Basic.Queue queue20 = new EVCB_OCPP20.Packet.Messages.Basic.Queue(); public bool? IsPending { set; get; } public bool IsCheckIn { set; get; } = false; public string ChargeBoxId { set; get; } public Guid CustomerId { get; set; } public string MachineId { set; get; } public bool ISOCPP20 { set; get; } public bool ResetSecurityProfile { set; get; } public bool IsAC { set; get; } = true; #region Billing public Dictionary UserPrices { set; get; } = new Dictionary(); public Dictionary UserDisplayPrices { set; get; } = new Dictionary(); public List ChargingPrices { set; get; } /// /// 電樁顯示費率 /// public string DisplayPrice { set; get; } /// /// 充電費率 以小時計費 /// public decimal ChargingFeebyHour { set; get; } /// /// 停車費率 以小時計費 /// public decimal ParkingFee { set; get; } /// /// 電樁是否計費 /// public bool IsBilling { set; get; } /// /// 收費方式 1: 以度計費 2:以小時計費 /// public int BillingMethod { set; get; } /// /// 電樁適用幣別 /// public string Currency { get; internal set; } #endregion public string CustomerName { get; set; } public string StationId { set; get; } public event EventHandler m_ReceiveData; public WsClientData() { ChargeBoxId = SessionID; MachineId = SessionID; } /// /// Sends the raw binary data to client. /// /// The data. /// The offset. /// The length. public void SendRawData(byte[] data, int offset, int length) { Send(data, offset, length); } internal override void HandleReceivedData(string msg) { m_ReceiveData?.Invoke(this, msg); } } }