Section: WIN SYSTEM (1W)
Return to Main Contents
recvnmx - Receiving Nanometrics UDP/IP packet
Recvnmx receives data (NMXP or NP packet) of Nanometrics format sent to UDP port number
of its own host, converts to WIN format, and writes (cyclically) in shared memory segment given by a key
At present, recvnmx processes only Compressed Data Packet (including packet of Taurus).
Refer to winformat(1W) for WIN format, and recvt(1W) for format on the shared memory.
Channel number of 16-bit in WIN format is generated from a pair of serial number and channel number of Nanometrics device written in NMXP/NP packet (among 16 bits, the high-order 11 bits represent serial number, and the low-order 5 bits channel number).
When arbitrary mapping of channel numbers in WIN format is desired, use option
When the shared memory segment having a key
does not exist, the shared memory segment of size
(KB) is created. When it already exists but has a size smaller than
(KB), an error will occur.
The UDP port number is a 16-bit integer value, and shared memory key is a 32-bit integer value.
When log file name
is specified, operation log is set here. When it is not specified, log information is sent to the standard output. Log file is opened/closed in each write.
When recvnmx is initiated without argument, brief usage is displayed.
Makes format of shared memory the format searchable from the backward. Refer to option -B of recvt(1W) for this format.
- -c map
Specifies how to provide channel number in WIN format in a file
In format of
serial number of each Nanometrics device is written with decimal number at the head, and head channel numbers in WIN format delimited by blank or tab are written with hexadecimal number to the right of the serial numbers with a data for one device per line respectively. The line starting with '#' is presumed to be comment. Only two items from the head in each line are read, and the items to the right of the two items are bypassed. When Nanometrics device has multiple channels, channel numbers the number of which equals to the number of channels beginning with the head channel number in WIN format are assigned. In the following example, channel numbers 0380, 0381 and 0382 are assigned to channels 1 through 3 of the device having serial number #139 respectively, and 0383 - 0385, 0386 - 038B and 038C - 0391 are assigned to #141, #142 and #143 respectively.
139 0380 # 3ch
141 0383 # 3ch
142 0386 # 6ch
143 038C # 6ch
When recvnmx receives the HUP signal, it rereads a file
- -d dir
Temporarily saves odd data in a directory
Unit of WIN format packet is second, but unit of Nanometrics format is not second. Therefore if packets have arrived in incorrect order, odd data with length less than 1 second that cannot constitutes second packet remains.
When this option is specified, this odd data are saved, and when the packet including insufficient parts arrives later, the saved data are read to constitute and transmit correct second packet.
Recvnmx deletes used file for odd data existing in
and files not used because insufficient parts did not finally arrive remain. Program for periodically deleting these old files is clean_nmx(1W).
- -i interface
receives a packet to be transmitted to IP multicast address, it specifies network interface to receive the packet by the IP address
of its interface.
- -m group
Receives packet to be transmitted to the IP multicast address
Receives the NP packet and bypasses the NMXP packet. When it does not specify this option, it receives the NMXP packet and bypasses the NP packet. It cannot receive both the NP packet and NMXP packet.
Displays information of the received NMXP/NP packets. This is for debugging.
In the following example, the NMXP packet sent to the UDP port #32000 of multicast address 188.8.131.52 is received from network interface of the IP address to write it in shared memory #1001 (size 1000KB). Log file is /dat/log/recvnmx.log.
recvnmx -i 10.0.0.100 -m 184.108.40.206 -c recvnmx.prm 32000 1001 1000
ABOUT TIME STAMP
Recvnmx uses localtime(3) function to convert time stamp (the number of seconds from year 1970 January 1 00:00:00 UTC) of the NMXP packet to time stamp (year month day hour minute second of JST) in WIN format. At that time, although leap second is usually not considered, there is no problem for the meantime because leap second seems to be not considered (ignored) in time stamp of the NMXP packet for the Nanometrics device.
ABOUT SERIAL NUMBER
When making serial number of the Nanometrics device correspond to channel number in WIN format using a file
be careful that types of devices are not distinguished. Since other type of device having the same serial number is not distinguished, it is impossible to allow different types of devices to coexist.
clean_nmx(1W), winformat(1W), recvt(1W)
- TYPICAL EXECUTION
- ABOUT TIME STAMP
- ABOUT SERIAL NUMBER
- SEE ALSO
This document was created by
using the manual pages.
Time: 00:22:47 GMT, September 20, 2017