/// <summary>
        /// 从欧姆龙PLC中批量读取位软元件,返回读取结果
        /// </summary>
        /// <param name="address">读取地址,格式为"D100","C100","W100","H100","A100"</param>
        /// <param name="length">读取的长度</param>
        /// <returns>带成功标志的结果数据对象</returns>
        /// <remarks>
        /// 地址支持的列表如下:
        /// <list type="table">
        ///   <listheader>
        ///     <term>地址名称</term>
        ///     <term>示例</term>
        ///     <term>地址进制</term>
        ///   </listheader>
        ///   <item>
        ///     <term>DM Area</term>
        ///     <term>D100.0,D200.10</term>
        ///     <term>10</term>
        ///   </item>
        ///   <item>
        ///     <term>CIO Area</term>
        ///     <term>C100.0,C200.10</term>
        ///     <term>10</term>
        ///   </item>
        ///   <item>
        ///     <term>Work Area</term>
        ///     <term>W100.0,W200.10</term>
        ///     <term>10</term>
        ///   </item>
        ///   <item>
        ///     <term>Holding Bit Area</term>
        ///     <term>H100.0,H200.10</term>
        ///     <term>10</term>
        ///   </item>
        ///   <item>
        ///     <term>Auxiliary Bit Area</term>
        ///     <term>A100.0,A200.1</term>
        ///     <term>10</term>
        ///   </item>
        /// </list>
        /// </remarks>
        /// <example>
        /// <code lang="cs" source="YumpooDrive_Net45.Test\Documentation\Samples\Profinet\OmronFinsNet.cs" region="ReadBool" title="ReadBool示例" />
        /// </example>
        public override OperateResult <bool[]> ReadBool(string address, ushort length)
        {
            // 获取指令
            var command = BuildReadCommand(address, length, true);

            if (!command.IsSuccess)
            {
                return(OperateResult.CreateFailedResult <bool[]>(command));
            }

            // 核心数据交互
            OperateResult <byte[]> read = ReadFromCoreServer(command.Content);

            if (!read.IsSuccess)
            {
                return(OperateResult.CreateFailedResult <bool[]>(read));
            }

            // 数据有效性分析
            OperateResult <byte[]> valid = OmronFinsNetHelper.ResponseValidAnalysis(read.Content, true);

            if (!valid.IsSuccess)
            {
                return(OperateResult.CreateFailedResult <bool[]>(valid));
            }

            // 返回正确的数据信息
            return(OperateResult.CreateSuccessResult(valid.Content.Select(m => m != 0x00 ? true : false).ToArray()));
        }
        /// <summary>
        /// 向PLC中位软元件写入bool数组,返回值说明,比如你写入D100,values[0]对应D100.0
        /// </summary>
        /// <param name="address">要写入的数据地址</param>
        /// <param name="values">要写入的实际数据,可以指定任意的长度</param>
        /// <returns>返回写入结果</returns>
        /// <example>
        /// <code lang="cs" source="YumpooDrive_Net45.Test\Documentation\Samples\Profinet\OmronFinsNet.cs" region="WriteBool" title="WriteBool示例" />
        /// </example>
        public override OperateResult Write(string address, bool[] values)
        {
            // 获取指令
            var command = BuildWriteCommand(address, values.Select(m => m ? (byte)0x01 : (byte)0x00).ToArray(), true);

            if (!command.IsSuccess)
            {
                return(command);
            }

            // 核心数据交互
            OperateResult <byte[]> read = ReadFromCoreServer(command.Content);

            if (!read.IsSuccess)
            {
                return(read);
            }

            // 数据有效性分析
            OperateResult <byte[]> valid = OmronFinsNetHelper.ResponseValidAnalysis(read.Content, false);

            if (!valid.IsSuccess)
            {
                return(valid);
            }

            // 写入成功
            return(OperateResult.CreateSuccessResult());
        }
        /// <summary>
        /// 从欧姆龙PLC中读取想要的数据,返回读取结果,读取单位为字
        /// </summary>
        /// <param name="address">读取地址,格式为"D100","C100","W100","H100","A100"</param>
        /// <param name="length">读取的数据长度</param>
        /// <returns>带成功标志的结果数据对象</returns>
        /// <remarks>
        /// 地址支持的列表如下:
        /// <list type="table">
        ///   <listheader>
        ///     <term>地址名称</term>
        ///     <term>示例</term>
        ///     <term>地址进制</term>
        ///   </listheader>
        ///   <item>
        ///     <term>DM Area</term>
        ///     <term>D100,D200</term>
        ///     <term>10</term>
        ///   </item>
        ///   <item>
        ///     <term>CIO Area</term>
        ///     <term>C100,C200</term>
        ///     <term>10</term>
        ///   </item>
        ///   <item>
        ///     <term>Work Area</term>
        ///     <term>W100,W200</term>
        ///     <term>10</term>
        ///   </item>
        ///   <item>
        ///     <term>Holding Bit Area</term>
        ///     <term>H100,H200</term>
        ///     <term>10</term>
        ///   </item>
        ///   <item>
        ///     <term>Auxiliary Bit Area</term>
        ///     <term>A100,A200</term>
        ///     <term>10</term>
        ///   </item>
        /// </list>
        /// </remarks>
        /// <example>
        /// 假设起始地址为D100,D100存储了温度,100.6℃值为1006,D101存储了压力,1.23Mpa值为123,D102,D103存储了产量计数,读取如下:
        /// <code lang="cs" source="YumpooDrive_Net45.Test\Documentation\Samples\Profinet\OmronFinsNet.cs" region="ReadExample2" title="Read示例" />
        /// 以下是读取不同类型数据的示例
        /// <code lang="cs" source="YumpooDrive_Net45.Test\Documentation\Samples\Profinet\OmronFinsNet.cs" region="ReadExample1" title="Read示例" />
        /// </example>
        public override OperateResult <byte[]> Read(string address, ushort length)
        {
            // 获取指令
            var command = BuildReadCommand(address, length, false);

            if (!command.IsSuccess)
            {
                return(OperateResult.CreateFailedResult <byte[]>(command));
            }

            // 核心数据交互
            OperateResult <byte[]> read = ReadFromCoreServer(command.Content);

            if (!read.IsSuccess)
            {
                return(OperateResult.CreateFailedResult <byte[]>(read));
            }

            // 数据有效性分析
            OperateResult <byte[]> valid = OmronFinsNetHelper.ResponseValidAnalysis(read.Content, true);

            if (!valid.IsSuccess)
            {
                return(OperateResult.CreateFailedResult <byte[]>(valid));
            }

            // 读取到了正确的数据
            return(OperateResult.CreateSuccessResult(valid.Content));
        }