示例#1
0
        protected long GetTime_ms()
        {
            TimeSpan ts = new TimeSpan(DateTime.Now.Ticks - startTime.Ticks);
            long     ms = (long)(ts.TotalMilliseconds);

            return(AOUHelper.ToCurTimeStep(ms, curTimeSpan));
        }
示例#2
0
 public AOULogMessage(long logTime, string logMsg)
 {
     time    = AOUHelper.msToTimeSpan(logTime);
     message = logMsg;
     prio    = 0;
     pid     = 0;
 }
示例#3
0
 public AOULogMessage(long logTime, string logMsg, uint logPrio, uint logProcessId)
 {
     time    = AOUHelper.msToTimeSpan(logTime);
     message = logMsg;
     prio    = logPrio;
     pid     = logProcessId;
 }
示例#4
0
        }                                        //

        public override string ToString()
        {
            try {
                string fmt = "{0}: hot:{2:0.}, cold:{3:0.}, ret:{4:0.} (Tbuf h:{7:0.}, m:{8:0.}, c:{9:0.})";
                fmt += " Theco:{10:0.}, heat:{11:0.}, pow:{12:0.}  cool:{16} [Valves hot:{13}, cold:{14}, ret:{15}] [act:{5:0.}, for:{6:0.}] {1}";
                string vHot  = ValveFeedHot == 50 ? "off" : "on";
                string vCold = ValveFeedCold == 50 ? "off" : "on";
                string vRet  = ValveReturn == 50 ? "cold" : "hot";
                // string vCool = ValveCoolant == 50 ? "off" : "on";

                return(String.Format(fmt, AOUHelper.msToTimeSpanStr(ElapsedTime), State.ToString(), THotTank, TColdTank,
                                     TReturnValve, TReturnActual, TReturnForecasted, TBufferHot, TBufferMid, TBufferCold,
                                     THeatExchangerCoolantOut, THeaterOilOut, PowerHeating, vHot, vCold, vRet, ValveCoolant));
            }
            catch (Exception e)
            {
                return(e.Message);
            }
        }
示例#5
0
 public override string ToString()
 {
     return(String.Format("{0}, {1}, {2}, {3}", AOUHelper.msToTimeSpanStr((long)time.TotalMilliseconds), message, prio, pid));
 }