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,22 @@
CREATE 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)
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,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')
END
ELSE
BEGIN
SELECT [SettingName] FROM [dbo].[ChannelSettings] where (Id = @Id) AND (SettingName <> 'ACCouplingEnabled')
END
END
ELSE
BEGIN
SELECT [Id], [SettingName], [DefaultValue] FROM [dbo].[ChannelSettings] WHERE (SettingName <> 'ACCouplingEnabled')
END
END

View File

@@ -0,0 +1 @@
INSERT INTO [ChannelSettings] ([SettingName], [DefaultValue]) VALUES ('ACCouplingEnabled', 'FALSE');

View File

@@ -0,0 +1 @@
INSERT INTO dbo.StoredProcedureVersions VALUES('sp_ChannelSettingsGet', 92)

View File

@@ -0,0 +1,94 @@
CREATE PROCEDURE [dbo].[sp_TestSetupsGet_92]
@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]
,[NumberOfEvents]
,[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]
,isnull([DoStreaming], 0) as [DoStreaming]
,[ClockSyncProfileMaster]
,[ClockSyncProfileSlave]
,[ExtraProperties]
,isnull([MeasureSquibResistancesStep], 0) as [MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent]
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,235 @@
CREATE 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
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId 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_92 @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
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@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
,@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
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@new_id output
,@errorNumber output
,@errorMessage output
end;
END

View File

