public static XElement DiagnosticsStatusNotificationRequestXML(String ChargeBoxIdentity,
                                                                DiagnosticsStatus Status)
 {
     return(SOAP.Encapsulation(SOAPHeaders: new XElement[] { new XElement(OCPPNS.OCPPv1_5_CS + "chargeBoxIdentity", ChargeBoxIdentity) },
                               SOAPBody:   new XElement(OCPPNS.OCPPv1_5_CS + "diagnosticsStatusNotificationRequest",
                                                        new XElement(OCPPNS.OCPPv1_5_CS + "status", Status)
                                                        )));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Create a new DiagnosticsStatusNotification request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="Status">The status of the diagnostics upload.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public DiagnosticsStatusNotificationRequest(ChargeBox_Id ChargeBoxId,
                                                    DiagnosticsStatus Status,

                                                    Request_Id?RequestId      = null,
                                                    DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "DiagnosticsStatusNotification",
                   RequestId,
                   RequestTimestamp)

        {
            this.Status = Status;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Return a string representation of the given diagnostics status.
        /// </summary>
        /// <param name="DiagnosticsStatus">A diagnostics status.</param>
        public static String AsText(this DiagnosticsStatus DiagnosticsStatus)
        {
            switch (DiagnosticsStatus)
            {
            case DiagnosticsStatus.Idle:
                return("Idle");

            case DiagnosticsStatus.Uploaded:
                return("Uploaded");

            case DiagnosticsStatus.UploadFailed:
                return("UploadFailed");

            case DiagnosticsStatus.Uploading:
                return("Uploading");


            default:
                return("unknown");
            }
        }
Exemplo n.º 4
0
 /// <remarks/>
 public void DiagnosticsStatusNotificationAsync(DiagnosticsStatus status, object userState)
 {
     if ((this.DiagnosticsStatusNotificationOperationCompleted == null)) {
         this.DiagnosticsStatusNotificationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDiagnosticsStatusNotificationOperationCompleted);
     }
     this.InvokeAsync("DiagnosticsStatusNotification", new object[] {
                 status}, this.DiagnosticsStatusNotificationOperationCompleted, userState);
 }
Exemplo n.º 5
0
 /// <remarks/>
 public void DiagnosticsStatusNotificationAsync(DiagnosticsStatus status)
 {
     this.DiagnosticsStatusNotificationAsync(status, null);
 }
Exemplo n.º 6
0
 public void DiagnosticsStatusNotification(DiagnosticsStatus status)
 {
     this.Invoke("DiagnosticsStatusNotification", new object[] {
                 status});
 }
Exemplo n.º 7
0
 /// <remarks/>
 public System.IAsyncResult BeginDiagnosticsStatusNotification(DiagnosticsStatus status, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("DiagnosticsStatusNotification", new object[] {
                 status}, callback, asyncState);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Create an OCPP DiagnosticsStatusNotification XML/SOAP request.
 /// </summary>
 /// <param name="Status">The status of the diagnostics upload.</param>
 public DiagnosticsStatusNotificationRequest(DiagnosticsStatus Status)
 {
     this.Status = Status;
 }