Beispiel #1
0
        public YaskawaRobot(string ipaddress, uint port)
        {
            IPAddress iPAddress;

            if (!IPAddress.TryParse(ipaddress, out iPAddress))
            {
                throw new FormatException($"{ipaddress} 为无效IP地址");
            }
            m_ipaddress = iPAddress;
            m_port      = port;
            NetClient   = new TcpClientCommunicate("192.168.255.10", 9000, m_ipaddress.ToString(), port);
        }
Beispiel #2
0
 public XinJiePlc(string localIp, uint localPort, string remoteIp, uint remotePort)
 {
     client = new TcpClientCommunicate(localIp, localPort, remoteIp, remotePort);
 }