init
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
using DTS.Common.Enums;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface IStreamInputSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// ID in the database for the stream output setting
|
||||
/// only positive numbers are valid database ids
|
||||
/// </summary>
|
||||
int DatabaseId { get; set; }
|
||||
/// <summary>
|
||||
/// whether the stream output is checked in a list with a checkbox
|
||||
/// </summary>
|
||||
bool Included { get; set; }
|
||||
/// <summary>
|
||||
/// the serial number / setting name
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// description or comment of setting
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the user who last modified setting
|
||||
/// </summary>
|
||||
string LastModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// when the setting was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if stream output matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
bool Filter(string term);
|
||||
/// <summary>
|
||||
/// whether the stream output is associated with a channel
|
||||
/// </summary>
|
||||
bool Assigned { get; set; }
|
||||
/// <summary>
|
||||
/// whether the stream output is online or not
|
||||
/// </summary>
|
||||
bool Online { get; set; }
|
||||
/// <summary>
|
||||
/// the isocode for the stream output
|
||||
/// </summary>
|
||||
string ISOCode { get; set; }
|
||||
/// <summary>
|
||||
/// the iso channel name for the stream output
|
||||
/// </summary>
|
||||
string ISOChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// the user code for the stream output
|
||||
/// </summary>
|
||||
string UserCode { get; set; }
|
||||
/// <summary>
|
||||
/// the user channel name for the stream output
|
||||
/// </summary>
|
||||
string UserChannelName { get; set; }
|
||||
/// <summary>
|
||||
/// marks the stream output setting as broken or not
|
||||
/// broken sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool Broken { get; set; }
|
||||
/// <summary>
|
||||
/// marks the stream output setting as donotuse
|
||||
/// donotuse sensors do not appear in selectable lists of sensors in edit test setup or edit group
|
||||
/// </summary>
|
||||
bool DoNotUse { get; set; }
|
||||
///<summary>
|
||||
/// udp address setting value
|
||||
///</summary>
|
||||
string UDPAddress { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace DTS.Common.Enums.Viewer
|
||||
{
|
||||
public enum TestSetupMetadataFields
|
||||
{
|
||||
Name,
|
||||
DateOfTheTest,
|
||||
Graphs,
|
||||
Timestamp,
|
||||
CalibrationBehavior
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using DTS.Common.Base;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface.Pagination;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SensorsList
|
||||
{
|
||||
public interface ISensorsListEditGroupViewModel : IBaseViewModel, IFilterableListView
|
||||
{
|
||||
ISensorsListEditGroupView View { get; set; }
|
||||
IAnalogSensor [] AnalogSensors { get; set; }
|
||||
ISquib [] Squibs { get; set; }
|
||||
IDigitalInputSetting [] DigitalInputSettings { get; set; }
|
||||
IDigitalOutputSetting [] DigitalOutputSettings { get; set; }
|
||||
IUartIOSetting [] UartSettings { get; set; }
|
||||
IStreamOutputSetting [] StreamOutputSettings { get; set; }
|
||||
void GetSensors(int sensorCalWarningPeriodDays, bool included);
|
||||
void SetCapacityFormat(string format);
|
||||
void Sort(object sortBy, bool bColumnClick);
|
||||
void Unset();
|
||||
void Filter(string currentFilter);
|
||||
void FilterSquib(object columnTag, string searchTerm);
|
||||
void FilterDigitalIn(object columnTag, string searchTerm);
|
||||
void FilterDigitalOut(object columnTag, string searchTerm);
|
||||
void FilterUartIO(object columnTag, string searchTerm);
|
||||
void FilterStreamOut(object columnTag, string searchTerm);
|
||||
void FilterStreamIn(object columnTag, string searchTerm);
|
||||
void SetShowAssigned(bool showAssigned, bool showUnassigned, IReadOnlyDictionary<string, bool> assignedSensors);
|
||||
void SetShowOnline(bool showOnline);
|
||||
void SetAssignedSensors(IReadOnlyDictionary<string, bool> serialNumbers);
|
||||
void SetOnline(Dictionary<string, bool> serialNumbersToOnline);
|
||||
bool IsSensorOnline(string serialNumber);
|
||||
void SetCachedSensors(ISensorData[] cachedSensors);
|
||||
void SetCachedCalibrations(ISensorCalibration[] calibrations);
|
||||
// sets the currently active tab to the type of sensor (analog/squib/di/dout)
|
||||
void SetActiveTab(PossibleFilters filter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
namespace DTS.Common.Classes.Locking
|
||||
{
|
||||
public class LockError
|
||||
{
|
||||
public int ErrorCode { get; private set; }
|
||||
public string Message { get; private set; }
|
||||
public string LockingUser {get; private set; }
|
||||
public string LockingMachine { get; private set; }
|
||||
|
||||
public bool LockStolen => ErrorCode == LOCKSTOLEN_ERROR;
|
||||
public bool LockLost => ErrorCode == LOCKDOESNTEXIST_ERROR;
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{ErrorCode} - {Message}";
|
||||
}
|
||||
|
||||
public LockError(int error, string message, string user = null, string machine = null)
|
||||
{
|
||||
ErrorCode = error;
|
||||
Message = message;
|
||||
LockingUser = user??string.Empty;
|
||||
LockingMachine = machine??string.Empty;
|
||||
}
|
||||
//14782 Improve lost remote db connection modal dialogs
|
||||
//this can apparently be returned by sqlclient on failed lock maintenance issues
|
||||
public const int BAD_NETPATH_ERROR = 994;
|
||||
//14782 Improve lost remote db connection modal dialogs
|
||||
//system error of semaphore timeout, returned by sqlclient on failed to connect issues
|
||||
public const int SEM_TIMEOUT_ERROR = 995;
|
||||
public const int ITEM_NOT_FOUND = 996;
|
||||
public const int LOCKDOESNTEXIST_ERROR = 997;
|
||||
public const int LOCKSTOLEN_ERROR = 998;
|
||||
public const int UNKNOWN_ERROR = 999;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user