Example #1
0
        /// <summary>
        /// Create a new StatusNotification request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="ConnectorId">The connector identification at the charge point.</param>
        /// <param name="Status">The current status of the charge point.</param>
        /// <param name="ErrorCode">The error code reported by the charge point.</param>
        ///
        /// <param name="Info">Additional free format information related to the error.</param>
        /// <param name="StatusTimestamp">The time for which the status is reported.</param>
        /// <param name="VendorId">This identifies the vendor-specific implementation.</param>
        /// <param name="VendorErrorCode">A vendor-specific error code.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public StatusNotificationRequest(ChargeBox_Id ChargeBoxId,
                                         Connector_Id ConnectorId,
                                         ChargePointStatus Status,
                                         ChargePointErrorCodes ErrorCode,

                                         String Info = null,
                                         DateTime?StatusTimestamp = null,
                                         String VendorId          = null,
                                         String VendorErrorCode   = null,

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

            : base(ChargeBoxId,
                   "StatusNotification",
                   RequestId,
                   EventTrackingId,
                   RequestTimestamp)

        {
            this.ConnectorId = ConnectorId;
            this.Status      = Status;
            this.ErrorCode   = ErrorCode;

            this.Info            = Info?.Trim();             // max  50
            this.StatusTimestamp = StatusTimestamp;
            this.VendorId        = VendorId?.Trim();         // max 255
            this.VendorErrorCode = VendorErrorCode?.Trim();  // max  50
        }
Example #2
0
        public static String AsText(this ChargePointErrorCodes ChargePointErrorCode)
        {
            switch (ChargePointErrorCode)
            {
            case ChargePointErrorCodes.ConnectorLockFailure:
                return("ConnectorLockFailure");

            case ChargePointErrorCodes.EVCommunicationError:
                return("EVCommunicationError");

            case ChargePointErrorCodes.GroundFailure:
                return("GroundFailure");

            case ChargePointErrorCodes.HighTemperature:
                return("HighTemperature");

            case ChargePointErrorCodes.InternalError:
                return("InternalError");

            case ChargePointErrorCodes.LocalListConflict:
                return("LocalListConflict");

            case ChargePointErrorCodes.NoError:
                return("NoError");

            case ChargePointErrorCodes.OtherError:
                return("OtherError");

            case ChargePointErrorCodes.OverCurrentFailure:
                return("OverCurrentFailure");

            case ChargePointErrorCodes.OverVoltage:
                return("OverVoltage");

            case ChargePointErrorCodes.PowerMeterFailure:
                return("PowerMeterFailure");

            case ChargePointErrorCodes.PowerSwitchFailure:
                return("PowerSwitchFailure");

            case ChargePointErrorCodes.ReaderFailure:
                return("ReaderFailure");

            case ChargePointErrorCodes.ResetFailure:
                return("ResetFailure");

            case ChargePointErrorCodes.UnderVoltage:
                return("UnderVoltage");

            case ChargePointErrorCodes.WeakSignal:
                return("WeakSignal");


            default:
                return("unknown");
            }
        }
Example #3
0
        /// <summary>
        /// Create a status notification request.
        /// </summary>
        /// <param name="ConnectorId">The connector identification at the charge point.</param>
        /// <param name="Status">The current status of the charge point.</param>
        /// <param name="ErrorCode">The error code reported by the charge point.</param>
        /// <param name="Info">Additional free format information related to the error.</param>
        /// <param name="StatusTimestamp">The time for which the status is reported.</param>
        /// <param name="VendorId">This identifies the vendor-specific implementation.</param>
        /// <param name="VendorErrorCode">A vendor-specific error code.</param>
        public StatusNotificationRequest(Connector_Id ConnectorId,
                                         ChargePointStatus Status,
                                         ChargePointErrorCodes ErrorCode,
                                         String Info = null,
                                         DateTime?StatusTimestamp = null,
                                         String VendorId          = null,
                                         String VendorErrorCode   = null)
        {
            this.ConnectorId = ConnectorId;
            this.Status      = Status;
            this.ErrorCode   = ErrorCode;

            this.Info            = Info?.Trim();             // max  50
            this.StatusTimestamp = StatusTimestamp;
            this.VendorId        = VendorId?.Trim();         // max 255
            this.VendorErrorCode = VendorErrorCode?.Trim();  // max  50
        }
Example #4
0
        /// <summary>
        /// Create an OCPP StartTransaction XML/SOAP request.
        /// </summary>
        /// <param name="ConnectorId">The connector identification at the charge point.</param>
        /// <param name="Status">The current status of the charge point.</param>
        /// <param name="ErrorCode">The error code reported by the charge point.</param>
        /// <param name="Info">Additional free format information related to the error.</param>
        /// <param name="StatusTimestamp">The time for which the status is reported.</param>
        /// <param name="VendorId">This identifies the vendor-specific implementation.</param>
        /// <param name="VendorErrorCode">A vendor-specific error code.</param>
        public StatusNotificationRequest(Connector_Id ConnectorId,
                                         ChargePointStatus Status,
                                         ChargePointErrorCodes ErrorCode,
                                         String Info = null,
                                         DateTime?StatusTimestamp = null,
                                         String VendorId          = null,
                                         String VendorErrorCode   = null)
        {
            this.ConnectorId = ConnectorId;
            this.Status      = Status;
            this.ErrorCode   = ErrorCode;

            this.Info            = Info.Trim().IsNotNullOrEmpty() ? Info.Trim() : "";
            this.StatusTimestamp = StatusTimestamp ?? new DateTime?();
            this.VendorId        = VendorId.Trim().IsNotNullOrEmpty() ? VendorId.Trim() : "";
            this.VendorErrorCode = VendorErrorCode.Trim().IsNotNullOrEmpty() ? VendorErrorCode.Trim() : "";
        }