This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
INSERT INTO SensorsType VALUES(8, 'CAN')
INSERT INTO dbo.Sensors VALUES (8, 'TSF_TestSpecific')

View File

@@ -0,0 +1 @@
INSERT INTO [dbo].[DAS] VALUES ('SLICE PRO CAN FD Prototype',60,4,1360003054,4294967295,0,'00A0','2025-11-24 00:00:00.000',1,'2025-11-24 00:00:00.000','DATAPRO_SYSTEM',1,0,'2022-06-28 00:00:00.000','','',4,'Prototype','7,7,7,7',0,0,0,0,0,0,'',NULL,NULL,NULL,NULL,50000)

View File

@@ -0,0 +1,20 @@
--Module 1
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
VALUES
((SELECT DASId FROM [dbo].[DAS] WHERE SerialNumber = 'SLICE PRO CAN FD Prototype'), 0, 8192, 50, -1, 0, 0, 0, 0, '', 0)
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
VALUES
((SELECT DASId FROM [dbo].[DAS] WHERE SerialNumber = 'SLICE PRO CAN FD Prototype'), 1, 8192, 50, -1, 0, 0, 0, 0, '', 0)
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
VALUES
((SELECT DASId FROM [dbo].[DAS] WHERE SerialNumber = 'SLICE PRO CAN FD Prototype'), 2, 8192, 50, -1, 0, 0, 0, 0, '', 0)
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
VALUES
((SELECT DASId FROM [dbo].[DAS] WHERE SerialNumber = 'SLICE PRO CAN FD Prototype'), 3, 8192, 50, -1, 0, 0, 0, 0, '', 0)

View File

@@ -0,0 +1,45 @@
CREATE PROCEDURE [dbo].[sp_DASGet_100]
@SerialNumber nvarchar(50) = null
,@position nvarchar(10) = null
AS
BEGIN
SET NOCOUNT ON;
SELECT [DASId]
,[SerialNumber]
,[Type]
,[MaxModules]
,[MaxMemory]
,[MaxSampleRate]
,[MinSampleRate]
,[FirmwareVersion]
,[CalDate]
,[ProtocolVersion]
,[LastModified]
,[LastModifiedBy]
,[Version]
,[LocalOnly]
,[LastUsed]
,[LastUsedBy]
,[Connection]
,[Channels]
,[Position]
,[ChannelTypes]
,[Reprogramable]
,[Reconfigurable]
,[IsModule]
,isnull([PositionOnDistributor], 0) as [PositionOnDistributor]
,isnull([PositionOnChain], 0) as [PositionOnChain]
,isnull([Port],0) as [Port]
,isnull([ParentDAS], space(0)) as [ParentDAS],
[FirstUseDate],
[TestId],
[GroupId],
[StandIn],
[MaxAAFRate]
FROM [dbo].[DAS] where
(@SerialNumber is null or DASId = dbo.foo_IdGetDAS(@SerialNumber))
and
Position = case when @position is null then space(0) else @position end
END

View File

