exit fi no Ain Din Node defined
This commit is contained in:
@@ -246,7 +246,9 @@ sub getNodesType {
|
|||||||
$sth->execute();
|
$sth->execute();
|
||||||
print getTimeStamp("log"). " - pid $$ >> $unit - $tool: " . $sth->rows . " rows selected to get node type/Ain/Din/channels.\n";
|
print getTimeStamp("log"). " - pid $$ >> $unit - $tool: " . $sth->rows . " rows selected to get node type/Ain/Din/channels.\n";
|
||||||
if ( $sth->rows eq 0 ) {
|
if ( $sth->rows eq 0 ) {
|
||||||
die getTimeStamp("log") . " - pid $$ >> No node channels selected.\n";
|
print getTimeStamp("log"). " - pid $$ >> Node/Channels/Ain/Din not defined.\n";
|
||||||
|
print getTimeStamp("log"). " - pid $$ >> Execution ended.\n";
|
||||||
|
exit;
|
||||||
}else {
|
}else {
|
||||||
my $row = 0;
|
my $row = 0;
|
||||||
while ( my $results = $sth->fetchrow_hashref ) {
|
while ( my $results = $sth->fetchrow_hashref ) {
|
||||||
@@ -470,12 +472,6 @@ while ( my $line = <FILE> ) {
|
|||||||
my ( $Vbat, $Tmod, $Ain1, $Ain2, $Din1, $Din2 ) =
|
my ( $Vbat, $Tmod, $Ain1, $Ain2, $Din1, $Din2 ) =
|
||||||
split( /;/, $NodeData );
|
split( /;/, $NodeData );
|
||||||
|
|
||||||
if ( scalar @din ) {
|
|
||||||
print getTimeStamp("log"). " - pid $$ >> Ain/Din not defined.\n";
|
|
||||||
print getTimeStamp("log"). " - pid $$ >> Execution ended.\n";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $idx = 0;
|
my $idx = 0;
|
||||||
$CSVData[$idx++] = $Vbat . ";" . $Tmod;
|
$CSVData[$idx++] = $Vbat . ";" . $Tmod;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user