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 |
|
93 | open (FP, "+<".$filename) or die "Error: Cannot open file $filename\n"; |
| 94 |
|
94 | @filecontents = <FP>; |
| 95 |
|
95 | close FP; |
| 96 | 96 | ||
| 97 |
|
97 | $socket = atomd_initialize($hostname, $port); |
| 98 | 98 | ||
| 99 | #print "Sending Node_ClearHex\n"; |
99 | #print "Sending Node_ClearHex\n"; |
| 100 |
|
100 | atomd_send_command($socket, "Node_ClearHex"); |
| 101 |
|
101 | atomd_kill_promt($socket); |
| 102 | 102 | ||
| - | 103 | my $linenums = 0; |
|
| 103 |
|
104 | foreach $filerow (@filecontents) { |
| 104 | #print "Sending Node_AppendHex $filerow \n"; |
105 | #print "Sending Node_AppendHex $filerow \n"; |
| 105 |
|
106 | atomd_send_command($socket, "Node_AppendHex $filerow"); |
| 106 |
|
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 |
|
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 |
|
119 | # my $result = system("atomic -s $hostname -p $port -c \"Node_Program $hwid $bios $filename\""); |
| 118 |
|
120 | # exit($result); |
| 119 | } |
121 | } |
| 120 | 122 | ||
| 121 | exit(0); |
123 | exit(0); |