+ else if (strcasecmp ("RegisterCmd", child->key) == 0)
+ {
+#if LEGACY_LIBMODBUS
+ ERROR("Modbus plugin: RegisterCmd 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 ("ReadHolding", tmp) == 0)
+ data.modbus_register_type = MREG_HOLDING;
+ else if (strcasecmp ("ReadInput", tmp) == 0)
+ data.modbus_register_type = MREG_INPUT;
+ else
+ {
+ ERROR ("Modbus plugin: The modbus_register_type \"%s\" is unknown.",
+ tmp);
+ status = -1;
+ }
+#endif
+ }