socket_read_binary_integer(number, socket_name=’socket_0’, timeout=2)

Reads a number of 32 bit integers from the socket. Bytes are in network byte order. A maximum of 30 values can be read in one command.

Returns (for example) [3,100,2000,30000], if there is a timeout or the reply is invalid, [0,-1,-1,-1] is returned, indicating that 0 integers have been read

Parameters

number: The number of variables to read (int)

socket_name: Name of socket (string)

timeout: The number of seconds until the read action times out (float). A timeout of 0 or negative number indicates that the function should not return until a read is completed.

Return Value

A list of numbers read (length=number+1, list of ints)

Example command: list_of_ints = socket_read_binary_integer(4,"socket_10")

  • Example Parameters:
    • number = 4 -> Number of integers to read
    • socket_name = socket_10