コード例 #1
0
ファイル: Header.cs プロジェクト: PetersSharp/stCoCServer
 internal Header(RrdDb parentDb, RrdDef rrdDef)
 {
     this.parentDb  = parentDb;
     signature      = new RrdString(SIGNATURE, this);
     step           = new RrdLong(rrdDef.Step, this);
     dsCount        = new RrdInt(rrdDef.DsCount, this);
     arcCount       = new RrdInt(rrdDef.ArcCount, this);
     lastUpdateTime = new RrdLong(rrdDef.StartTime, this);
 }
コード例 #2
0
ファイル: Header.cs プロジェクト: PetersSharp/stCoCServer
 internal Header(RrdDb parentDb)
 {
     this.parentDb = parentDb;
     signature     = new RrdString(this);
     if (!signature.Get().Equals(SIGNATURE))
     {
         throw new RrdException("Not an RRDSharp file");
     }
     step           = new RrdLong(this);
     dsCount        = new RrdInt(this);
     arcCount       = new RrdInt(this);
     lastUpdateTime = new RrdLong(this);
 }
コード例 #3
0
 internal Robin(Archive parentArc, int rows)
 {
     this.parentArc = parentArc;
     this.rows      = rows;
     if (RrdFile.RrdMode == RrdFile.MODE_CREATE)
     {
         pointer = new RrdInt(0, this);
         values  = new RrdDoubleArray(this, rows, Double.NaN);
     }
     else
     {
         pointer = new RrdInt(this);
         values  = new RrdDoubleArray(this, rows);
     }
 }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parentDb"></param>
        public Archive(RrdDb parentDb)
        {
            this.parentDb = parentDb;
            consolFun     = new RrdString(this);
            xff           = new RrdDouble(this);
            steps         = new RrdInt(this);
            rows          = new RrdInt(this);
            int n = parentDb.Header.DsCount;

            states = new ArcState[n];
            robins = new Robin[n];
            for (int i = 0; i < n; i++)
            {
                states[i] = new ArcState(this);
                robins[i] = new Robin(this, rows.Get());
            }
        }