コード例 #1
0
        private static int FlushCommands(int counter, List <byte> bytes, List <string> results)
        {
            var smpte291M = new Smpte291M(counter, 20, bytes.ToArray());

            counter++;
            var resultBytes = smpte291M.GetBytes();
            var hex         = ByteArrayToHexString(resultBytes);

            results.Add(hex);
            bytes.Clear();
            return(counter);
        }
コード例 #2
0
        public static string GenerateEmpty(int counter)
        {
            var bytes     = new List <byte>();
            var smpte291M = new Smpte291M(counter, 20, bytes.ToArray());
            //smpte291M.CcDataSectionCcData.CcData[2].Valid = false;
            //smpte291M.CcDataSectionCcData.CcData[2].Type = 2;
            //smpte291M.CcDataSectionCcData.CcData[2].Data1 = 0;
            //smpte291M.CcDataSectionCcData.CcData[2].Data2 = 0;
            //smpte291M.CcDataSectionCcData.CcData[3].Valid = false;
            var resultBytes = smpte291M.GetBytes();
            var hex         = ByteArrayToHexString(resultBytes);

            return(hex);
        }
コード例 #3
0
        public static string GenerateTextInit(int counter)
        {
            var commands = new List <ICommand>
            {
                new HideWindows(true),
                new ToggleWindows(true),
                new HideWindows(true),
                new DeleteWindows(true),
            };
            var bytes = new List <byte>();

            foreach (var command in commands)
            {
                bytes.AddRange(command.GetBytes());
            }

            var smpte291M   = new Smpte291M(counter, 20, bytes.ToArray());
            var resultBytes = smpte291M.GetBytes();
            var hex         = ByteArrayToHexString(resultBytes);

            return(hex);
        }