コード例 #1
0
        /// <summary>
        /// Builds DGI to be used with STORE DATA command for given FCI .
        /// </summary>
        /// <param name="fciModel"></param>
        /// <returns></returns>
        public string BuildDgi(FciModel fciModel)
        {
            var fields = new List <TagModel>();

            if (fciModel.Tags != null)
            {
                fields.AddRange(fciModel.Tags);
            }

            var tagModel = new TagModel {
                Tag = "A5", Fields = fields
            };
            var command = BuildDgi(tagModel);

            return($"{fciModel.Dgi}{TlvDataHelper.ToBerEncodedL((uint)command.Length / 2).ToHexa('\0')}{command}");
        }
コード例 #2
0
        /// <summary>
        /// Builds UDR to be used with STORE DATA command for given FCI .
        /// </summary>
        /// <param name="fciModel"></param>
        /// <returns></returns>
        public string BuildDgi(FciModel fciModel)
        {
            var fields = new List <TagModel>();

            if (fciModel.Tags != null)
            {
                fields.AddRange(fciModel.Tags);
            }

            var tagModel = new TagModel {
                Tag = "A5", Fields = fields
            };
            var command = BuildDgi(tagModel);

            return(String.Format("{0}{1}{2}", fciModel.Dgi, TlvDataHelper.ToBerEncodedL((uint)command.Length / 2).ToHexa('\0'), command));
        }