Files
DP44/Common/DTS.Common/.svn/pristine/e2/e2921e3ff78ece162a0ea1a98a70c9b0157c92b7.svn-base

127 lines
4.6 KiB
Plaintext
Raw Normal View History

2026-04-17 14:55:32 -04:00
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
{
/// <summary>
/// interface describing a record of a digital input setting in the db
/// </summary>
public interface IDigitalInDbRecord
{
/// <summary>
/// Database id of record
/// </summary>
[Key]
int Id { get; set; }
/// <summary>
/// serial number or name of setting
/// </summary>
string SerialNumber { get; set; }
/// <summary>
/// Input mode for setting
/// </summary>
DigitalInputModes Mode { get; set; }
/// <summary>
/// ScaleMultiplier, defines how to interpret output in terms of
/// units or active/default value of input state
/// </summary>
[Required]
[StringLength(50)]
IDigitalInputScaleMultiplier ScaleMultiplier { get; set; }
/// <summary>
/// when setting was last modified
/// </summary>
[Column(TypeName = "datetime")]
DateTime LastModified { get; set; }
/// <summary>
/// user that last modified setting in db
/// </summary>
[Required]
[StringLength(50)]
string LastModifiedBy { get; set; }
/// <summary>
/// Electronic ID for digital input setting
/// (dallas or TeDS ID value)
/// </summary>
[Required]
[Column("eId")]
[StringLength(50)]
string EID { get; set; }
/// <summary>
/// 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
/// </summary>
[Required]
[StringLength(50)]
string ISOCode { get; set; }
/// <summary>
/// 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
/// </summary>
[Required]
[StringLength(255)]
string ISOChannelName { get; set; }
/// <summary>
/// the user code to apply to a channel when applying setting to a channel
/// can be changed in group or test settings
/// </summary>
[Required]
[StringLength(50)]
string UserCode { get; set; }
/// <summary>
/// user channel name to apply to a channel when applying setting to a channel
/// can be changed in group or test settings
/// </summary>
[Required]
[StringLength(255)]
string UserChannelName { get; set; }
/// <summary>
/// user value to carry through to collected data channel when collecting data with this setting
/// </summary>
[StringLength(255)]
string UserValue1 { get; set; }
/// <summary>
/// user value to carry through to collected data channel when collecting data with this setting
/// </summary>
[StringLength(255)]
string UserValue2 { get; set; }
/// <summary>
/// user value to carry through to collected data channel when collecting data with this setting
/// </summary>
[StringLength(255)]
string UserValue3 { get; set; }
/// <summary>
/// bytes describing tag ids for tags associated with setting
/// see ITagAware for more information
/// </summary>
byte[] UserTags { get; set; }
/// <summary>
/// measurement unit for collected data, for example
/// 'V' or Volts
/// </summary>
[Required]
[StringLength(50)]
string MeasurementUnit { get; set; }
/// <summary>
/// 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
/// </summary>
[Required]
[StringLength(50)]
IFilterClass FilterClass { get; set; }
/// <summary>
/// a flag indicating setting should not be used for arbitrary user specified reason
/// </summary>
bool DoNotUse { get; set; }
/// <summary>
/// a flag indicating setting should not be used because it is currently broken
/// </summary>
bool Broken { get; set; }
}
}