@@ -31,10 +31,11 @@ DECLARE @LineId nvarchar(64) = 'ablegacy-smoke-line';
|
||||
DECLARE @EqId nvarchar(64) = 'ablegacy-smoke-eq';
|
||||
DECLARE @EqUuid uniqueidentifier = '5A1D2030-5A1D-4203-A5A1-D20305A1D203';
|
||||
DECLARE @TagId nvarchar(64) = 'ablegacy-smoke-tag-n7_5';
|
||||
DECLARE @ArrTagId nvarchar(64) = 'ablegacy-smoke-tag-n7_block';
|
||||
|
||||
BEGIN TRAN;
|
||||
|
||||
DELETE FROM dbo.Tag WHERE TagId IN (@TagId);
|
||||
DELETE FROM dbo.Tag WHERE TagId IN (@TagId, @ArrTagId);
|
||||
DELETE FROM dbo.Equipment WHERE EquipmentId = @EqId;
|
||||
DELETE FROM dbo.UnsLine WHERE UnsLineId = @LineId;
|
||||
DELETE FROM dbo.UnsArea WHERE UnsAreaId = @AreaId;
|
||||
@@ -99,6 +100,14 @@ VALUES (@Gen, @DrvId, @ClusterId, @NsId, 'ablegacy-smoke', 'AbLegacy', N'{
|
||||
"DataType": "Int",
|
||||
"Writable": true,
|
||||
"WriteIdempotent": true
|
||||
},
|
||||
{
|
||||
"Name": "N7_Block",
|
||||
"DeviceHostAddress": "ab://127.0.0.1:44818/1,0",
|
||||
"Address": "N7:0,10",
|
||||
"DataType": "Int",
|
||||
"Writable": false,
|
||||
"ArrayLength": 10
|
||||
}
|
||||
]
|
||||
}', 1);
|
||||
@@ -108,6 +117,17 @@ INSERT dbo.Tag(GenerationId, TagId, DriverInstanceId, EquipmentId, Name, DataTyp
|
||||
VALUES (@Gen, @TagId, @DrvId, @EqId, 'N7_5', 'Int16', 'ReadWrite',
|
||||
N'{"FullName":"N7_5","Address":"N7:5","DataType":"Int"}', 1);
|
||||
|
||||
-- PR 7 — array contiguous-block tag. The TagConfig JSON carries the address suffix
|
||||
-- + ArrayLength override; the driver picks both up at discovery time and emits the
|
||||
-- DriverAttributeInfo with IsArray=true + ArrayDim=10 so the generic node manager
|
||||
-- materialises a 1-D Int16 array variable. The dbo.Tag schema doesn't carry
|
||||
-- IsArray/ArrayDim columns — the array shape is fully driver-side metadata.
|
||||
-- Read-only because the smoke harness only exercises array reads.
|
||||
INSERT dbo.Tag(GenerationId, TagId, DriverInstanceId, EquipmentId, Name, DataType,
|
||||
AccessLevel, TagConfig, WriteIdempotent)
|
||||
VALUES (@Gen, @ArrTagId, @DrvId, @EqId, 'N7_Block', 'Int16', 'Read',
|
||||
N'{"FullName":"N7_Block","Address":"N7:0,10","DataType":"Int","ArrayLength":10}', 0);
|
||||
|
||||
EXEC dbo.sp_PublishGeneration @ClusterId = @ClusterId, @DraftGenerationId = @Gen,
|
||||
@Notes = N'AB Legacy smoke — task #213';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user