Thursday, March 6, 2008

SEL Relay Password Changing Utility

The Password Changing Utility was as the name suggests. SEL's electric relays and communication processors are communicated with through either serial or ethernet (or some jumping through hoops with old-school modems), but the interface is pure command line. Changing the password on a relay -- a single relay -- requires something like 6-10 commands + connection configurations. Changing 20 of them is somewhat cringe inducing.

So, written in wxWidgets, C++, and teraterm script, and calling on Teraterm and PWGen to do some work for it, this utility was meant to fill a need. =)

Now... because so much of programming is procedural in nature, and easiest to explain as if it was a procedure, here's how it works:

1) The user, with the same settings they would use if doing things the "old" way, enter the information needed to communicate/change the password of a relay, then add that job to the queue.

2) According to the parameters selected -- such as the Method of connection and the Relay to change the settings of, the program, using a number of Teraterm template scripts I created, mixes and matches together the appropriate script to get the job done.

3) After the user has added all jobs to the queue, they press Go. And presumably leave the program for a while.

4) The program flashes rather annoyingly (like AIM or IRC clients do on a new message) when the tasks are done. It also provides a log file of whether or not each password was successfully changed.


Programmer's note: This was my first wxWidgets project, and after using it I concluded that Win32 (now the Windows API) should never be used again, if possible. There's something to be said for not having to reinvent the wheel every time you make a gui app.

note2: Because wxWidgets executables are enormously gigantic (no single word in the english language can properly describe a 1.5 MB Hello World program), this project led me to the brilliant little program UPX, which shrinks the bloated exe quite nicely back down to something more acceptable.

No comments: