Rev 1912 | Rev 1967 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1912 | Rev 1913 | ||
|---|---|---|---|
| Line 79... | Line 79... | ||
| 79 | print "Hexfile: " . $filename . "\n"; |
79 | print "Hexfile: " . $filename . "\n"; |
| 80 | print "Parameters: " . "\n"; |
80 | print "Parameters: " . "\n"; |
| 81 | 81 | ||
| 82 | if ($reset eq "true" && $filename eq "") |
82 | if ($reset eq "true" && $filename eq "") |
| 83 | { |
83 | { |
| 84 |
|
84 | $socket = atomd_initialize($hostname, $port); |
| 85 |
|
85 | atomd_send_command($socket, "Node_Reset $hwid"); |
| 86 |
|
86 | print atomd_read_command_response($socket); |
| 87 |
|
87 | exit(0); |
| 88 |
|
88 | #my $result = system("atomic -s $hostname -p $port -c \"Node_Reset $hwid\""); |
| 89 |
|
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 |
|
103 | # foreach $filerow (@filecontents) { |
| 104 | #print "Sending Node_AppendHex $filerow \n"; |
104 | #print "Sending Node_AppendHex $filerow \n"; |
| 105 |
|
105 | # atomd_send_command($socket, "Node_AppendHex $filerow"); |
| 106 |
|
106 | # atomd_kill_promt($socket); |
| 107 |
|
107 | # } |
| 108 | #print "Sending Node_ProgramHex $hwid $bios \n"; |
108 | #print "Sending Node_ProgramHex $hwid $bios \n"; |
| 109 |
|
109 | # atomd_send_command($socket, "Node_ProgramHex $hwid $bios"); |
| 110 |
|
110 | # atomd_kill_promt($socket); |
| 111 | 111 | ||
| 112 | 112 | ||
| 113 | #atomd_send_command($socket, "Node_Program $hwid $bios $filename"); |
113 | #atomd_send_command($socket, "Node_Program $hwid $bios $filename"); |
| 114 |
|
114 | # print atomd_read_command_response($socket); |
| 115 |
|
115 | # exit(0); |
| - | 116 | ||
| 116 |
|
117 | my $result = system("atomic -s $hostname -p $port -c \"Node_Program $hwid $bios $filename\""); |
| 117 |
|
118 | exit($result); |
| 118 | } |
119 | } |
| 119 | 120 | ||
| 120 | exit(0); |
121 | exit(0); |