代码如下:
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
GO
/* ===========================================================================
CIU_PCUDefaultStreams_SP
Author: Yaping Xin
Create date: November 19 2013
Description: Get PCU Default Streams list via aircraft ID.
Document: MCT Requirement section 10.8.2.5
History: Created by Yaping Xin at November 1 2013
=========================================================================== */
IF NOT EXISTS
(
select * from sys.procedures
inner join sys.schemas on procedures.schema_id = schemas.schema_id
where
schemas.name = 'dbo' and
procedures.name = 'CIU_PCUDefaultStreams_SP'
)
Begin
EXEC sp_ExecuteSQL N'CREATE PROC dbo.CIU_PCUDefaultStreams_SP as RAISERROR(''dbo.CIU_PCUDefaultStreams_SP is incomplete'', 16, 127);';
PRINT '[Info] Stored Procedure dbo.CIU_PCUDefaultStreams_SP is created.';
End
GO
ALTER PROCEDURE [dbo].[CIU_PCUDefaultStreams_SP]
@idAircraft numeric(18, 0)
AS
BEGIN
SET NOCOUNT ON;
----------------------------
/* [Begin] USE_Temp_Panel */
----------------------------
create table #Panel
(
idRowPanel numeric(18, 0),
idPanel numeric(18, 0),
MajorVersion nvarchar(50),
MinorVersion numeric(18, 0),
PanelName nvarchar(200),
LRURangeId numeric(18, 0),
LRUId numeric(18, 0),
DefaultCommandsCount int,
DefaultStreamId int,
log varchar(max)
);
---------------------------------------------------------------------------------------------
/* [Begin] Get hardcode value: CIU - PCU Default commands - hardcode values in JSON format */
---------------------------------------------------------------------------------------------
Declare @hardcodeValuesInJson varchar(max);
select @hardcodeValuesInJson = [Value] from tblHardcodedValues where idRow = '701';
IF @hardcodeValuesInJson is NULL GOTO END_HardcodeValuesMissed;
Declare @ProtocolMsgIdText varchar(50);
Declare @BytesOffset int;
Declare @FlagBytePosition int;
Declare @FlagByteWchar char(2);
BEGIN TRY
select * into #jsonTable from dbo.ParseJSON(@hardcodeValuesInJson);
END TRY
BEGIN CATCH
GOTO END_HardcodeValuesMissed;
END CATCH;
select @ProtocolMsgIdText = StringValue from #jsonTable where name = 'ProtocolMsgIdText';
IF @ProtocolMsgIdText is NULL GOTO END_HardcodeValuesMissed;
select @BytesOffset = BigIntValue from #jsonTable where name = 'BytesOffset';
IF @BytesOffset is NULL GOTO END_HardcodeValuesMissed;
select @FlagBytePosition = BigIntValue from #jsonTable where name = 'FlagBytePosition';
IF @FlagBytePosition is NULL GOTO END_HardcodeValuesMissed;
select @FlagByteWchar = StringValue from #jsonTable where name = 'FlagByteWchar';
IF @FlagByteWchar is NULL GOTO END_HardcodeValuesMissed;
-- [Debug]
print '@ProtocolMsgIdText: ' + @ProtocolMsgIdText;
print '@BytesOffset: ' + cast(@BytesOffset as varchar(max));
print '@FlagBytePosition: ' + cast(@FlagBytePosition as varchar(max));
print '@FlagByteWchar: ' + @FlagByteWchar;
------------------------------------
/* [Begin] USE_Temp_StreamIdBytes */
------------------------------------
Declare @N_StreamIdBytes int;
create table #StreamIdBytes
(
BytePosition int
)
INSERT into #StreamIdBytes
SELECT T.BigIntValue
FROM #jsonTable T
INNER JOIN #jsonTable P
ON
T.parent_id = P.object_id
WHERE
P.name = 'StreamIdBytes' AND
T.name = 'BytePosition'
ORDER BY T.BigIntValue DESC; -- <-- Little Endian shall use DESC, Big Endian use ASC
-- [Debug]
-- select * from #StreamIdBytes;
drop table #jsonTable;
SELECT @N_StreamIdBytes = count(*) FROM #StreamIdBytes;
IF @N_StreamIdBytes <= 0 GOTO END_OF_USE_Temp_StreamIdBytes;
---------------------------------------------------------------------------------------------
/* [End] Get hardcode value: CIU - PCU Default commands - hardcode values in JSON format */
---------------------------------------------------------------------------------------------
declare @currentMinorVersion decimal(18,0);
set @currentMinorVersion = 0;
---------------------------------------------------------------
/* [Begin] Select PCU panels of current aircraft into #Panel */
---------------------------------------------------------------
INSERT into #Panel
SELECT
P.idRow as idRowPanel,
P.idPanel,
P.MajorVersion,
@currentMinorVersion, -- <-- MinorVersion
P.PanelName,
P.LRURangeId,
P.LRUId,
0, -- <-- DefaultCommandsCount
0, -- <-- DefaultStreamId
'' -- <-- log
FROM tblPanel P WITH (NOLOCK)
INNER JOIN tblVersion V WITH (NOLOCK)
ON
P.idAircraft = V.idAircraft AND
P.idPanel = V.idPanel AND
P.MajorVersion = V.MajorVersion
WHERE
P.idAircraft = @idAircraft AND
P.MinorVersion = @currentMinorVersion AND
P.IsDeleted = 0 AND
(P.LRUId = 1 or P.LRUId = 2);
---------------------------------------------------------------
/* [End] Select PCU panels of current aircraft into #Panel */
---------------------------------------------------------------
/* IF NO record in #Panel then no action is needed. EXIT. */
IF NOT EXISTS( select * from #Panel ) GOTO END_OF_USE_Temp_Panel;
--------------------------
/* [Begin] USE_Temp_Cmd */
--------------------------
create table #Cmd
(
idRowPanel numeric(18, 0),
idRowLayer numeric(18, 0),
LayerName nvarchar(150),
idRowButton numeric(18, 0),
idRowButtonState numeric(18, 0),
StateOffset numeric(18, 0),
StateDesc nvarchar(500),
idRowButtonCommand numeric(18, 0),
MessageId numeric(18, 0),
CommandName nvarchar(500),
MsgData varbinary(1500),
IsDefaultCommand bit,
StreamId numeric(18, 0),
StreamIdAvailable bit
);
--------------------------------------------------------------------------------------
/* [Begin] Select default commands (Not check raw data) realted to #Panel into #Cmd */
--------------------------------------------------------------------------------------
INSERT into #Cmd
select
P.idRowPanel,
L.idRow idRowLayer,
L.LayerName,
tblButtonControl.idRow idRowButton,
BS.idRow idRowButtonState,
BS.StateOffset,
BS.StateDesc,
Bcmd.idRow idRowButtonCommand,
Bcmd.MessageId,
M.CommandName,
M.MsgData,
0, -- <-- IsDefaultCommand
0, -- <-- StreamId
0 -- <-- StreamIdAvailable
From tblButtonCommand BCmd WITH (NOLOCK)
INNER JOIN tblButtonState BS WITH (NOLOCK)
ON
BCmd.idButtonState = BS.idButtonState AND
BCmd.MajorVersion = BS.MajorVersion
INNER JOIN tblButtonControl WITH (NOLOCK)
ON
BS.idButtonControl = tblButtonControl.idButtonControl AND
BS.MajorVersion = tblButtonControl.MajorVersion
INNER JOIN tblControls WITH (NOLOCK)
ON
tblButtonControl.idControl = tblControls.idControl
INNER JOIN tblLayer L WITH (NOLOCK)
ON
tblControls.idLayer = L.idLayer
INNER JOIN #Panel P
ON
L.idPanel = P.idPanel AND
L.MajorVersion = P.MajorVersion
INNER JOIN tblMessage M WITH (NOLOCK)
ON
Bcmd.MessageId = M.idRow
INNER JOIN tblPAEProtocol Prot WITH (NOLOCK)
ON
M.BodyProtocolId = Prot.ProtocolId AND
M.BodyProtocolVersion = Prot.[Version]
WHERE
BCmd.IsDeleted = 0 AND
BS.IsDeleted = 0 AND
tblButtonControl.IsDeleted = 0 AND
L.IsDeleted = 0 AND
BCmd.MinorVersion = @currentMinorVersion AND
BS.MinorVersion = @currentMinorVersion AND
tblButtonControl.MinorVersion = @currentMinorVersion AND
L.MinorVersion = @currentMinorVersion AND
BS.IsDefaultCommand = 1 AND
M.IsRawData = 0 AND
Prot.MsgId = @ProtocolMsgIdText;
--------------------------------------------------------------------------------------
/* [End] Select default commands (Not check raw data) realted to #Panel into #Cmd */
--------------------------------------------------------------------------------------
---------------------------------------------------------------
/* [Begin] Loop in #Cmd foreach PA message check the byte 25 */
---------------------------------------------------------------
DECLARE @iter_Cmd CURSOR;
DECLARE @iter_StreamIdBytes CURSOR;
DECLARE @idRowButtonCommand numeric(18, 0);
DECLARE @msgData varbinary(1500);
DECLARE @rawText varchar(200);
DECLARE @wchar char(2);
DECLARE @streamId bigint;
DECLARE @bytePosition int;
DECLARE @hexCharPositionValue int;
SET @iter_Cmd = CURSOR FOR select idRowButtonCommand, MsgData from #Cmd;
SET @iter_StreamIdBytes = CURSOR FOR select BytePosition from #StreamIdBytes;
OPEN @iter_Cmd;
FETCH NEXT FROM @iter_Cmd INTO @idRowButtonCommand, @msgData;
WHILE @@FETCH_STATUS = 0
BEGIN
SET @rawText = master.dbo.fn_varbintohexstr(@msgData);
SET @rawText = upper(right(@rawText, len(@rawText) - 2));
print '@idRowButtonCommand: ' + cast(@idRowButtonCommand as varchar(max));
print '@rawText: ' + @rawText;
SET @wchar = dbo.GetHEX2FromVarChar(@rawText, @BytesOffset, @FlagBytePosition);
IF @wchar is Not NULL AND @wchar = @FlagByteWchar
BEGIN
UPDATE #Cmd SET IsDefaultCommand = 1 WHERE idRowButtonCommand = @idRowButtonCommand;
---------------------------------------------------------------------------------
/* [Begin] Loop in #StreamIdBytes foreach byte position to calculate @streamId */
---------------------------------------------------------------------------------
SET @streamId = 0;
SET @hexCharPositionValue = 1;
OPEN @iter_StreamIdBytes;
FETCH NEXT FROM @iter_StreamIdBytes INTO @bytePosition;
WHILE @@FETCH_STATUS = 0
BEGIN
SET @wchar = dbo.GetHEX2FromVarChar(@rawText, @BytesOffset, @bytePosition);
SET @streamId = @streamId + @hexCharPositionValue * dbo.ConvertHEX2toTinyInt(@wchar);
FETCH NEXT FROM @iter_StreamIdBytes INTO @bytePosition;
SET @hexCharPositionValue = @hexCharPositionValue * 0x0100;
END
CLOSE @iter_StreamIdBytes;
---------------------------------------------------------------------------------
/* [End] Loop in #StreamIdBytes foreach byte position to calculate @streamId */
---------------------------------------------------------------------------------
UPDATE #Cmd SET StreamId = @streamId WHERE idRowButtonCommand = @idRowButtonCommand;
END
FETCH NEXT FROM @iter_Cmd INTO @idRowButtonCommand, @msgData;
END
CLOSE @iter_Cmd;
DEALLOCATE @iter_StreamIdBytes;
---------------------------------------------------------------
/* [End] Loop in #Cmd foreach PA message check the byte 25 */
---------------------------------------------------------------
-- ================================================
-- Remove the records which byte 25 is not expected
-- ------------------------------------------------
DELETE FROM #Cmd where IsDefaultCommand = 0;
-- ================================================
----------------------------------------------------------------------------
/* [Begin] Update #Cmd.StreamIdAvailable = 1 where stream id is available */
----------------------------------------------------------------------------
UPDATE #Cmd
set
#Cmd.StreamIdAvailable = 1
FROM #Cmd
INNER JOIN tblAircraftStreams S WITH (NOLOCK)
ON
#Cmd.StreamId = S.idStream
INNER JOIN tblPanel P WITH (NOLOCK)
ON
S.idPanel = P.idPanel AND
S.MajorVersion = P.MajorVersion
INNER JOIN tblVersion V WITH (NOLOCK)
ON
P.idAircraft = V.idAircraft AND
P.idPanel = V.idPanel AND
P.MajorVersion = V.MajorVersion
WHERE
S.IsDeleted = 0 AND
P.IsDeleted = 0 AND
S.MinorVersion = @currentMinorVersion AND
P.MinorVersion = @currentMinorVersion AND
P.idAircraft = @idAircraft AND
(S.isClient is null or S.isClient = 0);
----------------------------------------------------------------------------
/* [End] Update #Cmd.StreamIdAvailable = 1 where stream id is available */
----------------------------------------------------------------------------
------------------------------------------------------------------
/* [Begin] SET #Panel.DefaultCommandsCount via #Cmd group count */
------------------------------------------------------------------
UPDATE #Panel
SET
#Panel.DefaultCommandsCount = CountTable.N
FROM #Panel
INNER JOIN
(SELECT idRowPanel, count(*) as N from #Cmd group by idRowPanel) CountTable
ON
#Panel.idRowPanel = CountTable.idRowPanel;
------------------------------------------------------------------
/* [End] SET #Panel.DefaultCommandsCount via #Cmd group count */
------------------------------------------------------------------
--------------------------------------------------------------------------------
/* [Begin] SET #Panel.DefaultStreamId via #Cmd where DefaultCommandsCount = 1 */
--------------------------------------------------------------------------------
UPDATE #Panel
SET
#Panel.DefaultStreamId = C.StreamId
FROM #Panel P
INNER JOIN #Cmd C
ON
P.idRowPanel = C.idRowPanel
WHERE
P.DefaultCommandsCount = 1;
--------------------------------------------------------------------------------
/* [End] SET #Panel.DefaultStreamId via #Cmd where DefaultCommandsCount = 1 */
--------------------------------------------------------------------------------
---------------------------------------------------------------------------------
/* [Begin] Loop in #Panel multiple default commands records foreach idRowPanel */
---------------------------------------------------------------------------------
DECLARE @iter_Panel CURSOR;
DECLARE @log varchar(max);
DECLARE @idRowPanel numeric(18, 0);
DECLARE @idRowLayer numeric(18, 0);
DECLARE @LayerName nvarchar(150);
DECLARE @idRowButton numeric(18, 0);
DECLARE @idRowButtonState numeric(18, 0);
DECLARE @StateOffset numeric(18, 0);
DECLARE @StateDesc nvarchar(500);
DECLARE @MessageId numeric(18, 0);
DECLARE @CommandName nvarchar(500);
DECLARE @IsDefaultCommand bit;
DECLARE @StreamIdAvailable bit;
SET @iter_Panel = CURSOR FOR
select idRowPanel from #Panel where DefaultCommandsCount >= 1;
OPEN @iter_Panel;
FETCH NEXT FROM @iter_Panel INTO @idRowPanel;
WHILE @@FETCH_STATUS = 0
BEGIN
-- [Debug]
print 'Multiple default commands @idRowPanel: ' + cast(@idRowPanel as varchar(max));
/*
* Notes:
* (1) CHAR(10) is the character of Newline ('\n');
* (2) CHAR(13) is the character of Return ('\r');
* (3) CHAR(9) is the character of Tab ('\t');
*/
SET @log = '{' + CHAR(10);
SET @log = @log + CHAR(9) + '"@idRowPanel": ' + cast(@idRowPanel as varchar(max)) + CHAR(10);
SET @log = @log + CHAR(9) + '"#Cmd": ' + CHAR(10);
SET @log = @log + CHAR(9) + '{' + CHAR(10);
SET @iter_Cmd = CURSOR FOR
SELECT
idRowLayer,
LayerName,
idRowButton,
idRowButtonState,
StateOffset,
StateDesc,
idRowButtonCommand,
MessageId,
CommandName,
MsgData,
IsDefaultCommand,
StreamId,
StreamIdAvailable
FROM #Cmd
WHERE idRowPanel = @idRowPanel;
OPEN @iter_Cmd;
FETCH NEXT FROM @iter_Cmd INTO
@idRowLayer,
@LayerName,
@idRowButton,
@idRowButtonState,
@StateOffset,
@StateDesc,
@idRowButtonCommand,
@MessageId,
@CommandName,
@msgData,
@IsDefaultCommand,
@streamId,
@StreamIdAvailable;
WHILE @@FETCH_STATUS = 0
BEGIN
SET @log = @log + CHAR(9) + CHAR(9) + '"record": ' + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + '{' + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@idRowLayer": ' + cast(@idRowLayer as varchar(max)) + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@LayerName": ' + '"' + @LayerName + '"' + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@idRowButton": ' + cast(@idRowButton as varchar(max)) + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@idRowButtonState": ' + cast(@idRowButtonState as varchar(max)) + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@StateOffset": ' + cast(@StateOffset as varchar(max)) + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@StateDesc": ' + '"' + @StateDesc + '"' + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@idRowButtonCommand": ' + cast(@idRowButtonCommand as varchar(max)) + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@MessageId": ' + cast(@MessageId as varchar(max)) + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@CommandName": ' + '"' + @CommandName + '"' + CHAR(10);
SET @rawText = master.dbo.fn_varbintohexstr(@msgData);
SET @rawText = upper(right(@rawText, len(@rawText) - 2));
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@msgData_Text": ' + '"' + @rawText + '"' + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@IsDefaultCommand": ' + CASE @IsDefaultCommand WHEN 1 THEN 'true' ELSE 'false' END + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@streamId": ' + cast(@streamId as varchar(max)) + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + CHAR(9) + '"@StreamIdAvailable": ' + CASE @StreamIdAvailable WHEN 1 THEN 'true' ELSE 'false' END + CHAR(10);
SET @log = @log + CHAR(9) + CHAR(9) + '}' + CHAR(10);
FETCH NEXT FROM @iter_Cmd INTO
@idRowLayer,
@LayerName,
@idRowButton,
@idRowButtonState,
@StateOffset,
@StateDesc,
@idRowButtonCommand,
@MessageId,
@CommandName,
@msgData,
@IsDefaultCommand,
@streamId,
@StreamIdAvailable;
END
CLOSE @iter_Cmd;
SET @log = @log + CHAR(9) + '}' + CHAR(10);
SET @log = @log + '}';
-- [Debug]
print '@log: ' + CHAR(10) + @log
-- =========================================================
-- Log the detailed commands
-- ---------------------------------------------------------
UPDATE #Panel SET log = @log WHERE idRowPanel = @idRowPanel;
-- =========================================================
FETCH NEXT FROM @iter_Panel INTO @idRowPanel;
END
CLOSE @iter_Panel;
DEALLOCATE @iter_Panel;
DEALLOCATE @iter_Cmd;
---------------------------------------------------------------------------------
/* [End] Loop in #Panel multiple default commands records foreach idRowPanel */
---------------------------------------------------------------------------------
END_OF_USE_Temp_Cmd:
drop table #Cmd;
--------------------------
/* [End] USE_Temp_Cmd */
--------------------------
END_OF_USE_Temp_StreamIdBytes:
drop table #StreamIdBytes;
------------------------------------
/* [End] USE_Temp_StreamIdBytes */
------------------------------------
END_HardcodeValuesMissed:
/* DO Nothing */
END_OUTPUT:
select * from #Panel;
END_OF_USE_Temp_Panel:
drop table #Panel;
----------------------------
/* [End] USE_Temp_Panel */
----------------------------
END
GO
PRINT '[Info] Stored Procedure dbo.CIU_PCUDefaultStreams_SP is modified.';
GO
输出:
@ProtocolMsgIdText: 0x0100
@BytesOffset: 24
@FlagBytePosition: 25
@FlagByteWchar: 02
@idRowButtonCommand: 4235802
@rawText: 01020A0B000000000000000000000000000004000000000000000000000000000000000000000000
@idRowButtonCommand: 4235803
@rawText: 01020C0D000000000000000000000000000004000000000000000000000000000000000000000000
@idRowButtonCommand: 4235805
@rawText: 01020A0B000000000000000000000000000004000000000000000000000000000000000000000000
@idRowButtonCommand: 4235806
@rawText: 01020C0D000000000000000000000000000004000000000000000000000000000000000000000000
@idRowButtonCommand: 4235801
@rawText: 0102000A000000000000000000000000000004000000000000000000000000000000000000000000
@idRowButtonCommand: 4235807
@rawText: 01020004000000000000000000000000100000000000000000000000000000000000000000000000
@idRowButtonCommand: 4235808
@rawText: 01010005000000000000000000000000002080010000000000000000000000000000000000000000
@idRowButtonCommand: 4235809
@rawText: 01020005000000000000000000000000000008040000000000000000000000000000000000000000
@idRowButtonCommand: 4235810
@rawText: 01020006000000000000000000000000000020000000000000000000000000000000000000000000
@idRowButtonCommand: 4235811
@rawText: 01020007000000000000000000000000000002000000000000000000000000000000000000000000
Multiple default commands @idRowPanel: 6734
@log:
{
"@idRowPanel": 6734
"#Cmd":
{
"record":
{
"@idRowLayer": 162358
"@LayerName": "My Video"
"@idRowButton": 1952034
"@idRowButtonState": 4561232
"@StateOffset": 0
"@StateDesc": "idRow = 485586 | State Function 3 - with 2 default commands"
"@idRowButtonCommand": 4235802
"@MessageId": 450263
"@CommandName": "idRow = 450263 | Command - Default - #1 - Default - StreamId = 2571"
"@msgData_Text": "01020A0B000000000000000000000000000004000000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 2571
"@StreamIdAvailable": false
}
"record":
{
"@idRowLayer": 162358
"@LayerName": "My Video"
"@idRowButton": 1952034
"@idRowButtonState": 4561232
"@StateOffset": 0
"@StateDesc": "idRow = 485586 | State Function 3 - with 2 default commands"
"@idRowButtonCommand": 4235803
"@MessageId": 450264
"@CommandName": "idRow = 450264 | Command - Default - #2 - Default - StreamId = 3085"
"@msgData_Text": "01020C0D000000000000000000000000000004000000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 3085
"@StreamIdAvailable": false
}
}
}
Multiple default commands @idRowPanel: 6758
@log:
{
"@idRowPanel": 6758
"#Cmd":
{
"record":
{
"@idRowLayer": 163155
"@LayerName": "My Audio"
"@idRowButton": 1965745
"@idRowButtonState": 4591625
"@StateOffset": 1
"@StateDesc": "idRow = 485585 | State Function 2 - with 1 default command"
"@idRowButtonCommand": 4235801
"@MessageId": 450262
"@CommandName": "idRow = 450262 | Command - Default - 01 - Default"
"@msgData_Text": "0102000A000000000000000000000000000004000000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 10
"@StreamIdAvailable": true
}
}
}
Multiple default commands @idRowPanel: 6736
@log:
{
"@idRowPanel": 6736
"#Cmd":
{
"record":
{
"@idRowLayer": 162374
"@LayerName": "My Audio"
"@idRowButton": 1952340
"@idRowButtonState": 4561930
"@StateOffset": 1
"@StateDesc": "idRow = 485586 | State Function 3 - with 2 default commands"
"@idRowButtonCommand": 4235805
"@MessageId": 450263
"@CommandName": "idRow = 450263 | Command - Default - #1 - Default - StreamId = 2571"
"@msgData_Text": "01020A0B000000000000000000000000000004000000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 2571
"@StreamIdAvailable": false
}
"record":
{
"@idRowLayer": 162374
"@LayerName": "My Audio"
"@idRowButton": 1952340
"@idRowButtonState": 4561930
"@StateOffset": 1
"@StateDesc": "idRow = 485586 | State Function 3 - with 2 default commands"
"@idRowButtonCommand": 4235806
"@MessageId": 450264
"@CommandName": "idRow = 450264 | Command - Default - #2 - Default - StreamId = 3085"
"@msgData_Text": "01020C0D000000000000000000000000000004000000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 3085
"@StreamIdAvailable": false
}
}
}
Multiple default commands @idRowPanel: 6760
@log:
{
"@idRowPanel": 6760
"#Cmd":
{
"record":
{
"@idRowLayer": 163169
"@LayerName": "My Audio"
"@idRowButton": 1965855
"@idRowButtonState": 4591933
"@StateOffset": 1
"@StateDesc": "idRow = 485584 | State Function 1 - Test PCU Default Commands"
"@idRowButtonCommand": 4235807
"@MessageId": 450257
"@CommandName": "idRow = 450257 | Audio / Video Command 1 - Default"
"@msgData_Text": "01020004000000000000000000000000100000000000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 4
"@StreamIdAvailable": true
}
"record":
{
"@idRowLayer": 163169
"@LayerName": "My Audio"
"@idRowButton": 1965855
"@idRowButtonState": 4591933
"@StateOffset": 1
"@StateDesc": "idRow = 485584 | State Function 1 - Test PCU Default Commands"
"@idRowButtonCommand": 4235809
"@MessageId": 450259
"@CommandName": "idRow = 450259 | Audio / Video Command 3 - Default"
"@msgData_Text": "01020005000000000000000000000000000008040000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 5
"@StreamIdAvailable": true
}
"record":
{
"@idRowLayer": 163169
"@LayerName": "My Audio"
"@idRowButton": 1965855
"@idRowButtonState": 4591933
"@StateOffset": 1
"@StateDesc": "idRow = 485584 | State Function 1 - Test PCU Default Commands"
"@idRowButtonCommand": 4235810
"@MessageId": 450260
"@CommandName": "idRow = 450260 | Audio / Video Command 4 - Default"
"@msgData_Text": "01020006000000000000000000000000000020000000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 6
"@StreamIdAvailable": true
}
"record":
{
"@idRowLayer": 163169
"@LayerName": "My Audio"
"@idRowButton": 1965855
"@idRowButtonState": 4591933
"@StateOffset": 1
"@StateDesc": "idRow = 485584 | State Function 1 - Test PCU Default Commands"
"@idRowButtonCommand": 4235811
"@MessageId": 450261
"@CommandName": "idRow = 450261 | Audio / Video Command 5 - Default"
"@msgData_Text": "01020007000000000000000000000000000002000000000000000000000000000000000000000000"
"@IsDefaultCommand": true
"@streamId": 7
"@StreamIdAvailable": true
}
}
}