diff --git a/ZMQ-Ports.md b/ZMQ-Ports.md new file mode 100644 index 0000000..89c971a --- /dev/null +++ b/ZMQ-Ports.md @@ -0,0 +1,25 @@ +# Intorduction + +PixelatorController communicates with clients (e.g. PixelatorGUI) via two ZMQ ports: +- Publisher: PixelatorController broadcasts scan data and positioner updates. +- Request: 2-way communication channel for clients to request info or actions from PixelatorController. + +The port numbers used for these communication channels has to match in the configuration files for both PixelatorController and any clients. + +# PixelatorController + +The settings file that is passed as an argument to the startup command must include the `publisherPort` and `requestPort` fields. For example: +```json +"publisherPort" : "55561", +"requestPort" : "55562", +``` + +# PixelatorGUI + +The configuration of PixelatorGUI is in `build/PixelatorGUI/etc/PixelatorGUI.ini`. The `Resouorce` section must contain the `PIXELATORCONTROLLER_PORT_PUBLISHER` and `PIXELATORCONTROLLER_PORT_REQUEST` fields. The values of these fields **must match** the corresponding fields in the PixelatorController configuration. Further, the value of the `PIXELATORCONTROLLER_HOSTNAME` field must match the hostname of the machine that PixelatorController is running on. For example: +``` +[Resource] +PIXELATORCONTROLLER_HOSTNAME="stxm-1.psi.ch" +PIXELATORCONTROLLER_PORT_PUBLISHER=55561 +PIXELATORCONTROLLER_PORT_REQUEST=55562 +``` \ No newline at end of file