@@ -0,0 +1,22 @@
ALTER PROCEDURE [dbo].[sp_ChannelSettingsGet]
@Id int = NULL,
@SettingName NVARCHAR (255) = NULL
AS
BEGIN
SET NOCOUNT ON;
IF (@Id IS NOT NULL) OR (@SettingName IS NOT NULL)
BEGIN
IF (@Id IS NULL)
BEGIN
SELECT [Id], [DefaultValue] FROM [dbo].[ChannelSettings] where (SettingName = @SettingName) AND (SettingName <> 'ACCouplingEnabled' AND SettingName <>'StreamOutTMATSIntervalMs' AND SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
ELSE
BEGIN
SELECT [SettingName] FROM [dbo].[ChannelSettings] where (Id = @Id) AND (SettingName <> 'ACCouplingEnabled' AND SettingName <>'StreamOutTMATSIntervalMs' AND SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
END
ELSE
BEGIN
SELECT [Id], [SettingName], [DefaultValue] FROM [dbo].[ChannelSettings] WHERE (SettingName <> 'ACCouplingEnabled' AND SettingName <>'StreamOutTMATSIntervalMs' AND SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
END

View File

@@ -0,0 +1,22 @@
ALTER PROCEDURE [dbo].[sp_ChannelSettingsGet_92]
@Id int = NULL,
@SettingName NVARCHAR (255) = NULL
AS
BEGIN
SET NOCOUNT ON;
IF (@Id IS NOT NULL) OR (@SettingName IS NOT NULL)
BEGIN
IF (@Id IS NULL)
BEGIN
SELECT [Id], [DefaultValue] FROM [dbo].[ChannelSettings] where (SettingName = @SettingName) AND (SettingName <>'StreamOutTMATSIntervalMs' AND SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
ELSE
BEGIN
SELECT [SettingName] FROM [dbo].[ChannelSettings] where (Id = @Id) AND (SettingName <>'StreamOutTMATSIntervalMs' AND SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
END
ELSE
BEGIN
SELECT [Id], [SettingName], [DefaultValue] FROM [dbo].[ChannelSettings] WHERE (SettingName <>'StreamOutTMATSIntervalMs' AND SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
END

View File

@@ -0,0 +1,22 @@
ALTER PROCEDURE [dbo].[sp_ChannelSettingsGet_93]
@Id int = NULL,
@SettingName NVARCHAR (255) = NULL
AS
BEGIN
SET NOCOUNT ON;
IF (@Id IS NOT NULL) OR (@SettingName IS NOT NULL)
BEGIN
IF (@Id IS NULL)
BEGIN
SELECT [Id], [DefaultValue] FROM [dbo].[ChannelSettings] where (SettingName = @SettingName) AND (SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
ELSE
BEGIN
SELECT [SettingName] FROM [dbo].[ChannelSettings] where (Id = @Id) AND (SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
END
ELSE
BEGIN
SELECT [Id], [SettingName], [DefaultValue] FROM [dbo].[ChannelSettings] WHERE (SettingName <>'BridgeType' AND SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
END

View File

@@ -0,0 +1,22 @@
ALTER PROCEDURE [dbo].[sp_ChannelSettingsGet_95]
@Id int = NULL,
@SettingName NVARCHAR (255) = NULL
AS
BEGIN
SET NOCOUNT ON;
IF (@Id IS NOT NULL) OR (@SettingName IS NOT NULL)
BEGIN
IF (@Id IS NULL)
BEGIN
SELECT [Id], [DefaultValue] FROM [dbo].[ChannelSettings] where (SettingName = @SettingName) AND (SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
ELSE
BEGIN
SELECT [SettingName] FROM [dbo].[ChannelSettings] where (Id = @Id) AND (SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
END
ELSE
BEGIN
SELECT [Id], [SettingName], [DefaultValue] FROM [dbo].[ChannelSettings] WHERE (SettingName <> 'CanIsFD' AND SettingName <> 'CanArbBaseBitrate' AND SettingName <> 'CanArbBaseSJW' AND SettingName <> 'CanDataBitrate' AND SettingName <> 'CanDataSJW' AND SettingName <> 'CanFileType')
END
END

View File

@@ -0,0 +1,51 @@
ALTER PROCEDURE [dbo].[sp_DASGet]
@SerialNumber nvarchar(50) = null
,@position nvarchar(10) = null
AS
BEGIN
SET NOCOUNT ON;
SELECT [DASId]
,[SerialNumber]
,[Type]
,[MaxModules]
,[MaxMemory]
,[MaxSampleRate]
,[MinSampleRate]
,[FirmwareVersion]
,[CalDate]
,[ProtocolVersion]
,[LastModified]
,[LastModifiedBy]
,[Version]
,[LocalOnly]
,[LastUsed]
,[LastUsedBy]
,[Connection]
,[Channels]
,[Position]
,[ChannelTypes]
,[Reprogramable]
,[Reconfigurable]
,[IsModule]
,isnull([PositionOnDistributor], 0) as [PositionOnDistributor]
,isnull([PositionOnChain], 0) as [PositionOnChain]
,isnull([Port],0) as [Port]
,isnull([ParentDAS], space(0)) as [ParentDAS],
[FirstUseDate],
[TestId],
[GroupId],
[StandIn],
[MaxAAFRate]
FROM [dbo].[DAS] where
(@SerialNumber is null or DASId = dbo.foo_IdGetDAS(@SerialNumber))
and
Position = case when @position is null then space(0) else @position end
and
Type!=58
and
Type!=59
and
Type!=60
END

View File

@@ -0,0 +1,49 @@
ALTER PROCEDURE [dbo].[sp_DASGet_95]
@SerialNumber nvarchar(50) = null
,@position nvarchar(10) = null
AS
BEGIN
SET NOCOUNT ON;
SELECT [DASId]
,[SerialNumber]
,[Type]
,[MaxModules]
,[MaxMemory]
,[MaxSampleRate]
,[MinSampleRate]
,[FirmwareVersion]
,[CalDate]
,[ProtocolVersion]
,[LastModified]
,[LastModifiedBy]
,[Version]
,[LocalOnly]
,[LastUsed]
,[LastUsedBy]
,[Connection]
,[Channels]
,[Position]
,[ChannelTypes]
,[Reprogramable]
,[Reconfigurable]
,[IsModule]
,isnull([PositionOnDistributor], 0) as [PositionOnDistributor]
,isnull([PositionOnChain], 0) as [PositionOnChain]
,isnull([Port],0) as [Port]
,isnull([ParentDAS], space(0)) as [ParentDAS],
[FirstUseDate],
[TestId],
[GroupId],
[StandIn],
[MaxAAFRate]
FROM [dbo].[DAS] where
(@SerialNumber is null or DASId = dbo.foo_IdGetDAS(@SerialNumber))
and
Position = case when @position is null then space(0) else @position end
and
Type!=59
and
Type!=60
END

View File

@@ -0,0 +1,47 @@
ALTER PROCEDURE [dbo].[sp_DASGet_99]
@SerialNumber nvarchar(50) = null
,@position nvarchar(10) = null
AS
BEGIN
SET NOCOUNT ON;
SELECT [DASId]
,[SerialNumber]
,[Type]
,[MaxModules]
,[MaxMemory]
,[MaxSampleRate]
,[MinSampleRate]
,[FirmwareVersion]
,[CalDate]
,[ProtocolVersion]
,[LastModified]
,[LastModifiedBy]
,[Version]
,[LocalOnly]
,[LastUsed]
,[LastUsedBy]
,[Connection]
,[Channels]
,[Position]
,[ChannelTypes]
,[Reprogramable]
,[Reconfigurable]
,[IsModule]
,isnull([PositionOnDistributor], 0) as [PositionOnDistributor]
,isnull([PositionOnChain], 0) as [PositionOnChain]
,isnull([Port],0) as [Port]
,isnull([ParentDAS], space(0)) as [ParentDAS],
[FirstUseDate],
[TestId],
[GroupId],
[StandIn],
[MaxAAFRate]
FROM [dbo].[DAS] where
(@SerialNumber is null or DASId = dbo.foo_IdGetDAS(@SerialNumber))
and
Position = case when @position is null then space(0) else @position end
and
Type!=60
END

View File

@@ -0,0 +1,17 @@
CREATE TABLE [dbo].[SensorsCAN](
[Id] [int] IDENTITY(1,1) NOT NULL,
[SensorId] [int] NOT NULL,
[IsFD] bit NOT NULL,
[ArbBaseBitrate] int NOT NULL,
[ArbBaseSJW] int NOT NULL,
[DataBitrate] int NOT NULL,
[DataSJW] int NOT NULL,
[FileType] [nvarchar](max) NOT NULL,
[LastModified] [datetime] NOT NULL,
[LastModifiedBy] [nvarchar](50) NOT NULL,
[UserTags] [varbinary](max) NOT NULL,
[DoNotUse] [bit] NULL,
[Broken] [bit] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
INSERT INTO SensorsCAN VALUES((SELECT id FROM Sensors WHERE SerialNumber = 'TSF_TestSpecific'), 1, 1000000, 8, 8000000, 1, 'asc', '20251202', 'System', 0x, 0, 0)

View File

@@ -0,0 +1,22 @@
CREATE PROCEDURE [dbo].[sp_ChannelSettingsGet_100]
@Id int = NULL,
@SettingName NVARCHAR (255) = NULL
AS
BEGIN
SET NOCOUNT ON;
IF (@Id IS NOT NULL) OR (@SettingName IS NOT NULL)
BEGIN
IF (@Id IS NULL)
BEGIN
SELECT [Id], [DefaultValue] FROM [dbo].[ChannelSettings] where (SettingName = @SettingName)
END
ELSE
BEGIN
SELECT [SettingName] FROM [dbo].[ChannelSettings] where (Id = @Id)
END
END
ELSE
BEGIN
SELECT [Id], [SettingName], [DefaultValue] FROM [dbo].[ChannelSettings]
END
END

View File

@@ -0,0 +1,23 @@
CREATE PROCEDURE [dbo].[sp_SensorsCANGet]
@Id INT = null,
@SerialNumber NVARCHAR (50) = null
AS
BEGIN
SET NOCOUNT ON;
IF( @Id IS NULL)
BEGIN
IF NULLIF(@SerialNumber, '') IS NULL
BEGIN
SELECT A.id, A.SerialNumber, B.IsFD, B.ArbBaseBitrate, B.ArbBaseSJW, B.DataBitrate, B.DataSJW, B.FileType, B.LastModified, B.LastModifiedBy, B.UserTags, B.Broken, B.DoNotUse FROM [dbo].[Sensors] AS A INNER JOIN [dbo].[SensorsCAN] AS B ON A.id=B.SensorId INNER JOIN [dbo].SensorsType AS C ON A.SensorType=C.TypeId WHERE C.SensorType='CAN'
END
ELSE
BEGIN
SELECT A.id, A.SerialNumber, B.IsFD, B.ArbBaseBitrate, B.ArbBaseSJW, B.DataBitrate, B.DataSJW, B.FileType, B.LastModified, B.LastModifiedBy, B.UserTags, B.Broken, B.DoNotUse FROM [dbo].[Sensors] AS A INNER JOIN [dbo].[SensorsCAN] AS B ON A.id=B.SensorId INNER JOIN [dbo].SensorsType AS C ON A.SensorType=C.TypeId WHERE C.SensorType='CAN' AND A.SerialNumber=@SerialNumber
END
END
ELSE
BEGIN
SELECT A.id, A.SerialNumber, B.IsFD, B.ArbBaseBitrate, B.ArbBaseSJW, B.DataBitrate, B.DataSJW, B.FileType, B.LastModified, B.LastModifiedBy, B.UserTags, B.Broken, B.DoNotUse FROM [dbo].[Sensors] AS A INNER JOIN [dbo].[SensorsCAN] AS B ON A.id=B.SensorId INNER JOIN [dbo].SensorsType AS C ON A.SensorType=C.TypeId WHERE C.SensorType='CAN' AND A.id=@Id
END
END

View File

@@ -0,0 +1,6 @@
INSERT INTO[dbo].[ChannelSettings] ([SettingName], [DefaultValue]) VALUES('CanIsFD', 1);
INSERT INTO[dbo].[ChannelSettings] ([SettingName], [DefaultValue]) VALUES('CanArbBaseBitrate', 1000000);
INSERT INTO[dbo].[ChannelSettings] ([SettingName], [DefaultValue]) VALUES('CanArbBaseSJW', 8);
INSERT INTO[dbo].[ChannelSettings] ([SettingName], [DefaultValue]) VALUES('CanDataBitrate', 8000000);
INSERT INTO[dbo].[ChannelSettings] ([SettingName], [DefaultValue]) VALUES('CanDataSJW', 1);
INSERT INTO[dbo].[ChannelSettings] ([SettingName], [DefaultValue]) VALUES('CanFileType', 'asc');

View File

@@ -0,0 +1 @@
INSERT INTO [dbo].[DAS] VALUES ('SLICE PRO CAN FD Prototype',60,4,1360003054,4294967295,0,'00A0','2025-11-24 00:00:00.000',1,'2025-11-24 00:00:00.000','DATAPRO_SYSTEM',1,0,'2022-06-28 00:00:00.000','','',4,'Prototype','7,7,7,7',0,0,0,0,0,0,'',NULL,NULL,NULL,NULL,50000)

View File

@@ -0,0 +1,20 @@
--Module 1
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
VALUES
((SELECT DASId FROM [dbo].[DAS] WHERE SerialNumber = 'SLICE PRO CAN FD Prototype'), 0, 8, 50, -1, 0, 0, 0, 0, '', 0)
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
VALUES
((SELECT DASId FROM [dbo].[DAS] WHERE SerialNumber = 'SLICE PRO CAN FD Prototype'), 1, 8, 50, -1, 0, 0, 0, 0, '', 0)
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
VALUES
((SELECT DASId FROM [dbo].[DAS] WHERE SerialNumber = 'SLICE PRO CAN FD Prototype'), 2, 8, 50, -1, 0, 0, 0, 0, '', 0)
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
VALUES
((SELECT DASId FROM [dbo].[DAS] WHERE SerialNumber = 'SLICE PRO CAN FD Prototype'), 3, 8, 50, -1, 0, 0, 0, 0, '', 0)

View File

@@ -0,0 +1,2 @@
INSERT INTO [StoredProcedureVersions] ([StoredProcedure], [Version]) VALUES ('sp_DASGet', 100)
INSERT INTO [StoredProcedureVersions] ([StoredProcedure], [Version]) VALUES ('sp_ChannelSettingsGet', 100)

View File

@@ -0,0 +1,20 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInGet]
@SerialNumber nvarchar(50) = null,
@Id nvarchar(50) = null
AS
BEGIN
SET NOCOUNT ON;
SELECT [SerialNumber] as 'SettingName'
,[SettingMode]
,[ScaleMultiplier]
,[LastModified]
,[LastModifiedBy]
,[eId]
,[UserValue1]
,[UserValue2]
,[UserValue3]
,[UserTags]
,[MeasurementUnit]
FROM [dbo].[SensorsDigitalIn] where (@SerialNumber is null or SerialNumber = @SerialNumber ) AND (@Id is null or eId = @Id)
END

View File

@@ -0,0 +1,65 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInInsert]
@SerialNumber nvarchar(50)
,@SettingMode int
,@ScaleMultiplier nvarchar(50)
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@eId nvarchar(50)
,@UserValue1 nvarchar(255)
,@UserValue2 nvarchar(255)
,@UserValue3 nvarchar(255)
,@UserTags varbinary(max)
,@MeasurementUnit nvarchar(50)
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
if(@SerialNumber is null)
begin
set @errorNumber = 15600
set @errorMessage = 'An invalid parameter or option was specified for procedure'
end
else
begin
if(exists(select SerialNumber from v_SensorSerialNumber where SerialNumber = @SerialNumber))
begin
set @errorMessage = 'The sensor serial mumber - ' + ltrim(rtrim(@SerialNumber)) + ' is not unique';
set @errorNumber = -1
end
else
begin
INSERT INTO [dbo].[SensorsDigitalIn]
([SerialNumber]
,[SettingMode]
,[ScaleMultiplier]
,[LastModified]
,[LastModifiedBy]
,[eId]
,[UserValue1]
,[UserValue2]
,[UserValue3]
,[UserTags]
,[MeasurementUnit])
VALUES
(@SerialNumber
,@SettingMode
,@ScaleMultiplier
,@LastModified
,@LastModifiedBy
,isnull(@eId, space(0))
,@UserValue1
,@UserValue2
,@UserValue3
,@UserTags
,@MeasurementUnit)
set @new_id = scope_identity();
exec dbo.sp_SensorInsert @new_id, 1 /* see table dbo.SensorsType */
end
end
end

View File

@@ -0,0 +1,33 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInUpdate]
@SerialNumber nvarchar(50)
,@SettingMode int
,@ScaleMultiplier nvarchar(50)
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@eId nvarchar(50)
,@UserValue1 nvarchar(255)
,@UserValue2 nvarchar(255)
,@UserValue3 nvarchar(255)
,@UserTags varbinary(max)
,@MeasurementUnit nvarchar(50)
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
UPDATE [dbo].[SensorsDigitalIn]
SET [SettingMode] = @SettingMode
,[ScaleMultiplier] = @ScaleMultiplier
,[LastModified] = @LastModified
,[LastModifiedBy] = @LastModifiedBy
,[eId] = @eId
,[UserValue1] = @UserValue1
,[UserValue2] = @UserValue2
,[UserValue3] = @UserValue3
,[UserTags] = @UserTags
,[MeasurementUnit] = @MeasurementUnit
where SerialNumber = @SerialNumber
END

View File

@@ -0,0 +1,100 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInUpdateAll]
@sensors xml = null
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
if(@sensors is null)
begin
RAISERROR(15600,-1,-1, '[sp_SensorsDigitalInUpdateAll]') /* Error 1560 - An invalid parameter or option was specified for procedure*/
end
else
begin
SET NOCOUNT ON;
declare @SensorsDigitalIn Table(
[Id] [int] IDENTITY(1,1) NOT NULL,
[SerialNumber] [nvarchar](50) NOT NULL,
[SettingMode] [int] NOT NULL,
[ScaleMultiplier] [nvarchar](50) NOT NULL,
[LastModified] [datetime] NOT NULL,
[LastModifiedBy] [nvarchar](50) NOT NULL,
[eId] [nvarchar](50) NOT NULL,
[UserValue1] [nvarchar](255) NULL,
[UserValue2] [nvarchar](255) NULL,
[UserValue3] [nvarchar](255) NULL,
[UserTags] [varbinary](max) NULL,
[MeasurementUnit] [nvarchar](50) NOT NULL,
[Exist] [bit] DEFAULT ((0))
)
declare @exist bit
set @exist =(select @sensors.exist('/DigitalIn/Sensor'))
if(@exist = 1)
begin
insert into @SensorsDigitalIn select
t.x.value('@SerialNumber','nvarchar(50)')
, t.x.value('@SettingMode','int')
, t.x.value('@ScaleMultiplier','nvarchar(50)')
, t.x.value('@LastModified','datetime')
, t.x.value('@LastModifiedBy','nvarchar(50)')
, t.x.value('@eId','varchar(50)')
, t.x.value('@UserValue1','nvarchar(50)')
, t.x.value('@UserValue2','nvarchar(50)')
, t.x.value('@UserValue3','nvarchar(50)')
, t.x.value('@UserTags','varbinary(max)')
, t.x.value('@MeasurementUnit','nvarchar(50)')
, 0
from @sensors.nodes('/DigitalIn/Sensor') t(x)
OPTION (OPTIMIZE FOR ( @sensors = NULL ))
declare @count int
set @count = (select count(*) from @SensorsDigitalIn)
if(@count > 0)
begin
update @SensorsDigitalIn set Exist = case when EXISTS(select SerialNumber from v_SensorSerialNumber where SensorType = 2) then 1 else 0 end
update [dbo].[SensorsDigitalIn] SET
[SettingMode] = s.SettingMode
,[ScaleMultiplier] = s.ScaleMultiplier
,[LastModified] = s.LastModified
,[LastModifiedBy] = s.LastModifiedBy
,[eId] = s.eId
,[UserValue1] = s.UserValue1
,[UserValue2] = s.UserValue2
,[UserValue3] = s.UserValue3
,[UserTags] = s.UserTags
,[MeasurementUnit] = s.MeasurementUnit
from @SensorsDigitalIn s where [dbo].[SensorsDigitalIn].[SerialNumber] = s.SerialNumber
insert into [dbo].[SensorsDigitalIn]
([SerialNumber]
,[SettingMode]
,[ScaleMultiplier]
,[LastModified]
,[LastModifiedBy]
,[eId]
,[UserValue1]
,[UserValue2]
,[UserValue3]
,[UserTags]
,[MeasurementUnit])
select
[SerialNumber]
,[SettingMode]
,[ScaleMultiplier]
,[LastModified]
,[LastModifiedBy]
,[eId]
,[UserValue1]
,[UserValue2]
,[UserValue3]
,[UserTags]
,[MeasurementUnit]
from @SensorsDigitalIn where Exist = 0
end
end
end
END

View File

@@ -0,0 +1,70 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInUpdateInsert]
@SerialNumber nvarchar(50)
,@SettingMode int
,@ScaleMultiplier nvarchar(50)
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@eId nvarchar(50)
,@UserValue1 nvarchar(255)
,@UserValue2 nvarchar(255)
,@UserValue3 nvarchar(255)
,@UserTags varbinary(max)
,@MeasurementUnit nvarchar(50)
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
if(@SerialNumber is null)
begin
set @errorNumber = 1560
set @errorMessage = 'An invalid parameter or option was specified for procedure'
end
else
begin
if(exists(select SerialNumber from v_SensorSerialNumber where SerialNumber = @SerialNumber and SensorType != 1))
begin
set @errorNumber = -1
set @errorMessage = 'The sensor serial mumber - ' + ltrim(rtrim(@SerialNumber)) + ' is not unique';
end
else
begin
if(exists(select * from v_SensorSerialNumber where SerialNumber = @SerialNumber and SensorType = 1))
begin
set @new_id = 0
exec dbo.sp_SensorsDigitalInUpdate @SerialNumber
,@SettingMode
,@ScaleMultiplier
,@LastModified
,@LastModifiedBy
,@eId
,@UserValue1
,@UserValue2
,@UserValue3
,@UserTags
,@MeasurementUnit
,@errorNumber output
,@errorMessage output
end
else
begin
exec dbo.sp_SensorsDigitalInInsert @SerialNumber
,@SettingMode
,@ScaleMultiplier
,@LastModified
,@LastModifiedBy
,@eId
,@UserValue1
,@UserValue2
,@UserValue3
,@UserTags
,@MeasurementUnit
,@new_id output
,@errorNumber output
,@errorMessage output
end
end
end
END

View File

@@ -0,0 +1,20 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInGet]
@SerialNumber nvarchar(50) = null,
@Id nvarchar(50) = null
AS
BEGIN
SET NOCOUNT ON;
SELECT [SerialNumber] as 'SettingName'
,[SettingMode]
,[ScaleMultiplier]
,[LastModified]
,[LastModifiedBy]
,[eId]
,[UserValue1]
,[UserValue2]
,[UserValue3]
,[UserTags]
,[MeasurementUnit]
FROM [dbo].[SensorsDigitalIn] where (@SerialNumber is null or SerialNumber = @SerialNumber ) AND (@Id is null or eId = @Id)
END

View File

@@ -0,0 +1,65 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInInsert]
@SerialNumber nvarchar(50)
,@SettingMode int
,@ScaleMultiplier nvarchar(50)
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@eId nvarchar(50)
,@UserValue1 nvarchar(255)
,@UserValue2 nvarchar(255)
,@UserValue3 nvarchar(255)
,@UserTags varbinary(max)
,@MeasurementUnit nvarchar(50)
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
if(@SerialNumber is null)
begin
set @errorNumber = 15600
set @errorMessage = 'An invalid parameter or option was specified for procedure'
end
else
begin
if(exists(select SerialNumber from v_SensorSerialNumber where SerialNumber = @SerialNumber))
begin
set @errorMessage = 'The sensor serial mumber - ' + ltrim(rtrim(@SerialNumber)) + ' is not unique';
set @errorNumber = -1
end
else
begin
INSERT INTO [dbo].[SensorsDigitalIn]
([SerialNumber]
,[SettingMode]
,[ScaleMultiplier]
,[LastModified]
,[LastModifiedBy]
,[eId]
,[UserValue1]
,[UserValue2]
,[UserValue3]
,[UserTags]
,[MeasurementUnit])
VALUES
(@SerialNumber
,@SettingMode
,@ScaleMultiplier
,@LastModified
,@LastModifiedBy
,isnull(@eId, space(0))
,@UserValue1
,@UserValue2
,@UserValue3
,@UserTags
,@MeasurementUnit)
set @new_id = scope_identity();
exec dbo.sp_SensorInsert @new_id, 1 /* see table dbo.SensorsType */
end
end
end

View File

@@ -0,0 +1,33 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInUpdate]
@SerialNumber nvarchar(50)
,@SettingMode int
,@ScaleMultiplier nvarchar(50)
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@eId nvarchar(50)
,@UserValue1 nvarchar(255)
,@UserValue2 nvarchar(255)
,@UserValue3 nvarchar(255)
,@UserTags varbinary(max)
,@MeasurementUnit nvarchar(50)
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
UPDATE [dbo].[SensorsDigitalIn]
SET [SettingMode] = @SettingMode
,[ScaleMultiplier] = @ScaleMultiplier
,[LastModified] = @LastModified
,[LastModifiedBy] = @LastModifiedBy
,[eId] = @eId
,[UserValue1] = @UserValue1
,[UserValue2] = @UserValue2
,[UserValue3] = @UserValue3
,[UserTags] = @UserTags
,[MeasurementUnit] = @MeasurementUnit
where SerialNumber = @SerialNumber
END

View File

@@ -0,0 +1,100 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInUpdateAll]
@sensors xml = null
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
if(@sensors is null)
begin
RAISERROR(15600,-1,-1, '[sp_SensorsDigitalInUpdateAll]') /* Error 1560 - An invalid parameter or option was specified for procedure*/
end
else
begin
SET NOCOUNT ON;
declare @SensorsDigitalIn Table(
[Id] [int] IDENTITY(1,1) NOT NULL,
[SerialNumber] [nvarchar](50) NOT NULL,
[SettingMode] [int] NOT NULL,
[ScaleMultiplier] [nvarchar](50) NOT NULL,
[LastModified] [datetime] NOT NULL,
[LastModifiedBy] [nvarchar](50) NOT NULL,
[eId] [nvarchar](50) NOT NULL,
[UserValue1] [nvarchar](255) NULL,
[UserValue2] [nvarchar](255) NULL,
[UserValue3] [nvarchar](255) NULL,
[UserTags] [varbinary](max) NULL,
[MeasurementUnit] [nvarchar](50) NOT NULL,
[Exist] [bit] DEFAULT ((0))
)
declare @exist bit
set @exist =(select @sensors.exist('/DigitalIn/Sensor'))
if(@exist = 1)
begin
insert into @SensorsDigitalIn select
t.x.value('@SerialNumber','nvarchar(50)')
, t.x.value('@SettingMode','int')
, t.x.value('@ScaleMultiplier','nvarchar(50)')
, t.x.value('@LastModified','datetime')
, t.x.value('@LastModifiedBy','nvarchar(50)')
, t.x.value('@eId','varchar(50)')
, t.x.value('@UserValue1','nvarchar(50)')
, t.x.value('@UserValue2','nvarchar(50)')
, t.x.value('@UserValue3','nvarchar(50)')
, t.x.value('@UserTags','varbinary(max)')
, t.x.value('@MeasurementUnit','nvarchar(50)')
, 0
from @sensors.nodes('/DigitalIn/Sensor') t(x)
OPTION (OPTIMIZE FOR ( @sensors = NULL ))
declare @count int
set @count = (select count(*) from @SensorsDigitalIn)
if(@count > 0)
begin
update @SensorsDigitalIn set Exist = case when EXISTS(select SerialNumber from v_SensorSerialNumber where SensorType = 2) then 1 else 0 end
update [dbo].[SensorsDigitalIn] SET
[SettingMode] = s.SettingMode
,[ScaleMultiplier] = s.ScaleMultiplier
,[LastModified] = s.LastModified
,[LastModifiedBy] = s.LastModifiedBy
,[eId] = s.eId
,[UserValue1] = s.UserValue1
,[UserValue2] = s.UserValue2
,[UserValue3] = s.UserValue3
,[UserTags] = s.UserTags
,[MeasurementUnit] = s.MeasurementUnit
from @SensorsDigitalIn s where [dbo].[SensorsDigitalIn].[SerialNumber] = s.SerialNumber
insert into [dbo].[SensorsDigitalIn]
([SerialNumber]
,[SettingMode]
,[ScaleMultiplier]
,[LastModified]
,[LastModifiedBy]
,[eId]
,[UserValue1]
,[UserValue2]
,[UserValue3]
,[UserTags]
,[MeasurementUnit])
select
[SerialNumber]
,[SettingMode]
,[ScaleMultiplier]
,[LastModified]
,[LastModifiedBy]
,[eId]
,[UserValue1]
,[UserValue2]
,[UserValue3]
,[UserTags]
,[MeasurementUnit]
from @SensorsDigitalIn where Exist = 0
end
end
end
END

View File

@@ -0,0 +1,70 @@
ALTER PROCEDURE [dbo].[sp_SensorsDigitalInUpdateInsert]
@SerialNumber nvarchar(50)
,@SettingMode int
,@ScaleMultiplier nvarchar(50)
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@eId nvarchar(50)
,@UserValue1 nvarchar(255)
,@UserValue2 nvarchar(255)
,@UserValue3 nvarchar(255)
,@UserTags varbinary(max)
,@MeasurementUnit nvarchar(50)
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
if(@SerialNumber is null)
begin
set @errorNumber = 1560
set @errorMessage = 'An invalid parameter or option was specified for procedure'
end
else
begin
if(exists(select SerialNumber from v_SensorSerialNumber where SerialNumber = @SerialNumber and SensorType != 1))
begin
set @errorNumber = -1
set @errorMessage = 'The sensor serial mumber - ' + ltrim(rtrim(@SerialNumber)) + ' is not unique';
end
else
begin
if(exists(select * from v_SensorSerialNumber where SerialNumber = @SerialNumber and SensorType = 1))
begin
set @new_id = 0
exec dbo.sp_SensorsDigitalInUpdate @SerialNumber
,@SettingMode
,@ScaleMultiplier
,@LastModified
,@LastModifiedBy
,@eId
,@UserValue1
,@UserValue2
,@UserValue3
,@UserTags
,@MeasurementUnit
,@errorNumber output
,@errorMessage output
end
else
begin
exec dbo.sp_SensorsDigitalInInsert @SerialNumber
,@SettingMode
,@ScaleMultiplier
,@LastModified
,@LastModifiedBy
,@eId
,@UserValue1
,@UserValue2
,@UserValue3
,@UserTags
,@MeasurementUnit
,@new_id output
,@errorNumber output
,@errorMessage output
end
end
end
END

View File

@@ -0,0 +1,81 @@
ALTER PROCEDURE [sp_TestSetupLockUpdate]
@UserId int = null
,@UserName nvarchar(50) = null
,@TestSetupId int = null
,@TestSetupName nvarchar(50) = null
,@MachineName nvarchar(50)
,@errorNumber int output
,@errorMessage nvarchar(250) output
,@LockingUser nvarchar(50) output
,@LockingMachine nvarchar(50) output
,@LastUsedTime datetime output
,@LockCreateTime datetime output
AS
BEGIN
SET @errorNumber = 0
SET @errorMessage = space(0)
SET @LockingUser = space(0)
SET @LockingMachine = space(0)
SET @LastUsedTime = null
SET @LockCreateTime = null
DECLARE @CategoryId INT
IF NOT EXISTS( SELECT CategoryId FROM LockedItemCategories WHERE CategoryText='TestSetups')
BEGIN
INSERT INTO LockedItemCategories (CategoryText) VALUES ('TestSetups')
SET @CategoryId = SCOPE_IDENTITY()
SET @errorNumber = 3
SET @errorMessage = 'No lock to update'
return -1
END
ELSE
BEGIN
SELECT @CategoryId = CategoryId from LockedItemCategories WHERE CategoryText='TestSetups'
END
IF (@TestSetupId) IS NULL
BEGIN
IF NOT EXISTS( SELECT TestSetupId from TestSetups WHERE TestSetupName=@TestSetupName)
BEGIN
SET @errorNumber = 1
SET @errorMessage = 'TestSetup not found'
return -1
END
ELSE
BEGIN
SELECT @TestSetupId = TestSetupId from TestSetups where TestSetupName=@TestSetupName
END
END
IF(@UserId) IS NULL
BEGIN
IF NOT EXISTS( SELECT ID FROM Users WHERE UserName=@UserName)
BEGIN
SET @errorNumber = 2
SET @errorMessage = 'User not found'
return -1
END
END
IF NOT EXISTS( SELECT LockId FROM LockedItems WHERE CategoryId=@CategoryId AND ItemId=@TestSetupId AND DataPROUserID=@UserId AND MachineName=@MachineName)
BEGIN
IF EXISTS( SELECT LockId FROM LockedItems WHERE CategoryId=@CategoryId AND ItemId=@TestSetupId)
BEGIN
SET @errorNumber = 4
SET @errorMessage = 'Locked by another user'
SELECT @LockingUser = B.UserName, @LockingMachine=A.MachineName, @LastUsedTime=A.LastTouch, @LockCreateTime=A.StartTime FROM LockedItems as A INNER JOIN Users as B on A.DataPROUserID=B.ID WHERE A.CategoryId=@CategoryId AND A.ItemId=@TestSetupId
END
ELSE
BEGIN
SET @errorNumber = 3
SET @errorMessage = 'No lock to update'
return -1
END
END
ELSE
BEGIN
DECLARE @UpdateTime DateTime
SET @UpdateTime = GetDate()
UPDATE LockedItems Set LastTouch=@UpdateTime WHERE CategoryId=@CategoryId AND ItemId=@TestSetupId AND DataPROUserID=@UserId
END
END

View File

@@ -0,0 +1,233 @@
ALTER PROCEDURE [dbo].[sp_DBImportSensorModel]
@SensorModel xml
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorMessage = space(0)
set @errorNumber = 0
declare @tSensorModel table
([recId] [int] IDENTITY(1,1),
[Model] [nvarchar](50) NOT NULL,
[Manufacturer] [nvarchar](50) NOT NULL,
[UserPartNumber] [nvarchar](50) NOT NULL,
[Capacity] [float] NOT NULL,
[OffsetToleranceLow] [float] NOT NULL,
[OffsetToleranceHigh] [float] NOT NULL,
[MeasurementUnit] [nvarchar](50) NOT NULL,
[Bridge] [smallint] NOT NULL,
[Shunt] [smallint] NOT NULL,
[BridgeResistance] [float] NOT NULL,
[FilterClass] [nvarchar](50) NOT NULL,
[UniPolar] [bit] NOT NULL,
[IgnoreRange] [bit] NOT NULL,
[CouplingMode] [smallint] NOT NULL,
[Version] [int] NOT NULL,
[RangeLow] [float] NOT NULL,
[RangeAve] [float] NOT NULL,
[RangeHigh] [float] NOT NULL,
[LastModified] [datetime] NOT NULL,
[ModifiedBy] [nvarchar](50) NOT NULL,
[LocalOnly] [bit] NOT NULL,
[NumberOfAxes] [smallint] NOT NULL,
[CalInterval] [int] NOT NULL,
[AxisNumber] [smallint] NOT NULL,
[Polarity] [nvarchar](10) NOT NULL,
[Invert] [bit] NOT NULL,
[CheckOffset] [bit] NOT NULL,
[CalibrationRecord] [nvarchar](MAX) NOT NULL,
[ISOCode] [nvarchar](20) NOT NULL,
[SupportedExcitation] [nvarchar](255) NOT NULL,
[InitialEU] [float] NULL,
[Processed] [bit])
insert into @tSensorModel
([Model]
,[Manufacturer]
,[UserPartNumber]
,[Capacity]
,[OffsetToleranceLow]
,[OffsetToleranceHigh]
,[MeasurementUnit]
,[Bridge]
,[Shunt]
,[BridgeResistance]
,[FilterClass]
,[UniPolar]
,[IgnoreRange]
,[CouplingMode]
,[Version]
,[RangeLow]
,[RangeAve]
,[RangeHigh]
,[LastModified]
,[ModifiedBy]
,[LocalOnly]
,[NumberOfAxes]
,[CalInterval]
,[AxisNumber]
,[Polarity]
,[Invert]
,[CheckOffset]
,[CalibrationRecord]
,[ISOCode]
,[SupportedExcitation]
,[InitialEU]
,[Processed])
select
t.x.value('Model[1]', 'nvarchar(50)')
, t.x.value('Manufacturer[1]', 'nvarchar(50)')
, t.x.value('UserPartNumber[1]', 'nvarchar(50)')
, t.x.value('Capacity[1]', 'float')
, t.x.value('OffsetToleranceLow[1]', 'float')
, t.x.value('OffsetToleranceHigh[1]', 'float')
, t.x.value('MeasurementUnit[1]', 'nvarchar(50)')
, dbo.foo_BridgeTypeConverterToInt(t.x.value('Bridge[1]', 'varchar(50)'))
, dbo.foo_ShuntConverterToInt(t.x.value('Shunt[1]', 'varchar(50)'))
, t.x.value('BridgeResistance[1]', 'float')
, t.x.value('FilterClass[1]', 'nvarchar(50)')
, t.x.value('UniPolar[1]', 'bit')
, t.x.value('IgnoreRange[1]', 'bit')
, dbo.foo_CouplingModeConverterToInt(t.x.value('CouplingMode[1]', 'varchar(50)'))
, t.x.value('Version[1]', 'int')
, t.x.value('RangeLow[1]', 'float')
, t.x.value('RangeAve[1]', 'float')
, t.x.value('RangeHigh[1]', 'float')
, t.x.value('LastModified[1]', 'datetime')
, t.x.value('ModifiedBy[1]', 'nvarchar(50)')
, t.x.value('LocalOnly[1]', 'bit')
, t.x.value('NumberOfAxes[1]', 'smallint')
, t.x.value('CalInterval[1]', 'int')
, t.x.value('AxisNumber[1]', 'smallint')
, t.x.value('Polarity[1]', 'nvarchar(10)')
, t.x.value('Invert[1]', 'bit')
, t.x.value('CheckOffset[1]', 'bit')
, t.x.value('CalibrationRecord[1]', 'nvarchar(max)')
, t.x.value('ISOCode[1]', 'nvarchar(20)')
, t.x.value('SupportedExcitation[1]', 'nvarchar(255)')
, 0 /* InitialEU */
, 0 /* Processed */
from @SensorModel.nodes('/SensorModels/SensorModel') t(x)
while (Select Count(*) From @tSensorModel Where Processed = 0) > 0
Begin
begin try
begin transaction tSensorModel
declare @recId int
declare @SensorModelId int
,@Model nvarchar(50)
,@Manufacturer nvarchar(50)
,@UserPartNumber nvarchar(50)
,@Capacity float
,@OffsetToleranceLow float
,@OffsetToleranceHigh float
,@MeasurementUnit nvarchar(50)
,@Bridge smallint
,@Shunt smallint
,@BridgeResistance float
,@FilterClass nvarchar(50)
,@UniPolar bit
,@IgnoreRange bit
,@CouplingMode smallint
,@Version int
,@RangeLow float
,@RangeAve float
,@RangeHigh float
,@LastModified datetime
,@ModifiedBy nvarchar(50)
,@LocalOnly bit
,@NumberOfAxes smallint
,@CalInterval int
,@AxisNumber smallint
,@Polarity nvarchar(10)
,@Invert bit
,@CheckOffset bit
,@CalibrationRecord nvarchar(MAX)
,@ISOCode nvarchar(20)
,@SupportedExcitation nvarchar(255)
,@InitialEU float
select top 1
@recId = recId
, @Model = [Model]
, @Manufacturer = [Manufacturer]
, @UserPartNumber = [UserPartNumber]
, @Capacity = [Capacity]
, @OffsetToleranceLow = [OffsetToleranceLow]
, @OffsetToleranceHigh = [OffsetToleranceHigh]
, @MeasurementUnit = [MeasurementUnit]
, @Bridge = [Bridge]
, @Shunt = [Shunt]
, @BridgeResistance = [BridgeResistance]
, @FilterClass = [FilterClass]
, @UniPolar = [UniPolar]
, @IgnoreRange = [IgnoreRange]
, @CouplingMode = [CouplingMode]
, @Version = [Version]
, @RangeLow = [RangeLow]
, @RangeAve = [RangeAve]
, @RangeHigh = [RangeHigh]
, @LastModified = [LastModified]
, @ModifiedBy = [ModifiedBy]
, @LocalOnly = [LocalOnly]
, @NumberOfAxes = [NumberOfAxes]
, @CalInterval = [CalInterval]
, @AxisNumber = [AxisNumber]
, @Polarity = [Polarity]
, @Invert = [Invert]
, @CheckOffset = [CheckOffset]
, @CalibrationRecord = [CalibrationRecord]
, @ISOCode = [ISOCode]
, @SupportedExcitation = [SupportedExcitation]
, @InitialEU = [InitialEU]
from @tSensorModel where [Processed] = 0
exec [dbo].[sp_SensorModelsUpdateInsert] @Model
, @Manufacturer
, @UserPartNumber
, @Capacity
, @OffsetToleranceLow
, @OffsetToleranceHigh
, @MeasurementUnit
, @Bridge
, @Shunt
, @BridgeResistance
, @FilterClass
, @UniPolar
, @IgnoreRange
, @CouplingMode
, @Version
, @RangeLow
, @RangeAve
, @RangeHigh
, @LastModified
, @ModifiedBy
, @LocalOnly
, @NumberOfAxes
, @CalInterval
, @AxisNumber
, @Polarity
, @Invert
, @CheckOffset
, @CalibrationRecord
, @ISOCode
, @SupportedExcitation
, @InitialEU
, @SensorModelId output
, @errorNumber output
, @errorMessage output
update dbo.SensorsAnalog set SensorModelId = sm.SensorModelId from dbo.SensorModels sm where dbo.SensorsAnalog.Model = sm.Model
update @tSensorModel set Processed = 1 where recId = @recId
commit transaction tSensorModel
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
rollback transaction tSensorModel
end catch;
end
END

View File

@@ -0,0 +1,108 @@
ALTER PROCEDURE [dbo].[sp_SensorModelsInsert]
@Model nvarchar(50)
,@Manufacturer nvarchar(50)
,@UserPartNumber nvarchar(50)
,@Capacity float
,@OffsetToleranceLow float
,@OffsetToleranceHigh float
,@MeasurementUnit nvarchar(50)
,@Bridge smallint
,@Shunt smallint
,@BridgeResistance float
,@FilterClass nvarchar(50)
,@UniPolar bit
,@IgnoreRange bit
,@CouplingMode smallint
,@Version int
,@RangeLow float
,@RangeAve float
,@RangeHigh float
,@LastModified datetime
,@ModifiedBy nvarchar(50)
,@LocalOnly bit
,@NumberOfAxes smallint
,@CalInterval int
,@AxisNumber smallint
,@Polarity nvarchar(10)
,@Invert bit
,@CheckOffset bit
,@CalibrationRecord nvarchar(MAX)
,@ISOCode nvarchar(20)
,@SupportedExcitation nvarchar(255)
,@InitialEU float
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
INSERT INTO [dbo].[SensorModels]
([Model]
,[Manufacturer]
,[UserPartNumber]
,[Capacity]
,[OffsetToleranceLow]
,[OffsetToleranceHigh]
,[MeasurementUnit]
,[Bridge]
,[Shunt]
,[BridgeResistance]
,[FilterClass]
,[UniPolar]
,[IgnoreRange]
,[CouplingMode]
,[Version]
,[RangeLow]
,[RangeAve]
,[RangeHigh]
,[LastModified]
,[ModifiedBy]
,[LocalOnly]
,[NumberOfAxes]
,[CalInterval]
,[AxisNumber]
,[Polarity]
,[Invert]
,[CheckOffset]
,[CalibrationRecord]
,[ISOCode]
,[SupportedExcitation]
,[InitialEU])
VALUES
(@Model
,@Manufacturer
,@UserPartNumber
,@Capacity
,@OffsetToleranceLow
,@OffsetToleranceHigh
,@MeasurementUnit
,@Bridge
,@Shunt
,@BridgeResistance
,@FilterClass
,@UniPolar
,@IgnoreRange
,@CouplingMode
,@Version
,@RangeLow
,@RangeAve
,@RangeHigh
,@LastModified
,@ModifiedBy
,@LocalOnly
,@NumberOfAxes
,@CalInterval
,@AxisNumber
,@Polarity
,@Invert
,@CheckOffset
,@CalibrationRecord
,@ISOCode
,@SupportedExcitation
,@InitialEU)
set @new_id = scope_identity()
END

View File

@@ -0,0 +1,75 @@
ALTER PROCEDURE [dbo].[sp_SensorModelsUpdate]
@Model nvarchar(50)
,@Manufacturer nvarchar(50)
,@UserPartNumber nvarchar(50)
,@Capacity float
,@OffsetToleranceLow float
,@OffsetToleranceHigh float
,@MeasurementUnit nvarchar(50)
,@Bridge smallint
,@Shunt smallint
,@BridgeResistance float
,@FilterClass nvarchar(50)
,@UniPolar bit
,@IgnoreRange bit
,@CouplingMode smallint
,@Version int
,@RangeLow float
,@RangeAve float
,@RangeHigh float
,@LastModified datetime
,@ModifiedBy nvarchar(50)
,@LocalOnly bit
,@NumberOfAxes smallint
,@CalInterval int
,@AxisNumber smallint
,@Polarity nvarchar(10)
,@Invert bit
,@CheckOffset bit
,@CalibrationRecord nvarchar(MAX)
,@ISOCode nvarchar(20)
,@SupportedExcitation nvarchar(255)
,@InitialEU float
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
UPDATE [dbo].[SensorModels]
SET [Model] = @Model
,[Manufacturer] = @Manufacturer
,[UserPartNumber] = @UserPartNumber
,[Capacity] = @Capacity
,[OffsetToleranceLow] = @OffsetToleranceLow
,[OffsetToleranceHigh] = @OffsetToleranceHigh
,[MeasurementUnit] = @MeasurementUnit
,[Bridge] = @Bridge
,[Shunt] = @Shunt
,[BridgeResistance] = @BridgeResistance
,[FilterClass] = @FilterClass
,[UniPolar] = @UniPolar
,[IgnoreRange] = @IgnoreRange
,[CouplingMode] = @CouplingMode
,[Version] = @Version
,[RangeLow] = @RangeLow
,[RangeAve] = @RangeAve
,[RangeHigh] = @RangeHigh
,[LastModified] = @LastModified
,[ModifiedBy] = @ModifiedBy
,[LocalOnly] = @LocalOnly
,[NumberOfAxes] = @NumberOfAxes
,[CalInterval] = @CalInterval
,[AxisNumber] = @AxisNumber
,[Polarity] = @Polarity
,[Invert] = @Invert
,[CheckOffset] = @CheckOffset
,[CalibrationRecord] = @CalibrationRecord
,[ISOCode] = @ISOCode
,[SupportedExcitation] = @SupportedExcitation
,[InitialEU] = @InitialEU
WHERE [Model] = @Model
and [Manufacturer] = @Manufacturer
END

View File

@@ -0,0 +1,119 @@
ALTER PROCEDURE [dbo].[sp_SensorModelsUpdateInsert]
@Model nvarchar(50)
,@Manufacturer nvarchar(50)
,@UserPartNumber nvarchar(50)
,@Capacity float
,@OffsetToleranceLow float
,@OffsetToleranceHigh float
,@MeasurementUnit nvarchar(50)
,@Bridge smallint
,@Shunt smallint
,@BridgeResistance float
,@FilterClass nvarchar(50)
,@UniPolar bit
,@IgnoreRange bit
,@CouplingMode smallint
,@Version int
,@RangeLow float
,@RangeAve float
,@RangeHigh float
,@LastModified datetime
,@ModifiedBy nvarchar(50)
,@LocalOnly bit
,@NumberOfAxes smallint
,@CalInterval int
,@AxisNumber smallint
,@Polarity nvarchar(10)
,@Invert bit
,@CheckOffset bit
,@CalibrationRecord nvarchar(MAX)
,@ISOCode nvarchar(20)
,@SupportedExcitation nvarchar(255)
,@InitialEU float
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
declare @SensorModelId int
select @SensorModelId = isnull([SensorModelId], 0) from [dbo].[SensorModels] where Model = @Model and Manufacturer = @Manufacturer
if(@SensorModelId != 0)
begin
exec dbo.sp_SensorModelsUpdate @Model
,@Manufacturer
,@UserPartNumber
,@Capacity
,@OffsetToleranceLow
,@OffsetToleranceHigh
,@MeasurementUnit
,@Bridge
,@Shunt
,@BridgeResistance
,@FilterClass
,@UniPolar
,@IgnoreRange
,@CouplingMode
,@Version
,@RangeLow
,@RangeAve
,@RangeHigh
,@LastModified
,@ModifiedBy
,@LocalOnly
,@NumberOfAxes
,@CalInterval
,@AxisNumber
,@Polarity
,@Invert
,@CheckOffset
,@CalibrationRecord
,@ISOCode
,@SupportedExcitation
,@InitialEU
,@errorNumber output
,@errorMessage output
end
else
begin
exec dbo.sp_SensorModelsInsert @Model
,@Manufacturer
,@UserPartNumber
,@Capacity
,@OffsetToleranceLow
,@OffsetToleranceHigh
,@MeasurementUnit
,@Bridge
,@Shunt
,@BridgeResistance
,@FilterClass
,@UniPolar
,@IgnoreRange
,@CouplingMode
,@Version
,@RangeLow
,@RangeAve
,@RangeHigh
,@LastModified
,@ModifiedBy
,@LocalOnly
,@NumberOfAxes
,@CalInterval
,@AxisNumber
,@Polarity
,@Invert
,@CheckOffset
,@CalibrationRecord
,@ISOCode
,@SupportedExcitation
,@InitialEU
,@new_id output
,@errorNumber output
,@errorMessage output
end
END

View File

@@ -0,0 +1,44 @@
ALTER PROCEDURE [dbo].[sp_SensorCalibrationsDelete]
@Id int = null,
@SensorId int = null,
@SensorSerialNumber nvarchar(50) = null,
@CalibrationDate datetime = null,
@ModifiedDate datetime = null,
@errorNumber int output,
@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
if( @Id IS NULL )
BEGIN
IF( @SensorId IS NULL )
BEGIN
SELECT @SensorId = A.[id] from [dbo].[Sensors] AS A INNER JOIN [dbo].[SensorsType] AS B ON A.SensorType=B.TypeId WHERE A.[SerialNumber]=@SensorSerialNumber AND B.SensorType='Analog';
END
END
ELSE
BEGIN
SELECT @SensorId = [SensorId] FROM [dbo].[SensorCalibrations] WHERE [SensorCalibrationId]=@Id
END
declare @tSensorCalibrations table(SensorCalibrationId int)
declare @tSensorCalibrationRecords table(SensorCalibrationRecordId int)
insert into @tSensorCalibrations (SensorCalibrationId)
select SensorCalibrationId from [dbo].[SensorCalibrations]
where
(@SensorSerialNumber is null or SensorId = @SensorId)
and (@CalibrationDate is null or CalibrationDate = @CalibrationDate)
and (@ModifiedDate is null or ModifyDate = @ModifiedDate)
insert into @tSensorCalibrationRecords (SensorCalibrationRecordId) select SensorCalibrationRecordId from SensorCalibrationRecord where SensorCalibrationId in (select SensorCalibrationId from @tSensorCalibrations)
delete from [dbo].[SensorCalibrationRecordIRTracc] where SensorCalibrationRecordId in (select SensorCalibrationRecordId from @tSensorCalibrationRecords)
delete from [dbo].[SensorCalibrationRecordPolynomial] where SensorCalibrationRecordId in (select SensorCalibrationRecordId from @tSensorCalibrationRecords)
delete from [dbo].[SensorCalibrationRecord] where SensorCalibrationId in (select SensorCalibrationId from @tSensorCalibrations)
delete from [dbo].[SensorCalibrations] where SensorCalibrationId in (select SensorCalibrationId from @tSensorCalibrations)
END

View File

@@ -0,0 +1,43 @@
INSERT INTO [dbo].[ChannelSettings]([SettingName], [DefaultValue]) VALUES ('SquibLimitDuration', 'True');
INSERT INTO [dbo].[ChannelSettings]([SettingName], [DefaultValue]) VALUES ('SquibDuration', '10');
INSERT INTO [dbo].[ChannelSettings]([SettingName], [DefaultValue]) VALUES ('SquibDelay', '0');
INSERT INTO [dbo].[ChannelSettings]([SettingName], [DefaultValue]) VALUES ('DigitalOutLimitDuration', 'True');
INSERT INTO [dbo].[ChannelSettings]([SettingName], [DefaultValue]) VALUES ('DigitalOutDuration', '10');
INSERT INTO [dbo].[ChannelSettings]([SettingName], [DefaultValue]) VALUES ('DigitalOutDelay', '0');
INSERT INTO [dbo].[ChannelSettings]([SettingName], [DefaultValue]) VALUES ('SquibCurrent', '1.5');
UPDATE [dbo].[ChannelSettings] SET [DefaultValue]='2' WHERE [SettingName]='SQMode' AND [DefaultValue]='1';
INSERT INTO [dbo].[GroupChannelSettings] ( [ChannelId],[SettingId], [SettingValue] )
SELECT [dbo].[GroupChannelSettings].[ChannelId],13,[dbo].[GroupChannelSettings].[SettingValue]
FROM [dbo].[GroupChannelSettings]
WHERE [SettingId]=5;
INSERT INTO [dbo].[GroupChannelSettings] ( [ChannelId],[SettingId], [SettingValue] )
SELECT [dbo].[GroupChannelSettings].[ChannelId],14,[dbo].[GroupChannelSettings].[SettingValue]
FROM [dbo].[GroupChannelSettings]
WHERE [SettingId]=6;
INSERT INTO [dbo].[GroupChannelSettings] ( [ChannelId],[SettingId], [SettingValue] )
SELECT [dbo].[GroupChannelSettings].[ChannelId],15,[dbo].[GroupChannelSettings].[SettingValue]
FROM [dbo].[GroupChannelSettings]
WHERE [SettingId]=7;
INSERT INTO [dbo].[GroupChannelSettings] ( [ChannelId],[SettingId], [SettingValue] )
SELECT [dbo].[GroupChannelSettings].[ChannelId],16,[dbo].[GroupChannelSettings].[SettingValue]
FROM [dbo].[GroupChannelSettings]
WHERE [SettingId]=5;
INSERT INTO [dbo].[GroupChannelSettings] ( [ChannelId],[SettingId], [SettingValue] )
SELECT [dbo].[GroupChannelSettings].[ChannelId],17,[dbo].[GroupChannelSettings].[SettingValue]
FROM [dbo].[GroupChannelSettings]
WHERE [SettingId]=6;
INSERT INTO [dbo].[GroupChannelSettings] ( [ChannelId],[SettingId], [SettingValue] )
SELECT [dbo].[GroupChannelSettings].[ChannelId],18,[dbo].[GroupChannelSettings].[SettingValue]
FROM [dbo].[GroupChannelSettings]
WHERE [SettingId]=7;
DELETE FROM [dbo].[GroupChannelSettings] WHERE [SettingId] IN (4,5,6,7);
DELETE FROM [dbo].[ChannelSettings] WHERE [Id] IN (4,5,6,7)

View File

@@ -0,0 +1 @@
UPDATE DASChannels SET SupportedBridges=16 WHERE DASChannelId IN (66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51)

View File

@@ -0,0 +1,29 @@
ALTER PROCEDURE [dbo].[sp_GroupsDelete]
@Id INT,
@errorNumber INT OUTPUT,
@errorMessage NVARCHAR (255) OUTPUT
AS
BEGIN
SET NOCOUNT ON;
SET @errorNumber=0
SET @errorMessage=''
/*Delete any channel settings*/
DELETE A FROM [dbo].GroupChannelSettings AS A INNER JOIN [dbo].Channels AS B on A.ChannelId=B.Id WHERE B.GroupId=@Id;
/*Delete any level triggers*/
DELETE A FROM [dbo].LevelTriggers AS A INNER JOIN [dbo].Channels AS B on A.ChannelId=B.Id WHERE B.GroupId=@Id;
/*Delete any channels from this group*/
DELETE FROM [dbo].Channels WHERE [GroupId] = @Id
/*Delete assignment of this group to any tests*/
DELETE FROM [dbo].TestSetupGroups WHERE [GroupId]=@Id
/*Delete hardware assignments*/
DELETE FROM [dbo].GroupHardware WHERE [GroupId]=@Id
/*delete group*/
DELETE FROM [dbo].Groups WHERE [Id]=@Id
if(@@error != 0)
begin
set @errorNumber = error_number()
set @errorMessage = error_message()
end
END

View File

@@ -0,0 +1,84 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsGet]
@TestSetupId int = null,
@TestSetupName nvarchar(50) = null
AS
BEGIN
SET NOCOUNT ON;
if(@TestSetupName is not null)
begin
set @TestSetupId = dbo.foo_IdGetTestSetup(@TestSetupName)
end
SELECT [TestSetupId]
,[TestSetupName] as 'SetupName'
,[SetupDescription]
,[AutomaticTestProgression]
,[AutomaticProgressionDelayMS]
,[InvertTrigger]
,[InvertStart]
,[ViewDiagnostics]
,[VerifyChannels]
,[AutoVerifyChannels]
,[VerifyChannelsDelayMS]
,[RecordingMode]
,[SamplesPerSecond]
,[PreTriggerSeconds]
,[PostTriggerSeconds]
,[StrictDiagnostics]
,[RequireConfirmationOnErrors]
,[ROIDownload]
,[ViewROIDownload]
,[DownloadAll]
,[ViewRealtime]
,[RealtimePlotCount]
,[RegionsOfInterest]
,[ROIStart]
,[ROIEnd]
,[ViewDownloadAll]
,[Export]
,[ExportFormat]
,[LabDetails]
,[UseLabDetails]
,[CustomerDetails]
,[UseCustomerDetails]
,[AllowMissingSensors]
,[AllowSensorIdToBlankChannel]
,[CalibrationBehavior]
,[LocalOnly]
,[LastModified]
,[LastModifiedBy]
,[TurnOffExcitation]
,[TriggerCheckRealtime]
,[TriggerCheckStep]
,[PostTestDiagnostics]
,[ExportFolder]
,[DownloadFolder]
,[CommonStatusLine]
,[SameAsDownloadFolder]
,[UploadData]
,[UploadDataFolder]
,[UploadExportsOnly]
,[Settings]
,[WarnOnBatteryFail]
,[Dirty]
,[Complete]
,[ErrorMessage]
,[TestEngineerDetails]
,[UseTestEngineerDetails]
,[UserTags]
,isnull([DoAutoArm], 0) as [DoAutoArm]
,isnull([CheckoutMode], 0) as [CheckoutMode]
,isnull([ISFFile], 0) as [ISFFile]
,isnull([QuitTestWithoutWarning], 0) as [QuitTestWithoutWarning]
,isnull([NotAllChannelsRealTime], 0) as [NotAllChannelsRealTime]
,isnull([NotAllChannelsViewer], 0) as [NotAllChannelsViewer]
,isnull([SuppressMissingSensorsWarning], 0) as [SuppressMissingSensorsWarning]
,[TestSetup]
from [dbo].[TestSetups]
where ((@TestSetupId is null or @TestSetupId= 0) or TestSetupId = @TestSetupId)
and (@TestSetupName is null or TestSetupName = @TestSetupName)
END

View File

@@ -0,0 +1,255 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsInsert]
@TestSetupName nvarchar(50) = Null
,@SetupDescription nvarchar(50)
,@AutomaticTestProgression bit
,@AutomaticProgressionDelayMS int
,@InvertTrigger bit
,@InvertStart bit
,@ViewDiagnostics bit
,@VerifyChannels bit
,@AutoVerifyChannels bit
,@VerifyChannelsDelayMS int
,@RecordingMode smallint
,@SamplesPerSecond float
,@PreTriggerSeconds float
,@PostTriggerSeconds float
,@StrictDiagnostics bit
,@RequireConfirmationOnErrors bit
,@ROIDownload bit
,@ViewROIDownload bit
,@DownloadAll bit
,@ViewRealtime bit
,@RealtimePlotCount smallint
,@RegionsOfInterest nvarchar(MAX)
,@ROIStart float
,@ROIEnd float
,@ViewDownloadAll bit
,@Export bit
,@ExportFormat bigint
,@LabDetails nvarchar(50)
,@UseLabDetails bit
,@CustomerDetails nvarchar(50)
,@UseCustomerDetails bit
,@AllowMissingSensors bit
,@AllowSensorIdToBlankChannel bit
,@CalibrationBehavior smallint
,@LocalOnly bit
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@TurnOffExcitation bit
,@TriggerCheckRealtime bit
,@TriggerCheckStep bit
,@PostTestDiagnostics int
,@ExportFolder nvarchar(150)
,@DownloadFolder nvarchar(150)
,@CommonStatusLine bit
,@SameAsDownloadFolder bit
,@UploadData bit
,@UploadDataFolder nvarchar(150)
,@UploadExportsOnly bit
,@Settings nvarchar(4000)
,@WarnOnBatteryFail bit
,@Dirty bit
,@Complete bit
,@Error nvarchar(255)
,@TestEngineerDetails nvarchar(50)
,@UseTestEngineerDetails bit
,@UserTags varbinary(max)
,@DoAutoArm bit
,@CheckoutMode bit
,@ISFFile nvarchar(4000)
,@QuitTestWithoutWarning bit
,@NotAllChannelsRealTime bit
,@NotAllChannelsViewer bit
,@SuppressMissingSensorsWarning bit
,@TestSetup varbinary(MAX)
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0; set @errorMessage = space(0);
/* Table (and stored procedure) is too big... */
begin try
if(@TestSetupName is null)
begin
set @errorMessage = 'An invalid parameter or option was specified for procedure'
set @errorNumber = 15600
end
else
begin
SET NOCOUNT ON;
declare @TestEngineerId int
declare @LabratoryId int
declare @CustomerId int
set @CustomerId = dbo.foo_IdGetCustomer(@CustomerDetails)
IF @CustomerId <= 0
BEGIN
SET @CustomerId = null
END
set @LabratoryId = dbo.foo_IdGetLabratory(@LabDetails)
IF @LabratoryId <= 0
BEGIN
SET @LabratoryId = null
END
set @TestEngineerId = dbo.foo_IdGetEngineer(@TestEngineerDetails);
IF @TestEngineerId <= 0
BEGIN
SET @TestEngineerId = null
END
insert into [dbo].[TestSetups]
([TestSetupName]
,[SetupDescription]
,[AutomaticTestProgression]
,[AutomaticProgressionDelayMS]
,[InvertTrigger]
,[InvertStart]
,[ViewDiagnostics]
,[VerifyChannels]
,[AutoVerifyChannels]
,[VerifyChannelsDelayMS]
,[RecordingMode]
,[SamplesPerSecond]
,[PreTriggerSeconds]
,[PostTriggerSeconds]
,[StrictDiagnostics]
,[RequireConfirmationOnErrors]
,[ROIDownload]
,[ViewROIDownload]
,[DownloadAll]
,[ViewRealtime]
,[RealtimePlotCount]
,[RegionsOfInterest]
,[ROIStart]
,[ROIEnd]
,[ViewDownloadAll]
,[Export]
,[ExportFormat]
,[CustomerId]
,[LabratoryId]
,[TestEngineerId]
,[LabDetails]
,[UseLabDetails]
,[CustomerDetails]
,[UseCustomerDetails]
,[TestEngineerDetails]
,[UseTestEngineerDetails]
,[AllowMissingSensors]
,[AllowSensorIdToBlankChannel]
,[CalibrationBehavior]
,[LocalOnly]
,[LastModified]
,[LastModifiedBy]
,[TurnOffExcitation]
,[TriggerCheckRealtime]
,[TriggerCheckStep]
,[PostTestDiagnostics]
,[ExportFolder]
,[DownloadFolder]
,[CommonStatusLine]
,[SameAsDownloadFolder]
,[UploadData]
,[UploadDataFolder]
,[UploadExportsOnly]
,[Settings]
,[WarnOnBatteryFail]
,[Dirty]
,[Complete]
,[ErrorMessage]
,[UserTags]
,[DoAutoArm]
,[CheckoutMode]
,[ISFFile]
,[QuitTestWithoutWarning]
,[NotAllChannelsRealTime]
,[NotAllChannelsViewer]
,[SuppressMissingSensorsWarning]
,[TestSetup])
VALUES
( @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@RegionsOfInterest
,@ROIStart
,@ROIEnd
,@ViewDownloadAll
,@Export
,@ExportFormat
,@CustomerId
,@LabratoryId
,@TestEngineerId
,@LabDetails
,@UseLabDetails
,@CustomerDetails
,@UseCustomerDetails
,@TestEngineerDetails
,@UseTestEngineerDetails
,@AllowMissingSensors
,@AllowSensorIdToBlankChannel
,@CalibrationBehavior
,@LocalOnly
,@LastModified
,@LastModifiedBy
,@TurnOffExcitation
,@TriggerCheckRealtime
,@TriggerCheckStep
,@PostTestDiagnostics
,@ExportFolder
,@DownloadFolder
,@CommonStatusLine
,@SameAsDownloadFolder
,@UploadData
,@UploadDataFolder
,@UploadExportsOnly
,@Settings
,@WarnOnBatteryFail
,@Dirty
,@Complete
,@Error
,@UserTags
,@DoAutoArm
,@CheckoutMode
,@ISFFile
,@QuitTestWithoutWarning
,@NotAllChannelsRealTime
,@NotAllChannelsViewer
,@SuppressMissingSensorsWarning
,@TestSetup)
set @new_id = scope_identity()
end
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch;
END

View File

@@ -0,0 +1,218 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsInsertUpdate]
@TestSetupName nvarchar(50) = Null
,@SetupDescription nvarchar(50)
,@AutomaticTestProgression bit
,@AutomaticProgressionDelayMS int
,@InvertTrigger bit
,@InvertStart bit
,@ViewDiagnostics bit
,@VerifyChannels bit
,@AutoVerifyChannels bit
,@VerifyChannelsDelayMS int
,@RecordingMode smallint
,@SamplesPerSecond float
,@PreTriggerSeconds float
,@PostTriggerSeconds float
,@StrictDiagnostics bit
,@RequireConfirmationOnErrors bit
,@ROIDownload bit
,@ViewROIDownload bit
,@DownloadAll bit
,@ViewRealtime bit
,@RealtimePlotCount smallint
,@RegionsOfInterest nvarchar(MAX)
,@ROIStart float
,@ROIEnd float
,@ViewDownloadAll bit
,@Export bit
,@ExportFormat bigint
,@LabDetails nvarchar(50)
,@UseLabDetails bit
,@CustomerDetails nvarchar(50)
,@UseCustomerDetails bit
,@AllowMissingSensors bit
,@AllowSensorIdToBlankChannel bit
,@CalibrationBehavior smallint
,@LocalOnly bit
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@TurnOffExcitation bit
,@TriggerCheckRealtime bit
,@TriggerCheckStep bit
,@PostTestDiagnostics int
,@ExportFolder nvarchar(150)
,@DownloadFolder nvarchar(150)
,@CommonStatusLine bit
,@SameAsDownloadFolder bit
,@UploadData bit
,@UploadDataFolder nvarchar(150)
,@UploadExportsOnly bit
,@Settings nvarchar(4000)
,@WarnOnBatteryFail bit
,@Dirty bit
,@Complete bit
,@Error nvarchar(255)
,@TestEngineerDetails nvarchar(50)
,@UseTestEngineerDetails bit
,@UserTags varbinary(max)
,@DoAutoArm bit
,@CheckoutMode bit
,@ISFFile nvarchar(4000)
,@QuitTestWithoutWarning bit
,@NotAllChannelsRealTime bit
,@NotAllChannelsViewer bit
,@SuppressMissingSensorsWarning bit
,@TestSetup varbinary(MAX)
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0; set @errorMessage = space(0);
declare @TestSetupId int
set @TestSetupId = dbo.foo_IdGetTestSetup(@TestSetupName)
if(exists(select TestSetupId from [dbo].[TestSetups] where TestSetupId = @TestSetupId))
begin
set @new_id = @TestSetupId
exec dbo.sp_TestSetupsUpdate @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@RegionsOfInterest
,@ROIStart
,@ROIEnd
,@ViewDownloadAll
,@Export
,@ExportFormat
,@LabDetails
,@UseLabDetails
,@CustomerDetails
,@UseCustomerDetails
,@AllowMissingSensors
,@AllowSensorIdToBlankChannel
,@CalibrationBehavior
,@LocalOnly
,@LastModified
,@LastModifiedBy
,@TurnOffExcitation
,@TriggerCheckRealtime
,@TriggerCheckStep
,@PostTestDiagnostics
,@ExportFolder
,@DownloadFolder
,@CommonStatusLine
,@SameAsDownloadFolder
,@UploadData
,@UploadDataFolder
,@UploadExportsOnly
,@Settings
,@WarnOnBatteryFail
,@Dirty
,@Complete
,@Error
,@TestEngineerDetails
,@UseTestEngineerDetails
,@UserTags
,@DoAutoArm
,@CheckoutMode
,@ISFFile
,@QuitTestWithoutWarning
,@NotAllChannelsRealTime
,@NotAllChannelsViewer
,@SuppressMissingSensorsWarning
,@TestSetup
,@new_id output
,@errorNumber output
,@errorMessage output
end
else
begin
exec dbo.sp_TestSetupsInsert @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@RegionsOfInterest
,@ROIStart
,@ROIEnd
,@ViewDownloadAll
,@Export
,@ExportFormat
,@LabDetails
,@UseLabDetails
,@CustomerDetails
,@UseCustomerDetails
,@AllowMissingSensors
,@AllowSensorIdToBlankChannel
,@CalibrationBehavior
,@LocalOnly
,@LastModified
,@LastModifiedBy
,@TurnOffExcitation
,@TriggerCheckRealtime
,@TriggerCheckStep
,@PostTestDiagnostics
,@ExportFolder
,@DownloadFolder
,@CommonStatusLine
,@SameAsDownloadFolder
,@UploadData
,@UploadDataFolder
,@UploadExportsOnly
,@Settings
,@WarnOnBatteryFail
,@Dirty
,@Complete
,@Error
,@TestEngineerDetails
,@UseTestEngineerDetails
,@UserTags
,@DoAutoArm
,@CheckoutMode
,@ISFFile
,@QuitTestWithoutWarning
,@NotAllChannelsRealTime
,@NotAllChannelsViewer
,@SuppressMissingSensorsWarning
,@TestSetup
,@new_id output
,@errorNumber output
,@errorMessage output
end
END

