コード例 #1
0
ファイル: VEN2b.cs プロジェクト: 2thetop/OpenADR-VEN
        /**********************************************************/

        /// <summary>
        /// use to send error response to distributeEvent message when an invalid VTN ID is received
        /// </summary>
        /// <param name="requestID"></param>
        /// <param name="responseCode"></param>
        /// <param name="responseDescription"></param>
        /// <returns></returns>
        public CreatedEvent createdEvent(string requestID, int responseCode, string responseDescription)
        {
            CreatedEvent request = new CreatedEvent();

            string requestBody = request.createdOadrCreatedEvent(VENID, requestID, responseCode, responseDescription);

            if ((request.response = (oadrResponseType)postRequest(requestBody, "/EiEvent", request, true)) != null)
            {
                request.setEiResponse(request.response.eiResponse);
            }

            return(request);
        }
コード例 #2
0
ファイル: VEN2b.cs プロジェクト: 2thetop/OpenADR-VEN
        /**********************************************************/

        public CreatedEvent createdEvent(string requestID, List <oadrDistributeEventTypeOadrEvent> evts, OptTypeType optType, int responseCode = 200, string responseDescription = "OK")
        {
            CreatedEvent request = new CreatedEvent();

            string requestBody = request.createdOadrCreatedEvent(VENID, requestID, evts, optType, responseCode, responseDescription);

            if ((request.response = (oadrResponseType)postRequest(requestBody, "/EiEvent", request, true)) != null)
            {
                request.setEiResponse(request.response.eiResponse);
            }

            return(request);
        }