/// <summary>
        /// 
        /// </summary>
        public void SendIpInfo()
        {
            MsgHeader mh = new MsgHeader();
            //参数赋值
            mh.MsgID = ConstIDs.O_TDMOM_IP_PORT_CFG;

            mh.puData = 0;
            mh.DataLen = 0;
            mh.MsgLen = (uint)Marshal.SizeOf(mh);

            byte[] res_mh = StructConverter.StructToBytes(mh);

            IpPortCFCStruct ips = new IpPortCFCStruct();
            byte[] strbytes= System.Text.Encoding.Unicode.GetBytes(_configService.ConfigInfos.TermialIP);
            Buffer.BlockCopy(strbytes, 0, ips.IpAddr, 0, ips.IpAddr.Length > strbytes.Length ? strbytes.Length : ips.IpAddr.Length);
            ips.PortNum = (uint)_configService.ConfigInfos.TerminalPort;

            //发送

        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        public void SendIpInfo()
        {
            MsgHeader mh = new MsgHeader();

            //参数赋值
            mh.MsgID = ConstIDs.O_TDMOM_IP_PORT_CFG;

            mh.puData  = 0;
            mh.DataLen = 0;
            mh.MsgLen  = (uint)Marshal.SizeOf(mh);

            byte[] res_mh = StructConverter.StructToBytes(mh);

            IpPortCFCStruct ips = new IpPortCFCStruct();

            byte[] strbytes = System.Text.Encoding.Unicode.GetBytes(_configService.ConfigInfos.TermialIP);
            Buffer.BlockCopy(strbytes, 0, ips.IpAddr, 0, ips.IpAddr.Length > strbytes.Length ? strbytes.Length : ips.IpAddr.Length);
            ips.PortNum = (uint)_configService.ConfigInfos.TerminalPort;

            //发送
        }