gestione caricamento GD

This commit is contained in:
2017-09-25 23:32:27 +02:00
parent 1b6f855786
commit d39baa2219

View File

@@ -364,6 +364,12 @@ while ( my $line = <FILE> ) {
. " - pid $$ >> Found $tooltype tool name: $tool\n";
getNodesType();
}
elsif ( defined $info[3] && $info[3] =~ m/^GD\d*$/i ) {
$tool = uc $info[3];
$tooltype = 'GD';
print getTimeStamp("log")
. " - pid $$ >> Found $tooltype tool name: $tool\n";
}
}
else {
$NodeData =~ s/\x0d{0,1}\x0a\Z//s;
@@ -397,6 +403,12 @@ while ( my $line = <FILE> ) {
$CSVData[0] = $Vbat . ";" . $Tmod;
$CSVData[1] = $Din1;
}
elsif ( $tooltype eq "GD" ) {
my ( $div, $Vbat, $Tmod ) =
split( /;/, $NodeData );
$CSVData[0] = $Vbat . ";" . $Tmod;
$CSVData[1] = "n/a";
}
else {
@CSVData = split( /\|/, $NodeData );
}
@@ -436,9 +448,17 @@ while ( my $line = <FILE> ) {
close FILE;
$sql[ ( $outcount % $maxsqllines ) - 1 ] =~ s/,$/;/g;
writeOutSql($tool);
matlabCalc();
if ($ftp_send) {
if ( $tooltype eq "GD" ) {
#update DT corrispondente con stesso ToolNameID, EventDate, EventTime
}
else {
#update DT se esiste GD corrispondente con stesso ToolNameID, EventDate, EventTime
matlabCalc();
if ($ftp_send) {
trxelab();
}
}
print getTimeStamp("log") . " - pid $$ >> Execution ended.\n";