using DbAPI.Connections; using DbAPI.User; using DTS.Common.Interface.Database; using DTS.Common.Interface.DataRecorders; namespace DbAPI.DAS { /// /// DAS functions (Get/Insert/Update/Delete) /// public interface IDataRecorders { /// /// Deletes all channels related to DAS /// /// /// /// /// 0 on success, all other values are errors ulong DASChannelsDelete(IUserDbRecord user, IConnectionDetails connection, string hardwareId); /// /// inserts das channel record into db. modifies record by updating id after insert /// /// user making insert /// connection channel is being inserted on /// string identifier for hardware (serialnumber_dastype) /// record being inserted /// 0 (ERROR_SUCCESS) on success, all other values are errors ulong DASChannelsInsert(IUserDbRecord user, IConnectionDetails connection, string hardwareId, ref IDASChannelDBRecord record); /// /// returns DASChannels for given DAS /// /// /// /// string identifying hardware in the form of DASSerial_DASType (or null for all records) /// /// 0 (ERROR_SUCCESS) on success, all other values are errors ulong DASChannelsGet(IUserDbRecord user, IConnectionDetails connetion, string HardwareId, out IDASChannelDBRecord[] channels); /// /// 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 /// /// /// /// /// /// 0 on success, all other values are errors ulong DASChildrenGet(IUserDbRecord user, IConnectionDetails connection, string dasSerialNumber, out string[] childrenSerialNumbers); /// /// 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 /// /// /// /// /// /// /// 0 (ERROR_SUCCESS) on success, all other values are errors ulong DASDelete(IUserDbRecord user, IConnectionDetails connection, int DASId, string serialNumber, bool embedded); /// /// returns a specific data recorder or optionally all data recorders /// Does not check that user has permission to view DAS /// /// DataPRO user requesting data recorders, must be logged in /// connection user is logged in on /// Database id of DAS, or null if providing serial or requesting all DAS /// Serial number of DAS, or null if providing DASId or requesting all DAS /// /// DAS or multiple DAS matching search criteria, Can be null or empty /// 0 (ERROR_SUCCESS) on success, all other values are errors /// returns ERROR_NOACCESS if user is not logged in /// ulong DASGet(IUserDbRecord user, IConnectionDetails connection, int clientDbVersion, string DASSerial, string position, out IDASDBRecord[] das); /// /// Inserts a DAS record into the db /// /// /// /// /// 0 (ERROR_SUCCESS) on success, all other values are errors /// returns ERROR_NOACCESS if user is not logged in ulong DASInsert(IUserDbRecord user, IConnectionDetails connection, IDASDBRecord das); /// /// Updates a DAS record in the db /// /// /// /// /// 0 (ERROR_SUCCESS) on success, all other values are errors /// returns ERROR_NOACCESS if user is not logged in ulong DASUpdate(IUserDbRecord user, IConnectionDetails connection, IDASDBRecord das); } }