Repository: wuxx/AntRunner Branch: master Commit: 56c7ade7e9e8 Files: 42 Total size: 709.8 KB Directory structure: gitextract_dder1ce_/ ├── LICENSE ├── README.md ├── README_cn.md ├── firmware/ │ ├── flash_dump.sh │ ├── flash_erase.sh │ └── flash_write.sh ├── software/ │ └── hamlib-w64-4.5~git/ │ ├── AUTHORS.txt │ ├── AntRunner_Start_Serial.bat │ ├── AntRunner_Start_WiFi.bat │ ├── COPYING.LIB.txt │ ├── COPYING.txt │ ├── ChangeLog.txt │ ├── LICENSE.txt │ ├── README.betatester.txt │ ├── README.txt │ ├── README.w64-bin.txt │ ├── THANKS.txt │ ├── doc/ │ │ ├── ampctl.1.html │ │ ├── ampctld.1.html │ │ ├── hamlib-primer.7.html │ │ ├── hamlib-utilities.7.html │ │ ├── hamlib.7.html │ │ ├── rigctl.1.html │ │ ├── rigctlcom.1.html │ │ ├── rigctld.1.html │ │ ├── rigmem.1.html │ │ ├── rigsmtr.1.html │ │ ├── rigswr.1.html │ │ ├── rotctl.1.html │ │ └── rotctld.1.html │ ├── include/ │ │ └── hamlib/ │ │ ├── amplifier.h │ │ ├── amplist.h │ │ ├── config.h │ │ ├── rig.h │ │ ├── rig_dll.h │ │ ├── riglist.h │ │ ├── rotator.h │ │ └── rotlist.h │ └── lib/ │ ├── gcc/ │ │ └── libhamlib.dll.a │ └── msvc/ │ └── libhamlib-4.def └── structure/ ├── L-Bracket-42-v1.2.STL └── Rotator-Bottom-v0.2.STL ================================================ FILE CONTENTS ================================================ ================================================ FILE: LICENSE ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. {one line to give the program's name and a brief idea of what it does.} Copyright (C) {year} {name of author} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: {project} Copyright (C) {year} {fullname} This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: README.md ================================================ # AntRunner [中文](./README_cn.md) * [Introduce](#introduce) * [Feature](#feature) * [Specification](#specification) * [How to Use](#how-to-use) * [System Detail](#system-detail) * [Gpredict](#gpredict) * [Hamlib](#hamlib) * [Look4Sat](#look4sat) * [SDR#](#sdr) * [How to Get One](#how-to-get-one) * [Reference](#reference) ## Introduce AntRunner is a portable antenna rotator designed and made by MuseLab(Another model we designed is the [AntRunner-Pro](https://github.com/wuxx/AntRunner-Pro), which is suitable for fixed installation and long-term operation). It can be used for real-time automatic tracking of satellites with corresponding open source software which is available on Windows/Linux/Mac/RaspberryPi/Android. The rotator and the host computer can communicate via wired (serial port) or wireless (Wifi 2.4G). It can install various types of antennas (usually Yagi antennas), support 360-degree azimuth and 180-degree elevation control, and can support antennas up to 10KG. It can be powered by a 12V battery or by a fast charging power bank with a 12V fast charging trigger cable. It’s easy to carry as its weight is relatively light and very convenient to use in the wild for HAM. ![AntRunner-1](https://github.com/wuxx/AntRunner/blob/master/doc/1.jpg) ![AntRunner-2](https://github.com/wuxx/AntRunner/blob/master/doc/3.jpg) ![AntRunner-3](https://github.com/wuxx/AntRunner/blob/master/doc/2.jpg) ## Feature - full Azimuth and elevation angle tracking - Support Windows/Linux/RaspberryPi/Android - Support wired serial port control - Support wireless WiFi 2.4G control - 12V power supply, convenient for field erection - Easy disassembly and assembly ## Specification - Rotation Limit: AZ: 0 - 360°; EL: 0-180° - Max Load: 10KG - Backlash: AZ:1° EL:1° - Weight: 2.5KG - Rotator Diameter x Height: 120mmØ x 65mm (H) - Support Material: 5mm/10mm Acrylic ## How to Use ### Windows #### 0 Antenna installation Install the antenna on the U-shaped bracket of the rotator through the U-shaped hoop, and pay attention to install it at the center of gravity of the antenna to make the operation more stable. #### 1 Rotator adjustment Before powering on, you need to adjust the azimuth of the rotator to true north (azimuth angle of 0 degrees), and the pitch to be horizontal (pitch angle of 0 degrees). This step can be adjusted through the mobile compass APP. #### 2 Power up Use the 12V power supply to power on the rotator, and connect the rotator and PC through the TYPE-C cable. After the normal connection, a serial port will appear in the device manager, as shown in the figure. ![AntRunner-1](https://github.com/wuxx/AntRunner/blob/master/doc/AntRunner_Start-1.png) #### 3 Start Hamlib Enter the Hamlib directory, there is a batch script in the directory, and the script is a command, as shown below, you need to manually edit the script to modify the serial port number. Since the serial port number is assigned by the system, the serial number is different for different systems, so you need to use a text editor to manually change the serial port number before running. ``` rotctld.exe -vvvvv -m 2401 -r COMx ``` Modify COMx to the actual serial port number that appears in the device manager, save the script, and double-click to run it. ![AntRunner-2](https://github.com/wuxx/AntRunner/blob/master/doc/AntRunner_Start-2.png) ![AntRunner-3](https://github.com/wuxx/AntRunner/blob/master/doc/AntRunner_Start-3.png) ![AntRunner-4](https://github.com/wuxx/AntRunner/blob/master/doc/AntRunner_Start-4.png) #### 4 Start Gpredict Double-click gpredict.exe to open the Gpredict program ![Gpredict-1a](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-1a.png) ##### 4.1 Longitude and latitude configuration First, you need to configure the latitude and longitude of your region, select Edit -> General -> Ground Stations -> Add new, and configure your local latitude, longitude and altitude on the page that comes out. ![Gpredict-1c](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-1c.png) ##### 4.2 Satellite configuration You need to add the satellites you want to track to the list, click the inverted triangle on the upper right, select Configure, and add the satellites you want to track to the small window on the right in the window that appears. ![Gpredict-1b](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-1b.png) ##### 4.3 Rotator configuration Create a new rotator device, select Edit -> Interfaces -> Rotators -> Add New, and configure it as shown ![Gpredict-1d](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-1d.png) ##### 4.4 Rotator test After configuring the rotator device, you can perform a preliminary test on the rotator. Click the inverted triangle on the upper right and select Antenna Control to enter the antenna control page. select the newly created grbltrk, click Engage to initialize the rotator, and then configure the azimuth and pitch angles. After configuring the rotator, it will respond immediately and return the current angle value in real time. ![Gpredict-2b](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-2b.png) ![Gpredict-2c](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-2c.png) ![Gpredict-2d](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-2d.png) ##### 4.5 satellite tracking Select the satellite to be tracked in Target, such as ISS, click Track, the rotator will start tracking the satellite in real time, if the satellite is not in entry, it will adjust the pitch angle to 0 degrees, and the azimuth angle to the angle when the satellite enters, wait for the satellite to enter, The radar map on the left also shows the satellite's inbound trajectory and the current rotator position. ![Gpredict-2e](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-2e.png) ![Gpredict-3](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-3.png) ### Raspberry Since Gpredict is also supported under Linux, it can be directly run and used in the Raspberry Pi. The operation steps are basically the same, and will not be repeated here. here is how to start the Hamlib ``` rotctld -vvvvv -m 2401 -r /dev/ttyUSB0 ``` ### Android #### Look4Sat Look4Sat wireless control is currently supported, please refer to this repo [Look4Sat-AntRunner-Controller](https://github.com/wuxx/Look4Sat-AntRunner-Controller) ## System Detail This section is a detailed description of the technical principle. Those who are not interested can ignore the description in this section and go directly to the actual operation chapter. ### Rotator Motor Control The bottom chip of the rotary controller uses ESP32, and the firmware running on it is GRBL, which was originally an open source CNC control firmware, and was first run on the ATmega328P chip (a low-end single-chip microcomputer with a main frequency of only 16MHz, SRAM The capacity is 2KB, and the Flash storage capacity is 32KB), while ESP32 is a WiFi chip launched by Espressif Information Technology. With 40nm process, dual-core 32-bit MCU, 2.4GHz dual-mode Wi-Fi and Bluetooth chip, the main frequency is up to 240MHz, the SRAM capacity is 520KB, and the Flash capacity is up to 16MB. It supports more and stronger features, so the [Grbl_ESP32 version](https://github.com/bdring/Grbl_Esp32) transplanted by the open source community is used. It not only supports conventional serial port control, but also has a complete set of WEBUI, which can be manually controlled and configured through the WEBUI, and can also be controlled through the telnet 22 port. (Of course, an HTTP request can also be constructed to realize control from the WEB 80 port), since ESP32 supports Bluetooth, the motor control can also be achieved theoretically through Bluetooth. Since WiFi communication is more universal, the speed and stability of communication are also relatively high. Better, and the software protocol stack based on TCP/IP makes communication more stable and reliable, so the current implementation of wireless control is based on WiFi. By default it creates its own wireless network SSID `GRBL_ESP` with default password `12345678` you can connect. You can connect and use WebUI to change, or you can change through serial commands to e.g. connect to your existing WiFi network. See the [Grbl_Esp32 wiki](https://github.com/bdring/Grbl_Esp32/wiki/Setting-up-the-Wifi-Network) for more instructions. Note 1: The control command of the Grbl system is generally called G-code, which is a simple command system also used for e.g. CNC or 3D printing. For example: "G0 X0 Y5" means to move the current position to the coordinates [0mm, 5mm]. But with AntRunner [360º = 40mm](https://github.com/Hamlib/Hamlib/blob/e9fb733dae0e7acb2897850787ebbdcf2520e37c/rotators/grbltrk/grbltrk.c#L220) (both X Azimuth and Y Elevation), so to move to 45º elevation `G0 Y5` or to move azimuth by one degree `G91 G0 X0.111 G90` (relative and then restore absolute). Grbl also has its own `$…` command system. For more: * [Grbl FAQ for G-Code](https://github.com/gnea/grbl/wiki/Frequently-Asked-Questions#where-are-g-codes-defined-what-does-each-of-them-do) points to http://linuxcnc.org/docs/html/gcode.html * Grbl `$…` commands: https://github.com/gnea/grbl/wiki/Grbl-v1.1-Commands * Grbl ESP32 has additional settings: https://github.com/bdring/Grbl_Esp32/wiki/Settings ### Gpredict Gpredict (https://github.com/csete/gpredict) is lead by Alexandru Csete (call sign oz9aec) is an open source real-time satellite tracking and orbit forecasting software that can track an unlimited number of satellites and display their positions and other data in lists, tables, maps, radars, etc. It can also predict the future time through a satellite and provide you with detailed information. In addition, it can connect to a variety of commonly used radio stations, SDR equipment and a variety of antenna rotators. The main use scenario of AntRunner is to cooperate with Gpredict. Real-time tracking control. Since it is an open source project based on GPL, Gpredict is still developing under the impetus of the community, and it is believed that more functions and more convenient features will be implemented in the future. ### Hamlib Hamlib (https://hamlib.github.io/) is a control library for radios and rotators based on the LGPL open source protocol, supporting Windows/Linux. Gpredict mentioned above can control various types of radio equipment and rotators. The above are all controlled by Hamlib. It can be understood that Hamlib is the middle layer between Gpredict and the actual hardware. Hamlib provides a unified control interface to Gpredict, and itself realizes the operation of complex hardware devices. In actual operation, Hamlib runs in the background as a separate task, which receives requests and sends responses through TCP port 4533. For example: Gpredict sends "p 30 60" through TCP port 4533, which means to adjust the current rotator azimuth to 30 degrees, the pitch angle is adjusted to 60 degrees, and the actual hardware operation is performed by Hamlib. Gpredict does not need to care what type of rotator is used, just specify the model of the rotator when Hamlib starts. Note: AntRunner's driver is implemented in Hamlib, and has been incorporated into the official Hamlib repository (https://github.com/Hamlib/Hamlib), merge node: https://github.com/Hamlib/Hamlib/pull/1032. Just take the latest version of Hamlib or any release [version 4.5](https://github.com/Hamlib/Hamlib/releases/tag/4.5) or later. ### Look4Sat Look4Sat (https://github.com/rt-bishop/Look4Sat) is an Android-based open source satellite tracking software implemented by Arty Bishop. The page is concise and easy to use. The latest submission also supports the control of the rotator. The real-time display of the gyroscope is supported during the tracking process, which can easily align the satellite. At present, other similar satellite prediction software does not support this simple use method, and it is widely used in the current HAM. Look4Sat's control of the rotator is sent over the network, for example "\set_pos 30.0 60.0" means to adjust the current spinner azimuth to 30 degrees and pitch to 60 degrees. Since Hamlib is not currently supported on the Android side, an additional hardware device is required to control through Look4Sat. Here, I designed a small system based on ESP32-C3 to convert network requests into actual GRBL commands and send them to the GRBL firmware to achieve orientation and The control of pitch is equivalent to implementing a simple "Hamlib" by itself. check the project here [Look4Sat-AntRunner-Controller](https://github.com/wuxx/Look4Sat-AntRunner-Controller) ### SDR# SDR# is a popular SDR control application. It is simple and convenient to use. It supports a variety of common SDR devices, supports a variety of plug-in functions, and can be linked with Gpredict. At the same time, Gpredict can also support wireless devices and rotators. : Use SDR equipment such as RTL-SDR, and use Gpredict to track satellites at the same time, gpredict can send Doppler frequency to SDR# through the corresponding plug-in in SDR# for real-time adjustment, and Gpredict can control the rotator in real time for tracking. Other plug-ins in SDR# can analyze and record the received signal waveform to realize the linkage of the whole system. ### How to Get One Some guys ask me if they could buy AntRunner rotator, so I made some AntRunner prototypes. Interested friends can place an order in my tindie store: https://www.tindie.com/products/johnnywu/the-antrunner-rotator/ ## Reference - Gpredict (https://github.com/csete/gpredict) - Hamlib (https://hamlib.github.io/) - Look4Sat (https://github.com/rt-bishop/Look4Sat) - sdr# (https://airspy.com/download/) - Look4Sat-AntRunner-Controller (https://github.com/wuxx/Look4Sat-AntRunner-Controller) ================================================ FILE: README_cn.md ================================================ # AntRunner 天线旋转器 [English](./README.md) * [介绍](#介绍) * [特性](#特性) * [规格](#规格) * [使用教程](#使用教程) * [系统原理说明](#系统原理说明) * [参考](#参考) ## 介绍 AntRunner是MuseLab设计实现的便携式天线旋转器,支持360度方位角和180度俯仰角的控制,可承重最大10KG的天线,支持平台 Windows/Linux/Mac/RaspberryPi/Android,配合对应的开源上位机可实现卫星的实时自动指向跟踪,支持有线(串口)与无线( Wifi 2.4G)2种控制方式,支持多种规格的天线(一般为八木天线),安装方便。使用12V电池供电,可利用充电宝+12V快充诱骗线直接供电,整体重量较轻,便于携带,精心设计的多种功能,更方便各位HAM在野外的架台使用。 ![AntRunner-1](https://github.com/wuxx/AntRunner/blob/master/doc/1.jpg) ![AntRunner-3](https://github.com/wuxx/AntRunner/blob/master/doc/3.jpg) ![AntRunner-2](https://github.com/wuxx/AntRunner/blob/master/doc/2.jpg) ## 特性 - 方位角和仰角全角度跟踪 - 支持平台 Windows/Linux/RaspberryPi/Android - 支持有线串口控制 - 支持无线WiFi 2.4G 控制 - 12V电源供电,方便野外架设 - 拆装方便 ## 规格 - 旋转限制: AZ: 0 - 360°; EL: 0-180° - 最大负载: 10KG - 齿隙: AZ:1° EL:1° - 重量: 3.5KG - 尺寸: 120mmØ x 65mm (H) i ## 使用教程 ### Windows #### 0 天线安装 将天线通过U型抱箍安装至旋转器U型支架上,注意尽量安装至天线的重心处,以使运行更加平稳。 #### 1 旋转器调整 上电之前需要将旋转器的方位角调整到正北方(方位角0度),俯仰调整为水平(俯仰角0度),此步骤可通过手机指南针APP配合完成调整。 #### 2 接线上电 使用12V电源将旋转器上电,并通过TYPE-C线连接旋转器和PC,正常连接后设备管理器中会出现一个串口,如图所示 ![AntRunner-1](https://github.com/wuxx/AntRunner/blob/master/doc/AntRunner_Start-1.png) #### 3 启动Hamlib 进入Hamlib目录,目录中有一批处理脚本,脚本中为一条命令, 如下所示,需要手动编辑一下脚本,修改其中的串口号。由于串口编号为系统分配,不同系统编号有所不同,故需要使用文本编辑器手动更改串口号再运行 ``` rotctld.exe -vvvvv -m 2401 -r COMx ``` 将COMx修改成设备管理器中出现的实际串口号即可,保存脚本,双击运行即可。 ![AntRunner-2](https://github.com/wuxx/AntRunner/blob/master/doc/AntRunner_Start-2.png) ![AntRunner-3](https://github.com/wuxx/AntRunner/blob/master/doc/AntRunner_Start-3.png) ![AntRunner-4](https://github.com/wuxx/AntRunner/blob/master/doc/AntRunner_Start-4.png) #### 4 启动Gpredict 双击gpredict.exe,即可打开Gpredict程序 ![Gpredict-1a](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-1a.png) ##### 4.1 经纬度配置 首先需要配置你所在的地区的经纬度,选择 Edit -> General -> Ground Stations -> Add new,在出来的页面中配置好自己当地的经纬度、高度即可。 ![Gpredict-1c](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-1c.png) ##### 4.2 卫星配置 需要将欲跟踪的卫星添加至列表中,点击右上方的倒三角,选择 Configure, 在出现中的窗口中将欲跟踪卫星添加至右侧小窗口内即可 ![Gpredict-1b](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-1b.png) ##### 4.3 旋转器配置 新建一个旋转器设备,选择 Edit -> Interfaces -> Rotators -> Add New,并根据如图所示配置 ![Gpredict-1d](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-1d.png) ##### 4.4 旋转器测试 配置完旋转器之后,即可对旋转器进行初步的测试,点击右上方的倒三角,选择Antennna Control,即可进入旋转器控制页面, Device选择刚刚新建的grbltrk, 点击Engage初始化旋转器,然后即可配置方位角和俯仰角,配置完旋转器会即时响应,并会实时返回当前的角度值。 ![Gpredict-2b](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-2b.png) ![Gpredict-2c](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-2c.png) ![Gpredict-2d](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-2d.png) ##### 4.5 卫星跟踪 在Target中选择需要跟踪的卫星如ISS,点击Track,旋转器即会开始实时跟踪卫星,若卫星未入境,则会调整俯仰角为0度,方位角为卫星入境时的角度,等待卫星入境,左方的雷达图中亦会显示卫星的入境轨迹以及当前的旋转器位置。 ![Gpredict-2e](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-2e.png) ![Gpredict-3](https://github.com/wuxx/AntRunner/blob/master/doc/Gpredict-3.png) ### 树莓派 由于Linux下亦支持Gpredict,树莓派中可直接运行使用,操作步骤基本相同,在此不再赘述。 Hamlib启动命令如下 ``` rotctld -vvvvv -m 2401 -r /dev/ttyUSB0 ``` ### Android #### Look4Sat 目前已经实现通过Look4Sat控制,需要额外的控制板,具体参考此项目[Look4Sat-AntRunner-Controller](https://github.com/wuxx/Look4Sat-AntRunner-Controller) 注意:由于Look4Sat源码始终处于迭代开发中,适配代码可能过时,可能需要手动修改控制源码适配最新的Look4Sat ## 系统原理说明 本节为技术原理细节描述,不感兴趣的朋友可直接忽略本节说明,直接前往实际操作章节使用。 ### 旋转器电机控制原理说明 旋转控制器底层芯片使用ESP32,其上运行的固件为GRBL,这原本是一款开源的CNC控制固件,最早运行于ATmega328P芯片上(一款性能较为低端,主频仅为16MHz的单片机,SRAM容量为2KB,Flash存储容量为32KB),而ESP32则是乐鑫信息科技推出的一颗WiFi芯片。拥有40nm工艺、双核32位MCU、2.4GHz双模Wi-Fi和蓝牙芯片、主频高达240MHz,SRAM容量为520KB,Flash容量最高则可达16MB, 较高的性能,丰富的外设使得其可以支持更多更强的特性功能,故这里使用的是开源社区移植的[GRBL版本](https://github.com/bdring/Grbl_Esp32)。其不仅支持常规的串口控制,而且有一套完善的WEBUI,可通过WEBUI进行手动控制、配置,也可通过telnet 22端口实现网络控制。(当然,也可以构造HTTP请求从WEB 80端口实现控制),由于ESP32支持蓝牙,理论上也可通过蓝牙实现电机的控制,由于WiFi的通信更加具有普适性,通信的速度、稳定性也相对更好一些,且基于TCP/IP的软件协议栈使得通信也更加稳定可靠,故当前无线控制的实现基于WiFi实现。 注1:GRBL系统的控制命令一般称之为gcode,是一种简单的指令系统,例如:"G0, X0, Y5" 表明将当前位置移动到坐标[0mm, 5mm]处。 ### Gpredict上位机说明 Gpredict (https://github.com/csete/gpredict)为 Alexandru Csete (呼号为 oz9aec)发起并主导的开源的实时卫星跟踪和轨道预报软件,它可以跟踪无限数量的卫星,并以列表,表格,地图,雷达等方式显示他们的位置和其他数据。它还可以通过一个卫星预测未来的时间, 并为您提供详细资料,另外它还可以对接多种常用的电台、SDR设备和多种的天线旋转器,AntRunner的主要使用场景即为和Gpredict配合实现实时的跟踪控制。 由于其是基于GPL的开源项目,当前Gpredict仍然在社区的推动下不断的发展,相信后续会有更多的功能、更方便的特性实现。 ### Hamlib中间件说明 Hamlib (https://hamlib.github.io/) 为基于LGPL开源协议的无线电和旋转器的控制库,支持Windows/Linux, 上面提到Gpredict可控制各种规格型号的无线电设备和旋转器,实际上都是通过Hamlib实现控制的,可以理解成Hamlib是Gpredict和实际的硬件的中间一层,Hamlib向Gpredict提供统一的控制接口,其自身则实现复杂的各类硬件设备的操作。在实际运行时,Hamlib为一个单独的任务运行在后台,其过TCP 4533端口接收请求并发送响应,例如:Gpredict通过4533 TCP端口发送“p 30 60”则意为将当前旋转器方位角调整为30度,俯仰角调整为60度,由Hamlib来进行实际的硬件操作,Gpredict并不需要关心使用的什么规格型号的旋转器,只需在Hamlib启动时候指定旋转器的型号即可。 注:AntRunner的驱动即实现在Hamlib中,并已经合入到官方Hamlib仓库 (https://github.com/Hamlib/Hamlib) 取Hamlib的最新版本即可。合入点:https://github.com/Hamlib/Hamlib/pull/1032 ### Look4Sat说明 Look4Sat (https://github.com/rt-bishop/Look4Sat) 为 Arty Bishop实现的基于Android的开源卫星跟踪软件,页面简洁使用,最新的提交也支持了旋转器的控制,其主要特色是在卫星跟踪过程中支持陀螺仪的实时显示,可以方便的对准卫星,目前其他同类卫星预测软件均不支持这种简洁的使用方式,在当前HAM中较为广泛使用。 Look4Sat对于旋转器的控制通过网络发送,例如"\set_pos 30.0 60.0" 表明将当前旋转器方位角调整为30度,俯仰角调整为60度。 由于Android端当前并不支持Hamlib,所以通过Look4Sat控制需要一个额外的硬件设备,这里自己基于ESP32-C3设计了一个小系统,用于将网络请求转换成实际的GRBL命令发送给GRBL固件实现方位和俯仰的控制,其作用相当于自己实现了一个简单的"Hamlib"。 ### SDR# SDR# 是目前流行的SDR控制上位机,使用简单方便,支持多种常见的SDR设备,支持多种插件功能,可以和Gpredict实现联动,同时Gpredict又可支持控制无线设备和旋转器,故可以实现:使用SDR设备例如RTL-SDR,同时用Gpredict跟踪卫星,gpredict可以通过SDR#中的对应插件向SDR#发送多普勒频率进行实时调整,同时Gpredict又可实时的控制旋转器进行跟踪。SDR#中的其他插件则可以对接收到的信号波形进行分析、录制等,实现全系统的联动。 ## 参考 ================================================ FILE: firmware/flash_dump.sh ================================================ #!/bin/bash esptool.py -b 115200 -p /dev/ttyUSB0 read_flash 0x0 0x400000 flash_image.bin ================================================ FILE: firmware/flash_erase.sh ================================================ #!/bin/bash esptool.py -b 115200 -p /dev/ttyUSB0 erase_flash ================================================ FILE: firmware/flash_write.sh ================================================ #!/bin/bash ESPTOOL=esptool.py #SER_PORT=COM32 #on windows with git-bash SER_PORT=/dev/ttyUSB0 #SER_PORT=/dev/ttyUSB1 #SER_PORT=/dev/ttyACM0 BAUDRATE=460800 IMAGE=flash_image_20220821.bin echo "write [$IMAGE]" ${ESPTOOL} \ --chip esp32 \ -p ${SER_PORT} \ -b ${BAUDRATE} \ --before=default_reset \ --after=hard_reset \ write_flash \ --flash_mode dio \ --flash_freq 40m \ --flash_size 4MB \ 0x0 ${IMAGE} ================================================ FILE: software/hamlib-w64-4.5~git/AUTHORS.txt ================================================ This file is licensed to you under the license specified in the included file `COPYING'. Look there for further details. Authors of the Hamlib API, original code: Frank Singleton and Stephane Fillod Contributors: (if any is missing, please email the current maintainer). For any reason, if you prefer not to appear in this list, please let me know. M: Current maintainer C: Contributors W: Web-page with status/info S: Status, one of the following: Supported: Someone is actually bothered to look after this. Maintained: Someone actually looks after it. Odd Fixes: It has a maintainer but they don't have time to do much other than throw the odd patch in. See below.. Orphan: No current maintainer [but maybe you could take the role as you write your new code]. Obsolete: Old code. Something tagged obsolete generally means it has been replaced by a better system and you should be using that. Backends: [adat: ADT-200A] M: Frank Goenninger DG1SBG [alinco: DX77-T] M: Ben Coleman NJ8J [aor] C: testing by John Ronan [aor: AR-7030] M: Friedrich Melchert DC9RP [aor: AR-7030 Plus] M: Larry Gadallah VE6VQ [aor: AR-3030] M: Tristan Mills [aor: AR-8200] M: Rob Walker [drake] M: Mark J. Fine [icom: ic7000] M: Kent Hill, AD7AI [icom: ic7200] M: James Watson, HZ1JW [icom: ic718] M: Chuck Gilkes, WD0FCL/4 [icom: icr7000] M: Chuck Hemker, N2POR [icom: ic735] C: Darren Hatcher, G0WCW [icom: ic751] C: Lars E. Pettersson, SM6RPZ [icom: icr75] M: Mark J. Fine [icom: OptoScan] M: Michael Smith, KE4RJQ [icom] M: Stephane Fillod, F8CFE [jrc] M: Mark J. Fine C: Manual and testing by Bob Parnass, AJ9S [kenwood] M: Joop Stakenborg, PG4I C: Alessandro Zummo, IZ1PRB [kenwood: K2] M: Nate Bargmann, N0NB M: Brian Mury, VE7NGR C: Leigh Klotz, WA5ZNU [kenwood: K3] M: Nate Bargmann, N0NB C: Alexander Sack [kenwood: TS-480SAT] M: Juergen Rinas, DC3BW [kenwood: TS-570] M: Rob Frohne, KL7NA C: Thomas Beierlein, DL1JBE [kenwood: R-5000] M: Mark J. Fine [kenwood: tmd700] M: Charles Suprin, AA1VS [kenwood: thg71,tmv7,tmd700] C: Thierry Leconte, F4DWV [kenwood: thg71,tmv7] M: Andrew McNamara [kenwood: thd7] M: Stephane Fillod, F8CFE [kenwood: ts-850] C: Rob Frohne, KL7NA [kit: Si570 AVR-USB] C: Fabrice, F4AVI [kit: Elektor SDR] C: John Nogatch, AC6SL [pcr: pcr100,pcr1000] M: Alessandro Zummo, IZ1PRB C: Darren Hatcher, G0WCW [tentec] M: C: testing by James Chance, N3TKD [tentec: tt516] M: James Nykiel [tentec: tt538] M: Mike Markowski AB3AP [tentec: tt550] M: Ken Koster, N7IPB [tentec: tt565] M: Martin Ewing AA6E [tentec: Argonaut V] C: Dave Freese, W1HKJ [tentec: tt585] C: Bert, KG4BEC [tentec: rx331] M: Berndt Josef Wulf, VK5ABN [uniden: 245xlt] M: Eric Cottrell WB1HBU [winradio] M: C: Pascal Brisset [yeasu: ft1000d] M: Serge Pashenkov [yeasu: ft100] M: Alex V Flinsch, KC2IVL [yaesu: ft736] C: Ron Patterson, W6FM [yaesu: ft747] M: C: Chris Bryant, G3WIE C: Frank Singleton, VK3FCS [yaesu: ft767gx] M: Steve Conklin, AI4QR [yaesu: ft817] M: Chris Karpinsky, AA1VL [yaesu: ft847] M: Jim Jerzycke, KQ6EA C: Frank Singleton, VK3FCS [yaesu: ft920, ft890, ft900] M: Nate Bargmann, N0NB [yaesu: ft980] M: Wolfgang Buesser, DK1BW [yaesu: ft990] M: Berndt Josef Wulf, VK5ABN [yaesu: ft950,newcat] M: Terry Embry, KJ4EED [yaesu: VR-5000] M: Jacob Heder [yaesu: FT-600] C: Kārlis Millers [CM108 GPIO PTT] M: Andrew Errington, ZL3AME Rotators [celestron] M: Stephane Fillod, F8CFE C: Eric/N3KQX [easycomm] M: Luc Langehegermann, LX2GT C: Francois Retief [fodtrack] M: Luc Langehegermann, LX2GT [amsat/if-100] M: Stephane Fillod, F8CFE C: Patrick Strasser, OE6PSE [heathkit:HD 1780 Intellirotor] M: Rob Frohne, KL7NA [rotorez] M: Nate Bargmann, N0NB [spid] M: Norvald H. Ryeng, LA6YKA [m2] M: Magne Mæhre, LA1BFA C: Ron Patterson, W6FM [ars] M: Stephane Fillod, F8CFE C: Chris Bryant, G3WIE [ts7400] M: Øystein Hårberg, LA7LKA [indi] M: Norbert Varga, HA2NON [Frontend] M: Stephane Fillod, F8CFE [src/locator.c] M: Dave Hines, M1CXW C: Stephane Fillod, F8CFE C: Nate Bargmann, N0NB [test utilities] M: Stephane Fillod, F8CFE C: Nate Bargmann, N0NB C: Nirgal Vourgère [platform: FreeBSD] M: Diane Bruce, VA3DB [platform: NetBSD] M: Berndt Josef Wulf, VK5ABN [platform: win32] M: Stephane Fillod, F8CFE C: VB & testing by Darren Hatcher, G0WCW C: VB.NET wrapper by Michael Benz [packaging: debian] M: Kamal Mostafa, KA6MAL M: Jaime Robles, EA4TV C: Joop Stakenborg, PG4I [packaging: RPM] M: Alexandru Csete, OZ9AEC M: Joop Stakenborg, PG4I [Web site: http://www.hamlib.org] M: Joop Stakenborg, PG4I M: Stephane Fillod, F8CFE M: Nate Bargmann, N0NB E-mail addresses: Frank Singleton, VK3FCS, Stephane Fillod, F8CFE, Pascal Brisset Nate Bargmann, N0NB, Chris Karpinsky, AA1VL, Joop Stakenborg, PG4I, Bob Parnass, AJ9S, Francois Retief, James Chance, N3TKD, Chuck Hemker, N2POR, Alex V Flinsch, KC2IVL, Chuck Gilkes, WD0FCL/4, Dale E. Edmons, KD7ENI, Michael Smith, KE4RJQ Berndt Josef Wulf, VK5ABN Mark J. Fine Jim Jerzycke, KQ6EA Alexandru Csete OZ9AEC Diane Bruce, VA3DB Dave Hines, M1CXW, Darren Hatcher, G0WCW, Ben Coleman, NJ8J, Serge Pashenkov Lars E. Pettersson SM6RPZ Thomas Beierlein, DL1JBE, Kent Hill, AD7AI, Dave Freese, W1HKJ, Rob Frohne, KL7NA, Steve Conklin, AI4QR, Martin Ewing, AA6E, Terry Embry, KJ4EED, Alessandro Zummo, IZ1PRB Norvald H. Ryeng, LA6YKA Larry Gadallah, VE6VQ Kamal Mostafa, KA6MAL, Jaime Robles, EA4TV, Wolfgang Buesser, DK1BW, Magne Mæhre, LA1BFA, Charles Suprin, AA1VS, Robert Steinhäußer, DL1NC, James Watson, HZ1JW, Juergen Rinas, DC3BW, Kamal Mostafa, KA6MAL, Roger, Tristan Mills, Terry Dawson, VK2KTJ, Øystein Hårberg, LA7LKA, Alexander Sack Nirgal Vourgère Andrew Errington Kārlis Millers YL3ALK Norbert Varga HA2NON ================================================ FILE: software/hamlib-w64-4.5~git/AntRunner_Start_Serial.bat ================================================ .\bin\rotctld.exe -vvvvv -m 2401 -r COM1 ::.\bin\rotctld.exe -vvvvv -m 601 -r COM470 pause ================================================ FILE: software/hamlib-w64-4.5~git/AntRunner_Start_WiFi.bat ================================================ .\bin\rotctld.exe -vvvvv -m 2402 --set-conf=rot_pathname="192.168.123.163:23" ================================================ FILE: software/hamlib-w64-4.5~git/COPYING.LIB.txt ================================================ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ================================================ FILE: software/hamlib-w64-4.5~git/COPYING.txt ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. ================================================ FILE: software/hamlib-w64-4.5~git/ChangeLog.txt ================================================ For a complete log of changes to Hamlib, please visit: http://sourceforge.net/p/hamlib/code/commit_browser Major changes in 4.0 affecting usage Most rig model numbers have changed RIG_LEVEL_VOX has been deprecated and replaced by RIG_LEVEL_VOXDELAY rigctl 'f' command now returns VFO argument too rigctl 'y' and 'Y' command now take/show antenna argument and option. range_list items are undergoing changes towards a different model TBD RTS/DTR PTT sharing is off by default now -- use serial_share=1 option to enable ================================================ FILE: software/hamlib-w64-4.5~git/LICENSE.txt ================================================ Hamlib - Ham Radio Control Libraries Copyright (C) 2000,2001 Frank Singleton Copyright (C) 2000,2001 Stephane Fillod Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009, 2010,2011,2012 The Hamlib Group See the included README file for more information on Hamlib and the Hamlib Project or visit http://www.hamlib.org for documentation and links to the source code of Hamlib. The 'AUTHORS' file lists contributors known as the The Hamlib Group. The frontend library source code files and associated backend library source code files are licensed and released under the Lesser GNU Public License (LGPL): This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA The included file 'COPYING.LIB' is a copy of the GNU Lesser General Public License. Various other supplied program source files and example source files are licensed and released under the GNU Public License (GPL): This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. The included file 'COPYING' is a copy of the GNU General Public License. ================================================ FILE: software/hamlib-w64-4.5~git/README.betatester.txt ================================================ Hamlib - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com) (C) Stephane Fillod 2000-2011 (C) The Hamlib Group 2000-2013 Why does Hamlib need beta-testers? ================================== Hamlib is developed by a team of radio enthusiasts around the world, for fun, much in the spirit of ham radio. (Note that it is not restricted for ham usage only). There are a great deal of protocols and rigs around the world developers may not own. However, protocols may be available, so backends can be implemented, but cannot always be tested by developers. That's where beta-testers are so precious. On top of that, I've been told that there's no such sure thing like bug free code. Feedback and improvement requests are also valuable. Okay, you volunteer as beta-tester, how to proceed? =================================================== First of all, you can start testing official releases. They are easier to test because they come in precompiled and packaged (.rpm, .deb, etc.) but they have the drawback of being older than the Git repository. Reports from these versions are still very appreciated. Please send them to the hamlib-developer@lists.sourceforge.net mailing list. However, the development of Hamlib is still very active, so it's better to test from the latest Git version of the code. And, depending on feedback you make, developers can commit a fix, so you can try out the change soon after, without waiting for the next official version. To proceed, you will have first to obtain either a daily snapshot or a check out the latest sources from the Git repository, then rebuild the Hamlib package and finally test it with your rig. Don't worry, it's much simpler than it looks, despite the size of the package. Pre-requisite: - some kind of internet access - POSIXish compiler toolchain (gcc, make, C library development headers, etc., see README.developer for a complete list and building from a Git checkout) So here we go: Daily Git master branch snapshots: ================================== Download the latest Git master branch snapshot from: http://n0nb.users.sourceforge.net You'll find a tarball with a name like hamlib-3.0~git-30e58df-20121009.tar.gz, i.e. a check out made 09 Oct 2012 With a Git SHA1 of 30e58df (The SHA1 is a signature of each commit. Each is unique and as our project is small, the first seven characters for the full 40 character SHA1 are likely unique. The shorthand SHA1 is automatically generated and may become longer in the future.), ready for building using the familiar "three step" (see below). Each morning by about 1130z a new snapshot is generated and uploaded and the prior day's version is removed. The advantage of the Git snapshot is that you won't need as many tools installed to build Hamlib as the work of the GNU Build System has already been done. Most of the other packages listed below will be needed. If you tell the 'configure' script to build certain parts of Hamlib like documentation or scripting language bindings the relevant optional packages will be needed. See 'configure --help' for more information. Here is a list of development packages needed for a complete build of the library (Debian package names are listed, other distributions may differ): * Gnu C (gcc) or any C99 compliant compiler # gcc --version * Gnu make (or any modern one, BSD okay) # make --version N.B. The Debian and derivatives (Ubuntu and friends) 'build-essentials' package will install a number of tools and minimize the number of packages that need to be installed manually. Optional, but highly recommended for a complete build: * GNU C++ (g++) # g++ --version * swig (for bindings) 1.3.14+ # swig -version * perl devel # h2xs * tcl devel # tcltk-depends * python devel # python-config * zlib devel # Needed by configure's test for Python * libxml2 devel # xml2-config --version * libgd2 devel # gdlib-config --version * libusb-1.0 devel # ver 1.0 or newer (not 0.1!) * libreadline devel # ver 5.2 or newer N.B The libusb package is required for building most of the 'kit' backend. The newer version is needed, not 0.1. Debian and derivatives package libusb-1.0 which is what is needed. Documentation: * Doxygen Git master branch daily snapshot build: ======================================= Reading the INSTALL file in top directory will explain in more detail how to do the following commands. ./configure [--prefix=$HOME/local] make make check make install The prefix argument is optional. Convention is that local packages be placed in /usr/local away from distribution installed packages This is the default location for the snapshots so it may be disregarded unless you wish to install Hamlib elsewhere. The example above would install Hamlib to the user's home directory under the 'local' subdirectory. Other useful options are '--with-perl-binding' or '--with-python-binding' or '--with-tcl-binding' if you are interested in Swig binding support for those scripting languages If you are unsure it is safe to ignore these options. 'make' will run the C and, optionally, the C++ compiler building all of the binary object files and finally linking all of them together to form the Hamlib "frontend" and "backend" libraries. The 'make check' target will run a few predetermined tests using the 'dummy' (rig model 1) backend and some other Hamlib functions in the build tree. This is a basic sanity check and cannot test all backends. The 'make install' target will require super user (root/administrator) privileges when installing to the system directories as a normal user. Some Linux distributions offer the 'sudo' command to grant temporary root privileges or the 'su' command to login as "root". Consult your distribution's documentation. NOTE! If Hamlib has not been previously installed as a locally built package you will need to make sure that 'ldconfig' is configured correctly and run after 'make install'. Most modern distributions have an /etc/ld.so.conf.d/ directory where local configuration can be made. Later versions of Debian and derivatives have a file named 'libc.conf' in this directory. The contents of libc.conf are: # libc default configuration /usr/local/lib If your system does not have such a file, one will need to be created and then 'ldconfig' will need to be run as the root user so that applications using the Hamlib libraries can find them. To delete the binary files from the source directory after compiling: make clean To also remove the Makefiles and other build files generated by 'configure', along with the binary files as with 'make clean' above: make distclean The 'configure' script will need to be run again as above. The above commands will clean things up so Hamlib can be compiled with other configure script options. To remove Hamlib from your system: sudo make uninstall Note that due to a limitation in a Perl support script that if the Perl binding is built and installed that not all of the files under /usr/local/lib/perl/PERL_VERSION will not be removed. Git checkout: ============= Please read the beginning of README.developer file, especially Section 1 which details the Git checkout, the required tools and versions (very important or make won't even work!), and how to use the bootstrap script. Structure: ========== For the brave who want to peruse the contents, here are what all the subdirectories are for (these are just a sample as more are added from time to time): alinco,aor,icom, jrc,kachina,kenwood, pcr,tentec,uniden, winradio, yaesu,etc: rig backends easycomm,rotorez, sartek, etc: rotator backends dummy: virtual dummy rig and rotator, for testing use. lib: library for functions missing on your system bindings Perl, Python, Tcl, and Visual Basic bindings c++: C++ bindings doc: documentation base and scripts to extract from src include/hamlib: exported header files go here include: non-distributed header files go there src: Hamlib frontend source directory tests: rigctl/rotctl and various C programs for testing Testing Hamlib: =============== Don't attempt to test Hamlib from the source directory unless you're a developer and you understand the side effects of *not* installing freshly generated objects (basically having to mess with LD_LIBRARY_PATH and .libs). Do an 'sudo make install' to install the libraries in the system area. (You did run 'sudo ldconfig' after 'sudo make install', right?) So here we go. First of all, identify your rig model id. Make sure /usr/local/bin (or the path you set --prefix to above) is in your $PATH, as your shell has to be able to locate rigctl. Run 'rigctl -l' to get a list of rigs supported by Hamlib. If you cannot find your radio in the list, please report to the hamlib-developer mailing list. The protocol manual and rig specifications will help us a lot. You found your rig's ID? Good! You're almost ready to use rigctl. Have a quick look at its manual page: man rigctl or: man -M /usr/local/man rigctl or simply: rigctl --help Let's say you own an Icom IC-756: rigctl -vvvvv -r /dev/ttyS0 -m 326 The -vvvvv is very important since this will increase verbosity, and give precious traces to developers if something goes wrong. At this level, the protocol data exchanged will also be dumped to the screen. Some backends produce a useful amount of data regarding function calls and critical variables with the -vvvv option without all the protocol data. Unless some problem shows up, you should be presented with a menu like "Rig command: ". Enter "?" followed by return to have the list of available commands. 'Q' or 'q' quits rigctl immediately. Most wanted functions to be tested are: '_' get misc information on the rig 'f' get frequency 'F' set frequency, in Hz 'm' get mode 'M' set mode (AM,FM,CW,USB,etc. and passband width in Hz) 'v' get vfo 'V' set vfo (VFOA, VFOB, etc.) f,F get_freq/set_freq try various (<1MHz, <30Mhz and >1GHz) v,V get_vfo/set_vfo VFOA, VFOB m,M get_mode/set_mode FM, USB, LSB, CW, WFM, etc. passband is in Hz (pass 0 for default) G vfo_op UP, DOWN _ get_info should give remote Id and firmware vers NB: some functions may not be implemented in the backend or simply not available on this rig. When reporting to the hamlib-developer mailing list, please include traces and also comments to tell developers if the action performed correctly on the rig. Tip: Traces can be hard to cut and paste sometimes. In that case, there's a handy tool for you: script(1) (the (1) is not a part of the command, rather it is a Unix convention telling which section of the manual it is found, in this case section 1, user commands. e.g. 'man 1 script'). It will make a typescript of everything printed on your terminal and save it to the file you give it. $ script my_rig_traces.txt Script started, file is my_rig_traces.txt $ rigctl -vvvvv -r /dev/ttyS0 -m 326 rig:rig_init called rig: loading backend icom icom: _init called rig_register (309) rig_register (326) rig:rig_open called Opened rig model 326, 'IC-756' Rig command: q rig:rig_close called rig:rig_cleanup called $ exit exit Script done, file is my_rig_traces.txt $ And then send my_rig_traces.txt to the hamlib-developer mailing list. Some models need S-meter calibration, because the rig only returns raw measurement. It's easy, it takes only 10mn. Here's how to proceed: 1. Fire up the rigctl program released with the Hamlib package, and pass along options as needed (serial speed, etc.). 2. Tune to some frequency reporting S0 to the radio S-Meter. 3. At rigctl prompt, issue "get_level" ('l' in short) of the level RAWSTR. 4. Write down the S-level read on radio front panel, and the RAWSTR value retrieved. 5. Repeat from step 2 with S9 and S9+60dB. Actually the more plots, the better, otherwise Hamlib does interpolation. 6. Send the table to the hamlib-developer mailing list and it will be added in the next release of Hamlib. NB: It is well known the S-Meter of any given radio is far from being accurate. For owners with a fully equipped lab, you may want to make the above-mentioned measurements with a good signal generator and a set of calibrated attenuators. Greg W8WWV has an insightful page about S-Meter calibration: http://www.seed-solutions.com/gregordy/Amateur%20Radio/Experimentation/SMeterBlues.htm Okay folks, test as much as you can, in the weirdest situations if possible. There is a special prize for those who find 'Segmentation fault' and other nasty bugs. Needless to say, patches are also very welcome (see README.developer). :-) Stephane - F8CFE and The Hamlib Group ================================================ FILE: software/hamlib-w64-4.5~git/README.txt ================================================ Hamlib - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com) (C) Stephane Fillod 2000-2011 (C) The Hamlib Group 2000-2012 The purpose of this project is to provide stable, flexible, shared libraries that enable quicker development of Amateur Radio Equipment Control Applications. Many Amateur Radio Transceivers come with serial interfaces that allows software to control the radio. This project will endeavour to provide shared libraries that greatly simplify the application programmer's interaction with radio equipment and other controllable devices such as rotators, switches, etc. Supported Radios ---------------- The Hamlib Wiki page, Supported Radios, contains a snapshot of the supported radios at the time of the last Hamlib release. Go to http://www.hamlib.org to reach the Wiki. Hamlib Design ------------- The library provides functions for both radio and rotator control, and data retrieval from the radio or rotator. A number of functions useful for calculating distance and bearing and grid square conversion are included. libhamlib.so - library that provides generic API for all RIG types. This is what Application programmers will "see". Will have different names on other platforms, e.g. libhamlib-2.dll on MS windows. Also contains all radio and rotator "backends" (formerly in their own dlopen'ed libraries) provided by Hamlib. Backend Examples are: --------------------- 1. yaesu will provide connectivity to Yaesu FT 747GX Transceiver, FT 847 "Earth Station", etc. via a standard API. 2. xxxx. will provide connectivity to the Wiz-bang moon-melter 101A (yikes..) Hamlib will also enable developers to develop professional looking GUI's towards a standard control library API, and they would not have to worry about the underlying connection towards physical hardware. Initially serial (RS232) connectivity will be handled, but we expect that IP (and other) connectivity will follow afterwards. Connection via a USB port is accomplished via the Linux kernel support. USB to serial converters are well supported. Other such devices may be supported as long as they present a serial (RS-232) interface to Hamlib. Availability ------------ Most distributions have the latest Hamlib release in their testing or alpha versions of their distribution. Check your package manager for the Hamlib version included in your distribution. Developing with Hamlib API -------------------------- API documentation is at: https://github.com/Hamlib/Hamlib/wiki/Documentation Take a look at tests/README for more info on simple programming examples and test programs. C++ programming is supported and language bindings are available for Perl, Python, and TCL. A network daemon utility is also available for any programming language that supports network sockets (even netcat!). Recompiling ----------- Hamlib is entirely developed using GNU tools, under various Linux systems. The library may be recompiled by the familiar "three step": ./configure make sudo make install For debugging use this configure ./configure CFLAGS=-g -O0 -fPIC --no-create --no-recursio See the INSTALL file for more information. Contributing ------------ Consult the README.betatester and README.developer files in this directory if you feel like testing or helping with Hamlib development. Contributions of rig specifications and protocol documentation are highly encouraged. Do keep in mind that in some cases the manufacturer may not provide complete control information or it is only available under a Non-Disclosure Agreement (NDA). Any documentation *must* be publicly available so we can legally write and distribute Free Software supporting a given device. The Hamlib team is very interested to hear from you, how Hamlib builds and works on your system, especially on non-Linux system or non-PC systems. We try to make Hamlib as portable as possible. Please report in case of problems at hamlib-developer@lists.sourceforge.net Git email formatted patches or in unified diff format are welcome! Also, take a look at http://sourceforge.net/projects/hamlib/ Here you will find a mail list, link to the Wiki, and the latest releases. Feedback, questions, etc. about Hamlib are very welcome at the mail list: Hamlib Version Numbers ---------------------- Like other software projects, Hamlib uses a version numbering scheme to help program authors and users understand which releases are compatible and which are not. Hamlib releases now follow the format of: Major.minor.incremental Where Major: Currently at 4, but can be advanced when changes to the API require client programs to be rewritten to take advantage of new features of Hamlib. This number has advanced a couple of times throughout the life of Hamlib. Advancement of the major number is only for frontend API changes that require modification of client source. ABI compatibility is presently maintained to prior releases so that a program linked to an earlier 1.2.Y.[Z] release will work with a later 3.Y[.Z] release without recompiling. It is our intention to maintain such ABI compatibility as long as practical. Minor: This number advances when either new backend(s) or new rig model(s) to existing backend(s) are added. Advancing this number informs client program authors (and users of those programs) that new model/backend support has been added. Will also include bug fixes since the last Incremental release. Incremental: May be undefined (e.g. Hamlib 3.0) and would advance to 1 (e.g. Hamlib 3.0.1) for any bug fixes or feature additions to existing model(s) or backend(s), then to 2, etc. New rig models or backends are not included in Incremental. When Release is advanced, Incremental will reset to undefined and will not be included as part of the version number. Release schedule ---------------- Hamlib has in the past maintained a "ready when it's ready" philosophy. However, given that much of the Linux user base is now influenced by the Ubuntu distribution and its timed six month release schedule, Hamlib releases will be scheduled in advance of Ubuntu releases. Planned release dates for Hamlib are now 1 February and 1 August of each calendar year. Between those dates various Incremental releases will occur as development warrants. Have Fun / Frank S / Stephane F / The Hamlib Group 73's de vk3fcs/km5ws / f8cfe ================================================ FILE: software/hamlib-w64-4.5~git/README.w64-bin.txt ================================================ What is it? =========== This ZIP archive or Windows installer contains a build of Hamlib-4.5~git cross-compiled for MS Windows 64 bit using MinGW under Debian GNU/Linux 10 (nice, heh!). This software is copyrighted. The library license is LGPL, and the *.EXE files licenses are GPL. Hamlib comes WITHOUT ANY WARRANTY. See the LICENSE.txt, COPYING.txt, and COPYING.LIB.txt files. Supporting documentation in the form of Unix manual pages have also been included after being converted to HTML. Installation and Configuration ============================== Extract the ZIP archive into a convenient location, C:\Program Files is a reasonable choice. Make sure *all* the .DLL files are in your PATH (leave them in the bin directory and set the PATH). To set the PATH environment variable in Windows 2000, Windows XP, and Windows 7 (need info on Vista and Windows 8/10) do the following: * W2k/XP: Right-click on "My Computer" Win7: Right-click on "Computer" * W2k/XP: Click the "Advanced" tab of the "System Properties" dialog Win7: Click the "Advanced system settings" link in the System dialog * Click the "Environment Variables" button of the pop-up dialog * Select "Path" in the "System variables" box of the "Environment Variables" dialog NB: If you are not the administrator, system policy may not allow editing the path variable. The complete path to an executable file will need to be given to run one of the Hamlib programs. * Click the Edit button * Now add the Hamlib path in the "Variable Value:" edit box. Be sure to put a semi-colon ';' after the last path before adding the Hamlib path (NB. The entire path is highlighted and will be erased upon typing a character so click in the box to unselect the text first. The PATH is important!!) Append the Hamlib path, e.g. C:\Program Files\hamlib-w64-4.0~git\bin * Click OK for all three dialog boxes to save your changes. Testing with the Hamlib Utilities ================================= To continue, be sure you have read the README.betatester file, especially the "Testing Hamlib" section. The primary means of testing is by way of the rigctl utility for radios and rotctl utility for rotators. Each is a command line program that is interactive or can act on a single command and exit. Documentation for each utility can be found as an HTML file in the doc directory. In short, the command syntax is of the form: rigctl -m 1020 -r COM1 -vvvvv -m -> Radio model 1020, or Yaesu FT-817 (use 'rigctl -l' for a list) -r -> Radio device, in this case COM1 -v -> Verbosity level. For testing four or five v characters are required. Five 'v's set a debug level of TRACE which generates a lot of screen output showing communication to the radio and values of important variables. These traces are vital information for Hamlib rig backend development. To run rigctl or rotctl open a cmd window (Start|Run|enter 'cmd' in the dialog). If text scrolls off the screen, you can scroll back with the mouse. To copy output text into a mailer or editor (I recommend Notepad++, a free editor also licensed under the GPL), highlight the text as a rectangle in the cmd window, press (or right-click the window icon in the upper left corner and select Edit, then Copy), and paste it into your editor with Ctl-V (or Edit|Paste from the typical GUI menu). All feedback is welcome to the mail address below. Uninstall ========= To uninstall, simply delete the Hamlib directory. You may wish to edit the PATH as above to remove the Hamlib bin path, if desired. Information for w64 Programmers ================================= The DLL has a cdecl interface. There is a libhamlib-4.def definition file for MS Visual C++/Visual Studio in lib/msvc. Refer to the sample commands below to generate a local libhamlib-4.lib file for use with the VC++/VS linker. Simply #include (add directory to include path), include libhamlib-4.lib in your project and you are done. Note: VC++/VS cannot compile all the Hamlib code, but the API defined by rig.h has been made MSVC friendly :-) As the source code for the library DLLs is licensed under the LGPL, your program is not considered a "derivative work" when using the published Hamlib API and normal linking to the front-end library, and may be of a license of your choosing. For linking the library with MS Visual C++ 2003, from the directory you installed Hamlib run the following commands to generate the libhamlib-4.lib file needed for linking with your MSVC project: cd lib\msvc c:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\link.exe /lib /machine:amd64 /def:libhamlib-4.def To do the same for Visual Studio 2017: cd lib\msvc c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x86\bin\link.exe /lib /machine:i386 /def:libhamlib-4.def and for VS 2019: cd lib\msvc c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x86\bin\link.exe /lib /machine:i386 /def:libhamlib-4.def NOTE: feedback is requested on the previous two command examples as these do not appear to be correct to generate a 64 bit libhamlib-4.lib file! The published Hamlib API may be found at: http://hamlib.sourceforge.net/manuals/4.1/index.html Thank You! ========== Patches, feedback, and contributions are welcome. Please report problems or success to hamlib-developer@lists.sourceforge.net Cheers, Stephane Fillod - F8CFE Nate Bargmann - N0NB http://www.hamlib.org ================================================ FILE: software/hamlib-w64-4.5~git/THANKS.txt ================================================ This file lists people who contributed indirectly to Hamlib, by generously making information available. Be they thanked for their openness. WiNRADiO backend ---------------- * Harish Pillay 9v1hp and Pascal Brisset and their excellent LiNRADiO project. URL: http://linradio.sourceforge.net/ Icom CI-V backend ----------------- * Ekki Plicht DF4OR and his excellent web site on the CI-V interface. URL: http://www.plicht.de/ekki/civ/ * Karl Kramer DG8FZ for his V24/CI-V cable and his CSMA/CD explanation of the bus. URL: http://KarlKramer.de/ ... x71ci_v.htm * Simon Collings, RS-232 Interfacing for Receiver Control URL: http://www.scnt01426.pwp.blueyonder.co.uk/Articles/RS-232/RS-232.htm * Kai Altenfelder for supporting us and providing documentation Icom PCR backend ---------------- * Ghetto's team, PCR-1000 ICOM receiver URL: http://www.philtered.net/icomlib.phtml Other Assistance ---------------- * Special thanks to Ed Hare, W1RFI, and the American Radio Relay League for technical support. ================================================ FILE: software/hamlib-w64-4.5~git/doc/ampctl.1.html ================================================ AMPCTL

AMPCTL

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
READLINE
DIAGNOSTICS
EXIT STATUS
EXAMPLES
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

ampctl - control radio amplifiers

SYNOPSIS

ampctl

[-hiIlLuV] [-m id] [-r device] [-s baud] [-t char] [-C parm=val] [-v[-Z]] [command|-]

DESCRIPTION

Control radio amplifiers. ampctl accepts commands from the command line as well as in interactive mode if none are provided on the command line.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete amplifier support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select amplifier model number.

See model list (use “ampctl -l”).

Note: ampctl (or third party software using the C API) will use amplifier model 2 for NET ampctl (communicating with ampctld).

-r, --amp-file=device

Use device as the file name of the port connected to the amplifier.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-s, --serial-speed=baud

Set serial speed to baud rate.

Uses maximum serial speed from amplifier backend capabilities (set by -m above) as the default.

-t, --send-cmd-term=char

Change the termination char for text protocol when using the send_cmd command.

The default value is ASCII CR (’0x0D’). ASCII non-printing characters can be given as the ASCII number in hexadecimal format prepended with “0x”. You may pass an empty string for no termination char. The string “-1” tells ampctl to switch to binary protocol.

For example, to specify a command terminator for Kenwood style text commands pass “-t ’;’” to ampctl. See EXAMPLE below.

-L, --show-conf

List all config parameters for the amplifier defined with -m above.

-C, --set-conf=parm=val[,parm=val]

Set amplifier configuration parameter(s), e.g. stop_bits=2.

Use the -L option above for a list of configuration parameters for a given model number.

-u, --dump-caps

Dump capabilities for the amplifier defined with -m above and exit.

-l, --list

List all amplifier model numbers defined in Hamlib and exit.

The list is sorted by model number.

Note: In Linux the list can be scrolled back using Shift-PageUp/Shift-PageDown, or using the scrollbars of a virtual terminal in X or the cmd window in Windows. The output can be piped to more(1) or less(1), e.g. “ampctl -l | more”.

-i, --read-history

Read previously saved command and argument history from a file (default $HOME/.ampctl_history) for the current session.

Available when ampctl is built with Readline support (see READLINE below).

Note: To read a history file stored in another directory, set the AMPCTL_HIST_DIR environment variable, e.g. “AMPCTL_HIST_DIR=~/tmp ampctl -i”. When AMPCTL_HIST_DIR is not set, the value of HOME is used.

-I, --save-history

Write current session (and previous session(s), if -i option is given) command and argument history to a file (default $HOME/.ampctl_history) at the end of the current session.

Complete commands with arguments are saved as a single line to be recalled and used or edited. Available when ampctl is built with Readline support (see READLINE below).

Note: To write a history file in another directory, set the AMPCTL_HIST_DIR environment variable, e.g. “AMPCTL_HIST_DIR=~/tmp ampctl -IRq. When AMPCTL_HIST_DIR is not set, the value of HOME is used.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-Z, --debug-time-stamps

Enable time stamps for the debug messages.

Use only in combination with the -v option as it generates no output on its own.

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of ampctl and exit.

-

Stop option processing and read commands from standard input.

See Standard Input below.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf and --show-conf options.

Please note that the backend for the amplifier to be controlled, or the amplifier itself may not support some commands. In that case, the operation will fail with a Hamlib error code.

COMMANDS

Commands can be entered either as a single char, or as a long command name. The commands are not prefixed with a dash as the options are. They may be typed in when in interactive mode or provided as argument(s) in command line interface mode. In interactive mode commands and their arguments may be entered on a single line:

F 14250000

Since most of the Hamlib operations have a set and a get method, an upper case letter will often be used for a set method whereas the corresponding lower case letter refers to the get method. Each operation also has a long name; in interactive mode, prepend a backslash, ’\’, to enter a long command name.

Example: Use “\dump_caps” to see what capabilities this amplifier and backend support.

Note: The backend for the amplifier to be controlled, or the amplifier itself may not support some commands. In that case, the operation will fail with a Hamlib error message.

A simple example using commands saved to a file (typed text shown in bold):

$ cat <<.EOF. >cmds.txt
> # File of commands
> F 14250000
> f
> l PWRINPUT
> l PWRFORWARD
> l SWR
> \dump_caps
> .EOF.

$ ampctl -m1 - <cmds.txt

Amplifier command: # File of commands

Amplifier command: F 14250000

Amplifier command: f
Frequency(Hz): 14250000

Amplifier command: l PWRINPUT
Level Value: 0

Amplifier command: l PWRFORWARD
Level Value: 1499

Amplifier command: l SWR
Level Value: 1.000000

Amplifier command: \dump_caps
Caps dump for model: 1
Model name: Dummy
Mfg name: Hamlib
Backend version: 0.1
Backend copyright: LGPL
Backend status: Alpha
Amp type: Other
Port type: None
Write delay: 0mS, timeout 0mS, 0 retries
Post Write delay: 0mS
Has priv data: N
Get level: SWR NH PF PWRINPUT PWRFORWARD PWRREFLECTED PWRPEAK FAULT
Has Init: Y
Has Cleanup: Y
Has Open: Y
Has Close: Y
Can set Conf: N
Can get Conf: N
Can Reset: Y
Can get Info: Y

Overall backend warnings: 0

Amplifier command:

$

ampctl Commands
A summary of commands is included below (In the case of set commands the quoted italicized string is replaced by the value in the description. In the case of get commands the quoted italicized string is the key name of the value returned.):
Q
|q, exit ampctl

Exit ampctl in interactive mode.

When ampctl is controlling the amplifier directly, will close the amplifier backend and port. When ampctl is connected to ampctld (amplifier model 2), the TCP/IP connection to ampctld is closed and ampctld remains running, available for another TCP/IP network connection.

F, set_freq 'Frequency'

Set 'Frequency', in Hz.

Frequency may be a floating point or integer value.

f, get_freq

Get 'Frequency', in Hz.

Returns an integer value.

l, get_level 'Level'

Get 'Level Value'.

Returns Level Value as a float or integer for the Level token given.

Note: Passing a ’?’ (query) as the first argument instead of a Level token will return a space separated list of amplifier backend supported get level tokens. Use this to determine the supported levels of a given amplifier backend.

w, send_cmd 'Cmd'

Send a raw command string to the amplifier.

This is useful for testing and troubleshooting amplifier commands and responses when developing a backend.

For binary protocols enter values as \0xAA\0xBB. Expect a 'Reply' from the amplifier which will likely be a binary block or an ASCII string depending on the amplifier’s protocol (see your amplifier’s computer control documentation).

The command terminator, set by the send-cmd-term option above, will terminate each command string sent to the amplifier. This character should not be a part of the input string.

dump_state

Return certain state information about the amplifier backend.

1, dump_caps

Not a real amplifier remote command, it just dumps capabilities, i.e. what the backend knows about this model, and what it can do.

TODO: Ensure this is in a consistent format so it can be read into a hash, dictionary, etc. Bug reports requested.

Note: This command will produce many lines of output so be very careful if using a fixed length array! For example, running this command against the Dummy backend results in a number of lines of text output.

_, get_info

Return information from the amplifier backend.

R, reset 'Reset'

Perform amplifier 'Reset'.

Reset is an integer value: ’0’ = None, ’1’ = Memory reset, ’2’ = Fault reset, ’3’ = Amplifier reset.

set_powerstat 'Power Status'

Set 'Power Status'.

Power Status is an integer value: ’0’ = Power Off, ’1’ = Power On, ’2’ = Power Standby (enter standby), ’4’ = Power Operate (leave standby).

get_powerstat

Get 'Power Status' as in set_powerstat above.

READLINE

If Readline library development files are found at configure time, ampctl will be conditonally built with Readline support for command and argument entry. Readline command key bindings are at their defaults as described in the Readline manual. ampctl sets the name “ampctl” which can be used in Conditional Init Constructs in the Readline Init File ($HOME/.inputrc by default) for custom keybindings unique to ampctl.

Command history is available with Readline support as described in the Readline History manual. Command and argument strings are stored as single lines even when arguments are prompted for input individually. Commands and arguments are not validated and are stored as typed with values separated by a single space.

Normally session history is not saved, however, use of either of the -i/--read-history or -I/--save-history options when starting ampctl will cause any previously saved history to be read in and/or the current and any previous session history (assuming the -i and -I options are given together) will be written out when ampctl is closed. Each option is mutually exclusive, i.e. either may be given separately or in combination. This is useful to save a set of commands and then read them later but not write the modified history for a consistent set of test commands in interactive mode, for example.

History is stored in $HOME/.ampctl_history by default although the destination directory may be changed by setting the AMPCTL_HIST_DIR environment variable. When AMPCTL_HIST_DIR is unset, the value of the HOME environment variable is used instead. Only the destination directory may be changed at this time.

If Readline support is not found at configure time the original internal command handler is used. Readline is not used for ampctl commands entered on the command line regardless if Readline support is built in or not.

Note: Readline support is not included in the MS Windows 32 or 64 bit binary builds supplied by the Hamlib Project. Running ampctl on the MS Windows platform in the ’cmd’ shell does give session command line history, however, it is not saved to disk between sessions.

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the amplifier which is very useful for amplifier backend library development and may be requested by the developers.

EXIT STATUS

ampctl exits with:

0

if all operations completed normally;

1

if there was an invalid command line option or argument;

2

if an error was returned by Hamlib.

EXAMPLES

Start ampctl for am Elecraft KPA-1500 using a USB to serial adapter on Linux in interactive mode:

$ ampctl -m 201 -r /dev/ttyUSB1

Start ampctl for an Elecraft KPA-1500 using COM1 on MS Windows while generating TRACE output to stderr:

> ampctl -m 201 -r COM1 -vvvvv

Connect to a running ampctld with amplifier model 2 (“NET ampctl”) on the local host and specifying the TCP port, setting frequency and mode:

$ ampctl -m 2 -r localhost:4531 F 7253500

BUGS

This almost empty section...

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2000-2011 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various contributors)
Copyright © 2010-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

less(1), more(1), ampctld(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/ampctld.1.html ================================================ AMPCTLD

AMPCTLD

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
PROTOCOL
DIAGNOSTICS
EXAMPLES
SECURITY
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

ampctld - TCP amplifier control daemon

SYNOPSIS

ampctld

[-hlLuV] [-m id] [-r device] [-s baud] [-T IPADDR] [-t number] [-C parm=val] [-v[-Z]]

DESCRIPTION

The ampctld program is an amplifier control daemon that handles client requests via TCP sockets. This allows multiple user programs to share one amplifier (this needs more development). Multiple amplifiers can be controlled on different TCP ports by use of multiple ampctld processes. Note that multiple processes/ports are also necessary if some clients use extended responses and/or vfo mode. So up to 4 processes/ports may be needed for each combination of extended response/vfo mode. The syntax of the commands are the same as ampctl(1). It is hoped that ampctld will be especially useful for client authors using languages such as Perl, Python, PHP, and others.

ampctld communicates to a client through a TCP socket using text commands shared with ampctl. The protocol is simple, commands are sent to ampctld on one line and ampctld responds to get commands with the requested values, one per line, when successful, otherwise, it responds with one line “RPRT x”, where ’x’ is a negative number indicating the error code. Commands that do not return values respond with the line “RPRT x”, where ’x’ is ’0’ when successful, otherwise is a regative number indicating the error code. Each line is terminated with a newline ’\n’ character. This protocol is primarily for use by the NET ampctl (amplifier model 2) backend.

A separate Extended Response Protocol extends the above behavior by echoing the received command string as a header, any returned values as a key: value pair, and the “RPRT x” string as the end of response marker which includes the Hamlib success or failure value. See the PROTOCOL section for details. Consider using this protocol for clients that will interact with ampctld directly through a TCP socket.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete amplifier support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select amplifier model number.

See model list (use “ampctl -l”).

Note: ampctl (or third party software using the C API) will use amplifier model 2 for NET ampctl (communicating with ampctld).

-r, --amp-file=device

Use device as the file name of the port connected to the amplifier.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-s, --serial-speed=baud

Set serial speed to baud rate.

Uses maximum serial speed from amplifier backend capabilities (set by -m above) as the default.

-t, --port=number

Use number as the TCP listening port.

The default is 4531.

Note: As rigctld’s default port is 4532 and rotctld’s default port is 4533, it is recommended to use DESCENDING odd numbered ports for multiple ampctld instances, e.g. 4529, 4527, 4525, etc.

-T, --listen-addr=IPADDR

Use IPADDR as the listening IP address.

The default is ANY.

-L, --show-conf

List all config parameters for the amplifier defined with -m above.

-C, --set-conf=parm=val[,parm=val]

Set amplifier configuration parameter(s), e.g. stop_bits=2.

Use the -L option above for a list of configuration parameters for a given model number.

-u, --dump-caps

Dump capabilities for the amplifier defined with -m above and exit.

-l, --list

List all amplifier model numbers defined in Hamlib and exit.

The list is sorted by model number.

Note: In Linux the list can be scrolled back using Shift-PageUp/Shift-PageDown, or using the scrollbars of a virtual terminal in X or the cmd window in Windows. The output can be piped to more(1) or less(1), e.g. “ampctl -l | more”.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-Z, --debug-time-stamps

Enable time stamps for the debug messages.

Use only in combination with the -v option as it generates no output on its own.

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of ampctl and exit.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf and --show-conf options.

Please note that the backend for the amplifier to be controlled, or the amplifier itself may not support some commands. In that case, the operation will fail with a Hamlib error code.

COMMANDS

Commands can be sent over the TCP socket either as a single char, or as a long command name plus the value(s) space separated on one ’\n’ terminated line. See PROTOCOL.

Since most of the Hamlib operations have a set and a get method, an upper case letter will be used for set methods whereas the corresponding lower case letter refers to the get method. Each operation also has a long name; prepend a backslash, ’\’, to send a long command name.

Example (Perl): “print $socket "\\dump_caps\n";” to see what the amplifier’s backend can do (Note: In Perl and many other languages a ’\’ will need to be escaped with a preceding ’\’ so that even though two backslash characters appear in the code, only one will be passed to ampctld. This is a possible bug, beware!).

Note: The backend for the amplifier to be controlled, or the amplifier itself may not support some commands. In that case, the operation will fail with a Hamlib error message.

Here is a summary of the supported commands (In the case of set commands the quoted italicized string is replaced by the value in the description. In the case of get commands the quoted italicized string is the key name of the value returned.):
F
, set_freq 'Frequency'

Set 'Frequency', in Hz.

Frequency may be a floating point or integer value.

f, get_freq

Get 'Frequency', in Hz.

Returns an integer value.

l, get_level 'Level'

Get 'Level Value'.

Returns Level Value as a float or integer for the Level token given.

Note: Passing a ’?’ (query) as the first argument instead of a Level token will return a space separated list of amplifier backend supported get level tokens. Use this to determine the supported levels of a given amplifier backend.

dump_state

Return certain state information about the amplifier backend.

1, dump_caps

Not a real amplifier remote command, it just dumps capabilities, i.e. what the backend knows about this model, and what it can do.

TODO: Ensure this is in a consistent format so it can be read into a hash, dictionary, etc. Bug reports requested.

Note: This command will produce many lines of output so be very careful if using a fixed length array! For example, running this command against the Dummy backend results in a number of lines of text output.

_, get_info

Return information from the amplifier backend.

R, reset 'Reset'

Perform amplifier 'Reset'.

Reset is an integer value: ’0’ = None, ’1’ = Memory reset, ’2’ = Fault reset, ’3’ = Amplifier reset.

set_powerstat 'Power Status'

Set 'Power Status'.

Power Status is an integer value: ’0’ = Power Off, ’1’ = Power On, ’2’ = Power Standby (enter standby), ’4’ = Power Operate (leave standby).

get_powerstat

Get 'Power Status' as in set_powerstat above.

PROTOCOL

There are two protocols in use by ampctld, the Default Protocol and the Extended Response Protocol.

The Default Protocol is intended primarily for the communication between Hamlib library functions and ampctld (“NET ampctl”, available using amplifier model ’2’).

The Extended Response Protocol is intended to be used with scripts or other programs interacting directly with ampctld as consistent feedback is provided.

Default Protocol
The Default Protocol is intentionally simple. Commands are entered on a single line with any needed values. In practice, reliable results are obtained by terminating each command string with a newline character, ’\n’.

Example set frequency and mode commands (Perl code (typed text shown in bold)):

print $socket "F 14250000\n";
print $socket "\\set_powerstat 1\n";
# escape leading ’\’

A one line response will be sent as a reply to set commands, “RPRT x\n” where x is the Hamlib error code with ’0’ indicating success of the command.

Responses from ampctld get commands are text values and match the same tokens used in the set commands. Each value is returned on its own line. On error the string “RPRT x\n” is returned where x is the Hamlib error code.

Example get frequency (Perl code):

print $socket "f\n";
"14250000\n"

Most get functions return one to three values. A notable exception is the dump_caps command which returns many lines of key:value pairs.

This protocol is primarily used by the “NET ampctl” (ampctl model 2) backend which allows applications already written for Hamlib’s C API to take advantage of ampctld without the need of rewriting application code. An application’s user can select amplifier model 2 (“NET ampctl”) and then set amp_pathname to “localhost:4531” or other network host:port (set by the -T/-t options, respectively, above).

Extended Response Protocol
The Extended Response protocol adds several rules to the strings returned by ampctld and adds a rule for the command syntax.

1. The command received by ampctld is echoed with its long command name followed by the value(s) (if any) received from the client terminated by the specified response separator as the first record of the response.

2. The last record of each block is the string “RPRT x\n” where x is the numeric return value of the Hamlib backend function that was called by the command.

3. Any records consisting of data values returned by the amplifier backend are prepended by a string immediately followed by a colon then a space and then the value terminated by the response separator. e.g. “Frequency: 14250000\n” when the command was prepended by ’+’.

4. All commands received will be acknowledged by ampctld
with records from rules 1 and 2. Records from rule 3 are only returned when data values must be returned to the client.

4. All commands received will be acknowledged by ampctld with records from rules 1 and 2. Records from rule 3 are only returned when data values must be returned to the client.

An example response to a set_frequency command sent from the shell prompt (note the prepended ’+’):

$ echo "+F 14250000" | nc -w 1 localhost 4531
set_freq: 14250000
RPRT 0

In this case the long command name and values are returned on the first line and the second line contains the end of block marker and the numeric amplifier backend return value indicating success.

An example response to a get_freq query:

$ echo "+\get_freq" | nc -w 1 localhost 4531
get_freq:
Frequency(Hz): 14250000
RPRT 0

Note: The ’\’ is still required for the long command name even with the ERP character.

In this case, as no value is passed to ampctld, the first line consists only of the long command name. The final line shows that the command was processed successfully by the amplifier backend.

Invoking the Extended Response Protocol requires prepending a command with a punctuation character. As shown in the examples above, prepending a ’+’ character to the command results in the responses being separated by a newline character (’\n’). Any other punctuation character recognized by the C ispunct() function except ’\’, ’?’, or ’_’ will cause that character to become the response separator and the entire response will be on one line.

Separator character summary:

+

Each record of the response is appended with a newline (’\n’).

;’, ’|’, or, ’,

Each record of the response is appended by the given character resulting in entire response on one line.

These are common record separators for text representations of spreadsheet data, etc.

?

Reserved for help in ampctl.

_

Reserved for get_info short command

#

Reserved for comments when reading a command file script.

Note: Other punctuation characters have not been tested! Use at your own risk.

For example, invoking a get_freq query with a leading ’;’ returns:

get_freq:;Frequency(Hz): 14250000;RPRT 0

Or, using the pipe character ’|’ returns:

get_freq:|Frequency(Hz): 14250000|RPRT 0

And a set_freq command prepended with a ’|’ returns:

set_freq: 14250000|RPRT 0

Such a format will allow reading a response as a single event using a preferred response separator. Other punctuation characters have not been tested!

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the amplifier which is very useful for amplifier backend library development and may be requested by the developers.

EXAMPLES

Start ampctld for an Elecraft KPA-1500 using a USB-to-serial adapter and backgrounding:

$ ampctld -m 201 -r /dev/ttyUSB1 &

Start ampctld for an Elecraft KPA-1500 using COM2 on MS Windows:

$ ampctld -m 201 -r COM2

Connect to the already running ampctld and set the frequency to 14.266 MHz with a 1 second read timeout using the default protocol from the shell prompt:

$ echo "\set_freq 14266000" | nc -w 1 localhost 4531

Connect to a running ampctld with ampctl on the local host:

$ ampctl -m2

SECURITY

No authentication whatsoever; DO NOT leave this TCP port open wide to the Internet. Please ask if stronger security is needed or consider using a Secure Shell (ssh(1)) tunnel.

As ampctld does not need any greater permissions than ampctl, it is advisable to not start ampctld as “root” or another system user account in order to limit any vulnerability.

BUGS

The daemon is not detaching and backgrounding itself.

No method to exit the daemon so the kill(1) command must be used to terminate it.

Multiple clients using the daemon may experience contention with the connected amplifier.

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2000-2010 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various contributors)
Copyright © 2011-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

kill(1), ampctl(1), ssh(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/hamlib-primer.7.html ================================================ HAMLIB-PRIMER

HAMLIB-PRIMER

NAME
DESCRIPTION
COPYING
SEE ALSO
COLOPHON

NAME

hamlib-primer - compiling and using the radio and rotator control library

DESCRIPTION

There are several ways to obtain a working installation of Hamlib. The following sections discuss installing from a package manager, building from source, and installing Hamlib project supplied binaries on Microsoft Windows®

Installing binary packages on Linux and BSD
The easiest way to install a released version of Hamlib on a Linux based distribution or a BSD variant is through the provided package manager. While package managers vary according to the distribution (it’s easy to lump BSD variants in this group too) their end goal is to provide ready to use software packages. Since such a wide variety of package managers exist, it is best to recommend that the documentation for your chosen distribution be your guide.

A variety of Hamlib sources
Distribution packages are most often official Hamlib releases and in some cases could be quite old and lacking support for newer radios or rotators. In some cases support is improved in existing radio or rotator back ends and bugs are fixed in newer releases. Often times to get the improved support/bug fixes, building from source will be required. Relax, it’s not hard. :-)

Source code is available as official releases, testing snapshots, daily development snapshots, and the bleeding edge of development directly from the Git repository. As a rule, even the bleeding edge tarballs should configure and compile without error even though certain implementation work may be in progress and may be incomplete or have errors.

Getting released source
Official Hamlib source releases, commonly called tarballs can be found on the SourceForge.net Hamlib files Web page. The most recent release is listed first.

Getting source snapshots
Testing release candidates (RCs) are posted during the period (often a few weeks) before a planned release. Beginning with the 4.0 release, RCs are hosted by the SourceForge.net Hamlib files Web page. RCs are identifed by having a ~rcX suffix where the X is replace by a numeral for successive release candidates.

Daily snapshots of the development repository are available via the World Wide Web from Hamlib Git daily snapshots. These are not official releases but are provided for testing new features and bug fixes.

The daily development snapshot is made and posted each day by around 1030 UTC. Daily snapshots should compile but sometimes a bug creeps in that prevents compilation. If that should happen, please report it to the hamlib-developer mailing list.

Git repository
The source repository can be cloned which copies the repository to your computer including its entire history, branches, and release tag information. In other words, once the git(1) clone command is finished a complete copy of the Hamlib development will be on your computer. You can do quite a lot with this as nothing is hidden from view since the entire history of Hamlib is right there all the way from the very first commit to the present. None of the meta-data is hidden away on some central server.

To clone the repository use the following command:

git clone https://git.code.sf.net/p/hamlib/code hamlib

or:

git clone https://github.com/Hamlib/Hamlib.git

Odds are that you will want to run the above command in a sub directory of your home directory. The hamlib directory will be created by Git and the master branch will be checked out for you as the working copy. The master branch is one of several branches used in Hamlib development. It is the main branch of new features and bug fixes. The working copy will be the latest revision of every file at the time of the clone. Later updates from the developers will require using another Git command to update your local repository.

Building from source
Building from source will be required for various reasons. Perhaps only an older release is provided by your distribution, or you would like to test recent changes to Hamlib—either a specific back end or API changes—and offer a report to the developers, or you would like to take part in development and offer your contribution to the project, or you would just like to learn how to build a relatively comprehensive package from source. Any is a good reason to build from the source code archive.

Before going further, this manual assumes familiarity with working from the command prompt in a Linux/BSD/Unix like system’s Bourne shell environment (compatible Bourne shells include bash(1), ksh(1), zsh(1), and several more) either in a virtual console (a text only screen with no graphics) or in a terminal in a desktop environment (xterm(1), rxvt(1), konsole(1) (included with the KDE desktop), gnome-terminal(1), xfce4-terminal(1), terminal(1) (included in macOS), etc.). If this is new to you, take some time and read up on using the shell. A good tutorial can be found at LinuxCommand.org which also offers an in-depth book that can be purchased or downloaded for no cost (the Hamlib project is not associated with nor has any interest in the sale of this book, it just looks like a very good effort on the part of its author).

Let’s get started.

Compiling source tarballs
Before proceeding, it is essential to read the information in the files, README, INSTALL, and README.betatester supplied in the Hamlib top-level directory which will be named something like hamlib-3.3~git where the latter part is the release version. In this case the 3.3~git indicates this is a development snapshot of the Git master branch. These files provide detailed information for compiling Hamlib and will vary some from release to release.

Compiling from a source tarball whether it is an official release or a testing or daily development snapshot follows the same set of commands, known as the three step which are each run from the top-level directory:

./configure
make
sudo make install

configure
The ./configure command examines your system and checks it for any packages that are required or good to have options for compiling Hamlib. The leading ./ tells the shell to only run the configure command found in the current directory. It is always possible that a configure command could be lurking elsewhere and we don’t want to run that!

Run:

./configure

from the top-level directory.

Note: Some distributions are configured so commands can only be run from directories listed in the PATH environment variable. The ./ is necessary or the configure command will not be run as the current directory (defined as .) is not in the PATH. This is considered a default security feature so that only programs provided by the distribution are run. PATH can be modified for your own session, but that is a topic for the LinuxCommand.org reference above.

Of course, things are usually complicated a bit by options and Hamlib is no exception. The good news is that the defaults, i.e., no options, work well in most situations. Options are needed to enable the compilation of certain portions of Hamlib such as the language bindings. Optional features usually require that more development tools are installed. The INSTALL and README.betatester files in the Hamlib top-level directory will have details on the options available for that release.

A useful option is --prefix which tells configure where in the file system hierarchy Hamlib should be installed. If it is not given, Hamlib will be installed in the /usr/local file system hierarchy. Perhaps you want to install to your home directory instead:

./configure --prefix=$HOME/local

Note: For practice you may wish to start out using the --prefix=$HOME/local option to install the Hamlib files into your home directory and avoid overwriting any version of Hamlib installed into the system directories. The code examples in the remainder of this manual will assume Hamlib has been installed to $HOME/local.

As a result of this option, all of the files will be installed in the local directory of your home directory. local will be created if it does not exist during installation as will several other directories in it. Installing in your home directory means that root, or superuser (administrator) privileges are not required when running make install. On the other hand, some extra work will need to be done so other programs can use the library. The utilities that are compiled as a part of the Hamlib build system will work as they are linked to the library installed under local. Running them will require declaring the complete path:

local/bin/rigctl

or modifying your shell’s PATH environment variable (see the shell tutorial site above).

Another useful option is --help which will give a few screens full of options for configure. If in a desktop environment the scroll bar can be used to scroll back up through the output. In either a terminal or a virtual console Linux supports the Shift-PageUp key combination to scroll back up. Conversely, Shift-PageDown can be used to scroll down toward the end of the output and the shell prompt (Shift-UpArrow/Shift-DownArrow may also work to scroll one line at a time (terminal dependent)).

After a fair amount of time, depending on your computer, and a lot of screen output, configure will finish its job. So long as the few lines previous to the shell prompt don’t say “error” or some such failure message Hamlib is ready to be compiled. If there is an error and all of the required packages listed in README.betatester have been installed, please ask for help on the hamlib-developer mailing list.

make
The make(1) command is responsible for running the compiler which reads the source files and from the instructions it finds in them writes object files which are the binary instructions the CPU of a computer can execute. make then calls the linker which puts the object files together in the correct order to create the Hamlib library files and its executable programs.

Run:

make

from the top-level directory.

Any error that causes make to stop early is cause for a question to the hamlib-developer mailing list.

In general make will take longer than configure to complete its run. As it is a system command, and therefore found in the shell’s PATH environment variable, prefixing make with ./ will cause a “command not found” error from the shell.

make install
Assuming that you have not set the installation prefix to your home directory, root (administrator) privileges will be required to install Hamlib to the system directories. Two popular methods exist for gaining root privileges, su(1) and sudo(8). sudo is probably the most popular these days, particularly when using the Ubuntu family of distributions.

Run:

sudo make install

or:

$ su -l
Password:
# make install

as root from the top-level directory.

Note: The shell session is shown to show the change in prompt from a normal user account to the root account.

The -l option to su forces a login shell so that environment variables such as PATH are set correctly.

Running make install will call the installer to put all of the newly compiled files and other files (such as this document) in predetermined places set by the --prefix option to configure in the directory hierarchy (yes, this is by design and make is not just flinging files any old place!).

A lot of screen output will be generated. Any errors will probably be rather early in the process and will likely be related to your username not having write permissions in the system directory structure.

ldconfig
Once the installation is complete one more step is required if Hamlib has never been installed from a local build before. The ldconfig command tells the system library loader where to find the newly installed Hamlib libraries. It too will need to be run with root privileges:

Run:

sudo ldconfig

as root from any directory or while logged in as root from above.

Note: Subsequent installations of Hamlib will not need to have ldconfig run after each installation if a newer version of Hamlib was not installed, i.e., when recompiling the same version during development.

On some distributions a bit of configuration will be needed before ldconfig will add locally compiled software to its database. Please consult your distribution’s documentation.

Bootstrapping from a 'git clone'
Choosing to build from from a git clone requires a few more development tools (notice a theme here?) as detailed in README.developer. The most critical will be the GNU Autotools (autoconf, automake, libtool, and more) from which the build system consisting of configure, the various Makefile.ins throughout the directory structure, and the final Makefiles are generated.

In the top-level directory is the bootstrap script from which the build system is bootsrapped—the process of generating the Hamlib build system from configure.ac and the various Makefile.ams. At its completion the configure script will be present to configure the build system.

Next configure is run with any needed build options (configure --help is useful) to enable certain features or provide paths for locating needed build dependencies, etc. Environment variables intended for the preprocessor and/or compiler may also be set on the configure command line.

After the configuration is complete, the build may proceed with the make step as for the source tarballs above. Or configure --help may be run, and configure run again with specific options in which case the Makefiles will be regenerated and the build can proceed with the new configuration.

Other make targets
Besides make install, other targets exist when running make. Running make clean from the top-level directory removes all of the generated object and executable files generated by running make freeing up considerable disk space.

Note: During development of individual source files, it is not necessary to run make clean each time before make. Simply run make and only the modified file(s) and any objects that depend on them will be recompiled. This speeds up development time considerably.

To remove even the generated Makefiles, run make distclean from the top-level directory. After this target is run, configure will need to be run again to regenerate the Makefiles. This command may not be as useful as the Makefiles do not take up much space, however it can be useful for rebuilding the Makefiles when modifying a Makefile.am or confgure.ac during build system development.

Parallel build trees
One feature of the GNU build system used by Hamlib is that the object files can be kept in a directory structure separate from the source files. While this has no effect on the make targets described above, it does help the developer find files in the source tree! One such way of using parallel builds is described in README.developer.

Parallel builds can be very useful as one build directory can be configured for a release and another build directory can be configured for debugging with different options passed to configure from each directory. The generated Makefiles are unique to each build directory and will not interfere with each other.

Adding debugging symbols
When additional debugging symbols are needed with, for example, the GNU Debugger, gdb, the needed compiler and linker options are passed as environment variables.

Run:

../hamlib/configure CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0"

from a sibling build directory intended for a debugging build.

The -ggdb3 option tells the C compiler, in this case the GNU C Compiler, gcc, to add special symbols useful for GDB, the GNU debugger. The -O0 option tells gcc to turn off all optimizations which will make it easier to follow some variables that might otherwise be optimized away. CFLAGS and CXXFLAGS may be set independently for each compiler.

Note: There are a number compiler options available for controlling debugging symbols and setting optimization levels. Please consult the compiler’s manual for all the details.

Compiling for Microsoft Windows
Currently compiling is done on a Debian 10 (Buster) virtual machine using MinGW. README.build-win32 in the scripts directory has details on how this is accomplished.

Pre-compiled binaries for Microsoft Windows
Pre-compiled binaries for Microsoft Windows 32 and 64 bit architectures (Windows NT and newer) are available for both official releases and daily development snapshots.

Official releases are available through the SourceForge.net file download service.

Daily development snapshots are available from the daily snapshots page.

Beginning with the Hamlib 1.2.15.3 release a self-extracting installer is available. Among its features are selecting which portions of Hamlib are installed. The PATH environment variable will need to be set manually per the included README.w32-bin or README.w64-bin file.

Daily development snapshots feature both a .ZIP archive and the self extracting installer.

Bug reports and questions about these archives should be sent to the hamlib-developer mailing list.

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio and rotator control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2001-2020 Hamlib Group (various contributors)

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

git(1), hamlib(7), ldconfig(8), make(1), su(1), sudo(8)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/hamlib-utilities.7.html ================================================ HAMLIB-UTILITIES

HAMLIB-UTILITIES

NAME
DESCRIPTION
rigctl
rotctl
ampctl
rigctld
rotctld
ampctl
rigmem
rigsmtr
rigswr
COPYING
SEE ALSO
COLOPHON

NAME

hamlib-utilties - radio and rotator control utilities of Hamlib

DESCRIPTION

Included with the Hamlib distribution are several utility programs. Besides providing a way for developers to test new code and bug fixes, the programs also offer a reference implementation for interfacing to the Hamlib library functions both through the C API (Application Programming Interface) and offering a network accessible API.

This page summarizes the three test programs, ampctl(1) for testing amplifier back ends, rigctl(1) for testing radio back ends, and rotctl(1) for testing rotator back ends and the three network daemons, ampctld(1), rigctld(1), and rotcltd(1) for amplifier, radio, and rotator access via network sockets. Also included are three demonstration utilities, rigmem(1), rigsmtr(1), and rigswr(1) which provide functional examples of how Hamlib may be used to accomplish various tasks.

rigctl

rigctl(1) is the most frequently used Hamlib utility. As the other ctl utilities share many of the same characteristics, much of the introductory information presented in this section is applicable to the other utility programs.

Introduction to rigctl
Most likely the first of the Hamlib utility programs that is used is rigctl(1). rigctl is a character based interactive program and a command line program able to set or query a radio’s value with a single command. rigctl is invoked from a shell command prompt with various options and additional commands.

In its most simple use as a command line program, rigctl is used to set frequency and mode by typing commands after any rigctl options:

rigctl F 14205000
rigctl M USB 2400

and then query those values:

rigctl f
rigctl m

Entering interactive mode is a simple matter of not placing any commands after any rigctl options:

rigctl

Entering interactive mode allows successive commands to be entered without exiting rigctl. Recent additions to rigctl allow command editing and history recall through use of the Readline library.

Interactive mode is indicated by the spartan prompt:

Rig command:

Commands are given at the prompt and follow the general rule that upper case letters set a value and lower case letters query a value:

Rig command: M
Mode: USB
Passband: 2500

Rig command: m
Mode: USB
Passband: 2500

Rig command:

An additional prompt is printed when more information is required by the command. For M above, rigctl prompted for the Mode and Passband values. For m above, rigctl returned the Mode and Passband values without further prompts. The command prompt is returned after each command invocation.

The above examples invoked rigctl without specifying a radio model. This is a feature where the Hamlib internal radio model 1 dummy is used. The dummy radio provides a way to test Hamlib functions without the need for actual radio hardware. However, to develop the Hamlib backend capability for a given radio, having the actual radio connected to the computer is necessary for debugging.

For example, to quickly set frequency on an Elecraft K3:

rigctl -m 2029 -r /dev/rig F 3900000

and to query the frequency and then mode:

rigctl -m 2029 -r /dev/rig f
3900000

rigctl -m 2029 -r /dev/rig m
LSB
2000

Note: the returned values do not have the prompt strings associated with interactive mode as shown above.

The -m option takes a numeric value that corresponds to a given radio back end model. The -r option takes the path to the port device on POSIX and the device name on Microsoft Windows.

Note: A complete list of supported radio models may be seen by use of the -l option:

rigctl -l
Rig # Mfg Model Version Status
1 Hamlib Dummy 0.5 Beta
2 Hamlib NET rigctl 0.3 Beta
1001 Yaesu FT-847 0.5 Beta
1003 Yaesu FT-1000D 0.0.6 Alpha
.
.
.
27002 Rohde&Schwarz EB200 0.1 Untested
28001 Philips/Simoco PRM8060 0.1 Alpha
29001 ADAT www.adat.ch ADT-200A 1.36 Beta

The list is long so use Shift-PageUp/Shift-PageDown on Linux, ScrollLock then PageUp/PageDown on Free BSD, or use the scrollbar to the virtual terminal window (cmd window on Microsoft Windows) or the output can be piped to more(1) or less(1), e.g., “rigctl -l | more” to scroll back up the list. The list is sorted numerically by model number since Hamlib 1.2.15.1. Model numbers of a manufacturer/protocol family are grouped together.

rigctl reference
The complete reference for rigctl can be found in the rigctl(1) manual page.

rotctl

Identical in function to rigctl(1), rotctl(1) provides a means for testing Hamlib functions useful for rotator control and QTH (Maidenhead gridsquare system, see Maidenhead Locator System) locator computations. As rotators have a much narrower scope than radios, there are fewer command line options and commands for rotctl.

Introduction to rotctl
rotctl
(1) is a character based interactive program and a command line program able to set or query a rotator’s value with a single command. rotctl is invoked from a shell command prompt with various options and additional commands.

In its most simple use as a command line program, rotctl is used to set azimuth position and (optionally) elevation by typing commands after any rotctl options:

rotctl P 145.0 23.0
rotctl M 8 25

and then query those values:

rotctl p

Entering interactive mode is a simple matter of not placing any commands after any rotctl options:

rotctl

Entering interactive mode allows successive commands to be entered without exiting rotctl. Interactive mode allows for command editing and history recall through the use of the Readline library.

Interactive mode is indicated by the spartan prompt:

Rotator command:

Commands are given at the prompt:

Rotator command: M
Direction: 16
Speed: 60

Rotator command: p
Azimuth: 11.352000
Elevation: 0.000000

Rotator command: p
Azimuth: 27.594000
Elevation: 0.000000

Rotator command:

An additional prompt is printed when more information is required by the command. For M above, rotctl prompted for the Direction and Speed values. For p above, rotctl returned the Azimuth and Elevation values without further prompts. The command prompt is returned after each command invocation.

The above examples invoked rotctl without specifying a rotator model. This is a feature where the Hamlib internal rotator model 1 dummy is used instead. The dummy rotator provides a way to test Hamlib functions without the need for actual rotator hardware. However, to develop back end capability for a given rotator, having the actual controller connected to the computer is necessary for debugging.

For example, to quickly set position for RotorEZ:

rotctl -m 401 -r /dev/rotor P 100.0 0.0

and to query the position:

rotctl -m 401 -r /dev/rotor p
100.000000
0.000000

The returned values do not have the prompt strings associated with interactive mode as shown above.

The -m option takes a numeric value that corresponds to a given rotator back end model. The -r option takes the path to the port device on POSIX or the device name on Microsoft Windows.

Note: A complete list of supported rotator models may be seen by use of the -l option:

rotctl -l
Rot # Mfg Model Version Status
1 Hamlib Dummy 0.5 Beta
2 Hamlib NET rotctl 0.3 Beta
201 Hamlib EasycommI 0.3 Beta
202 Hamlib EasycommII 0.3 Beta
.
.
.
1201 AMSAT IF-100 0.1 Untested
1301 LA7LKA ts7400 0.1 Beta
1401 Celestron NexStar 0.1 Untested

The list is long so use Shift-PageUp/Shift-PageDown on Linux, ScrollLock then PageUp/PageDown on Free BSD, or use the scrollbar to the virtual terminal window (cmd window on Microsoft Windows) or the output can be piped to more(1) or less(1), e.g. “rotctl -l | more” to scroll back up the list. The list is sorted numerically by model number since Hamlib 1.2.15.1. Model numbers of a manufacturer/protocol family are grouped together.

rotctl reference
The complete reference for rotctl can be found in the rotctl(1) manual page.

ampctl

The ampctl(1) utility is a recent addition to the Hamlib utilities as a part of the 4.0 development cycle. It is intended to test the Hamlib implementation of amplifier control and is similar in function to the utilities previously described. See the ampctl(1) manual page for the complete reference.

rigctld

The rigctld(1) program is a network server that accepts the familiar commands of rigctl(1) and provides the response data over a TCP/IP network socket to an application. In this manner an application can access a rigctld instance from nearly anywhere (caveat, no security is currently provided by rigctld). Applications using rigctld do not link directly to Hamlib nor use its C API.

Introduction to rigctld
rigctld
(1) communicates to a client through a TCP network socket using text commands shared with rigctl(1). The protocol is simple; commands are sent to rigctld on one line and rigctld responds to get commands with the requested values, one per line, when successful, otherwise, it responds with one line RPRT x, where x is a negative number indicating the Hamlib error code. Commands that do not return values respond with the line RPRT x, where x is zero when successful, otherwise a negative number indicating the Hamlib error code. Each line is terminated with a newline, \n, character. This protocol is primarily for use by the NET rigctl (radio model 2) backend.

A separate Extended Response protocol extends the above behavior by echoing the received command string as a header, any returned values as a key: value pair, and the RPRT x string as the end of response marker which includes the Hamlib success or failure value. Consider using this protocol for clients that will interact with rigctld directly through a TCP network socket.

Multiple radios can be controlled on different TCP ports by use of multiple rigctld processes each listening on a unique TCP port. It is hoped that rigctld will be especially useful for client authors using languages such as Perl, Python, PHP, Ruby, TCL, and others.

rigctld reference
The complete reference for rigctld can be found in the rigctld(1) manual page.

rotctld

The rotctld(1) program is a network server that accepts the familiar commands of rotctl(1) and provides the response data over a TCP/IP network socket to an application. In this manner an application can access a rotctld instance from nearly anywhere (caveat, no security is currently provided by rotctld). Applications using rotctld do not link directly to Hamlib nor use its C API.

Introduction to rotctld
rotctld
(1) communicates to a client through a TCP network socket using text commands shared with rotctl(1). The protocol is simple, commands are sent to rotctld on one line and rotctld responds to get commands with the requested values, one per line, when successful, otherwise, it responds with one line RPRT x, where x is a negative number indicating the Hamlib error code. Commands that do not return values respond with the line RPRT x, where x is zero when successful, otherwise a negative number indicating the Hamlib error code. Each line is terminated with a newline, \n character. This protocol is primarily for use by the NET rotctl (rotator model 2) backend.

A separate Extended Response protocol extends the above behavior by echoing the received command string as a header, any returned values as a key: value pair, and the RPRT x string as the end of response marker which includes the Hamlib success or failure value. Consider using this protocol for clients that will interact with rotctld directly through a TCP network socket.

Multiple rotators can be controlled on different TCP ports by use of multiple rotctld processes each listening on a unique TCP port. It is hoped that rotctld will be especially useful for client authors using languages such as Perl, Python, PHP, Ruby, TCL, and others.

rotctld reference
The complete reference for rotctld can be found in the rotctld(1) manual page.

ampctl

The ampctld(1) utility is a recent addition to the Hamlib utilities as a part of the 4.0 development cycle. It provides network socket access for the Hamlib implementation of amplifier control and is similar in function to the network utilities previously described. See the ampctld(1) manual page for the complete reference.

rigmem

rigmem may be used to backup and restore memory of radio transceivers and receivers.

Introduction to rigmem
Backup and restore memory of radio transceivers and receivers. rigmem accepts commands from the command line only.

rigmem reference
The complete reference for rigmem can be found in the rigmem(1) manual page.

rigsmtr

rigsmtr uses Hamlib to control a radio to measure S-Meter value versus antenna azimuth.

Introduction to rigsmtr
rigsmtr rotates the antenna from minimum azimuth to maximum azimuth. Every second, or time_step if specified in seconds, it retrieves the signal strength. Azimuth in degrees and the corresponding S-Meter level in dB relative to S9 are then printed on stdout.

To work correctly, rigsmtr needs a radio that could measure S-Meter and a Hamlib backend that is able to retrieve it, connected to a Hamlib supported rotator.

rigsmtr reference
The complete reference for rigsmtr can be found in the rigsmtr(1) manual page.

rigswr

rigswr may be used to measure VSWR vs frequency.

Introduction to rigswr
rigswr uses Hamlib to control a radio to measure VSWR (Voltage Standing Wave Ratio) over a frequency range.

It scans frequencies from start_freq to stop_freq with an optional increment of freq_step (default step is 100 kHz). All values must be entered as an integer in Hertz (cycles per second).

Note: rigswr assumes that start_freq is less than or equal to stop_freq. If it is greater, rigswr will exit without doing anything.

For each frequency, rigswr transmits at 25% of total POWER during 0.5 second in CW mode and reads VSWR.

Frequency and the corresponding VSWR are then printed on stdout.

To work correctly, rigswr needs a radio that can measure VSWR and a Hamlib backend that supports reading VSWR from the radio.

rigswr reference
The complete reference for rigswr can be found in the rigswr(1) manual page.

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio and rotator control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2001-2020 Hamlib Group (various contributors)

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

less(1), more(1), ampctl(1), ampctld(1), rigctl(1), rigctld(1), rotctl(1), rotctld(1), rigmem(1), rigsmtr(1), rigswr(1), hamlib(7), hamlib-primer(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/hamlib.7.html ================================================ HAMLIB

HAMLIB

NAME
DESCRIPTION
COPYING
SEE ALSO
COLOPHON

NAME

hamlib - radio and rotator control library

DESCRIPTION

The Ham Radio Control Libraries, Hamlib for short, is a development effort to provide a consistent interface for programmers wanting to incorporate radio and rotator control in their programs.

Hamlib is not a complete user application, rather, it is a software layer intended to make controlling various radios and other amateur radio station (shack) hardware much easier. Hamlib will allow authors of software such as logging programs, digital communications programs, or those wanting to develop the ultimate radio control software to concentrate on the user interface and the basic function of the program rather than radio control. Hamlib consists of several parts, the programming library, utility programs, and library interfaces to other programming languages.

Most recent amateur radio transceivers allow external control of their functions through a serial interface. Unfortunately, control commands are not always consistent across a manufacturer’s product line and each manufacturer’s product line differs greatly from its competitors.

Hamlib attempts to solve this problem by presenting a virtual radio to the programmer by providing an interface to actions such as setting a given Variable Frequency Oscillator’s (VFO) frequency, setting the operating mode, querying the radio of its current status and settings, and giving the application a list of a given radio’s capabilities. Unfortunately, what can be accomplished by Hamlib is limited by the radios themselves and some offer very limited capability.

Other devices, such as antenna rotators, can be placed into the Hamlib control scheme. Other recent developments include network interface servers and a USB interface capability. Language bindings are provided for C, C++, Perl, Python, Lua and TCL (more to come).

Overview
Hamlib is a front end library providing a C language Application Programming Interface (API) to programmers wishing to integrate radio or rotator control in their applications. Hamlib presents a virtual radio or virtual rotator that is a consistent interface to an application despite wide differences in radio and rotator interfaces and capabilities.

The front end library uses a number of back end libraries to translate from the front end to the various individual radio and rotator models. A back end library handles conversion of the front end variables to the format needed by the radio or rotator device it controls. The back end libraries are generally grouped by manufacturer and in some cases by a common control protocol.

Hamlib also provides an interface library for each of several common scripting languages such as Perl, Python, Lua, and TCL. These language bindings are generated through the use of SWIG, a parser/generator for multiple language interfaces to a C library. A natively generated C++ language interface is also provided.

Besides the C and supplemental APIs, Hamlib also provides a pair of network daemons that provide a text command based API for controlling an attached radio or rotator through a TCP/IP network connection. The daemons then handle the interface to the Hamlib C API.

More than one type of device, radio or rotator, may be controlled at a time, however, there is generally a limit of one device per serial port or other port.

Hamlib project information
The Hamlib Project was founded by Frank Singleton, VK3FCS/KM5WS in July 2000. Shortly after Stephane Fillod, F8CFE, joined Frank on the Hamlib project and the API and implementation development led to a reasonable level of maturity in a few years. A major milestone was reached when Hamlib 1.2.0 was released in March 2004. The API and Application Binary Interface (ABI) interfaces have remained stable since that time up to the release of 3.3 in mid 2018. Version 4.0 marks a major change to the ABI and certain changes to the API.

Development continues through the major version number 4.x series and beyond. The 4.0 release marks a major change in the ABI with several changes for additional modes and such that will require client programs that use the C ABI to be recompiled/relinked, etc. Other goals include improving the overall documentation (this man page with more in progress), and other updates as warranted.

The Project is hosted by SourceForge.net at the Hamlib project page. As GitHub has become a very popular project hosting site, Hamlib also has a dedicated GitHub project page. GitHub also hosts the hamlib.org Web site and the Hamlib Wiki.

Development discussion and most user support take place on the hamlib-developer mailing list. While there are SourceForge.net discussion forums, they are rarely used and not as closely read by the developers as the mailing list.

For source code management, the project uses Git, a fast, distributed content tracker. Among its features is that every developer has the complete Hamlib development history available locally. For more information on using Git, see hamlib-git(7).

Note: while a canonical Git repository is hosted at SourceForge, its availability is not essential to continued development although development work flows would change temporarily. Several developers find the GitHub Web interface easier to use and lately development has centered around GitHub rather than SourceForge.

Applications using Hamlib
A number of application developers have taken advantage of Hamlib’s capabilities to implement radio and/or rotator control. While not exhaustive, a list is maintained at the Hamlib Wiki, Applications/Screenshots. Developers are encouraged to request their applications be added to the gallery by way of the hamlib-developer mailing list.

Using Hamlib with your program
As with other Free Software projects, Hamlib relies heavily on copyleft licensing to encourage development contributions and provide an open atmosphere for development. Hamlib’s source code is released under two licenses, the Lesser General Public License (LGPL) version 2.1 for the library portion, and the General Public License (GPL) version 2 for the utility programs.

The LGPL allows the library to be used (linked) by programs regardless of their individual license. However, any contributions to the library source remain under a copyleft license which means that the library source code may not be used in violation of the terms of the LGPL (see the file COPYING.LIB in the main source directory). Concepts learned by studying these sources for the purpose of understanding the Hamlib API is not covered nor prohibited by the LGPL, however, directly copying LGPL sources into any work that is incompatible with the terms of the LGPL is a violation of the terms of the license.

The utility program source files are released under the GPL. Any direct use of these sources must be in a form that complies with the terms of the GPL (see the file COPYING in the main source directory). Concepts learned by studying these sources for the purpose of understanding the Hamlib API is not covered nor prohibited by the GPL, however, directly copying GPL sources into any work that is incompatible with the terms of the GPL is a violation of the terms of the license.

Radios with a clone capability
Hamlib’s focus is on controlling radios that employ a port and command protocol for setting frequency, mode, VFO, PTT, etc. Most VHF/UHF transceivers do not employ such control capability but do provide for cloning the memory contents from radio to another of the same model. A related project, Chirp, aims to support radios with such a clone capability. Please contact the Chirp project for support of such radios.

Pronouncing Hamlib
English speakers seem to have two alternate pronunciations for our project:

Hamlib (Ham - lib, long ’i’, as in library.) IPA style: /'ham læb/

Hamlib (Ham - lib, short ’i’, as in liberty.) IPA style: /'ham lɪb/

Then again, we have people who say Linux “L-eye-nux” and those who say “L-in-nux”...

If you’re French, the above does not apply! :-)

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2001-2020 Hamlib Group (various contributors)

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

hamlib-primer(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/rigctl.1.html ================================================ RIGCTL

RIGCTL

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
READLINE
DIAGNOSTICS
EXIT STATUS
EXAMPLES
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

rigctl - control radio transceivers and receivers

SYNOPSIS

rigctl

[-hiIlLnouV] [-m id] [-r device] [-p device] [-d device] [-P type] [-D type] [-s baud] [-c id] [-t char] [-C parm=val] -Y [-v[-Z]] [command|-]

DESCRIPTION

Control radio transceivers and receivers. rigctl accepts commands from the command line as well as in interactive mode if none are provided on the command line.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete rig support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select radio model number. Defaults to dummy rig.

See model list (use “rigctl -l”).

Note: rigctl (or third party software using the C API) will use radio model 2 for NET rigctl (communicating with rigctld).

-r, --rig-file=device

Use device as the file name of the port connected to the radio.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

Can be a network address:port, e.g. 127.0.0.1:12345

The special string “uh-rig” may be given to enable micro-ham device support.

-p, --ptt-file=device

Use device as the file name of the Push-To-Talk device using a device file as described above.

-d, --dcd-file=device

Use device as the file name of the Data Carrier Detect device using a device file as described above.

-P, --ptt-type=type

Use type of Push-To-Talk device.

Supported types are ’RIG’ (CAT command), ’DTR’, ’RTS’, ’PARALLEL’, ’CM108’, ’GPIO’, ’GPION’, ’NONE’, overriding PTT type defined in the rig’s backend.

Some side effects of this command are that when type is set to DTR, read PTT state comes from the Hamlib frontend, not read from the radio. When set to NONE, PTT state cannot be read or set even if rig backend supports reading/setting PTT status from the rig.

-D, --dcd-type=type

Use type of Data Carrier Detect device.

Supported types are ’RIG’ (CAT command), ’DSR’, ’CTS’, ’CD’, ’PARALLEL’, ’CM108’, ’GPIO’, ’GPION’, ’NONE’.

-s, --serial-speed=baud

Set serial speed to baud rate.

Uses maximum serial speed from radio backend capabilities (set by -m above) as the default.

-c, --civaddr=id

Use id as the CI-V address to communicate with the rig.

Only useful for Icom and some Ten-Tec rigs.

Note: The id is in decimal notation, unless prefixed by 0x, in which case it is hexadecimal.

-t, --send-cmd-term=char

Change the termination char for text protocol when using the send_cmd command.

The default value is ASCII CR (’0x0D’). ASCII non-printing characters can be given as the ASCII number in hexadecimal format prepended with “0x”. You may pass an empty string for no termination char. The string “-1” tells rigctl to switch to binary protocol. See the send_cmd command for further explanation.

For example, to specify a command terminator for Kenwood style text commands pass “-t ’;’” to rigctl. See EXAMPLE below.

-L, --show-conf

List all config parameters for the radio defined with -m above. Note the dummy device has no serial parameters.

-C, --set-conf=parm=val[,parm=val]

Set radio configuration parameter(s), e.g. stop_bits=2.

Use the -L option above for a list of configuration parameters for a given model number.

-u, --dump-caps

Dump capabilities for the radio defined with -m above and exit.

-l, --list

List all model numbers defined in Hamlib and exit.

The list is sorted by model number.

Note: In Linux the list can be scrolled back using Shift-PageUp/Shift-PageDown, or using the scrollbars of a virtual terminal in X or the cmd window in Windows. The output can be piped to more(1) or less(1), e.g. “rigctl -l | more”.

-o, --vfo

Enable vfo mode.

An extra VFO argument will be required in front of each appropriate command (except set_vfo). Otherwise, ’currVFO’ is used when this option is not set and an extra VFO argument is not used.

-n, --no-restore-ai

On exit rigctl restores the state of auto information (AI) on the controlled rig.

If this is not desired, for example if you are using rigctl to turn AI mode on or off, pass this option.

-i, --read-history

Read previously saved command and argument history from a file (default $HOME/.rigctl_history) for the current session.

Available when rigctl is built with Readline support (see READLINE below).

Note: To read a history file stored in another directory, set the RIGCTL_HIST_DIR environment variable, e.g. “RIGCTL_HIST_DIR=~/tmp rigctl -i”. When RIGCTL_HIST_DIR is not set, the value of HOME is used.

-I, --save-history

Write current session (and previous session(s), if -i option is given) command and argument history to a file (default $HOME/.rigctl_history) at the end of the current session.

Complete commands with arguments are saved as a single line to be recalled and used or edited. Available when rigctl is built with Readline support (see READLINE below).

Note: To write a history file in another directory, set the RIGCTL_HIST_DIR environment variable, e.g. “RIGCTL_HIST_DIR=~/tmp rigctl -IRq. When RIGCTL_HIST_DIR is not set, the value of HOME is used.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-Y,--ignore-err

Ignores rig open errors

-Z, --debug-time-stamps

Enable time stamps for the debug messages.

Use only in combination with the -v option as it generates no output on its own.

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of rigctl and exit.

-

Stop option processing and read commands from standard input.

See Standard Input below.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf and --show-conf options.

Please note that the backend for the radio to be controlled, or the radio itself may not support some commands. In that case, the operation will fail with a Hamlib error code.

COMMANDS

Commands can be entered either as a single char, or as a long command name. The commands are not prefixed with a dash as the options are. They may be typed in when in interactive mode or provided as argument(s) in command line interface mode. In interactive mode commands and their arguments may be entered on a single line:

M LSB 2400

Since most of the Hamlib operations have a set and a get method, an upper case letter will often be used for a set method whereas the corresponding lower case letter refers to the get method. Each operation also has a long name; in interactive mode, prepend a backslash, ’\’, to enter a long command name.

Example: Use “\dump_caps” to see what capabilities this radio and backend support.

Note: The backend for the radio to be controlled, or the radio itself may not support some commands. In that case, the operation will fail with a Hamlib error message.

Standard Input
As an alternative to the READLINE interactive command entry or a single command for each run, rigctl features a special option where a single dash (’-’) may be used to read commands from standard input (stdin). Commands must be separated by whitespace similar to the commands given on the command line. Comments may be added using the ’#’ character, all text up until the end of the current line including the ’#’ character is ignored.

A simple example (typed text is in bold):

$ cat <<.EOF. >cmds.txt
> # File of commands

> v f m

# query rig

> V VFOB F 14200000 M CW 500

# set rig

> v f m

# query rig

> .EOF.

$ rigctl -m1 - <cmds.txt

v VFOA

f 145000000

m FM
15000

V VFOB
F 14200000
M CW 500
v VFOB

f 14200000

m CW
500

$

rigctl Commands
A summary of commands is included below (In the case of set commands the quoted italicized string is replaced by the value in the description. In the case of get commands the quoted italicized string is the key name of the value returned.):
Q
|q, exit rigctl

Exit rigctl in interactive mode.

When rigctl is controlling the rig directly, will close the rig backend and port. When rigctl is connected to rigctld (radio model 2), the TCP/IP connection to rigctld is closed and rigctld remains running, available for another TCP/IP network connection.

F, set_freq 'Frequency'

Set 'Frequency', in Hz.

Frequency may be a floating point or integer value.

f, get_freq

Get 'Frequency', in Hz.

Returns an integer value and the VFO hamlib thinks is active. Note that some rigs (e.g. all Icoms) cannot track current VFO so hamlib can get out of sync with the rig if the user presses rig buttons like the VFO.

M, set_mode 'Mode' 'Passband'

Set 'Mode' and 'Passband'.

Mode is a token: ’USB’, ’LSB’, ’CW’, ’CWR’, ’RTTY’, ’RTTYR’, ’AM’, ’FM’, ’WFM’, ’AMS’, ’PKTLSB’, ’PKTUSB’, ’PKTFM’, ’ECSSUSB’, ’ECSSLSB’, ’FA’, ’SAM’, ’SAL’, ’SAH’, ’DSB’.

Passband is in Hz as an integer, -1 for no change, or ’0’ for the radio backend default.

Note: Passing a ’?’ (query) as the first argument instead of a Mode token will return a space separated list of radio backend supported Modes. Use this to determine the supported Modes of a given radio backend.

m, get_mode

Get 'Mode' and 'Passband'.

Returns Mode as a token and Passband in Hz as in set_mode above.

V, set_vfo 'VFO'

Set 'VFO'.

VFO is a token: ’VFOA’, ’VFOB’, ’VFOC’, ’currVFO’, ’VFO’, ’MEM’, ’Main’, ’Sub’, ’TX’, ’RX’.

In VFO mode (see --vfo option above) only a single VFO parameter is required:

$ rigctl -m 229 -r /dev/rig -o

Rig command: V
VFO: VFOB

Rig command:

v, get_vfo

Get current 'VFO'.

Returns VFO as a token as in set_vfo above.

J, set_rit 'RIT'

Set 'RIT'.

RIT is in Hz and can be + or -. A value of ’0’ resets RIT (Receiver Incremental Tuning) to match the VFO frequency.

Note: RIT needs to be explicitly activated or deactivated with the set_func command. This allows setting the RIT offset independently of its activation and allows RIT to remain active while setting the offset to ’0’.

j, get_rit

Get 'RIT' in Hz.

Returned value is an integer.

Z, set_xit 'XIT'

Set 'XIT'.

XIT is in Hz and can be + or -. A value of ’0’ resets XIT (Transmitter Incremental Tuning) to match the VFO frequency.

Note: XIT needs to be explicitly activated or deactivated with the set_func command. This allows setting the XIT offset independently of its activation and allows XIT to remain active while setting the offset to ’0’.

z, get_xit

Get 'XIT' in Hz.

Returned value is an integer.

T, set_ptt 'PTT'

Set 'PTT'.

PTT is a value: ’0’ (RX), ’1’ (TX), ’2’ (TX mic), or ’3’ (TX data).

t, get_ptt

Get 'PTT' status.

Returns PTT as a value in set_ptt above.

S, set_split_vfo 'Split' 'TX VFO'

Set 'Split' mode.

Split is either ’0’ = Normal or ’1’ = Split.

Set 'TX VFO'.

TX VFO is a token: ’VFOA’, ’VFOB’, ’VFOC’, ’currVFO’, ’VFO’, ’MEM’, ’Main’, ’Sub’, ’TX’, ’RX’.

s, get_split_vfo

Get 'Split' mode.

Split is either ’0’ = Normal or ’1’ = Split.

Get 'TX VFO'.

TX VFO is a token as in set_split_vfo above.

I, set_split_freq 'Tx Frequency'

Set 'TX Frequency', in Hz.

Frequency may be a floating point or integer value.

i, get_split_freq

Get 'TX Frequency', in Hz.

Returns an integer value.

X, set_split_mode 'TX Mode' 'TX Passband'

Set 'TX Mode' and 'TX Passband'.

TX Mode is a token: ’USB’, ’LSB’, ’CW’, ’CWR’, ’RTTY’, ’RTTYR’, ’AM’, ’FM’, ’WFM’, ’AMS’, ’PKTLSB’, ’PKTUSB’, ’PKTFM’, ’ECSSUSB’, ’ECSSLSB’, ’FA’, ’SAM’, ’SAL’, ’SAH’, ’DSB’.

TX Passband is in Hz as an integer, or ’0’ for the radio backend default.

Note: Passing a ’?’ (query) as the first argument instead of a TX Mode token will return a space separated list of radio backend supported TX Modes. Use this to determine the supported TX Modes of a given radio backend.

x, get_split_mode

Get 'TX Mode' and 'TX Passband'.

Returns TX Mode as a token and TX Passband in Hz as in set_split_mode above.

Y, set_ant 'Antenna' 'Option'

Set 'Antenna' and 'Option'.

Number is 1-based antenna# (’1’, ’2’, ’3’, ...).

Option depends on rig..for Icom it probably sets the Tx & Rx antennas as in the IC-7851. See your manual for rig specific option values. Most rigs don’t care about the option.

For the IC-7851, FTDX3000 (and perhaps others) it means this:

1 = TX/RX = ANT1 FTDX3000=ANT1/ANT3
2 = TX/RX = ANT2 FTDX3000=ANT2/ANT3
3 = TX/RX = ANT3 FTDX3000=ANT3
4 = TX/RX = ANT1/ANT4
5 = TX/RX = ANT2/ANT4
6 = TX/RX = ANT3/ANT4

y, get_ant 'Antenna'

Get 'Antenna'

A value of 0 for Antenna will return the current TX antenna

> 0 is 1-based antenna# (’1’, ’2’, ’3’, ...).

Option returned depends on rig..for Icom is likely the RX only flag.

b, send_morse 'Morse'

Send 'Morse' symbols. For Yaesu rigs use memory#.

0x8b, get_dcd

Get 'DCD' (squelch) status: ’0’ (Closed) or ’1’ (Open).

R, set_rptr_shift 'Rptr Shift'

Set 'Rptr Shift'.

Rptr Shift is one of: ’+’, ’-’, or something else for ’None’.

r, get_rptr_shift

Get 'Rptr Shift'.

Returns ’+’, ’-’, or ’None’.

O, set_rptr_offs 'Rptr Offset'

Set 'Rptr Offset', in Hz.

o, get_rptr_offs

Get 'Rptr Offset', in Hz.

C, set_ctcss_tone 'CTCSS Tone'

Set 'CTCSS Tone', in tenths of Hz.

c, get_ctcss_tone

Get 'CTCSS Tone', in tenths of Hz.

D, set_dcs_code 'DCS Code'

Set 'DCS Code'.

d, get_dcs_code

Get 'DCS Code'.

0x90, set_ctcss_sql 'CTCSS Sql'

Set 'CTCSS Sql' tone, in tenths of Hz.

0x91, get_ctcss_sql

Get 'CTCSS Sql' tone, in tenths of Hz.

0x92, set_dcs_sql 'DCS Sql'

Set 'DCS Sql' code.

0x93, get_dcs_sql

Get 'DCS Sql'
code.

N, set_ts 'Tuning Step'

Set 'Tuning Step', in Hz.

n, get_ts

Get 'Tuning Step', in Hz.

U, set_func 'Func' 'Func Status'

Set 'Func' and 'Func Status'.

Func is a token: ’FAGC’, ’NB’, ’COMP’, ’VOX’, ’TONE’, ’TSQL’, ’SBKIN’, ’FBKIN’, ’ANF’, ’NR’, ’AIP’, ’APF’, ’MON’, ’MN’, ’RF’, ’ARO’, ’LOCK’, ’MUTE’, ’VSC’, ’REV’, ’SQL’, ’ABM’, ’BC’, ’MBC’, ’RIT’, ’AFC’, ’SATMODE’, ’SCOPE’, ’RESUME’, ’TBURST’, ’TUNER’, ’XIT’.

Func Status is a non null value for “activate” or “de-activate” otherwise, much as TRUE/FALSE definitions in the C language (true is non-zero and false is zero, ’0’).

Note: Passing a ’?’ (query) as the first argument instead of a Func token will return a space separated list of radio backend supported set function tokens. Use this to determine the supported functions of a given radio backend.

u, get_func 'Func'

Get 'Func Status'.

Returns Func Status as a non null value for the Func token given as in set_func above.

Note: Passing a ’?’ (query) as the first argument instead of a Func token will return a space separated list of radio backend supported get function tokens. Use this to determine the supported functions of a given radio backend.

L, set_level 'Level' 'Level Value'

Set 'Level' and 'Level Value'.

Level is a token: ’PREAMP’, ’ATT’, ’VOX’, ’AF’, ’RF’, ’SQL’, ’IF’, ’APF’, ’NR’, ’PBT_IN’, ’PBT_OUT’, ’CWPITCH’, ’RFPOWER’, ’RFPOWER_METER’, ’RFPOWER_METER_WATTS’, ’MICGAIN’, ’KEYSPD’, ’NOTCHF’, ’COMP’, ’AGC’, ’BKINDL’, ’BAL’, ’METER’, ’VOXGAIN’, ’ANTIVOX’, ’SLOPE_LOW’, ’SLOPE_HIGH’, ’RAWSTR’, ’SWR’, ’ALC’, ’STRENGTH’.

The Level Value can be a float or an integer value. For the AGC token the value is one of ’0’ = OFF, ’1’ = SUPERFAST, ’2’ = FAST, ’3’ = SLOW, ’4’ = USER, ’5’ = MEDIUM, ’6’ = AUTO.

Note: Passing a ’?’ (query) as the first argument instead of a Level token will return a space separated list of radio backend supported set level tokens. Use this to determine the supported levels of a given radio backend.

l, get_level 'Level'

Get 'Level Value'.

Returns Level Value as a float or integer for the Level token given as in set_level above.

Note: Passing a ’?’ (query) as the first argument instead of a Level token will return a space separated list of radio backend supported get level tokens. Use this to determine the supported levels of a given radio backend.

P, set_parm 'Parm' 'Parm Value'

Set 'Parm' and 'Parm Value'.

Parm is a token: ’ANN’, ’APO’, ’BACKLIGHT’, ’BEEP’, ’TIME’, ’BAT’, ’KEYLIGHT’.

Note: Passing a ’?’ (query) as the first argument instead of a Parm token will return a space separated list of radio backend supported set parameter tokens. Use this to determine the supported parameters of a given radio backend.

p, get_parm 'Parm'

Get 'Parm Value'.

Returns Parm Value as a float or integer for the Parm token given as in set_parm above.

Note: Passing a ’?’ (query) as the first argument instead of a Parm token will return a space separated list of radio backend supported get parameter tokens. Use this to determine the supported parameters of a given radio backend.

B, set_bank 'Bank'

Set 'Bank'.

Sets the current memory bank number.

E, set_mem 'Memory#'

Set 'Memory#' channel number.

e, get_mem

Get 'Memory#' channel number.

G, vfo_op 'Mem/VFO Op'

Perform a 'Mem/VFO Op'.

Mem/VFO Operation is a token: ’CPY’, ’XCHG’, ’FROM_VFO’, ’TO_VFO’, ’MCL’, ’UP’, ’DOWN’, ’BAND_UP’, ’BAND_DOWN’, ’LEFT’, ’RIGHT’, ’TUNE’, ’TOGGLE’.

Note: Passing a ’?’ (query) as the first argument instead of a Mem/VFO Op token will return a space separated list of radio backend supported Set Mem/VFO Op tokens. Use this to determine the supported Mem/VFO Ops of a given radio backend.

g, scan 'Scan Fct' 'Scan Channel'

Perform a 'Scan Fct' on a 'Scan Channel'.

Scan Function is a token: ’STOP’, ’MEM’, ’SLCT’, ’PRIO’, ’PROG’, ’DELTA’, ’VFO’, ’PLT’.

Scan Channel is an integer (maybe?).

Note: Passing a ’?’ (query) as the first argument instead of a Scan Fct token will return a space separated list of radio backend supported Scan Function tokens. Use this to determine the supported Scan Functions of a given radio backend.

H, set_channel 'Channel'

Set memory 'Channel' data.

Sets memory channel information

h, get_channel 'readonly'

Get channel memory.

If readonly!=0 then only channel data is returned and rig remains on the current channel. If readonly=0 then rig will be set to the channel requested. data.

A, set_trn 'Transceive'

Set 'Transceive' mode.

Transcieve is a token: ’OFF’, ’RIG’, ’POLL’.

Transceive is a mechanism for radios to report events without a specific call for information.

Note: Passing a ’?’ (query) as the first argument instead of a Transceive token will return a space separated list of radio backend supported Transceive mode tokens. Use this to determine the supported Transceive modes of a given radio backend.

a, get_trn

Get 'Transceive' mode.

Transceive mode (reporting event) as in set_trn above.

*, reset 'Reset'

Perform rig 'Reset'.

Reset is a value: ’0’ = None, ’1’ = Software reset, ’2’ = VFO reset, ’4’ = Memory Clear reset, ’8’ = Master reset.

Since these values are defined as a bitmask in include/hamlib/rig.h, it should be possible to AND these values together to do multiple resets at once, if the backend supports it or supports a reset action via rig control at all.

0x87, set_powerstat 'Power Status'

Set 'Power Status'.

Power Status is a value: ’0’ = Power Off, ’1’ = Power On, ’2’ = Power Standby (enter standby), ’4’ = Power Operate (leave standby).

0x88, get_powerstat

Get 'Power Status' as in set_powerstat above.

0x89, send_dtmf 'Digits'

Set DTMF 'Digits'.

0x8a, recv_dtmf

Get DTMF 'Digits'.

_, get_info

Get misc information about the rig.

0xf5, get_rig_info

Get misc information about the rig vfo status and other info.

0xf3, get_vfo_info 'VFO'

Get misc information about a specific vfo.

dump_state

Return certain state information about the radio backend.

1, dump_caps

Not a real rig remote command, it just dumps capabilities, i.e. what the backend knows about this model, and what it can do.

TODO: Ensure this is in a consistent format so it can be read into a hash, dictionary, etc. Bug reports requested.

Note: This command will produce many lines of output so be very careful if using a fixed length array! For example, running this command against the Dummy backend results in over 5kB of text output.

VFO parameter not used in ’VFO mode’.

2, power2mW 'Power [0.0..1.0]' 'Frequency' 'Mode'

Returns 'Power mW'.

Converts a Power value in a range of 0.0...1.0 to the real transmit power in milli-Watts (integer).

'Frequency' and 'Mode' also need to be provided as output power may vary according to these values.

VFO parameter is not used in VFO mode.

4, mW2power 'Power mW' 'Frequency' 'Mode'

Returns 'Power [0.0..1.0]'.

Converts the real transmit power in milli-Watts (integer) to a Power value in a range of 0.0 ... 1.0.

'Frequency' and 'Mode' also need to be provided as output power may vary according to these values.

VFO parameter is not used in VFO mode.

w, send_cmd 'Cmd'

Send a raw command string to the radio.

This is useful for testing and troubleshooting radio commands and responses when developing a backend.

For binary protocols enter values as \0xAA\0xBB. Expect a 'Reply' from the radio which will likely be a binary block or an ASCII string depending on the radio’s protocol (see your radio’s computer control documentation).

The command terminator, set by the send-cmd-term option above, will terminate each command string sent to the radio. This character should not be a part of the input string.

W, send_cmd_rx 'Cmd' nbytes

Send a raw command string to the radio and expect nbytes returned.

This is useful for testing and troubleshooting radio commands and responses when developing a backend. If the # of bytes requested is <= the number actually returned no timeout will occur.

The command argument can have no spaces in it. For binary protocols enter values as \0xAA\0xBB. Expect a 'Reply' from the radio which will likely be a binary block or an ASCII string depending on the radio’s protocol (see your radio’s computer control documentation).

The command terminator, set by the send-cmd-term option above, will terminate each command string sent to the radio. This character should not be a part of the input string.

set_clock 'DateTime'

Set 'DateTime'

Sets rig clock -- note that some rigs do not handle seconds or milliseconds. If you try to set sec/msec and rig does not support it you will get a debug warning message. Format is ISO8601,
Formats accepted
YYYY-MM-DDTHH:MM:SS.SSS+ZZ (where +ZZ is either -/+ UTC offset)
YYYY-MM-DDTHH:MM:SS+ZZ
YYYY-MM-DDTHH:MM+ZZ
YYYY-MM-DD (sets date only)
Note: Icom rigs expect you to set local time and the hours off to UTC.
So...4PM EST example would be 2021-12-01T16:00:00+05
But...if you want to display GMT you must set the clock for GMT with zero UTC offset.
Hopefully Icom will allow displaying either clock in the future

get_clock

Get 'RigTime'

Gets rig clock -- note that some rigs do not handle seconds or milliseconds. Format is ISO8601 YYYY-MM-DDTHH:MM:SS.sss+ZZ where +ZZ is either -/+ UTC offset

chk_vfo

Get 'Status'

Returns Status as 1 if vfo option is on and 0 if vfo option is off. This command reflects the -o switch for rigctl and ritctld and can be dynamically changed by set_vfo_opt.

set_vfo_opt 'Status'

Set 'Status'

Set vfo option Status 1=on or 0=off This is the same as using the -o switch for rigctl and ritctld. This can be dyamically changed while running.

pause 'Seconds'

Pause for the given whole (integer) number of 'Seconds' before sending the next command to the radio.

password 'Password'

Sends password to rigctld when rigctld has been secured with -A. Must use the 32-char shared secret from rigctld.

READLINE

If Readline library development files are found at configure time, rigctl will be conditonally built with Readline support for command and argument entry. Readline command key bindings are at their defaults as described in the Readline manual. rigctl sets the name “rigctl” which can be used in Conditional Init Constructs in the Readline Init File ($HOME/.inputrc by default) for custom keybindings unique to rigctl.

Command history is available with Readline support as described in the Readline History manual. Command and argument strings are stored as single lines even when arguments are prompted for input individually. Commands and arguments are not validated and are stored as typed with values separated by a single space.

Normally session history is not saved, however, use of either of the -i/--read-history or -I/--save-history options when starting rigctl will cause any previously saved history to be read in and/or the current and any previous session history (assuming the -i and -I options are given together) will be written out when rigctl is closed. Each option is mutually exclusive, i.e. either may be given separately or in combination. This is useful to save a set of commands and then read them later but not write the modified history for a consistent set of test commands in interactive mode, for example.

History is stored in $HOME/.rigctl_history by default although the destination directory may be changed by setting the RIGCTL_HIST_DIR environment variable. When RIGCTL_HIST_DIR is unset, the value of the HOME environment variable is used instead. Only the destination directory may be changed at this time.

If Readline support is not found at configure time the original internal command handler is used. Readline is not used for rigctl commands entered on the command line regardless if Readline support is built in or not.

Note: Readline support is not included in the MS Windows 32 or 64 bit binary builds supplied by the Hamlib Project. Running rigctl on the MS Windows platform in the ’cmd’ shell does give session command line history, however, it is not saved to disk between sessions.

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio which is very useful for radio backend library development and may be requested by the developers.

EXIT STATUS

rigctl exits with:

0

if all operations completed normally;

1

if there was an invalid command line option or argument;

2

if an error was returned by Hamlib.

EXAMPLES

Start rigctl for a Yaesu FT-920 using a USB to serial adapter on Linux in interactive mode:

$ rigctl -m 1014 -r /dev/ttyUSB1

Start rigctl for a Yaesu FT-920 using COM1 on MS Windows while generating TRACE output to stderr:

> rigctl -m 1014 -r COM1 -vvvvv

Start rigctl for a Yaesu FT-920 using a USB to serial adapter while setting baud rate and stop bits:

$ rigctl -m 1014 -r /dev/ttyUSB1 -s 4800 -C stop_bits=2

Start rigctl for an Elecraft K3 using a USB to serial adapter while specifying a command terminator for the w command:

$ rigctl -m 2029 -r /dev/ttyUSB0 -t’;’

Connect to a running rigctld with radio model 2 (“NET rigctl”) on the local host and specifying the TCP port, setting frequency and mode:

$ rigctl -m 2 -r localhost:4532 F 7253500 M LSB 0

BUGS

set_chan has no entry method as of yet, hence left unimplemented.

This almost empty section...

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2000-2011 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various contributors)
Copyright © 2010-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

less(1), more(1), rigctld(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/rigctlcom.1.html ================================================ RIGCTLCOM

RIGCTLCOM

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
DIAGNOSTICS
EXIT STATUS
EXAMPLE
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

rigctlcom - COM port passthru as TS-2000 emulator to your rig

SYNOPSIS

rigctlcom

[-hlLuV] [-m id] [-r device] [-R device] [-p device] [-d device] [-P type] [-D type] [-s baud] [-S baud] [-c id] [-C parm=val] [-B] [-v[-Z]]

DESCRIPTION

Allows programs which can connect to TS-2000 via COM port to use Hamlib radios. Multiple programs can connect to the radio via FLRig or rigctld.

Virtual serial/COM ports must be set up first using socat(1) or similar on POSIX systems (BSD, Linux, OS/X). On Microsoft Windows available utilities are com0com, Free Virtual Serial Ports, or VPSD.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select radio model number.

See model list (use “rigctlcom -l”).

Note: rigctlcom (or third party software using the C API) will use radio model 2 for NET rigctl (communicating with rigctld).

-r, --rig-file=device

Use device as the file name of the port connected to the radio.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

The special string “uh-rig” may be given to enable micro-ham device support.

-R, --rig-file2=device

Use device as the file name of one of the virtual com ports -- your program will connect to the other com port of the virtual pair.

Virtual serial ports on POSIX systems can be done with socat(1):

$ socat -d -d pty,raw,echo=0 pty,raw,echo=0

See this Stackoverflow answer for using socat.

On Microsoft Windows available utilities are com0com, Free Virtual Serial Ports, or VPSD (see DESCRIPTION above for WWW links).

-p, --ptt-file=device

Use device as the file name of the Push-To-Talk device using a device file as described above.

-d, --dcd-file=device

Use device as the file name of the Data Carrier Detect device using a device file as described above.

-P, --ptt-type=type

Use type of Push-To-Talk device.

Supported types are ’RIG’ (CAT command), ’DTR’, ’RTS’, ’PARALLEL’, ’NONE’, overriding PTT type defined in the rig’s backend.

Some side effects of this command are that when type is set to DTR, read PTT state comes from the Hamlib frontend, not read from the radio. When set to NONE, PTT state cannot be read or set even if rig backend supports reading/setting PTT status from the rig.

-D, --dcd-type=type

Use type of Data Carrier Detect device.

Supported types are ’RIG’ (CAT command), ’DSR’, ’CTS’, ’CD’, ’PARALLEL’, ’NONE’.

-s, --serial-speed=baud

Set serial speed to baud rate.

Uses maximum serial speed from radio backend capabilities (set by -m above) as the default.

-S, --serial-speed2=baud

Set serial speed to baud rate for virtual com port (see -R).

Uses maximum serial speed from radio backend capabilities (set by -m above) as the default.

-c, --civaddr=id

Use id as the CI-V address to communicate with the rig.

Only useful for Icom and some Ten-Tec rigs.

Note: The id is in decimal notation, unless prefixed by 0x, in which case it is hexadecimal.

-L, --show-conf

List all config parameters for the radio defined with -m above.

-C, --set-conf=parm=val[,parm=val]

Set radio configuration parameter(s), e.g. stop_bits=2.

Use the -L option above for a list of configuration parameters for a given model number.

-u, --dump-caps

Dump capabilities for the radio defined with -m above and exit.

-l, --list

List all model numbers defined in Hamlib and exit.

The list is sorted by model number.

Note: In Linux the list can be scrolled back using Shift-PageUp/Shift-PageDown, or using the scrollbars of a virtual terminal in X or the cmd window in Windows. The output can be piped to more(1) or less(1), e.g. “rigctl -l | more”.

-n, --no-restore-ai

rigctl restores the state of auto information (AI) on the controlled rig.

If this is not desired, for example if you are using rigctl to turn AI mode on or off, pass this option.

-B, --mapa2b

Maps set_freq on VFOA to VFOB instead. This allows using CW skimmer with the rig in split mode and clicking on a frequency in CW skimmer will set VFOB to the transmit frequency.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-Z, --debug-time-stamps

Enable time stamps for the debug messages.

Use only in combination with the -v option as it generates no output on its own.

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of rigctl and exit.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf and --show-conf options.

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio which is very useful for radio backend library development and may be requested by the developers.

EXIT STATUS

rigctlcom exits with:

0

if all operations completed normally;

1

if there was an invalid command line option or argument;

2

if an error was returned by Hamlib.

EXAMPLE

Start rigctlcom with FLRig as the Hamlib model and virtual com port pair COM9/COM10, e.g. N1MM Logger+ attaching to COM10 and using the TS-2000 emulator attached to COM9 (assumes virtual serial/COM ports pipe has been created with the proper utility as described above):

$ rigctlcom -m 4 -R COM9 -S 115200

The following diagram shows the communications flow that allows N1MM Logger+ to communicate with a radio connected to Flrig:

Flrig -><- rigctlcom -> COM9 <- virt_port_pipe -> COM10 <- N1MM

BUGS

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2000-2011 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various contributors)
Copyright © 2010-2020 Nate Bargmann
Copyright © 2019 Michael Black W9MDB

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

rigctld(1), rigctl(1), socat(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/rigctld.1.html ================================================ RIGCTLD

RIGCTLD

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
PROTOCOL
DIAGNOSTICS
EXAMPLES
SECURITY
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

rigctld - TCP radio control daemon

SYNOPSIS

rigctld

[-hlLouV] [-m id] [-r device] [-p device] [-d device] [-P type] [-D type] [-s baud] [-c id] [-T IPADDR] [-t number] [-C parm=val] [-X seconds] [-v[-Z]]

DESCRIPTION

The rigctld program is a radio control daemon that handles client requests via TCP sockets. This allows multiple user programs to share one radio (this needs more development). Multiple radios can be controlled on different TCP ports by use of multiple rigctld processes. Note that multiple processes/ports are also necessary if some clients use extended responses and/or vfo mode. So up to 4 processes/ports may be needed for each combination of extended response/vfo mode. The syntax of the commands are the same as rigctl(1). It is hoped that rigctld will be especially useful for client authors using languages such as Perl, Python, PHP, and others.

rigctld communicates to a client through a TCP socket using text commands shared with rigctl. The protocol is simple, commands are sent to rigctld on one line and rigctld responds to get commands with the requested values, one per line, when successful, otherwise, it responds with one line “RPRT x”, where ’x’ is a negative number indicating the error code. Commands that do not return values respond with the line “RPRT x”, where ’x’ is ’0’ when successful, otherwise is a regative number indicating the error code. Each line is terminated with a newline ’\n’ character. This protocol is primarily for use by the NET rigctl (radio model 2) backend.

A separate Extended Response Protocol extends the above behavior by echoing the received command string as a header, any returned values as a key: value pair, and the “RPRT x” string as the end of response marker which includes the Hamlib success or failure value. See the PROTOCOL section for details. Consider using this protocol for clients that will interact with rigctld directly through a TCP socket.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete rotator support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select radio model number. Defaults to dummy device.

See model list (use “rigctl -l”).

Note: rigctl (or third party software using the C API) will use radio model 2 for NET rigctl (this model number is not used for rigctld even though it shows in the model list).

-r, --rig-file=device

Use device as the file name of the port connected to the radio.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

The special string “uh-rig” may be given to enable micro-ham device support.

-p, --ptt-file=device

Use device as the file name of the Push-To-Talk device using a device file as described above.

-d, --dcd-file=device

Use device as the file name of the Data Carrier Detect device using a device file as described above.

-P, --ptt-type=type

Use type of Push-To-Talk device.

Supported types are ’RIG’ (CAT command), ’DTR’, ’RTS’, ’PARALLEL’, ’NONE’, overriding PTT type defined in the rig’s backend.

Some side effects of this command are that when type is set to DTR, read PTT state comes from the Hamlib frontend, not read from the radio. When set to NONE, PTT state cannot be read or set even if rig backend supports reading/setting PTT status from the rig.

-D, --dcd-type=type

Use type of Data Carrier Detect device.

Supported types are ’RIG’ (CAT command), ’DSR’, ’CTS’, ’CD’, ’PARALLEL’, ’NONE’.

-s, --serial-speed=baud

Set serial speed to baud rate.

Uses maximum serial speed from radio backend capabilities (set by -m above) as the default.

-c, --civaddr=id

Use id as the CI-V address to communicate with the rig.

Only useful for Icom and some Ten-Tec rigs.

Note: The id is in decimal notation, unless prefixed by 0x, in which case it is hexadecimal.

-T, --listen-addr=IPADDR

Use IPADDR as the listening IP address.

The default is ANY (0.0.0.0).

rigctld can be run and connected to like this:

rigctld

rigctl -m 2
rigctl -m 2 -r 127.0.0.1
rigctl -m 2 -r localhost
rigctl -m 2 -r 192.168.1.1 (local IP address)
rigctl -m 2 -r ::1 (on Linux rigctld doesn’t listen on IPV6 by default)

rigctld -T 127.0.0.1

rigctl -m 2
rigctl -m 2 -r 127.0.0.1
Exceptions:
rigctl -m 2 -r localhost (only works if localhost is IPV4 address)

rigctld -T localhost (will set up on IPV4 or IPV6 based on localhost)

rigctl -m 2
rigctl -m 2 -r localhost
rigctl -m 2 ip6-localhost
Exceptions:
rigctl -m 2 -r 127.0.0.1 (only works if localhost is IPV4 address)
rigctl -m 2 -r ::1 (only works localhost is IPV6 address)

On Linux only where ip6-localhost is fe00::0:
rigctld -T ip6-localhost

rigctl -m 2 -r ip6-localhost

-t, --port=number

Use number as the TCP listening port.

The default is 4532.

Note: As rotctld’s default port is 4533, it is advisable to use even numbered ports for rigctld, e.g. 4532, 4534, 4536, etc.

-L, --show-conf

List all config parameters for the radio defined with -m above.

-C, --set-conf=parm=val[,parm=val]

Set radio configuration parameter(s), e.g. stop_bits=2.

Use the -L option above for a list of configuration parameters for a given model number.

-u, --dump-caps

Dump capabilities for the radio defined with -m above and exit.

-l, --list

List all model numbers defined in Hamlib and exit.

The list is sorted by model number.

Note: In Linux the list can be scrolled back using Shift-PageUp/Shift-PageDown, or using the scrollbars of a virtual terminal in X or the cmd window in Windows. The output can be piped to more(1) or less(1), e.g. “rigctl -l | more”.

-o, --vfo

Enable vfo mode.

An extra VFO argument will be required in front of each appropriate command (except set_vfo). Otherwise, ’currVFO’ is used when this option is not set and an extra VFO argument is not used.

See chk_vfo below.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-W, --twiddle_timeout=seconds

Enables timeout when VFO twiddling is detected. Some functions will be ignored.

Should only be needed when controlling software should be "paused" so you can move the VFO. Continuous movement extends the timeout.

-x, --uplink=option

1=Sub, 2=Main

For GPredict use to ignore get_freq for Sub or Main uplink VFO.

Should allow downlink VFO movement without confusing GPredict or the uplink

-Z, --debug-time-stamps

Enable time stamps for the debug messages.

Use only in combination with the -v option as it generates no output on its own.

-A, --password

Sets password on rigctld which requires hamlib to use rig_set_password and rigctl to use \password to access rigctld. A 32-char shared secret will be displayed to be used on the client side.

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of rigctl and exit.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf and --show-conf options.

Please note that the backend for the radio to be controlled, or the radio itself may not support some commands. In that case, the operation will fail with a Hamlib error code.

COMMANDS

Commands can be sent over the TCP socket either as a single char, or as a long command name plus the value(s) space separated on one ’\n’ terminated line. See PROTOCOL.

Since most of the Hamlib operations have a set and a get method, an upper case letter will be used for set methods whereas the corresponding lower case letter refers to the get method. Each operation also has a long name; prepend a backslash, ’\’, to send a long command name.

Example (Perl): “print $socket "\\dump_caps\n";” to see what the radio’s backend can do (Note: In Perl and many other languages a ’\’ will need to be escaped with a preceding ’\’ so that even though two backslash characters appear in the code, only one will be passed to rigctld. This is a possible bug, beware!).

Note: The backend for the radio to be controlled, or the radio itself may not support some commands. In that case, the operation will fail with a Hamlib error message.

Here is a summary of the supported commands (In the case of set commands the quoted italicized string is replaced by the value in the description. In the case of get commands the quoted italicized string is the key name of the value returned.):
F
, set_freq 'Frequency'

Set 'Frequency', in Hz.

Frequency may be a floating point or integer value.

f, get_freq

Get 'Frequency', in Hz.

Returns an integer value and the VFO hamlib thinks is active. Note that some rigs (e.g. all Icoms) cannot track current VFO so hamlib can get out of sync with the rig if the user presses rig buttons like the VFO. rigctld clients should ensure they set the intended VFO or use vfo mode.

M, set_mode 'Mode' 'Passband'

Set 'Mode' and 'Passband'.

Mode is a token: ’USB’, ’LSB’, ’CW’, ’CWR’, ’RTTY’, ’RTTYR’, ’AM’, ’FM’, ’WFM’, ’AMS’, ’PKTLSB’, ’PKTUSB’, ’PKTFM’, ’ECSSUSB’, ’ECSSLSB’, ’FA’, ’SAM’, ’SAL’, ’SAH’, ’DSB’.

Passband is in Hz as an integer, or ’0’ for the radio backend default.

Note: Passing a ’?’ (query) as the first argument instead of a Mode token will return a space separated list of radio backend supported Modes. Use this to determine the supported Modes of a given radio backend.

m, get_mode

Get 'Mode' and 'Passband'.

Returns Mode as a token and Passband in Hz as in set_mode above.

V, set_vfo 'VFO'

Set 'VFO'.

VFO is a token: ’VFOA’, ’VFOB’, ’VFOC’, ’currVFO’, ’VFO’, ’MEM’, ’Main’, ’Sub’, ’TX’, ’RX’, ’MainA’, ’MainB’, ’MainC’, ’SubA’, ’SubB’ ’SubC’.

In VFO mode (see --vfo option above) only a single VFO parameter is required:

$ rigctl -m 229 -r /dev/rig -o

Rig command: V
VFO: VFOB

Rig command:

v, get_vfo

Get current 'VFO'.

Returns VFO as a token as in set_vfo above.

J, set_rit 'RIT'

Set 'RIT'.

RIT is in Hz and can be + or -. A value of ’0’ resets RIT (Receiver Incremental Tuning) to match the VFO frequency.

Note: RIT needs to be explicitly activated or deactivated with the set_func command. This allows setting the RIT offset independently of its activation and allows RIT to remain active while setting the offset to ’0’.

j, get_rit

Get 'RIT' in Hz.

Returned value is an integer.

Z, set_xit 'XIT'

Set 'XIT'.

XIT is in Hz and can be + or -. A value of ’0’ resets XIT (Transmitter Incremental Tuning) to match the VFO frequency.

Note: XIT needs to be explicitly activated or deactivated with the set_func command. This allows setting the XIT offset independently of its activation and allows XIT to remain active while setting the offset to ’0’.

z, get_xit

Get 'XIT' in Hz.

Returned value is an integer.

T, set_ptt 'PTT'

Set 'PTT'.

PTT is a value: ’0’ (RX), ’1’ (TX), ’2’ (TX mic), or ’3’ (TX data).

t, get_ptt

Get 'PTT' status.

Returns PTT as a value in set_ptt above.

S, set_split_vfo 'Split' 'TX VFO'

Set 'Split' mode.

Split is either ’0’ = Normal or ’1’ = Split.

Set 'TX VFO'.

TX VFO is a token: ’VFOA’, ’VFOB’, ’VFOC’, ’currVFO’, ’VFO’, ’MEM’, ’Main’, ’Sub’, ’TX’, ’RX’.

s, get_split_vfo

Get 'Split' mode.

Split is either ’0’ = Normal or ’1’ = Split.

Get 'TX VFO'.

TX VFO is a token as in set_split_vfo above.

I, set_split_freq 'Tx Frequency'

Set 'TX Frequency', in Hz.

Frequency may be a floating point or integer value.

i, get_split_freq

Get 'TX Frequency', in Hz.

Returns an integer value.

X, set_split_mode 'TX Mode' 'TX Passband'

Set 'TX Mode' and 'TX Passband'.

TX Mode is a token: ’USB’, ’LSB’, ’CW’, ’CWR’, ’RTTY’, ’RTTYR’, ’AM’, ’FM’, ’WFM’, ’AMS’, ’PKTLSB’, ’PKTUSB’, ’PKTFM’, ’ECSSUSB’, ’ECSSLSB’, ’FA’, ’SAM’, ’SAL’, ’SAH’, ’DSB’.

TX Passband is in Hz as an integer, or ’0’ for the radio backend default.

Note: Passing a ’?’ (query) as the first argument instead of a TX Mode token will return a space separated list of radio backend supported TX Modes. Use this to determine the supported TX Modes of a given radio backend.

x, get_split_mode

Get 'TX Mode' and 'TX Passband'.

Returns TX Mode as a token and TX Passband in Hz as in set_split_mode above.

Y, set_ant 'Antenna'

Set 'Antenna' number (’0’, ’1’, ’2’, ...).

Option depends on rig..for Icom it probably sets the Tx & Rx antennas as in the IC-7851. See your manual for rig specific option values. Most rigs don’t care about the option.

For the IC-7851 (and perhaps others) it means this:

1 = TX/RX = ANT1
2 = TX/RX = ANT2
3 = TX/RX = ANT3
4 = TX/RX = ANT1/ANT4
5 = TX/RX = ANT2/ANT4
6 = TX/RX = ANT3/ANT4

y, get_ant

Get 'Antenna' number (’0’, ’1’, ’2’, ...).

b, send_morse 'Morse'

Send 'Morse' symbols.

0x8b, get_dcd

Get 'DCD' (squelch) status: ’0’ (Closed) or ’1’ (Open).

R, set_rptr_shift 'Rptr Shift'

Set 'Rptr Shift'.

Rptr Shift is one of: ’+’, ’-’, or something else for ’None’.

r, get_rptr_shift

Get 'Rptr Shift'.

Returns ’+’, ’-’, or ’None’.

O, set_rptr_offs 'Rptr Offset'

Set 'Rptr Offset', in Hz.

o, get_rptr_offs

Get 'Rptr Offset', in Hz.

C, set_ctcss_tone 'CTCSS Tone'

Set 'CTCSS Tone', in tenths of Hz.

c, get_ctcss_tone

Get 'CTCSS Tone', in tenths of Hz.

D, set_dcs_code 'DCS Code'

Set 'DCS Code'.

d, get_dcs_code

Get 'DCS Code'.

0x90, set_ctcss_sql 'CTCSS Sql'

Set 'CTCSS Sql' tone, in tenths of Hz.

0x91, get_ctcss_sql

Get 'CTCSS Sql' tone, in tenths of Hz.

0x92, set_dcs_sql 'DCS Sql'

Set 'DCS Sql' code.

0x93, get_dcs_sql

Get 'DCS Sql'
code.

N, set_ts 'Tuning Step'

Set 'Tuning Step', in Hz.

n, get_ts

Get 'Tuning Step', in Hz.

U, set_func 'Func' 'Func Status'

Set 'Func' and 'Func Status'.

Func is a token: ’FAGC’, ’NB’, ’COMP’, ’VOX’, ’TONE’, ’TSQL’, ’SBKIN’, ’FBKIN’, ’ANF’, ’NR’, ’AIP’, ’APF’, ’MON’, ’MN’, ’RF’, ’ARO’, ’LOCK’, ’MUTE’, ’VSC’, ’REV’, ’SQL’, ’ABM’, ’BC’, ’MBC’, ’RIT’, ’AFC’, ’SATMODE’, ’SCOPE’, ’RESUME’, ’TBURST’, ’TUNER’, ’XIT’.

Func Status is a non null value for “activate” or “de-activate” otherwise, much as TRUE/FALSE definitions in the C language (true is non-zero and false is zero, ’0’).

Note: Passing a ’?’ (query) as the first argument instead of a Func token will return a space separated list of radio backend supported set function tokens. Use this to determine the supported functions of a given radio backend.

u, get_func 'Func'

Get 'Func Status'.

Returns Func Status as a non null value for the Func token given as in set_func above.

Note: Passing a ’?’ (query) as the first argument instead of a Func token will return a space separated list of radio backend supported get function tokens. Use this to determine the supported functions of a given radio backend.

L, set_level 'Level' 'Level Value'

Set 'Level' and 'Level Value'.

Level is a token: ’PREAMP’, ’ATT’, ’VOX’, ’AF’, ’RF’, ’SQL’, ’IF’, ’APF’, ’NR’, ’PBT_IN’, ’PBT_OUT’, ’CWPITCH’, ’RFPOWER’, ’RFPOWER_METER’, ’RFPOWER_METER_WATTS’, ’MICGAIN’, ’KEYSPD’, ’NOTCHF’, ’COMP’, ’AGC’, ’BKINDL’, ’BAL’, ’METER’, ’VOXGAIN’, ’ANTIVOX’, ’SLOPE_LOW’, ’SLOPE_HIGH’, ’RAWSTR’, ’SWR’, ’ALC’, ’STRENGTH’.

The Level Value can be a float or an integer value. For the AGC token the value is one of ’0’ = OFF, ’1’ = SUPERFAST, ’2’ = FAST, ’3’ = SLOW, ’4’ = USER, ’5’ = MEDIUM, ’6’ = AUTO.

Note: Passing a ’?’ (query) as the first argument instead of a Level token will return a space separated list of radio backend supported set level tokens. Use this to determine the supported levels of a given radio backend.

l, get_level 'Level'

Get 'Level Value'.

Returns Level Value as a float or integer for the Level token given as in set_level above.

Note: Passing a ’?’ (query) as the first argument instead of a Level token will return a space separated list of radio backend supported get level tokens. Use this to determine the supported levels of a given radio backend.

P, set_parm 'Parm' 'Parm Value'

Set 'Parm' and 'Parm Value'.

Parm is a token: ’ANN’, ’APO’, ’BACKLIGHT’, ’BEEP’, ’TIME’, ’BAT’, ’KEYLIGHT’.

Note: Passing a ’?’ (query) as the first argument instead of a Parm token will return a space separated list of radio backend supported set parameter tokens. Use this to determine the supported parameters of a given radio backend.

p, get_parm 'Parm'

Get 'Parm Value'.

Returns Parm Value as a float or integer for the Parm token given as in set_parm above.

Note: Passing a ’?’ (query) as the first argument instead of a Parm token will return a space separated list of radio backend supported get parameter tokens. Use this to determine the supported parameters of a given radio backend.

B, set_bank 'Bank'

Set 'Bank'.

Sets the current memory bank number.

E, set_mem 'Memory#'

Set 'Memory#' channel number.

e, get_mem

Get 'Memory#' channel number.

G, vfo_op 'Mem/VFO Op'

Perform a 'Mem/VFO Op'.

Mem/VFO Operation is a token: ’CPY’, ’XCHG’, ’FROM_VFO’, ’TO_VFO’, ’MCL’, ’UP’, ’DOWN’, ’BAND_UP’, ’BAND_DOWN’, ’LEFT’, ’RIGHT’, ’TUNE’, ’TOGGLE’.

Note: Passing a ’?’ (query) as the first argument instead of a Mem/VFO Op token will return a space separated list of radio backend supported Set Mem/VFO Op tokens. Use this to determine the supported Mem/VFO Ops of a given radio backend.

g, scan 'Scan Fct' 'Scan Channel'

Perform a 'Scan Fct' on a 'Scan Channel'.

Scan Function is a token: ’STOP’, ’MEM’, ’SLCT’, ’PRIO’, ’PROG’, ’DELTA’, ’VFO’, ’PLT’.

Scan Channel is an integer (maybe?).

Note: Passing a ’?’ (query) as the first argument instead of a Scan Fct token will return a space separated list of radio backend supported Scan Function tokens. Use this to determine the supported Scan Functions of a given radio backend.

H, set_channel 'Channel'

Set memory 'Channel' data.

Not implemented yet.

h, get_channel 'readonly'

Get channel memory.

If readonly!=0 then only channel data is returned and rig remains on the current channel. If readonly=0 then rig will be set to the channel requested. data.

A, set_trn 'Transceive'

Set 'Transceive' mode.

Transcieve is a token: ’OFF’, ’RIG’, ’POLL’.

Transceive is a mechanism for radios to report events without a specific call for information.

Note: Passing a ’?’ (query) as the first argument instead of a Transceive token will return a space separated list of radio backend supported Transceive mode tokens. Use this to determine the supported Transceive modes of a given radio backend.

a, get_trn

Get 'Transceive' mode.

Transceive mode (reporting event) as in set_trn above.

*, reset 'Reset'

Perform rig 'Reset'.

Reset is a value: ’0’ = None, ’1’ = Software reset, ’2’ = VFO reset, ’4’ = Memory Clear reset, ’8’ = Master reset.

Since these values are defined as a bitmask in include/hamlib/rig.h, it should be possible to AND these values together to do multiple resets at once, if the backend supports it or supports a reset action via rig control at all.

0x87, set_powerstat 'Power Status'

Set 'Power Status'.

Power Status is a value: ’0’ = Power Off, ’1’ = Power On, ’2’ = Power Standby.

0x88, get_powerstat

Get 'Power Status' as in set_powerstat above.

0x89, send_dtmf 'Digits'

Set DTMF 'Digits'.

0x8a, recv_dtmf

Get DTMF 'Digits'.

_, get_info

Get misc information about the rig.

0xf5, get_rig_info

Get misc information about the rig vfos and other info.

0xf3, get_vfo_info 'VFO'

Get misc information about a specific vfo.

dump_state

Return certain state information about the radio backend.

1, dump_caps

Not a real rig remote command, it just dumps capabilities, i.e. what the backend knows about this model, and what it can do.

TODO: Ensure this is in a consistent format so it can be read into a hash, dictionary, etc. Bug reports requested.

Note: This command will produce many lines of output so be very careful if using a fixed length array! For example, running this command against the Dummy backend results in over 5kB of text output.

VFO parameter not used in ’VFO mode’.

2, power2mW 'Power [0.0..1.0]' 'Frequency' 'Mode'

Returns 'Power mW'.

Converts a Power value in a range of 0.0...1.0 to the real transmit power in milli-Watts (integer).

'Frequency' and 'Mode' also need to be provided as output power may vary according to these values.

VFO parameter is not used in VFO mode.

4, mW2power 'Power mW' 'Frequency' 'Mode'

Returns 'Power [0.0..1.0]'.

Converts the real transmit power in milli-Watts (integer) to a Power value in a range of 0.0 ... 1.0.

'Frequency' and 'Mode' also need to be provided as output power may vary according to these values.

VFO parameter is not used in VFO mode.

set_clock 'DateTime'

Set 'DateTime'

Sets rig clock -- note that some rigs do not handle seconds or milliseconds. If you try to set that you will get a debug warning message. Format is ISO8601.
Formats accepted
YYYY-MM-DDTHH:MM:SS.sss+ZZ (where +ZZ is either -/+ UTC offset)
YYYY-MM-DDTHH:MM:SS+ZZ
YYYY-MM-DDTHH:MM+ZZ
YYYY-MM-DD (sets date only)

get_clock

Get 'RigTime'

Gets rig clock -- note that some rigs do not handle seconds or milliseconds. Format is ISO8601 YYYY-MM-DDTHH:MM:SS.sss+ZZ where +ZZ is either -/+ UTC offset

chk_vfo

Returns “1\n” (single line only) if rigctld was invoked with the -o/--vfo option and “0\n” if not.

When in VFO mode the client will need to pass 'VFO' as the first parameter to set or get commands. VFO is one of the strings defined in set_vfo above.

set_vfo_opt 'Status'

Set 'Status'

Set vfo option Status 1=on or 0=off This is the same as using the -o switch for rigctl and ritctld. This can be dyamically changed while running.

PROTOCOL

There are two protocols in use by rigctld, the Default Protocol and the Extended Response Protocol.

The Default Protocol is intended primarily for the communication between Hamlib library functions and rigctld (“NET rigctl”, available using radio model ’2’).

The Extended Response Protocol is intended to be used with scripts or other programs interacting directly with rigctld as consistent feedback is provided.

Default Protocol
The Default Protocol is intentionally simple. Commands are entered on a single line with any needed values. In practice, reliable results are obtained by terminating each command string with a newline character, ’\n’.

Example set frequency and mode commands (Perl code (typed text shown in bold)):

print $socket "F 14250000\n";
print $socket "\\set_mode LSB 2400\n";
# escape leading ’\’

A one line response will be sent as a reply to set commands, “RPRT x\n” where x is the Hamlib error code with ’0’ indicating success of the command.

Responses from rigctld get commands are text values and match the same tokens used in the set commands. Each value is returned on its own line. On error the string “RPRT x\n” is returned where x is the Hamlib error code.

Example get frequency (Perl code):

print $socket "f\n";
"14250000\n"

Most get functions return one to three values. A notable exception is the dump_caps command which returns many lines of key:value pairs.

This protocol is primarily used by the “NET rigctl” (rigctl model 2) backend which allows applications already written for Hamlib’s C API to take advantage of rigctld without the need of rewriting application code. An application’s user can select rotator model 2 (“NET rigctl”) and then set rig_pathname to “localhost:4532” or other network host:port (set by the -T/-t options, respectively, above).

Extended Response Protocol
The Extended Response protocol adds several rules to the strings returned by rigctld and adds a rule for the command syntax.

1. The command received by rigctld is echoed with its long command name followed by the value(s) (if any) received from the client terminated by the specified response separator as the first record of the response.

2. The last record of each block is the string “RPRT x\n” where x is the numeric return value of the Hamlib backend function that was called by the command.

3. Any records consisting of data values returned by the radio backend are prepended by a string immediately followed by a colon then a space and then the value terminated by the response separator. e.g. “Frequency: 14250000\n” when the command was prepended by ’+’.

4. All commands received will be acknowledged by rigctld
with records from rules 1 and 2. Records from rule 3 are only returned when data values must be returned to the client.

An example response to a set_mode command sent from the shell prompt (note the prepended ’+’):

$ echo "+M USB 2400" | nc -w 1 localhost 4532
set_mode: USB 2400
RPRT 0

In this case the long command name and values are returned on the first line and the second line contains the end of block marker and the numeric radio backend return value indicating success.

An example response to a get_mode query:

$ echo "+\get_mode" | nc -w 1 localhost 4532
get_mode:
Mode: USB
Passband: 2400
RPRT 0

Note: The ’\’ is still required for the long command name even with the ERP character.

In this case, as no value is passed to rigctld, the first line consists only of the long command name. The final line shows that the command was processed successfully by the radio backend.

Invoking the Extended Response Protocol requires prepending a command with a punctuation character. As shown in the examples above, prepending a ’+’ character to the command results in the responses being separated by a newline character (’\n’). Any other punctuation character recognized by the C ispunct() function except ’\’, ’?’, or ’_’ will cause that character to become the response separator and the entire response will be on one line.

Separator character summary:

+

Each record of the response is appended with a newline (’\n’).

;’, ’|’, or, ’,

Each record of the response is appended by the given character resulting in entire response on one line.

These are common record separators for text representations of spreadsheet data, etc.

?

Reserved for help in rigctl.

_

Reserved for get_info short command

#

Reserved for comments when reading a command file script.

Note: Other punctuation characters have not been tested! Use at your own risk.

For example, invoking a get_mode query with a leading ’;’ returns:

get_mode:;Mode: USB;Passband: 2400;RPRT 0

Or, using the pipe character ’|’ returns:

get_mode:|Mode: USB|Passband: 2400|RPRT 0

And a set_mode command prepended with a ’|’ returns:

set_mode: USB 2400|RPRT 0

Such a format will allow reading a response as a single event using a preferred response separator. Other punctuation characters have not been tested!

The following commands have been tested with the Extended Response protocol and the included testctld.pl Perl script:

set_freq, get_freq, set_split_freq, get_split_freq, set_mode, get_mode, set_split_mode, get_split_mode, set_vfo, get_vfo, set_split_vfo, get_split_vfo, set_rit, get_rit, set_xit, get_xit, set_ptt, get_ptt, power2mW, mW2power, dump_caps.

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio which is very useful for radio backend library development and may be requested by the developers.

EXAMPLES

Start rigctld for a Yaesu FT-920 using a USB-to-serial adapter and backgrounding:

$ rigctld -m 1014 -r /dev/ttyUSB1 &

Start rigctld for a Yaesu FT-920 using a USB-to-serial adapter while setting baud rate and stop bits, and backgrounding:

$ rigctld -m 1014 -r /dev/ttyUSB1 -s 4800 -C stop_bits=2 &

Start rigctld for an Elecraft K3 using COM2 on MS Windows:

$ rigctld -m 2029 -r COM2

Connect to the already running rigctld and set the frequency to 14.266 MHz with a 1 second read timeout using the default protocol from the shell prompt:

$ echo "\set_freq 14266000" | nc -w 1 localhost 4532P

Connect to a running rigctld with rigctl on the local host:

$ rigctl -m2

SECURITY

No authentication whatsoever; DO NOT leave this TCP port open wide to the Internet. Please ask if stronger security is needed or consider using a Secure Shell (ssh(1)) tunnel.

As rigctld does not need any greater permissions than rigctl, it is advisable to not start rigctld as “root” or another system user account in order to limit any vulnerability.

BUGS

The daemon is not detaching and backgrounding itself.

No method to exit the daemon so the kill(1) command must be used to terminate it.

Multiple clients using the daemon may experience contention with the connected radio.

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2000-2010 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various contributors)
Copyright © 2011-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

kill(1), rigctl(1), ssh(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/rigmem.1.html ================================================ RIGMEM

RIGMEM

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
DIAGNOSTICS
EXIT STATUS
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

rigmem - backup and restore memory of radio transceivers and receivers

SYNOPSIS

rigmem

[-ahvVx] [-m id] [-r device] [-s baud] [-c id] [-C parm=val] [-p sep] command [file]

DESCRIPTION

Backup and restore memory of radio transceivers and receivers. rigmem accepts commands from the command line only.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete radio support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select radio model number.

See model list (use “rigctl -l”).

-r, --rig-file=device

Use device as the file name of the port connected to the radio.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-s, --serial-speed=baud

Set radio serial speed to baud rate.

Uses maximum serial speed from radio backend capabilities as the default.

-c, --civaddr=id

Use id as the CI-V address to communicate with the radio.

Only useful for Icom and some Ten-Tec radios.

Note: The id is in decimal notation, unless prefixed by 0x, in which case it is hexadecimal.

-C, --set-conf=parm=val[,parm=val]

Set radio configuration parameter(s), e.g. stop_bits=2.

Use the -L option of rigctl for a list of configuration parameters for a given model number.

-p, --set-separator=sep

Set character as column separator instead of the CSV comma.

Some common alternatives are the vertical bar (pipe), ’|’, semicolon, ’;’, and colon, ’:’.

-a, --all

Bypass mem_caps, apply to all fields of channel_t.

-x, --xml

Use XML format instead of CSV, if libxml2 is available.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of rigmem and exit.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf option.

COMMANDS

Backup and restore are supported for basic CSV file and XML format where available.

Please note that the backend for the radio to be controlled, or the radio itself may not support some commands. In that case, the operation will fail with a Hamlib error message.

Here is a summary of the supported commands:
save
file

Save all the content of memory in a CSV (or XML) file given as an argument to the command.

load file

Load the content into all the memory from a CSV (or XML) file given as an argument to the command.

save_parm file

Save all the parameters of the radio in a CSV (or XML) file given as an argument to the command.

load_parm file

Load the parameters of the radio from a CSV (or XML) file given as an argument to the command.

clear

This is a very DANGEROUS command, as it will completely clear out everything you have programmed in the memory of your radio. ALL DATA WILL BE LOST. Use at your own risk!

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio which is very useful for radio backend library development and may be requested by the developers.

EXIT STATUS

rigmem exits with:

0

if all operations completed normally;

1

if there was an invalid command line option or argument;

2

if an error was returned by Hamlib.

3

the Hamlib backend has no memory support implemented and/or the radio has no memory access available.

BUGS

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2003-2011 Stephane Fillod
Copyright © 2007,2019-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

rigctl(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/rigsmtr.1.html ================================================ RIGSMTR

RIGSMTR

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
DIAGNOSTICS
EXIT STATUS
EXAMPLE
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

rigsmtr - measure S-Meter vs azimuth using Hamlib

SYNOPSIS

rigsmtr

[-hvV] [-m id] [-r device] [-s baud] [-c id] [-C parm=val] [-M id] [-R device] [-S baud] [-N parm=val] [time_step]

DESCRIPTION

rigsmtr uses Hamlib to control a radio to measure S-Meter value versus antenna azimuth.

It rotates the antenna from minimum azimuth to maximum azimuth. Every second, or time_step if specified in seconds, it retrieves the signal strength. Azimuth in degrees and the corresponding S-Meter level in dB relative to S9 are then printed on stdout.

To work correctly, rigsmtr needs a radio that could measure S-Meter and a Hamlib backend that is able to retrieve it, connected to a Hamlib supported rotator.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete radio support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options.
-m
, --model=id

Select radio model number.

See model list (use “rigctl -l”).

-r, --rig-file=device

Use device as the file name of the port connected to the radio.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-s, --serial-speed=baud

Set radio serial speed to baud rate.

Uses maximum serial speed from radio backend capabilities as the default.

-c, --civaddr=id

Use id as the CI-V address to communicate with the radio.

Only useful for Icom and some Ten-Tec radios.

Note: The id is in decimal notation, unless prefixed by 0x, in which case it is hexadecimal.

-C, --set-conf=parm=val[,parm=val]

Set radio configuration parameter(s), e.g. stop_bits=2.

Use the -L option of rigctl for a list of configuration parameters for a given model number.

-M, --rot-model=id

Select rotator model number.

See model list (use “rotctl -l”).

-R, --rot-file=device

Use device as the file name of the port connected to the rotator.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-S, --rot-serial-speed=baud

Set rotator serial speed to baud rate.

Uses maximum serial speed from rotator backend capabilities as the default.

-N, --rot-set-conf=parm=val[,parm=val]

Set rotator configuration parameter(s), e.g. stop_bits=2.

Use the -L option of rotctl for a list of configuration parameters for a given model number.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of rigsmtr and exit.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf and --rot-set-conf options.

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio which is very useful for radio backend library development and may be requested by the developers.

EXIT STATUS

rigsmtr exits with:

0

if all operations completed normally;

1

if there was an invalid command line option or argument;

2

if an error was returned by Hamlib;

3

if the radio doesn’t have the required capabilities.

EXAMPLE

Collect S-Meter readings on a TS-850 while an EasycommII rotator makes a full 360° rotation and record measurements in the file csmtr (typed text shown in bold):

$ rigsmtr -m 2009 -r /dev/ttyS1 -M 202 > csmtr

After completion the file csmtr contains lines such as:

0 -47
30 -40
60 -22
90 -3
120 10
150 1
180 -11
210 -24
240 -35
270 -42
300 -48
330 -51
360 -49

The results can be plotted with gnuplot(1):

$ gnuplot
set angles degrees
set polar
set grid polar 15.
unset border
unset param
set style data line
set rrange [-60:60]
set xrange [-60:60]
set yrange [-60:60]
plot csmtr

BUGS

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2007-2009 Stephane Fillod
Copyright © 2018-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

gnuplot(1), rigctl(1), rotctl(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/rigswr.1.html ================================================ RIGSWR

RIGSWR

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
DIAGNOSTICS
EXIT STATUS
EXAMPLE
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

rigswr - measure VSWR vs frequency.

SYNOPSIS

rigswr

[-hvV] [-m id] [-r device] [-s baud] [-c id] [-C parm=val] [-p device] [-P type] start_freq stop_freq [freq_step]

DESCRIPTION

rigswr uses Hamlib to control a radio to measure VSWR (Voltage Standing Wave Ratio) over a frequency range.

It scans frequencies from start_freq to stop_freq with an optional increment of freq_step (default step is 100 kHz). All values must be entered as an integer in Hertz (cycles per second).

Note: rigswr assumes that start_freq is less than or equal to stop_freq. If it is greater, rigswr will exit without doing anything.

For each frequency, it transmits at 25% of total POWER during 0.5 second in CW mode and reads VSWR.

Frequency and the corresponding VSWR are then printed on stdout.

To work correctly, rigswr needs a radio that can measure VSWR and a Hamlib backend that supports reading VSWR from the radio.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete radio support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select radio model number.

See model list (use “rigctl -l”).

-r, --rig-file=device

Use device as the file name of the port connected to the radio.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-s, --serial-speed=baud

Set radio serial speed to baud rate.

Uses maximum serial speed from radio backend capabilities as the default.

-c, --civaddr=id

Use id as the CI-V address to communicate with the radio.

Only useful for Icom and some Ten-Tec radios.

Note: The id is in decimal notation, unless prefixed by 0x, in which case it is hexadecimal.

-C, --set-conf=parm=val[,parm=val]

Set radio configuration parameter(s), e.g. stop_bits=2.

Use the -L option of rigctl for a list of configuration parameters for a given model number.

-p, --ptt-file=device

Use device as the file name of the Push-To-Talk port using a device file as with the -r option above.

This is only needed if the radio doesn’t have CAT PTT control and requires a separate device port to key the transmitter.

-P, --ptt-type=type

Use type of Push-To-Talk device.

Supported types are RIG (CAT), DTR, RTS, PARALLEL, NONE.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of rigswr and exit.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf option.

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio which is very useful for radio backend library development and may be requested by the developers.

EXIT STATUS

rigswr exits with:

0

if all operations completed normally;

1

if there was an invalid command line option or argument;

2

if an error was returned by Hamlib;

3

if the rig doesn’t have the required capabilities.

EXAMPLE

Scans frequencies between 14.000 MHz and 14.200 MHz with 50 kHz step on a TS-850 and records VSWR measurements in file cswr (typed text shown in bold):

$ rigswr -m 2009 -r /dev/ttyS1 14000000 14200000 50000 > cswr

After completion, cswr contains the following lines:

14000000 1.50
14050000 1.31
14100000 1.22
14150000 1.07
14200000 1.07

The result can be plotted with gnuplot(1):

$ gnuplot
set data style linespoints
set grid
plot cswr

BUGS

Depending on keyer/QSK setup, transmissions in CW mode may not be modulated thus possibly giving a wrong result. Please report this situation if it happens.

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2004 Thierry Leconte
Copyright © 2004-2011 Stephane Fillod
Copyright © 2007,2018-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

gnuplot(1), rigctl(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/rotctl.1.html ================================================ ROTCTL

ROTCTL

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
READLINE
DIAGNOSTICS
EXIT STATUS
EXAMPLES
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

rotctl - control antenna rotators

SYNOPSIS

rotctl

[-hiIlLuV] [-m id] [-r device] [-R device2] [-s baud] [-t char] [-C parm=val] [-v[-Z]] [command|-]

DESCRIPTION

Control antenna rotators.

rotctl accepts commands from the command line as well as in interactive mode if none are provided on the command line.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete rotator support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select rotator model number.

See model list (use “rotctl -l”).

Note: rotctl (or third party software using the C API) will use rotator model 2 for NET rotctl (communicating with rotctld).

-r, --rot-file=device

Use device as the file name of the port connected to the rotator.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-R, --rot-file2=device

Use device as the file name of the port connected to the 2nd rotator. e.g. 2nd rotator used for elevation.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-s, --serial-speed=baud

Set serial speed to baud rate.

Uses maximum serial speed from rotator backend capabilities as the default.

-t, --send-cmd-term=char

Change the termination char for text protocol when using the send_cmd command.

The default value is ASCII CR (’0x0D’). ASCII non-printing characters can be given as the ASCII number in hexadecimal format prepended with “0x”. You may pass an empty string for no termination char. The string “-1” tells rotctl to switch to binary protocol. See the send_cmd command for further explanation.

Note: The semicolon (’;’) is a common terminator for rotators that accept ASCII character strings.

-L, --show-conf

List all configuration parameters for the rotator defined with -m above.

-C, --set-conf=parm=val[,parm=val]

Set rotator configuration parameter(s), e.g. stop_bits=2.

Use the -L option above for a list of configuration parameters for a given model number.

-u, --dump-caps

Dump capabilities for the rotator defined with -m above and exit.

-l, --list

List all rotator model numbers defined in Hamlib and exit.

The list is sorted by model number.

Note: In Linux the list can be scrolled back using Shift-PageUp/Shift-PageDown, or using the scrollbars of a virtual terminal in X or the cmd window in Windows. The output can be piped to more(1) or less(1), e.g. “rotctl -l | more”.

-i, --read-history

Read previously saved command and argument history from a file (default $HOME/.rotctl_history) for the current session.

Available when rotctl is built with Readline support (see READLINE below).

Note: To read a history file stored in another directory, set the ROTCTL_HIST_DIR environment variable, e.g. “ROTCTL_HIST_DIR=$HOME/tmp rotctl -i”. When ROTCTL_HIST_DIR is not set, the value of HOME is used.

-I, --save-history

Write current session (and any previous session(s), if -i option is also given) command and argument history to a file (default $HOME/.rotctl_history) at the end of the current session.

Complete commands with arguments are saved as a single line to be recalled and used or edited. Available when rotctl is built with Readline support (see READLINE below).

Note: To write a history file in another directory, set the ROTCTL_HIST_DIR environment variable, e.g. “ROTCTL_HIST_DIR=$HOME/tmp rotctl -I”. When ROTCTL_HIST_DIR is not set, the value of HOME is used.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-Z, --debug-time-stamps

Enable time stamps for the debug messages.

Use only in combination with the -v option as it generates no output on its own.

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of rotctl and exit.

-

Stop option processing and read commands from standard input.

See Standard Input below.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf and --show-conf options.

Be aware that the backend for the rotator to be controlled, or the rotator itself may not support some commands. In that case, the operation will fail with a Hamlib error code.

COMMANDS

Commands can be entered either as a single char, or as a long command name. The commands are not prefixed with a dash as the options are. They may be typed in when in interactive mode or provided as argument(s) in command line interface mode. In interactive mode commands and their arguments may be entered on a single line (typed text shown in bold):

P 123 45

Since most of the Hamlib operations have a set and a get method, an upper case letter will often be used for a set method whereas the corresponding lower case letter refers to the get method. Each operation also has a long name; in interactive mode, prepend a backslash, ’\’, to enter a long command name.

Example: Use “\get_info” in interactive mode to see the rotator’s information.

Note: The backend for the rotator to be controlled, or the rotator itself may not support some commands. In that case, the operation will fail with a Hamlib error message.

Standard Input
As an alternative to the READLINE interactive command entry or a single command for each run, rotctl features a special option where a single dash (’-’) may be used to read commands from standard input (stdin). Commands must be separated by whitespace similar to the commands given on the command line. Comments may be added using the ’#’ character, all text up until the end of the current line including the ’#’ character is ignored.

A simple example:

$ cat <<.EOF. >cmds.txt
> # File of commands

> set_pos 180.0 10.0

# rotate

> pause 30 # wait for action to complete
> get_pos # query rotator
>.EOF.

$ rotctl -m 1 - <cmds.txt

set_pos 180.0 10.0
pause 30
get_pos 180.000000
10.000000

$

Rotator Commands
A summary of commands is included below (In the case of set commands the quoted italicized string is replaced by the value in the description. In the case of get commands the quoted italicized string is the key name of the value returned.):
Q
|q, exit rotctl

Exit rotctl in interactive mode.

When rotctl is controlling the rotator directly, will close the rotator backend and port. When rotctl is connected to rotctld (rotator model 2), the TCP/IP connection to rotctld is closed and rotctld remains running, available for another TCP/IP network connection.

P, set_pos 'Azimuth' 'Elevation'

Set position.

'Azimuth' and 'Elevation' are floating point values.

Azimuth can be -180 to 540 depending on the rotator to allow for rotators facing south and the capabilities of the rotator.

Elevation can be -20 to 210 depending on the rotator.

For example:

P 163.0 41.0

Note: If the rotator does not support setting elevation (most do not) supply “0.0” for 'Elevation'.

p, get_pos

Get position.

'Azimuth' and 'Elevation' are returned as double precision floating point values.

M, move 'Direction' 'Speed'

Move the rotator in a specific direction at the given rate.

'Direction' is an integer or keyword defined as ’2’ = UP, ’4’ = DOWN, ’8’ = LEFT or CCW and ’16’ = RIGHT or CW

'Speed' is an integer between 1 and 100. Use -1 for no change to current speed.

Note: Not all backends that implement the move command use the Speed value.

S, stop

Stop the rotator.

K, park

Park the rotator.

C, set_conf 'Token' 'Value'

Set a configuration parameter.

'Token' is a string; see the -C option and the -L output.

'Value' is a string of up to 20 characters.

R, reset 'Reset'

Reset the rotator.

'Reset' accepts an integer value of ’1’ for “Reset All”.

_, get_info

Get miscellaneous information about the rotator.

Returns 'Info' “Model Name” at present.

dump_state

Return certain state information about the rotator backend.

1, dump_caps

Not a real rot remote command, it just dumps capabilities, i.e. what the backend knows about this model, and what it can do.

w, send_cmd 'Cmd'

Send a raw command string to the rotator.

ASCII CR (or --send-cmd-term value, see -t option) is appended automatically at the end of the command for text protocols. For binary protocols, enter hexadecimal values as “\0xAA\0xBB”.

Locator Commands
These commands offer conversions of Degrees Minutes Seconds to other formats, Maidenhead square locator conversions and distance and azimuth conversions.
L
, lonlat2loc 'Longitude' 'Latitude' 'Loc Len'

Returns the Maidenhead 'Locator' for the given 'Longitude' and 'Latitude'.

Floating point values are supplied. The precision of the returned square is controlled by 'Loc Len' which should be an even numbered integer value between 2 and 12.

For example:

L -170.0 -85.0 12

returns:

Locator: AA55AA00AA00

l, loc2lonlat 'Locator'

Returns 'Longitude' and 'Latitude' in decimal degrees at the approximate center of the requested Maidenhead grid square.

'Locator' can be from 2 to 12 characters in length.

West longitude is expressed as a negative value.

South latitude is expressed as a negative value.

For example:

l AA55AA00AA00

returns:

Longitude: -169.999983 Latitude: -84.999991

Note: Despite the use of double precision variables internally, some rounding error occurs.

D, dms2dec 'Degrees' 'Minutes' 'Seconds' 'S/W'

Returns 'Dec Degrees', a signed floating point value.

'Degrees' and 'Minutes' are integer values.

'Seconds' is a floating point value.

'S/W' is a flag with ’1’ indicating South latitude or West longitude and ’0’ North or East (the flag is needed as computers don’t recognize a signed zero even though only the 'Degrees' value is typically signed in DMS notation).

d, dec2dms 'Dec Degrees'

Returns 'Degrees' 'Minutes' 'Seconds' 'S/W'.

Values are as in dms2dec above.

E, dmmm2dec 'Degrees' 'Dec Minutes' 'S/W'

Returns 'Dec Degrees', a signed floating point value.

'Degrees' is an integer value.

'Dec Minutes' is a floating point value.

'S/W' is a flag as in dms2dec above.

e, dec2dmmm 'Dec Deg'

Returns 'Degrees' 'Minutes' 'S/W'.

Values are as in dmmm2dec above.

B, qrb 'Lon 1' 'Lat 1' 'Lon 2' 'Lat 2'

Returns 'Distance' and 'Azimuth'.

'Distance' is in km.

'Azimuth' is in degrees.

Supplied Lon/Lat values are signed floating point numbers.

A, a_sp2a_lp 'Short Path Deg'

Returns 'Long Path Deg'.

Both the supplied argument and returned value are floating point values within the range of 0.00 to 360.00.

Note: Supplying a negative value will return an error message.

a, d_sp2d_lp 'Short Path km'

Returns 'Long Path km'.

Both the supplied argument and returned value are floating point values.

pause 'Seconds'

Pause for the given whole (integer) number of 'Seconds' before sending the next command to the rotator.

READLINE

If Readline library development files are found at configure time, rotctl will be conditonally built with Readline support for command and argument entry. Readline command key bindings are at their defaults as described in the Readline manual. rotctl sets the name “rotctl” which can be used in Conditional Init Constructs in the Readline Init File ($HOME/.inputrc by default) for custom keybindings unique to rotctl.

Command history is available with Readline support as described in the Readline History manual. Command and argument strings are stored as single lines even when arguments are prompted for input individually. Commands and arguments are not validated and are stored as typed with values separated by a single space.

Normally session history is not saved, however, use of either of the -i/--read-history or -I/--save-history options when starting rotctl will cause any previously saved history to be read in and/or the current and any previous session history (assuming the -i and -I options are given together) will be written out when rotctl is closed. Each option is mutually exclusive, i.e. either may be given separately or in combination. This is useful to save a set of commands and then read them later but not write the modified history for a consistent set of test commands in interactive mode, for example.

History is stored in $HOME/.rotctl_history by default although the destination directory may be changed by setting the ROTCTL_HIST_DIR environment variable. When ROTCTL_HIST_DIR is unset, the value of the HOME environment variable is used instead. Only the destination directory may be changed at this time.

If Readline support is not found at configure time the original internal command handler is used. Readline is not used for rotctl commands entered on the command line regardless if Readline support is built in or not.

Note: Readline support is not included in the MS Windows 32 or 64 bit binary builds supplied by the Hamlib Project. Running rotctl on the MS Windows platform in the ’cmd’ shell does give session command line history, however, it is not saved to disk between sessions.

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio which is very useful for radio backend library development and may be requested by the developers.

EXIT STATUS

rotctl exits with:

0

if all operations completed normally;

1

if there was an invalid command line option or argument;

2

if an error was returned by Hamlib.

EXAMPLES

Start rotctl for RotorEZ using the first serial port on Linux:

$ rotctl -m 401 -r /dev/ttyS0

Start rotctl for RotorEZ using COM2 on MS Windows:

> rotctl -m 401 -r COM2

Connect to a running rotctld with rotator model 2 (“NET rotctl”) on the local host and specifying the TCP port, and querying the position:

$ rotctl -m 2 -r localhost:4533 t_pos

BUGS

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2001-2011 Stephane Fillod
Copyright © 2002-2017 the Hamlib Group (various contributors)
Copyright © 2003-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

less(1), more(1), rotctld(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/doc/rotctld.1.html ================================================ ROTCTLD

ROTCTLD

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
PROTOCOL
DIAGNOSTICS
EXAMPLES
SECURITY
BUGS
COPYING
SEE ALSO
COLOPHON

NAME

rotctld - TCP rotator control daemon

SYNOPSIS

rotctld

[-hlLuV] [-m id] [-r device] [-s baud] [-T IPADDR] [-t number] [-C parm=val] [-v[-Z]]

DESCRIPTION

The rotctld program is a rotator control daemon that handles client requests via TCP sockets. This allows multiple user programs to share one rotator (this needs more development). Multiple rotators can be controlled on different TCP ports by use of multiple rotctld processes. The syntax of the commands are the same as rotctl(1). It is hoped that rotctld will be especially useful for client authors using languages such as Perl, Python, PHP, and others.

rotctld communicates to a client through a TCP socket using text commands shared with rotctl. The protocol is simple, commands are sent to rotctld on one line and rotctld responds to “get” commands with the requested values, one per line, when successful, otherwise, it responds with one line “RPRT x”, where ’x’ is a negative number indicating the error code. Commands that do not return values respond with the line “RPRT x”, where ’x’ is ’0’ when successful, otherwise is a regative number indicating the error code. Each line is terminated with a newline ’\n’ character. This protocol is primarily for use by the NET rotctl (rotator model 2) backend.

A separate Extended Response Protocol extends the above behavior by echoing the received command string as a header, any returned values as a key: value pair, and the “RPRT x” string as the end of response marker which includes the Hamlib success or failure value. See the PROTOCOL section for details. Consider using this protocol for clients that will interact with rotctld directly through a TCP socket.

Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete rotator support, the basic functions are usually well supported.

Please report bugs and provide feedback at the e-mail address given in the BUGS section below. Patches and code enhancements sent to the same address are welcome.

OPTIONS

This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be separated by a space. Long options starting with two dashes (’-’) require an ’=’ between the option and any argument.

Here is a summary of the supported options:
-m
, --model=id

Select rotator model number.

See model list (use “rotctld -l”).

Note: rotctl (or third party software using the C API) will use rotator model 2 for NET rotctl (this model number is not used for rotctld even though it shows in the model list).

-r, --rot-file=device

Use device as the file name of the port connected to the rotator.

Often a serial port, but could be a USB to serial adapter. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system’s documentation.

-s, --serial-speed=baud

Set serial speed to baud rate.

Uses maximum serial speed from rotator backend capabilities as the default.

-T, --listen-addr=IPADDR

Use IPADDR as the listening IP address.

The default is ANY.

-t, --port=number

Use number as the TCP listening port.

The default is 4533.

Note: As rigctld's default port is 4532, it is advisable to use odd numbered ports for rotctld, e.g. 4533, 4535, 4537, etc.

-L, --show-conf

List all configuration parameters for the rotator defined with -m above.

-C, --set-conf=parm=val[,parm=val]

Set rotator configuration parameter(s), e.g. stop_bits=2.

Use the -L option above for a list of configuration parameters for a given model number.

-u, --dump-state

Dump state for the rotator defined with -m above and exit.

-u, --dump-caps

Dump capabilities for the rotator defined with -m above and exit.

-l, --list

List all rotator model numbers defined in Hamlib and exit.

The list is sorted by model number.

Note: In Linux the list can be scrolled back using Shift-PageUp/Shift-PageDown, or using the scrollbars of a virtual terminal in X or the cmd window in Windows. The output can be piped to more(1) or less(1), e.g. “rotctl -l | more”.

-v, --verbose

Set verbose mode, cumulative (see DIAGNOSTICS below).

-Z, --debug-time-stamps

Enable time stamps for the debug messages.

Use only in combination with the -v option as it generates no output on its own.

-h, --help

Show a summary of these options and exit.

-V, --version

Show version of rotctld and exit.

Note: Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the --set-conf and --show-conf options.

Be aware that the backend for the rotator to be controlled, or the rotator itself may not support some commands. In that case, the operation will fail with a Hamlib error code.

COMMANDS

Commands can be sent over the TCP socket either as a single char, or as a long command name plus the value(s) space separated on one ’\n’ terminated line. See PROTOCOL.

Since most of the Hamlib operations have a set and a get method, an upper case letter will be used for set methods whereas the corresponding lower case letter refers to the get method. Each operation also has a long name; prepend a backslash, ’\’, to send a long command name.

Example (Perl): “print $socket "\\dump_caps\n";” to see what the rotator’s backend can do (Note: In Perl and many other languages a ’\’ will need to be escaped with a preceding ’\’ so that even though two backslash characters appear in the code, only one will be passed to rotctld. This is a possible bug, beware!).

Note: The backend for the rotator to be controlled, or the rotator itself may not support some commands. In that case, the operation will fail with a Hamlib error message.

Here is a summary of the supported commands (In the case of set commands the quoted italicized string is replaced by the value in the description. In the case of get commands the quoted italicized string is the key name of the value returned.):
P
, set_pos 'Azimuth' 'Elevation'

Set position.

'Azimuth' and 'Elevation' are floating point values.

For example (typed text shown in bold):

P 163.0 41.0

Note: If the rotator does not support setting elevation (most do not) supply “0.0” for 'Elevation'.

p, get_pos

Get position.

'Azimuth' and 'Elevation' are returned as double precision floating point values.

M, move 'Direction' 'Speed'

Move the rotator in a specific direction at the given rate.

'Direction' is an integer defined as ’2’ = Up, ’4’ = Down, ’8’ = Left, and ’16’ = Right.

'Speed' is an integer between 1 and 100. Use -1 for no change to current speed.

Note: Not all backends that implement the move command use the Speed value.

S, stop

Stop the rotator.

K, park

Park the rotator.

C, set_conf 'Token' 'Value'

Set a configuration parameter.

'Token' is a string; see the -C option and the -L output.

'Value' is a string of up to 20 characters.

R, reset 'Reset'

Reset the rotator.

'Reset' accepts an integer value of ’1’ for “Reset All”.

_, get_info

Get misc information about the rotator.

Returns 'Info' “Model Name”.

dump_state

Return certain state information about the rotator backend.

1, dump_caps

Not a real rot remote command, it just dumps capabilities, i.e. what the backend knows about this model, and what it can do.

w, send_cmd 'Cmd'

Send a raw command string to the rotator.

ASCII CR is appended automatically at the end of the command for text protocols. For binary protocols, enter hexadecimal values as “\0xAA\0xBB”.

Locator Commands
These commands offer conversions of Degrees Minutes Seconds to other formats, Maidenhead square locator conversions and distance and azimuth conversions.
L
, lonlat2loc 'Longitude' 'Latitude' 'Loc Len'

Returns the Maidenhead 'Locator' for the given 'Longitude' and 'Latitude'.

'Longitude' and 'Latitude' are floating point values.

'Loc Len' is the precision of the returned square and should be an even numbered integer value between 2 and 12.

For example:

L -170.0 -85.0 12

returns:

Locator: AA55AA00AA00

l, loc2lonlat 'Locator'

Returns 'Longitude' and 'Latitude' in decimal degrees at the approximate center of the requested Maidenhead grid square.

'Locator' can be from 2 to 12 characters in length.

West longitude is expressed as a negative value.

South latitude is expressed as a negative value.

For example:

l AA55AA00AA00

returns:

Longitude: -169.999983 Latitude: -84.999991

Note: Despite the use of double precision variables internally, some rounding error occurs.

D, dms2dec 'Degrees' 'Minutes' 'Seconds' 'S/W'

Returns 'Dec Degrees', a signed floating point value.

'Degrees' and 'Minutes' are integer values.

'Seconds' is a floating point value.

'S/W' is a flag with ’1’ indicating South latitude or West longitude and ’0’ North or East (the flag is needed as computers don’t recognize a signed zero even though only the 'Degrees' value is typically signed in DMS notation).

d, dec2dms 'Dec Degrees'

Returns 'Degrees' 'Minutes' 'Seconds' 'S/W'.

Values are as in dms2dec above.

E, dmmm2dec 'Degrees' 'Dec Minutes' 'S/W'

Returns 'Dec Degrees', a signed floating point value.

'Degrees' is an integer value.

'Dec Minutes' is a floating point value.

'S/W' is a flag as in dms2dec above.

e, dec2dmmm 'Dec Deg'

Returns 'Degrees' 'Minutes' 'S/W'.

Values are as in dmmm2dec above.

B, qrb 'Lon 1' 'Lat 1' 'Lon 2' 'Lat 2'

Returns 'Distance' and 'Azimuth'.

'Distance' is in km.

'Azimuth' is in degrees.

Supplied Lon/Lat values are signed floating point numbers.

A, a_sp2a_lp 'Short Path Deg'

Returns 'Long Path Deg'.

Both the supplied argument and returned value are floating point values within the range of 0.00 to 360.00.

Note: Supplying a negative value will return an error message.

a, d_sp2d_lp 'Short Path km'

Returns 'Long Path km'.

Both the supplied argument and returned value are floating point values.

pause 'Seconds'

Pause for the given whole (integer) number of 'Seconds' before sending the next command to the rotator.

PROTOCOL

There are two protocols in use by rotctld, the Default Protocol and the Extended Response Protocol.

The Default Protocol is intended primarily for the communication between Hamlib library functions and rotctld (“NET rotctl”, available using rotator model ’2’).

The Extended Response Protocol is intended to be used with scripts or other programs interacting directly with rotctld as consistent feedback is provided.

Default Protocol
The Default Protocol is intentionally simple. Commands are entered on a single line with any needed values. In practice, reliable results are obtained by terminating each command string with a newline character, ’\n’.

Example set position (Perl code):

print $socket "P 135 10\n";

or:

print $socket "\\set_pos 135 10\n"; # escape leading ’\’

A one line response will be sent as a reply to set commands, “RPRT x\n” where x is the Hamlib error code with ’0’ indicating success of the command.

Responses from rotctld get commands are text values and match the same tokens used in the set commands. Each value is returned on its own line. On error the string “RPRT x\n” is returned where x is the Hamlib error code.

Example get position (Perl code):

print $socket "p\n";
"135"
"10"

Most get functions return one to three values. A notable exception is the dump_caps command which returns many lines of key:value pairs.

This protocol is primarily used by the “NET rotctl” (rotctl model 2) backend which allows applications already written for Hamlib’s C API to take advantage of rotctld without the need of rewriting application code. An application’s user can select rotator model 2 (“NET rotctl”) and then set rot_pathname to “localhost:4533” or other network host:port (set by the -T/-t options, respectively, above).

Extended Response Protocol
The Extended Response protocol adds several rules to the strings returned by rotctld and adds a rule for the command syntax.

1. The command received by rotctld is echoed with its long command name followed by the value(s) (if any) received from the client terminated by the specified response separator as the first record of the response.

2. The last record of each block is the string “RPRT x\n” where x is the numeric return value of the Hamlib backend function that was called by the command.

3. Any records consisting of data values returned by the rotator backend are prepended by a string immediately followed by a colon then a space and then the value terminated by the response separator, e.g. “Azimuth: 90.000000\n” when the command was prepended by ’+’.

4. All commands received will be acknowledged by rotctld with records from rules 1 and 2. Records from rule 3 are only returned when data values must be returned to the client.

An example response to a P command sent from the shell prompt (note the prepended ’+’):

$ echo "+P 90 45" | nc -w 1 localhost 4533
set_pos: 90 45
RPRT 0

In this case the long command name and values are returned on the first line and the second line contains the end of block marker and the numeric rotor backend return value indicating success.

An example response to a get_pos query:

$ echo "+\get_pos" | nc -w 1 localhost 4533
get_pos:
Azimuth: 90.000000
Elevation: 45.000000
RPRT 0

Note: The ’\’ is still required for the long command name even with the ERP character.

In this case, as no value is passed to rotctld, the first line consists only of the long command name. The final line shows that the command was processed successfully by the rotor backend.

Invoking the Extended Response Protocol requires prepending a command with a punctuation character. As shown in the examples above, prepending a ’+’ character to the command results in the responses being separated by a newline character (’\n’). Any other punctuation character recognized by the C ispunct() function except ’\’, ’?’, or ’_’ will cause that character to become the response separator and the entire response will be on one line.

Separator character summary:

+

Each record of the response is appended with a newline (’\n’).

;’, ’|’, or, ’,

Each record of the response is appended by the given character resulting in entire response on one line.

These are common record separators for text representations of spreadsheet data, etc.

?

Reserved for help in rotctl.

_

Reserved for get_info short command

#

Reserved for comments when reading a command file script.

Note: Other punctuation characters have not been tested! Use at your own risk.

For example, invoking a get_pos query with a leading ’;’ returns:

get_pos:;Azimuth: 90.000000;Elevation: 45.000000;RPRT 0

Or, using the pipe character ’|’ returns:

get_pos:|Azimuth: 90.000000|Elevation: 45.000000|RPRT 0

And a set_pos command prepended with a ’|’ returns:

set_pos: 135 22.5|RPRT 0

Such a format will allow reading a response as a single event using a preferred response separator. Other punctuation characters have not been tested!

All commands with the exception of set_conf have been tested with the Extended Response protocol and the included testrotctld.pl Perl script.

DIAGNOSTICS

The -v, --verbose option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio which is very useful for radio backend library development and may be requested by the developers.

EXAMPLES

Start rotctld for a Hy-Gain Ham IV rotor with the Idiom Press RotorEZ board installed using a USB-to-serial adapter and backgrounding:

$ rotctld -m 401 -r /dev/ttyUSB1 &

Start rotctld for RotorEZ using COM2 on Win32:

> rotctl -m 401 -r COM2

Connect to the already running rotctld, and set position to 135.0 degrees azimuth and 30.0 degrees elevation with a 1 second read timeout from the shell prompt:

$ echo "\set_pos 135.0 30.0" | nc -w 1 localhost 4533

Connect to a running rotctld with rotctl on the local host:

$ rotctl -m 2

SECURITY

No authentication whatsoever; DO NOT leave this TCP port open wide to the Internet. Please ask if stronger security is needed or consider using a Secure Shell (ssh(1)) tunnel.

As rotctld does not need any greater permissions than rotctl, it is advisable to not start rotctld as “root” or another system user account in order to limit any vulnerability.

BUGS

The daemon is not detaching and backgrounding itself.

No method to exit the daemon so the kill(1) command must be used to terminate it.

Multiple clients using the daemon may experience contention with the connected rotator.

Report bugs to:

Hamlib Developer mailing list

COPYING

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright © 2000-2009 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various contributors)
Copyright © 2011-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

kill(1), rotctl(1), ssh(1), hamlib(7)

COLOPHON

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org.


================================================ FILE: software/hamlib-w64-4.5~git/include/hamlib/amplifier.h ================================================ /* * Hamlib Interface - Amplifier API header * Copyright (c) 2000-2005 by Stephane Fillod * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef _AMPLIFIER_H #define _AMPLIFIER_H 1 #include #include /** * \addtogroup amplifier * @{ */ /** * \brief Hamlib amplifier data structures. * * \file amplifier.h * * This file contains the data structures and declarations for the Hamlib * amplifier Application Programming Interface (API). * * See the amplifier.c file for details on the amplifier API functions. */ __BEGIN_DECLS /* Forward struct references */ struct amp; struct amp_state; /** * \brief Main amplifier handle type definition. * * \typedef typedef struct amp AMP * * The #AMP handle is returned by amp_init() and is passed as a parameter to * every amplifier specific API call. * * amp_cleanup() must be called when this handle is no longer needed. */ typedef struct amp AMP; /** * \brief Type definition for * SWR (Standing Wave Ratio). * * \typedef typedef float swr_t * * The \a swr_t type is used as a parameter for the amp_get_swr() function. * * The unit of \a swr_t is 1.0 to the maximum value reported by the amplifier's * internal antenna system tuner, i.e. * transmatch, * representing the ratio of 1.0:1 to Maximum:1. */ typedef float swr_t; /** * \brief Type definition for the * transmatch * tuning values of * capacitance * and * inductance. * * \typedef typedef float tune_value_t * * The \a tune_value_t type is used as a parameter for amp_get_level(). * * The unit of \a tune_value_t is * picoFarads (pF) * or * nanoHenrys (nH). */ typedef int tune_value_t; /** * \brief The token in the netampctl protocol for returning an error condition code. */ #define NETAMPCTL_RET "RPRT " //! @cond Doxygen_Suppress typedef enum { AMP_RESET_MEM, // erase tuner memory AMP_RESET_FAULT, // reset any fault AMP_RESET_AMP // for kpa1500 } amp_reset_t; //! @endcond /** * \brief Amplifier type flags */ typedef enum { AMP_FLAG_1 = (1 << 1), /*!< TBD */ AMP_FLAG_2 = (1 << 2) /*!< TBD */ } amp_type_t; //! @cond Doxygen_Suppress // TBD AMP_TYPE #define AMP_TYPE_MASK (AMP_FLAG_1|AMP_FLAG_2) #define AMP_TYPE_OTHER 0 #define AMP_TYPE_1 AMP_FLAG_1 #define AMP_TYPE_2 AMP_FLAG_2 #define AMP_TYPE_ALL (AMP_FLAG_1|AMP_FLAG_2) //! @endcond //! @cond Doxygen_Suppress enum amp_level_e { AMP_LEVEL_NONE = 0, /*!< '' -- No Level. */ AMP_LEVEL_SWR = (1 << 0), /*!< \c SWR 1.0 or greater. */ AMP_LEVEL_NH = (1 << 1), /*!< \c Tune setting in nanohenries. */ AMP_LEVEL_PF = (1 << 2), /*!< \c Tune setting in picofarads. */ AMP_LEVEL_PWR_INPUT = (1 << 3), /*!< \c Power reading from amplifier. */ AMP_LEVEL_PWR_FWD = (1 << 4), /*!< \c Power reading forward. */ AMP_LEVEL_PWR_REFLECTED = (1 << 5), /*!< \c Power reading reverse. */ AMP_LEVEL_PWR_PEAK = (1 << 6), /*!< \c Power reading peak. */ AMP_LEVEL_FAULT = (1 << 7) /*!< \c Fault code. */ }; //! @endcond //! @cond Doxygen_Suppress #define AMP_LEVEL_FLOAT_LIST (AMP_LEVEL_SWR) #define AMP_LEVEL_STRING_LIST (AMP_LEVEL_FAULT) #define AMP_LEVEL_IS_FLOAT(l) ((l)&_LEVEL_FLOAT_LIST) #define AMP_LEVEL_IS_STRING(l) ((l)&_LEVEL_STRING_LIST) //! @endcond /* Basic amp type, can store some useful info about different amplifiers. Each * lib must be able to populate this structure, so we can make useful * enquiries about capabilities. */ //! @cond Doxygen_Suppress #define AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg //! @endcond /** * \brief Amplifier capabilities. * * \struct amp_caps * * The main idea of this struct is that it will be defined by the backend * amplifier driver and will remain read-only for the application. Fields * that need to be modifiable by the application are copied into the * amp_state structure, which is the private memory area of the #AMP instance. * * This way you can have several amplifiers running within the same * application, sharing the amp_caps structure of the backend, while keeping * their own customized data. * * \b Note: Don't move fields around and only add new fields at the end of the * amp_caps structure. Shared libraries and DLLs depend on a constant * structure to maintain compatibility. */ struct amp_caps { amp_model_t amp_model; /*!< Amplifier model as defined in amplist.h. */ const char *model_name; /*!< Model name, e.g. MM-5k. */ const char *mfg_name; /*!< Manufacturer, e.g. Moonbeam. */ const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */ const char *copyright; /*!< Copyright info (should be LGPL). */ enum rig_status_e status; /*!< Driver status. */ int amp_type; /*!< Amplifier type. */ enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */ int serial_rate_min; /*!< Minimal serial speed. */ int serial_rate_max; /*!< Maximal serial speed. */ int serial_data_bits; /*!< Number of data bits. */ int serial_stop_bits; /*!< Number of stop bits. */ enum serial_parity_e serial_parity; /*!< Parity. */ enum serial_handshake_e serial_handshake; /*!< Handshake. */ int write_delay; /*!< Write delay. */ int post_write_delay; /*!< Post-write delay. */ int timeout; /*!< Timeout. */ int retry; /*!< Number of retries if a command fails. */ const struct confparams *cfgparams; /*!< Configuration parameters. */ const rig_ptr_t priv; /*!< Private data. */ const char *amp_model_macro_name; /*!< Model macro name. */ setting_t has_get_level; /*!< List of get levels. */ setting_t has_set_level; /*!< List of set levels. */ gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ /* * Amp Admin API * */ int (*amp_init)(AMP *amp); /*!< Pointer to backend implementation of ::amp_init(). */ int (*amp_cleanup)(AMP *amp); /*!< Pointer to backend implementation of ::amp_cleanup(). */ int (*amp_open)(AMP *amp); /*!< Pointer to backend implementation of ::amp_open(). */ int (*amp_close)(AMP *amp); /*!< Pointer to backend implementation of ::amp_close(). */ int (*set_freq)(AMP *amp, freq_t val); /*!< Pointer to backend implementation of ::amp_set_freq(). */ int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of ::amp_get_freq(). */ int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */ int (*get_conf2)(AMP *amp, token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::amp_get_conf(). */ int (*get_conf)(AMP *amp, token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */ /* * General API commands, from most primitive to least.. :() * List Set/Get functions pairs */ int (*reset)(AMP *amp, amp_reset_t reset); /*!< Pointer to backend implementation of ::amp_reset(). */ int (*get_level)(AMP *amp, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_level(). */ int (*get_ext_level)(AMP *amp, token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */ int (*set_powerstat)(AMP *amp, powerstat_t status); /*!< Pointer to backend implementation of ::amp_set_powerstat(). */ int (*get_powerstat)(AMP *amp, powerstat_t *status); /*!< Pointer to backend implementation of ::amp_get_powerstat(). */ /* get firmware info, etc. */ const char *(*get_info)(AMP *amp); /*!< Pointer to backend implementation of ::amp_get_info(). */ //! @cond Doxygen_Suppress setting_t levels; unsigned ext_levels; //! @endcond const struct confparams *extlevels; /*!< Extension levels list. \sa extamp.c */ const struct confparams *extparms; /*!< Extension parameters list. \sa extamp.c */ const char *macro_name; /*!< Amplifier model macro name. */ }; /** * \brief Amplifier state structure. * * \struct amp_state * * This structure contains live data, as well as a copy of capability fields * that may be updated, i.e. customized while the #AMP handle is instantiated. * * It is fine to move fields around, as this kind of struct should not be * initialized like amp_caps are. */ struct amp_state { /* * overridable fields */ /* * non overridable fields, internal use */ hamlib_port_t_deprecated ampport_deprecated; /*!< Amplifier port (internal use). Deprecated */ int comm_state; /*!< Comm port state, opened/closed. */ rig_ptr_t priv; /*!< Pointer to private amplifier state data. */ rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */ setting_t has_get_level; /*!< List of get levels. */ gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ hamlib_port_t ampport; /*!< Amplifier port (internal use). */ }; /** * \brief Master amplifier structure. * * \struct amp * * Master amplifier data structure acting as the #AMP handle for the * controlled amplifier. A pointer to this structure is returned by the * amp_init() API function and is passed as a parameter to every amplifier * specific API call. * * \sa amp_init(), amp_caps, amp_state */ struct amp { struct amp_caps *caps; /*!< Amplifier caps. */ struct amp_state state; /*!< Amplifier state. */ }; //! @cond Doxygen_Suppress /* --------------- API function prototypes -----------------*/ extern HAMLIB_EXPORT(AMP *) amp_init HAMLIB_PARAMS((amp_model_t amp_model)); extern HAMLIB_EXPORT(int) amp_open HAMLIB_PARAMS((AMP *amp)); extern HAMLIB_EXPORT(int) amp_close HAMLIB_PARAMS((AMP *amp)); extern HAMLIB_EXPORT(int) amp_cleanup HAMLIB_PARAMS((AMP *amp)); extern HAMLIB_EXPORT(int) amp_set_conf HAMLIB_PARAMS((AMP *amp, token_t token, const char *val)); extern HAMLIB_EXPORT(int) amp_get_conf HAMLIB_PARAMS((AMP *amp, token_t token, char *val)); extern HAMLIB_EXPORT(int) amp_set_powerstat HAMLIB_PARAMS((AMP *amp, powerstat_t status)); extern HAMLIB_EXPORT(int) amp_get_powerstat HAMLIB_PARAMS((AMP *amp, powerstat_t *status)); /* * General API commands, from most primitive to least.. ) * List Set/Get functions pairs */ extern HAMLIB_EXPORT(int) amp_get_freq HAMLIB_PARAMS((AMP *amp, freq_t *freq)); extern HAMLIB_EXPORT(int) amp_set_freq HAMLIB_PARAMS((AMP *amp, freq_t freq)); extern HAMLIB_EXPORT(int) amp_reset HAMLIB_PARAMS((AMP *amp, amp_reset_t reset)); extern HAMLIB_EXPORT(const char *) amp_get_info HAMLIB_PARAMS((AMP *amp)); extern HAMLIB_EXPORT(int) amp_get_level HAMLIB_PARAMS((AMP *amp, setting_t level, value_t *val)); extern HAMLIB_EXPORT(int) amp_register HAMLIB_PARAMS((const struct amp_caps *caps)); extern HAMLIB_EXPORT(int) amp_unregister HAMLIB_PARAMS((amp_model_t amp_model)); extern HAMLIB_EXPORT(int) amp_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct amp_caps *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(int) amp_load_backend HAMLIB_PARAMS((const char *be_name)); extern HAMLIB_EXPORT(int) amp_check_backend HAMLIB_PARAMS((amp_model_t amp_model)); extern HAMLIB_EXPORT(int) amp_load_all_backends HAMLIB_PARAMS((void)); extern HAMLIB_EXPORT(amp_model_t) amp_probe_all HAMLIB_PARAMS((hamlib_port_t *p)); extern HAMLIB_EXPORT(int) amp_token_foreach HAMLIB_PARAMS((AMP *amp, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(const struct confparams *) amp_confparam_lookup HAMLIB_PARAMS((AMP *amp, const char *name)); extern HAMLIB_EXPORT(token_t) amp_token_lookup HAMLIB_PARAMS((AMP *amp, const char *name)); extern HAMLIB_EXPORT(const struct amp_caps *) amp_get_caps HAMLIB_PARAMS((amp_model_t amp_model)); extern HAMLIB_EXPORT(setting_t) amp_has_get_level HAMLIB_PARAMS((AMP *amp, setting_t level)); extern HAMLIB_EXPORT(const struct confparams *) amp_ext_lookup HAMLIB_PARAMS((AMP *amp, const char *name)); extern HAMLIB_EXPORT(int) amp_get_ext_level HAMLIB_PARAMS((AMP *amp, token_t token, value_t *val)); extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t); extern HAMLIB_EXPORT(const struct confparams *) rig_ext_lookup HAMLIB_PARAMS((RIG *rig, const char *name)); extern HAMLIB_EXPORT(setting_t) amp_parse_level(const char *s); extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t); //! @endcond /** * \brief Convenience macro for generating debugging messages. * * \def amp_debug * * This is an alias of the rig_debug() function call and is used in the same * manner. */ #define amp_debug rig_debug __END_DECLS #endif /* _AMPLIFIER_H */ /** @} */ ================================================ FILE: software/hamlib-w64-4.5~git/include/hamlib/amplist.h ================================================ /* * Hamlib Interface - list of known amplifiers * Copyright (c) 2000-2011 by Stephane Fillod * Copyright (c) 2000-2002 by Frank Singleton * Copyright (C) 2019 by Michael Black W9MDB. Derived from rotlist.h * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef _AMPLIST_H #define _AMPLIST_H 1 //! @cond Doxygen_Suppress #define AMP_MAKE_MODEL(a,b) ((a)*100+(b)) #define AMP_BACKEND_NUM(a) ((a)/100) //! @endcond /** * \addtogroup amplifier * @{ */ /** * \brief Hamlib amplifier model definitions. * * \file amplist.h * * This file contains amplifier model definitions for the Hamlib amplifier * Application Programming Interface (API). Each distinct amplifier type has * a unique model number (ID) and is used by Hamlib to identify and * distinguish between the different hardware drivers. The exact model * numbers can be acquired using the macros in this file. To obtain a list of * supported amplifier branches, one can use the statically defined * AMP_BACKEND_LIST macro (defined in configure.ac). To obtain a full list of * supported amplifiers (including each model in every branch), the * foreach_opened_amp() API function can be used. * * The model number, or ID, is used to tell Hamlib which amplifier the client * wishes to use which is done with the amp_init() API call. */ /** * \brief A macro that returns the model number for an unknown model. * * \def AMP_MODEL_NONE * * The none backend, as the name suggests, does nothing. It is mainly for * internal use. */ #define AMP_MODEL_NONE 0 /** * \brief A macro that returns the model number for the DUMMY backend. * * \def AMP_MODEL_DUMMY * * The DUMMY backend, as the name suggests, is a backend which performs no * hardware operations and always behaves as one would expect. It can be * thought of as a hardware simulator and is very useful for testing client * applications. */ /** * \brief A macro that returns the model number for the NETAMPCTL backend. * * \def AMP_MODEL_NETAMPCTL * * The NETAMPCTL backend allows use of the `ampctld` daemon through the normal * Hamlib API. */ //! @cond Doxygen_Suppress #define AMP_DUMMY 0 #define AMP_BACKEND_DUMMY "dummy" //! @endcond #define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1) #define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2) /** * \brief A macro that returns the model number of the KPA1500 backend. * * \def AMP_MODEL_ELECRAFT_KPA1500 * * The KPA1500 backend can be used with amplifiers that support the Elecraft * KPA-1500 protocol. */ //! @cond Doxygen_Suppress #define AMP_ELECRAFT 2 #define AMP_BACKEND_ELECRAFT "elecraft" //! @endcond #define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1) //#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2) /** * \brief Convenience type definition for an amplifier model. * * \typedef typedef int amp_model_t */ typedef int amp_model_t; #endif /* _AMPLIST_H */ /** @} */ ================================================ FILE: software/hamlib-w64-4.5~git/include/hamlib/config.h ================================================ /* include/hamlib/config.h. Generated from config.h.in by configure. */ /* include/hamlib/config.h.in. Generated from configure.ac by autoheader. */ /* Frontend ABI age */ #define ABI_AGE 0 /* Frontend ABI revision */ #define ABI_REVISION 5 /* Frontend ABI version */ #define ABI_VERSION 4 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to 1 if using `alloca.c'. */ /* #undef C_ALLOCA */ /* Define to 1 if you have `alloca', as a function or macro. */ #define HAVE_ALLOCA 1 /* Define to 1 if you have and it should be used (not on Ultrix). */ /* #undef HAVE_ALLOCA_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_ARPA_INET_H */ /* Define to 1 if you have the `cfmakeraw' function. */ /* #undef HAVE_CFMAKERAW */ /* define if the compiler supports basic C++11 syntax */ #define HAVE_CXX11 1 /* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you don't. */ #define HAVE_DECL_GAI_STRERROR 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_DEV_PPBUS_PPBCONF_HDEV_PPBUS_PPI_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `floor' function. */ #define HAVE_FLOOR 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_GD_H */ /* Define to 1 if you have the `getaddrinfo' function. */ #define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `getopt' function. */ #define HAVE_GETOPT 1 /* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 /* Define to 1 if you have the `getopt_long' function. */ #define HAVE_GETOPT_LONG 1 /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 /* Define to 1 if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the `glob' function. */ /* #undef HAVE_GLOB */ /* Define to 1 if you have the header file. */ /* #undef HAVE_GLOB_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_HISTORY_H */ /* Define to 1 if you have the `inet_ntoa' function. */ /* #undef HAVE_INET_NTOA */ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `ioctl' function. */ /* #undef HAVE_IOCTL */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LAUXLIB_H */ /* Define if you have an INDI compatible library */ /* #undef HAVE_LIBINDI */ /* Define if you have a nova compatible library */ /* #undef HAVE_LIBNOVA */ /* Define if you have a readline compatible library */ /* #undef HAVE_LIBREADLINE */ /* Define if libusb-1.0 is available */ #define HAVE_LIBUSB 1 /* Define to 1 if you have the header file. */ #define HAVE_LIBUSB_1_0_LIBUSB_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBUSB_H */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_HIDRAW_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_IOCTL_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_PARPORT_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_PPDEV_H */ /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_LUACONF_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LUALIB_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LUA_H */ /* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the `memchr' function. */ #define HAVE_MEMCHR 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the `nanosleep' function. */ #define HAVE_NANOSLEEP 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_NETDB_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETINET_IN_H */ /* Define to 1 if you have the `pow' function. */ #define HAVE_POW 1 /* Define if you have POSIX threads libraries and header files. */ #define HAVE_PTHREAD 1 /* Define to 1 if you have the header file. */ #define HAVE_PTHREAD_H 1 /* Have PTHREAD_PRIO_INHERIT. */ #define HAVE_PTHREAD_PRIO_INHERIT 1 /* If available, contains the Python version number currently in use. */ /* #undef HAVE_PYTHON */ /* Define to 1 if you have the header file. */ /* #undef HAVE_READLINE_H */ /* Define if your readline library has \`add_history' */ /* #undef HAVE_READLINE_HISTORY */ /* Define to 1 if you have the header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Define to 1 if you have the `rint' function. */ #define HAVE_RINT 1 /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the `setitimer' function. */ /* #undef HAVE_SETITIMER */ /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SGTTY_H */ /* Define to 1 if you have the `sigaction' function. */ /* #undef HAVE_SIGACTION */ /* Define to 1 if the system has the type `siginfo_t'. */ /* #undef HAVE_SIGINFO_T */ /* Define to 1 if you have the `signal' function. */ #define HAVE_SIGNAL 1 /* Define to 1 if the system has the type `sig_atomic_t'. */ #define HAVE_SIG_ATOMIC_T 1 /* Define to 1 if you have the `sleep' function. */ #define HAVE_SLEEP 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the `socket' function. */ /* #undef HAVE_SOCKET */ /* Define to 1 if you have the `socketpair' function. */ /* #undef HAVE_SOCKETPAIR */ /* Define to 1 if you have the `sqrt' function. */ #define HAVE_SQRT 1 /* Define to 1 if the system has the type `ssize_t'. */ #define HAVE_SSIZE_T 1 /* Define to 1 if you have Windows Sleep */ #define HAVE_SSLEEP 1 /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 /* Define to 1 if the system has the type `struct addrinfo'. */ #define HAVE_STRUCT_ADDRINFO 1 /* Define to 1 if the system has the type `struct timezone'. */ #define HAVE_STRUCT_TIMEZONE 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_IOCCOM_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_IOCTL_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SELECT_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SOCKET_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_TCL_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TERMIOS_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TERMIO_H */ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `usleep' function. */ #define HAVE_USLEEP 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_VALUES_H */ /* Define to 1 if you have the header file. */ #define HAVE_WINBASE_H 1 /* Define to 1 if you have the header file. */ #define HAVE_WINDOWS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_WINIOCTL_H 1 /* Define if winradio backend is built */ #define HAVE_WINRADIO 1 /* Define to 1 if you have the header file. */ #define HAVE_WS2TCPIP_H 1 /* Define to 1 if you have the header file. */ #define HAVE_WSPIAPI_H 1 /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Compilation on POSIX other than Linux */ /* #undef OTHER_POSIX */ /* Name of package */ #define PACKAGE "hamlib" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "hamlib-developer@lists.sourceforge.net" /* Define to the full name of this package. */ #define PACKAGE_NAME "Hamlib" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "Hamlib 4.5~git" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "hamlib" /* Define to the home page for this package. */ #define PACKAGE_URL "http://www.hamlib.org" /* Define to the version of this package. */ #define PACKAGE_VERSION "4.5~git" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ /* #undef PTHREAD_CREATE_JOINABLE */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif /* Version number of package */ #define VERSION "4.5~git" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define missing prototypes, implemented in replacement lib */ #ifdef __cplusplus extern "C" { #endif #ifndef HAVE_GETOPT int getopt (int argc, char * const argv[], const char * optstring); extern char * optarg; extern int optind, opterr, optopt; #endif #ifndef HAVE_GETOPT_LONG struct option; int getopt_long (int argc, char * const argv[], const char * optstring, const struct option * longopts, int * longindex); #endif #ifndef HAVE_USLEEP int usleep(unsigned long usec); /* SUSv2 */ #endif #ifndef HAVE_GETTIMEOFDAY #ifdef HAVE_SYS_TIME_H #include #endif #ifndef HAVE_STRUCT_TIMEZONE struct timezone { int tz_minuteswest; int tz_dsttime; }; #endif int gettimeofday(struct timeval *tv, struct timezone *tz); #endif #ifndef timersub # define timersub(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ if ((result)->tv_usec < 0) { \ --(result)->tv_sec; \ (result)->tv_usec += 1000000; \ } \ } while (0) #endif #ifndef HAVE_SSIZE_T typedef size_t ssize_t; #endif #ifdef __cplusplus } #endif /* Define missing prototypes, implemented in replacement lib */ #ifdef __cplusplus extern "C" { #endif #ifndef HAVE_STRUCT_ADDRINFO #ifdef HAVE_NETINET_IN_H #include #endif #if HAVE_NETDB_H #include #endif #ifdef HAVE_ARPA_INET_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #elif HAVE_WS2TCPIP_H #include #endif struct addrinfo { int ai_flags; int ai_family; int ai_socktype; int ai_protocol; socklen_t ai_addrlen; struct sockaddr *ai_addr; }; #endif #ifndef HAVE_GETADDRINFO #ifdef HAVE_NETINET_IN_H #include #endif #if HAVE_NETDB_H #include #endif #ifdef HAVE_ARPA_INET_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #elif HAVE_WS2TCPIP_H #include #endif #ifndef AI_PASSIVE #define AI_PASSIVE 0x0001 #endif int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res); void freeaddrinfo(struct addrinfo *res); #endif #if !defined(HAVE_DECL_GAI_STRERROR) && !defined(gai_strerror) const char *gai_strerror(int errcode); #endif /* !HAVE_DECL_GAI_STRERROR */ #ifdef __cplusplus } #endif ================================================ FILE: software/hamlib-w64-4.5~git/include/hamlib/rig.h ================================================ /* * Hamlib Interface - API header * Copyright (c) 2000-2003 by Frank Singleton * Copyright (c) 2000-2012 by Stephane Fillod * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef _RIG_H #define _RIG_H 1 #define BUILTINFUNC 0 // Our shared secret password #define HAMLIB_SECRET_LENGTH 32 #define TRACE rig_debug(RIG_DEBUG_TRACE,"%s(%d) trace\n", __FILE__, __LINE__) #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) #include #include #include #include #include #include #ifdef HAVE_PTHREAD #include #endif /* Rig list is in a separate file so as not to mess up w/ this one */ #include /** * \addtogroup rig * @{ */ /*! \file rig.h * \brief Hamlib rig data structures. * * This file contains the data structures and definitions for the Hamlib rig API. * see the rig.c file for more details on the rig API. */ /* __BEGIN_DECLS should be used at the beginning of your declarations, * so that C++ compilers don't mangle their names. Use __END_DECLS at * the end of C declarations. */ //! @cond Doxygen_Suppress #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS /* empty */ # define __END_DECLS /* empty */ #endif //! @endcond /* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers * that don't understand ANSI C prototypes still work, and ANSI C * compilers can issue warnings about type mismatches. */ //! @cond Doxygen_Suppress #undef HAMLIB_PARAMS #if defined (__STDC__) \ || defined (_AIX) \ || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ || defined(__CYGWIN__) \ || defined(_WIN32) \ || defined(__cplusplus) # define HAMLIB_PARAMS(protos) protos # define rig_ptr_t void * # define amp_ptr_t void * #else # define HAMLIB_PARAMS(protos) () # define rig_ptr_t char * # define amp_ptr_t char * #endif //! @endcond #include #ifndef SWIGLUA //! @cond Doxygen_Suppress #define CONSTANT_64BIT_FLAG(BIT) (1ull << (BIT)) //! @endcond #else /* SWIG's older Lua generator doesn't grok ull due to Lua using a double-precision floating point type internally for number representations (max 53 bits of precision) so makes a string constant from a constant number literal using ull */ // #define CONSTANT_64BIT_FLAG(BIT) (1 << (BIT)) // #define SWIGLUAHIDE /* But this appears to have been fixed so we'll use the correct one now If you have the older version of SWIG comment out this line and use the two above */ // This 1ul definition works on swig 4.0.1 and lua 5.3.5 #define CONSTANT_64BIT_FLAG(BIT) (1ul << (BIT)) #endif __BEGIN_DECLS /** * \brief size of cookie request buffer * Minimum size of cookie buffer to pass to rig_cookie */ // cookie is 26-char time code plus 10-char (2^31-1) random number #define HAMLIB_COOKIE_SIZE 37 extern int cookie_use; // this is global as once one client requests it everybody needs to honor it //! @cond Doxygen_Suppress extern HAMLIB_EXPORT_VAR(const char) hamlib_version[]; extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[]; extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2; extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2; //! @endcond /** * \brief Hamlib error codes * Error code definition that can be returned by the Hamlib functions. * Unless stated otherwise, Hamlib functions return the negative value * of rig_errcode_e definitions in case of error, or 0 when successful. */ enum rig_errcode_e { RIG_OK = 0, /*!< 0 No error, operation completed successfully */ RIG_EINVAL, /*!< 1 invalid parameter */ RIG_ECONF, /*!< 2 invalid configuration (serial,..) */ RIG_ENOMEM, /*!< 3 memory shortage */ RIG_ENIMPL, /*!< 4 function not implemented, but will be */ RIG_ETIMEOUT, /*!< 5 communication timed out */ RIG_EIO, /*!< 6 IO error, including open failed */ RIG_EINTERNAL, /*!< 7 Internal Hamlib error, huh! */ RIG_EPROTO, /*!< 8 Protocol error */ RIG_ERJCTED, /*!< 9 Command rejected by the rig */ RIG_ETRUNC, /*!< 10 Command performed, but arg truncated */ RIG_ENAVAIL, /*!< 11 Function not available */ RIG_ENTARGET, /*!< 12 VFO not targetable */ RIG_BUSERROR, /*!< 13 Error talking on the bus */ RIG_BUSBUSY, /*!< 14 Collision on the bus */ RIG_EARG, /*!< 15 NULL RIG handle or any invalid pointer parameter in get arg */ RIG_EVFO, /*!< 16 Invalid VFO */ RIG_EDOM, /*!< 17 Argument out of domain of func */ RIG_EDEPRECATED,/*!< 18 Function deprecated */ RIG_ESECURITY /*!< 19 Security error */ }; /** * \brief Determines if the given error code indicates a "soft" error * Soft errors are caused by invalid parameters and software/hardware features * and cannot be fixed by retries or by re-initializing hardware. */ #define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \ || errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \ || errcode == RIG_EVFO || errcode == RIG_EDOM || errcode == RIG_ESECURITY) /** * \brief Token in the netrigctl protocol for returning error code */ #define NETRIGCTL_RET "RPRT " /** *\brief Hamlib debug levels * * NOTE: Numeric order matters for debug level * * \sa rig_set_debug() */ enum rig_debug_level_e { RIG_DEBUG_NONE = 0, /*!< no bug reporting */ RIG_DEBUG_BUG, /*!< serious bug */ RIG_DEBUG_ERR, /*!< error case (e.g. protocol, memory allocation) */ RIG_DEBUG_WARN, /*!< warning */ RIG_DEBUG_VERBOSE, /*!< verbose */ RIG_DEBUG_TRACE, /*!< tracing */ RIG_DEBUG_CACHE /*!< caching */ }; /* --------------- Rig capabilities -----------------*/ /* Forward struct references */ struct rig; struct rig_state; /** * \brief Rig structure definition (see rig for details). */ typedef struct s_rig RIG; //! @cond Doxygen_Suppress #define HAMLIB_RIGNAMSIZ 30 #define HAMLIB_RIGVERSIZ 8 #define HAMLIB_FILPATHLEN 512 #define HAMLIB_FRQRANGESIZ 30 #define HAMLIB_MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */ #define HAMLIB_TSLSTSIZ 20 /* max tuning step list size, zero ended */ #define HAMLIB_FLTLSTSIZ 60 /* max mode/filter list size, zero ended */ #define HAMLIB_MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */ #define HAMLIB_CHANLSTSIZ 16 /* max mem_list size, zero ended */ #define HAMLIB_MAX_AGC_LEVELS 8 /* max AGC levels supported */ #define HAMLIB_MAX_SPECTRUM_SCOPES 4 /* max number of spectrum scopes supported */ #define HAMLIB_MAX_SPECTRUM_MODES 5 /* max number of spectrum modes supported */ #define HAMLIB_MAX_SPECTRUM_AVG_MODES 12 /* max number of spectrum averaging modes supported */ #define HAMLIB_MAX_SPECTRUM_SPANS 20 /* max number of spectrum modes supported */ #define HAMLIB_MAX_SPECTRUM_DATA 2048 /* max number of data bytes in a single spectrum line */ #define HAMLIB_MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */ #define HAMLIB_MAX_MODES 63 #define HAMLIB_MAX_VFOS 31 #define HAMLIB_MAX_ROTORS 63 #define HAMLIB_MAX_VFO_OPS 31 #define HAMLIB_MAX_RSCANS 31 #define HAMLIB_MAX_SNAPSHOT_PACKET_SIZE 16384 /* maximum number of bytes in a UDP snapshot packet */ //! @endcond /** * \brief CTCSS and DCS type definition. * * Continuous Tone Controlled Squelch System (CTCSS) * sub-audible tone frequency are expressed in \em tenth of Hz. * For example, the subaudible tone of 88.5 Hz is represented within * Hamlib by 885. * * Digitally-Coded Squelch codes are simple direct integers. */ #define CTCSS_LIST_SIZE 60 #define DCS_LIST_SIZE 128 typedef unsigned int tone_t; /** * \brief Port type */ typedef enum rig_port_e { RIG_PORT_NONE = 0, /*!< No port */ RIG_PORT_SERIAL, /*!< Serial */ RIG_PORT_NETWORK, /*!< Network socket type */ RIG_PORT_DEVICE, /*!< Device driver, like the WiNRADiO */ RIG_PORT_PACKET, /*!< AX.25 network type, e.g. SV8CS protocol */ RIG_PORT_DTMF, /*!< DTMF protocol bridge via another rig, eg. Kenwood Sky Cmd System */ RIG_PORT_ULTRA, /*!< IrDA Ultra protocol! */ RIG_PORT_RPC, /*!< RPC wrapper */ RIG_PORT_PARALLEL, /*!< Parallel port */ RIG_PORT_USB, /*!< USB port */ RIG_PORT_UDP_NETWORK, /*!< UDP Network socket type */ RIG_PORT_CM108, /*!< CM108 GPIO */ RIG_PORT_GPIO, /*!< GPIO */ RIG_PORT_GPION, /*!< GPIO inverted */ } rig_port_t; /** * \brief Serial parity */ enum serial_parity_e { RIG_PARITY_NONE = 0, /*!< No parity */ RIG_PARITY_ODD, /*!< Odd */ RIG_PARITY_EVEN, /*!< Even */ RIG_PARITY_MARK, /*!< Mark */ RIG_PARITY_SPACE /*!< Space */ }; /** * \brief Serial handshake */ enum serial_handshake_e { RIG_HANDSHAKE_NONE = 0, /*!< No handshake */ RIG_HANDSHAKE_XONXOFF, /*!< Software XON/XOFF */ RIG_HANDSHAKE_HARDWARE /*!< Hardware CTS/RTS */ }; /** * \brief Serial control state */ enum serial_control_state_e { RIG_SIGNAL_UNSET = 0, /*!< Unset or tri-state */ RIG_SIGNAL_ON, /*!< ON */ RIG_SIGNAL_OFF /*!< OFF */ }; /** * \brief Rig type flags */ typedef enum { RIG_FLAG_RECEIVER = (1 << 1), /*!< Receiver */ RIG_FLAG_TRANSMITTER = (1 << 2), /*!< Transmitter */ RIG_FLAG_SCANNER = (1 << 3), /*!< Scanner */ RIG_FLAG_MOBILE = (1 << 4), /*!< mobile sized */ RIG_FLAG_HANDHELD = (1 << 5), /*!< handheld sized */ RIG_FLAG_COMPUTER = (1 << 6), /*!< "Computer" rig */ RIG_FLAG_TRUNKING = (1 << 7), /*!< has trunking */ RIG_FLAG_APRS = (1 << 8), /*!< has APRS */ RIG_FLAG_TNC = (1 << 9), /*!< has TNC */ RIG_FLAG_DXCLUSTER = (1 << 10), /*!< has DXCluster */ RIG_FLAG_TUNER = (1 << 11) /*!< dumb tuner */ } rig_type_t; /** * \brief AGC delay settings */ /* TODO: kill me, and replace by real AGC delay */ enum agc_level_e { RIG_AGC_OFF = 0, RIG_AGC_SUPERFAST, RIG_AGC_FAST, RIG_AGC_SLOW, RIG_AGC_USER, /*!< user selectable */ RIG_AGC_MEDIUM, RIG_AGC_AUTO }; //! @cond Doxygen_Suppress #define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER) #define RIG_TYPE_MASK (RIG_FLAG_TRANSCEIVER|RIG_FLAG_SCANNER|RIG_FLAG_MOBILE|RIG_FLAG_HANDHELD|RIG_FLAG_COMPUTER|RIG_FLAG_TRUNKING|RIG_FLAG_TUNER) #define RIG_TYPE_OTHER 0 #define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER #define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD) #define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE) #define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER #define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER) #define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER) #define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING) #define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER) #define RIG_TYPE_TUNER RIG_FLAG_TUNER //! @endcond /** * \brief Development status of the backend */ enum rig_status_e { RIG_STATUS_ALPHA = 0, /*!< Alpha quality, i.e. development */ RIG_STATUS_UNTESTED, /*!< Written from available specs, rig unavailable for test, feedback wanted! */ RIG_STATUS_BETA, /*!< Beta quality */ RIG_STATUS_STABLE, /*!< Stable */ RIG_STATUS_BUGGY /*!< Was stable, but something broke it! */ /* RIG_STATUS_NEW * *!< Initial release of code * !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */ }; /** * \brief Map all deprecated RIG_STATUS_NEW references to * RIG_STATUS_UNTESTED for backward compatibility */ #define RIG_STATUS_NEW RIG_STATUS_UNTESTED /** * \brief Repeater shift type */ typedef enum { RIG_RPT_SHIFT_NONE = 0, /*!< No repeater shift */ RIG_RPT_SHIFT_MINUS, /*!< "-" shift */ RIG_RPT_SHIFT_PLUS /*!< "+" shift */ } rptr_shift_t; /** * \brief Split mode */ typedef enum { RIG_SPLIT_OFF = 0, /*!< Split mode disabled */ RIG_SPLIT_ON /*!< Split mode enabled */ } split_t; /** * \brief Frequency type, * * Frequency type unit in Hz, able to hold SHF frequencies. */ typedef double freq_t; /** * \brief printf(3) format to be used for freq_t type */ #define PRIfreq ".0f" /** * \brief scanf(3) format to be used for freq_t type */ #define SCNfreq "lf" /** * \brief printf(3) format to be used for freq_t type */ #define FREQFMT SCNfreq /** * \brief Short frequency type * * Frequency in Hz restricted to 31bits, suitable for offsets, shifts, etc.. */ typedef signed long shortfreq_t; /** \brief \c Macro to return Hz when f=Hz */ #define Hz(f) ((freq_t)(f)) /** \brief \c Macro to return Hz when f=kHz */ #define kHz(f) ((freq_t)((f)*(freq_t)1000)) /** \brief \c Macro to return Hz when f=MHz */ #define MHz(f) ((freq_t)((f)*(freq_t)1000000)) /** \brief \c Macro to return Hz when f=GHz */ #define GHz(f) ((freq_t)((f)*(freq_t)1000000000)) /** \brief \c Macro to return short Hz when f=Hz */ #define s_Hz(f) ((shortfreq_t)(f)) /** \brief \c Macro to return short Hz when f=kHz */ #define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000)) /** \brief \c Macro to return short Hz when f=MHz */ #define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000)) /** \brief \c Macro to return short Hz when f=GHz */ #define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000)) /** \brief \c Frequency none -- used as default value for checking */ #define RIG_FREQ_NONE Hz(0) /** * \brief VFO definition * * There are several ways of using a vfo_t. For most cases, using RIG_VFO_A, * RIG_VFO_B, RIG_VFO_CURR, etc., as opaque macros should suffice. * * Strictly speaking a VFO is Variable Frequency Oscillator. * Here, it is referred as a tunable channel, from the radio operator's * point of view. The channel can be designated individually by its real * number, or by using an alias. * * Aliases may or may not be honored by a backend and are defined using * high significant bits, i.e. RIG_VFO_MEM, RIG_VFO_MAIN, etc. */ typedef unsigned int vfo_t; /** \brief '' -- used in caps */ #define RIG_VFO_N(n) (1u<<(n)) /** \brief \c VFONone -- vfo unknown */ #define RIG_VFO_NONE 0 /** \brief \c VFOA -- VFO A */ #define RIG_VFO_A RIG_VFO_N(0) /** \brief \c VFOB -- VFO B */ #define RIG_VFO_B RIG_VFO_N(1) /** \brief \c VFOC -- VFO C */ #define RIG_VFO_C RIG_VFO_N(2) // Any addition VFOS need to go from 3-20 // To maintain backward compatibility these values cannot change /** \brief \c SubA -- alias for SUB_A */ #define RIG_VFO_SUB_A RIG_VFO_N(21) /** \brief \c SubB -- alias for SUB_B */ #define RIG_VFO_SUB_B RIG_VFO_N(22) /** \brief \c SubC -- alias for SUB_B */ #define RIG_VFO_SUB_C RIG_VFO_N(3) /** \brief \c MainA -- alias for MAIN_A */ #define RIG_VFO_MAIN_A RIG_VFO_N(23) /** \brief \c MainB -- alias for MAIN_B */ #define RIG_VFO_MAIN_B RIG_VFO_N(24) /** \brief \c MainC -- alias for MAIN_C */ #define RIG_VFO_MAIN_C RIG_VFO_N(4) /** \brief \c Other -- alias for OTHER -- e.g. Icom rigs without get_vfo capability */ #define RIG_VFO_OTHER RIG_VFO_N(5) /** \brief \c Sub -- alias for SUB */ #define RIG_VFO_SUB RIG_VFO_N(25) /** \brief \c Main -- alias for MAIN */ #define RIG_VFO_MAIN RIG_VFO_N(26) /** \brief \c VFO -- means (last or any)VFO mode, with set_vfo */ #define RIG_VFO_VFO RIG_VFO_N(27) /** \brief \c MEM -- means Memory mode, to be used with set_vfo */ #define RIG_VFO_MEM RIG_VFO_N(28) /** \brief \c currVFO -- current "tunable channel"/VFO */ #define RIG_VFO_CURR RIG_VFO_N(29) /** \brief \c Flag to set if VFO can transmit */ #define RIG_VFO_TX_FLAG RIG_VFO_N(30) /** \brief \c Flag to set all VFOS */ #define RIG_VFO_ALL RIG_VFO_N(31) // we can also use RIG_VFO_N(31) if needed // Misc VFO Macros /** \brief \c Macro to tell you if VFO can transmit */ #define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG) /** \brief \c TX -- alias for split tx or uplink, of VFO_CURR */ #define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR) /** \brief \c RX -- alias for split rx or downlink */ #define RIG_VFO_RX RIG_VFO_CURR /* * targetable bitfields, for internal use. * In rig.c lack of a flag will case a VFO change if needed * So setting this flag will mean the backend handles any VFO needs * For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping */ //! @cond Doxygen_Suppress #define RIG_TARGETABLE_NONE 0 #define RIG_TARGETABLE_FREQ (1<<0) #define RIG_TARGETABLE_MODE (1<<1) // mode by vfo or same mode on both vfos #define RIG_TARGETABLE_PURE (1<<2) // deprecated -- not used -- reuse it #define RIG_TARGETABLE_TONE (1<<3) #define RIG_TARGETABLE_FUNC (1<<4) #define RIG_TARGETABLE_LEVEL (1<<5) #define RIG_TARGETABLE_RITXIT (1<<6) #define RIG_TARGETABLE_PTT (1<<7) #define RIG_TARGETABLE_MEM (1<<8) #define RIG_TARGETABLE_BANK (1<<9) #define RIG_TARGETABLE_ANT (1<<10) #define RIG_TARGETABLE_ROOFING (1<<11) // roofing filter targetable by VFO #define RIG_TARGETABLE_SPECTRUM (1<<12) // spectrum scope targetable by VFO #define RIG_TARGETABLE_BAND (1<<13) // Band select -- e.g. Yaeus BS command #define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK) #define RIG_TARGETABLE_ALL 0x7fffffff //! @endcond // // // Newer Icoms like the 9700 and 910 have VFOA/B on both Main & Sub // Compared to older rigs which have one or the other // So we need to distinguish between them //! @cond Doxygen_Suppress #define VFO_HAS_A_B ((rig->state.vfo_list & (RIG_VFO_A|RIG_VFO_B)) == (RIG_VFO_A|RIG_VFO_B)) #define VFO_HAS_MAIN_SUB ((rig->state.vfo_list & (RIG_VFO_MAIN|RIG_VFO_SUB)) == (RIG_VFO_MAIN|RIG_VFO_SUB)) #define VFO_HAS_MAIN_SUB_ONLY ((!VFO_HAS_A_B) & VFO_HAS_MAIN_SUB) #define VFO_HAS_MAIN_SUB_A_B_ONLY (VFO_HAS_A_B & VFO_HAS_MAIN_SUB) #define VFO_HAS_A_B_ONLY (VFO_HAS_A_B & (!VFO_HAS_MAIN_SUB)) #define VFO_DUAL (RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B) #define VFO_HAS_DUAL ((rig->state.vfo_list & VFO_DUAL) == VFO_DUAL) //! @endcond /** * \brief Macro for bandpass to be set to normal * \def RIG_PASSBAND_NORMAL */ #define RIG_PASSBAND_NORMAL s_Hz(0) /** * \brief Macro for bandpass to be left alone */ #define RIG_PASSBAND_NOCHANGE s_Hz(-1) /** * * \sa rig_passband_normal(), rig_passband_narrow(), rig_passband_wide() */ typedef shortfreq_t pbwidth_t; /** * \brief DCD status */ typedef enum dcd_e { RIG_DCD_OFF = 0, /*!< Squelch closed */ RIG_DCD_ON /*!< Squelch open */ } dcd_t; /** * \brief DCD type * * \sa rig_get_dcd() */ typedef enum { RIG_DCD_NONE = 0, /*!< No DCD available */ RIG_DCD_RIG, /*!< Rig has DCD status support, i.e. rig has get_dcd cap */ RIG_DCD_SERIAL_DSR, /*!< DCD status from serial DSR signal */ RIG_DCD_SERIAL_CTS, /*!< DCD status from serial CTS signal */ RIG_DCD_SERIAL_CAR, /*!< DCD status from serial CD signal */ RIG_DCD_PARALLEL, /*!< DCD status from parallel port pin */ RIG_DCD_CM108, /*!< DCD status from CM108 vol dn pin */ RIG_DCD_GPIO, /*!< DCD status from GPIO pin */ RIG_DCD_GPION, /*!< DCD status from inverted GPIO pin */ } dcd_type_t; /** * \brief PTT status */ typedef enum { RIG_PTT_OFF = 0, /*!< PTT deactivated */ RIG_PTT_ON, /*!< PTT activated */ RIG_PTT_ON_MIC, /*!< PTT Mic only, fallbacks on RIG_PTT_ON if unavailable */ RIG_PTT_ON_DATA /*!< PTT Data (Mic-muted), fallbacks on RIG_PTT_ON if unavailable */ } ptt_t; /** * \brief PTT type * * \sa rig_get_ptt() */ typedef enum { RIG_PTT_NONE = 0, /*!< No PTT available */ RIG_PTT_RIG, /*!< Legacy PTT (CAT PTT) */ RIG_PTT_SERIAL_DTR, /*!< PTT control through serial DTR signal */ RIG_PTT_SERIAL_RTS, /*!< PTT control through serial RTS signal */ RIG_PTT_PARALLEL, /*!< PTT control through parallel port */ RIG_PTT_RIG_MICDATA, /*!< Legacy PTT (CAT PTT), supports RIG_PTT_ON_MIC/RIG_PTT_ON_DATA */ RIG_PTT_CM108, /*!< PTT control through CM108 GPIO pin */ RIG_PTT_GPIO, /*!< PTT control through GPIO pin */ RIG_PTT_GPION, /*!< PTT control through inverted GPIO pin */ } ptt_type_t; /** * \brief Radio power state */ typedef enum { RIG_POWER_OFF = 0, /*!< Power off */ RIG_POWER_ON = (1 << 0), /*!< Power on */ RIG_POWER_STANDBY = (1 << 1), /*!< Standby */ RIG_POWER_OPERATE = (1 << 2), /*!< Operate (from Standby) */ RIG_POWER_UNKNOWN = (1 << 3) /*!< Unknown power status */ } powerstat_t; /** * \brief Reset operation */ typedef enum { RIG_RESET_NONE = 0, /*!< No reset */ RIG_RESET_SOFT = (1 << 0), /*!< Software reset */ RIG_RESET_VFO = (1 << 1), /*!< VFO reset */ RIG_RESET_MCALL = (1 << 2), /*!< Memory clear */ RIG_RESET_MASTER = (1 << 3) /*!< Master reset */ } reset_t; /** * \brief VFO operation * * A VFO operation is an action on a VFO (or tunable memory). * The difference with a function is that an action has no on/off * status, it is performed at once. * * NOTE: the vfo argument for some vfo operation may be irrelevant, * and thus will be ignored. * * The VFO/MEM "mode" is set by rig_set_vfo.\n * \c STRING used in rigctl * * \sa rig_parse_vfo_op(), rig_strvfop() */ typedef enum { RIG_OP_NONE = 0, /*!< '' No VFO_OP */ RIG_OP_CPY = (1 << 0), /*!< \c CPY -- VFO A = VFO B */ RIG_OP_XCHG = (1 << 1), /*!< \c XCHG -- Exchange VFO A/B */ RIG_OP_FROM_VFO = (1 << 2), /*!< \c FROM_VFO -- VFO->MEM */ RIG_OP_TO_VFO = (1 << 3), /*!< \c TO_VFO -- MEM->VFO */ RIG_OP_MCL = (1 << 4), /*!< \c MCL -- Memory clear */ RIG_OP_UP = (1 << 5), /*!< \c UP -- UP increment VFO freq by tuning step*/ RIG_OP_DOWN = (1 << 6), /*!< \c DOWN -- DOWN decrement VFO freq by tuning step*/ RIG_OP_BAND_UP = (1 << 7), /*!< \c BAND_UP -- Band UP */ RIG_OP_BAND_DOWN = (1 << 8), /*!< \c BAND_DOWN -- Band DOWN */ RIG_OP_LEFT = (1 << 9), /*!< \c LEFT -- LEFT */ RIG_OP_RIGHT = (1 << 10), /*!< \c RIGHT -- RIGHT */ RIG_OP_TUNE = (1 << 11), /*!< \c TUNE -- Start tune */ RIG_OP_TOGGLE = (1 << 12) /*!< \c TOGGLE -- Toggle VFOA and VFOB */ } vfo_op_t; /** * \brief Band enumeration * * Some rig commands like Yaesu band select know about bands * * \sa rig_set_level() */ typedef enum { // numbers here reflect the Yaesu values RIG_BAND_160M = 0, /*!< \c 160M */ RIG_BAND_80M = 1, /*!< \c 80M */ RIG_BAND_60M = 2, /*!< \c 60M */ RIG_BAND_40M = 3, /*!< \c 40M */ RIG_BAND_30M = 4, /*!< \c 30M */ RIG_BAND_20M = 5, /*!< \c 20M */ RIG_BAND_17M = 6, /*!< \c 17M */ RIG_BAND_15M = 7, /*!< \c 15M */ RIG_BAND_12M = 8, /*!< \c 12M */ RIG_BAND_10M = 9, /*!< \c 10M */ RIG_BAND_6M = 10, /*!< \c 6M */ RIG_BAND_GEN = 11, /*!< \c 60M */ RIG_BAND_MW = 12, /*!< \c Medium Wave */ RIG_BAND_UNUSED = 13, /*!< \c Medium Wave */ RIG_BAND_AIR = 14, /*!< \c Air band */ RIG_BAND_144MHZ = 15, /*!< \c 144MHz */ RIG_BAND_430MHZ = 16, /*!< \c 430MHz */ } hamlib_band_t; /** * \brief Rig Scan operation * * Various scan operations supported by a rig.\n * \c STRING used in rigctl * * \sa rig_parse_scan(), rig_strscan() */ typedef enum { RIG_SCAN_NONE = 0, /*!< '' No-op value */ RIG_SCAN_MEM = (1 << 0), /*!< \c MEM -- Scan all memory channels */ RIG_SCAN_SLCT = (1 << 1), /*!< \c SLCT -- Scan all selected memory channels */ RIG_SCAN_PRIO = (1 << 2), /*!< \c PRIO -- Priority watch (mem or call channel) */ RIG_SCAN_PROG = (1 << 3), /*!< \c PROG -- Programmed(edge) scan */ RIG_SCAN_DELTA = (1 << 4), /*!< \c DELTA -- delta-f scan */ RIG_SCAN_VFO = (1 << 5), /*!< \c VFO -- most basic scan */ RIG_SCAN_PLT = (1 << 6), /*!< \c PLT -- Scan using pipelined tuning */ RIG_SCAN_STOP = (1 << 7) /*!< \c STOP -- Stop scanning */ } scan_t; /** * \brief configuration token */ typedef long token_t; //! @cond Doxygen_Suppress #define RIG_CONF_END 0 //! @endcond /** * \brief parameter types * * Used with configuration, parameter and extra-parm tables. * * Current internal implementation * NUMERIC: val.f or val.i * COMBO: val.i, starting from 0. Points to a table of strings or asci stored values. * STRING: val.s or val.cs * CHECKBUTTON: val.i 0/1 * BINARY: val.b */ /* strongly inspired from soundmodem. Thanks Thomas! */ enum rig_conf_e { RIG_CONF_STRING, /*!< String type */ RIG_CONF_COMBO, /*!< Combo type */ RIG_CONF_NUMERIC, /*!< Numeric type integer or real */ RIG_CONF_CHECKBUTTON, /*!< on/off type */ RIG_CONF_BUTTON, /*!< Button type */ RIG_CONF_BINARY /*!< Binary buffer type */ }; //! @cond Doxygen_Suppress #define RIG_COMBO_MAX 16 #define RIG_BIN_MAX 80 //! @endcond /** * \brief Configuration parameter structure. */ struct confparams { token_t token; /*!< Conf param token ID */ const char *name; /*!< Param name, no spaces allowed */ const char *label; /*!< Human readable label */ const char *tooltip; /*!< Hint on the parameter */ const char *dflt; /*!< Default value */ enum rig_conf_e type; /*!< Type of the parameter */ union { /*!< */ struct { /*!< */ float min; /*!< Minimum value */ float max; /*!< Maximum value */ float step; /*!< Step */ } n; /*!< Numeric type */ struct { /*!< */ const char *combostr[RIG_COMBO_MAX]; /*!< Combo list */ } c; /*!< Combo type */ } u; /*!< Type union */ }; /** * \brief Announce * * Designate optional speech synthesizer. */ typedef enum { RIG_ANN_NONE = 0, /*!< None */ RIG_ANN_OFF = RIG_ANN_NONE, /*!< disable announces */ RIG_ANN_FREQ = (1 << 0), /*!< Announce frequency */ RIG_ANN_RXMODE = (1 << 1), /*!< Announce receive mode */ RIG_ANN_CW = (1 << 2), /*!< CW */ RIG_ANN_ENG = (1 << 3), /*!< English */ RIG_ANN_JAP = (1 << 4) /*!< Japan */ } ann_t; /** * \brief Antenna typedef * \typedef ant_t */ /** * \brief Antenna number * \def RIG_ANT_NONE * No antenna set yet or unknown */ /** * \brief Antenna conversion macro * \def RIG_ANT_N * Convert antenna number to bit mask */ /** * \brief Macro for Ant#1 * \def RIG_ANT_1 */ /** * \brief Macro for Ant#2 * \def RIG_ANT_2 */ /** * \brief Macro for Ant#3 * \def RIG_ANT_3 */ /** * \brief Macro for Ant#4 * \def RIG_ANT_4 */ /** * \brief Macro for Ant#5 * \def RIG_ANT_5 */ /** * \brief Antenna is on whatever "current" means * \def RIG_ANT_CURR */ /** * \brief Macro for unknown antenna * \def RIG_ANT_UNKNOWN */ /** * \brief Maximum antenna# * \def RIG_ANT_MAX */ typedef unsigned int ant_t; #define RIG_ANT_NONE 0 #define RIG_ANT_N(n) ((ant_t)1<<(n)) #define RIG_ANT_1 RIG_ANT_N(0) #define RIG_ANT_2 RIG_ANT_N(1) #define RIG_ANT_3 RIG_ANT_N(2) #define RIG_ANT_4 RIG_ANT_N(3) #define RIG_ANT_5 RIG_ANT_N(4) #define RIG_ANT_UNKNOWN RIG_ANT_N(30) #define RIG_ANT_CURR RIG_ANT_N(31) #define RIG_ANT_MAX 32 //! @cond Doxygen_Suppress #define RIG_AGC_LAST RIG_AGC_AUTO //! @endcond #if 1 // deprecated /** * \brief Level display meters */ enum meter_level_e { RIG_METER_NONE = 0, /*< No display meter */ RIG_METER_SWR = (1 << 0), /*< Stationary Wave Ratio */ RIG_METER_COMP = (1 << 1), /*< Compression level */ RIG_METER_ALC = (1 << 2), /*< ALC */ RIG_METER_IC = (1 << 3), /*< IC */ RIG_METER_DB = (1 << 4), /*< DB */ RIG_METER_PO = (1 << 5), /*< Power Out */ RIG_METER_VDD = (1 << 6), /*< Final Amp Voltage */ RIG_METER_TEMP = (1 << 7) /*< Final Amp Temperature */ }; #endif /** * \brief Universal approach for passing values * * \sa rig_set_level(), rig_get_level(), rig_set_parm(), rig_get_parm() */ typedef union { signed int i; /*!< Signed integer */ float f; /*!< Single precision float */ char *s; /*!< Pointer to char string */ const char *cs; /*!< Pointer to constant char string */ //! @cond Doxygen_Suppress struct { int l; /*!< Length of data */ unsigned char *d; /* Pointer to data buffer */ } b; //! @endcond } value_t; /** * \brief Rig Level Settings * * Various operating levels supported by a rig.\n * \c STRING used in rigctl * * \sa rig_parse_level(), rig_strlevel() */ typedef uint64_t rig_level_e; #define RIG_LEVEL_NONE 0 /*!< '' -- No Level */ #define RIG_LEVEL_PREAMP CONSTANT_64BIT_FLAG(0) /*!< \c PREAMP -- Preamp, arg int (dB) */ #define RIG_LEVEL_ATT CONSTANT_64BIT_FLAG(1) /*!< \c ATT -- Attenuator, arg int (dB) */ #define RIG_LEVEL_VOXDELAY CONSTANT_64BIT_FLAG(2) /*!< \c VOXDELAY -- VOX delay, arg int (tenth of seconds) */ #define RIG_LEVEL_AF CONSTANT_64BIT_FLAG(3) /*!< \c AF -- Volume, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_RF CONSTANT_64BIT_FLAG(4) /*!< \c RF -- RF gain (not TX power) arg float [0.0 ... 1.0] */ #define RIG_LEVEL_SQL CONSTANT_64BIT_FLAG(5) /*!< \c SQL -- Squelch, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_IF CONSTANT_64BIT_FLAG(6) /*!< \c IF shift -- IF, arg int (+/-Hz) */ #define RIG_LEVEL_APF CONSTANT_64BIT_FLAG(7) /*!< \c APF -- Audio Peak Filter, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_NR CONSTANT_64BIT_FLAG(8) /*!< \c NR -- Noise Reduction, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_PBT_IN CONSTANT_64BIT_FLAG(9) /*!< \c PBT_IN -- Twin PBT (inside) arg float [0.0 ... 1.0] */ #define RIG_LEVEL_PBT_OUT CONSTANT_64BIT_FLAG(10) /*!< \c PBT_OUT -- Twin PBT (outside) arg float [0.0 ... 1.0] */ #define RIG_LEVEL_CWPITCH CONSTANT_64BIT_FLAG(11) /*!< \c CWPITCH -- CW pitch, arg int (Hz) */ #define RIG_LEVEL_RFPOWER CONSTANT_64BIT_FLAG(12) /*!< \c RFPOWER -- RF Power, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_MICGAIN CONSTANT_64BIT_FLAG(13) /*!< \c MICGAIN -- MIC Gain, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_KEYSPD CONSTANT_64BIT_FLAG(14) /*!< \c KEYSPD -- Key Speed, arg int (WPM) */ #define RIG_LEVEL_NOTCHF CONSTANT_64BIT_FLAG(15) /*!< \c NOTCHF -- Notch Freq., arg int (Hz) */ #define RIG_LEVEL_COMP CONSTANT_64BIT_FLAG(16) /*!< \c COMP -- Compressor, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_AGC CONSTANT_64BIT_FLAG(17) /*!< \c AGC -- AGC, arg int (see enum agc_level_e) */ #define RIG_LEVEL_BKINDL CONSTANT_64BIT_FLAG(18) /*!< \c BKINDL -- BKin Delay, arg int (tenth of dots) */ #define RIG_LEVEL_BALANCE CONSTANT_64BIT_FLAG(19) /*!< \c BAL -- Balance (Dual Watch) arg float [0.0 ... 1.0] */ #define RIG_LEVEL_METER CONSTANT_64BIT_FLAG(20) /*!< \c METER -- Display meter, arg int (see enum meter_level_e) */ #define RIG_LEVEL_VOXGAIN CONSTANT_64BIT_FLAG(21) /*!< \c VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_ANTIVOX CONSTANT_64BIT_FLAG(22) /*!< \c ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_SLOPE_LOW CONSTANT_64BIT_FLAG(23) /*!< \c SLOPE_LOW -- Slope tune, low frequency cut, arg int (Hz) */ #define RIG_LEVEL_SLOPE_HIGH CONSTANT_64BIT_FLAG(24) /*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, arg int (Hz) */ #define RIG_LEVEL_BKIN_DLYMS CONSTANT_64BIT_FLAG(25) /*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */ /*!< These are not settable */ #define RIG_LEVEL_RAWSTR CONSTANT_64BIT_FLAG(26) /*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */ //#define RIG_LEVEL_SQLSTAT CONSTANT_64BIT_FLAG(27) /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */ #define RIG_LEVEL_SWR CONSTANT_64BIT_FLAG(28) /*!< \c SWR -- SWR, arg float [0.0 ... infinite] */ #define RIG_LEVEL_ALC CONSTANT_64BIT_FLAG(29) /*!< \c ALC -- ALC, arg float */ #define RIG_LEVEL_STRENGTH CONSTANT_64BIT_FLAG(30) /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */ /* RIG_LEVEL_BWC (1<<31) */ /*!< Bandwidth Control, arg int (Hz) */ #define RIG_LEVEL_RFPOWER_METER CONSTANT_64BIT_FLAG(32) /*!< \c RFPOWER_METER -- RF power output meter, arg float [0.0 ... 1.0] (percentage of maximum power) */ #define RIG_LEVEL_COMP_METER CONSTANT_64BIT_FLAG(33) /*!< \c COMP_METER -- Audio output level compression meter, arg float (dB) */ #define RIG_LEVEL_VD_METER CONSTANT_64BIT_FLAG(34) /*!< \c VD_METER -- Input voltage level meter, arg float (V, volts) */ #define RIG_LEVEL_ID_METER CONSTANT_64BIT_FLAG(35) /*!< \c ID_METER -- Current draw meter, arg float (A, amperes) */ #define RIG_LEVEL_NOTCHF_RAW CONSTANT_64BIT_FLAG(36) /*!< \c NOTCHF_RAW -- Notch Freq., arg float [0.0 ... 1.0] */ #define RIG_LEVEL_MONITOR_GAIN CONSTANT_64BIT_FLAG(37) /*!< \c MONITOR_GAIN -- Monitor gain (level for monitoring of transmitted audio) arg float [0.0 ... 1.0] */ #define RIG_LEVEL_NB CONSTANT_64BIT_FLAG(38) /*!< \c NB -- Noise Blanker level, arg float [0.0 ... 1.0] */ #define RIG_LEVEL_RFPOWER_METER_WATTS CONSTANT_64BIT_FLAG(39) /*!< \c RFPOWER_METER_WATTS -- RF power output meter, arg float [0.0 ... MAX] (output power in watts) */ #define RIG_LEVEL_SPECTRUM_MODE CONSTANT_64BIT_FLAG(40) /*!< \c SPECTRUM_MODE -- Spectrum scope mode, arg int (see enum rig_spectrum_mode_e). Supported modes defined in rig caps. */ #define RIG_LEVEL_SPECTRUM_SPAN CONSTANT_64BIT_FLAG(41) /*!< \c SPECTRUM_SPAN -- Spectrum scope span in center mode, arg int (Hz). Supported spans defined in rig caps. */ #define RIG_LEVEL_SPECTRUM_EDGE_LOW CONSTANT_64BIT_FLAG(42) /*!< \c SPECTRUM_EDGE_LOW -- Spectrum scope low edge in fixed mode, arg int (Hz) */ #define RIG_LEVEL_SPECTRUM_EDGE_HIGH CONSTANT_64BIT_FLAG(43) /*!< \c SPECTRUM_EDGE_HIGH -- Spectrum scope high edge in fixed mode, arg int (Hz) */ #define RIG_LEVEL_SPECTRUM_SPEED CONSTANT_64BIT_FLAG(44) /*!< \c SPECTRUM_SPEED -- Spectrum scope update speed, arg int (highest is fastest, define rig-specific granularity) */ #define RIG_LEVEL_SPECTRUM_REF CONSTANT_64BIT_FLAG(45) /*!< \c SPECTRUM_REF -- Spectrum scope reference display level, arg float (dB, define rig-specific granularity) */ #define RIG_LEVEL_SPECTRUM_AVG CONSTANT_64BIT_FLAG(46) /*!< \c SPECTRUM_AVG -- Spectrum scope averaging mode, arg int (see struct rig_spectrum_avg_mode). Supported averaging modes defined in rig caps. */ #define RIG_LEVEL_SPECTRUM_ATT CONSTANT_64BIT_FLAG(47) /*!< \c SPECTRUM_ATT -- Spectrum scope attenuator, arg int (dB). Supported attenuator values defined in rig caps. */ #define RIG_LEVEL_TEMP_METER CONSTANT_64BIT_FLAG(48) /*!< \c TEMP_METER -- arg float (C, centigrade) */ #define RIG_LEVEL_BAND_SELECT CONSTANT_64BIT_FLAG(49) /*!< \c BAND_SELECT -- arg enum BAND_ENUM */ #define RIG_LEVEL_50 CONSTANT_64BIT_FLAG(50) /*!< \c Future use */ #define RIG_LEVEL_51 CONSTANT_64BIT_FLAG(51) /*!< \c Future use */ #define RIG_LEVEL_52 CONSTANT_64BIT_FLAG(52) /*!< \c Future use */ #define RIG_LEVEL_53 CONSTANT_64BIT_FLAG(53) /*!< \c Future use */ #define RIG_LEVEL_54 CONSTANT_64BIT_FLAG(54) /*!< \c Future use */ #define RIG_LEVEL_55 CONSTANT_64BIT_FLAG(55) /*!< \c Future use */ #define RIG_LEVEL_56 CONSTANT_64BIT_FLAG(56) /*!< \c Future use */ #define RIG_LEVEL_57 CONSTANT_64BIT_FLAG(57) /*!< \c Future use */ #define RIG_LEVEL_58 CONSTANT_64BIT_FLAG(58) /*!< \c Future use */ #define RIG_LEVEL_59 CONSTANT_64BIT_FLAG(59) /*!< \c Future use */ #define RIG_LEVEL_60 CONSTANT_64BIT_FLAG(60) /*!< \c Future use */ #define RIG_LEVEL_61 CONSTANT_64BIT_FLAG(61) /*!< \c Future use */ #define RIG_LEVEL_62 CONSTANT_64BIT_FLAG(62) /*!< \c Future use */ #define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63) /*!< \c Future use */ //! @cond Doxygen_Suppress #define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_TEMP_METER) #define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER) #define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST) #define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST) //! @endcond /** * \brief Rig Parameters * * Parameters are settings that are not VFO specific.\n * \c STRING used in rigctl * * \sa rig_parse_parm(), rig_strparm() */ enum rig_parm_e { RIG_PARM_NONE = 0, /*!< '' -- No Parm */ RIG_PARM_ANN = (1 << 0), /*!< \c ANN -- "Announce" level, see ann_t */ RIG_PARM_APO = (1 << 1), /*!< \c APO -- Auto power off, int in minute */ RIG_PARM_BACKLIGHT = (1 << 2), /*!< \c BACKLIGHT -- LCD light, float [0.0 ... 1.0] */ RIG_PARM_BEEP = (1 << 4), /*!< \c BEEP -- Beep on keypressed, int (0,1) */ RIG_PARM_TIME = (1 << 5), /*!< \c TIME -- hh:mm:ss, int in seconds from 00:00:00 */ RIG_PARM_BAT = (1 << 6), /*!< \c BAT -- battery level, float [0.0 ... 1.0] */ RIG_PARM_KEYLIGHT = (1 << 7), /*!< \c KEYLIGHT -- Button backlight, on/off */ RIG_PARM_SCREENSAVER = (1 << 8), /*!< \c SCREENSAVER -- rig specific timeouts */ RIG_PARM_AFIF = (1 << 9) /*!< \c AFIF -- 0=AF audio, 1=IF audio -- see IC-7300/9700/705 */ }; /** * \brief Rig Cookie enumerations * * Cookies are used for a client to request exclusive control of the rig until the client releases the cookie * Cookies will expire after 1 second unless renewed * Normal flow would be cookie=rig_cookie(NULL, RIG_COOKIE_GET), rig op, rig_cookie(cookie, RIG_COOKIE_RENEW), rig op, etc.... * */ enum cookie_e { RIG_COOKIE_GET, /*!< Setup a cookie */ RIG_COOKIE_RELEASE, /*!< Release a cookie */ RIG_COOKIE_RENEW, /*!< Renew a cookie */ }; /** * \brief Multicast data items * 3 different data item can be included in the multicast JSON */ enum multicast_item_e { RIG_MULTICAST_POLL, // hamlib will be polling the rig for all rig items RIG_MULTICAST_TRANSCEIVE, // transceive will be turned on and processed RIG_MULTICAST_SPECTRUM // spectrum data will be included }; //! @cond Doxygen_Suppress #define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT) #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT) #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST) #define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST) //! @endcond /** * \brief Setting * * This can be a func, a level or a parm. * Each bit designates one of them. */ typedef uint64_t setting_t; /** * \brief Maximum # of rig settings * */ #define RIG_SETTING_MAX 64 /** * \brief Transceive mode * The rig notifies the host of any event, like freq changed, mode changed, etc. * \def RIG_TRN_OFF * \deprecated * Turn it off * \brief Transceive mode * \def RIG_TRN_RIG * \deprecated * RIG_TRN_RIG means the rig acts asynchronously * \brief Transceive mode * \def RIG_TRN_POLL * \deprecated * RIG_TRN_POLL means we have to poll the rig * */ #define RIG_TRN_OFF 0 #define RIG_TRN_RIG 1 #define RIG_TRN_POLL 2 /** * \brief Rig Function Settings * * Various operating functions supported by a rig.\n * \c STRING used in rigctl/rigctld * * \sa rig_parse_func(), rig_strfunc() */ /* * The C standard dictates that an enum constant is a 32 bit signed integer. * Setting a constant's bit 31 created a negative value that on amd64 had the * upper 32 bits set as well when assigned to the misc.c:rig_func_str structure. * This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT * on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros * have been used instead as a 'const unsigned long' which cannot be used to * initialize the rig_func_str.func members. TNX KA6MAL, AC6SL. - N0NB */ #define RIG_FUNC_NONE 0 /*!< '' -- No Function */ #define RIG_FUNC_FAGC CONSTANT_64BIT_FLAG (0) /*!< \c FAGC -- Fast AGC */ #define RIG_FUNC_NB CONSTANT_64BIT_FLAG (1) /*!< \c NB -- Noise Blanker */ #define RIG_FUNC_COMP CONSTANT_64BIT_FLAG (2) /*!< \c COMP -- Speech Compression */ #define RIG_FUNC_VOX CONSTANT_64BIT_FLAG (3) /*!< \c VOX -- Voice Operated Relay */ #define RIG_FUNC_TONE CONSTANT_64BIT_FLAG (4) /*!< \c TONE -- CTCSS Tone TX */ #define RIG_FUNC_TSQL CONSTANT_64BIT_FLAG (5) /*!< \c TSQL -- CTCSS Activate/De-activate RX */ #define RIG_FUNC_SBKIN CONSTANT_64BIT_FLAG (6) /*!< \c SBKIN -- Semi Break-in (CW mode) */ #define RIG_FUNC_FBKIN CONSTANT_64BIT_FLAG (7) /*!< \c FBKIN -- Full Break-in (CW mode) */ #define RIG_FUNC_ANF CONSTANT_64BIT_FLAG (8) /*!< \c ANF -- Automatic Notch Filter (DSP) */ #define RIG_FUNC_NR CONSTANT_64BIT_FLAG (9) /*!< \c NR -- Noise Reduction (DSP) */ #define RIG_FUNC_AIP CONSTANT_64BIT_FLAG (10) /*!< \c AIP -- RF pre-amp (AIP on Kenwood, IPO on Yaesu, etc.) */ #define RIG_FUNC_APF CONSTANT_64BIT_FLAG (11) /*!< \c APF -- Audio Peak Filter */ #define RIG_FUNC_MON CONSTANT_64BIT_FLAG (12) /*!< \c MON -- Monitor transmitted signal */ #define RIG_FUNC_MN CONSTANT_64BIT_FLAG (13) /*!< \c MN -- Manual Notch */ #define RIG_FUNC_RF CONSTANT_64BIT_FLAG (14) /*!< \c RF -- RTTY Filter */ #define RIG_FUNC_ARO CONSTANT_64BIT_FLAG (15) /*!< \c ARO -- Auto Repeater Offset */ #define RIG_FUNC_LOCK CONSTANT_64BIT_FLAG (16) /*!< \c LOCK -- Lock */ #define RIG_FUNC_MUTE CONSTANT_64BIT_FLAG (17) /*!< \c MUTE -- Mute */ #define RIG_FUNC_VSC CONSTANT_64BIT_FLAG (18) /*!< \c VSC -- Voice Scan Control */ #define RIG_FUNC_REV CONSTANT_64BIT_FLAG (19) /*!< \c REV -- Reverse transmit and receive frequencies */ #define RIG_FUNC_SQL CONSTANT_64BIT_FLAG (20) /*!< \c SQL -- Turn Squelch Monitor on/off */ #define RIG_FUNC_ABM CONSTANT_64BIT_FLAG (21) /*!< \c ABM -- Auto Band Mode */ #define RIG_FUNC_BC CONSTANT_64BIT_FLAG (22) /*!< \c BC -- Beat Canceller */ #define RIG_FUNC_MBC CONSTANT_64BIT_FLAG (23) /*!< \c MBC -- Manual Beat Canceller */ #define RIG_FUNC_RIT CONSTANT_64BIT_FLAG (24) /*!< \c RIT -- Receiver Incremental Tuning */ #define RIG_FUNC_AFC CONSTANT_64BIT_FLAG (25) /*!< \c AFC -- Auto Frequency Control ON/OFF */ #define RIG_FUNC_SATMODE CONSTANT_64BIT_FLAG (26) /*!< \c SATMODE -- Satellite mode ON/OFF */ #define RIG_FUNC_SCOPE CONSTANT_64BIT_FLAG (27) /*!< \c SCOPE -- Simple bandscope ON/OFF */ #define RIG_FUNC_RESUME CONSTANT_64BIT_FLAG (28) /*!< \c RESUME -- Scan auto-resume */ #define RIG_FUNC_TBURST CONSTANT_64BIT_FLAG (29) /*!< \c TBURST -- 1750 Hz tone burst */ #define RIG_FUNC_TUNER CONSTANT_64BIT_FLAG (30) /*!< \c TUNER -- Enable automatic tuner */ #define RIG_FUNC_XIT CONSTANT_64BIT_FLAG (31) /*!< \c XIT -- Transmitter Incremental Tuning */ #ifndef SWIGLUAHIDE /* Hide the top 32 bits from the old Lua binding as they can't be represented */ #define RIG_FUNC_NB2 CONSTANT_64BIT_FLAG (32) /*!< \c NB2 -- 2nd Noise Blanker */ #define RIG_FUNC_CSQL CONSTANT_64BIT_FLAG (33) /*!< \c CSQL -- DCS Squelch setting */ #define RIG_FUNC_AFLT CONSTANT_64BIT_FLAG (34) /*!< \c AFLT -- AF Filter setting */ #define RIG_FUNC_ANL CONSTANT_64BIT_FLAG (35) /*!< \c ANL -- Noise limiter setting */ #define RIG_FUNC_BC2 CONSTANT_64BIT_FLAG (36) /*!< \c BC2 -- 2nd Beat Cancel */ #define RIG_FUNC_DUAL_WATCH CONSTANT_64BIT_FLAG (37) /*!< \c DUAL_WATCH -- Dual Watch / Sub Receiver */ #define RIG_FUNC_DIVERSITY CONSTANT_64BIT_FLAG (38) /*!< \c DIVERSITY -- Diversity receive */ #define RIG_FUNC_DSQL CONSTANT_64BIT_FLAG (39) /*!< \c DSQL -- Digital modes squelch */ #define RIG_FUNC_SCEN CONSTANT_64BIT_FLAG (40) /*!< \c SCEN -- scrambler/encryption */ #define RIG_FUNC_SLICE CONSTANT_64BIT_FLAG (41) /*!< \c Rig slice selection -- Flex */ #define RIG_FUNC_TRANSCEIVE CONSTANT_64BIT_FLAG (42) /*!< \c TRANSCEIVE -- Send radio state changes automatically ON/OFF */ #define RIG_FUNC_SPECTRUM CONSTANT_64BIT_FLAG (43) /*!< \c SPECTRUM -- Spectrum scope data output ON/OFF */ #define RIG_FUNC_SPECTRUM_HOLD CONSTANT_64BIT_FLAG (44) /*!< \c SPECTRUM_HOLD -- Pause spectrum scope updates ON/OFF */ #define RIG_FUNC_SEND_MORSE CONSTANT_64BIT_FLAG (45) /*!< \c SEND_MORSE -- Send specified characters using CW */ #define RIG_FUNC_SEND_VOICE_MEM CONSTANT_64BIT_FLAG (46) /*!< \c SEND_VOICE_MEM -- Transmit in SSB message stored in memory */ #define RIG_FUNC_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT51 CONSTANT_64BIT_FLAG (51) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT52 CONSTANT_64BIT_FLAG (52) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT53 CONSTANT_64BIT_FLAG (53) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT54 CONSTANT_64BIT_FLAG (54) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT55 CONSTANT_64BIT_FLAG (55) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT56 CONSTANT_64BIT_FLAG (56) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT57 CONSTANT_64BIT_FLAG (57) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT58 CONSTANT_64BIT_FLAG (58) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT59 CONSTANT_64BIT_FLAG (59) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT60 CONSTANT_64BIT_FLAG (60) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT61 CONSTANT_64BIT_FLAG (61) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT62 CONSTANT_64BIT_FLAG (62) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< \c available for future RIG_FUNC items */ /* 63 is this highest bit number that can be used */ #endif /** * \brief power unit macros * \def mW * Converts a power level integer to milliwatts. This is limited to 2 * megawatts on 32 bit systems. */ #define mW(p) ((int)(p)) /** * \brief power unit macros * \def Watts * * Converts a power level integer to watts. This is limited to 2 * gigawatts on 32 bit systems. */ #define Watts(p) ((int)((p)*1000)) /** * \brief power unit macros * \def W * * Same as Watts for the person who is too lazy to type Watts :-) */ #define W(p) Watts(p) #if 0 // deprecating kW macro as this doesn't make sense /** * \brief power unit macros * \def kW * * Same as Watts for the person who is too lazy to type Watts :-) */ #define kW(p) ((int)((p)*1000000L)) #endif /** * \brief Radio mode * * Various modes supported by a rig.\n * \c STRING used in rigctl * * \sa rig_parse_mode(), rig_strrmode() * TODO: Add new 8600 modes to rig2icom_mode() and icom2rig_mode() in frame.c */ typedef uint64_t rmode_t; #define RIG_MODE_NONE 0 /*!< '' -- None */ #define RIG_MODE_AM CONSTANT_64BIT_FLAG (0) /*!< \c AM -- Amplitude Modulation */ #define RIG_MODE_CW CONSTANT_64BIT_FLAG (1) /*!< \c CW -- CW "normal" sideband */ #define RIG_MODE_USB CONSTANT_64BIT_FLAG (2) /*!< \c USB -- Upper Side Band */ #define RIG_MODE_LSB CONSTANT_64BIT_FLAG (3) /*!< \c LSB -- Lower Side Band */ #define RIG_MODE_RTTY CONSTANT_64BIT_FLAG (4) /*!< \c RTTY -- Radio Teletype */ #define RIG_MODE_FM CONSTANT_64BIT_FLAG (5) /*!< \c FM -- "narrow" band FM */ #define RIG_MODE_WFM CONSTANT_64BIT_FLAG (6) /*!< \c WFM -- broadcast wide FM */ #define RIG_MODE_CWR CONSTANT_64BIT_FLAG (7) /*!< \c CWR -- CW "reverse" sideband */ #define RIG_MODE_RTTYR CONSTANT_64BIT_FLAG (8) /*!< \c RTTYR -- RTTY "reverse" sideband */ #define RIG_MODE_AMS CONSTANT_64BIT_FLAG (9) /*!< \c AMS -- Amplitude Modulation Synchronous */ #define RIG_MODE_PKTLSB CONSTANT_64BIT_FLAG (10) /*!< \c PKTLSB -- Packet/Digital LSB mode (dedicated port) */ #define RIG_MODE_PKTUSB CONSTANT_64BIT_FLAG (11) /*!< \c PKTUSB -- Packet/Digital USB mode (dedicated port) */ #define RIG_MODE_PKTFM CONSTANT_64BIT_FLAG (12) /*!< \c PKTFM -- Packet/Digital FM mode (dedicated port) */ #define RIG_MODE_ECSSUSB CONSTANT_64BIT_FLAG (13) /*!< \c ECSSUSB -- Exalted Carrier Single Sideband USB */ #define RIG_MODE_ECSSLSB CONSTANT_64BIT_FLAG (14) /*!< \c ECSSLSB -- Exalted Carrier Single Sideband LSB */ #define RIG_MODE_FAX CONSTANT_64BIT_FLAG (15) /*!< \c FAX -- Facsimile Mode */ #define RIG_MODE_SAM CONSTANT_64BIT_FLAG (16) /*!< \c SAM -- Synchronous AM double sideband */ #define RIG_MODE_SAL CONSTANT_64BIT_FLAG (17) /*!< \c SAL -- Synchronous AM lower sideband */ #define RIG_MODE_SAH CONSTANT_64BIT_FLAG (18) /*!< \c SAH -- Synchronous AM upper (higher) sideband */ #define RIG_MODE_DSB CONSTANT_64BIT_FLAG (19) /*!< \c DSB -- Double sideband suppressed carrier */ #define RIG_MODE_FMN CONSTANT_64BIT_FLAG (21) /*!< \c FMN -- FM Narrow Kenwood ts990s */ #define RIG_MODE_PKTAM CONSTANT_64BIT_FLAG (22) /*!< \c PKTAM -- Packet/Digital AM mode e.g. IC7300 */ #define RIG_MODE_P25 CONSTANT_64BIT_FLAG (23) /*!< \c P25 -- APCO/P25 VHF,UHF digital mode IC-R8600 */ #define RIG_MODE_DSTAR CONSTANT_64BIT_FLAG (24) /*!< \c D-Star -- VHF,UHF digital mode IC-R8600 */ #define RIG_MODE_DPMR CONSTANT_64BIT_FLAG (25) /*!< \c dPMR -- digital PMR, VHF,UHF digital mode IC-R8600 */ #define RIG_MODE_NXDNVN CONSTANT_64BIT_FLAG (26) /*!< \c NXDN-VN -- VHF,UHF digital mode IC-R8600 */ #define RIG_MODE_NXDN_N CONSTANT_64BIT_FLAG (27) /*!< \c NXDN-N -- VHF,UHF digital mode IC-R8600 */ #define RIG_MODE_DCR CONSTANT_64BIT_FLAG (28) /*!< \c DCR -- VHF,UHF digital mode IC-R8600 */ #define RIG_MODE_AMN CONSTANT_64BIT_FLAG (29) /*!< \c AM-N -- Narrow band AM mode IC-R30 */ #define RIG_MODE_PSK CONSTANT_64BIT_FLAG (30) /*!< \c PSK - Kenwood PSK and others */ #define RIG_MODE_PSKR CONSTANT_64BIT_FLAG (31) /*!< \c PSKR - Kenwood PSKR and others */ #ifndef SWIGLUAHIDE /* hide the top 32 bits from the Lua binding as they will not work */ #define RIG_MODE_DD CONSTANT_64BIT_FLAG (32) /*!< \c DD Mode IC-9700 */ #define RIG_MODE_C4FM CONSTANT_64BIT_FLAG (33) /*!< \c Yaesu C4FM mode */ #define RIG_MODE_PKTFMN CONSTANT_64BIT_FLAG (34) /*!< \c Yaesu DATA-FM-N */ #define RIG_MODE_SPEC CONSTANT_64BIT_FLAG (35) /*!< \c Unfiltered as in PowerSDR */ #define RIG_MODE_CWN CONSTANT_64BIT_FLAG (36) /*!< \c CWN -- Narrow band CW (FT-736R) */ #define RIG_MODE_IQ CONSTANT_64BIT_FLAG (37) /*!< \c IQ mode for a couple of kit rigs */ #define RIG_MODE_BIT38 CONSTANT_64BIT_FLAG (38) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT39 CONSTANT_64BIT_FLAG (39) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT40 CONSTANT_64BIT_FLAG (40) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT41 CONSTANT_64BIT_FLAG (41) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT42 CONSTANT_64BIT_FLAG (42) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT43 CONSTANT_64BIT_FLAG (43) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT44 CONSTANT_64BIT_FLAG (44) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT45 CONSTANT_64BIT_FLAG (45) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT46 CONSTANT_64BIT_FLAG (46) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT49 CONSTANT_64BIT_FLAG (49) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT50 CONSTANT_64BIT_FLAG (50) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT51 CONSTANT_64BIT_FLAG (51) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT52 CONSTANT_64BIT_FLAG (52) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT53 CONSTANT_64BIT_FLAG (53) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT54 CONSTANT_64BIT_FLAG (54) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT55 CONSTANT_64BIT_FLAG (55) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT56 CONSTANT_64BIT_FLAG (56) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT57 CONSTANT_64BIT_FLAG (57) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT58 CONSTANT_64BIT_FLAG (58) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT59 CONSTANT_64BIT_FLAG (59) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT60 CONSTANT_64BIT_FLAG (60) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT61 CONSTANT_64BIT_FLAG (61) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT62 CONSTANT_64BIT_FLAG (62) /*!< \c reserved for future expansion */ #define RIG_MODE_TESTS_MAX CONSTANT_64BIT_FLAG (63) /*!< \c last bit available for 64-bit enum MUST ALWAYS BE LAST, Max Count for dumpcaps.c */ #endif /** * \brief macro for backends, not to be used by rig_set_mode et al. */ #define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB) /** * \brief macro for backends, not to be used by rig_set_mode et al. */ #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB) //! @cond Doxygen_Suppress #define RIG_DBLST_END 0 /* end marker in a preamp/att level list */ #define RIG_IS_DBLST_END(d) ((d)==0) //! @endcond /** * \brief Frequency range * * Put together a group of this struct in an array to define * what frequencies your rig has access to. */ typedef struct freq_range_list { freq_t startf; /*!< Start frequency */ freq_t endf; /*!< End frequency */ rmode_t modes; /*!< Bit field of RIG_MODE's */ int low_power; /*!< Lower RF power in mW, -1 for no power (ie. rx list) */ int high_power; /*!< Higher RF power in mW, -1 for no power (ie. rx list) */ vfo_t vfo; /*!< VFO list equipped with this range */ ant_t ant; /*!< Antenna list equipped with this range, 0 means all, RIG_ANT_CURR means dedicated to certain bands and automatically switches, no set_ant command */ char *label; /*!< Label for this range that explains why. e.g. Icom rigs USA, EUR, ITR, TPE, KOR */ } freq_range_t; //! @cond Doxygen_Suppress #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE} #define RIG_IS_FRNG_END(r) ((r).startf == Hz(0) && (r).endf == Hz(0)) //! @endcond /** * \brief Tuning step definition * * Lists the tuning steps available for each mode. * * If a ts field in the list has RIG_TS_ANY value, this means the rig allows * its tuning step to be set to any value ranging from the lowest to the * highest (if any) value in the list for that mode. The tuning step must be * sorted in the ascending order, and the RIG_TS_ANY value, if present, must * be the last one in the list. * * Note also that the minimum frequency resolution of the rig is determined by * the lowest value in the Tuning step list. * * \sa rig_set_ts(), rig_get_resolution() */ struct tuning_step_list { rmode_t modes; /*!< Bit field of RIG_MODE's */ shortfreq_t ts; /*!< Tuning step in Hz */ }; //! @cond Doxygen_Suppress #define RIG_TS_ANY 0 #define RIG_TS_END {RIG_MODE_NONE, 0} #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0) //! @endcond /** * \brief Filter definition * * Lists the filters available for each mode. * * If more than one filter is available for a given mode, the first entry in * the array will be the default filter to use for the normal passband of this * mode. The first entry in the array below the default normal passband is * the default narrow passband and the first entry in the array above the * default normal passband is the default wide passband. Note: if there's no * lower width or upper width, then narrow or respectively wide passband is * equal to the default normal passband. * * If a width field in the list has RIG_FLT_ANY value, this means the rig * allows its passband width to be set to any value ranging from the lowest to * the highest value (if any) in the list for that mode. The RIG_FLT_ANY * value, if present, must be the last one in the list. * * The width field is the narrowest passband in a transmit/receive chain with * regard to different IF. * * \sa rig_set_mode(), rig_passband_normal(), rig_passband_narrow(), rig_passband_wide() */ struct filter_list { rmode_t modes; /*!< Bit field of RIG_MODE's */ pbwidth_t width; /*!< Passband width in Hz */ }; //! @cond Doxygen_Suppress #define RIG_FLT_ANY 0 #define RIG_FLT_END {RIG_MODE_NONE, 0} #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE) //! @endcond /** * \brief Empty channel_t.flags field */ #define RIG_CHFLAG_NONE 0 /** * \brief skip memory channel during scan (lock out), channel_t.flags */ #define RIG_CHFLAG_SKIP (1<<0) /** * \brief DATA port mode flag */ #define RIG_CHFLAG_DATA (1<<1) /** * \brief programmed skip (PSKIP) memory channel during scan (lock out), channel_t.flags */ #define RIG_CHFLAG_PSKIP (1<<2) /** * \brief Extension attribute definition * */ struct ext_list { token_t token; /*!< Token ID */ value_t val; /*!< Value */ }; //! @cond Doxygen_Suppress #define RIG_EXT_END {0, {.i=0}} #define RIG_IS_EXT_END(x) ((x).token == 0) //! @endcond /** * \brief Channel structure * * The channel struct stores all the attributes peculiar to a VFO. * * \sa rig_set_channel(), rig_get_channel() */ struct channel { int channel_num; /*!< Channel number */ int bank_num; /*!< Bank number */ vfo_t vfo; /*!< VFO */ ant_t ant; /*!< Selected antenna */ freq_t freq; /*!< Receive frequency */ rmode_t mode; /*!< Receive mode */ pbwidth_t width; /*!< Receive passband width associated with mode */ freq_t tx_freq; /*!< Transmit frequency */ rmode_t tx_mode; /*!< Transmit mode */ pbwidth_t tx_width; /*!< Transmit passband width associated with mode */ split_t split; /*!< Split mode */ vfo_t tx_vfo; /*!< Split transmit VFO */ rptr_shift_t rptr_shift; /*!< Repeater shift */ shortfreq_t rptr_offs; /*!< Repeater offset */ shortfreq_t tuning_step; /*!< Tuning step */ shortfreq_t rit; /*!< RIT */ shortfreq_t xit; /*!< XIT */ setting_t funcs; /*!< Function status */ value_t levels[RIG_SETTING_MAX]; /*!< Level values */ tone_t ctcss_tone; /*!< CTCSS tone */ tone_t ctcss_sql; /*!< CTCSS squelch tone */ tone_t dcs_code; /*!< DCS code */ tone_t dcs_sql; /*!< DCS squelch code */ int scan_group; /*!< Scan group */ unsigned int flags; /*!< Channel flags, see RIG_CHFLAG's */ char channel_desc[HAMLIB_MAXCHANDESC]; /*!< Name */ struct ext_list *ext_levels; /*!< Extension level value list, NULL ended. ext_levels can be NULL */ }; /** * \brief Channel structure typedef */ typedef struct channel channel_t; /** * \brief Channel capability definition * * Definition of the attributes that can be stored/retrieved in/from memory */ struct channel_cap { unsigned bank_num: 1; /*!< Bank number */ unsigned vfo: 1; /*!< VFO */ unsigned ant: 1; /*!< Selected antenna */ unsigned freq: 1; /*!< Receive frequency */ unsigned mode: 1; /*!< Receive mode */ unsigned width: 1; /*!< Receive passband width associated with mode */ unsigned tx_freq: 1; /*!< Transmit frequency */ unsigned tx_mode: 1; /*!< Transmit mode */ unsigned tx_width: 1; /*!< Transmit passband width associated with mode */ unsigned split: 1; /*!< Split mode */ unsigned tx_vfo: 1; /*!< Split transmit VFO */ unsigned rptr_shift: 1; /*!< Repeater shift */ unsigned rptr_offs: 1; /*!< Repeater offset */ unsigned tuning_step: 1; /*!< Tuning step */ unsigned rit: 1; /*!< RIT */ unsigned xit: 1; /*!< XIT */ setting_t funcs; /*!< Function status */ setting_t levels; /*!< Level values */ unsigned ctcss_tone: 1; /*!< CTCSS tone */ unsigned ctcss_sql: 1; /*!< CTCSS squelch tone */ unsigned dcs_code: 1; /*!< DCS code */ unsigned dcs_sql: 1; /*!< DCS squelch code */ unsigned scan_group: 1; /*!< Scan group */ unsigned flags: 1; /*!< Channel flags */ unsigned channel_desc: 1; /*!< Name */ unsigned ext_levels: 1; /*!< Extension level value list */ }; /** * \brief Channel cap */ typedef struct channel_cap channel_cap_t; /** * \brief Memory channel type definition * * Definition of memory types. Depending on the type, the content * of the memory channel has to be interpreted accordingly. * For instance, a RIG_MTYPE_EDGE channel_t will hold only a start * or stop frequency. * * \sa chan_list() */ typedef enum { RIG_MTYPE_NONE = 0, /*!< None */ RIG_MTYPE_MEM, /*!< Regular */ RIG_MTYPE_EDGE, /*!< Scan edge */ RIG_MTYPE_CALL, /*!< Call channel */ RIG_MTYPE_MEMOPAD, /*!< Memory pad */ RIG_MTYPE_SAT, /*!< Satellite */ RIG_MTYPE_BAND, /*!< VFO/Band channel */ RIG_MTYPE_PRIO /*!< Priority channel */ } chan_type_t; /** * \brief Memory channel list definition * * Example for the Ic706MkIIG (99 memory channels, 2 scan edges, 2 call chans): \code chan_t chan_list[] = { { 1, 99, RIG_MTYPE_MEM }, { 100, 103, RIG_MTYPE_EDGE }, { 104, 105, RIG_MTYPE_CALL }, RIG_CHAN_END } \endcode */ struct chan_list { int startc; /*!< Starting memory channel \b number */ int endc; /*!< Ending memory channel \b number */ chan_type_t type; /*!< Memory type. see chan_type_t */ channel_cap_t mem_caps; /*!< Definition of attributes that can be stored/retrieved */ }; //! @cond Doxygen_Suppress #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE} #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE) //! @endcond /** * \brief Special memory channel value to tell rig_lookup_mem_caps() to retrieve all the ranges */ #define RIG_MEM_CAPS_ALL -1 /** * \brief chan_t type */ typedef struct chan_list chan_t; /** * \brief level/parm granularity definition * * The granularity is undefined if min = 0, max = 0, and step = 0. * * For float settings, if min.f = 0 and max.f = 0 (and step.f! = 0), max.f is * assumed to be actually equal to 1.0. * * If step = 0 (and min and/or max are not null), then this means step can * have maximum resolution, depending on type (int or float). */ struct gran { value_t min; /*!< Minimum value */ value_t max; /*!< Maximum value */ value_t step; /*!< Step */ }; /** * \brief gran_t type */ typedef struct gran gran_t; /** * \brief Calibration table struct */ struct cal_table { int size; /*!< number of plots in the table */ struct { int raw; /*!< raw (A/D) value, as returned by \a RIG_LEVEL_RAWSTR */ int val; /*!< associated value, basically the measured dB value */ } table[HAMLIB_MAX_CAL_LENGTH]; /*!< table of plots */ }; /** * \brief calibration table type * * cal_table_t is a data type suited to hold linear calibration. * cal_table_t.size tells the number of plots cal_table_t.table contains. * * If a value is below or equal to cal_table_t.table[0].raw, * rig_raw2val() will return cal_table_t.table[0].val. * * If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw, * rig_raw2val() will return cal_table_t.table[cal_table_t.size-1].val. */ typedef struct cal_table cal_table_t; //! @cond Doxygen_Suppress #define EMPTY_STR_CAL { 0, { { 0, 0 }, } } //! @endcond Doxygen_Suppress /** * \brief Calibration table struct for float values */ struct cal_table_float { int size; /*!< number of plots in the table */ struct { int raw; /*!< raw (A/D) value */ float val; /*!< associated value */ } table[HAMLIB_MAX_CAL_LENGTH]; /*!< table of plots */ }; /** * \brief calibration table type for float values * * cal_table_float_t is a data type suited to hold linear calibration. * cal_table_float_t.size tells the number of plots cal_table_float_t.table contains. * * If a value is below or equal to cal_table_float_t.table[0].raw, * rig_raw2val_float() will return cal_table_float_t.table[0].val. * * If a value is greater or equal to cal_table_float_t.table[cal_table_float_t.size-1].raw, * rig_raw2val_float() will return cal_table_float_t.table[cal_table_float_t.size-1].val. */ typedef struct cal_table_float cal_table_float_t; //! @cond Doxygen_Suppress #define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } } typedef int (* chan_cb_t)(RIG *, channel_t **, int, const chan_t *, rig_ptr_t); typedef int (* confval_cb_t)(RIG *, const struct confparams *, value_t *, rig_ptr_t); //! @endcond /** * \brief Spectrum scope */ struct rig_spectrum_scope { int id; char *name; }; /** * \brief Spectrum scope modes */ enum rig_spectrum_mode_e { RIG_SPECTRUM_MODE_NONE = 0, RIG_SPECTRUM_MODE_CENTER, /*!< Spectrum scope centered around the VFO frequency */ RIG_SPECTRUM_MODE_FIXED, /*!< Spectrum scope edge frequencies are fixed */ RIG_SPECTRUM_MODE_CENTER_SCROLL, /*!< Spectrum scope edge frequencies are fixed, but identical to what the center mode would use. Scrolling is enabled. */ RIG_SPECTRUM_MODE_FIXED_SCROLL, /*!< Spectrum scope edge frequencies are fixed with scrolling enabled */ }; /** * \brief Spectrum scope averaging modes */ struct rig_spectrum_avg_mode { int id; char *name; }; /** * \brief Represents a single line of rig spectrum scope FFT data. * * The data levels specify the range of the spectrum scope FFT data. * The minimum level should represent the lowest numeric value and the lowest signal level in dB. * The maximum level should represent the highest numeric value and the highest signal level in dB. * The data level values are assumed to represent the dB strength scale in a linear way. * * Note that the data level and signal strength ranges may change depending on the settings of the rig. * At least on Kenwood the sub-scope provides different kind of data compared to the main scope. */ struct rig_spectrum_line { int id; /*!< Numeric ID of the spectrum scope data stream identifying the VFO/receiver. First ID is zero. Rigs with multiple scopes usually have identifiers, such as 0 = Main, 1 = Sub. */ int data_level_min; /*!< The numeric value that represents the minimum signal level. */ int data_level_max; /*!< The numeric value that represents the maximum signal level. */ double signal_strength_min; /*!< The strength of the minimum signal level in dB. */ double signal_strength_max; /*!< The strength of the maximum signal level in dB. */ enum rig_spectrum_mode_e spectrum_mode; /*!< Spectrum mode. */ freq_t center_freq; /*!< Center frequency of the spectrum scope in Hz in RIG_SPECTRUM_CENTER mode. */ freq_t span_freq; /*!< Span of the spectrum scope in Hz in RIG_SPECTRUM_CENTER mode. */ freq_t low_edge_freq; /*!< Low edge frequency of the spectrum scope in Hz in RIG_SPECTRUM_FIXED mode. */ freq_t high_edge_freq; /*!< High edge frequency of the spectrum scope in Hz in RIG_SPECTRUM_FIXED mode. */ size_t spectrum_data_length; /*!< Number of bytes of 8-bit spectrum data in the data buffer. The amount of data may vary if the rig has multiple spectrum scopes, depending on the scope. */ unsigned char *spectrum_data; /*!< 8-bit spectrum data covering bandwidth of either the span_freq in center mode or from low edge to high edge in fixed mode. A higher value represents higher signal strength. */ }; /** * \brief Rig data structure. * * Basic rig type, can store some useful info about different radios. Each * backend must be able to populate this structure, so we can make useful * inquiries about capabilities. * * The main idea of this struct is that it will be defined by the backend rig * driver, and will remain readonly for the application. Fields that need to * be modifiable by the application are copied into the struct rig_state, * which is a kind of private storage of the RIG instance. * * This way, you can have several rigs running within the same application, * sharing the struct rig_caps of the backend, while keeping their own * customized data. * * mdblack: Don't move or add fields around without bumping the version numbers * DLL or shared library replacement depends on order */ //! @cond Doxygen_Suppress #define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg #define HAMLIB_CHECK_RIG_CAPS "HAMLIB_CHECK_RIG_CAPS" struct rig_caps { rig_model_t rig_model; /*!< Rig model. */ const char *model_name; /*!< Model name. */ const char *mfg_name; /*!< Manufacturer. */ const char *version; /*!< Driver version. */ const char *copyright; /*!< Copyright info. */ enum rig_status_e status; /*!< Driver status. */ int rig_type; /*!< Rig type. */ ptt_type_t ptt_type; /*!< Type of the PTT port. */ dcd_type_t dcd_type; /*!< Type of the DCD port. */ rig_port_t port_type; /*!< Type of communication port. */ int serial_rate_min; /*!< Minimum serial speed. */ int serial_rate_max; /*!< Maximum serial speed. */ int serial_data_bits; /*!< Number of data bits. */ int serial_stop_bits; /*!< Number of stop bits. */ enum serial_parity_e serial_parity; /*!< Parity. */ enum serial_handshake_e serial_handshake; /*!< Handshake. */ int write_delay; /*!< Delay between each byte sent out, in mS */ int post_write_delay; /*!< Delay between each commands send out, in mS */ int timeout; /*!< Timeout, in mS */ int retry; /*!< Maximum number of retries if command fails, 0 to disable */ setting_t has_get_func; /*!< List of get functions */ setting_t has_set_func; /*!< List of set functions */ setting_t has_get_level; /*!< List of get level */ setting_t has_set_level; /*!< List of set level */ setting_t has_get_parm; /*!< List of get parm */ setting_t has_set_parm; /*!< List of set parm */ gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps) */ gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps) */ const struct confparams *extparms; /*!< Extension parm list, \sa ext.c */ const struct confparams *extlevels; /*!< Extension level list, \sa ext.c */ const struct confparams *extfuncs; /*!< Extension func list, \sa ext.c */ int *ext_tokens; /*!< Extension token list */ tone_t *ctcss_list; /*!< CTCSS tones list, zero ended */ tone_t *dcs_list; /*!< DCS code list, zero ended */ int preamp[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Attenuator list in dB, 0 terminated */ shortfreq_t max_rit; /*!< max absolute RIT */ shortfreq_t max_xit; /*!< max absolute XIT */ shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */ int agc_level_count; /*!< Number of supported AGC levels. Zero indicates all modes should be available (for backwards-compatibility). */ enum agc_level_e agc_levels[HAMLIB_MAX_AGC_LEVELS]; /*!< Supported AGC levels */ ann_t announces; /*!< Announces bit field list */ vfo_op_t vfo_ops; /*!< VFO op bit field list */ scan_t scan_ops; /*!< Scan bit field list */ int targetable_vfo; /*!< Bit field list of direct VFO access commands */ int transceive; /*!< \deprecated Use async_data_supported instead */ int bank_qty; /*!< Number of banks */ int chan_desc_sz; /*!< Max length of memory channel name */ chan_t chan_list[HAMLIB_CHANLSTSIZ]; /*!< Channel list, zero ended */ // As of 2020-02-12 we know of 5 models from Icom USA, EUR, ITR, TPE, KOR for the IC-9700 // So we currently have 5 ranges we need to deal with // The backend for the model should fill in the label field to explain what model it is // The the IC-9700 in ic7300.c for an example freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #1 */ freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #1 */ freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #2 */ freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #2 */ freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #3 */ freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #3 */ freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #4 */ freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #4 */ freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #5 */ freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #5 */ struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]; /*!< Tuning step list */ struct filter_list filters[HAMLIB_FLTLSTSIZ]; /*!< mode/filter table, at -6dB */ cal_table_t str_cal; /*!< S-meter calibration table */ cal_table_float_t swr_cal; /*!< SWR meter calibration table */ cal_table_float_t alc_cal; /*!< ALC meter calibration table */ cal_table_float_t rfpower_meter_cal; /*!< RF power meter calibration table */ cal_table_float_t comp_meter_cal; /*!< COMP meter calibration table */ cal_table_float_t vd_meter_cal; /*!< Voltage meter calibration table */ cal_table_float_t id_meter_cal; /*!< Current draw meter calibration table */ struct rig_spectrum_scope spectrum_scopes[HAMLIB_MAX_SPECTRUM_SCOPES]; /*!< Supported spectrum scopes. The array index must match the scope ID. Last entry must have NULL name. */ enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES]; /*!< Supported spectrum scope modes. Last entry must be RIG_SPECTRUM_MODE_NONE. */ freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS]; /*!< Supported spectrum scope frequency spans in Hz in center mode. Last entry must be 0. */ struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES]; /*!< Supported spectrum scope averaging modes. Last entry must have NULL name. */ int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Spectrum attenuator list in dB, 0 terminated */ const struct confparams *cfgparams; /*!< Configuration parameters. */ const rig_ptr_t priv; /*!< Private data. */ /* * Rig API * */ int (*rig_init)(RIG *rig); int (*rig_cleanup)(RIG *rig); int (*rig_open)(RIG *rig); int (*rig_close)(RIG *rig); /* * General API commands, from most primitive to least.. :() * List Set/Get functions pairs */ int (*set_freq)(RIG *rig, vfo_t vfo, freq_t freq); int (*get_freq)(RIG *rig, vfo_t vfo, freq_t *freq); int (*set_mode)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); int (*get_mode)(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); int (*set_vfo)(RIG *rig, vfo_t vfo); int (*get_vfo)(RIG *rig, vfo_t *vfo); int (*set_ptt)(RIG *rig, vfo_t vfo, ptt_t ptt); int (*get_ptt)(RIG *rig, vfo_t vfo, ptt_t *ptt); int (*get_dcd)(RIG *rig, vfo_t vfo, dcd_t *dcd); int (*set_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift); int (*get_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift); int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs); int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs); int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t tx_freq); int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *tx_freq); int (*set_split_mode)(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width); int (*get_split_mode)(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width); int (*set_split_freq_mode)(RIG *rig, vfo_t vfo, freq_t tx_freq, rmode_t tx_mode, pbwidth_t tx_width); int (*get_split_freq_mode)(RIG *rig, vfo_t vfo, freq_t *tx_freq, rmode_t *tx_mode, pbwidth_t *tx_width); int (*set_split_vfo)(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo); int (*get_split_vfo)(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo); int (*set_rit)(RIG *rig, vfo_t vfo, shortfreq_t rit); int (*get_rit)(RIG *rig, vfo_t vfo, shortfreq_t *rit); int (*set_xit)(RIG *rig, vfo_t vfo, shortfreq_t xit); int (*get_xit)(RIG *rig, vfo_t vfo, shortfreq_t *xit); int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts); int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts); int (*set_dcs_code)(RIG *rig, vfo_t vfo, tone_t code); int (*get_dcs_code)(RIG *rig, vfo_t vfo, tone_t *code); int (*set_tone)(RIG *rig, vfo_t vfo, tone_t tone); int (*get_tone)(RIG *rig, vfo_t vfo, tone_t *tone); int (*set_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t tone); int (*get_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t *tone); int (*set_dcs_sql)(RIG *rig, vfo_t vfo, tone_t code); int (*get_dcs_sql)(RIG *rig, vfo_t vfo, tone_t *code); int (*set_tone_sql)(RIG *rig, vfo_t vfo, tone_t tone); int (*get_tone_sql)(RIG *rig, vfo_t vfo, tone_t *tone); int (*set_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t tone); int (*get_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t *tone); int (*power2mW)(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode); int (*mW2power)(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode); int (*set_powerstat)(RIG *rig, powerstat_t status); int (*get_powerstat)(RIG *rig, powerstat_t *status); int (*reset)(RIG *rig, reset_t reset); int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t option); int (*get_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx); int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val); int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val); int (*set_func)(RIG *rig, vfo_t vfo, setting_t func, int status); int (*get_func)(RIG *rig, vfo_t vfo, setting_t func, int *status); int (*set_parm)(RIG *rig, setting_t parm, value_t val); int (*get_parm)(RIG *rig, setting_t parm, value_t *val); int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val); int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val); int (*set_ext_func)(RIG *rig, vfo_t vfo, token_t token, int status); int (*get_ext_func)(RIG *rig, vfo_t vfo, token_t token, int *status); int (*set_ext_parm)(RIG *rig, token_t token, value_t val); int (*get_ext_parm)(RIG *rig, token_t token, value_t *val); int (*set_conf)(RIG *rig, token_t token, const char *val); int (*get_conf)(RIG *rig, token_t token, char *val); int (*send_dtmf)(RIG *rig, vfo_t vfo, const char *digits); int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length); int (*send_morse)(RIG *rig, vfo_t vfo, const char *msg); int (*stop_morse)(RIG *rig, vfo_t vfo); int (*wait_morse)(RIG *rig, vfo_t vfo); int (*send_voice_mem)(RIG *rig, vfo_t vfo, int ch); int (*set_bank)(RIG *rig, vfo_t vfo, int bank); int (*set_mem)(RIG *rig, vfo_t vfo, int ch); int (*get_mem)(RIG *rig, vfo_t vfo, int *ch); int (*vfo_op)(RIG *rig, vfo_t vfo, vfo_op_t op); int (*scan)(RIG *rig, vfo_t vfo, scan_t scan, int ch); int (*set_trn)(RIG *rig, int trn); int (*get_trn)(RIG *rig, int *trn); int (*decode_event)(RIG *rig); int (*set_channel)(RIG *rig, vfo_t vfo, const channel_t *chan); int (*get_channel)(RIG *rig, vfo_t vfo, channel_t *chan, int read_only); const char * (*get_info)(RIG *rig); int (*set_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t); int (*get_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t); int (*set_mem_all_cb)(RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t); int (*get_mem_all_cb)(RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t); int (*set_vfo_opt)(RIG *rig, int status); // only for Net Rigctl device int (*rig_get_vfo_info) (RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split); int(*set_clock) (RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset); int(*get_clock) (RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset); const char *clone_combo_set; /*!< String describing key combination to enter load cloning mode */ const char *clone_combo_get; /*!< String describing key combination to enter save cloning mode */ const char *macro_name; /*!< Rig model macro name */ int async_data_supported; /*!< Indicates that rig is capable of outputting asynchronous data updates, such as transceive state updates or spectrum data. 1 if true, 0 otherwise. */ int (*read_frame_direct)(RIG *rig, size_t buffer_length, const unsigned char *buffer); int (*is_async_frame)(RIG *rig, size_t frame_length, const unsigned char *frame); int (*process_async_frame)(RIG *rig, size_t frame_length, const unsigned char *frame); // this will be used to check rigcaps structure is compatible with client char *hamlib_check_rig_caps; // a constant value we can check for hamlib integrity int (*get_conf2)(RIG *rig, token_t token, char *val, int val_len); int (*password)(RIG *rig, const char *key1); /*< Send encrypted password if rigctld is secured with -A/--password */ }; //! @endcond /** * \brief Enumeration of all rig_ functions * */ //! @cond Doxygen_Suppress // all functions enumerated for rig_get_function_ptr enum rig_function_e { RIG_FUNCTION_INIT, RIG_FUNCTION_CLEANUP, RIG_FUNCTION_OPEN, RIG_FUNCTION_CLOSE, RIG_FUNCTION_SET_FREQ, RIG_FUNCTION_GET_FREQ, RIG_FUNCTION_SET_MODE, RIG_FUNCTION_GET_MODE, RIG_FUNCTION_SET_VFO, RIG_FUNCTION_GET_VFO, RIG_FUNCTION_SET_PTT, RIG_FUNCTION_GET_PTT, RIG_FUNCTION_GET_DCD, RIG_FUNCTION_SET_RPTR_SHIFT, RIG_FUNCTION_GET_RPTR_SHIFT, RIG_FUNCTION_SET_RPTR_OFFS, RIG_FUNCTION_GET_RPTR_OFFS, RIG_FUNCTION_SET_SPLIT_FREQ, RIG_FUNCTION_GET_SPLIT_FREQ, RIG_FUNCTION_SET_SPLIT_MODE, RIG_FUNCTION_SET_SPLIT_FREQ_MODE, RIG_FUNCTION_GET_SPLIT_FREQ_MODE, RIG_FUNCTION_SET_SPLIT_VFO, RIG_FUNCTION_GET_SPLIT_VFO, RIG_FUNCTION_SET_RIT, RIG_FUNCTION_GET_RIT, RIG_FUNCTION_SET_XIT, RIG_FUNCTION_GET_XIT, RIG_FUNCTION_SET_TS, RIG_FUNCTION_GET_TS, RIG_FUNCTION_SET_DCS_CODE, RIG_FUNCTION_GET_DCS_CODE, RIG_FUNCTION_SET_TONE, RIG_FUNCTION_GET_TONE, RIG_FUNCTION_SET_CTCSS_TONE, RIG_FUNCTION_GET_CTCSS_TONE, RIG_FUNCTION_SET_DCS_SQL, RIG_FUNCTION_GET_DCS_SQL, RIG_FUNCTION_SET_TONE_SQL, RIG_FUNCTION_GET_TONE_SQL, RIG_FUNCTION_SET_CTCSS_SQL, RIG_FUNCTION_GET_CTCSS_SQL, RIG_FUNCTION_POWER2MW, RIG_FUNCTION_MW2POWER, RIG_FUNCTION_SET_POWERSTAT, RIG_FUNCTION_GET_POWERSTAT, RIG_FUNCTION_RESET, RIG_FUNCTION_SET_ANT, RIG_FUNCTION_GET_ANT, RIG_FUNCTION_SET_LEVEL, RIG_FUNCTION_GET_LEVEL, RIG_FUNCTION_SET_FUNC, RIG_FUNCTION_GET_FUNC, RIG_FUNCTION_SET_PARM, RIG_FUNCTION_GET_PARM, RIG_FUNCTION_SET_EXT_LEVEL, RIG_FUNCTION_GET_EXT_LEVEL, RIG_FUNCTION_SET_EXT_FUNC, RIG_FUNCTION_GET_EXT_FUNC, RIG_FUNCTION_SET_EXT_PARM, RIG_FUNCTION_GET_EXT_PARM, RIG_FUNCTION_SET_CONF, RIG_FUNCTION_GET_CONF, RIG_FUNCTION_SEND_DTMF, RIG_FUNCTION_SEND_MORSE, RIG_FUNCTION_STOP_MORSE, RIG_FUNCTION_WAIT_MORSE, RIG_FUNCTION_SEND_VOICE_MEM, RIG_FUNCTION_SET_BANK, RIG_FUNCTION_SET_MEM, RIG_FUNCTION_GET_MEM, RIG_FUNCTION_VFO_OP, RIG_FUNCTION_SCAN, RIG_FUNCTION_SET_TRN, RIG_FUNCTION_GET_TRN, RIG_FUNCTION_DECODE_EVENT, RIG_FUNCTION_SET_CHANNEL, RIG_FUNCTION_GET_CHANNEL, RIG_FUNCTION_GET_INFO, RIG_FUNCTION_SET_CHAN_ALL_CB, RIG_FUNCTION_GET_CHAN_ALL_CB, RIG_FUNCTION_SET_MEM_ALL_CB, RIG_FUNCTION_GET_MEM_ALL_CB, RIG_FUNCTION_SET_VFO_OPT, RIG_FUNCTION_READ_FRAME_DIRECT, RIG_FUNCTION_IS_ASYNC_FRAME, RIG_FUNCTION_PROCESS_ASYNC_FRAME, RIG_FUNCTION_GET_CONF2, }; /** * \brief Function to return pointer to rig_* function * */ //! @cond Doxygen_Suppress extern HAMLIB_EXPORT (void *) rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function); /** * \brief Enumeration of rig->caps values * */ //! @cond Doxygen_Suppress // values enumerated for rig->caps values enum rig_caps_int_e { RIG_CAPS_TARGETABLE_VFO, RIG_CAPS_RIG_MODEL, RIG_CAPS_PORT_TYPE, RIG_CAPS_PTT_TYPE, RIG_CAPS_HAS_GET_LEVEL }; enum rig_caps_cptr_e { RIG_CAPS_VERSION_CPTR, RIG_CAPS_MFG_NAME_CPTR, RIG_CAPS_MODEL_NAME_CPTR, RIG_CAPS_STATUS_CPTR }; /** * \brief Function to return int value from rig->caps * Does not support > 32-bit rig_caps values */ //! @cond Doxygen_Suppress extern HAMLIB_EXPORT (long long) rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps); /** * \brief Function to return char pointer value from rig->caps * */ //! @cond Doxygen_Suppress extern HAMLIB_EXPORT (const char *) rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps); struct hamlib_async_pipe; typedef struct hamlib_async_pipe hamlib_async_pipe_t; /** * \brief Port definition * * Of course, looks like OO painstakingly programmed in C, sigh. */ //! @cond Doxygen_Suppress // DO NOT CHANGE THIS STRUCTURE ALL UNTIL 5.0 // Right now it is static inside rig structure // 5.0 will change it to a pointer which can then be added to // At that point only add to the end of the stucture typedef struct hamlib_port { union { rig_port_t rig; /*!< Communication port type */ ptt_type_t ptt; /*!< PTT port type */ dcd_type_t dcd; /*!< DCD port type */ } type; int fd; /*!< File descriptor */ void *handle; /*!< handle for USB */ int write_delay; /*!< Delay between each byte sent out, in mS */ int post_write_delay; /*!< Delay between each commands send out, in mS */ struct { int tv_sec, tv_usec; } post_write_date; /*!< hamlib internal use */ int timeout; /*!< Timeout, in mS */ short retry; /*!< Maximum number of retries, 0 to disable */ short flushx; /*!< If true flush is done with read instead of TCFLUSH - MicroHam */ char pathname[HAMLIB_FILPATHLEN]; /*!< Port pathname */ union { struct { int rate; /*!< Serial baud rate */ int data_bits; /*!< Number of data bits */ int stop_bits; /*!< Number of stop bits */ enum serial_parity_e parity; /*!< Serial parity */ enum serial_handshake_e handshake; /*!< Serial handshake */ enum serial_control_state_e rts_state; /*!< RTS set state */ enum serial_control_state_e dtr_state; /*!< DTR set state */ } serial; /*!< serial attributes */ struct { int pin; /*!< Parallel port pin number */ } parallel; /*!< parallel attributes */ struct { int ptt_bitnum; /*!< Bit number for CM108 GPIO PTT */ } cm108; /*!< CM108 attributes */ struct { int vid; /*!< Vendor ID */ int pid; /*!< Product ID */ int conf; /*!< Configuration */ int iface; /*!< interface */ int alt; /*!< alternate */ char *vendor_name; /*!< Vendor name (opt.) */ char *product; /*!< Product (opt.) */ } usb; /*!< USB attributes */ struct { int on_value; /*!< GPIO: 1 == normal, GPION: 0 == inverted */ int value; /*!< Toggle PTT ON or OFF */ } gpio; /*!< GPIO attributes */ } parm; /*!< Port parameter union */ int client_port; /*!< client socket port for tcp connection */ RIG *rig; /*!< our parent RIG device */ int asyncio; /*!< enable asynchronous data handling if true -- async collides with python keyword so _async is used */ #if defined(_WIN32) hamlib_async_pipe_t *sync_data_pipe; /*!< pipe data structure for synchronous data */ hamlib_async_pipe_t *sync_data_error_pipe; /*!< pipe data structure for synchronous data error codes */ #else int fd_sync_write; /*!< file descriptor for writing synchronous data */ int fd_sync_read; /*!< file descriptor for reading synchronous data */ int fd_sync_error_write; /*!< file descriptor for writing synchronous data error codes */ int fd_sync_error_read; /*!< file descriptor for reading synchronous data error codes */ #endif } hamlib_port_t; // DO NOT CHANGE THIS STRUCTURE AT ALL // Will be removed in 5.0 typedef struct hamlib_port_deprecated { union { rig_port_t rig; /*!< Communication port type */ ptt_type_t ptt; /*!< PTT port type */ dcd_type_t dcd; /*!< DCD port type */ } type; int fd; /*!< File descriptor */ void *handle; /*!< handle for USB */ int write_delay; /*!< Delay between each byte sent out, in mS */ int post_write_delay; /*!< Delay between each commands send out, in mS */ struct { int tv_sec, tv_usec; } post_write_date; /*!< hamlib internal use */ int timeout; /*!< Timeout, in mS */ short retry; /*!< Maximum number of retries, 0 to disable */ short flushx; /*!< If true flush is done with read instead of TCFLUSH - MicroHam */ char pathname[HAMLIB_FILPATHLEN]; /*!< Port pathname */ union { struct { int rate; /*!< Serial baud rate */ int data_bits; /*!< Number of data bits */ int stop_bits; /*!< Number of stop bits */ enum serial_parity_e parity; /*!< Serial parity */ enum serial_handshake_e handshake; /*!< Serial handshake */ enum serial_control_state_e rts_state; /*!< RTS set state */ enum serial_control_state_e dtr_state; /*!< DTR set state */ } serial; /*!< serial attributes */ struct { int pin; /*!< Parallel port pin number */ } parallel; /*!< parallel attributes */ struct { int ptt_bitnum; /*!< Bit number for CM108 GPIO PTT */ } cm108; /*!< CM108 attributes */ struct { int vid; /*!< Vendor ID */ int pid; /*!< Product ID */ int conf; /*!< Configuration */ int iface; /*!< interface */ int alt; /*!< alternate */ char *vendor_name; /*!< Vendor name (opt.) */ char *product; /*!< Product (opt.) */ } usb; /*!< USB attributes */ struct { int on_value; /*!< GPIO: 1 == normal, GPION: 0 == inverted */ int value; /*!< Toggle PTT ON or OFF */ } gpio; /*!< GPIO attributes */ } parm; /*!< Port parameter union */ int client_port; /*!< client socket port for tcp connection */ RIG *rig; /*!< our parent RIG device */ } hamlib_port_t_deprecated; //! @endcond #if !defined(__APPLE__) || !defined(__cplusplus) typedef hamlib_port_t_deprecated port_t_deprecated; typedef hamlib_port_t port_t; #endif #define HAMLIB_ELAPSED_GET 0 #define HAMLIB_ELAPSED_SET 1 #define HAMLIB_ELAPSED_INVALIDATE 2 #define HAMLIB_CACHE_ALWAYS (-1) /*< value to set cache timeout to always use cache */ typedef enum { HAMLIB_CACHE_ALL, // to set all cache timeouts at once HAMLIB_CACHE_VFO, HAMLIB_CACHE_FREQ, HAMLIB_CACHE_MODE, HAMLIB_CACHE_PTT, HAMLIB_CACHE_SPLIT, HAMLIB_CACHE_WIDTH } hamlib_cache_t; typedef enum { TWIDDLE_OFF, TWIDDLE_ON } twiddle_state_t; /** * \brief Rig cache data * * This struct contains all the items we cache at the highest level */ struct rig_cache { int timeout_ms; // the cache timeout for invalidating itself vfo_t vfo; //freq_t freq; // to be deprecated in 4.1 when full Main/Sub/A/B caching is implemented in 4.1 // other abstraction here is based on dual vfo rigs and mapped to all others // So we have four possible states of rig // MainA, MainB, SubA, SubB // Main is the Main VFO and Sub is for the 2nd VFO // Most rigs have MainA and MainB // Dual VFO rigs can have SubA and SubB too // For dual VFO rigs simplex operations are all done on MainA/MainB -- ergo this abstraction freq_t freqCurr; // Other VFO freq_t freqOther; // Other VFO freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB freq_t freqMainC; // VFO_C, VFO_MAINC freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs freq_t freqMem; // VFO_MEM -- last MEM channel rmode_t modeCurr; rmode_t modeOther; rmode_t modeMainA; rmode_t modeMainB; rmode_t modeMainC; rmode_t modeSubA; rmode_t modeSubB; rmode_t modeSubC; rmode_t modeMem; pbwidth_t widthCurr; // if non-zero then rig has separate width for MainA pbwidth_t widthOther; // if non-zero then rig has separate width for MainA pbwidth_t widthMainA; // if non-zero then rig has separate width for MainA pbwidth_t widthMainB; // if non-zero then rig has separate width for MainB pbwidth_t widthMainC; // if non-zero then rig has separate width for MainC pbwidth_t widthSubA; // if non-zero then rig has separate width for SubA pbwidth_t widthSubB; // if non-zero then rig has separate width for SubB pbwidth_t widthSubC; // if non-zero then rig has separate width for SubC pbwidth_t widthMem; // if non-zero then rig has separate width for Mem ptt_t ptt; split_t split; vfo_t split_vfo; // split caches two values struct timespec time_freqCurr; struct timespec time_freqOther; struct timespec time_freqMainA; struct timespec time_freqMainB; struct timespec time_freqMainC; struct timespec time_freqSubA; struct timespec time_freqSubB; struct timespec time_freqSubC; struct timespec time_freqMem; struct timespec time_vfo; struct timespec time_modeCurr; struct timespec time_modeOther; struct timespec time_modeMainA; struct timespec time_modeMainB; struct timespec time_modeMainC; struct timespec time_modeSubA; struct timespec time_modeSubB; struct timespec time_modeSubC; struct timespec time_modeMem; struct timespec time_widthCurr; struct timespec time_widthOther; struct timespec time_widthMainA; struct timespec time_widthMainB; struct timespec time_widthMainC; struct timespec time_widthSubA; struct timespec time_widthSubB; struct timespec time_widthSubC; struct timespec time_widthMem; struct timespec time_ptt; struct timespec time_split; int satmode; // if rig is in satellite mode }; /** * \brief Rig state containing live data and customized fields. * * This struct contains live data, as well as a copy of capability fields * that may be updated (ie. customized) * * It is NOT fine to move fields around as it can break share library offset * As of 2021-03-03 vfo_list is the last known item being reference externally * So any additions or changes to this structure must be at the end of the structure */ struct rig_state { /********* ENSURE ANY NEW ITEMS ARE ADDED AT BOTTOM OF THIS STRUCTURE *********/ /* * overridable fields */ // moving the hamlib_port_t to the end of rig_state and making it a pointer // this should allow changes to hamlib_port_t without breaking shared libraries // these will maintain a copy of the new port_t for backwards compatiblity // to these offsets -- note these must stay until a major version update is done like 5.0 hamlib_port_t_deprecated rigport_deprecated; /*!< Rig port (internal use). */ hamlib_port_t_deprecated pttport_deprecated; /*!< PTT port (internal use). */ hamlib_port_t_deprecated dcdport_deprecated; /*!< DCD port (internal use). */ double vfo_comp; /*!< VFO compensation in PPM, 0.0 to disable */ int deprecated_itu_region; /*!< ITU region to select among freq_range_t */ freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list */ freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list */ struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]; /*!< Tuning step list */ struct filter_list filters[HAMLIB_FLTLSTSIZ]; /*!< Mode/filter table, at -6dB */ cal_table_t str_cal; /*!< S-meter calibration table */ chan_t chan_list[HAMLIB_CHANLSTSIZ]; /*!< Channel list, zero ended */ shortfreq_t max_rit; /*!< max absolute RIT */ shortfreq_t max_xit; /*!< max absolute XIT */ shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */ ann_t announces; /*!< Announces bit field list */ int preamp[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ setting_t has_get_func; /*!< List of get functions */ setting_t has_set_func; /*!< List of set functions */ setting_t has_get_level; /*!< List of get level */ setting_t has_set_level; /*!< List of set level */ setting_t has_get_parm; /*!< List of get parm */ setting_t has_set_parm; /*!< List of set parm */ gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity */ gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity */ /* * non overridable fields, internal use */ int transaction_active; /*!< set to 1 to inform the async reader thread that a synchronous command transaction is waiting for a response, otherwise 0 */ vfo_t current_vfo; /*!< VFO currently set */ int vfo_list; /*!< Complete list of VFO for this rig */ int comm_state; /*!< Comm port state, opened/closed. */ rig_ptr_t priv; /*!< Pointer to private rig state data. */ rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */ int async_data_enabled; /*!< Whether async data mode is enabled */ int poll_interval; /*!< Rig state polling period in milliseconds */ freq_t current_freq; /*!< Frequency currently set */ rmode_t current_mode; /*!< Mode currently set */ //rmode_t current_modeB; /*!< Mode currently set VFOB */ pbwidth_t current_width; /*!< Passband width currently set */ vfo_t tx_vfo; /*!< Tx VFO currently set */ rmode_t mode_list; /*!< Complete list of modes for this rig */ // mode_list is used by some // so anything added to this structure must be below here int transmit; /*!< rig should be transmitting i.e. hard wired PTT asserted - used by rigs that don't do CAT while in Tx */ freq_t lo_freq; /*!< Local oscillator frequency of any transverter */ time_t twiddle_time; /*!< time when vfo twiddling was detected */ int twiddle_timeout; /*!< timeout to resume from twiddling */ // uplink allows gpredict to behave better by no reading the uplink VFO int uplink; /*!< uplink=1 will not read Sub, uplink=2 will not read Main */ struct rig_cache cache; int vfo_opt; /*!< Is -o switch turned on? */ int auto_power_on; /*!< Allow Hamlib to power on rig automatically if supported */ int auto_power_off; /*!< Allow Hamlib to power off rig automatically if supported */ int auto_disable_screensaver; /*!< Allow Hamlib to disable the rig's screen saver automatically if supported */ int ptt_share; /*!< Share ptt port by open/close during get_ptt, set_ptt hogs the port while active */ int power_now; /*!< Current RF power level in rig units */ int power_min; /*!< Minimum RF power level in rig units */ int power_max; /*!< Maximum RF power level in rig units */ unsigned char disable_yaesu_bandselect; /*!< Disables Yaesu band select logic */ int twiddle_rit; /*!< Suppresses VFOB reading (cached value used) so RIT control can be used */ int twiddle_state; /*!< keeps track of twiddle status */ vfo_t rx_vfo; /*!< Rx VFO currently set */ volatile unsigned int snapshot_packet_sequence_number; volatile int multicast_publisher_run; void *multicast_publisher_priv_data; volatile int async_data_handler_thread_run; void *async_data_handler_priv_data; volatile int poll_routine_thread_run; void *poll_routine_priv_data; #ifdef HAVE_PTHREAD pthread_mutex_t mutex_set_transaction; #endif hamlib_port_t rigport; /*!< Rig port (internal use). */ hamlib_port_t pttport; /*!< PTT port (internal use). */ hamlib_port_t dcdport; /*!< DCD port (internal use). */ /********* DO NOT ADD or CHANGE anything (or than to rename) ABOVE THIS LINE *********/ /********* ENSURE ANY NEW ITEMS ARE ADDED AFTER HERE *********/ /* flags instructing the rig_get routines to use cached values when asyncio is in use */ int use_cached_freq; /*state.depth, spaces(), rig->state.depth, __func__, elapsed_ms(&__begin, HAMLIB_ELAPSED_GET)); // use this instead of snprintf for automatic detection of buffer limit #define SNPRINTF(s,n,...) { snprintf(s,n,##__VA_ARGS__);if (strlen(s) > n-1) fprintf(stderr,"****** %s(%d): buffer overflow ******\n", __func__, __LINE__); } extern HAMLIB_EXPORT(void) rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, const char *fmt, ...)); extern HAMLIB_EXPORT(vprintf_cb_t) rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, rig_ptr_t arg)); extern HAMLIB_EXPORT(FILE *) rig_set_debug_file HAMLIB_PARAMS((FILE *stream)); extern HAMLIB_EXPORT(int) rig_register HAMLIB_PARAMS((const struct rig_caps *caps)); extern HAMLIB_EXPORT(int) rig_unregister HAMLIB_PARAMS((rig_model_t rig_model)); extern HAMLIB_EXPORT(int) rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(int) rig_list_foreach_model HAMLIB_PARAMS((int (*cfunc)(const rig_model_t rig_model, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(int) rig_load_backend HAMLIB_PARAMS((const char *be_name)); extern HAMLIB_EXPORT(int) rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model)); extern HAMLIB_EXPORT(int) rig_load_all_backends HAMLIB_PARAMS((void)); typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t); extern HAMLIB_EXPORT(int) rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p, rig_probe_func_t, rig_ptr_t)); extern HAMLIB_EXPORT(rig_model_t) rig_probe HAMLIB_PARAMS((hamlib_port_t *p)); /* Misc calls */ extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode); extern HAMLIB_EXPORT(int) rig_strrmodes(rmode_t modes, char *buf, int buflen); extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo); extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t); extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t); extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t); extern HAMLIB_EXPORT(const char *) rig_stragclevel(enum agc_level_e level); extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcstr (char *agcString); extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcvalue (int agcValue); extern HAMLIB_EXPORT(value_t) rig_valueagclevel (enum agc_level_e agcLevel); extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t); extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op); extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan); extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status); extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype); extern HAMLIB_EXPORT(const char *) rig_strspectrummode(enum rig_spectrum_mode_e mode); extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s); extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s); extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s); extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s); extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s); extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s); extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s); extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s); extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s); extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS(()); extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS(()); extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(()); extern HAMLIB_EXPORT(void) rig_no_restore_ai(); extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection); extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms); extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status); extern HAMLIB_EXPORT(int) rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split, int *satmode); extern HAMLIB_EXPORT(int) rig_get_rig_info(RIG *rig, char *response, int max_response_len); extern HAMLIB_EXPORT(int) rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int * cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width); extern HAMLIB_EXPORT(int) rig_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset); extern HAMLIB_EXPORT(int) rig_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset); typedef unsigned long rig_useconds_t; extern HAMLIB_EXPORT(int) hl_usleep(rig_useconds_t msec); extern HAMLIB_EXPORT(int) rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie, int cookie_len); extern HAMLIB_EXPORT(int) rig_password(RIG *rig, const char *key1); extern HAMLIB_EXPORT(void) rig_password_generate_secret(char *pass, char result[HAMLIB_SECRET_LENGTH + 1]); extern HAMLIB_EXPORT(int) longlat2locator HAMLIB_PARAMS((double longitude, double latitude, char *locator_res, int pair_count)); extern HAMLIB_EXPORT(int) locator2longlat HAMLIB_PARAMS((double *longitude, double *latitude, const char *locator)); extern HAMLIB_EXPORT(char*) rig_make_md5(char *pass); //! @endcond __END_DECLS #endif /* _RIG_H */ /*! @} */ ================================================ FILE: software/hamlib-w64-4.5~git/include/hamlib/rig_dll.h ================================================ /* * Hamlib Win32 DLL build definitions * Copyright (c) 2001-2009 by Stephane Fillod * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ /* * Provide definitions to compile in Windows * using C-friendly options, e.g. * * HAMLIB_API -> __cdecl * HAMLIB_EXPORT, HAMLIB_EXPORT_VAR -> __declspec(dllexport) * BACKEND_EXPORT, BACKEND_EXPORT_VAR -> __declspec(dllexport) * * No effect in non-Windows environments. */ #if defined(_WIN32) && !defined(__CYGWIN__) # undef HAMLIB_IMPEXP # undef HAMLIB_CPP_IMPEXP # undef HAMLIB_API # undef HAMLIB_EXPORT # undef HAMLIB_EXPORT_VAR # undef BACKEND_EXPORT # undef BACKEND_EXPORT_VAR # undef HAMLIB_DLL_IMPORT # undef HAMLIB_DLL_EXPORT # if defined (__BORLANDC__) # define HAMLIB_DLL_IMPORT __import # define HAMLIB_DLL_EXPORT __export # else # define HAMLIB_DLL_IMPORT __declspec(dllimport) # define HAMLIB_DLL_EXPORT __declspec(dllexport) # endif # ifdef DLL_EXPORT /* HAMLIB_API may be set to __stdcall for VB, .. */ # define HAMLIB_API __cdecl # ifdef IN_HAMLIB # define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT # define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT # else # define HAMLIB_CPP_IMPEXP HAMLIB_DLL_IMPORT # define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT # endif # else /* static build, only export the backend entry points for lt_dlsym */ # define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT # endif #endif /* Take care of non-cygwin platforms */ #if !defined(HAMLIB_IMPEXP) # define HAMLIB_IMPEXP #endif #if !defined(HAMLIB_CPP_IMPEXP) # define HAMLIB_CPP_IMPEXP #endif #if !defined(HAMLIB_API) # define HAMLIB_API #endif #if !defined(HAMLIB_EXPORT) # define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API #endif #if !defined(HAMLIB_EXPORT_VAR) # define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type #endif #if !defined(BACKEND_EXPORT) # define BACKEND_EXPORT(type) HAMLIB_CPP_IMPEXP type HAMLIB_API #endif #if !defined(BACKEND_EXPORT_VAR) # define BACKEND_EXPORT_VAR(type) HAMLIB_CPP_IMPEXP type #endif ================================================ FILE: software/hamlib-w64-4.5~git/include/hamlib/riglist.h ================================================ /* * Hamlib Interface - list of known rigs * Copyright (c) 2000-2003 by Frank Singleton * Copyright (c) 2000-2015 by Stephane Fillod * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef _RIGLIST_H #define _RIGLIST_H 1 //! @cond Doxygen_Suppress // The rig model number is designed to fit in a 32-bit int // As of 2020-02-18 we have 33 backends defined // With a max of 1000 models per backend we get total a model number range of 1001-33001 // This MAX was 100 prior to 2020-02-18 and Icom was close to running out of the 100 range #define MAX_MODELS_PER_BACKEND 1000 #define RIG_MAKE_MODEL(a,b) ((a)*MAX_MODELS_PER_BACKEND+(b)) #define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND) /*! \file riglist.h * \brief Hamlib rig(radio) model definitions. * * This file contains rig model definitions for the Hamlib rig API. Each * distinct rig type has a unique model number (ID) and is used by hamlib to * identify and distinguish between the different hardware drivers. The * exact model numbers can be acquired using the macros in this file. To * obtain a list of supported rig branches, one can use the statically * defined RIG_BACKEND_LIST macro. To obtain a full list of supported rig * (including each model in every branch), the foreach_opened_rig() API * function can be used. * * The model number, or ID, is used to tell hamlib, which rig the client * whishes to use. It is done with the rig_init() API call. */ #define RIG_MODEL_NONE 0 /*! \def RIG_MODEL_DUMMY * \brief A macro that returns the model number for the dummy backend. * * The dummy backend, as the name suggests, is a backend which performs no * hardware operations and always behaves as one would expect. It can be * thought of as a hardware simulator and is very useful for testing client * applications. * * It has also been expanded to provide support to "virtual" type of rigs * such as the network rig control backend and W1HKJ's Flrig application. */ #define RIG_DUMMY 0 #define RIG_BACKEND_DUMMY "dummy" #define RIG_MODEL_DUMMY RIG_MAKE_MODEL(RIG_DUMMY, 1) #define RIG_MODEL_NETRIGCTL RIG_MAKE_MODEL(RIG_DUMMY, 2) #define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3) #define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4) #define RIG_MODEL_TRXMANAGER_RIG RIG_MAKE_MODEL(RIG_DUMMY, 5) #define RIG_MODEL_DUMMY_NOVFO RIG_MAKE_MODEL(RIG_DUMMY, 6) #define RIG_MODEL_TCI1X RIG_MAKE_MODEL(RIG_DUMMY, 7) /* * Yaesu */ #define RIG_YAESU 1 #define RIG_BACKEND_YAESU "yaesu" #define RIG_MODEL_FT847 RIG_MAKE_MODEL(RIG_YAESU, 1) #define RIG_MODEL_FT1000 RIG_MAKE_MODEL(RIG_YAESU, 2) #define RIG_MODEL_FT1000D RIG_MAKE_MODEL(RIG_YAESU, 3) #define RIG_MODEL_FT1000MPMKV RIG_MAKE_MODEL(RIG_YAESU, 4) #define RIG_MODEL_FT747 RIG_MAKE_MODEL(RIG_YAESU, 5) #define RIG_MODEL_FT757 RIG_MAKE_MODEL(RIG_YAESU, 6) #define RIG_MODEL_FT757GXII RIG_MAKE_MODEL(RIG_YAESU, 7) #define RIG_MODEL_FT575 RIG_MAKE_MODEL(RIG_YAESU, 8) #define RIG_MODEL_FT767 RIG_MAKE_MODEL(RIG_YAESU, 9) #define RIG_MODEL_FT736R RIG_MAKE_MODEL(RIG_YAESU, 10) #define RIG_MODEL_FT840 RIG_MAKE_MODEL(RIG_YAESU, 11) #define RIG_MODEL_FT820 RIG_MAKE_MODEL(RIG_YAESU, 12) #define RIG_MODEL_FT900 RIG_MAKE_MODEL(RIG_YAESU, 13) #define RIG_MODEL_FT920 RIG_MAKE_MODEL(RIG_YAESU, 14) #define RIG_MODEL_FT890 RIG_MAKE_MODEL(RIG_YAESU, 15) #define RIG_MODEL_FT990 RIG_MAKE_MODEL(RIG_YAESU, 16) #define RIG_MODEL_FRG100 RIG_MAKE_MODEL(RIG_YAESU, 17) #define RIG_MODEL_FRG9600 RIG_MAKE_MODEL(RIG_YAESU, 18) #define RIG_MODEL_FRG8800 RIG_MAKE_MODEL(RIG_YAESU, 19) #define RIG_MODEL_FT817 RIG_MAKE_MODEL(RIG_YAESU, 20) #define RIG_MODEL_FT100 RIG_MAKE_MODEL(RIG_YAESU, 21) #define RIG_MODEL_FT857 RIG_MAKE_MODEL(RIG_YAESU, 22) #define RIG_MODEL_FT897 RIG_MAKE_MODEL(RIG_YAESU, 23) #define RIG_MODEL_FT1000MP RIG_MAKE_MODEL(RIG_YAESU, 24) #define RIG_MODEL_FT1000MPMKVFLD RIG_MAKE_MODEL(RIG_YAESU, 25) #define RIG_MODEL_VR5000 RIG_MAKE_MODEL(RIG_YAESU, 26) #define RIG_MODEL_FT450 RIG_MAKE_MODEL(RIG_YAESU, 27) #define RIG_MODEL_FT950 RIG_MAKE_MODEL(RIG_YAESU, 28) #define RIG_MODEL_FT2000 RIG_MAKE_MODEL(RIG_YAESU, 29) #define RIG_MODEL_FT9000 RIG_MAKE_MODEL(RIG_YAESU, 30) #define RIG_MODEL_FT980 RIG_MAKE_MODEL(RIG_YAESU, 31) #define RIG_MODEL_FTDX5000 RIG_MAKE_MODEL(RIG_YAESU, 32) #define RIG_MODEL_VX1700 RIG_MAKE_MODEL(RIG_YAESU, 33) #define RIG_MODEL_FTDX1200 RIG_MAKE_MODEL(RIG_YAESU, 34) #define RIG_MODEL_FT991 RIG_MAKE_MODEL(RIG_YAESU, 35) #define RIG_MODEL_FT891 RIG_MAKE_MODEL(RIG_YAESU, 36) #define RIG_MODEL_FTDX3000 RIG_MAKE_MODEL(RIG_YAESU, 37) #define RIG_MODEL_FT847UNI RIG_MAKE_MODEL(RIG_YAESU, 38) #define RIG_MODEL_FT600 RIG_MAKE_MODEL(RIG_YAESU, 39) #define RIG_MODEL_FTDX101D RIG_MAKE_MODEL(RIG_YAESU, 40) #define RIG_MODEL_FT818 RIG_MAKE_MODEL(RIG_YAESU, 41) #define RIG_MODEL_FTDX10 RIG_MAKE_MODEL(RIG_YAESU, 42) #define RIG_MODEL_FT897D RIG_MAKE_MODEL(RIG_YAESU, 43) #define RIG_MODEL_FTDX101MP RIG_MAKE_MODEL(RIG_YAESU, 44) #define RIG_MODEL_MCHFQRP RIG_MAKE_MODEL(RIG_YAESU, 45) #define RIG_MODEL_FT450D RIG_MAKE_MODEL(RIG_YAESU, 46) /* * Kenwood */ #define RIG_KENWOOD 2 #define RIG_BACKEND_KENWOOD "kenwood" #define RIG_MODEL_TS50 RIG_MAKE_MODEL(RIG_KENWOOD, 1) #define RIG_MODEL_TS440 RIG_MAKE_MODEL(RIG_KENWOOD, 2) #define RIG_MODEL_TS450S RIG_MAKE_MODEL(RIG_KENWOOD, 3) #define RIG_MODEL_TS570D RIG_MAKE_MODEL(RIG_KENWOOD, 4) #define RIG_MODEL_TS690S RIG_MAKE_MODEL(RIG_KENWOOD, 5) #define RIG_MODEL_TS711 RIG_MAKE_MODEL(RIG_KENWOOD, 6) #define RIG_MODEL_TS790 RIG_MAKE_MODEL(RIG_KENWOOD, 7) #define RIG_MODEL_TS811 RIG_MAKE_MODEL(RIG_KENWOOD, 8) #define RIG_MODEL_TS850 RIG_MAKE_MODEL(RIG_KENWOOD, 9) #define RIG_MODEL_TS870S RIG_MAKE_MODEL(RIG_KENWOOD, 10) #define RIG_MODEL_TS940 RIG_MAKE_MODEL(RIG_KENWOOD, 11) #define RIG_MODEL_TS950S RIG_MAKE_MODEL(RIG_KENWOOD, 12) #define RIG_MODEL_TS950SDX RIG_MAKE_MODEL(RIG_KENWOOD, 13) #define RIG_MODEL_TS2000 RIG_MAKE_MODEL(RIG_KENWOOD, 14) #define RIG_MODEL_R5000 RIG_MAKE_MODEL(RIG_KENWOOD, 15) #define RIG_MODEL_TS570S RIG_MAKE_MODEL(RIG_KENWOOD, 16) #define RIG_MODEL_THD7A RIG_MAKE_MODEL(RIG_KENWOOD, 17) #define RIG_MODEL_THD7AG RIG_MAKE_MODEL(RIG_KENWOOD, 18) #define RIG_MODEL_THF6A RIG_MAKE_MODEL(RIG_KENWOOD, 19) #define RIG_MODEL_THF7E RIG_MAKE_MODEL(RIG_KENWOOD, 20) #define RIG_MODEL_K2 RIG_MAKE_MODEL(RIG_KENWOOD, 21) #define RIG_MODEL_TS930 RIG_MAKE_MODEL(RIG_KENWOOD, 22) #define RIG_MODEL_THG71 RIG_MAKE_MODEL(RIG_KENWOOD, 23) #define RIG_MODEL_TS680S RIG_MAKE_MODEL(RIG_KENWOOD, 24) #define RIG_MODEL_TS140S RIG_MAKE_MODEL(RIG_KENWOOD, 25) #define RIG_MODEL_TMD700 RIG_MAKE_MODEL(RIG_KENWOOD, 26) #define RIG_MODEL_TMV7 RIG_MAKE_MODEL(RIG_KENWOOD, 27) #define RIG_MODEL_TS480 RIG_MAKE_MODEL(RIG_KENWOOD, 28) #define RIG_MODEL_K3 RIG_MAKE_MODEL(RIG_KENWOOD, 29) #define RIG_MODEL_TRC80 RIG_MAKE_MODEL(RIG_KENWOOD, 30) #define RIG_MODEL_TS590S RIG_MAKE_MODEL(RIG_KENWOOD, 31) #define RIG_MODEL_TRANSFOX RIG_MAKE_MODEL(RIG_KENWOOD, 32) /* SigFox Transfox */ #define RIG_MODEL_THD72A RIG_MAKE_MODEL(RIG_KENWOOD, 33) #define RIG_MODEL_TMD710 RIG_MAKE_MODEL(RIG_KENWOOD, 34) #define RIG_MODEL_TMV71 RIG_MAKE_MODEL(RIG_KENWOOD, 35) #define RIG_MODEL_F6K RIG_MAKE_MODEL(RIG_KENWOOD, 36) /* Flex 6000 Series */ #define RIG_MODEL_TS590SG RIG_MAKE_MODEL(RIG_KENWOOD, 37) #define RIG_MODEL_XG3 RIG_MAKE_MODEL(RIG_KENWOOD, 38) /* Elecraft XG-3 signal generator */ #define RIG_MODEL_TS990S RIG_MAKE_MODEL(RIG_KENWOOD, 39) #define RIG_MODEL_HPSDR RIG_MAKE_MODEL(RIG_KENWOOD, 40) /* OpenHPSDR, PiHPSDR */ #define RIG_MODEL_TS890S RIG_MAKE_MODEL(RIG_KENWOOD, 41) #define RIG_MODEL_THD74 RIG_MAKE_MODEL(RIG_KENWOOD, 42) #define RIG_MODEL_K3S RIG_MAKE_MODEL(RIG_KENWOOD, 43) #define RIG_MODEL_KX2 RIG_MAKE_MODEL(RIG_KENWOOD, 44) #define RIG_MODEL_KX3 RIG_MAKE_MODEL(RIG_KENWOOD, 45) #define RIG_MODEL_PT8000A RIG_MAKE_MODEL(RIG_KENWOOD, 46) #define RIG_MODEL_K4 RIG_MAKE_MODEL(RIG_KENWOOD, 47) #define RIG_MODEL_POWERSDR RIG_MAKE_MODEL(RIG_KENWOOD, 48) #define RIG_MODEL_MALACHITE RIG_MAKE_MODEL(RIG_KENWOOD, 49) #define RIG_MODEL_LAB599_TX500 RIG_MAKE_MODEL(RIG_KENWOOD,50) #define RIG_MODEL_SDRUNO RIG_MAKE_MODEL(RIG_KENWOOD,51) /* * Icom */ #define RIG_ICOM 3 #define RIG_BACKEND_ICOM "icom" #define RIG_MODEL_IC1271 RIG_MAKE_MODEL(RIG_ICOM, 1) #define RIG_MODEL_IC1275 RIG_MAKE_MODEL(RIG_ICOM, 2) #define RIG_MODEL_IC271 RIG_MAKE_MODEL(RIG_ICOM, 3) #define RIG_MODEL_IC275 RIG_MAKE_MODEL(RIG_ICOM, 4) #define RIG_MODEL_IC375 RIG_MAKE_MODEL(RIG_ICOM, 5) #define RIG_MODEL_IC471 RIG_MAKE_MODEL(RIG_ICOM, 6) #define RIG_MODEL_IC475 RIG_MAKE_MODEL(RIG_ICOM, 7) #define RIG_MODEL_IC575 RIG_MAKE_MODEL(RIG_ICOM, 8) #define RIG_MODEL_IC706 RIG_MAKE_MODEL(RIG_ICOM, 9) #define RIG_MODEL_IC706MKII RIG_MAKE_MODEL(RIG_ICOM, 10) #define RIG_MODEL_IC706MKIIG RIG_MAKE_MODEL(RIG_ICOM, 11) #define RIG_MODEL_IC707 RIG_MAKE_MODEL(RIG_ICOM, 12) #define RIG_MODEL_IC718 RIG_MAKE_MODEL(RIG_ICOM, 13) #define RIG_MODEL_IC725 RIG_MAKE_MODEL(RIG_ICOM, 14) #define RIG_MODEL_IC726 RIG_MAKE_MODEL(RIG_ICOM, 15) #define RIG_MODEL_IC728 RIG_MAKE_MODEL(RIG_ICOM, 16) #define RIG_MODEL_IC729 RIG_MAKE_MODEL(RIG_ICOM, 17) #define RIG_MODEL_IC731 RIG_MAKE_MODEL(RIG_ICOM, 18) #define RIG_MODEL_IC735 RIG_MAKE_MODEL(RIG_ICOM, 19) #define RIG_MODEL_IC736 RIG_MAKE_MODEL(RIG_ICOM, 20) #define RIG_MODEL_IC737 RIG_MAKE_MODEL(RIG_ICOM, 21) #define RIG_MODEL_IC738 RIG_MAKE_MODEL(RIG_ICOM, 22) #define RIG_MODEL_IC746 RIG_MAKE_MODEL(RIG_ICOM, 23) #define RIG_MODEL_IC751 RIG_MAKE_MODEL(RIG_ICOM, 24) #define RIG_MODEL_IC751A RIG_MAKE_MODEL(RIG_ICOM, 25) #define RIG_MODEL_IC756 RIG_MAKE_MODEL(RIG_ICOM, 26) #define RIG_MODEL_IC756PRO RIG_MAKE_MODEL(RIG_ICOM, 27) #define RIG_MODEL_IC761 RIG_MAKE_MODEL(RIG_ICOM, 28) #define RIG_MODEL_IC765 RIG_MAKE_MODEL(RIG_ICOM, 29) #define RIG_MODEL_IC775 RIG_MAKE_MODEL(RIG_ICOM, 30) #define RIG_MODEL_IC781 RIG_MAKE_MODEL(RIG_ICOM, 31) #define RIG_MODEL_IC820 RIG_MAKE_MODEL(RIG_ICOM, 32) //#define RIG_MODEL_IC821 RIG_MAKE_MODEL(RIG_ICOM, 33) // not implemented and can be reused #define RIG_MODEL_IC821H RIG_MAKE_MODEL(RIG_ICOM, 34) #define RIG_MODEL_IC970 RIG_MAKE_MODEL(RIG_ICOM, 35) #define RIG_MODEL_ICR10 RIG_MAKE_MODEL(RIG_ICOM, 36) #define RIG_MODEL_ICR71 RIG_MAKE_MODEL(RIG_ICOM, 37) #define RIG_MODEL_ICR72 RIG_MAKE_MODEL(RIG_ICOM, 38) #define RIG_MODEL_ICR75 RIG_MAKE_MODEL(RIG_ICOM, 39) #define RIG_MODEL_ICR7000 RIG_MAKE_MODEL(RIG_ICOM, 40) #define RIG_MODEL_ICR7100 RIG_MAKE_MODEL(RIG_ICOM, 41) #define RIG_MODEL_ICR8500 RIG_MAKE_MODEL(RIG_ICOM, 42) #define RIG_MODEL_ICR9000 RIG_MAKE_MODEL(RIG_ICOM, 43) #define RIG_MODEL_IC910 RIG_MAKE_MODEL(RIG_ICOM, 44) #define RIG_MODEL_IC78 RIG_MAKE_MODEL(RIG_ICOM, 45) #define RIG_MODEL_IC746PRO RIG_MAKE_MODEL(RIG_ICOM, 46) #define RIG_MODEL_IC756PROII RIG_MAKE_MODEL(RIG_ICOM, 47) /* 48-53 defined below */ #define RIG_MODEL_ICID1 RIG_MAKE_MODEL(RIG_ICOM, 54) #define RIG_MODEL_IC703 RIG_MAKE_MODEL(RIG_ICOM, 55) #define RIG_MODEL_IC7800 RIG_MAKE_MODEL(RIG_ICOM, 56) #define RIG_MODEL_IC756PROIII RIG_MAKE_MODEL(RIG_ICOM, 57) #define RIG_MODEL_ICR20 RIG_MAKE_MODEL(RIG_ICOM, 58) /* 59 defined below */ #define RIG_MODEL_IC7000 RIG_MAKE_MODEL(RIG_ICOM, 60) #define RIG_MODEL_IC7200 RIG_MAKE_MODEL(RIG_ICOM, 61) #define RIG_MODEL_IC7700 RIG_MAKE_MODEL(RIG_ICOM, 62) #define RIG_MODEL_IC7600 RIG_MAKE_MODEL(RIG_ICOM, 63) /* 64 defined below */ #define RIG_MODEL_IC92D RIG_MAKE_MODEL(RIG_ICOM, 65) #define RIG_MODEL_ICR9500 RIG_MAKE_MODEL(RIG_ICOM, 66) #define RIG_MODEL_IC7410 RIG_MAKE_MODEL(RIG_ICOM, 67) #define RIG_MODEL_IC9100 RIG_MAKE_MODEL(RIG_ICOM, 68) #define RIG_MODEL_ICRX7 RIG_MAKE_MODEL(RIG_ICOM, 69) #define RIG_MODEL_IC7100 RIG_MAKE_MODEL(RIG_ICOM, 70) #define RIG_MODEL_ID5100 RIG_MAKE_MODEL(RIG_ICOM, 71) #define RIG_MODEL_IC2730 RIG_MAKE_MODEL(RIG_ICOM, 72) #define RIG_MODEL_IC7300 RIG_MAKE_MODEL(RIG_ICOM, 73) #define RIG_MODEL_PERSEUS RIG_MAKE_MODEL(RIG_ICOM, 74) #define RIG_MODEL_IC785x RIG_MAKE_MODEL(RIG_ICOM, 75) #define RIG_MODEL_X108G RIG_MAKE_MODEL(RIG_ICOM, 76) /* Xiegu X108 */ #define RIG_MODEL_ICR6 RIG_MAKE_MODEL(RIG_ICOM, 77) #define RIG_MODEL_IC7610 RIG_MAKE_MODEL(RIG_ICOM, 78) #define RIG_MODEL_ICR8600 RIG_MAKE_MODEL(RIG_ICOM, 79) #define RIG_MODEL_ICR30 RIG_MAKE_MODEL(RIG_ICOM, 80) #define RIG_MODEL_IC9700 RIG_MAKE_MODEL(RIG_ICOM, 81) #define RIG_MODEL_ID4100 RIG_MAKE_MODEL(RIG_ICOM, 82) #define RIG_MODEL_ID31 RIG_MAKE_MODEL(RIG_ICOM, 83) #define RIG_MODEL_ID51 RIG_MAKE_MODEL(RIG_ICOM, 84) #define RIG_MODEL_IC705 RIG_MAKE_MODEL(RIG_ICOM, 85) #define RIG_MODEL_ICF8101 RIG_MAKE_MODEL(RIG_ICOM, 86) #define RIG_MODEL_X6100 RIG_MAKE_MODEL(RIG_ICOM, 87) /* Xiegu X6100 */ #define RIG_MODEL_G90 RIG_MAKE_MODEL(RIG_ICOM, 88) /* Xiegu G90 */ /* * Optoelectronics (CI-V) */ #define RIG_MODEL_MINISCOUT RIG_MAKE_MODEL(RIG_ICOM, 48) #define RIG_MODEL_XPLORER RIG_MAKE_MODEL(RIG_ICOM, 49) #define RIG_MODEL_OS535 RIG_MAKE_MODEL(RIG_ICOM, 52) #define RIG_MODEL_OS456 RIG_MAKE_MODEL(RIG_ICOM, 53) /* * TenTec (CI-V) */ #define RIG_MODEL_OMNIVI RIG_MAKE_MODEL(RIG_ICOM, 50) #define RIG_MODEL_OMNIVIP RIG_MAKE_MODEL(RIG_ICOM, 51) /* OMNI-VI+ */ #define RIG_MODEL_PARAGON2 RIG_MAKE_MODEL(RIG_ICOM, 59) #define RIG_MODEL_DELTAII RIG_MAKE_MODEL(RIG_ICOM, 64) /* * Icom PCR */ #define RIG_PCR 4 #define RIG_BACKEND_PCR "pcr" #define RIG_MODEL_PCR1000 RIG_MAKE_MODEL(RIG_PCR, 1) #define RIG_MODEL_PCR100 RIG_MAKE_MODEL(RIG_PCR, 2) #define RIG_MODEL_PCR1500 RIG_MAKE_MODEL(RIG_PCR, 3) #define RIG_MODEL_PCR2500 RIG_MAKE_MODEL(RIG_PCR, 4) /* * AOR */ #define RIG_AOR 5 #define RIG_BACKEND_AOR "aor" #define RIG_MODEL_AR8200 RIG_MAKE_MODEL(RIG_AOR, 1) #define RIG_MODEL_AR8000 RIG_MAKE_MODEL(RIG_AOR, 2) #define RIG_MODEL_AR7030 RIG_MAKE_MODEL(RIG_AOR, 3) #define RIG_MODEL_AR5000 RIG_MAKE_MODEL(RIG_AOR, 4) #define RIG_MODEL_AR3030 RIG_MAKE_MODEL(RIG_AOR, 5) #define RIG_MODEL_AR3000A RIG_MAKE_MODEL(RIG_AOR, 6) #define RIG_MODEL_AR3000 RIG_MAKE_MODEL(RIG_AOR, 7) #define RIG_MODEL_AR2700 RIG_MAKE_MODEL(RIG_AOR, 8) #define RIG_MODEL_AR2500 RIG_MAKE_MODEL(RIG_AOR, 9) #define RIG_MODEL_AR16 RIG_MAKE_MODEL(RIG_AOR, 10) #define RIG_MODEL_SDU5500 RIG_MAKE_MODEL(RIG_AOR, 11) #define RIG_MODEL_SDU5000 RIG_MAKE_MODEL(RIG_AOR, 12) #define RIG_MODEL_AR8600 RIG_MAKE_MODEL(RIG_AOR, 13) #define RIG_MODEL_AR5000A RIG_MAKE_MODEL(RIG_AOR, 14) #define RIG_MODEL_AR7030P RIG_MAKE_MODEL(RIG_AOR, 15) #define RIG_MODEL_SR2200 RIG_MAKE_MODEL(RIG_AOR, 16) /* * JRC */ #define RIG_JRC 6 #define RIG_BACKEND_JRC "jrc" #define RIG_MODEL_JST145 RIG_MAKE_MODEL(RIG_JRC, 1) #define RIG_MODEL_JST245 RIG_MAKE_MODEL(RIG_JRC, 2) #define RIG_MODEL_CMH530 RIG_MAKE_MODEL(RIG_JRC, 3) #define RIG_MODEL_NRD345 RIG_MAKE_MODEL(RIG_JRC, 4) #define RIG_MODEL_NRD525 RIG_MAKE_MODEL(RIG_JRC, 5) #define RIG_MODEL_NRD535 RIG_MAKE_MODEL(RIG_JRC, 6) #define RIG_MODEL_NRD545 RIG_MAKE_MODEL(RIG_JRC, 7) /* * Radio Shack * Actually, they might be either Icom or Uniden. TBC --SF */ #define RIG_RADIOSHACK 7 #define RIG_BACKEND_RADIOSHACK "radioshack" #define RIG_MODEL_RS64 RIG_MAKE_MODEL(RIG_RADIOSHACK, 1) /* PRO-64 */ #define RIG_MODEL_RS2005 RIG_MAKE_MODEL(RIG_RADIOSHACK, 2) /* w/ OptoElectronics OS456 Board */ #define RIG_MODEL_RS2006 RIG_MAKE_MODEL(RIG_RADIOSHACK, 3) /* w/ OptoElectronics OS456 Board */ #define RIG_MODEL_RS2035 RIG_MAKE_MODEL(RIG_RADIOSHACK, 4) /* w/ OptoElectronics OS435 Board */ #define RIG_MODEL_RS2042 RIG_MAKE_MODEL(RIG_RADIOSHACK, 5) /* w/ OptoElectronics OS435 Board */ #define RIG_MODEL_RS2041 RIG_MAKE_MODEL(RIG_RADIOSHACK, 6) /* PRO-2041 */ /* * Uniden */ #define RIG_UNIDEN 8 #define RIG_BACKEND_UNIDEN "uniden" #define RIG_MODEL_BC780 RIG_MAKE_MODEL(RIG_UNIDEN, 1) /* Uniden BC780 - Trunk Tracker "Desktop Radio" */ #define RIG_MODEL_BC245 RIG_MAKE_MODEL(RIG_UNIDEN, 2) #define RIG_MODEL_BC895 RIG_MAKE_MODEL(RIG_UNIDEN, 3) #define RIG_MODEL_PRO2052 RIG_MAKE_MODEL(RIG_UNIDEN, 4) /* Radio Shack PRO-2052 */ #define RIG_MODEL_BC235 RIG_MAKE_MODEL(RIG_UNIDEN, 5) #define RIG_MODEL_BC250 RIG_MAKE_MODEL(RIG_UNIDEN, 6) #define RIG_MODEL_BC785 RIG_MAKE_MODEL(RIG_UNIDEN, 7) #define RIG_MODEL_BC786 RIG_MAKE_MODEL(RIG_UNIDEN, 8) #define RIG_MODEL_BCT8 RIG_MAKE_MODEL(RIG_UNIDEN, 9) #define RIG_MODEL_BCD396T RIG_MAKE_MODEL(RIG_UNIDEN, 10) #define RIG_MODEL_BCD996T RIG_MAKE_MODEL(RIG_UNIDEN, 11) #define RIG_MODEL_BC898 RIG_MAKE_MODEL(RIG_UNIDEN, 12) /* * Drake */ #define RIG_DRAKE 9 #define RIG_BACKEND_DRAKE "drake" #define RIG_MODEL_DKR8 RIG_MAKE_MODEL(RIG_DRAKE, 1) #define RIG_MODEL_DKR8A RIG_MAKE_MODEL(RIG_DRAKE, 2) #define RIG_MODEL_DKR8B RIG_MAKE_MODEL(RIG_DRAKE, 3) /* * Lowe */ #define RIG_LOWE 10 #define RIG_BACKEND_LOWE "lowe" #define RIG_MODEL_HF150 RIG_MAKE_MODEL(RIG_LOWE, 1) #define RIG_MODEL_HF225 RIG_MAKE_MODEL(RIG_LOWE, 2) #define RIG_MODEL_HF250 RIG_MAKE_MODEL(RIG_LOWE, 3) #define RIG_MODEL_HF235 RIG_MAKE_MODEL(RIG_LOWE, 4) /* * Racal */ #define RIG_RACAL 11 #define RIG_BACKEND_RACAL "racal" #define RIG_MODEL_RA3790 RIG_MAKE_MODEL(RIG_RACAL, 1) #define RIG_MODEL_RA3720 RIG_MAKE_MODEL(RIG_RACAL, 2) #define RIG_MODEL_RA6790 RIG_MAKE_MODEL(RIG_RACAL, 3) #define RIG_MODEL_RA3710 RIG_MAKE_MODEL(RIG_RACAL, 4) #define RIG_MODEL_RA3702 RIG_MAKE_MODEL(RIG_RACAL, 5) /* * Watkins-Johnson */ #define RIG_WJ 12 #define RIG_BACKEND_WJ "wj" #define RIG_MODEL_HF1000 RIG_MAKE_MODEL(RIG_WJ, 1) #define RIG_MODEL_HF1000A RIG_MAKE_MODEL(RIG_WJ, 2) #define RIG_MODEL_WJ8711 RIG_MAKE_MODEL(RIG_WJ, 3) #define RIG_MODEL_WJ8888 RIG_MAKE_MODEL(RIG_WJ, 4) /* * Rohde & Schwarz--ek */ #define RIG_EK 13 #define RIG_BACKEND_EK "ek" #define RIG_MODEL_ESM500 RIG_MAKE_MODEL(RIG_EK, 1) #define RIG_MODEL_EK890 RIG_MAKE_MODEL(RIG_EK, 2) #define RIG_MODEL_EK891 RIG_MAKE_MODEL(RIG_EK, 3) #define RIG_MODEL_EK895 RIG_MAKE_MODEL(RIG_EK, 4) #define RIG_MODEL_EK070 RIG_MAKE_MODEL(RIG_EK, 5) /* * Skanti */ #define RIG_SKANTI 14 #define RIG_BACKEND_SKANTI "skanti" #define RIG_MODEL_TRP7000 RIG_MAKE_MODEL(RIG_SKANTI, 1) #define RIG_MODEL_TRP8000 RIG_MAKE_MODEL(RIG_SKANTI, 2) #define RIG_MODEL_TRP9000 RIG_MAKE_MODEL(RIG_SKANTI, 3) #define RIG_MODEL_TRP8255 RIG_MAKE_MODEL(RIG_SKANTI, 4) /* * WiNRADiO/LinRADiO */ #define RIG_WINRADIO 15 #define RIG_BACKEND_WINRADIO "winradio" #define RIG_MODEL_WR1000 RIG_MAKE_MODEL(RIG_WINRADIO, 1) #define RIG_MODEL_WR1500 RIG_MAKE_MODEL(RIG_WINRADIO, 2) #define RIG_MODEL_WR1550 RIG_MAKE_MODEL(RIG_WINRADIO, 3) #define RIG_MODEL_WR3100 RIG_MAKE_MODEL(RIG_WINRADIO, 4) #define RIG_MODEL_WR3150 RIG_MAKE_MODEL(RIG_WINRADIO, 5) #define RIG_MODEL_WR3500 RIG_MAKE_MODEL(RIG_WINRADIO, 6) #define RIG_MODEL_WR3700 RIG_MAKE_MODEL(RIG_WINRADIO, 7) #define RIG_MODEL_G303 RIG_MAKE_MODEL(RIG_WINRADIO, 8) #define RIG_MODEL_G313 RIG_MAKE_MODEL(RIG_WINRADIO, 9) #define RIG_MODEL_G305 RIG_MAKE_MODEL(RIG_WINRADIO, 10) #define RIG_MODEL_G315 RIG_MAKE_MODEL(RIG_WINRADIO, 11) /* * Ten Tec */ #define RIG_TENTEC 16 #define RIG_BACKEND_TENTEC "tentec" #define RIG_MODEL_TT550 RIG_MAKE_MODEL(RIG_TENTEC, 1) /* Pegasus */ #define RIG_MODEL_TT538 RIG_MAKE_MODEL(RIG_TENTEC, 2) /* Jupiter */ #define RIG_MODEL_RX320 RIG_MAKE_MODEL(RIG_TENTEC, 3) #define RIG_MODEL_RX340 RIG_MAKE_MODEL(RIG_TENTEC, 4) #define RIG_MODEL_RX350 RIG_MAKE_MODEL(RIG_TENTEC, 5) #define RIG_MODEL_TT526 RIG_MAKE_MODEL(RIG_TENTEC, 6) /* 6N2 */ #define RIG_MODEL_TT516 RIG_MAKE_MODEL(RIG_TENTEC, 7) /* Argonaut V */ #define RIG_MODEL_TT565 RIG_MAKE_MODEL(RIG_TENTEC, 8) /* Orion */ #define RIG_MODEL_TT585 RIG_MAKE_MODEL(RIG_TENTEC, 9) /* Paragon */ #define RIG_MODEL_TT588 RIG_MAKE_MODEL(RIG_TENTEC, 11) /* Omni-VII */ #define RIG_MODEL_RX331 RIG_MAKE_MODEL(RIG_TENTEC, 12) #define RIG_MODEL_TT599 RIG_MAKE_MODEL(RIG_TENTEC, 13) /* Eagle */ /* * Alinco */ #define RIG_ALINCO 17 #define RIG_BACKEND_ALINCO "alinco" #define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1) #define RIG_MODEL_DXSR8 RIG_MAKE_MODEL(RIG_ALINCO, 2) /* * Kachina */ #define RIG_KACHINA 18 #define RIG_BACKEND_KACHINA "kachina" #define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1) /* * Gnuradio backend */ #define RIG_GNURADIO 20 #define RIG_BACKEND_GNURADIO "gnuradio" #define RIG_MODEL_GNURADIO RIG_MAKE_MODEL(RIG_GNURADIO, 1) /* dev model, Chirp source */ #define RIG_MODEL_MC4020 RIG_MAKE_MODEL(RIG_GNURADIO, 2) /* MC4020 */ #define RIG_MODEL_GRAUDIO RIG_MAKE_MODEL(RIG_GNURADIO, 3) /* Sound card source */ #define RIG_MODEL_GRAUDIOIQ RIG_MAKE_MODEL(RIG_GNURADIO, 4) /* I&Q stereo sound card source */ #define RIG_MODEL_USRP_G RIG_MAKE_MODEL(RIG_GNURADIO, 5) /* Universal Software Radio Peripheral */ /* * Microtune tuners */ #define RIG_MICROTUNE 21 #define RIG_BACKEND_MICROTUNE "microtune" #define RIG_MODEL_MICROTUNE_4937 RIG_MAKE_MODEL(RIG_MICROTUNE, 1) /* eval board */ #define RIG_MODEL_MICROTUNE_4702 RIG_MAKE_MODEL(RIG_MICROTUNE, 2) /* Alan's */ #define RIG_MODEL_MICROTUNE_4707 RIG_MAKE_MODEL(RIG_MICROTUNE, 3) /* * TAPR */ #define RIG_TAPR 22 #define RIG_BACKEND_TAPR "tapr" #define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1) /* * Flex-radio */ #define RIG_FLEXRADIO 23 #define RIG_BACKEND_FLEXRADIO "flexradio" #define RIG_MODEL_SDR1000 RIG_MAKE_MODEL(RIG_FLEXRADIO, 1) #define RIG_MODEL_SDR1000RFE RIG_MAKE_MODEL(RIG_FLEXRADIO, 2) #define RIG_MODEL_DTTSP RIG_MAKE_MODEL(RIG_FLEXRADIO, 3) #define RIG_MODEL_DTTSP_UDP RIG_MAKE_MODEL(RIG_FLEXRADIO, 4) /* * VEB Funkwerk Köpenick RFT */ #define RIG_RFT 24 #define RIG_BACKEND_RFT "rft" #define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1) /* * Various kits */ #define RIG_KIT 25 #define RIG_BACKEND_KIT "kit" #define RIG_MODEL_ELEKTOR304 RIG_MAKE_MODEL(RIG_KIT, 1) #define RIG_MODEL_DRT1 RIG_MAKE_MODEL(RIG_KIT, 2) #define RIG_MODEL_DWT RIG_MAKE_MODEL(RIG_KIT, 3) #define RIG_MODEL_USRP0 RIG_MAKE_MODEL(RIG_KIT, 4) /* prototype */ #define RIG_MODEL_USRP RIG_MAKE_MODEL(RIG_KIT, 5) #define RIG_MODEL_DDS60 RIG_MAKE_MODEL(RIG_KIT, 6) #define RIG_MODEL_ELEKTOR507 RIG_MAKE_MODEL(RIG_KIT, 7) /* Elektor SDR USB */ #define RIG_MODEL_MINIVNA RIG_MAKE_MODEL(RIG_KIT, 8) #define RIG_MODEL_SI570AVRUSB RIG_MAKE_MODEL(RIG_KIT, 9) /* SoftRock Si570 AVR */ #define RIG_MODEL_PMSDR RIG_MAKE_MODEL(RIG_KIT, 10) #define RIG_MODEL_SI570PICUSB RIG_MAKE_MODEL(RIG_KIT, 11) /* SoftRock Si570 PIC */ #define RIG_MODEL_FIFISDR RIG_MAKE_MODEL(RIG_KIT, 12) /* FiFi-SDR USB */ #define RIG_MODEL_FUNCUBEDONGLE RIG_MAKE_MODEL(RIG_KIT, 13) /* FunCUBE Dongle */ #define RIG_MODEL_HIQSDR RIG_MAKE_MODEL(RIG_KIT, 14) /* HiQSDR */ #define RIG_MODEL_FASDR RIG_MAKE_MODEL(RIG_KIT,15) /* Funkamateur Sdr */ #define RIG_MODEL_SI570PEABERRY1 RIG_MAKE_MODEL(RIG_KIT, 16) /* Peaberry V1 */ #define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */ #define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */ #define RIG_MODEL_RSHFIQ RIG_MAKE_MODEL(RIG_KIT, 19) /* RS-HFIQ */ /* * SW/FM/TV tuner cards supported by Video4Linux,*BSD, .. */ #define RIG_TUNER 26 #define RIG_BACKEND_TUNER "tuner" #define RIG_MODEL_V4L RIG_MAKE_MODEL(RIG_TUNER, 1) #define RIG_MODEL_V4L2 RIG_MAKE_MODEL(RIG_TUNER, 2) /* * Rohde & Schwarz--rs */ #define RIG_RS 27 #define RIG_BACKEND_RS "rs" #define RIG_MODEL_ESMC RIG_MAKE_MODEL(RIG_RS, 1) #define RIG_MODEL_EB200 RIG_MAKE_MODEL(RIG_RS, 2) #define RIG_MODEL_XK2100 RIG_MAKE_MODEL(RIG_RS, 3) /* * Phillips/Simoco PRM80 */ #define RIG_PRM80 28 #define RIG_BACKEND_PRM80 "prm80" #define RIG_MODEL_PRM8060 RIG_MAKE_MODEL(RIG_PRM80, 1) #define RIG_MODEL_PRM8070 RIG_MAKE_MODEL(RIG_PRM80, 2) /* * ADAT by HB9CBU * * ADDED: frgo (DG1SBG), 2012-01-01 */ #define RIG_ADAT 29 #define RIG_BACKEND_ADAT "adat" #define RIG_MODEL_ADT_200A RIG_MAKE_MODEL(RIG_ADAT, 1) /* * ICOM Marine */ #define RIG_ICMARINE 30 #define RIG_BACKEND_ICMARINE "icmarine" #define RIG_MODEL_IC_M700PRO RIG_MAKE_MODEL(RIG_ICMARINE, 1) #define RIG_MODEL_IC_M802 RIG_MAKE_MODEL(RIG_ICMARINE, 2) #define RIG_MODEL_IC_M710 RIG_MAKE_MODEL(RIG_ICMARINE, 3) #define RIG_MODEL_IC_M803 RIG_MAKE_MODEL(RIG_ICMARINE, 4) /* * Dorji transceiver modules */ #define RIG_DORJI 31 #define RIG_BACKEND_DORJI "dorji" #define RIG_MODEL_DORJI_DRA818V RIG_MAKE_MODEL(RIG_DORJI, 1) #define RIG_MODEL_DORJI_DRA818U RIG_MAKE_MODEL(RIG_DORJI, 2) /* * Barrett */ #define RIG_BARRETT 32 #define RIG_BACKEND_BARRETT "barrett" #define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1) #define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2) #define RIG_MODEL_BARRETT_4050 RIG_MAKE_MODEL(RIG_BARRETT, 3) /* * Elad */ #define RIG_ELAD 33 #define RIG_BACKEND_ELAD "elad" #define RIG_MODEL_ELAD_FDM_DUO RIG_MAKE_MODEL(RIG_ELAD, 1) /* * CODAN */ #define RIG_CODAN 34 #define RIG_BACKEND_CODAN "codan" #define RIG_MODEL_CODAN_ENVOY RIG_MAKE_MODEL(RIG_CODAN, 1) #define RIG_MODEL_CODAN_NGT RIG_MAKE_MODEL(RIG_CODAN, 2) /* * Gomspace */ #define RIG_GOMSPACE 35 #define RIG_BACKEND_GOMSPACE "gomspace" #define RIG_MODEL_GS100 RIG_MAKE_MODEL(RIG_GOMSPACE, 1) //! @endcond /* * TODO: RIG_MODEL_KWZ30, KNEISNER +DOERING RIG_MODEL_E1800, DASA-Telefunken etc. */ /*! \typedef typedef int rig_model_t \brief Convenience type definition for rig model. */ typedef uint32_t rig_model_t; /* * struct rig_backend_list { * rig_model_t model; * const char *backend; * } rig_backend_list[] = RIG_LIST; * * TODO: * { RIG_RADIOSHACK, RIG_BACKEND_RADIOSHACK }, \ */ #endif /* _RIGLIST_H */ ================================================ FILE: software/hamlib-w64-4.5~git/include/hamlib/rotator.h ================================================ /* * Hamlib Interface - Rotator API header * Copyright (c) 2000-2005 by Stephane Fillod * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef _ROTATOR_H #define _ROTATOR_H 1 #include #include /** * \addtogroup rotator * @{ */ /** * \file rotator.h * \brief Hamlib rotator data structures. * * This file contains the data structures and declarations for the Hamlib * rotator Application Programming Interface (API). * * See the rotator.c file for more details on the rotator API functions. */ __BEGIN_DECLS /* Forward struct references */ struct rot; struct rot_state; /** * \typedef typedef struct s_rot ROT * \brief Main rotator handle type definition. * * The #ROT handle is returned by rot_init() and is passed as a parameter to * every rotator specific API call. * * rot_cleanup() must be called when this handle is no longer needed. */ typedef struct s_rot ROT; /** * \typedef typedef float elevation_t * \brief Type definition for elevation. * * The \a elevation_t type is used as parameter for the rot_set_position() and * rot_get_position() functions. * * Unless specified otherwise, the unit of \a elevation_t is decimal degrees. */ typedef float elevation_t; /** * \typedef typedef float azimuth_t * \brief Type definition for azimuth. * * The \a azimuth_t type is used as parameter for the rot_set_position() and * rot_get_position() functions. * * Unless specified otherwise, the unit of \a azimuth_t is decimal degrees. */ typedef float azimuth_t; /** * \brief The token in the netrotctl protocol for returning an error condition code. */ #define NETROTCTL_RET "RPRT " /** * \def ROT_RESET_ALL * \brief A macro that returns the flag for the \b reset operation. * * \sa rot_reset(), rot_reset_t */ #define ROT_RESET_ALL 1 /** * \typedef typedef int rot_reset_t * \brief Type definition for rotator reset. * * The \a rot_reset_t type is used as parameter for the rot_reset() API * function. */ typedef int rot_reset_t; /** * \brief Rotator type flags for bitmasks. */ typedef enum { ROT_FLAG_AZIMUTH = (1 << 1), /*!< Azimuth */ ROT_FLAG_ELEVATION = (1 << 2) /*!< Elevation */ } rot_type_t; //! @cond Doxygen_Suppress /* So far only used in ests/dumpcaps_rot.c. */ #define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) //! @endcond /** * \def ROT_TYPE_OTHER * \brief Other type of rotator. * \def ROT_TYPE_AZIMUTH * \brief Azimuth only rotator. * \def ROT_TYPE_ELEVATION * \brief Elevation only rotator. * \def ROT_TYPE_AZEL * \brief Combination azimuth/elevation rotator. */ #define ROT_TYPE_OTHER 0 #define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH #define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION #define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) /** * \def ROT_MOVE_UP * \brief A macro that returns the flag for the \b UP direction. * * This macro defines the value of the \b UP direction which can be * used with the rot_move() function. * * \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, * ROT_MOVE_RIGHT, ROT_MOVE_CW */ #define ROT_MOVE_UP (1<<1) /** * \def ROT_MOVE_DOWN * \brief A macro that returns the flag for the \b DOWN direction. * * This macro defines the value of the \b DOWN direction which can be * used with the rot_move() function. * * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, * ROT_MOVE_CW */ #define ROT_MOVE_DOWN (1<<2) /** * \def ROT_MOVE_LEFT * \brief A macro that returns the flag for the \b LEFT direction. * * This macro defines the value of the \b LEFT direction which can be * used with the rot_move function. * * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT, * ROT_MOVE_CW */ #define ROT_MOVE_LEFT (1<<3) /** * \def ROT_MOVE_CCW * \brief A macro that returns the flag for the \b counterclockwise direction. * * This macro defines the value of the \b counterclockwise direction which * can be used with the rot_move() function. This value is equivalent to * ROT_MOVE_LEFT. * * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, * ROT_MOVE_CW */ #define ROT_MOVE_CCW ROT_MOVE_LEFT /** * \def ROT_MOVE_RIGHT * \brief A macro that returns the flag for the \b RIGHT direction. * * This macro defines the value of the \b RIGHT direction which can be used * with the rot_move() function. * * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, * ROT_MOVE_CW */ #define ROT_MOVE_RIGHT (1<<4) /** * \def ROT_MOVE_CW * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be * used with the rot_move() function. This value is equivalent to * ROT_MOVE_RIGHT. * * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, * ROT_MOVE_RIGHT */ #define ROT_MOVE_CW ROT_MOVE_RIGHT /** * \brief Rotator status flags */ typedef enum { ROT_STATUS_NONE = 0, /*!< '' -- No status. */ ROT_STATUS_BUSY = (1 << 0), /*!< Rotator is busy, not accepting commands. */ ROT_STATUS_MOVING = (1 << 1), /*!< Rotator is currently moving (direction type not specified). */ ROT_STATUS_MOVING_AZ = (1 << 2), /*!< Azimuth rotator is currently moving (direction not specified). */ ROT_STATUS_MOVING_LEFT = (1 << 3), /*!< Azimuth rotator is currently moving left. */ ROT_STATUS_MOVING_RIGHT = (1 << 4), /*!< Azimuth rotator is currently moving right. */ ROT_STATUS_MOVING_EL = (1 << 5), /*!< Elevation rotator is currently moving (direction not specified). */ ROT_STATUS_MOVING_UP = (1 << 6), /*!< Elevation rotator is currently moving up. */ ROT_STATUS_MOVING_DOWN = (1 << 7), /*!< Elevation rotator is currently moving down. */ ROT_STATUS_LIMIT_UP = (1 << 8), /*!< The elevation rotator has reached its limit to move up. */ ROT_STATUS_LIMIT_DOWN = (1 << 9), /*!< The elevation rotator has reached its limit to move down.*/ ROT_STATUS_LIMIT_LEFT = (1 << 10), /*!< The azimuth rotator has reached its limit to move left (CCW). */ ROT_STATUS_LIMIT_RIGHT = (1 << 11), /*!< The azimuth rotator has reached its limit to move right (CW). */ ROT_STATUS_OVERLAP_UP = (1 << 12), /*!< The elevation rotator has rotated up past 360 degrees. */ ROT_STATUS_OVERLAP_DOWN = (1 << 13), /*!< The elevation rotator has rotated down past 0 degrees. */ ROT_STATUS_OVERLAP_LEFT = (1 << 14), /*!< The azimuth rotator has rotated left (CCW) past 0 degrees. */ ROT_STATUS_OVERLAP_RIGHT = (1 << 16), /*!< The azimuth rotator has rotated right (CW) past 360 degrees. */ } rot_status_t; //! @cond Doxygen_Suppress /* So far only used in tests/sprintflst.c. */ #define ROT_STATUS_N(n) (1u<<(n)) //! @endcond /** * \brief Macro for not changing the rotator speed with move() function. */ #define ROT_SPEED_NOCHANGE (-1) /** * \brief Rotator Level Settings. * * Various operating levels supported by a rotator. * * \c STRING used in the \c rotctl and \c rotctld utilities. * * \sa rot_parse_level(), rot_strlevel() */ enum rot_level_e { ROT_LEVEL_NONE = 0, /*!< '' -- No Level. */ ROT_LEVEL_SPEED = (1 << 0), /*!< \c SPEED -- Rotation speed, arg int (default range 1-100 if not specified). */ ROT_LEVEL_63 = CONSTANT_64BIT_FLAG(63), /*!< **Future use**, last level. */ }; //! @cond Doxygen_Suppress #define ROT_LEVEL_FLOAT_LIST (0) #define ROT_LEVEL_READONLY_LIST (0) #define ROT_LEVEL_IS_FLOAT(l) ((l)&ROT_LEVEL_FLOAT_LIST) #define ROT_LEVEL_SET(l) ((l)&~ROT_LEVEL_READONLY_LIST) //! @endcond /** @cond Doxygen_Suppress * FIXME: The following needs more explanation about how STRING relates * to this macro. * @endcond */ /** * \brief Rotator Parameters * * Parameters are settings that are not related to core rotator functionality, * i.e. antenna rotation. * * \c STRING used in the \c rotctl and \c rotctld utilities. * * \sa rot_parse_parm(), rot_strparm() */ enum rot_parm_e { ROT_PARM_NONE = 0, /*!< '' -- No Parm */ }; //! @cond Doxygen_Suppress #define ROT_PARM_FLOAT_LIST (0) #define ROT_PARM_READONLY_LIST (0) #define ROT_PARM_IS_FLOAT(l) ((l)&ROT_PARM_FLOAT_LIST) #define ROT_PARM_SET(l) ((l)&~ROT_PARM_READONLY_LIST) //! @endcond /** @cond Doxygen_Suppress * FIXME: The following needs more explanation about how STRING relates * to these macros. * @endcond */ /** * \brief Rotator Function Settings. * * Various operating functions supported by a rotator. * * \c STRING used in the \c rotctl and \c rotctld utilities. * * \sa rot_parse_func(), rot_strfunc() */ #define ROT_FUNC_NONE 0 /*!< '' -- No Function */ #ifndef SWIGLUAHIDE /* Hide the top 32 bits from the old Lua binding as they can't be represented */ #define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< **Future use**, ROT_FUNC items. */ /* 63 is this highest bit number that can be used */ #endif /* Basic rot type, can store some useful info about different rotators. Each * lib must be able to populate this structure, so we can make useful * enquiries about capabilities. */ /** * \struct rot_caps * \brief Rotator capability data structure. * * The main idea of this structure is that it will be defined by the backend * rotator driver, and will remain read-only for the application. Fields that * need to be modifiable by the application are copied into the rot_state * structure, which is the private memory area of the #ROT instance. * * This way, you can have several rotators running within the same * application, sharing the rot_caps structure of the backend, while keeping * their own customized data. * * \b Note: Don't move fields around and only add new fields at the end of the * rot_caps structure. Shared libraries and DLLs depend on a constant * structure to maintain compatibility. */ struct rot_caps { rot_model_t rot_model; /*!< Rotator model as defined in rotlist.h. */ const char *model_name; /*!< Model name, e.g. TT-360. */ const char *mfg_name; /*!< Manufacturer, e.g. Tower Torquer. */ const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */ const char *copyright; /*!< Copyright info (should be LGPL). */ enum rig_status_e status; /*!< Driver status. */ int rot_type; /*!< Rotator type. */ enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */ int serial_rate_min; /*!< Minimal serial speed. */ int serial_rate_max; /*!< Maximal serial speed. */ int serial_data_bits; /*!< Number of data bits. */ int serial_stop_bits; /*!< Number of stop bits. */ enum serial_parity_e serial_parity; /*!< Parity. */ enum serial_handshake_e serial_handshake; /*!< Handshake. */ int write_delay; /*!< Write delay. */ int post_write_delay; /*!< Post-write delay. */ int timeout; /*!< Timeout. */ int retry; /*!< Number of retries if command fails. */ setting_t has_get_func; /*!< List of get functions. */ setting_t has_set_func; /*!< List of set functions. */ setting_t has_get_level; /*!< List of get levels. */ setting_t has_set_level; /*!< List of set levels. */ setting_t has_get_parm; /*!< List of get parameters. */ setting_t has_set_parm; /*!< List of set parameters. */ rot_status_t has_status; /*!< Supported status flags. */ gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps). */ gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps). */ const struct confparams *extparms; /*!< Extension parameters list, \sa rot_ext.c. */ const struct confparams *extlevels; /*!< Extension levels list, \sa rot_ext.c. */ const struct confparams *extfuncs; /*!< Extension functions list, \sa rot_ext.c. */ int *ext_tokens; /*!< Extension token list. */ /* * Movement range, az is relative to North * negative values allowed for overlap */ azimuth_t min_az; /*!< Lower limit for azimuth (relative to North). */ azimuth_t max_az; /*!< Upper limit for azimuth (relative to North). */ elevation_t min_el; /*!< Lower limit for elevation. */ elevation_t max_el; /*!< Upper limit for elevation. */ const struct confparams *cfgparams; /*!< Configuration parameters. */ const rig_ptr_t priv; /*!< Private data. */ /* * Rot Admin API * */ int (*rot_init)(ROT *rot); /*!< Pointer to backend implementation of ::rot_init(). */ int (*rot_cleanup)(ROT *rot); /*!< Pointer to backend implementation of ::rot_cleanup(). */ int (*rot_open)(ROT *rot); /*!< Pointer to backend implementation of ::rot_open(). */ int (*rot_close)(ROT *rot); /*!< Pointer to backend implementation of ::rot_close(). */ int (*set_conf)(ROT *rot, token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */ int (*get_conf)(ROT *rot, token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */ /* * General API commands, from most primitive to least.. :() * List Set/Get functions pairs */ int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); /*!< Pointer to backend implementation of ::rot_set_position(). */ int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); /*!< Pointer to backend implementation of ::rot_get_position(). */ int (*stop)(ROT *rot); /*!< Pointer to backend implementation of ::rot_stop(). */ int (*park)(ROT *rot); /*!< Pointer to backend implementation of ::rot_park(). */ int (*reset)(ROT *rot, rot_reset_t reset); /*!< Pointer to backend implementation of ::rot_reset(). */ int (*move)(ROT *rot, int direction, int speed); /*!< Pointer to backend implementation of ::rot_move(). */ /* get firmware info, etc. */ const char * (*get_info)(ROT *rot); /*!< Pointer to backend implementation of ::rot_get_info(). */ int (*set_level)(ROT *rot, setting_t level, value_t val); /*!< Pointer to backend implementation of ::rot_set_level(). */ int (*get_level)(ROT *rot, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::rot_get_level(). */ int (*set_func)(ROT *rot, setting_t func, int status); /*!< Pointer to backend implementation of ::rot_set_func(). */ int (*get_func)(ROT *rot, setting_t func, int *status); /*!< Pointer to backend implementation of ::rot_get_func(). */ int (*set_parm)(ROT *rot, setting_t parm, value_t val); /*!< Pointer to backend implementation of ::rot_set_parm(). */ int (*get_parm)(ROT *rot, setting_t parm, value_t *val); /*!< Pointer to backend implementation of ::rot_get_parm(). */ int (*set_ext_level)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */ int (*get_ext_level)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */ int (*set_ext_func)(ROT *rot, token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */ int (*get_ext_func)(ROT *rot, token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */ int (*set_ext_parm)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */ int (*get_ext_parm)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */ int (*get_status)(ROT *rot, rot_status_t *status); /*!< Pointer to backend implementation of ::rot_get_status(). */ const char *macro_name; /*!< Rotator model macro name. */ int (*get_conf2)(ROT *rot, token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::rot_get_conf2(). */ }; //! @cond Doxygen_Suppress #define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg //! @endcond /** * \struct rot_state * \brief Rotator state structure * * This structure contains live data, as well as a copy of capability fields * that may be updated, i.e. customized while the #ROT handle is instantiated. * * It is fine to move fields around, as this kind of structure should not be * initialized like rot_caps are. */ struct rot_state { /* * overridable fields */ azimuth_t min_az; /*!< Lower limit for azimuth (overridable). */ azimuth_t max_az; /*!< Upper limit for azimuth (overridable). */ elevation_t min_el; /*!< Lower limit for elevation (overridable). */ elevation_t max_el; /*!< Upper limit for elevation (overridable). */ int south_zero; /*!< South is zero degrees. */ azimuth_t az_offset; /*!< Offset to be applied to azimuth. */ elevation_t el_offset; /*!< Offset to be applied to elevation. */ setting_t has_get_func; /*!< List of get functions. */ setting_t has_set_func; /*!< List of set functions. */ setting_t has_get_level; /*!< List of get levels. */ setting_t has_set_level; /*!< List of set levels. */ setting_t has_get_parm; /*!< List of get parameters. */ setting_t has_set_parm; /*!< List of set parameters. */ rot_status_t has_status; /*!< Supported status flags. */ gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ /* * non overridable fields, internal use */ hamlib_port_t_deprecated rotport_deprecated; /*!< Rotator port (internal use). Deprecated */ hamlib_port_t_deprecated rotport2_deprecated; /*!< 2nd Rotator port (internal use). Deprecated */ int comm_state; /*!< Comm port state, i.e. opened or closed. */ rig_ptr_t priv; /*!< Pointer to private rotator state data. */ rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */ int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested. */ hamlib_port_t rotport; /*!< Rotator port (internal use). */ hamlib_port_t rotport2; /*!< 2nd Rotator port (internal use). */ }; /** * \struct s_rot * \brief Master rotator structure. * * This is the master data structure acting as the #ROT handle for the * controlled rotator. A pointer to this structure is returned by the * rot_init() API function and is passed as a parameter to every rotator * specific API call. * * \sa rot_init(), rot_caps, rot_state */ struct s_rot { struct rot_caps *caps; /*!< Rotator caps. */ struct rot_state state; /*!< Rotator state. */ }; //! @cond Doxygen_Suppress /* --------------- API function prototypes -----------------*/ extern HAMLIB_EXPORT(ROT *) rot_init HAMLIB_PARAMS((rot_model_t rot_model)); extern HAMLIB_EXPORT(int) rot_open HAMLIB_PARAMS((ROT *rot)); extern HAMLIB_EXPORT(int) rot_close HAMLIB_PARAMS((ROT *rot)); extern HAMLIB_EXPORT(int) rot_cleanup HAMLIB_PARAMS((ROT *rot)); extern HAMLIB_EXPORT(int) rot_set_conf HAMLIB_PARAMS((ROT *rot, token_t token, const char *val)); extern HAMLIB_EXPORT(int) rot_get_conf HAMLIB_PARAMS((ROT *rot, token_t token, char *val)); extern HAMLIB_EXPORT(int) rot_get_conf2 HAMLIB_PARAMS((ROT *rot, token_t token, char *val, int val_len)); /* * General API commands, from most primitive to least.. ) * List Set/Get functions pairs */ extern HAMLIB_EXPORT(int) rot_set_position HAMLIB_PARAMS((ROT *rot, azimuth_t azimuth, elevation_t elevation)); extern HAMLIB_EXPORT(int) rot_get_position HAMLIB_PARAMS((ROT *rot, azimuth_t *azimuth, elevation_t *elevation)); extern HAMLIB_EXPORT(int) rot_stop HAMLIB_PARAMS((ROT *rot)); extern HAMLIB_EXPORT(int) rot_park HAMLIB_PARAMS((ROT *rot)); extern HAMLIB_EXPORT(int) rot_reset HAMLIB_PARAMS((ROT *rot, rot_reset_t reset)); extern HAMLIB_EXPORT(int) rot_move HAMLIB_PARAMS((ROT *rot, int direction, int speed)); extern HAMLIB_EXPORT(setting_t) rot_has_get_level HAMLIB_PARAMS((ROT *rot, setting_t level)); extern HAMLIB_EXPORT(setting_t) rot_has_set_level HAMLIB_PARAMS((ROT *rot, setting_t level)); extern HAMLIB_EXPORT(setting_t) rot_has_get_parm HAMLIB_PARAMS((ROT *rot, setting_t parm)); extern HAMLIB_EXPORT(setting_t) rot_has_set_parm HAMLIB_PARAMS((ROT *rot, setting_t parm)); extern HAMLIB_EXPORT(setting_t) rot_has_get_func HAMLIB_PARAMS((ROT *rot, setting_t func)); extern HAMLIB_EXPORT(setting_t) rot_has_set_func HAMLIB_PARAMS((ROT *rot, setting_t func)); extern HAMLIB_EXPORT(int) rot_set_func HAMLIB_PARAMS((ROT *rot, setting_t func, int status)); extern HAMLIB_EXPORT(int) rot_get_func HAMLIB_PARAMS((ROT *rot, setting_t func, int *status)); extern HAMLIB_EXPORT(int) rot_set_level HAMLIB_PARAMS((ROT *rig, setting_t level, value_t val)); extern HAMLIB_EXPORT(int) rot_get_level HAMLIB_PARAMS((ROT *rig, setting_t level, value_t *val)); extern HAMLIB_EXPORT(int) rot_set_parm HAMLIB_PARAMS((ROT *rig, setting_t parm, value_t val)); extern HAMLIB_EXPORT(int) rot_get_parm HAMLIB_PARAMS((ROT *rig, setting_t parm, value_t *val)); extern HAMLIB_EXPORT(int) rot_set_ext_level HAMLIB_PARAMS((ROT *rig, token_t token, value_t val)); extern HAMLIB_EXPORT(int) rot_get_ext_level HAMLIB_PARAMS((ROT *rig, token_t token, value_t *val)); extern HAMLIB_EXPORT(int) rot_set_ext_func HAMLIB_PARAMS((ROT *rig, token_t token, int status)); extern HAMLIB_EXPORT(int) rot_get_ext_func HAMLIB_PARAMS((ROT *rig, token_t token, int *status)); extern HAMLIB_EXPORT(int) rot_set_ext_parm HAMLIB_PARAMS((ROT *rig, token_t token, value_t val)); extern HAMLIB_EXPORT(int) rot_get_ext_parm HAMLIB_PARAMS((ROT *rig, token_t token, value_t *val)); extern HAMLIB_EXPORT(const char *) rot_get_info HAMLIB_PARAMS((ROT *rot)); extern HAMLIB_EXPORT(int) rot_get_status HAMLIB_PARAMS((ROT *rot, rot_status_t *status)); extern HAMLIB_EXPORT(int) rot_register HAMLIB_PARAMS((const struct rot_caps *caps)); extern HAMLIB_EXPORT(int) rot_unregister HAMLIB_PARAMS((rot_model_t rot_model)); extern HAMLIB_EXPORT(int) rot_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rot_caps *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(int) rot_load_backend HAMLIB_PARAMS((const char *be_name)); extern HAMLIB_EXPORT(int) rot_check_backend HAMLIB_PARAMS((rot_model_t rot_model)); extern HAMLIB_EXPORT(int) rot_load_all_backends HAMLIB_PARAMS((void)); extern HAMLIB_EXPORT(rot_model_t) rot_probe_all HAMLIB_PARAMS((hamlib_port_t *p)); extern HAMLIB_EXPORT(int) rot_token_foreach HAMLIB_PARAMS((ROT *rot, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(const struct confparams *) rot_confparam_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); extern HAMLIB_EXPORT(token_t) rot_token_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); extern HAMLIB_EXPORT(int) rot_ext_func_foreach HAMLIB_PARAMS((ROT *rot, int (*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(int) rot_ext_level_foreach HAMLIB_PARAMS((ROT *rot, int (*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(int) rot_ext_parm_foreach HAMLIB_PARAMS((ROT *rot, int (*cfunc)(ROT *, const struct confparams *, rig_ptr_t), rig_ptr_t data)); extern HAMLIB_EXPORT(const struct confparams *) rot_ext_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); extern HAMLIB_EXPORT(const struct confparams *) rot_ext_lookup_tok HAMLIB_PARAMS((ROT *rot, token_t token)); extern HAMLIB_EXPORT(token_t) rot_ext_token_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); extern HAMLIB_EXPORT(const struct rot_caps *) rot_get_caps HAMLIB_PARAMS((rot_model_t rot_model)); extern HAMLIB_EXPORT(int) qrb HAMLIB_PARAMS((double lon1, double lat1, double lon2, double lat2, double *distance, double *azimuth)); extern HAMLIB_EXPORT(double) distance_long_path HAMLIB_PARAMS((double distance)); extern HAMLIB_EXPORT(double) azimuth_long_path HAMLIB_PARAMS((double azimuth)); #if 0 extern HAMLIB_EXPORT(int) longlat2locator HAMLIB_PARAMS((double longitude, double latitude, char *locator_res, int pair_count)); extern HAMLIB_EXPORT(int) locator2longlat HAMLIB_PARAMS((double *longitude, double *latitude, const char *locator)); #endif extern HAMLIB_EXPORT(double) dms2dec HAMLIB_PARAMS((int degrees, int minutes, double seconds, int sw)); extern HAMLIB_EXPORT(int) dec2dms HAMLIB_PARAMS((double dec, int *degrees, int *minutes, double *seconds, int *sw)); extern HAMLIB_EXPORT(int) dec2dmmm HAMLIB_PARAMS((double dec, int *degrees, double *minutes, int *sw)); extern HAMLIB_EXPORT(double) dmmm2dec HAMLIB_PARAMS((int degrees, double minutes, double seconds, int sw)); extern HAMLIB_EXPORT(setting_t) rot_parse_func(const char *s); extern HAMLIB_EXPORT(setting_t) rot_parse_level(const char *s); extern HAMLIB_EXPORT(setting_t) rot_parse_parm(const char *s); extern HAMLIB_EXPORT(const char *) rot_strfunc(setting_t); extern HAMLIB_EXPORT(const char *) rot_strlevel(setting_t); extern HAMLIB_EXPORT(const char *) rot_strparm(setting_t); extern HAMLIB_EXPORT(const char *) rot_strstatus(rot_status_t); //! @endcond /** * \def rot_debug * \brief Convenience macro for generating debugging messages. * * This is an alias of the rig_debug() function call and is used in the same * manner. */ #define rot_debug rig_debug __END_DECLS #endif /* _ROTATOR_H */ /** @} */ ================================================ FILE: software/hamlib-w64-4.5~git/include/hamlib/rotlist.h ================================================ /* * Hamlib Interface - list of known rotators * Copyright (c) 2000-2011 by Stephane Fillod * Copyright (c) 2000-2002 by Frank Singleton * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef _ROTLIST_H #define _ROTLIST_H 1 //! @cond Doxygen_Suppress #define ROT_MAKE_MODEL(a,b) ((a)*100+(b)) #define ROT_BACKEND_NUM(a) ((a)/100) //! @endcond /** * \addtogroup rotator * @{ */ /** * \file rotlist.h * \brief Hamlib rotator model definitions. * * This file contains rotator model definitions for the Hamlib rotator * Application Programming Interface (API). Each distinct rotator type has a * unique model number (ID) and is used by Hamlib to identify and distinguish * between the different hardware drivers. The exact model numbers can be * acquired using the macros in this file. To obtain a list of supported * rotator branches, one can use the statically defined ROT_BACKEND_LIST macro * (defined in configure.ac). To obtain a full list of supported rotators * (including each model in every branch), the foreach_opened_rot() API * function can be used. * * The model number, or ID, is used to tell Hamlib which rotator the client * wishes to use which is done with the rot_init() API call. */ /** * \def ROT_MODEL_NONE * \brief A macro that returns the model number for an unknown model. * * The none backend, as the name suggests, does nothing. It is mainly for * internal use. */ #define ROT_MODEL_NONE 0 /** * \brief A macro that returns the model number for the DUMMY backend. * * \def ROT_MODEL_DUMMY * * The DUMMY backend, as the name suggests, is a backend which performs * no hardware operations and always behaves as one would expect. It can * be thought of as a hardware simulator and is very useful for testing * client applications. */ /** * \brief A macro that returns the model number for the NETROTCTL backend. * * \def ROT_MODEL_NETROTCTL * * The NETROTCTL backend allows use of the `rotctld` daemon through the normal * Hamlib API. */ //! @cond Doxygen_Suppress #define ROT_DUMMY 0 #define ROT_BACKEND_DUMMY "dummy" //! @endcond #define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1) #define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2) /** * \brief A macro that returns the model number of the EASYCOMM 1 backend. * * \def ROT_MODEL_EASYCOMM1 * * The EASYCOMM1 backend can be used with rotators that support the EASYCOMM * I Standard. */ /** * \brief A macro that returns the model number of the EASYCOMM 2 backend. * * \def ROT_MODEL_EASYCOMM2 * * The EASYCOMM2 backend can be used with rotators that support the EASYCOMM * II Standard. */ /** * \brief A macro that returns the model number of the EASYCOMM 3 backend. * * \def ROT_MODEL_EASYCOMM3 * * The EASYCOMM3 backend can be used with rotators that support the EASYCOMM * III Standard. */ //! @cond Doxygen_Suppress #define ROT_EASYCOMM 2 #define ROT_BACKEND_EASYCOMM "easycomm" //! @endcond #define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1) #define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2) #define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4) /** * \brief A macro that returns the model number of the FODTRACK backend. * * \def ROT_MODEL_FODTRACK * * The FODTRACK backend can be used with rotators that support the FODTRACK * Standard. */ //! @cond Doxygen_Suppress #define ROT_FODTRACK 3 #define ROT_BACKEND_FODTRACK "fodtrack" //! @endcond #define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1) /** * \brief A macro that returns the model number of the ROTOREZ backend. * * \def ROT_MODEL_ROTOREZ * * The ROTOREZ backend can be used with Hy-Gain rotators that support the * extended DCU command set by the Idiom Press Rotor-EZ board. */ /** * \brief A macro that returns the model number of the ROTORCARD backend. * * \def ROT_MODEL_ROTORCARD * * The ROTORCARD backend can be used with Yaesu rotators that support the * extended DCU command set by the Idiom Press Rotor Card board. */ /** * \brief A macro that returns the model number of the DCU backend. * * \def ROT_MODEL_DCU * * The DCU backend can be used with rotators that support the DCU command set * by Hy-Gain (currently the DCU-1). */ /** * \brief A macro that returns the model number of the ERC backend. * * \def ROT_MODEL_ERC * * The ERC backend can be used with rotators that support the DCU command set * by DF9GR (currently the ERC). */ /** * \brief A macro that returns the model number of the RT21 backend. * * \def ROT_MODEL_RT21 * * The RT21 backend can be used with rotators that support the DCU command set * by Green Heron (currently the RT-21). */ //! @cond Doxygen_Suppress #define ROT_ROTOREZ 4 #define ROT_BACKEND_ROTOREZ "rotorez" //! @endcond #define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1) #define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2) #define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3) #define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4) #define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5) /** * \brief A macro that returns the model number of the SARTEK1 backend. * * \def ROT_MODEL_SARTEK1 * * The SARTEK1 backend can be used with rotators that support the SARtek * protocol. */ //! @cond Doxygen_Suppress #define ROT_SARTEK 5 #define ROT_BACKEND_SARTEK "sartek" //! @endcond #define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1) /** * \brief A macro that returns the model number of the GS232A backend. * * \def ROT_MODEL_GS232A * * The GS232A backend can be used with rotators that support the GS-232A * protocol. */ /** * \brief A macro that returns the model number of the GS232 backend. * * \def ROT_MODEL_GS232_GENERIC * * The GS232_GENERIC backend can be used with rotators that support the * generic (even if not coded correctly) GS-232 protocol. */ /** * \brief A macro that returns the model number of the GS232B backend. * * \def ROT_MODEL_GS232B * * The GS232B backend can be used with rotators that support the GS232B * protocol. */ /** * \brief A macro that returns the model number of the F1TETRACKER backend. * * \def ROT_MODEL_F1TETRACKER * * The F1TETRACKER backend can be used with rotators that support the F1TE * Tracker protocol. */ /** * \brief A macro that returns the model number of the GS23 backend. * * \def ROT_MODEL_GS23 * * The GS23 backend can be used with rotators that support the GS-23 protocol. */ /** * \brief A macro that returns the model number of the GS232 backend. * * \def ROT_MODEL_GS232 * * The GS232 backend can be used with rotators that support the GS-232 * protocol. */ /** * \brief A macro that returns the model number of the LVB backend. * * \def ROT_MODEL_LVB * * The LVB backend can be used with rotators that support the G6LVB AMSAT LVB * Tracker GS-232 based protocol. */ /** * \brief A macro that returns the model number of the ST2 backend. * * \def ROT_MODEL_ST2 * * The ST2 backend can be used with rotators that support the Fox Delta ST2 * GS-232 based protocol. */ /** * \brief A macro that returns the model number of the GS232A_AZ Azimuth backend. * * \def ROT_MODEL_GS232A_AZ * * The GS232A_AZ backend can be used with azimuth rotators that support the * GS-232A protocol. */ /** * \brief A macro that returns the model number of the GS232A_EL Elevation backend. * * \def ROT_MODEL_GS232A_EL * * The GS232A_EL backend can be used with elevation rotators that support the * GS-232A protocol. */ /** * \brief A macro that returns the model number of the GS232B_AZ Azimuth backend. * * \def ROT_MODEL_GS232B_AZ * * The GS232B_AZ backend can be used with azimuth rotators that support the * GS-232B protocol. */ /** * \brief A macro that returns the model number of the GS232B_EL Elevation backend. * * \def ROT_MODEL_GS232B_EL * * The GS232B_EL backend can be used with elevation rotators that support the * GS-232B protocol. */ //! @cond Doxygen_Suppress #define ROT_GS232A 6 #define ROT_BACKEND_GS232A "gs232a" //! @endcond #define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1) #define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */ #define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3) #define ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4) #define ROT_MODEL_GS23 ROT_MAKE_MODEL(ROT_GS232A, 5) #define ROT_MODEL_GS232 ROT_MAKE_MODEL(ROT_GS232A, 6) /* Not A or B */ #define ROT_MODEL_LVB ROT_MAKE_MODEL(ROT_GS232A, 7) #define ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8) #define ROT_MODEL_GS232A_AZ ROT_MAKE_MODEL(ROT_GS232A, 9) #define ROT_MODEL_GS232A_EL ROT_MAKE_MODEL(ROT_GS232A, 10) #define ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11) #define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12) /** * \brief A macro that returns the model number of the PCROTOR backend. * * \def ROT_MODEL_PCROTOR * * The PCROTOR backend is a member of the kit backend group that can be used * with home brewed rotators. */ //! @cond Doxygen_Suppress #define ROT_KIT 7 #define ROT_BACKEND_KIT "kit" //! @endcond #define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1) /** * \brief A macro that returns the model number of the HD1780 backend. * * \def ROT_MODEL_HD1780 * * The HD1780 backend can be used with rotators that support the Heathkit * HD-1780 protocol. */ //! @cond Doxygen_Suppress #define ROT_HEATHKIT 8 #define ROT_BACKEND_HEATHKIT "heathkit" //! @endcond #define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1) /** * \brief A macro that returns the model number of the ROT2PROG backend. * * \def ROT_MODEL_SPID_ROT2PROG * * The SPID_ROT2PROG backend can be used with rotators that support the SPID * azimuth and elevation protocol. */ /** * \brief A macro that returns the model number of the ROT1PROG backend. * * \def ROT_MODEL_SPID_ROT1PROG * * The SPID_ROT1PROG backend can be used with rotators that support the SPID * azimuth protocol. */ /** * \brief A macro that returns the model number of the SPID_MD01_ROT2PROG backend. * * \def ROT_MODEL_SPID_MD01_ROT2PROG * * The SPID_MD01_ROT2PROG backend can be used with rotators that support the * extended SPID ROT2PROG azimuth and elevation protocol. */ //! @cond Doxygen_Suppress #define ROT_SPID 9 #define ROT_BACKEND_SPID "spid" //! @endcond #define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1) #define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2) #define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3) /** * \brief A macro that returns the model number of the RC2800 backend. * * \def ROT_MODEL_RC2800 * * The RC2800 backend can be used with rotators that support the M2 (M * Squared) RC2800 protocol. */ /** * \brief A macro that returns the model number of the RC2800_EARLY_AZ * backend. * * \def ROT_MODEL_RC2800_EARLY_AZ * * The RC2800_EARLY_AZ backend can be used with rotators that support the M2 * (M Squared) RC2800 early azimuth protocol. */ /** * \brief A macro that returns the model number of the RC2800_EARLY_AZEL * backend. * * \def ROT_MODEL_RC2800_EARLY_AZEL * * The RC2800_EARLY_AZEL backend can be used with rotators that support the M2 * (M Squared) RC2800 early azimuth and elevation protocol. */ //! @cond Doxygen_Suppress #define ROT_M2 10 #define ROT_BACKEND_M2 "m2" //! @endcond #define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1) #define ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2) #define ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3) /** * \brief A macro that returns the model number of the RCI_AZEL backend. * * \def ROT_MODEL_RCI_AZEL * * The RCI_AZEL backend can be used with rotators that support the ARS azimuth * and elevation protocol. */ /** * \brief A macro that returns the model number of the RCI_AZ backend. * * \def ROT_MODEL_RCI_AZ * * The RCI_AZ backend can be used with rotators that support the ARS azimuth * protocol. */ //! @cond Doxygen_Suppress #define ROT_ARS 11 #define ROT_BACKEND_ARS "ars" //! @endcond #define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1) #define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2) /** * \brief A macro that returns the model number of the IF100 backend. * * \def ROT_MODEL_IF100 * * The IF100 backend can be used with rotators that support the AMSAT IF-100 * interface. */ //! @cond Doxygen_Suppress #define ROT_AMSAT 12 #define ROT_BACKEND_AMSAT "amsat" //! @endcond #define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1) /** * \brief A macro that returns the model number of the TS7400 backend. * * \def ROT_MODEL_TS7400 * * The TS7400 backend supports an embedded ARM board using the TS-7400 Linux * board. More information is at https://www.embeddedarm.com */ //! @cond Doxygen_Suppress #define ROT_TS7400 13 #define ROT_BACKEND_TS7400 "ts7400" //! @endcond #define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1) /** * \brief A macro that returns the model number of the NEXSTAR backend. * * \def ROT_MODEL_NEXSTAR * * The NEXSTAR backend can be used with rotators that support the Celestron * NexStar protocol and alike. */ //! @cond Doxygen_Suppress #define ROT_CELESTRON 14 #define ROT_BACKEND_CELESTRON "celestron" //! @endcond #define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1) /** * \brief A macro that returns the model number of the ETHER6 backend. * * \def ROT_MODEL_ETHER6 * * The ETHER6 backend can be used with rotators that support the Ether6 * protocol. */ //! @cond Doxygen_Suppress #define ROT_ETHER6 15 #define ROT_BACKEND_ETHER6 "ether6" //! @endcond #define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1) /** * \brief A macro that returns the model number of the CNCTRK backend. * * \def ROT_MODEL_CNCTRK * * The CNCTRK backend can be used with rotators that support the LinuxCNC * running Axis GUI interface. */ //! @cond Doxygen_Suppress #define ROT_CNCTRK 16 #define ROT_BACKEND_CNCTRK "cnctrk" //! @endcond #define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1) /** * \brief A macro that returns the model number of the PROSISTEL_D_AZ backend. * * \def ROT_MODEL_PROSISTEL_D_AZ * * The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel * azimuth protocol. */ /** * \brief A macro that returns the model number of the PROSISTEL_D_EL backend. * * \def ROT_MODEL_PROSISTEL_D_EL * * The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel * elevation protocol. */ /** * \brief A macro that returns the model number of the * PROSISTEL_COMBI_TRACK_AZEL backend. * * \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL * * The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that * support the Prosistel combination azimuth and elevation protocol. */ //! @cond Doxygen_Suppress #define ROT_PROSISTEL 17 #define ROT_BACKEND_PROSISTEL "prosistel" //! @endcond #define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1) #define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2) #define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3) /** * \brief A macro that returns the model number of the MEADE backend. * * \def ROT_MODEL_MEADE * * The MEADE backend can be used with Meade telescope rotators like the * DS-2000. */ //! @cond Doxygen_Suppress #define ROT_MEADE 18 #define ROT_BACKEND_MEADE "meade" //! @endcond #define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1) /** * \brief A macro that returns the model number of the IOPTRON backend. * * \def ROT_MODEL_IOPTRON * * The IOPTRON backend can be used with IOPTRON telescope mounts. */ //! @cond Doxygen_Suppress #define ROT_IOPTRON 19 #define ROT_BACKEND_IOPTRON "ioptron" //! @endcond #define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1) /** * \brief A macro that returns the model number of the INDI backend. * * \def ROT_MODEL_INDI * * The INDI backend can be used with rotators that support the INDI interface. */ //! @cond Doxygen_Suppress #define ROT_INDI 20 #define ROT_BACKEND_INDI "indi" //! @endcond #define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1) /** * \brief A macro that returns the model number of the SATEL backend. * * \def ROT_MODEL_SATEL * * The SATEL backend can be used with rotators that support the VE5FP * interface. */ //! @cond Doxygen_Suppress #define ROT_SATEL 21 #define ROT_BACKEND_SATEL "satel" //! @endcond #define ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1) /** * \brief A macro that returns the model number of the RADANT backend. * * \def ROT_MODEL_RADANT * * The RADANT backend can be used with rotators that support the MS232 * interface. */ //! @cond Doxygen_Suppress #define ROT_RADANT 22 #define ROT_BACKEND_RADANT "radant" //! @endcond #define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1) #define ROT_ANDROIDSENSOR 23 #define ROT_BACKEND_ANDROIDSENSOR "androidsensor" #define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1) /** * \brief A macro that returns the model number of the GRBLTRK backend. * * \def ROT_MODEL_GRBLTRK * * The GRBLTRK backend can be used with rotators that support the GRBL * protocol. */ //! @cond Doxygen_Suppress #define ROT_GRBLTRK 24 #define ROT_BACKEND_GRBLTRK "grbltrk" //! @endcond #define ROT_MODEL_GRBLTRK_SER ROT_MAKE_MODEL(ROT_GRBLTRK, 1) #define ROT_MODEL_GRBLTRK_NET ROT_MAKE_MODEL(ROT_GRBLTRK, 2) /** * \brief Convenience type definition for a rotator model. * * \typedef typedef int rot_model_t */ typedef int rot_model_t; #endif /* _ROTLIST_H */ /** @} */ ================================================ FILE: software/hamlib-w64-4.5~git/lib/msvc/libhamlib-4.def ================================================ EXPORTS CRC32_function @1 add2debugmsgsave @2 amp_check_backend @3 amp_cleanup @4 amp_close @5 amp_confparam_lookup @6 amp_ext_lookup @7 amp_get_caps @8 amp_get_conf @9 amp_get_ext_level @10 amp_get_freq @11 amp_get_info @12 amp_get_level @13 amp_get_powerstat @14 amp_has_get_level @15 amp_init @16 amp_list_foreach @17 amp_load_all_backends @18 amp_load_backend @19 amp_open @20 amp_parse_level @21 amp_probe_all @22 amp_register @23 amp_reset @24 amp_set_conf @25 amp_set_freq @26 amp_set_powerstat @27 amp_sprintf_level @28 amp_strlevel @29 amp_token_lookup @30 amp_unregister @31 azimuth_long_path @32 cJSON_AddArrayToObject @33 cJSON_AddBoolToObject @34 cJSON_AddFalseToObject @35 cJSON_AddItemReferenceToArray @36 cJSON_AddItemReferenceToObject @37 cJSON_AddItemToArray @38 cJSON_AddItemToObject @39 cJSON_AddItemToObjectCS @40 cJSON_AddNullToObject @41 cJSON_AddNumberToObject @42 cJSON_AddObjectToObject @43 cJSON_AddRawToObject @44 cJSON_AddStringToObject @45 cJSON_AddTrueToObject @46 cJSON_Compare @47 cJSON_CreateArray @48 cJSON_CreateArrayReference @49 cJSON_CreateBool @50 cJSON_CreateDoubleArray @51 cJSON_CreateFalse @52 cJSON_CreateFloatArray @53 cJSON_CreateIntArray @54 cJSON_CreateNull @55 cJSON_CreateNumber @56 cJSON_CreateObject @57 cJSON_CreateObjectReference @58 cJSON_CreateRaw @59 cJSON_CreateString @60 cJSON_CreateStringArray @61 cJSON_CreateStringReference @62 cJSON_CreateTrue @63 cJSON_Delete @64 cJSON_DeleteItemFromArray @65 cJSON_DeleteItemFromObject @66 cJSON_DeleteItemFromObjectCaseSensitive @67 cJSON_DetachItemFromArray @68 cJSON_DetachItemFromObject @69 cJSON_DetachItemFromObjectCaseSensitive @70 cJSON_DetachItemViaPointer @71 cJSON_Duplicate @72 cJSON_GetArrayItem @73 cJSON_GetArraySize @74 cJSON_GetErrorPtr @75 cJSON_GetNumberValue @76 cJSON_GetObjectItem @77 cJSON_GetObjectItemCaseSensitive @78 cJSON_GetStringValue @79 cJSON_HasObjectItem @80 cJSON_InitHooks @81 cJSON_InsertItemInArray @82 cJSON_IsArray @83 cJSON_IsBool @84 cJSON_IsFalse @85 cJSON_IsInvalid @86 cJSON_IsNull @87 cJSON_IsNumber @88 cJSON_IsObject @89 cJSON_IsRaw @90 cJSON_IsString @91 cJSON_IsTrue @92 cJSON_Minify @93 cJSON_Parse @94 cJSON_ParseWithLength @95 cJSON_ParseWithLengthOpts @96 cJSON_ParseWithOpts @97 cJSON_Print @98 cJSON_PrintBuffered @99 cJSON_PrintPreallocated @100 cJSON_PrintUnformatted @101 cJSON_ReplaceItemInArray @102 cJSON_ReplaceItemInObject @103 cJSON_ReplaceItemInObjectCaseSensitive @104 cJSON_ReplaceItemViaPointer @105 cJSON_SetNumberHelper @106 cJSON_SetValuestring @107 cJSON_Version @108 cJSON_free @109 cJSON_malloc @110 cookie_use @111 DATA date_strget @112 debugmsgsave @113 DATA debugmsgsave2 @114 DATA debugmsgsave3 @115 DATA dec2dmmm @116 dec2dms @117 distance_long_path @118 dmmm2dec @119 dms2dec @120 dot10ths_to_millis @121 dump_hex @122 elapsed_ms @123 flrig_cat_string @124 from_bcd @125 from_bcd_be @126 get_rig_conf_type @127 hamlib_copyright @128 DATA hamlib_copyright2 @129 DATA hamlib_version @130 DATA hamlib_version2 @131 DATA hl_usleep @132 initamps4_dummy @133 initamps4_kpa1500 @134 initrigs4_adat @135 initrigs4_alinco @136 initrigs4_aor @137 initrigs4_barrett @138 initrigs4_codan @139 initrigs4_dorji @140 initrigs4_drake @141 initrigs4_dummy @142 initrigs4_elad @143 initrigs4_flexradio @144 initrigs4_gomspace @145 initrigs4_icm710 @146 initrigs4_icmarine @147 initrigs4_icom @148 initrigs4_jrc @149 initrigs4_kachina @150 initrigs4_kenwood @151 initrigs4_kit @152 initrigs4_lowe @153 initrigs4_pcr @154 initrigs4_prm80 @155 initrigs4_racal @156 initrigs4_rft @157 initrigs4_rs @158 initrigs4_skanti @159 initrigs4_tapr @160 initrigs4_tentec @161 initrigs4_tuner @162 initrigs4_uniden @163 initrigs4_winradio @164 initrigs4_wj @165 initrigs4_yaesu @166 initrots4_amsat @167 initrots4_ars @168 initrots4_celestron @169 initrots4_cnctrk @170 initrots4_dummy @171 initrots4_easycomm @172 initrots4_ether6 @173 initrots4_fodtrack @174 initrots4_grbltrk @175 initrots4_gs232a @176 initrots4_heathkit @177 initrots4_ioptron @178 initrots4_kit @179 initrots4_m2 @180 initrots4_meade @181 initrots4_prosistel @182 initrots4_radant @183 initrots4_rotorez @184 initrots4_sartek @185 initrots4_satel @186 initrots4_spid @187 initrots4_ts7400 @188 locator2longlat @189 longlat2locator @190 millis_to_dot10ths @191 morse_code_dot_to_millis @192 netrigctl_get_vfo_mode @193 network_multicast_publisher_start @194 network_multicast_publisher_stop @195 par_lock @196 par_read_control @197 par_read_data @198 par_read_status @199 par_unlock @200 par_write_control @201 par_write_data @202 parse_hoststr @203 port_close @204 port_open @205 print_ext_param @206 probeallrigs4_adat @207 probeallrigs4_drake @208 probeallrigs4_elad @209 probeallrigs4_gomspace @210 probeallrigs4_icom @211 probeallrigs4_kenwood @212 probeallrigs4_lowe @213 probeallrigs4_uniden @214 probeallrigs4_yaesu @215 qrb @216 read_block @217 read_block_direct @218 read_string @219 read_string_direct @220 rig_check_backend @221 rig_check_cache_timeout @222 rig_cleanup @223 rig_close @224 rig_confparam_lookup @225 rig_cookie @226 rig_copyright @227 rig_debug @228 rig_ext_func_foreach @229 rig_ext_level_foreach @230 rig_ext_lookup @231 rig_ext_lookup_tok @232 rig_ext_parm_foreach @233 rig_ext_token_lookup @234 rig_flush @235 rig_force_cache_timeout @236 rig_get_ant @237 rig_get_cache @238 rig_get_cache_timeout_ms @239 rig_get_caps @240 rig_get_caps_cptr @241 rig_get_caps_int @242 rig_get_chan_all @243 rig_get_chan_all_cb @244 rig_get_channel @245 rig_get_clock @246 rig_get_conf @247 rig_get_conf2 @248 rig_get_ctcss_sql @249 rig_get_ctcss_tone @250 rig_get_dcd @251 rig_get_dcs_code @252 rig_get_dcs_sql @253 rig_get_ext_func @254 rig_get_ext_level @255 rig_get_ext_parm @256 rig_get_freq @257 rig_get_func @258 rig_get_function_ptr @259 rig_get_info @260 rig_get_level @261 rig_get_mem @262 rig_get_mem_all @263 rig_get_mem_all_cb @264 rig_get_mode @265 rig_get_parm @266 rig_get_powerstat @267 rig_get_ptt @268 rig_get_range @269 rig_get_resolution @270 rig_get_rig_info @271 rig_get_rit @272 rig_get_rptr_offs @273 rig_get_rptr_shift @274 rig_get_split_freq @275 rig_get_split_freq_mode @276 rig_get_split_mode @277 rig_get_split_vfo @278 rig_get_trn @279 rig_get_ts @280 rig_get_twiddle @281 rig_get_vfo @282 rig_get_vfo_info @283 rig_get_vfo_list @284 rig_get_xit @285 rig_has_get_func @286 rig_has_get_level @287 rig_has_get_parm @288 rig_has_scan @289 rig_has_set_func @290 rig_has_set_level @291 rig_has_set_parm @292 rig_has_vfo_op @293 rig_idx2setting @294 rig_init @295 rig_levelagcstr @296 rig_levelagcvalue @297 rig_license @298 rig_list_foreach @299 rig_list_foreach_model @300 rig_load_all_backends @301 rig_load_backend @302 rig_lookup_mem_caps @303 rig_mW2power @304 rig_make_md5 @305 rig_mem_count @306 rig_need_debug @307 rig_no_restore_ai @308 rig_open @309 rig_parse_func @310 rig_parse_level @311 rig_parse_mode @312 rig_parse_mtype @313 rig_parse_parm @314 rig_parse_rptr_shift @315 rig_parse_scan @316 rig_parse_vfo @317 rig_parse_vfo_op @318 rig_passband_narrow @319 rig_passband_normal @320 rig_passband_wide @321 rig_password @322 rig_password_generate_secret @323 rig_power2mW @324 rig_probe @325 rig_probe_all @326 rig_raw2val @327 rig_raw2val_float @328 rig_recv_dtmf @329 rig_register @330 rig_reset @331 rig_scan @332 rig_send_dtmf @333 rig_send_morse @334 rig_send_voice_mem @335 rig_set_ant @336 rig_set_bank @337 rig_set_cache_timeout_ms @338 rig_set_chan_all @339 rig_set_chan_all_cb @340 rig_set_channel @341 rig_set_clock @342 rig_set_conf @343 rig_set_ctcss_sql @344 rig_set_ctcss_tone @345 rig_set_dcd_callback @346 rig_set_dcs_code @347 rig_set_dcs_sql @348 rig_set_debug @349 rig_set_debug_callback @350 rig_set_debug_file @351 rig_set_debug_time_stamp @352 rig_set_ext_func @353 rig_set_ext_level @354 rig_set_ext_parm @355 rig_set_freq @356 rig_set_freq_callback @357 rig_set_func @358 rig_set_level @359 rig_set_mem @360 rig_set_mem_all @361 rig_set_mem_all_cb @362 rig_set_mode @363 rig_set_mode_callback @364 rig_set_parm @365 rig_set_pltune_callback @366 rig_set_powerstat @367 rig_set_ptt @368 rig_set_ptt_callback @369 rig_set_rit @370 rig_set_rptr_offs @371 rig_set_rptr_shift @372 rig_set_spectrum_callback @373 rig_set_split_freq @374 rig_set_split_freq_mode @375 rig_set_split_mode @376 rig_set_split_vfo @377 rig_set_trn @378 rig_set_ts @379 rig_set_twiddle @380 rig_set_uplink @381 rig_set_vfo @382 rig_set_vfo_callback @383 rig_set_vfo_opt @384 rig_set_xit @385 rig_setting2idx @386 rig_settings_load @387 rig_settings_load_all @388 rig_settings_save @389 rig_sprintf_ant @390 rig_sprintf_func @391 rig_sprintf_level @392 rig_sprintf_level_gran @393 rig_sprintf_mode @394 rig_sprintf_parm @395 rig_sprintf_parm_gran @396 rig_sprintf_scan @397 rig_sprintf_spectrum_avg_modes @398 rig_sprintf_spectrum_modes @399 rig_sprintf_spectrum_spans @400 rig_sprintf_vfo @401 rig_sprintf_vfop @402 rig_stop_morse @403 rig_stragclevel @404 rig_strfunc @405 rig_strlevel @406 rig_strmtype @407 rig_strparm @408 rig_strptrshift @409 rig_strrmode @410 rig_strrmodes @411 rig_strscan @412 rig_strspectrummode @413 rig_strstatus @414 rig_strvfo @415 rig_strvfop @416 rig_token_foreach @417 rig_token_lookup @418 rig_unregister @419 rig_valueagclevel @420 rig_version @421 rig_vfo_op @422 rig_wait_morse @423 rigerror @424 rot_check_backend @425 rot_cleanup @426 rot_close @427 rot_confparam_lookup @428 rot_ext_func_foreach @429 rot_ext_level_foreach @430 rot_ext_lookup @431 rot_ext_lookup_tok @432 rot_ext_parm_foreach @433 rot_ext_token_lookup @434 rot_get_caps @435 rot_get_conf @436 rot_get_conf2 @437 rot_get_ext_func @438 rot_get_ext_level @439 rot_get_ext_parm @440 rot_get_func @441 rot_get_info @442 rot_get_level @443 rot_get_parm @444 rot_get_position @445 rot_get_status @446 rot_has_get_func @447 rot_has_get_level @448 rot_has_get_parm @449 rot_has_set_func @450 rot_has_set_level @451 rot_has_set_parm @452 rot_init @453 rot_list_foreach @454 rot_load_all_backends @455 rot_load_backend @456 rot_move @457 rot_open @458 rot_park @459 rot_parse_func @460 rot_parse_level @461 rot_parse_parm @462 rot_probe_all @463 rot_register @464 rot_reset @465 rot_set_conf @466 rot_set_ext_func @467 rot_set_ext_level @468 rot_set_ext_parm @469 rot_set_func @470 rot_set_level @471 rot_set_parm @472 rot_set_position @473 rot_sprintf_func @474 rot_sprintf_level @475 rot_sprintf_level_gran @476 rot_sprintf_parm @477 rot_sprintf_parm_gran @478 rot_sprintf_status @479 rot_stop @480 rot_strfunc @481 rot_strlevel @482 rot_strparm @483 rot_strstatus @484 rot_token_foreach @485 rot_token_lookup @486 rot_unregister @487 ser_get_car @488 ser_get_cts @489 ser_get_dsr @490 ser_get_dtr @491 ser_get_rts @492 ser_set_brk @493 ser_set_dtr @494 ser_set_rts @495 serial_flush @496 serial_open @497 serial_setup @498 spaces @499 sprintf_freq @500 sprintf_level_ext @501 sync_callback @502 to_bcd @503 to_bcd_be @504 to_hex @505 vfo_fixup @506 vfo_fixup2a @507 write_block @508 write_block_sync @509 write_block_sync_error @510