View File

@@ -0,0 +1,183 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsUpdate]
@TestSetupName nvarchar(50) = Null
,@SetupDescription nvarchar(50)
,@AutomaticTestProgression bit
,@AutomaticProgressionDelayMS int
,@InvertTrigger bit
,@InvertStart bit
,@ViewDiagnostics bit
,@VerifyChannels bit
,@AutoVerifyChannels bit
,@VerifyChannelsDelayMS int
,@RecordingMode smallint
,@SamplesPerSecond float
,@PreTriggerSeconds float
,@PostTriggerSeconds float
,@StrictDiagnostics bit
,@RequireConfirmationOnErrors bit
,@ROIDownload bit
,@ViewROIDownload bit
,@DownloadAll bit
,@ViewRealtime bit
,@RealtimePlotCount smallint
,@RegionsOfInterest nvarchar(MAX)
,@ROIStart float
,@ROIEnd float
,@ViewDownloadAll bit
,@Export bit
,@ExportFormat bigint
,@LabDetails nvarchar(50)
,@UseLabDetails bit
,@CustomerDetails nvarchar(50)
,@UseCustomerDetails bit
,@AllowMissingSensors bit
,@AllowSensorIdToBlankChannel bit
,@CalibrationBehavior smallint
,@LocalOnly bit
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@TurnOffExcitation bit
,@TriggerCheckRealtime bit
,@TriggerCheckStep bit
,@PostTestDiagnostics int
,@ExportFolder nvarchar(150)
,@DownloadFolder nvarchar(150)
,@CommonStatusLine bit
,@SameAsDownloadFolder bit
,@UploadData bit
,@UploadDataFolder nvarchar(150)
,@UploadExportsOnly bit
,@Settings nvarchar(4000)
,@WarnOnBatteryFail bit
,@Dirty bit
,@Complete bit
,@Error nvarchar(255)
,@TestEngineerDetails nvarchar(50)
,@UseTestEngineerDetails bit
,@UserTags varbinary(max)
,@DoAutoArm bit
,@CheckoutMode bit
,@ISFFile nvarchar(4000)
,@QuitTestWithoutWarning bit
,@NotAllChannelsRealTime bit
,@NotAllChannelsViewer bit
,@SuppressMissingSensorsWarning bit
,@TestSetup varbinary(MAX)
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0; set @errorMessage = space(0); set @new_id = 0;
/* Table (ans stored procedure) is too big... */
begin try
if(@TestSetupName is null)
begin
set @errorMessage = 'An invalid parameter or option was specified for procedure'
set @errorNumber = 15600
end
else
begin
declare @TestSetupId int
declare @TestEngineerId int
declare @LabratoryId int
declare @CustomerId int
set @TestSetupId = dbo.foo_IdGetTestSetup(@TestSetupName)
set @CustomerId = dbo.foo_IdGetCustomer(@CustomerDetails)
IF @CustomerId <= 0
BEGIN
SET @CustomerId = null
END
set @LabratoryId = dbo.foo_IdGetLabratory(@LabDetails)
IF @LabratoryId <= 0
BEGIN
SET @LabratoryId = null
END
set @TestEngineerId = dbo.foo_IdGetEngineer(@TestEngineerDetails);
BEGIN
SET @TestEngineerId = null
END
set @new_id = @TestSetupId
UPDATE [dbo].[TestSetups]
SET [SetupDescription] = @SetupDescription
,[AutomaticTestProgression] = @AutomaticTestProgression
,[AutomaticProgressionDelayMS] = @AutomaticProgressionDelayMS
,[InvertTrigger] = @InvertTrigger
,[InvertStart] = @InvertStart
,[ViewDiagnostics] = @ViewDiagnostics
,[VerifyChannels] = @VerifyChannels
,[AutoVerifyChannels] = @AutoVerifyChannels
,[VerifyChannelsDelayMS] = @VerifyChannelsDelayMS
,[RecordingMode] = @RecordingMode
,[SamplesPerSecond] = @SamplesPerSecond
,[PreTriggerSeconds] = @PreTriggerSeconds
,[PostTriggerSeconds] = @PostTriggerSeconds
,[StrictDiagnostics] = @StrictDiagnostics
,[RequireConfirmationOnErrors] = @RequireConfirmationOnErrors
,[ROIDownload] = @ROIDownload
,[ViewROIDownload] = @ViewROIDownload
,[DownloadAll] = @DownloadAll
,[ViewRealtime] = @ViewRealtime
,[RealtimePlotCount] = @RealtimePlotCount
,[RegionsOfInterest] = @RegionsOfInterest
,[ROIStart] = @ROIStart
,[ROIEnd] = @ROIEnd
,[ViewDownloadAll] = @ViewDownloadAll
,[Export] = @Export
,[ExportFormat] = @ExportFormat
,[CustomerId] = @CustomerId
,[LabratoryId] = @LabratoryId
,[TestEngineerId] = @TestEngineerId
,[LabDetails] = @LabDetails
,[UseLabDetails] = @UseLabDetails
,[CustomerDetails] = @CustomerDetails
,[UseCustomerDetails] = @UseCustomerDetails
,[AllowMissingSensors] = @AllowMissingSensors
,[AllowSensorIdToBlankChannel] = @AllowSensorIdToBlankChannel
,[CalibrationBehavior] = @CalibrationBehavior
,[LocalOnly] = @LocalOnly
,[LastModified] = @LastModified
,[LastModifiedBy] = @LastModifiedBy
,[TurnOffExcitation] = @TurnOffExcitation
,[TriggerCheckRealtime] = @TriggerCheckRealtime
,[TriggerCheckStep] = @TriggerCheckStep
,[PostTestDiagnostics] = @PostTestDiagnostics
,[ExportFolder] = @ExportFolder
,[DownloadFolder] = @DownloadFolder
,[CommonStatusLine] = @CommonStatusLine
,[SameAsDownloadFolder] = @SameAsDownloadFolder
,[UploadData] = @UploadData
,[UploadDataFolder] = @UploadDataFolder
,[UploadExportsOnly] = @UploadExportsOnly
,[Settings] = @Settings
,[WarnOnBatteryFail] = @WarnOnBatteryFail
,[Dirty] = @Dirty
,[Complete] = @Complete
,[ErrorMessage] = @Error
,[TestEngineerDetails] = @TestEngineerDetails
,[UseTestEngineerDetails] = @UseTestEngineerDetails
,[UserTags] = @UserTags
,[DoAutoArm] = @DoAutoArm
,[CheckoutMode] = @CheckoutMode
,[ISFFile] = @ISFFile
,[QuitTestWithoutWarning] = @QuitTestWithoutWarning
,[NotAllChannelsRealTime] = @NotAllChannelsRealTime
,[NotAllChannelsViewer] = @NotAllChannelsViewer
,[SuppressMissingSensorsWarning] = @SuppressMissingSensorsWarning
,[TestSetup] = @TestSetup
WHERE [TestSetupId] = @TestSetupId
end
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch;
END

