|
I was developing the Band Master program, a small helper tool for DX'ers. The program was almost finished, but it lacked one function: I wanted it to tune the transceiver at a certain frequency on mouse click. So I had to implement a simple rig control somehow. Since I had no experience in controlling rigs, I did a research on the Internet. Here is what I discovered: 1) there are no ready-to-use solutions. Many, many programs have transceiver control functions, but each program has its own code for this, written from scratch. Developers duplicate each other's efforts in this area and waste a lot of resources, re-inventing the wheel; 2) each program that controls the rig takes exclusive control over the serial port, thus preventing other programs from running concurrently. What this means in practice is that if a logger is running on your system, you cannot start your PSK31 client, and vice versa; 3) in most programs the details of rig models are embedded in the code. Even if these details are stored in an external file, the file structure is not documented. As a result, only the author of the program can add support of new rigs, and to do so, he must have physical access to the rig or find a very good beta tester - in fact, a co-developer, that owns the rig. So, I had to write my own rig control code. But was I bound to invent one more proprietary wheel, or could I try and solve the common problems that I discovered? This was a hard decision, the second option required a lot more work. Nevertheless, I decided to try. Omni-Rig is what came out of this attempt. What is Omni-Rig? It is a freeware COM/OLE Automation component that any developer can use in a project that he/she writes in VB, VC++, Delphi, etc., etc. COM/OLE is a common denominator of all modern programming languages. Does Omni-Rig make the implementation of rig control easier? Sure it does! It takes care of all low-level serial communication details, transparently implements the reply/response state machine, and knows the commands of many rig models. Your program does not even need to know what rig type it controls. It just checks the list of supported parameters and then reads and sets the object's properties, such as Rig.Freqency and Rig.Mode. Omni-Rig takes care of the rest. How can multiple programs control the rig simultaneously? This is possible because the programs that use Omni-Rig do not access the serial port directly. Omni-Rig has exclusive control over the port and sends/receives CAT commands, other programs just tell it what to do. Is it difficult to add support of a new rig? Not really, if you have the rig. The structure of the Rig Description files is fully documented. Create your own file, check it for syntax errors in Verify.exe, then run Client.exe and test your file on-line.
|