コード例 #1
0
        /// <summary>
        /// Create a new OCPP get composite schedule response.
        /// </summary>
        /// <param name="Status">The result of the request.</param>
        /// <param name="ConnectorId">The charging schedule contained in this notification applies to a specific connector.</param>
        /// <param name="ScheduleStart">The periods contained in the charging profile are relative to this timestamp.</param>
        /// <param name="ChargingSchedule">The planned composite charging schedule, the energy consumption over time. Always relative to ScheduleStart.</param>
        public GetCompositeScheduleResponse(GetCompositeScheduleStatus Status,
                                            Connector_Id ConnectorId,
                                            DateTime?ScheduleStart,
                                            ChargingSchedule ChargingSchedule)

            : base(Result.OK())

        {
            this.Status           = Status;
            this.ConnectorId      = ConnectorId;
            this.ScheduleStart    = ScheduleStart ?? new DateTime?();
            this.ChargingSchedule = ChargingSchedule;
        }
コード例 #2
0
        /// <summary>
        /// Create a new get composite schedule response.
        /// </summary>
        /// <param name="Request">The start transaction request leading to this response.</param>
        /// <param name="Status">The result of the request.</param>
        /// <param name="ConnectorId">The charging schedule contained in this notification applies to a specific connector.</param>
        /// <param name="ScheduleStart">The periods contained in the charging profile are relative to this timestamp.</param>
        /// <param name="ChargingSchedule">The planned composite charging schedule, the energy consumption over time. Always relative to ScheduleStart.</param>
        public GetCompositeScheduleResponse(CS.GetCompositeScheduleRequest Request,
                                            GetCompositeScheduleStatus Status,
                                            Connector_Id?ConnectorId,
                                            DateTime?ScheduleStart,
                                            ChargingSchedule ChargingSchedule)

            : base(Request,
                   Result.OK())

        {
            this.Status           = Status;
            this.ConnectorId      = ConnectorId;
            this.ScheduleStart    = ScheduleStart;
            this.ChargingSchedule = ChargingSchedule;
        }
コード例 #3
0
        public static String AsText(this GetCompositeScheduleStatus GetCompositeScheduleStatus)
        {
            switch (GetCompositeScheduleStatus)
            {
            case GetCompositeScheduleStatus.Accepted:
                return("Accepted");

            case GetCompositeScheduleStatus.Rejected:
                return("Rejected");


            default:
                return("unknown");
            }
        }