using Newtonsoft.Json;
using EVCB_OCPP.Packet.Utilities;
using EVCB_OCPP.Packet.Messages.SubTypes;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using EVCB_OCPP.Packet.Features;
namespace EVCB_OCPP.Packet.Messages.Core
{
public class MeterValuesRequest : IRequest
{
public MeterValuesRequest()
{
Action = Actions.MeterValues.ToString();
}
[JsonIgnore]
public string Action { set; get; }
///
/// 充電槍號(開始為1)
///
[Required]
public int connectorId { set; get; }
///
/// 交易 Id
///
public int? transactionId { set; get; }
///
/// 電表資訊
///
[Required]
public List meterValue { set; get; }
public bool TransactionRelated()
{
return true;
}
public bool Validate()
{
return Validator.TryValidateObject(this, new ValidationContext(this), null, true);
}
}
}