Request format - PR-33 - PR-33-AC

PR-33-AC User Guide

Document code
Document type
User guide

The client to server communication, i.e. the requests sent from your computer to the refractometer, is in binary format. The request packets contain the following binary data (all integers are in the network order, MSB first):

  • 32-bit integer: packet number
  • 32-bit integer: request ID
  • (any): request data (depends on the request)
  • (any): fill-in data
The maximum size of the message is 1472 octets (bytes).

The packet number is echoed back by the refractometer, but not processed in any way. The packet numbers do not have to be sequential, any 32-bit value is valid.

The request ID is a 32-bit value that identifies the requested function, for example refractometer information. See Request-response pair specification for request IDs.

The request data consists of 0 to 1464 octets of additional data associated with the request.

The fill-in data can be used to increase the number of octets in a message. Any number of NULL characters (0x00) may be added to the end of the request as long as the total size of the message does not exceed the maximum of 1472 octets. This may be useful, for example, if the client implementation uses fixed-length packets.