init
This commit is contained in:
103
DataPRO/DbAPI/DAS/IDataRecorders.cs
Normal file
103
DataPRO/DbAPI/DAS/IDataRecorders.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using DbAPI.Connections;
|
||||
using DbAPI.User;
|
||||
using DTS.Common.Interface.Database;
|
||||
using DTS.Common.Interface.DataRecorders;
|
||||
|
||||
namespace DbAPI.DAS
|
||||
{
|
||||
/// <summary>
|
||||
/// DAS functions (Get/Insert/Update/Delete)
|
||||
/// </summary>
|
||||
public interface IDataRecorders
|
||||
{
|
||||
/// <summary>
|
||||
/// Deletes all channels related to DAS
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="connection"></param>
|
||||
/// <param name="hardwareId"></param>
|
||||
/// <returns>0 on success, all other values are errors</returns>
|
||||
ulong DASChannelsDelete(IUserDbRecord user, IConnectionDetails connection,
|
||||
string hardwareId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// inserts das channel record into db. modifies record by updating id after insert
|
||||
/// </summary>
|
||||
/// <param name="user">user making insert</param>
|
||||
/// <param name="connection">connection channel is being inserted on</param>
|
||||
/// <param name="hardwareId">string identifier for hardware (serialnumber_dastype)</param>
|
||||
/// <param name="record">record being inserted</param>
|
||||
/// <returns>0 (ERROR_SUCCESS) on success, all other values are errors</returns>
|
||||
ulong DASChannelsInsert(IUserDbRecord user, IConnectionDetails connection,
|
||||
string hardwareId, ref IDASChannelDBRecord record);
|
||||
/// <summary>
|
||||
/// returns DASChannels for given DAS
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="connetion"></param>
|
||||
/// <param name="HardwareId">string identifying hardware in the form of DASSerial_DASType (or null for all records)</param>
|
||||
/// <param name="channels"></param>
|
||||
/// <returns>0 (ERROR_SUCCESS) on success, all other values are errors</returns>
|
||||
ulong DASChannelsGet(IUserDbRecord user, IConnectionDetails connetion, string HardwareId, out IDASChannelDBRecord[] channels);
|
||||
/// <summary>
|
||||
/// returns all the DAS serials associated with a given parent DAS
|
||||
/// used for discovering which das are associated with a das in the db for encapsulated/compacted DAS
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="connection"></param>
|
||||
/// <param name="dasSerialNumber"></param>
|
||||
/// <param name="childrenSerialNumbers"></param>
|
||||
/// <returns>0 on success, all other values are errors</returns>
|
||||
ulong DASChildrenGet(IUserDbRecord user, IConnectionDetails connection, string dasSerialNumber, out string[] childrenSerialNumbers);
|
||||
/// <summary>
|
||||
/// Deletes DAS from Database
|
||||
/// an Id or a serial number is required
|
||||
/// will remove record from any test setups
|
||||
/// will remove from channel assignments (if embedded, otherwise will remove channels as well)
|
||||
/// will remove das channels and das meta data
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="connection"></param>
|
||||
/// <param name="DASId"></param>
|
||||
/// <param name="serialNumber"></param>
|
||||
/// <param name="embedded"></param>
|
||||
/// <returns>0 (ERROR_SUCCESS) on success, all other values are errors</returns>
|
||||
ulong DASDelete(IUserDbRecord user, IConnectionDetails connection, int DASId, string serialNumber, bool embedded);
|
||||
/// <summary>
|
||||
/// returns a specific data recorder or optionally all data recorders
|
||||
/// Does not check that user has permission to view DAS
|
||||
/// </summary>
|
||||
/// <param name="user">DataPRO user requesting data recorders, must be logged in</param>
|
||||
/// <param name="connection">connection user is logged in on</param>
|
||||
/// <param name="DASId">Database id of DAS, or null if providing serial or requesting all DAS</param>
|
||||
/// <param name="DASSerial">Serial number of DAS, or null if providing DASId or requesting all DAS</param>
|
||||
/// <param name="position"></param>
|
||||
/// <param name="das">DAS or multiple DAS matching search criteria, Can be null or empty</param>
|
||||
/// <returns>0 (ERROR_SUCCESS) on success, all other values are errors
|
||||
/// returns ERROR_NOACCESS if user is not logged in
|
||||
/// </returns>
|
||||
ulong DASGet(IUserDbRecord user, IConnectionDetails connection, int clientDbVersion, string DASSerial,
|
||||
string position, out IDASDBRecord[] das);
|
||||
/// <summary>
|
||||
/// Inserts a DAS record into the db
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="connection"></param>
|
||||
/// <param name="das"></param>
|
||||
/// <returns>0 (ERROR_SUCCESS) on success, all other values are errors
|
||||
/// returns ERROR_NOACCESS if user is not logged in</returns>
|
||||
ulong DASInsert(IUserDbRecord user, IConnectionDetails connection, IDASDBRecord das);
|
||||
/// <summary>
|
||||
/// Updates a DAS record in the db
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="connection"></param>
|
||||
/// <param name="das"></param>
|
||||
/// <returns>0 (ERROR_SUCCESS) on success, all other values are errors
|
||||
/// returns ERROR_NOACCESS if user is not logged in</returns>
|
||||
ulong DASUpdate(IUserDbRecord user, IConnectionDetails connection, IDASDBRecord das);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user