<Data "voltage-input-1">
RegisterBase 0
RegisterType float
- ModbusRegisterType holding
+ RegisterCmd ReadHolding
Type voltage
Instance "input-1"
</Data>
<Data "voltage-input-2">
RegisterBase 2
RegisterType float
- ModbusRegisterType holding
+ RegisterCmd ReadHolding
Type voltage
Instance "input-2"
</Data>
<Data "supply-temperature-1">
RegisterBase 0
RegisterType Int16
- ModbusRegisterType holding
+ RegisterCmd ReadHolding
Type temperature
Instance "temp-1"
</Data>
B<Uint32> or B<Float>, two 16E<nbsp>bit registers will be read and the data is
combined into one value. Defaults to B<Uint16>.
-=item B<ModbusRegisterType> B<holding>|B<input>
+=item B<RegisterCmd> B<ReadHolding>|B<ReadInput>
Specifies register type to be collected from device. Works only with libmodbus
-2.9.2 or higher. Defaults to B<holding>.
+2.9.2 or higher. Defaults to B<ReadHolding>.
=item B<Type> I<Type>
/*
* <Data "data_name">
* RegisterBase 1234
+ * RegisterCmd ReadHolding
* RegisterType float
* Type gauge
- * ModbusRegisterType holding
* Instance "..."
* </Data>
*
status = -1;
}
}
- else if (strcasecmp ("ModbusRegisterType", child->key) == 0)
+ else if (strcasecmp ("RegisterCmd", child->key) == 0)
{
#if LEGACY_LIBMODBUS
- ERROR("Modbus plugin: ModbusRegisterType parameter can not be used "
+ 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 ("holding", tmp) == 0)
+ else if (strcasecmp ("ReadHolding", tmp) == 0)
data.modbus_register_type = MREG_HOLDING;
- else if (strcasecmp ("input", tmp) == 0)
+ else if (strcasecmp ("ReadInput", tmp) == 0)
data.modbus_register_type = MREG_INPUT;
else
{