inital
This commit is contained in:
112
OCPP.Core.Server/Messages_OCPP20/AuthorizeRequest.cs
Normal file
112
OCPP.Core.Server/Messages_OCPP20/AuthorizeRequest.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>Used algorithms for the hashes provided.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum HashAlgorithmEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SHA256")]
|
||||
SHA256 = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SHA384")]
|
||||
SHA384 = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SHA512")]
|
||||
SHA512 = 2,
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class OCSPRequestDataType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("hashAlgorithm", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public HashAlgorithmEnumType HashAlgorithm { get; set; }
|
||||
|
||||
/// <summary>Hashed value of the Issuer DN (Distinguished Name).
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("issuerNameHash", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(128)]
|
||||
public string IssuerNameHash { get; set; }
|
||||
|
||||
/// <summary>Hashed value of the issuers public key
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("issuerKeyHash", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(128)]
|
||||
public string IssuerKeyHash { get; set; }
|
||||
|
||||
/// <summary>The serial number of the certificate.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("serialNumber", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(40)]
|
||||
public string SerialNumber { get; set; }
|
||||
|
||||
/// <summary>This contains the responder URL (Case insensitive).
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("responderURL", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(512)]
|
||||
public string ResponderURL { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class AuthorizeRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("idToken", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public IdTokenType IdToken { get; set; } = new IdTokenType();
|
||||
|
||||
/// <summary>The X.509 certificated presented by EV and encoded in PEM format.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("certificate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(5500)]
|
||||
public string Certificate { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("iso15118CertificateHashData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
[System.ComponentModel.DataAnnotations.MaxLength(4)]
|
||||
public System.Collections.Generic.ICollection<OCSPRequestDataType> Iso15118CertificateHashData { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
316
OCPP.Core.Server/Messages_OCPP20/AuthorizeResponse.cs
Normal file
316
OCPP.Core.Server/Messages_OCPP20/AuthorizeResponse.cs
Normal file
@@ -0,0 +1,316 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>ID_ Token. Status. Authorization_ Status
|
||||
/// urn:x-oca:ocpp:uid:1:569372
|
||||
/// Current status of the ID Token.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum AuthorizationStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Accepted")]
|
||||
Accepted = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Blocked")]
|
||||
Blocked = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ConcurrentTx")]
|
||||
ConcurrentTx = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Expired")]
|
||||
Expired = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Invalid")]
|
||||
Invalid = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"NoCredit")]
|
||||
NoCredit = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"NotAllowedTypeEVSE")]
|
||||
NotAllowedTypeEVSE = 6,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"NotAtThisLocation")]
|
||||
NotAtThisLocation = 7,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"NotAtThisTime")]
|
||||
NotAtThisTime = 8,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Unknown")]
|
||||
Unknown = 9,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Certificate status information.
|
||||
/// - if all certificates are valid: return 'Accepted'.
|
||||
/// - if one of the certificates was revoked, return 'CertificateRevoked'.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum AuthorizeCertificateStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Accepted")]
|
||||
Accepted = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SignatureError")]
|
||||
SignatureError = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"CertificateExpired")]
|
||||
CertificateExpired = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"CertificateRevoked")]
|
||||
CertificateRevoked = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"NoCertificateAvailable")]
|
||||
NoCertificateAvailable = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"CertChainError")]
|
||||
CertChainError = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ContractCancelled")]
|
||||
ContractCancelled = 6,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Enumeration of possible idToken types.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum IdTokenEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Central")]
|
||||
Central = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"eMAID")]
|
||||
EMAID = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ISO14443")]
|
||||
ISO14443 = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ISO15693")]
|
||||
ISO15693 = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"KeyCode")]
|
||||
KeyCode = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Local")]
|
||||
Local = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"MacAddress")]
|
||||
MacAddress = 6,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"NoAuthorization")]
|
||||
NoAuthorization = 7,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Message_ Content. Format. Message_ Format_ Code
|
||||
/// urn:x-enexis:ecdm:uid:1:570848
|
||||
/// Format of the message.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum MessageFormatEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ASCII")]
|
||||
ASCII = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"HTML")]
|
||||
HTML = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"URI")]
|
||||
URI = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"UTF8")]
|
||||
UTF8 = 3,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class AdditionalInfoType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>This field specifies the additional IdToken.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("additionalIdToken", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(36)]
|
||||
public string AdditionalIdToken { get; set; }
|
||||
|
||||
/// <summary>This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(50)]
|
||||
public string Type { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>ID_ Token
|
||||
/// urn:x-oca:ocpp:uid:2:233247
|
||||
/// Contains status information about an identifier.
|
||||
/// It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class IdTokenInfoType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public AuthorizationStatusEnumType Status { get; set; }
|
||||
|
||||
/// <summary>ID_ Token. Expiry. Date_ Time
|
||||
/// urn:x-oca:ocpp:uid:1:569373
|
||||
/// Date and Time after which the token must be considered invalid.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cacheExpiryDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public System.DateTimeOffset CacheExpiryDateTime { get; set; }
|
||||
|
||||
/// <summary>Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in &lt;&lt;transactioneventresponse,TransactionEventResponse&gt;&gt; overrules this one.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("chargingPriority", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int ChargingPriority { get; set; }
|
||||
|
||||
/// <summary>ID_ Token. Language1. Language_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569374
|
||||
/// Preferred user interface language of identifier user. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("language1", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(8)]
|
||||
public string Language1 { get; set; }
|
||||
|
||||
/// <summary>Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("evseId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
public System.Collections.Generic.ICollection<int> EvseId { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("groupIdToken", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public IdTokenType GroupIdToken { get; set; }
|
||||
|
||||
/// <summary>ID_ Token. Language2. Language_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569375
|
||||
/// Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("language2", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(8)]
|
||||
public string Language2 { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("personalMessage", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public MessageContentType PersonalMessage { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class IdTokenType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("additionalInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
public System.Collections.Generic.ICollection<AdditionalInfoType> AdditionalInfo { get; set; }
|
||||
|
||||
/// <summary>IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("idToken", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(36)]
|
||||
public string IdToken { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public IdTokenEnumType Type { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Message_ Content
|
||||
/// urn:x-enexis:ecdm:uid:2:234490
|
||||
/// Contains message details, for a message to be displayed on a Charging Station.
|
||||
///
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class MessageContentType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("format", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public MessageFormatEnumType Format { get; set; }
|
||||
|
||||
/// <summary>Message_ Content. Language. Language_ Code
|
||||
/// urn:x-enexis:ecdm:uid:1:570849
|
||||
/// Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(8)]
|
||||
public string Language { get; set; }
|
||||
|
||||
/// <summary>Message_ Content. Content. Message
|
||||
/// urn:x-enexis:ecdm:uid:1:570852
|
||||
/// Message contents.
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(512)]
|
||||
public string Content { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class AuthorizeResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("idTokenInfo", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public IdTokenInfoType IdTokenInfo { get; set; } = new IdTokenInfoType();
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("certificateStatus", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public AuthorizeCertificateStatusEnumType CertificateStatus { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
172
OCPP.Core.Server/Messages_OCPP20/BootNotificationRequest.cs
Normal file
172
OCPP.Core.Server/Messages_OCPP20/BootNotificationRequest.cs
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.</summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class CustomDataType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("vendorId", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(255)]
|
||||
public string VendorId { get; set; }
|
||||
|
||||
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
||||
|
||||
[Newtonsoft.Json.JsonExtensionData]
|
||||
public System.Collections.Generic.IDictionary<string, object> AdditionalProperties
|
||||
{
|
||||
get { return _additionalProperties; }
|
||||
set { _additionalProperties = value; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>This contains the reason for sending this message to the CSMS.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum BootReasonEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ApplicationReset")]
|
||||
ApplicationReset = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"FirmwareUpdate")]
|
||||
FirmwareUpdate = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"LocalReset")]
|
||||
LocalReset = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"PowerUp")]
|
||||
PowerUp = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"RemoteReset")]
|
||||
RemoteReset = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ScheduledReset")]
|
||||
ScheduledReset = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Triggered")]
|
||||
Triggered = 6,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Unknown")]
|
||||
Unknown = 7,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Watchdog")]
|
||||
Watchdog = 8,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Charge_ Point
|
||||
/// urn:x-oca:ocpp:uid:2:233122
|
||||
/// The physical system where an Electrical Vehicle (EV) can be charged.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ChargingStationType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Device. Serial_ Number. Serial_ Number
|
||||
/// urn:x-oca:ocpp:uid:1:569324
|
||||
/// Vendor-specific device identifier.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("serialNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(25)]
|
||||
public string SerialNumber { get; set; }
|
||||
|
||||
/// <summary>Device. Model. CI20_ Text
|
||||
/// urn:x-oca:ocpp:uid:1:569325
|
||||
/// Defines the model of the device.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(20)]
|
||||
public string Model { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("modem", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public ModemType Modem { get; set; }
|
||||
|
||||
/// <summary>Identifies the vendor (not necessarily in a unique manner).
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("vendorName", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(50)]
|
||||
public string VendorName { get; set; }
|
||||
|
||||
/// <summary>This contains the firmware version of the Charging Station.
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("firmwareVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(50)]
|
||||
public string FirmwareVersion { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Wireless_ Communication_ Module
|
||||
/// urn:x-oca:ocpp:uid:2:233306
|
||||
/// Defines parameters required for initiating and maintaining wireless communication with other devices.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ModemType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Wireless_ Communication_ Module. ICCID. CI20_ Text
|
||||
/// urn:x-oca:ocpp:uid:1:569327
|
||||
/// This contains the ICCID of the modem’s SIM card.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("iccid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(20)]
|
||||
public string Iccid { get; set; }
|
||||
|
||||
/// <summary>Wireless_ Communication_ Module. IMSI. CI20_ Text
|
||||
/// urn:x-oca:ocpp:uid:1:569328
|
||||
/// This contains the IMSI of the modem’s SIM card.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("imsi", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(20)]
|
||||
public string Imsi { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class BootNotificationRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingStation", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public ChargingStationType ChargingStation { get; set; } = new ChargingStationType();
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public BootReasonEnumType Reason { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
92
OCPP.Core.Server/Messages_OCPP20/BootNotificationResponse.cs
Normal file
92
OCPP.Core.Server/Messages_OCPP20/BootNotificationResponse.cs
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This contains whether the Charging Station has been registered
|
||||
/// within the CSMS.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum RegistrationStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Accepted")]
|
||||
Accepted = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Pending")]
|
||||
Pending = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Rejected")]
|
||||
Rejected = 2,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Element providing more information about the status.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class StatusInfoType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>A predefined code for the reason why the status is returned in this response. The string is case-insensitive.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reasonCode", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(20)]
|
||||
public string ReasonCode { get; set; }
|
||||
|
||||
/// <summary>Additional text to provide detailed information.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("additionalInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(512)]
|
||||
public string AdditionalInfo { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class BootNotificationResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>This contains the CSMS’s current time.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currentTime", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
public System.DateTimeOffset CurrentTime { get; set; }
|
||||
|
||||
/// <summary>When &lt;&lt;cmn_registrationstatusenumtype,Status&gt;&gt; is Accepted, this contains the heartbeat interval in seconds. If the CSMS returns something other than Accepted, the value of the interval field indicates the minimum wait time before sending a next BootNotification request.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("interval", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int Interval { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public RegistrationStatusEnumType Status { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("statusInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public StatusInfoType StatusInfo { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>Source of the charging limit.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum ChargingLimitSourceEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EMS")]
|
||||
EMS = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Other")]
|
||||
Other = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SO")]
|
||||
SO = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"CSO")]
|
||||
CSO = 3,
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ClearedChargingLimitRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingLimitSource", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ChargingLimitSourceEnumType ChargingLimitSource { get; set; }
|
||||
|
||||
/// <summary>EVSE Identifier.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("evseId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int EvseId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ClearedChargingLimitResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
}
|
||||
}
|
||||
54
OCPP.Core.Server/Messages_OCPP20/DataTransferRequest.cs
Normal file
54
OCPP.Core.Server/Messages_OCPP20/DataTransferRequest.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class DataTransferRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>May be used to indicate a specific message or implementation.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("messageId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(50)]
|
||||
public string MessageId { get; set; }
|
||||
|
||||
/// <summary>Data without specified length or format. This needs to be decided by both parties (Open to implementation).
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public object Data { get; set; }
|
||||
|
||||
/// <summary>This identifies the Vendor specific implementation
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("vendorId", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(255)]
|
||||
public string VendorId { get; set; }
|
||||
}
|
||||
}
|
||||
67
OCPP.Core.Server/Messages_OCPP20/DataTransferResponse.cs
Normal file
67
OCPP.Core.Server/Messages_OCPP20/DataTransferResponse.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This indicates the success or failure of the data transfer.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum DataTransferStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Accepted")]
|
||||
Accepted = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Rejected")]
|
||||
Rejected = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"UnknownMessageId")]
|
||||
UnknownMessageId = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"UnknownVendorId")]
|
||||
UnknownVendorId = 3
|
||||
}
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class DataTransferResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public DataTransferStatusEnumType Status { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("statusInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public StatusInfoType StatusInfo { get; set; }
|
||||
|
||||
/// <summary>Data without specified length or format, in response to request.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public object Data { get; set; }
|
||||
}
|
||||
}
|
||||
77
OCPP.Core.Server/Messages_OCPP20/ErrorCodes.cs
Normal file
77
OCPP.Core.Server/Messages_OCPP20/ErrorCodes.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
/// <summary>
|
||||
/// Defined OCPP error codes
|
||||
/// </summary>
|
||||
public class ErrorCodes
|
||||
{
|
||||
/// <summary>
|
||||
/// Requested Action is recognized but not supported by the receiver
|
||||
/// </summary>
|
||||
public static string NotSupported = "NotSupported";
|
||||
|
||||
/// <summary>
|
||||
/// InternalError An internal error occurred and the receiver was not able to process the requested Action successfully
|
||||
/// </summary>
|
||||
public static string InternalError = "InternalError";
|
||||
|
||||
/// <summary>
|
||||
/// Payload for Action is incomplete
|
||||
/// </summary>
|
||||
public static string ProtocolError = "ProtocolError";
|
||||
|
||||
/// <summary>
|
||||
/// During the processing of Action a security issue occurred preventing receiver from completing the Action successfully
|
||||
/// </summary>
|
||||
public static string SecurityError = "SecurityError";
|
||||
|
||||
/// <summary>
|
||||
/// Payload for Action is syntactically incorrect or not conform the PDU structure for Action
|
||||
/// </summary>
|
||||
public static string FormationViolation = "FormationViolation";
|
||||
|
||||
/// <summary>
|
||||
/// Payload is syntactically correct but at least one field contains an invalid value
|
||||
/// </summary>
|
||||
public static string PropertyConstraintViolation = "PropertyConstraintViolation";
|
||||
|
||||
/// <summary>
|
||||
/// Payload for Action is syntactically correct but at least one of the fields violates occurence constraints
|
||||
/// </summary>
|
||||
public static string OccurenceConstraintViolation = "OccurenceConstraintViolation";
|
||||
|
||||
/// <summary>
|
||||
/// Payload for Action is syntactically correct but at least one of the fields violates data type constraints(e.g. “somestring”: 12)
|
||||
/// </summary>
|
||||
public static string TypeConstraintViolation = "TypeConstraintViolation";
|
||||
|
||||
/// <summary>
|
||||
/// Any other error not covered by the previous ones
|
||||
/// </summary>
|
||||
public static string GenericError = "GenericError";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This contains the progress status of the firmware installation.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum FirmwareStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Downloaded")]
|
||||
Downloaded = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"DownloadFailed")]
|
||||
DownloadFailed = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Downloading")]
|
||||
Downloading = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"DownloadScheduled")]
|
||||
DownloadScheduled = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"DownloadPaused")]
|
||||
DownloadPaused = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Idle")]
|
||||
Idle = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"InstallationFailed")]
|
||||
InstallationFailed = 6,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Installing")]
|
||||
Installing = 7,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Installed")]
|
||||
Installed = 8,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"InstallRebooting")]
|
||||
InstallRebooting = 9,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"InstallScheduled")]
|
||||
InstallScheduled = 10,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"InstallVerificationFailed")]
|
||||
InstallVerificationFailed = 11,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"InvalidSignature")]
|
||||
InvalidSignature = 12,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SignatureVerified")]
|
||||
SignatureVerified = 13,
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class FirmwareStatusNotificationRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public FirmwareStatusEnumType Status { get; set; }
|
||||
|
||||
/// <summary>The request id that was provided in the
|
||||
/// UpdateFirmwareRequest that started this firmware update.
|
||||
/// This field is mandatory, unless the message was triggered by a TriggerMessageRequest AND there is no firmware update ongoing.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("requestId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int RequestId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class FirmwareStatusNotificationResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
}
|
||||
}
|
||||
30
OCPP.Core.Server/Messages_OCPP20/HeartbeatRequest.cs
Normal file
30
OCPP.Core.Server/Messages_OCPP20/HeartbeatRequest.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class HeartbeatRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
}
|
||||
}
|
||||
36
OCPP.Core.Server/Messages_OCPP20/HeartbeatResponse.cs
Normal file
36
OCPP.Core.Server/Messages_OCPP20/HeartbeatResponse.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class HeartbeatResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Contains the current time of the CSMS.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currentTime", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
public System.DateTimeOffset CurrentTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This contains the status of the log upload.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum UploadLogStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"BadMessage")]
|
||||
BadMessage = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Idle")]
|
||||
Idle = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"NotSupportedOperation")]
|
||||
NotSupportedOperation = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"PermissionDenied")]
|
||||
PermissionDenied = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Uploaded")]
|
||||
Uploaded = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"UploadFailure")]
|
||||
UploadFailure = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Uploading")]
|
||||
Uploading = 6,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"AcceptedCanceled")]
|
||||
AcceptedCanceled = 7,
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class LogStatusNotificationRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public UploadLogStatusEnumType Status { get; set; }
|
||||
|
||||
/// <summary>The request id that was provided in GetLogRequest that started this log upload. This field is mandatory,
|
||||
/// unless the message was triggered by a TriggerMessageRequest AND there is no log upload ongoing.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("requestId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int RequestId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class LogStatusNotificationResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
}
|
||||
}
|
||||
368
OCPP.Core.Server/Messages_OCPP20/MeterValuesRequest.cs
Normal file
368
OCPP.Core.Server/Messages_OCPP20/MeterValuesRequest.cs
Normal file
@@ -0,0 +1,368 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>Sampled_ Value. Location. Location_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569265
|
||||
/// Indicates where the measured value has been sampled. Default = "Outlet"
|
||||
///
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum LocationEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Body")]
|
||||
Body = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Cable")]
|
||||
Cable = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EV")]
|
||||
EV = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Inlet")]
|
||||
Inlet = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Outlet")]
|
||||
Outlet = 4,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Sampled_ Value. Measurand. Measurand_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569263
|
||||
/// Type of measurement. Default = "Energy.Active.Import.Register"
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum MeasurandEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"")]
|
||||
Missing,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Current.Export")]
|
||||
Current_Export,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Current.Import")]
|
||||
Current_Import,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Current.Offered")]
|
||||
Current_Offered,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Active.Export.Register")]
|
||||
Energy_Active_Export_Register,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Active.Import.Register")]
|
||||
Energy_Active_Import_Register,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Reactive.Export.Register")]
|
||||
Energy_Reactive_Export_Register,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Reactive.Import.Register")]
|
||||
Energy_Reactive_Import_Register,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Active.Export.Interval")]
|
||||
Energy_Active_Export_Interval,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Active.Import.Interval")]
|
||||
Energy_Active_Import_Interval,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Active.Net")]
|
||||
Energy_Active_Net,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Reactive.Export.Interval")]
|
||||
Energy_Reactive_Export_Interval,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Reactive.Import.Interval")]
|
||||
Energy_Reactive_Import_Interval,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Reactive.Net")]
|
||||
Energy_Reactive_Net,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Apparent.Net")]
|
||||
Energy_Apparent_Net,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Apparent.Import")]
|
||||
Energy_Apparent_Import,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Energy.Apparent.Export")]
|
||||
Energy_Apparent_Export,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Frequency")]
|
||||
Frequency,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Power.Active.Export")]
|
||||
Power_Active_Export,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Power.Active.Import")]
|
||||
Power_Active_Import,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Power.Factor")]
|
||||
Power_Factor,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Power.Offered")]
|
||||
Power_Offered,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Power.Reactive.Export")]
|
||||
Power_Reactive_Export,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Power.Reactive.Import")]
|
||||
Power_Reactive_Import,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SoC")]
|
||||
SoC,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Voltage")]
|
||||
Voltage
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Sampled_ Value. Phase. Phase_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569264
|
||||
/// Indicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum PhaseEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L1")]
|
||||
L1 = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L2")]
|
||||
L2 = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L3")]
|
||||
L3 = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"N")]
|
||||
N = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L1-N")]
|
||||
L1N = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L2-N")]
|
||||
L2N = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L3-N")]
|
||||
L3N = 6,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L1-L2")]
|
||||
L1L2 = 7,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L2-L3")]
|
||||
L2L3 = 8,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"L3-L1")]
|
||||
L3L1 = 9,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Sampled_ Value. Context. Reading_ Context_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569261
|
||||
/// Type of detail value: start, end or sample. Default = "Sample.Periodic"
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum ReadingContextEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Interruption.Begin")]
|
||||
Interruption_Begin = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Interruption.End")]
|
||||
Interruption_End = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Other")]
|
||||
Other = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Sample.Clock")]
|
||||
Sample_Clock = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Sample.Periodic")]
|
||||
Sample_Periodic = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Transaction.Begin")]
|
||||
Transaction_Begin = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Transaction.End")]
|
||||
Transaction_End = 6,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Trigger")]
|
||||
Trigger = 7,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Meter_ Value
|
||||
/// urn:x-oca:ocpp:uid:2:233265
|
||||
/// Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class MeterValueType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("sampledValue", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
public System.Collections.Generic.ICollection<SampledValueType> SampledValue { get; set; } = new System.Collections.ObjectModel.Collection<SampledValueType>();
|
||||
|
||||
/// <summary>Meter_ Value. Timestamp. Date_ Time
|
||||
/// urn:x-oca:ocpp:uid:1:569259
|
||||
/// Timestamp for measured value(s).
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
public System.DateTimeOffset Timestamp { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Sampled_ Value
|
||||
/// urn:x-oca:ocpp:uid:2:233266
|
||||
/// Single sampled value in MeterValues. Each value can be accompanied by optional fields.
|
||||
///
|
||||
/// To save on mobile data usage, default values of all of the optional fields are such that. The value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class SampledValueType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Sampled_ Value. Value. Measure
|
||||
/// urn:x-oca:ocpp:uid:1:569260
|
||||
/// Indicates the measured value.
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Always)]
|
||||
public double Value { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("context", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ReadingContextEnumType Context { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("measurand", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public MeasurandEnumType Measurand { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("phase", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public PhaseEnumType Phase { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("location", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public LocationEnumType Location { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("signedMeterValue", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public SignedMeterValueType SignedMeterValue { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("unitOfMeasure", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public UnitOfMeasureType UnitOfMeasure { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Represent a signed version of the meter value.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class SignedMeterValueType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("signedMeterData", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(2500)]
|
||||
public string SignedMeterData { get; set; }
|
||||
|
||||
/// <summary>Method used to create the digital signature.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("signingMethod", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(50)]
|
||||
public string SigningMethod { get; set; }
|
||||
|
||||
/// <summary>Method used to encode the meter values before applying the digital signature algorithm.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("encodingMethod", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(50)]
|
||||
public string EncodingMethod { get; set; }
|
||||
|
||||
/// <summary>Base64 encoded, sending depends on configuration variable _PublicKeyWithSignedMeterValue_.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("publicKey", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(2500)]
|
||||
public string PublicKey { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Represents a UnitOfMeasure with a multiplier
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class UnitOfMeasureType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type.
|
||||
/// This field SHALL use a value from the list Standardized Units of Measurements in Part 2 Appendices.
|
||||
/// If an applicable unit is available in that list, otherwise a "custom" unit might be used.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(20)]
|
||||
public string Unit { get; set; } = "Wh";
|
||||
|
||||
/// <summary>Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("multiplier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int Multiplier { get; set; } = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Request_ Body
|
||||
/// urn:x-enexis:ecdm:uid:2:234744
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class MeterValuesRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Request_ Body. EVSEID. Numeric_ Identifier
|
||||
/// urn:x-enexis:ecdm:uid:1:571101
|
||||
/// This contains a number (&gt;0) designating an EVSE of the Charging Station. ‘0’ (zero) is used to designate the main power meter.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("evseId", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int EvseId { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("meterValue", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
public System.Collections.Generic.ICollection<MeterValueType> MeterValue { get; set; } = new System.Collections.ObjectModel.Collection<MeterValueType>();
|
||||
}
|
||||
}
|
||||
35
OCPP.Core.Server/Messages_OCPP20/MeterValuesResponse.cs
Normal file
35
OCPP.Core.Server/Messages_OCPP20/MeterValuesResponse.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class MeterValuesResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
}
|
||||
}
|
||||
338
OCPP.Core.Server/Messages_OCPP20/NotifyChargingLimitRequest.cs
Normal file
338
OCPP.Core.Server/Messages_OCPP20/NotifyChargingLimitRequest.cs
Normal file
@@ -0,0 +1,338 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>Charging_ Schedule. Charging_ Rate_ Unit. Charging_ Rate_ Unit_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569238
|
||||
/// The unit of measure Limit is expressed in.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum ChargingRateUnitEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"W")]
|
||||
W = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"A")]
|
||||
A = 1,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Cost. Cost_ Kind. Cost_ Kind_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569243
|
||||
/// The kind of cost referred to in the message element amount
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum CostKindEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"CarbonDioxideEmission")]
|
||||
CarbonDioxideEmission = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"RelativePricePercentage")]
|
||||
RelativePricePercentage = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"RenewableGenerationPercentage")]
|
||||
RenewableGenerationPercentage = 2,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Charging_ Limit
|
||||
/// urn:x-enexis:ecdm:uid:2:234489
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ChargingLimitType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingLimitSource", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ChargingLimitSourceEnumType ChargingLimitSource { get; set; }
|
||||
|
||||
/// <summary>Charging_ Limit. Is_ Grid_ Critical. Indicator
|
||||
/// urn:x-enexis:ecdm:uid:1:570847
|
||||
/// Indicates whether the charging limit is critical for the grid.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("isGridCritical", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public bool IsGridCritical { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Charging_ Schedule_ Period
|
||||
/// urn:x-oca:ocpp:uid:2:233257
|
||||
/// Charging schedule period structure defines a time period in a charging schedule.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ChargingSchedulePeriodType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time
|
||||
/// urn:x-oca:ocpp:uid:1:569240
|
||||
/// Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("startPeriod", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int StartPeriod { get; set; }
|
||||
|
||||
/// <summary>Charging_ Schedule_ Period. Limit. Measure
|
||||
/// urn:x-oca:ocpp:uid:1:569241
|
||||
/// Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1).
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit", Required = Newtonsoft.Json.Required.Always)]
|
||||
public double Limit { get; set; }
|
||||
|
||||
/// <summary>Charging_ Schedule_ Period. Number_ Phases. Counter
|
||||
/// urn:x-oca:ocpp:uid:1:569242
|
||||
/// The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("numberPhases", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int NumberPhases { get; set; }
|
||||
|
||||
/// <summary>Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own.
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("phaseToUse", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int PhaseToUse { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Charging_ Schedule
|
||||
/// urn:x-oca:ocpp:uid:2:233256
|
||||
/// Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ChargingScheduleType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Identifies the ChargingSchedule.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>Charging_ Schedule. Start_ Schedule. Date_ Time
|
||||
/// urn:x-oca:ocpp:uid:1:569237
|
||||
/// Starting point of an absolute schedule. If absent the schedule will be relative to start of charging.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("startSchedule", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public System.DateTimeOffset StartSchedule { get; set; }
|
||||
|
||||
/// <summary>Charging_ Schedule. Duration. Elapsed_ Time
|
||||
/// urn:x-oca:ocpp:uid:1:569236
|
||||
/// Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int Duration { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingRateUnit", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ChargingRateUnitEnumType ChargingRateUnit { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingSchedulePeriod", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
[System.ComponentModel.DataAnnotations.MaxLength(1024)]
|
||||
public System.Collections.Generic.ICollection<ChargingSchedulePeriodType> ChargingSchedulePeriod { get; set; } = new System.Collections.ObjectModel.Collection<ChargingSchedulePeriodType>();
|
||||
|
||||
/// <summary>Charging_ Schedule. Min_ Charging_ Rate. Numeric
|
||||
/// urn:x-oca:ocpp:uid:1:569239
|
||||
/// Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1)
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("minChargingRate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public double MinChargingRate { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("salesTariff", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public SalesTariffType SalesTariff { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>Consumption_ Cost
|
||||
/// urn:x-oca:ocpp:uid:2:233259
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ConsumptionCostType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Consumption_ Cost. Start_ Value. Numeric
|
||||
/// urn:x-oca:ocpp:uid:1:569246
|
||||
/// The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("startValue", Required = Newtonsoft.Json.Required.Always)]
|
||||
public double StartValue { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("cost", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
[System.ComponentModel.DataAnnotations.MaxLength(3)]
|
||||
public System.Collections.Generic.ICollection<CostType> Cost { get; set; } = new System.Collections.ObjectModel.Collection<CostType>();
|
||||
}
|
||||
|
||||
/// <summary>Cost
|
||||
/// urn:x-oca:ocpp:uid:2:233258
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class CostType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("costKind", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public CostKindEnumType CostKind { get; set; }
|
||||
|
||||
/// <summary>Cost. Amount. Amount
|
||||
/// urn:x-oca:ocpp:uid:1:569244
|
||||
/// The estimated or actual cost per kWh
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>Cost. Amount_ Multiplier. Integer
|
||||
/// urn:x-oca:ocpp:uid:1:569245
|
||||
/// Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amountMultiplier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int AmountMultiplier { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>Relative_ Timer_ Interval
|
||||
/// urn:x-oca:ocpp:uid:2:233270
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class RelativeTimeIntervalType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Relative_ Timer_ Interval. Start. Elapsed_ Time
|
||||
/// urn:x-oca:ocpp:uid:1:569279
|
||||
/// Start of the interval, in seconds from NOW.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int Start { get; set; }
|
||||
|
||||
/// <summary>Relative_ Timer_ Interval. Duration. Elapsed_ Time
|
||||
/// urn:x-oca:ocpp:uid:1:569280
|
||||
/// Duration of the interval, in seconds.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int Duration { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>Sales_ Tariff_ Entry
|
||||
/// urn:x-oca:ocpp:uid:2:233271
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class SalesTariffEntryType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("relativeTimeInterval", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public RelativeTimeIntervalType RelativeTimeInterval { get; set; } = new RelativeTimeIntervalType();
|
||||
|
||||
/// <summary>Sales_ Tariff_ Entry. E_ Price_ Level. Unsigned_ Integer
|
||||
/// urn:x-oca:ocpp:uid:1:569281
|
||||
/// Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ePriceLevel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)]
|
||||
public int EPriceLevel { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("consumptionCost", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
[System.ComponentModel.DataAnnotations.MaxLength(3)]
|
||||
public System.Collections.Generic.ICollection<ConsumptionCostType> ConsumptionCost { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>Sales_ Tariff
|
||||
/// urn:x-oca:ocpp:uid:2:233272
|
||||
/// NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class SalesTariffType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Identified_ Object. MRID. Numeric_ Identifier
|
||||
/// urn:x-enexis:ecdm:uid:1:569198
|
||||
/// SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>Sales_ Tariff. Sales. Tariff_ Description
|
||||
/// urn:x-oca:ocpp:uid:1:569283
|
||||
/// A human readable title/short description of the sales tariff e.g. for HMI display purposes.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("salesTariffDescription", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(32)]
|
||||
public string SalesTariffDescription { get; set; }
|
||||
|
||||
/// <summary>Sales_ Tariff. Num_ E_ Price_ Levels. Counter
|
||||
/// urn:x-oca:ocpp:uid:1:569284
|
||||
/// Defines the overall number of distinct price levels used across all provided SalesTariff elements.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("numEPriceLevels", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int NumEPriceLevels { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("salesTariffEntry", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
[System.ComponentModel.DataAnnotations.MaxLength(1024)]
|
||||
public System.Collections.Generic.ICollection<SalesTariffEntryType> SalesTariffEntry { get; set; } = new System.Collections.ObjectModel.Collection<SalesTariffEntryType>();
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class NotifyChargingLimitRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingSchedule", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
public System.Collections.Generic.ICollection<ChargingScheduleType> ChargingSchedule { get; set; }
|
||||
|
||||
/// <summary>The charging schedule contained in this notification applies to an EVSE. evseId must be &gt; 0.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("evseId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int EvseId { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingLimit", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public ChargingLimitType ChargingLimit { get; set; } = new ChargingLimitType();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class NotifyChargingLimitResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class NotifyEVChargingScheduleRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Periods contained in the charging profile are relative to this point in time.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("timeBase", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
public System.DateTimeOffset TimeBase { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingSchedule", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public ChargingScheduleType ChargingSchedule { get; set; } = new ChargingScheduleType();
|
||||
|
||||
/// <summary>The charging schedule contained in this notification applies to an EVSE. EvseId must be &gt; 0.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("evseId", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int EvseId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>Returns whether the CSMS has been able to process the message successfully. It does not imply any approval of the charging schedule.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum GenericStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Accepted")]
|
||||
Accepted = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Rejected")]
|
||||
Rejected = 1,
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class NotifyEVChargingScheduleResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public GenericStatusEnumType Status { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("statusInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public StatusInfoType StatusInfo { get; set; }
|
||||
}
|
||||
}
|
||||
57
OCPP.Core.Server/Messages_OCPP20/ResetRequest.cs
Normal file
57
OCPP.Core.Server/Messages_OCPP20/ResetRequest.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This contains the type of reset that the Charging Station or EVSE should perform.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum ResetEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Immediate")]
|
||||
Immediate = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"OnIdle")]
|
||||
OnIdle = 1
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ResetRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ResetEnumType Type { get; set; }
|
||||
|
||||
/// <summary>This contains the ID of a specific EVSE that needs to be reset, instead of the entire Charging Station.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("evseId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int EvseId { get; set; }
|
||||
}
|
||||
}
|
||||
58
OCPP.Core.Server/Messages_OCPP20/ResetResponse.cs
Normal file
58
OCPP.Core.Server/Messages_OCPP20/ResetResponse.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This indicates whether the Charging Station is able to perform the reset.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum ResetStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Accepted")]
|
||||
Accepted = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Rejected")]
|
||||
Rejected = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Scheduled")]
|
||||
Scheduled = 2
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class ResetResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ResetStatusEnumType Status { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("statusInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public StatusInfoType StatusInfo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This contains the current status of the Connector.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum ConnectorStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Available")]
|
||||
Available = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Occupied")]
|
||||
Occupied = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Reserved")]
|
||||
Reserved = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Unavailable")]
|
||||
Unavailable = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Faulted")]
|
||||
Faulted = 4,
|
||||
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class StatusNotificationRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>The time for which the status is reported. If absent time of receipt of the message will be assumed.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
public System.DateTimeOffset Timestamp { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("connectorStatus", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ConnectorStatusEnumType ConnectorStatus { get; set; }
|
||||
|
||||
/// <summary>The id of the EVSE to which the connector belongs for which the the status is reported.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("evseId", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int EvseId { get; set; }
|
||||
|
||||
/// <summary>The id of the connector within the EVSE for which the status is reported.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("connectorId", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int ConnectorId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class StatusNotificationResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
}
|
||||
}
|
||||
327
OCPP.Core.Server/Messages_OCPP20/TransactionEventRequest.cs
Normal file
327
OCPP.Core.Server/Messages_OCPP20/TransactionEventRequest.cs
Normal file
@@ -0,0 +1,327 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>Transaction. State. Transaction_ State_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569419
|
||||
/// Current charging state, is required when state
|
||||
/// has changed.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum ChargingStateEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Charging")]
|
||||
Charging = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EVConnected")]
|
||||
EVConnected = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SuspendedEV")]
|
||||
SuspendedEV = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SuspendedEVSE")]
|
||||
SuspendedEVSE = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Idle")]
|
||||
Idle = 4,
|
||||
}
|
||||
|
||||
/// <summary>Transaction. Stopped_ Reason. EOT_ Reason_ Code
|
||||
/// urn:x-oca:ocpp:uid:1:569413
|
||||
/// This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local".
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum ReasonEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"")]
|
||||
Missing,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"DeAuthorized")]
|
||||
DeAuthorized,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EmergencyStop")]
|
||||
EmergencyStop,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EnergyLimitReached")]
|
||||
EnergyLimitReached,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EVDisconnected")]
|
||||
EVDisconnected,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"GroundFault")]
|
||||
GroundFault,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ImmediateReset")]
|
||||
ImmediateReset,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Local")]
|
||||
Local,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"LocalOutOfCredit")]
|
||||
LocalOutOfCredit,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"MasterPass")]
|
||||
MasterPass,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Other")]
|
||||
Other,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"OvercurrentFault")]
|
||||
OvercurrentFault,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"PowerLoss")]
|
||||
PowerLoss,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"PowerQuality")]
|
||||
PowerQuality,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Reboot")]
|
||||
Reboot,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Remote")]
|
||||
Remote,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SOCLimitReached")]
|
||||
SOCLimitReached,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"StoppedByEV")]
|
||||
StoppedByEV,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"TimeLimitReached")]
|
||||
TimeLimitReached,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Timeout")]
|
||||
Timeout
|
||||
}
|
||||
|
||||
/// <summary>This contains the type of this event.
|
||||
/// The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum TransactionEventEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Ended")]
|
||||
Ended = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Started")]
|
||||
Started = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Updated")]
|
||||
Updated = 2,
|
||||
}
|
||||
|
||||
/// <summary>Reason the Charging Station sends this message to the CSMS
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum TriggerReasonEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Authorized")]
|
||||
Authorized = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"CablePluggedIn")]
|
||||
CablePluggedIn = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ChargingRateChanged")]
|
||||
ChargingRateChanged = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ChargingStateChanged")]
|
||||
ChargingStateChanged = 3,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Deauthorized")]
|
||||
Deauthorized = 4,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EnergyLimitReached")]
|
||||
EnergyLimitReached = 5,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EVCommunicationLost")]
|
||||
EVCommunicationLost = 6,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EVConnectTimeout")]
|
||||
EVConnectTimeout = 7,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"MeterValueClock")]
|
||||
MeterValueClock = 8,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"MeterValuePeriodic")]
|
||||
MeterValuePeriodic = 9,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"TimeLimitReached")]
|
||||
TimeLimitReached = 10,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Trigger")]
|
||||
Trigger = 11,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"UnlockCommand")]
|
||||
UnlockCommand = 12,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"StopAuthorized")]
|
||||
StopAuthorized = 13,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EVDeparted")]
|
||||
EVDeparted = 14,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"EVDetected")]
|
||||
EVDetected = 15,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"RemoteStop")]
|
||||
RemoteStop = 16,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"RemoteStart")]
|
||||
RemoteStart = 17,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"AbnormalCondition")]
|
||||
AbnormalCondition = 18,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"SignedDataReceived")]
|
||||
SignedDataReceived = 19,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"ResetCommand")]
|
||||
ResetCommand = 20,
|
||||
}
|
||||
|
||||
/// <summary>EVSE
|
||||
/// urn:x-oca:ocpp:uid:2:233123
|
||||
/// Electric Vehicle Supply Equipment
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class EVSEType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>Identified_ Object. MRID. Numeric_ Identifier
|
||||
/// urn:x-enexis:ecdm:uid:1:569198
|
||||
/// EVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>An id to designate a specific connector (on an EVSE) by connector index number.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("connectorId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int ConnectorId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>Transaction
|
||||
/// urn:x-oca:ocpp:uid:2:233318
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class TransactionType
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>This contains the Id of the transaction.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("transactionId", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[System.ComponentModel.DataAnnotations.StringLength(36)]
|
||||
public string TransactionId { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("chargingState", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ChargingStateEnumType ChargingState { get; set; }
|
||||
|
||||
/// <summary>Transaction. Time_ Spent_ Charging. Elapsed_ Time
|
||||
/// urn:x-oca:ocpp:uid:1:569415
|
||||
/// Contains the total time that energy flowed from EVSE to EV during the transaction (in seconds). Note that timeSpentCharging is smaller or equal to the duration of the transaction.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("timeSpentCharging", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int TimeSpentCharging { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("stoppedReason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public ReasonEnumType StoppedReason { get; set; }
|
||||
|
||||
/// <summary>The ID given to remote start request (&lt;&lt;requeststarttransactionrequest, RequestStartTransactionRequest&gt;&gt;. This enables to CSMS to match the started transaction to the given start request.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remoteStartId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int RemoteStartId { get; set; }
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class TransactionEventRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("eventType", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public TransactionEventEnumType EventType { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("meterValue", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
[System.ComponentModel.DataAnnotations.MinLength(1)]
|
||||
public System.Collections.Generic.ICollection<MeterValueType> MeterValue { get; set; }
|
||||
|
||||
/// <summary>The date and time at which this transaction event occurred.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
public System.DateTimeOffset Timestamp { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("triggerReason", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public TriggerReasonEnumType TriggerReason { get; set; }
|
||||
|
||||
/// <summary>Incremental sequence number, helps with determining if all messages of a transaction have been received.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("seqNo", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int SeqNo { get; set; }
|
||||
|
||||
/// <summary>Indication that this transaction event happened when the Charging Station was offline. Default = false, meaning: the event occurred when the Charging Station was online.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("offline", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public bool Offline { get; set; } = false;
|
||||
|
||||
/// <summary>If the Charging Station is able to report the number of phases used, then it SHALL provide it. When omitted the CSMS may be able to determine the number of phases used via device management.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("numberOfPhasesUsed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int NumberOfPhasesUsed { get; set; }
|
||||
|
||||
/// <summary>The maximum current of the connected cable in Ampere (A).
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cableMaxCurrent", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int CableMaxCurrent { get; set; }
|
||||
|
||||
/// <summary>This contains the Id of the reservation that terminates as a result of this transaction.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reservationId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int ReservationId { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("transactionInfo", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public TransactionType TransactionInfo { get; set; } = new TransactionType();
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("evse", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public EVSEType Evse { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("idToken", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public IdTokenType IdToken { get; set; }
|
||||
}
|
||||
}
|
||||
52
OCPP.Core.Server/Messages_OCPP20/TransactionEventResponse.cs
Normal file
52
OCPP.Core.Server/Messages_OCPP20/TransactionEventResponse.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class TransactionEventResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>SHALL only be sent when charging has ended. Final total cost of this transaction, including taxes. In the currency configured with the Configuration Variable: &lt;&lt;configkey-currency,`Currency`&gt;&gt;. When omitted, the transaction was NOT free. To indicate a free transaction, the CSMS SHALL send 0.00.
|
||||
///
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("totalCost", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public double TotalCost { get; set; }
|
||||
|
||||
/// <summary>Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in &lt;&lt;transactioneventresponse,TransactionEventResponse&gt;&gt; is temporarily, so it may not be set in the &lt;&lt;cmn_idtokeninfotype,IdTokenInfoType&gt;&gt; afterwards. Also the chargingPriority in &lt;&lt;transactioneventresponse,TransactionEventResponse&gt;&gt; overrules the one in &lt;&lt;cmn_idtokeninfotype,IdTokenInfoType&gt;&gt;.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("chargingPriority", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public int ChargingPriority { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("idTokenInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public IdTokenInfoType IdTokenInfo { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("updatedPersonalMessage", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public MessageContentType UpdatedPersonalMessage { get; set; }
|
||||
}
|
||||
}
|
||||
45
OCPP.Core.Server/Messages_OCPP20/UnlockConnectorRequest.cs
Normal file
45
OCPP.Core.Server/Messages_OCPP20/UnlockConnectorRequest.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class UnlockConnectorRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
/// <summary>This contains the identifier of the EVSE for which a connector needs to be unlocked.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("evseId", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int EvseId { get; set; }
|
||||
|
||||
/// <summary>This contains the identifier of the connector that needs to be unlocked.
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("connectorId", Required = Newtonsoft.Json.Required.Always)]
|
||||
public int ConnectorId { get; set; }
|
||||
}
|
||||
}
|
||||
61
OCPP.Core.Server/Messages_OCPP20/UnlockConnectorResponse.cs
Normal file
61
OCPP.Core.Server/Messages_OCPP20/UnlockConnectorResponse.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* OCPP.Core - https://github.com/dallmann-consulting/OCPP.Core
|
||||
* Copyright (C) 2020-2021 dallmann consulting GmbH.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OCPP.Core.Server.Messages_OCPP20
|
||||
{
|
||||
#pragma warning disable // Disable all warnings
|
||||
|
||||
/// <summary>This indicates whether the Charging Station has unlocked the connector.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public enum UnlockStatusEnumType
|
||||
{
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"Unlocked")]
|
||||
Unlocked = 0,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"UnlockFailed")]
|
||||
UnlockFailed = 1,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"OngoingAuthorizedTransaction")]
|
||||
OngoingAuthorizedTransaction = 2,
|
||||
|
||||
[System.Runtime.Serialization.EnumMember(Value = @"UnknownConnector")]
|
||||
UnknownConnector = 3
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.3.1.0 (Newtonsoft.Json v9.0.0.0)")]
|
||||
public partial class UnlockConnectorResponse
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("customData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public CustomDataType CustomData { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public UnlockStatusEnumType Status { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonProperty("statusInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
public StatusInfoType StatusInfo { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user