# Network

Commands to setup the network between client, detector and receiver

- rx_hostname [s] sets/gets the receiver hostname or IP address, configures detector mac with all network parameters and updates receiver with acquisition parameters. Normally used for single detectors (Can be multi-detector). `none` disables. If used, use as last network command in configuring detector MAC. `Returns` ``(string)

- rx_udpip [ip] sets/gets the ip address of the receiver UDP interface where the data from the detector will be streamed to. Normally used for single detectors (Can be multi-detector). Used if different from eth0. `Returns` ``(string)

- rx_udpmac [mac] sets/gets the mac address of the receiver UDP interface where the data from the detector will be streamed to. Normally used for single detectors (Can be multi-detector). `Returns` ``(string)

- rx_udpport [port] sets/gets the port of the receiver UDP interface where the data from the detector will be streamed to. Use single-detector command. `Returns` ``(int)

- rx_udpport2 [port] sets/gets the second port of the receiver UDP interface where the data from the second half of the detector will be streamed to. Use single-detector command. Used for EIGER only. `Returns` ``(int)

- detectormac [mac] sets/gets the mac address of the detector UDP interface from where the detector will stream data. Use single-detector command. Normally unused. `Returns` ``(string)

- detectorip [ip] sets/gets the ip address of the detector UDP interface from where the detector will stream data. Use single-detector command. Keep in same subnet as rx_udpip (if rx_udpip specified). `Returns` ``(string)

- txndelay_left [delay] sets/gets the transmission delay of first packet in an image being streamed out from the detector's left UDP port. Use single-detector command. Used for EIGER only. `Returns` ``(int)

- txndelay_right [delay] sets/gets the transmission delay of first packet in an image being streamed out from the detector's right UDP port. Use single-detector command. Used for EIGER only. `Returns` ``(int)

- txndelay_frame [delay] sets/gets the transmission frame period of entire frame being streamed out from the detector for both ports. Use single-detector command. Used for EIGER only. `Returns` ``(int)

- flowcontrol_10g [delay] Enables/disables 10 GbE flow control. 1 enables, 0 disables. Used for EIGER only. `Returns` ``(int)

- zmqport [port] sets/gets the 0MQ (TCP) port of the receiver from where data is streamed to the client. Use single-detector command to set individually or multi-detector command to calculate based on `port` for the rest. `Returns` ``(int)

- configuremac [i] configures the MAC of the detector with these parameters: detectorip, detectormac, rx_udpip, rx_udpmac, rx_udpport, rx_udpport2 (if applicable). This command is already included in `rx_hsotname`. Only put!. `Returns` ``(int)

- rx_tcpport [port] sets/gets the port of the client-receiver TCP interface. Use single-detector command. Is different for each detector if same `rx_hostname` used. Must be first command to communicate with receiver. `Returns` ``(int)

- port [port] sets/gets the port of the client-detector control server TCP interface. Use single-detector command. Default value is 1952 for all detectors. Normally not changed. `Returns` ``(int)

- stopport [port] sets/gets the port of the client-detector stop server TCP interface. Use single-detector command. Default value is 1953 for all detectors. Normally not changed. `Returns` ``(int)

- lock [i] Locks/Unlocks the detector to communicate with this client. 1 locks, 0 unlocks. `Returns` ``(int)

- lastclient Gets the last client communicating with the detector. Cannot put!. `Returns` ``(string)