예제 #1
0
        /**********************************************************/

        public void addIntervalResourceStatus(DateTime startUTC, string rID, uint confidence, float accuracy, DataQuality dataQuality, bool online, bool manualOverride,
                                              float capacityMin, float capacityMax, float capacityCurrent, float capacityNormal,
                                              float levelOffsetMin, float levelOffsetMax, float levelOffsetCurrent, float levelOffsetNormal,
                                              float percentOffsetMin, float percentOffsetMax, float percentOffsetCurrent, float percentOffsetNormal,
                                              float setPointMin, float setPointMax, float setPointCurrent, float setPointNormal, int duration = -1, DurationModifier durationModifier = null)
        {
            oadrReportPayloadType reportPayload = new oadrReportPayloadType();

            reportPayload.rID        = rID;
            reportPayload.confidence = confidence;
            reportPayload.accuracy   = accuracy;

            reportPayload.oadrDataQuality = dataQuality.QualityType;

            oadrPayloadResourceStatusType resourceStatus = new oadrPayloadResourceStatusType();

            resourceStatus.oadrOnline         = online;
            resourceStatus.oadrManualOverride = manualOverride;

            resourceStatus.oadrLoadControlState = new oadrLoadControlStateType();
            resourceStatus.oadrLoadControlState.oadrCapacity      = helper.OadrObjectFactory.createLoadControlStateType(capacityMin, capacityMax, capacityCurrent, capacityNormal);
            resourceStatus.oadrLoadControlState.oadrLevelOffset   = helper.OadrObjectFactory.createLoadControlStateType(levelOffsetMin, levelOffsetMax, levelOffsetCurrent, levelOffsetNormal);
            resourceStatus.oadrLoadControlState.oadrPercentOffset = helper.OadrObjectFactory.createLoadControlStateType(percentOffsetMin, percentOffsetMax, percentOffsetCurrent, percentOffsetNormal);
            resourceStatus.oadrLoadControlState.oadrSetPoint      = helper.OadrObjectFactory.createLoadControlStateType(setPointMin, setPointMax, setPointCurrent, setPointNormal);

            reportPayload.Item = resourceStatus;

            addIntervalPayload(startUTC, rID, reportPayload, duration, durationModifier);
        }
예제 #2
0
        /**********************************************************/

        public void addIntervalReportPayload(DateTime startUTC, string rID, uint confidence, float accuracy, float payload, DataQuality dataQuality, int duration = -1, DurationModifier durationModifier = null)
        {
            oadrReportPayloadType reportPayload = new oadrReportPayloadType();

            reportPayload.rID        = rID;
            reportPayload.confidence = confidence;
            reportPayload.accuracy   = accuracy;

            reportPayload.oadrDataQuality = dataQuality.QualityType;

            PayloadFloatType payloadFloat = new PayloadFloatType();

            payloadFloat.value = payload;

            reportPayload.Item = payloadFloat;

            addIntervalPayload(startUTC, rID, reportPayload, duration, durationModifier);
        }
예제 #3
0
        /**********************************************************/

        /// <summary>
        /// adds an interval and a ReportPayload to the interval
        /// calling this function is the same as calling addInterval followed by addIntervalReportPayload
        /// </summary>
        /// <param name="reportSpecifierID"></param>
        /// <param name="startUTC"></param>
        /// <param name="durationMinutes"></param>
        /// <param name="rID"></param>
        /// <param name="confidence"></param>
        /// <param name="accuracy"></param>
        /// <param name="payload"></param>
        /// <param name="dataQuality"></param>
        /// <returns></returns>
        public int addIntervalReportPayload(string reportSpecifierID, DateTime startUTC, int duration, DurationModifier durationModifier,
                                            string rID, uint confidence, float accuracy, float payload, DataQuality dataQuality)
        {
            int uid = addInterval(reportSpecifierID, startUTC, duration, durationModifier);

            addIntervalReportPayload(reportSpecifierID, uid, rID, confidence, accuracy, payload, dataQuality);

            return(uid);
        }
예제 #4
0
        /**********************************************************/

        public int addIntervalResourceStatus(string reportSpecifierID, DateTime startUTC, int duration, DurationModifier durationModifier,
                                             string rID, uint confidence, float accuracy, DataQuality dataQuality, bool online, bool manualOverride,
                                             float capacityMin, float capacityMax, float capacityCurrent, float capacityNormal,
                                             float levelOffsetMin, float levelOffsetMax, float levelOffsetCurrent, float levelOffsetNormal,
                                             float percentOffsetMin, float percentOffsetMax, float percentOffsetCurrent, float percentOffsetNormal,
                                             float setPointMin, float setPointMax, float setPointCurrent, float setPointNormal)
        {
            int uid = addInterval(reportSpecifierID, startUTC, duration, durationModifier);

            addIntervalResourceStatus(reportSpecifierID, uid, rID, confidence, accuracy, dataQuality, online, manualOverride, capacityMin, capacityMax, capacityCurrent,
                                      capacityNormal, levelOffsetMin, levelOffsetMax, levelOffsetCurrent, levelOffsetNormal, percentOffsetMin, percentOffsetMax, percentOffsetCurrent,
                                      percentOffsetNormal, setPointMin, setPointMax, setPointCurrent, setPointNormal);

            return(uid);
        }
예제 #5
0
        /**********************************************************/

        public void addIntervalReportPayload(string reportSpecifierID, int uid, string rID, uint confidence, float accuracy, float payload, DataQuality dataQuality)
        {
            oadrReportPayloadType reportPayload = new oadrReportPayloadType();

            reportPayload.rID        = rID;
            reportPayload.confidence = confidence;
            reportPayload.accuracy   = accuracy;

            reportPayload.oadrDataQuality = dataQuality.QualityType;

            PayloadFloatType payloadFloat = new PayloadFloatType();

            payloadFloat.value = payload;

            reportPayload.Item = payloadFloat;

            addIntervalPayload(reportSpecifierID, uid, reportPayload);
        }