View File

@@ -0,0 +1,219 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsUpdateInsert]
@TestSetupName nvarchar(50) = Null
,@SetupDescription nvarchar(50)
,@AutomaticTestProgression bit
,@AutomaticProgressionDelayMS int
,@InvertTrigger bit
,@InvertStart bit
,@ViewDiagnostics bit
,@VerifyChannels bit
,@AutoVerifyChannels bit
,@VerifyChannelsDelayMS int
,@RecordingMode smallint
,@SamplesPerSecond float
,@PreTriggerSeconds float
,@PostTriggerSeconds float
,@StrictDiagnostics bit
,@RequireConfirmationOnErrors bit
,@ROIDownload bit
,@ViewROIDownload bit
,@DownloadAll bit
,@ViewRealtime bit
,@RealtimePlotCount smallint
,@RegionsOfInterest nvarchar(MAX)
,@ROIStart float
,@ROIEnd float
,@ViewDownloadAll bit
,@Export bit
,@ExportFormat bigint
,@LabDetails nvarchar(50)
,@UseLabDetails bit
,@CustomerDetails nvarchar(50)
,@UseCustomerDetails bit
,@AllowMissingSensors bit
,@AllowSensorIdToBlankChannel bit
,@CalibrationBehavior smallint
,@LocalOnly bit
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@TurnOffExcitation bit
,@TriggerCheckRealtime bit
,@TriggerCheckStep bit
,@PostTestDiagnostics int
,@ExportFolder nvarchar(150)
,@DownloadFolder nvarchar(150)
,@CommonStatusLine bit
,@SameAsDownloadFolder bit
,@UploadData bit
,@UploadDataFolder nvarchar(150)
,@UploadExportsOnly bit
,@Settings nvarchar(4000)
,@WarnOnBatteryFail bit
,@Dirty bit
,@Complete bit
,@Error nvarchar(255)
,@TestEngineerDetails nvarchar(50)
,@UseTestEngineerDetails bit
,@UserTags varbinary(max)
,@DoAutoArm bit
,@CheckoutMode bit
,@ISFFile nvarchar(4000)
,@QuitTestWithoutWarning bit
,@NotAllChannelsRealTime bit
,@NotAllChannelsViewer bit
,@SuppressMissingSensorsWarning bit
,@TestSetup varbinary(MAX)
,@new_id int output
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0; set @errorMessage = space(0);
declare @TestSetupId int
set @TestSetupId = dbo.foo_IdGetTestSetup(@TestSetupName)
if(exists(select TestSetupId from [dbo].[TestSetups] where TestSetupId = @TestSetupId))
begin
set @new_id = @TestSetupId
exec dbo.sp_TestSetupsUpdate @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@RegionsOfInterest
,@ROIStart
,@ROIEnd
,@ViewDownloadAll
,@Export
,@ExportFormat
,@LabDetails
,@UseLabDetails
,@CustomerDetails
,@UseCustomerDetails
,@AllowMissingSensors
,@AllowSensorIdToBlankChannel
,@CalibrationBehavior
,@LocalOnly
,@LastModified
,@LastModifiedBy
,@TurnOffExcitation
,@TriggerCheckRealtime
,@TriggerCheckStep
,@PostTestDiagnostics
,@ExportFolder
,@DownloadFolder
,@CommonStatusLine
,@SameAsDownloadFolder
,@UploadData
,@UploadDataFolder
,@UploadExportsOnly
,@Settings
,@WarnOnBatteryFail
,@Dirty
,@Complete
,@Error
,@TestEngineerDetails
,@UseTestEngineerDetails
,@UserTags
,@DoAutoArm
,@CheckoutMode
,@ISFFile
,@QuitTestWithoutWarning
,@NotAllChannelsRealTime
,@NotAllChannelsViewer
,@SuppressMissingSensorsWarning
,@TestSetup
,@new_id output
,@errorNumber output
,@errorMessage output
end
else
begin
exec dbo.sp_TestSetupsInsert @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@RegionsOfInterest
,@ROIStart
,@ROIEnd
,@ViewDownloadAll
,@Export
,@ExportFormat
,@LabDetails
,@UseLabDetails
,@CustomerDetails
,@UseCustomerDetails
,@AllowMissingSensors
,@AllowSensorIdToBlankChannel
,@CalibrationBehavior
,@LocalOnly
,@LastModified
,@LastModifiedBy
,@TurnOffExcitation
,@TriggerCheckRealtime
,@TriggerCheckStep
,@PostTestDiagnostics
,@ExportFolder
,@DownloadFolder
,@CommonStatusLine
,@SameAsDownloadFolder
,@UploadData
,@UploadDataFolder
,@UploadExportsOnly
,@Settings
,@WarnOnBatteryFail
,@Dirty
,@Complete
,@Error
,@TestEngineerDetails
,@UseTestEngineerDetails
,@UserTags
,@DoAutoArm
,@CheckoutMode
,@ISFFile
,@QuitTestWithoutWarning
,@NotAllChannelsRealTime
,@NotAllChannelsViewer
,@SuppressMissingSensorsWarning
,@TestSetup
,@new_id output
,@errorNumber output
,@errorMessage output
end
END

Some files were not shown because too many files have changed in this diff Show More