* \brief Set the value of a requested extension levels token. * * \param amp The #AMP handle. * \param level The requested extension levels token. * \param val The variable to set the extension \a level token value. * * Query the \a val corresponding to the extension \a level token. * * \return RIG_OK if the operation was successful, otherwise a **negative * value** if an error occurred (
| 832 | * \sa amp_set_level() |
| 833 | */ |
| 834 | int HAMLIB_API amp_set_ext_level(AMP *amp, hamlib_token_t level, value_t val) |
| 835 | { |
| 836 | amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); |
| 837 | |
| 838 | if (CHECK_AMP_ARG(amp)) |
| 839 | { |
| 840 | return -RIG_EINVAL; |
| 841 | } |
| 842 | |
| 843 | if (amp->caps->set_ext_level == NULL) |
| 844 | { |
| 845 | return -RIG_ENAVAIL; |
| 846 | } |
| 847 | |
| 848 | return amp->caps->set_ext_level(amp, level, val); |
| 849 | } |
| 850 | |
| 851 | /** |
| 852 | * \brief Query the value of a requested extension levels token. |