@@ -0,0 +1,294 @@
CREATE PROCEDURE [dbo].[sp_TestSetupsInsert_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
,@NumberOfEvents int
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId nvarchar(max)
,@TestSetup varbinary(MAX)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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]
,[NumberOfEvents]
,[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]
,[DoStreaming]
,[ClockSyncProfileMaster]
,[ClockSyncProfileSlave]
,[ExtraProperties]
,[MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent])
VALUES
( @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@NumberOfEvents
,@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
,@DoStreaming
,@ClockSyncProfileMaster
,@ClockSyncProfileSlave
,@ExtraProperties
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent)
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,259 @@
CREATE PROCEDURE [dbo].[sp_TestSetupsUpdateInsert_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
,@NumberOfEvents int
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId nvarchar(max)
,@TestSetup varbinary(MAX)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent 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
,@NumberOfEvents
,@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
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent
,@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
,@NumberOfEvents
,@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
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent
,@new_id output
,@errorNumber output
,@errorMessage output
end;
END

View File

@@ -0,0 +1,211 @@
CREATE PROCEDURE [dbo].[sp_TestSetupsUpdate_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
,@NumberOfEvents int
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId nvarchar(max)
,@TestSetup varbinary(MAX)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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);
IF @TestEngineerId <= 0
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
,[NumberOfEvents] = @NumberOfEvents
,[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
,[DoStreaming] = @DoStreaming
,[ClockSyncProfileMaster] = @ClockSyncProfileMaster
,[ClockSyncProfileSlave] = @ClockSyncProfileSlave
,[ExtraProperties] = @ExtraProperties
,[MeasureSquibResistancesStep] = @MeasureSquibResistancesStep
,[TestSetupUniqueId] = @TestSetupUniqueId
,[TestSetup] = @TestSetup
,[WakeupAndTriggerOn] = @WakeupAndTriggerOn
,[WakeupTrigger] = @WakeupTrigger
,[WakeUpMotionTimeout] = @WakeUpMotionTimeout
,[TimedIntervalFrequency] = @TimedIntervalFrequency
,[RTCScheduleStartDateTime] = @RTCScheduleStartDateTime
,[RTCScheduleDuration] = @RTCScheduleDuration
,[StartWithEvent] = @StartWithEvent
WHERE [TestSetupId] = @TestSetupId
end
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch;
END

View File

@@ -0,0 +1,126 @@
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]
,[NumberOfEvents]
,[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]
,isnull([DoStreaming], 0) as [DoStreaming]
,CASE WHEN [dbo].[TestSetups].[ClockSyncProfileMaster]='None' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='Manual' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='Slave_E2E' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='Master_E2E' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='Auto_E2E' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='Master_E2E_IRIG' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='Master_E2E_IRIG_EXT_PPS' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='Master_E2E_GPS' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='Master_E2E_GPS_EXT_PPS' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='IRIG' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='IRIG_EXT_PPS' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='GPS' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='GPS_EXT_PPS' OR
[dbo].[TestSetups].[ClockSyncProfileMaster]='EXT_PPS'
THEN [dbo].[TestSetups].[ClockSyncProfileMaster]
ELSE 'None'
END as [ClockSyncProfileMaster]
,CASE WHEN [dbo].[TestSetups].[ClockSyncProfileSlave]='None' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='Manual' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='Slave_E2E' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='Master_E2E' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='Auto_E2E' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='Master_E2E_IRIG' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='Master_E2E_IRIG_EXT_PPS' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='Master_E2E_GPS' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='Master_E2E_GPS_EXT_PPS' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='IRIG' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='IRIG_EXT_PPS' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='GPS' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='GPS_EXT_PPS' OR
[dbo].[TestSetups].[ClockSyncProfileSlave]='EXT_PPS'
THEN [dbo].[TestSetups].[ClockSyncProfileSlave]
ELSE 'None'
END as [ClockSyncProfileSlave]
,[ExtraProperties]
,isnull([MeasureSquibResistancesStep], 0) as [MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent]
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,330 @@
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
,@NumberOfEvents int
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId nvarchar(max)
,@TestSetup varbinary(MAX)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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]
,[NumberOfEvents]
,[StrictDiagnostics]
,[RequireConfirmationOnErrors]
,[ROIDownload]
,[ViewROIDownload]
,[DownloadAll]
,[ViewRealtime]
,[RealtimePlotCount]
,[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]
,[DoStreaming]
,[ClockSyncProfileMaster]
,[ClockSyncProfileSlave]
,[ExtraProperties]
,[MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent])
VALUES
( @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@NumberOfEvents
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@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
,@DoStreaming
,CASE WHEN
@ClockSyncProfileMaster='None' OR
@ClockSyncProfileMaster='Manual' OR
@ClockSyncProfileMaster='Slave_E2E' OR
@ClockSyncProfileMaster='Master_E2E' OR
@ClockSyncProfileMaster='Auto_E2E' OR
@ClockSyncProfileMaster='Master_E2E_IRIG' OR
@ClockSyncProfileMaster='Master_E2E_IRIG_EXT_PPS' OR
@ClockSyncProfileMaster='Master_E2E_GPS' OR
@ClockSyncProfileMaster='Master_E2E_GPS_EXT_PPS' OR
@ClockSyncProfileMaster='IRIG' OR
@ClockSyncProfileMaster='IRIG_EXT_PPS' OR
@ClockSyncProfileMaster='GPS' OR
@ClockSyncProfileMaster='GPS_EXT_PPS' OR
@ClockSyncProfileMaster='EXT_PPS'
THEN
@ClockSyncProfileMaster
ELSE
'None'
END
,CASE WHEN
@ClockSyncProfileSlave='None' OR
@ClockSyncProfileSlave='Manual' OR
@ClockSyncProfileSlave='Slave_E2E' OR
@ClockSyncProfileSlave='Master_E2E' OR
@ClockSyncProfileSlave='Auto_E2E' OR
@ClockSyncProfileSlave='Master_E2E_IRIG' OR
@ClockSyncProfileSlave='Master_E2E_IRIG_EXT_PPS' OR
@ClockSyncProfileSlave='Master_E2E_GPS' OR
@ClockSyncProfileSlave='Master_E2E_GPS_EXT_PPS' OR
@ClockSyncProfileSlave='IRIG' OR
@ClockSyncProfileSlave='IRIG_EXT_PPS' OR
@ClockSyncProfileSlave='GPS' OR
@ClockSyncProfileSlave='GPS_EXT_PPS' OR
@ClockSyncProfileSlave='EXT_PPS'
THEN
@ClockSyncProfileSlave
ELSE
'None'
END
,@ExtraProperties
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent)
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,248 @@
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
,@NumberOfEvents int
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId nvarchar(max)
,@TestSetup varbinary(MAX)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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);
IF @TestEngineerId <= 0
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
,[NumberOfEvents] = @NumberOfEvents
,[StrictDiagnostics] = @StrictDiagnostics
,[RequireConfirmationOnErrors] = @RequireConfirmationOnErrors
,[ROIDownload] = @ROIDownload
,[ViewROIDownload] = @ViewROIDownload
,[DownloadAll] = @DownloadAll
,[ViewRealtime] = @ViewRealtime
,[RealtimePlotCount] = @RealtimePlotCount
,[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
,[DoStreaming] = @DoStreaming
,[ClockSyncProfileMaster] = CASE WHEN
@ClockSyncProfileMaster='None' OR
@ClockSyncProfileMaster='Manual' OR
@ClockSyncProfileMaster='Slave_E2E' OR
@ClockSyncProfileMaster='Master_E2E' OR
@ClockSyncProfileMaster='Auto_E2E' OR
@ClockSyncProfileMaster='Master_E2E_IRIG' OR
@ClockSyncProfileMaster='Master_E2E_IRIG_EXT_PPS' OR
@ClockSyncProfileMaster='Master_E2E_GPS' OR
@ClockSyncProfileMaster='Master_E2E_GPS_EXT_PPS' OR
@ClockSyncProfileMaster='IRIG' OR
@ClockSyncProfileMaster='IRIG_EXT_PPS' OR
@ClockSyncProfileMaster='GPS' OR
@ClockSyncProfileMaster='GPS_EXT_PPS' OR
@ClockSyncProfileMaster='EXT_PPS'
THEN
@ClockSyncProfileMaster
ELSE
'None'
END
,[ClockSyncProfileSlave] = CASE WHEN
@ClockSyncProfileSlave='None' OR
@ClockSyncProfileSlave='Manual' OR
@ClockSyncProfileSlave='Slave_E2E' OR
@ClockSyncProfileSlave='Master_E2E' OR
@ClockSyncProfileSlave='Auto_E2E' OR
@ClockSyncProfileSlave='Master_E2E_IRIG' OR
@ClockSyncProfileSlave='Master_E2E_IRIG_EXT_PPS' OR
@ClockSyncProfileSlave='Master_E2E_GPS' OR
@ClockSyncProfileSlave='Master_E2E_GPS_EXT_PPS' OR
@ClockSyncProfileSlave='IRIG' OR
@ClockSyncProfileSlave='IRIG_EXT_PPS' OR
@ClockSyncProfileSlave='GPS' OR
@ClockSyncProfileSlave='GPS_EXT_PPS' OR
@ClockSyncProfileSlave='EXT_PPS'
THEN
@ClockSyncProfileSlave
ELSE
'None'
END
,[ExtraProperties] = @ExtraProperties
,[MeasureSquibResistancesStep] = @MeasureSquibResistancesStep
,[TestSetupUniqueId] = @TestSetupUniqueId
,[TestSetup] = @TestSetup
,[WakeupAndTriggerOn] = @WakeupAndTriggerOn
,[WakeupTrigger] = @WakeupTrigger
,[WakeUpMotionTimeout] = @WakeUpMotionTimeout
,[TimedIntervalFrequency] = @TimedIntervalFrequency
,[RTCScheduleStartDateTime] = @RTCScheduleStartDateTime
,[RTCScheduleDuration] = @RTCScheduleDuration
,[StartWithEvent] = @StartWithEvent
WHERE [TestSetupId] = @TestSetupId
end
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch;
END

View File

@@ -0,0 +1 @@
ALTER TABLE [dbo].[TestSetups] ADD RepeatAutoArmOrStreaming [bit] NULL;

View File

@@ -0,0 +1,95 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsGet_92]
@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]
,[NumberOfEvents]
,[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]
,[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]
,isnull([DoStreaming], 0) as [DoStreaming]
,[ClockSyncProfileMaster]
,[ClockSyncProfileSlave]
,[ExtraProperties]
,isnull([MeasureSquibResistancesStep], 0) as [MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent]
,isnull([RepeatAutoArmOrStreaming], 0) as [RepeatAutoArmOrStreaming]
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,236 @@
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
,@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
,@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
,@new_id output
,@errorNumber output
,@errorMessage output
end;
END

View File

@@ -0,0 +1,295 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsInsert_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
,@NumberOfEvents int
,@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)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@RepeatAutoArmOrStreaming bit
,@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]
,[NumberOfEvents]
,[StrictDiagnostics]
,[RequireConfirmationOnErrors]
,[ROIDownload]
,[ViewROIDownload]
,[DownloadAll]
,[ViewRealtime]
,[RealtimePlotCount]
,[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]
,[DoStreaming]
,[ClockSyncProfileMaster]
,[ClockSyncProfileSlave]
,[ExtraProperties]
,[MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent]
,[RepeatAutoArmOrStreaming])
VALUES
( @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@NumberOfEvents
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@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
,@DoStreaming
,@ClockSyncProfileMaster
,@ClockSyncProfileSlave
,@ExtraProperties
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent
,@RepeatAutoArmOrStreaming)
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,260 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsUpdateInsert_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
,@NumberOfEvents int
,@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)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@RepeatAutoArmOrStreaming 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
,@NumberOfEvents
,@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
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent
,@RepeatAutoArmOrStreaming
,@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
,@NumberOfEvents
,@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
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent
,@RepeatAutoArmOrStreaming
,@new_id output
,@errorNumber output
,@errorMessage output
end;
END

View File

@@ -0,0 +1,212 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsUpdate_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
,@NumberOfEvents int
,@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)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@RepeatAutoArmOrStreaming bit
,@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);
IF @TestEngineerId <= 0
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
,[NumberOfEvents] = @NumberOfEvents
,[StrictDiagnostics] = @StrictDiagnostics
,[RequireConfirmationOnErrors] = @RequireConfirmationOnErrors
,[ROIDownload] = @ROIDownload
,[ViewROIDownload] = @ViewROIDownload
,[DownloadAll] = @DownloadAll
,[ViewRealtime] = @ViewRealtime
,[RealtimePlotCount] = @RealtimePlotCount
,[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
,[DoStreaming] = @DoStreaming
,[ClockSyncProfileMaster] = @ClockSyncProfileMaster
,[ClockSyncProfileSlave] = @ClockSyncProfileSlave
,[ExtraProperties] = @ExtraProperties
,[MeasureSquibResistancesStep] = @MeasureSquibResistancesStep
,[TestSetupUniqueId] = @TestSetupUniqueId
,[TestSetup] = @TestSetup
,[WakeupAndTriggerOn] = @WakeupAndTriggerOn
,[WakeupTrigger] = @WakeupTrigger
,[WakeUpMotionTimeout] = @WakeUpMotionTimeout
,[TimedIntervalFrequency] = @TimedIntervalFrequency
,[RTCScheduleStartDateTime] = @RTCScheduleStartDateTime
,[RTCScheduleDuration] = @RTCScheduleDuration
,[StartWithEvent] = @StartWithEvent
,[RepeatAutoArmOrStreaming] = @RepeatAutoArmOrStreaming
WHERE [TestSetupId] = @TestSetupId
end
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch;
END

View File

@@ -0,0 +1,19 @@
CREATE PROCEDURE [dbo].[sp_DefaultPropertiesInsert]
@PropertyId int
,@PropertyName nvarchar(max)
,@DefaultValue nvarchar(max)
,@errorNumber int output
,@errorMessage nvarchar(250) output
AS
BEGIN
set @errorNumber = 0; set @errorMessage = space(0);
insert into [dbo].[DefaultProperties]
([PropertyId]
,[PropertyName]
,[DefaultValue])
values
(@PropertyId
,@PropertyName
,@DefaultValue)
END

View File

@@ -0,0 +1,2 @@
ALTER TABLE [dbo].[TestSetups] ADD IgnoreShortedStart [bit] NULL;
ALTER TABLE [dbo].[TestSetups] ADD IgnoreShortedTrigger [bit] NULL;

View File

@@ -0,0 +1,97 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsGet_92]
@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]
,[NumberOfEvents]
,[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]
,[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]
,isnull([DoStreaming], 0) as [DoStreaming]
,[ClockSyncProfileMaster]
,[ClockSyncProfileSlave]
,[ExtraProperties]
,isnull([MeasureSquibResistancesStep], 0) as [MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent]
,isnull([RepeatAutoArmOrStreaming], 0) as [RepeatAutoArmOrStreaming]
,isnull([IgnoreShortedStart], 0) as [IgnoreShortedStart]
,isnull([IgnoreShortedTrigger], 0) as [IgnoreShortedTrigger]
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,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

