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,229 @@
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
,@DoStreaming bit
,@ClockSyncProfileMaster nvarchar(50)
,@ClockSyncProfileSlave nvarchar(50)
,@ExtraProperties nvarchar(max)
,@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
,@DoStreaming
,@ClockSyncProfileMaster
,@ClockSyncProfileSlave
,@ExtraProperties
,@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
,@DoStreaming
,@ClockSyncProfileMaster
,@ClockSyncProfileSlave
,@ExtraProperties
,@TestSetup
,@new_id output
,@errorNumber output
,@errorMessage output
end;
END

View File

@@ -0,0 +1,58 @@
ALTER PROCEDURE [dbo].[sp_CalculatedChannelsInsert]
@Operation int
,@CalculatedChannelValueCode nvarchar(255)
,@InputChannelIds varbinary(max)
,@CFCForInputChannels nvarchar(255)
,@CFCForOutput nvarchar(255)
,@TestSetupName nvarchar(255)
,@CCName nvarchar(255)
,@ClipLength int
,@ViewInRealtime bit
,@new_id int OUTPUT
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
SET NOCOUNT ON;
set @errorNumber = 0
set @errorMessage = space(0)
if(@Operation is null or @TestSetupName is null)
begin
set @errorMessage = 'sp_CalculatedChannelsInsert: Error 1560 - An invalid parameter or option was specified for procedure'
set @errorNumber = 1560
end
else
begin
begin try
declare @TestSetupId int
set @TestSetupId = dbo.foo_IdGetTestSetup(@TestSetupName)
INSERT INTO [dbo].[CalculatedChannels]
([Operation]
,[CalculatedChannelValueCode]
,[InputChannelIds]
,[CFCForInputChannels]
,[CFCForOutput]
,[TestSetupId]
,[CCName]
,[ViewInRealtime]
,[ClipLength])
VALUES
(@Operation
,@CalculatedChannelValueCode
,@InputChannelIds
,@CFCForInputChannels
,@CFCForOutput
,@TestSetupId
,@CCName
,@ViewInRealtime
,@ClipLength)
set @new_id = scope_identity();
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch
end
END

View File

@@ -0,0 +1,21 @@
CREATE PROCEDURE [dbo].[sp_SensorsAnalogUpdateCalibrationId]
@SensorId INT,
@LatestCalibrationId INT,
@errorNumber INT OUTPUT,
@errorMessage NVARCHAR (255) OUTPUT
AS
BEGIN
SET NOCOUNT ON
SET @errorNumber = 0
SET @errorMessage = ''
UPDATE [dbo].[SensorsAnalog] SET
[LatestCalibrationId] = @LatestCalibrationId WHERE [Id]=@SensorId
if(@@error != 0)
begin
set @errorNumber = error_number()
set @errorMessage = error_message()
end
END

View File

@@ -0,0 +1,11 @@
CREATE TABLE [dbo].[SensorsThermocoupler](
[Id] [int] IDENTITY(1,1) NOT NULL,
[SensorId] [int] 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 SensorsThermocoupler VALUES((SELECT id FROM Sensors WHERE SerialNumber = 'TST_TestSpecific'), '20250731', 'System', 0x, 0, 0)