| gclib 2.0.7 Communications API for Galil controllers and PLCs |

## ◆ ip_assigner()

GReturn ip_assigner | ( | char * | serial_num,
|  | int | address
| ) |  |

Assigns controller an IP Adress given a serial number and a 1 byte address.

Parameters

  serial_num | Serial Number of the controller.
  address | A 1 byte address that defines the last byte of the IP Address.

Returns
  The success status or error code of the function. See gclib_errors.h for possible values.

See ip_assigner_example.cpp for an example.

This function will listen on the network for controllers requesting an IP Address. If a detected controller matches the serial number provided by the user, a new IP Address will be assigned based on the first 3 bytes of the detected IP Address combined with the user defined 1 byte address.

Definition at line 26 of file ip_assigner.cpp.

References e(), G_SMALL_BUFFER, GIpRequests(), and string_split().