Пример #1
0
 /// <summary>
 ///     Seed current driver data table with data
 ///     инициализирует драйвер техническими данными
 /// </summary>
 /// <param name="result">
 ///     An instance of <see cref="DriverDataSeedingResult" /> that represents seeding result to populate
 /// </param>
 protected virtual void OnSeeding(DriverDataSeedingResult result)
 {
     result.DateTimeId          = this.AddDriverData(DATE_TIME_ID_NAME, 0x1008, 8, true);
     result.CommandManagementId = this.AddDriverData(COMMAND_MANAGENT_ID_NAME, 0x0000, 13, true);
     result.AnalogId            = this.AddDriverData(ANALOG_DATA_ID_NAME, 0x000E, 18, true);
     result.MeterDateTimeId     = this.AddDriverData(METER_DATE_TIME, 0x210, 16, true);
 }
Пример #2
0
        /// <summary>
        ///     Seed current driver data table with data
        /// </summary>
        /// <param name="driverDataTable">
        ///     An instance of <see cref="IDriverDataTable" /> that represents current driver data table to seed with data
        /// </param>
        /// <returns>
        ///     An instance of <see cref="DriverDataSeedingResult" /> that represents seeding result
        /// </returns>
        public DriverDataSeedingResult Seed(IDriverDataTable driverDataTable)
        {
            var result = new DriverDataSeedingResult();

            if (driverDataTable == null)
            {
                throw new ArgumentNullException(PICON2.Localization.PICON2Resources.Instance.DriverDataTable);
            }
            this._driverDataTable = driverDataTable;
            this.OnSeeding(result);

            return(result);
        }