Subversion Repositories HomeAutomation

Rev

Rev 1913 | Rev 2158 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1913 Rev 1967
Line 88... Line 88...
88
    #my $result = system("atomic -s $hostname -p $port -c \"Node_Reset $hwid\"");
88
    #my $result = system("atomic -s $hostname -p $port -c \"Node_Reset $hwid\"");
89
    #exit($result);
89
    #exit($result);
90
}
90
}
91
else
91
else
92
{
92
{
93
#   open (FP, "+<".$filename) or die "Error: Cannot open file $filename\n";
93
    open (FP, "+<".$filename) or die "Error: Cannot open file $filename\n";
94
#   @filecontents = <FP>;
94
    @filecontents = <FP>;
95
#   close FP;
95
    close FP;
96
 
96
 
97
#   $socket = atomd_initialize($hostname, $port);
97
    $socket = atomd_initialize($hostname, $port);
98
   
98
   
99
    #print "Sending Node_ClearHex\n";
99
    #print "Sending Node_ClearHex\n";
100
#   atomd_send_command($socket, "Node_ClearHex");
100
    atomd_send_command($socket, "Node_ClearHex");
101
#   atomd_kill_promt($socket);
101
    atomd_kill_promt($socket);
102
       
102
   
-
 
103
    my $linenums = 0;
103
#   foreach $filerow (@filecontents) {
104
    foreach $filerow (@filecontents) {
104
        #print "Sending Node_AppendHex $filerow \n";
105
        #print "Sending Node_AppendHex $filerow \n";
105
#       atomd_send_command($socket, "Node_AppendHex $filerow");
106
        atomd_send_command($socket, "Node_AppendHex $filerow");
106
#       atomd_kill_promt($socket);
107
        atomd_kill_promt($socket);
-
 
108
        $linenums += 1;
107
#   }
109
    }
108
    #print "Sending Node_ProgramHex $hwid $bios \n";
110
    #print "Sending Node_ProgramHex $hwid $bios $linenums \n";
109
#   atomd_send_command($socket, "Node_ProgramHex $hwid $bios");
111
    atomd_send_command($socket, "Node_ProgramHex $hwid $bios $linenums");
110
#   atomd_kill_promt($socket);
112
#   atomd_kill_promt($socket);
111
 
-
 
112
 
113
 
113
    #atomd_send_command($socket, "Node_Program $hwid $bios $filename");
114
    #atomd_send_command($socket, "Node_Program $hwid $bios $filename");
114
#   print atomd_read_command_response($socket);
-
 
115
#   exit(0);
-
 
116
 
115
 
-
 
116
    print atomd_read_command_response($socket);
-
 
117
    exit(0);
-
 
118
 
117
    my $result = system("atomic -s $hostname -p $port -c \"Node_Program $hwid $bios $filename\"");
119
#   my $result = system("atomic -s $hostname -p $port -c \"Node_Program $hwid $bios $filename\"");
118
    exit($result);
120
#   exit($result);
119
}
121
}
120
 
122
 
121
exit(0);
123
exit(0);