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 [StoredProcedureVersions] ([StoredProcedure], [Version]) VALUES ('sp_DASGet', 100)
INSERT INTO [StoredProcedureVersions] ([StoredProcedure], [Version]) VALUES ('sp_ChannelSettingsGet', 100)

View File

@@ -0,0 +1,123 @@
ALTER PROCEDURE [dbo].[sp_DASInsert]
@SerialNumber nvarchar(50) = null
,@Type int
,@MaxModules int
,@MaxMemory bigint
,@MaxSampleRate decimal(18,0)
,@MinSampleRate decimal(18,0)
,@FirmwareVersion nvarchar(50)
,@CalDate datetime
,@ProtocolVersion int
,@LastModified datetime
,@LastModifiedBy nvarchar(50)
,@Version int
,@LocalOnly bit
,@LastUsed datetime
,@LastUsedBy nvarchar(50)
,@Connection nvarchar(50)
,@Channels int
,@Position nvarchar(50)
,@ChannelTypes nvarchar(255)
,@Reprogramable bit
,@Reconfigurable bit
,@IsModule bit
,@PositionOnDistributor smallint
,@PositionOnChain smallint
,@Port smallint
,@ParentDAS nvarchar(50)
,@FirstUseDate datetime null
,@GroupId int null
,@TestId int null
,@StandIn bit null
,@MaxAAFRate decimal(18,0)
,@new_id int OUTPUT
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0
set @errorMessage = space(0)
SET NOCOUNT ON;
if(@SerialNumber is null)
begin
RAISERROR(15600,-1,-1, 'sp_DASInsert') /* Error 1560 - An invalid parameter or option was specified for procedure*/
end
else
begin
if EXISTS ( SELECT 1 FROM [DAS] WHERE [SerialNumber]=@SerialNumber)
BEGIN
SET @errorNumber = 1505
SET @errorMessage = N'Duplicate SerialNumber'
END
ELSE
BEGIN
INSERT INTO [dbo].[DAS]
([SerialNumber]
,[Type]
,[MaxModules]
,[MaxMemory]
,[MaxSampleRate]
,[MinSampleRate]
,[FirmwareVersion]
,[CalDate]
,[ProtocolVersion]
,[LastModified]
,[LastModifiedBy]
,[Version]
,[LocalOnly]
,[LastUsed]
,[LastUsedBy]
,[Connection]
,[Channels]
,[Position]
,[ChannelTypes]
,[Reprogramable]
,[Reconfigurable]
,[IsModule]
,[PositionOnDistributor]
,[PositionOnChain]
,[Port]
,[ParentDAS]
,[FirstUseDate]
,[TestId]
,[GroupId]
,[StandIn]
,[MaxAAFRate])
VALUES
( @SerialNumber
,@Type
,@MaxModules
,@MaxMemory
,@MaxSampleRate
,@MinSampleRate
,@FirmwareVersion
,@CalDate
,@ProtocolVersion
,@LastModified
,@LastModifiedBy
,@Version
,@LocalOnly
,@LastUsed
,@LastUsedBy
,@Connection
,@Channels
,@Position
,@ChannelTypes
,@Reprogramable
,@Reconfigurable
,@IsModule
,@PositionOnDistributor
,@PositionOnChain
,@Port
,@ParentDAS
,@FirstUseDate
,@TestId
,@GroupId
,@StandIn
,@MaxAAFRate)
set @new_id = scope_identity();
END
end
END

View File

@@ -0,0 +1,4 @@
INSERT INTO [dbo].[DAS]
([SerialNumber],[Type],[MaxModules],[MaxMemory],[MaxSampleRate],[MinSampleRate],[FirmwareVersion],[CalDate],[ProtocolVersion],[LastModified],[LastModifiedBy],[Version],[LocalOnly],[LastUsed],[LastUsedBy],[Connection],[Channels],[Position],[ChannelTypes],[Reprogramable],[Reconfigurable],[IsModule],[PositionOnDistributor],[PositionOnChain],[Port],[ParentDAS],[FirstUseDate],[TestId],[GroupId],[StandIn])
VALUES
('SLICE6 AIR ER Prototype',56,0,0,4294967295,0,'12G2','00:00.0',1,'00:00.0','SYSTEM',1,0,'00:00.0','','192.168.4.10',0,'Prototype',0,0,0,0,0,0,0,'',NULL,NULL,NULL,NULL)

View File

@@ -0,0 +1,5 @@
-- We check for ChannelTypes = '0,0,0,0,0,0' because that's the case where a SLICE6Air
-- has not already been rediscovered in 4.0 (which would result in '0,0,0,0,0,0,5,6').
INSERT INTO [dbo].[DASChannels]
([DASId], [ChannelIdx], [SupportedBridges], [SupportedExcitations], [DASDisplayOrder], [LocalOnly], [SupportedDigitalInputModes], [SupportedSquibFireModes], [SupportedDigitalOutputModes], [ModuleSerialNumber], [ModuleArrayIndex])
(SELECT DASId, 6, 512, 1, -1, 0, 0, 0, 0, 'S6A-Uart1', 2 FROM [dbo].[DAS] WHERE Type = '36' AND Position <> 'Prototype' AND ChannelTypes = '0,0,0,0,0,0' GROUP BY DASId)

View File

@@ -0,0 +1,227 @@
--UpdateInsert
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)
,@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
,@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
,@TestSetup
,@new_id output
,@errorNumber output
,@errorMessage output
end
END;

View File

@@ -0,0 +1,8 @@
INSERT INTO [dbo].[Sensors]([SensorType], [SerialNumber])
VALUES(5, 'TSS_TestSpecific');
DECLARE @sensorID int;
SET @sensorID = CAST(SCOPE_IDENTITY() as int);
INSERT INTO [dbo].[SensorsStreamOutput] ([SensorId], [StreamProfile], [UDPAddress], [TimeChannelId], [DataChannelId], [TmNSConfig], [IRIGTimeDataPacketIntervalMs], [LastModified], [LastModifiedBy], [UserTags])
VALUES(@sensorID, 'CH10_ANALOG_2HDR', 'UDP://239.1.2.10:8400', 1, 3, '(1,6,60,0,0,0,0,0)', 500, '2018-12-18 12:00:00.000', 'SYSTEM', 0);

View File

@@ -0,0 +1,242 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsInsertUpdate_92]
@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
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId nvarchar(max)
,@TestSetup varbinary(MAX)
,@RepeatAutoArmOrStreaming bit
,@IgnoreShortedStart bit
,@IgnoreShortedTrigger bit
,@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_92 @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@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
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@RepeatAutoArmOrStreaming
,@IgnoreShortedStart
,@IgnoreShortedTrigger
,@new_id output
,@errorNumber output
,@errorMessage output
end
else
begin
exec dbo.sp_TestSetupsInsert_92 @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@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
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@RepeatAutoArmOrStreaming
,@IgnoreShortedStart
,@IgnoreShortedTrigger
,@new_id output
,@errorNumber output
,@errorMessage output
end;
END