Ports overview
Within the O3R platform, several kinds of ports are used. This document clarifies what these different ports refer to and how to use them.
Hardware ports
There are the 4 hardware ports on the VPU, where the O3R heads are connected.
These ports are mapped to TCP/IP communication ports, that are referred to as PCIC ports. PCIC is an ifm-specific communication protocol.
While it is good practice to check the PCIC port directly for the requested hardware port (see below how to do this), here the correspondence between hardware ports and PCIC ports for reference:
Hardware port |
PCIC port |
|---|---|
Port 0 |
50010 |
Port 1 |
50011 |
Port 2 |
50012 |
Port 3 |
50013 |
IMU port
Port 6 represents the IMU on board the VPU; it is not a physical camera connector. Its PCIC port is 50016. For configuration and data access, see the IMU documentation. For its use in ODS, see the ODS configuration documentation.
Application ports
When the user creates an application instance, the application output can be received from the application instance’s dedicated communication port. Each application instance has one unique communication port for sending data.
The TCP/IP ports for applications increment from 51010. For reference, below is the application number to PCIC port correspondence.
Application number |
TCP/IP port |
|---|---|
App 0 |
51010 |
App 1 |
51011 |
App n |
51010 + n |
For more information on instantiating ODS applications, refer to the ODS getting started documentation.
How to: retrieve the PCIC port number
To retrieve the PCIC port number for any port, one can use the ifm3d API. The following code snippet serves as an example to retrieve the TCP/IP port for Port 2:
from ifm3dpy.device import O3R
o3r = O3R()
pcic_port = o3r.port("port2").pcic_port
>>>50012
The following code snippet shows how to retrieve the TCP/IP port of the first application instance:
from ifm3dpy.device import O3R
o3r = O3R()
app_port = o3r.port("app0")
>>>51010
To list the available ports, use the ifm3d helper function ports in Python or Ports in C++.