View File

@@ -0,0 +1,301 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsInsert_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
,@NumberOfEvents int
,@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)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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);
/* 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]
,[NumberOfEvents]
,[StrictDiagnostics]
,[RequireConfirmationOnErrors]
,[ROIDownload]
,[ViewROIDownload]
,[DownloadAll]
,[ViewRealtime]
,[RealtimePlotCount]
,[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]
,[DoStreaming]
,[ClockSyncProfileMaster]
,[ClockSyncProfileSlave]
,[ExtraProperties]
,[MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent]
,[RepeatAutoArmOrStreaming]
,[IgnoreShortedStart]
,[IgnoreShortedTrigger])
VALUES
( @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@NumberOfEvents
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@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
,@DoStreaming
,@ClockSyncProfileMaster
,@ClockSyncProfileSlave
,@ExtraProperties
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent
,@RepeatAutoArmOrStreaming
,@IgnoreShortedStart
,@IgnoreShortedTrigger)
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,265 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsUpdateInsert_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
,@NumberOfEvents int
,@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)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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
,@NumberOfEvents
,@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
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent
,@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
,@NumberOfEvents
,@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
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent
,@RepeatAutoArmOrStreaming
,@IgnoreShortedStart
,@IgnoreShortedTrigger
,@new_id output
,@errorNumber output
,@errorMessage output
end;
END

View File

@@ -0,0 +1,215 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsUpdate_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
,@NumberOfEvents int
,@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)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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); 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);
IF @TestEngineerId <= 0
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
,[NumberOfEvents] = @NumberOfEvents
,[StrictDiagnostics] = @StrictDiagnostics
,[RequireConfirmationOnErrors] = @RequireConfirmationOnErrors
,[ROIDownload] = @ROIDownload
,[ViewROIDownload] = @ViewROIDownload
,[DownloadAll] = @DownloadAll
,[ViewRealtime] = @ViewRealtime
,[RealtimePlotCount] = @RealtimePlotCount
,[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
,[DoStreaming] = @DoStreaming
,[ClockSyncProfileMaster] = @ClockSyncProfileMaster
,[ClockSyncProfileSlave] = @ClockSyncProfileSlave
,[ExtraProperties] = @ExtraProperties
,[MeasureSquibResistancesStep] = @MeasureSquibResistancesStep
,[TestSetupUniqueId] = @TestSetupUniqueId
,[TestSetup] = @TestSetup
,[WakeupAndTriggerOn] = @WakeupAndTriggerOn
,[WakeupTrigger] = @WakeupTrigger
,[WakeUpMotionTimeout] = @WakeUpMotionTimeout
,[TimedIntervalFrequency] = @TimedIntervalFrequency
,[RTCScheduleStartDateTime] = @RTCScheduleStartDateTime
,[RTCScheduleDuration] = @RTCScheduleDuration
,[StartWithEvent] = @StartWithEvent
,[RepeatAutoArmOrStreaming] = @RepeatAutoArmOrStreaming
,[IgnoreShortedStart] = @IgnoreShortedStart
,[IgnoreShortedTrigger] = @IgnoreShortedTrigger
WHERE [TestSetupId] = @TestSetupId
end
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch;
END

View File

@@ -0,0 +1,5 @@
INSERT INTO dbo.StoredProcedureVersions VALUES('sp_TestSetupsInsert', 92)
INSERT INTO dbo.StoredProcedureVersions VALUES('sp_TestSetupsInsertUpdate', 92)
INSERT INTO dbo.StoredProcedureVersions VALUES('sp_TestSetupsUpdate', 92)
INSERT INTO dbo.StoredProcedureVersions VALUES('sp_TestSetupsUpdateInsert', 92)
INSERT INTO dbo.StoredProcedureVersions VALUES('sp_TestSetupsGet', 92)

View File

@@ -0,0 +1,43 @@
ALTER PROCEDURE [dbo].[sp_TestSetupsAndGroupsDeleteAll]
@ErrorMessage nvarchar(250) output
,@ErrorSeverity int output
,@ErrorState int output
AS
BEGIN
SET @ErrorState = 0
SET @ErrorMessage = SPACE(0)
SET @ErrorSeverity = 0
BEGIN TRY
BEGIN TRANSACTION [tDeleteTestSetups]
DELETE FROM [dbo].[TestSetupObjectMetaData]
DELETE FROM [dbo].[TestSetupHardware]
DELETE FROM [dbo].[LevelTriggers]
DELETE FROM [dbo].[CalculatedChannels]
DELETE FROM [dbo].[TestGraphs]
--We must delete from ROIPeriodChannels before deleting from TestSetupROIs
DELETE FROM [dbo].[ROIPeriodChannels]
DELETE FROM [dbo].[TestSetupROIs]
/*Delete group channel settings*/
DELETE FROM [dbo].[GroupChannelSettings]
/*Delete group hardware*/
DELETE FROM [dbo].[GroupHardware]
/*Delete group channels*/
DELETE FROM [dbo].[Channels]
/*unassociate the group from the test setup*/
DELETE FROM [dbo].[TestSetupGroups]
/*delete the groups*/
DELETE FROM [dbo].[Groups]
DELETE FROM [dbo].[TestSetups]
COMMIT TRANSACTION [tDeleteTestSetups]
END TRY
BEGIN CATCH
set @ErrorMessage = ERROR_MESSAGE()
set @ErrorSeverity = ERROR_SEVERITY()
set @ErrorState = ERROR_STATE();
rollback transaction [tDeleteTestSetups]
END CATCH;
END

