Flexiv TDK APIs 2.1
Loading...
Searching...
No Matches
flexiv::tdk::NetworkCfgStd Struct Reference

TCP Server and Client Configuration TDK Standard Edition. In TDK standard edition, there are one robot + one edge device on each side of the teleoperation. One edge device needs to function as a TCP server while the other device functions as a TCP client. It does not matter which side is configured as TCP server or client. However, while the edge device for TCP client doesn't need any additional configuration other than connecting to the Internet, the TCP server needs to complete the following additional steps: More...

#include <data.hpp>

Public Attributes

bool is_tcp_server
std::string public_ipv4_address
unsigned int listening_port
std::vector< std::string > wan_interface_whitelist = {}

Detailed Description

  1. In the settings of the network router that the edge device for TCP server is connected to, enable NAT (network address translation). This is usually enabled by default on modern routers.
  2. Note down the private (WAN) IPv4 address assigned to the edge device for TCP server.
  3. In the router settings, add TCP port forwarding rule for the IPv4 address noted in step 2. The port number can be set to any unoccupied one. Use this port number as the [listening_port] constructor parameter for BOTH sides of teleoperation.
  4. On the edge device for TCP server, open https://whatismyipaddress.com/ and note down its public IPv4 address. Use this address as the [public_ipv4_address] constructor parameter for BOTH sides of teleoperation.
    Note
    All messages are transmitted in plaintext over TCP and message latency is highly dependent on the quality of the user network connection.
Examples
transparent_cartesian_teleop_wan.cpp.

Definition at line 55 of file data.hpp.

Member Data Documentation

◆ is_tcp_server

bool flexiv::tdk::NetworkCfgStd::is_tcp_server
Parameters
is_tcp_serverTrue : the machine running this instance functions as the TCP server; false: functions as the TCP client. If true, then the machine on the other side of teleoperation needs to function as the TCP client. It does not matter which side functions as the TCP server, however, the server side must configure its network router with NAT and TCP port forwarding.
Examples
transparent_cartesian_teleop_wan.cpp.

Definition at line 64 of file data.hpp.

◆ listening_port

unsigned int flexiv::tdk::NetworkCfgStd::listening_port
Parameters
listening_portNumber of the port configured with TCP port forwarding. Both sides of the teleoperation need to set the same listening port.
Examples
transparent_cartesian_teleop_wan.cpp.

Definition at line 77 of file data.hpp.

◆ public_ipv4_address

std::string flexiv::tdk::NetworkCfgStd::public_ipv4_address
Parameters
public_ipv4_addressPublic IPv4 address of whichever machine that functions as the TCP server. Can be obtained from https://whatismyipaddress.com/. Both sides of the teleoperation need to set the same address.
Examples
transparent_cartesian_teleop_wan.cpp.

Definition at line 71 of file data.hpp.

◆ wan_interface_whitelist

std::vector<std::string> flexiv::tdk::NetworkCfgStd::wan_interface_whitelist = {}
Parameters
wan_interface_whitelistLimit the network interface(s) that can be used to try to establish connection with another participant. The whitelisted network interface is defined by its OS-level name(s) of the network interface(s) that connect to the internet. For example, "wlo1" for Wi-Fi and "enp3s0" for Ethernet on many Linux machines. Only the whitelisted network interfaces will be used to accept incoming connections. If empty, all available network interfaces will be tried when searching for connection.
Examples
transparent_cartesian_teleop_wan.cpp.

Definition at line 87 of file data.hpp.


The documentation for this struct was generated from the following file: