using DTS.Common.Enums;
using DTS.Common.Interface.Sensors.SoftwareFilters;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DTS.Common.Interface.Sensors
{
///
/// interface describing a record of a digital input setting in the db
///
public interface IDigitalInDbRecord
{
///
/// Database id of record
///
[Key]
int Id { get; set; }
///
/// serial number or name of setting
///
string SerialNumber { get; set; }
///
/// Input mode for setting
///
DigitalInputModes Mode { get; set; }
///
/// ScaleMultiplier, defines how to interpret output in terms of
/// units or active/default value of input state
///
[Required]
[StringLength(50)]
IDigitalInputScaleMultiplier ScaleMultiplier { get; set; }
///
/// when setting was last modified
///
[Column(TypeName = "datetime")]
DateTime LastModified { get; set; }
///
/// user that last modified setting in db
///
[Required]
[StringLength(50)]
string LastModifiedBy { get; set; }
///
/// Electronic ID for digital input setting
/// (dallas or TeDS ID value)
///
[Required]
[Column("eId")]
[StringLength(50)]
string EID { get; set; }
///
/// ISO 13499 code for digital input data collected using this setting
/// this is the default code when the setting is applied to an input channel
/// but can be changed in group or test settings
///
[Required]
[StringLength(50)]
string ISOCode { get; set; }
///
/// the associated ISO 13499 channel name to apply to a channel when applying
/// setting to an input channel
/// but can be changed in group or test settings
///
[Required]
[StringLength(255)]
string ISOChannelName { get; set; }
///
/// the user code to apply to a channel when applying setting to a channel
/// can be changed in group or test settings
///
[Required]
[StringLength(50)]
string UserCode { get; set; }
///
/// user channel name to apply to a channel when applying setting to a channel
/// can be changed in group or test settings
///
[Required]
[StringLength(255)]
string UserChannelName { get; set; }
///
/// user value to carry through to collected data channel when collecting data with this setting
///
[StringLength(255)]
string UserValue1 { get; set; }
///
/// user value to carry through to collected data channel when collecting data with this setting
///
[StringLength(255)]
string UserValue2 { get; set; }
///
/// user value to carry through to collected data channel when collecting data with this setting
///
[StringLength(255)]
string UserValue3 { get; set; }
///
/// bytes describing tag ids for tags associated with setting
/// see ITagAware for more information
///
byte[] UserTags { get; set; }
///
/// measurement unit for collected data, for example
/// 'V' or Volts
///
[Required]
[StringLength(50)]
string MeasurementUnit { get; set; }
///
/// software filter class (applied when viewing data) to apply to collected data by default
/// can be changed when viewing or exporting, this is just a default filter
///
[Required]
[StringLength(50)]
IFilterClass FilterClass { get; set; }
///
/// a flag indicating setting should not be used for arbitrary user specified reason
///
bool DoNotUse { get; set; }
///
/// a flag indicating setting should not be used because it is currently broken
///
bool Broken { get; set; }
}
}