View File

@@ -0,0 +1,127 @@
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 t.[TestSetupId]
,[TestSetupName] as 'SetupName'
,[SetupDescription]
,[AutomaticTestProgression]
,[AutomaticProgressionDelayMS]
,[InvertTrigger]
,[InvertStart]
,[ViewDiagnostics]
,[VerifyChannels]
,[AutoVerifyChannels]
,[VerifyChannelsDelayMS]
,[RecordingMode]
,[SamplesPerSecond]
,[PreTriggerSeconds]
,[PostTriggerSeconds]
,[NumberOfEvents]
,[StrictDiagnostics]
,[RequireConfirmationOnErrors]
,[ROIDownload]
,[ViewROIDownload]
,[DownloadAll]
,[ViewRealtime]
,[RealtimePlotCount]
,dbo.foo_RegionsOfInterestString(t.TestSetupId) as [RegionsOfInterest]
,t.[ROIStart]
,t.[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]
,isnull([DoStreaming], 0) as [DoStreaming]
,CASE WHEN t.[ClockSyncProfileMaster]='None' OR
t.[ClockSyncProfileMaster]='Manual' OR
t.[ClockSyncProfileMaster]='Slave_E2E' OR
t.[ClockSyncProfileMaster]='Master_E2E' OR
t.[ClockSyncProfileMaster]='Auto_E2E' OR
t.[ClockSyncProfileMaster]='Master_E2E_IRIG' OR
t.[ClockSyncProfileMaster]='Master_E2E_IRIG_EXT_PPS' OR
t.[ClockSyncProfileMaster]='Master_E2E_GPS' OR
t.[ClockSyncProfileMaster]='Master_E2E_GPS_EXT_PPS' OR
t.[ClockSyncProfileMaster]='IRIG' OR
t.[ClockSyncProfileMaster]='IRIG_EXT_PPS' OR
t.[ClockSyncProfileMaster]='GPS' OR
t.[ClockSyncProfileMaster]='GPS_EXT_PPS' OR
t.[ClockSyncProfileMaster]='EXT_PPS'
THEN t.[ClockSyncProfileMaster]
ELSE 'None'
END as [ClockSyncProfileMaster]
,CASE WHEN t.[ClockSyncProfileSlave]='None' OR
t.[ClockSyncProfileSlave]='Manual' OR
t.[ClockSyncProfileSlave]='Slave_E2E' OR
t.[ClockSyncProfileSlave]='Master_E2E' OR
t.[ClockSyncProfileSlave]='Auto_E2E' OR
t.[ClockSyncProfileSlave]='Master_E2E_IRIG' OR
t.[ClockSyncProfileSlave]='Master_E2E_IRIG_EXT_PPS' OR
t.[ClockSyncProfileSlave]='Master_E2E_GPS' OR
t.[ClockSyncProfileSlave]='Master_E2E_GPS_EXT_PPS' OR
t.[ClockSyncProfileSlave]='IRIG' OR
t.[ClockSyncProfileSlave]='IRIG_EXT_PPS' OR
t.[ClockSyncProfileSlave]='GPS' OR
t.[ClockSyncProfileSlave]='GPS_EXT_PPS' OR
t.[ClockSyncProfileSlave]='EXT_PPS'
THEN t.[ClockSyncProfileSlave]
ELSE 'None'
END as [ClockSyncProfileSlave]
,[ExtraProperties]
,isnull([MeasureSquibResistancesStep], 0) as [MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent]
from [dbo].[TestSetups] t inner join [dbo].[TestSetupROIs] r ON t.TestSetupId = r.TestSetupId
where ((@TestSetupId is null or @TestSetupId= 0) or t.TestSetupId = @TestSetupId)
and (r.Suffix = '' or r.Suffix = '_ROI Period 1') -- Don't return duplicates if there are multiple ROIs
and (@TestSetupName is null or TestSetupName = @TestSetupName);
END

