+ else if (strcasecmp ("Function", child->key) == 0)
+ {
+ #if LEGACY_LIBMODBUS
+ ERROR("Modbus plugin: Function parameter can not be used with your libmodbus version");
+ #else
+ char tmp[16];
+ status = cf_util_get_string_buffer (child, tmp, sizeof (tmp));
+ if (status != 0)
+ /* do nothing */;
+ else if (strcasecmp ("holding", tmp) == 0)
+ data.function = FCN_HOLDING;
+ else if (strcasecmp ("input", tmp) == 0)
+ data.function = FCN_INPUT;
+ else
+ {
+ ERROR ("Modbus plugin: The function type \"%s\" is unknown.", tmp);
+ status = -1;
+ }
+ #endif
+ }