示例#1
0
 /// <summary>
 /// Constructor to copy.
 /// </summary>
 /// <param name="rhs">the src object.</param>
 public LoggerPolicy(LoggerPolicy rhs)
 {
     this.m_reloadStepCount = rhs.m_reloadStepCount;
     this.m_reloadInterval = rhs.m_reloadInterval;
     this.m_diskFullAction = rhs.m_diskFullAction;
     this.m_maxDiskSpace = rhs.m_maxDiskSpace;
 }
示例#2
0
 /// <summary>
 /// Creates the logger policy with some parameters.
 /// </summary>
 /// <param name="savedStepCount">The saved step count</param>
 /// <param name="savedInterval">The saved interval</param>
 /// <param name="diskFullAction">The action if the HDD is full</param>
 /// <param name="maxDiskSpace">The limit of the usable HDD</param>
 public void CreateLoggerPolicy(
     int savedStepCount,
     double savedInterval,
     DiskFullAction diskFullAction,
     int maxDiskSpace)
 {
     LoggerPolicy loggerPolicy
             = new LoggerPolicy(savedStepCount, savedInterval, diskFullAction, maxDiskSpace);
     m_env.DataManager.SetLoggerPolicy(m_env.DataManager.GetCurrentSimulationParameterID(), loggerPolicy);
 }
示例#3
0
        /// <summary>
        /// Creates the new "LoggerPolicy" instance with some parameters.
        /// </summary>
        /// <param name="reloadStepCount">The reload step count</param>
        /// <param name="reloadInterval">The reload interval</param>
        /// <param name="diskFullAction">The action when the HDD is full</param>
        /// <param name="maxDiskSpace">The maximum HDD space</param>
        public LoggerPolicy(
            int reloadStepCount,
            double reloadInterval,
            DiskFullAction diskFullAction,
            int maxDiskSpace
            )
        {
            Debug.Assert(reloadStepCount >= 0);
            Debug.Assert(reloadInterval >= 0.0);
            Debug.Assert(reloadStepCount != 0 || reloadInterval != 0.0);
            Debug.Assert(maxDiskSpace >= 0);

            this.m_reloadStepCount = reloadStepCount;
            this.m_reloadInterval = reloadInterval;
            this.m_diskFullAction = diskFullAction;
            this.m_maxDiskSpace = maxDiskSpace;
        }
示例#4
0
 /// <summary>
 /// Sets the logger policy of the logger.
 /// </summary>
 /// <param name="savedStepCount">the saved step count</param>
 /// <param name="savedInterval">the saved interval</param>
 /// <param name="diskFullAction">the HDD full action</param>
 /// <param name="maxDiskSpace">the max HDD space</param>
 public void SetLoggerPolicy(
     int savedStepCount,
     double savedInterval,
     DiskFullAction diskFullAction,
     int maxDiskSpace)
 {
     LoggerPolicy loggerPolicy
             = new LoggerPolicy(savedStepCount, savedInterval, diskFullAction, maxDiskSpace);
     m_cManager.DataManager.SetLoggerPolicy(this.m_parameterID, loggerPolicy);
 }