View File

@@ -0,0 +1,334 @@
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
,@NumberOfEvents int
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId nvarchar(max)
,@TestSetup varbinary(MAX)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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]
,[NumberOfEvents]
,[StrictDiagnostics]
,[RequireConfirmationOnErrors]
,[ROIDownload]
,[ViewROIDownload]
,[DownloadAll]
,[ViewRealtime]
,[RealtimePlotCount]
,[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]
,[DoStreaming]
,[ClockSyncProfileMaster]
,[ClockSyncProfileSlave]
,[ExtraProperties]
,[MeasureSquibResistancesStep]
,[TestSetupUniqueId]
,[TestSetup]
,[WakeupAndTriggerOn]
,[WakeupTrigger]
,[WakeUpMotionTimeout]
,[TimedIntervalFrequency]
,[RTCScheduleStartDateTime]
,[RTCScheduleDuration]
,[StartWithEvent])
VALUES
( @TestSetupName
,@SetupDescription
,@AutomaticTestProgression
,@AutomaticProgressionDelayMS
,@InvertTrigger
,@InvertStart
,@ViewDiagnostics
,@VerifyChannels
,@AutoVerifyChannels
,@VerifyChannelsDelayMS
,@RecordingMode
,@SamplesPerSecond
,@PreTriggerSeconds
,@PostTriggerSeconds
,@NumberOfEvents
,@StrictDiagnostics
,@RequireConfirmationOnErrors
,@ROIDownload
,@ViewROIDownload
,@DownloadAll
,@ViewRealtime
,@RealtimePlotCount
,@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
,@DoStreaming
,CASE WHEN
@ClockSyncProfileMaster='None' OR
@ClockSyncProfileMaster='Manual' OR
@ClockSyncProfileMaster='Slave_E2E' OR
@ClockSyncProfileMaster='Master_E2E' OR
@ClockSyncProfileMaster='Auto_E2E' OR
@ClockSyncProfileMaster='Master_E2E_IRIG' OR
@ClockSyncProfileMaster='Master_E2E_IRIG_EXT_PPS' OR
@ClockSyncProfileMaster='Master_E2E_GPS' OR
@ClockSyncProfileMaster='Master_E2E_GPS_EXT_PPS' OR
@ClockSyncProfileMaster='IRIG' OR
@ClockSyncProfileMaster='IRIG_EXT_PPS' OR
@ClockSyncProfileMaster='GPS' OR
@ClockSyncProfileMaster='GPS_EXT_PPS' OR
@ClockSyncProfileMaster='EXT_PPS'
THEN
@ClockSyncProfileMaster
ELSE
'None'
END
,CASE WHEN
@ClockSyncProfileSlave='None' OR
@ClockSyncProfileSlave='Manual' OR
@ClockSyncProfileSlave='Slave_E2E' OR
@ClockSyncProfileSlave='Master_E2E' OR
@ClockSyncProfileSlave='Auto_E2E' OR
@ClockSyncProfileSlave='Master_E2E_IRIG' OR
@ClockSyncProfileSlave='Master_E2E_IRIG_EXT_PPS' OR
@ClockSyncProfileSlave='Master_E2E_GPS' OR
@ClockSyncProfileSlave='Master_E2E_GPS_EXT_PPS' OR
@ClockSyncProfileSlave='IRIG' OR
@ClockSyncProfileSlave='IRIG_EXT_PPS' OR
@ClockSyncProfileSlave='GPS' OR
@ClockSyncProfileSlave='GPS_EXT_PPS' OR
@ClockSyncProfileSlave='EXT_PPS'
THEN
@ClockSyncProfileSlave
ELSE
'None'
END
,@ExtraProperties
,@MeasureSquibResistancesStep
,@TestSetupUniqueId
,@TestSetup
,@WakeupAndTriggerOn
,@WakeupTrigger
,@WakeUpMotionTimeout
,@TimedIntervalFrequency
,@RTCScheduleStartDateTime
,@RTCScheduleDuration
,@StartWithEvent)
set @new_id = scope_identity()
-- Now build the TestSetupROIs and ROIPeriodChannels tables
exec [dbo].[sp_StringToRegionsOfInterestTables] @new_id, @RegionsOfInterest
end
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch;
END

