2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 02:10:32 +00:00
StefanStrobel 24568def07 98_Modbus: updated tests and TestUtils.pm
git-svn-id: https://svn.fhem.de/fhem/trunk@26104 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2022-05-31 18:23:01 +00:00

43 lines
1.5 KiB
Plaintext

##############################################
# $Id: 98_ModbusGen${fName}.pm automatically generated by ModbusAttr $
# module generated automatically by ModbusAttr
package ModbusGen${fName};
use strict;
use warnings;
use GPUtils qw(:all);
use Exporter ('import');
our @EXPORT_OK = qw();
our %EXPORT_TAGS = (all => [@EXPORT_OK]);
BEGIN {
GP_Import( qw(
LoadModule
));
GP_Export( qw(
Initialize
));
};
my %ModbusGen${fName}parseInfo = (
${t}
#####################################
sub Initialize {
my $modHash = shift;
$modHash->{parseInfo} = \%ModbusGen${fName}parseInfo; # defines registers, inputs, coils etc. for this Modbus Defive
$modHash->{deviceInfo} = \%ModbusGen${fName}deviceInfo; # defines properties of the device like defaults and supported function codes
LoadModule "Modbus";
Modbus::InitializeLD($modHash); # Generic function of the Modbus module does the rest
$modHash->{AttrList} = $modHash->{AttrList} . " " . # Standard Attributes like IODEv etc
$modHash->{ObjAttrList} . " " . # Attributes to add or overwrite parseInfo definitions
$modHash->{DevAttrList} . " " . # Attributes to add or overwrite devInfo definitions
"poll-.* " . # overwrite poll with poll-ReadingName
"polldelay-.* "; # overwrite polldelay with polldelay-ReadingName
}