Example #1
0
        private JetFetch()
        {
            // var connection = new WebSocketJetConnection("wss://172.19.1.1");
            var connection = new WebSocketJetConnection("ws://172.19.1.1:11123");

            this.peer = new JetPeer(connection);
            this.peer.Connect(this.OnConnect, 5000);
        }
        // Constructor with ssh certification
        public JetBusConnection(string IPAddress, int TimeoutMs = 20000)
        {
            string         _uri          = "wss://" + IPAddress + ":443/jet/canopen";
            IJetConnection jetConnection = new WebSocketJetConnection(_uri, RemoteCertificationCheck);

            _peer = new JetPeer(jetConnection);

            this._timeoutMs = TimeoutMs;
        }
Example #3
0
        private JetFetch()
        {
            // var connection = new WebSocketJetConnection("wss://172.19.1.1");
            // var connection = new WebSocketJetConnection("ws://172.19.1.1:11123");
            var ips        = Dns.GetHostAddresses("172.19.1.1");
            var connection = new SocketJetConnection(ips[0], 11122);

            this.peer = new JetPeer(connection);
            this.peer.Connect(this.OnConnect, 5000);
        }
Example #4
0
        private JetState()
        {
            // var connection = new WebSocketJetConnection("wss://172.19.1.1");
            var connection = new WebSocketJetConnection("ws://172.19.1.1:11123/api/jet/");

            //IPAddress[] ips;
            //ips = Dns.GetHostAddresses("172.19.1.1");
            // var connection = new SocketJetConnection(ips[0], 11122);
            this.peer = new JetPeer(connection);
            this.peer.Connect(this.OnConnect, 5000);
        }
Example #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JetBusConnection" /> class.
        /// Use this constructor for individual authentication
        /// </summary>
        /// <param name="ipAddress">IP address of the target device</param>
        /// <param name="user">User for device authentication</param>
        /// <param name="password">Password for device authentication</param>
        public JetBusConnection(string ipAddress, string user, string password)
        {
            string _uri = "wss://" + ipAddress + ":443/jet/canopen";

            IJetConnection jetConnection = new WebSocketJetConnection(_uri, RemoteCertificationCheck);

            _peer = new JetPeer(jetConnection);

            this._user     = user;
            this._password = password;
            this.IpAddress = ipAddress;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JetBusConnection" /> class.
        /// Use this constructor for individual authentication
        /// </summary>
        /// <param name="ipAddress">IP address of the target device</param>
        public DSEJetConnection(string ipAddress)
        {
            string         _uri;
            IJetConnection jetConnection;

            _uri          = "ws://" + ipAddress + ":80/jet/canopen";
            jetConnection = new WebSocketJetConnection(_uri);

            _peer = new JetPeer(jetConnection);

            this.IpAddress = ipAddress;
        }
        // Constructor without ssh certification.
        public JetBusConnection(string IPAddress, string User, string Password, int TimeoutMs = 20000)
        {
            string _uri = "wss://" + IPAddress + ":443/jet/canopen";

            IJetConnection jetConnection = new WebSocketJetConnection(_uri, RemoteCertificationCheck);

            _peer = new JetPeer(jetConnection);

            this._user      = User;
            this._password  = Password;
            this._timeoutMs = TimeoutMs;
            this._ipaddress = IPAddress;
        }