View File

@@ -0,0 +1,257 @@
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
,@NumberOfEvents int
,@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)
,@MeasureSquibResistancesStep bit
,@TestSetupUniqueId nvarchar(max)
,@TestSetup varbinary(MAX)
,@WakeupAndTriggerOn bit
,@WakeupTrigger smallint
,@WakeUpMotionTimeout int
,@TimedIntervalFrequency int
,@RTCScheduleStartDateTime datetime
,@RTCScheduleDuration bigint
,@StartWithEvent bit
,@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);
IF @TestEngineerId <= 0
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
,[NumberOfEvents] = @NumberOfEvents
,[StrictDiagnostics] = @StrictDiagnostics
,[RequireConfirmationOnErrors] = @RequireConfirmationOnErrors
,[ROIDownload] = @ROIDownload
,[ViewROIDownload] = @ViewROIDownload
,[DownloadAll] = @DownloadAll
,[ViewRealtime] = @ViewRealtime
,[RealtimePlotCount] = @RealtimePlotCount
,[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
,[DoStreaming] = @DoStreaming
,[ClockSyncProfileMaster] = CASE WHEN
@ClockSyncProfileMaster='None' OR
@ClockSyncProfileMaster='Manual' OR
@ClockSyncProfileMaster='Slave_E2E' OR
@ClockSyncProfileMaster='Master_E2E' OR
@ClockSyncProfileMaster='Auto_E2E' OR
@ClockSyncProfileMaster='Master_E2E_IRIG' OR
@ClockSyncProfileMaster='Master_E2E_IRIG_EXT_PPS' OR
@ClockSyncProfileMaster='Master_E2E_GPS' OR
@ClockSyncProfileMaster='Master_E2E_GPS_EXT_PPS' OR
@ClockSyncProfileMaster='IRIG' OR
@ClockSyncProfileMaster='IRIG_EXT_PPS' OR
@ClockSyncProfileMaster='GPS' OR
@ClockSyncProfileMaster='GPS_EXT_PPS' OR
@ClockSyncProfileMaster='EXT_PPS'
THEN
@ClockSyncProfileMaster
ELSE
'None'
END
,[ClockSyncProfileSlave] = CASE WHEN
@ClockSyncProfileSlave='None' OR
@ClockSyncProfileSlave='Manual' OR
@ClockSyncProfileSlave='Slave_E2E' OR
@ClockSyncProfileSlave='Master_E2E' OR
@ClockSyncProfileSlave='Auto_E2E' OR
@ClockSyncProfileSlave='Master_E2E_IRIG' OR
@ClockSyncProfileSlave='Master_E2E_IRIG_EXT_PPS' OR
@ClockSyncProfileSlave='Master_E2E_GPS' OR
@ClockSyncProfileSlave='Master_E2E_GPS_EXT_PPS' OR
@ClockSyncProfileSlave='IRIG' OR
@ClockSyncProfileSlave='IRIG_EXT_PPS' OR
@ClockSyncProfileSlave='GPS' OR
@ClockSyncProfileSlave='GPS_EXT_PPS' OR
@ClockSyncProfileSlave='EXT_PPS'
THEN
@ClockSyncProfileSlave
ELSE
'None'
END
,[ExtraProperties] = @ExtraProperties
,[MeasureSquibResistancesStep] = @MeasureSquibResistancesStep
,[TestSetupUniqueId] = @TestSetupUniqueId
,[TestSetup] = @TestSetup
,[WakeupAndTriggerOn] = @WakeupAndTriggerOn
,[WakeupTrigger] = @WakeupTrigger
,[WakeUpMotionTimeout] = @WakeUpMotionTimeout
,[TimedIntervalFrequency] = @TimedIntervalFrequency
,[RTCScheduleStartDateTime] = @RTCScheduleStartDateTime
,[RTCScheduleDuration] = @RTCScheduleDuration
,[StartWithEvent] = @StartWithEvent
WHERE [TestSetupId] = @TestSetupId
--We must delete from ROIPeriodChannels before deleting from TestSetupROIs
DELETE FROM [dbo].[ROIPeriodChannels] WHERE TestSetupROIId IN ( SELECT TestSetupROIId FROM TestSetupROIs
WHERE TestSetupId = @TestSetupId)
DELETE FROM [dbo].[TestSetupROIs] WHERE TestSetupId = @TestSetupId
-- Now build the TestSetupROIs and ROIPeriodChannels tables
exec [dbo].[sp_StringToRegionsOfInterestTables] @new_id, @RegionsOfInterest
end
end try
begin catch
set @errorMessage = error_message()
set @errorNumber = error_number()
end catch;
END

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, 7, 1024, 1, -1, 0, 0, 0, 0, 'S6A-StreamOut1', 3 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,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,3 @@
UPDATE [dbo].[DAS]
SET MaxModules=4, Channels=8, ChannelTypes='0,0,0,0,0,0,5,6'
WHERE Type = '36' AND Position <> 'Prototype' AND ChannelTypes = '0,0,0,0,0,0'

View File

@@ -0,0 +1 @@
UPDATE DAS SET MaxSampleRate = 20000, MinSampleRate = 100 WHERE TYPE = 40 OR TYPE = 41