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,23 @@
CREATE PROCEDURE [dbo].[sp_SensorsStreamOutputGet]
@Id INT = null,
@SerialNumber NVARCHAR (50) = null
AS
BEGIN
SET NOCOUNT ON;
IF( @Id IS NULL)
BEGIN
IF NULLIF(@SerialNumber, '') IS NULL
BEGIN
SELECT A.id, A.SerialNumber, B.StreamProfile, B.UDPAddress, B.TimeChannelId, B.DataChannelId, B.TmNSConfig, B.IRIGTimeDataPacketIntervalMs, B.LastModified, B.LastModifiedBy, B.UserTags, B.Broken, B.DoNotUse FROM [dbo].[Sensors] AS A INNER JOIN [dbo].[SensorsStreamOutput] AS B ON A.id=B.SensorId INNER JOIN [dbo].SensorsType AS C ON A.SensorType=C.TypeId WHERE C.SensorType='StreamOutput'
END
ELSE
BEGIN
SELECT A.id, A.SerialNumber, B.StreamProfile, B.UDPAddress, B.TimeChannelId, B.DataChannelId, B.TmNSConfig, B.IRIGTimeDataPacketIntervalMs, B.LastModified, B.LastModifiedBy, B.UserTags, B.Broken, B.DoNotUse FROM [dbo].[Sensors] AS A INNER JOIN [dbo].[SensorsStreamOutput] AS B ON A.id=B.SensorId INNER JOIN [dbo].SensorsType AS C ON A.SensorType=C.TypeId WHERE C.SensorType='StreamOutput' AND A.SerialNumber=@SerialNumber
END
END
ELSE
BEGIN
SELECT A.id, A.SerialNumber, B.StreamProfile, B.UDPAddress, B.TimeChannelId, B.DataChannelId, B.TmNSConfig, B.IRIGTimeDataPacketIntervalMs, B.LastModified, B.LastModifiedBy, B.UserTags, B.Broken, B.DoNotUse FROM [dbo].[Sensors] AS A INNER JOIN [dbo].[SensorsStreamOutput] AS B ON A.id=B.SensorId INNER JOIN [dbo].SensorsType AS C ON A.SensorType=C.TypeId WHERE C.SensorType='StreamOutput' AND A.id=@Id
END
END

View File

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