Hamlib/include/hamlib/ampclass.h

72 wiersze
2.0 KiB
C
Czysty Zwykły widok Historia

2019-06-12 20:52:35 +00:00
/*
2019-06-26 11:39:42 +00:00
* Hamlib C++ bindings - amplifier API header
2019-06-12 20:52:35 +00:00
* Copyright (c) 2002 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
*
*/
2019-06-26 11:39:42 +00:00
#ifndef _AMPCLASS_H
#define _AMPCLASS_H 1
2019-06-12 20:52:35 +00:00
2019-06-26 11:39:42 +00:00
#include <hamlib/amplifier.h>
2019-06-12 20:52:35 +00:00
2020-04-09 22:56:19 +00:00
//! @cond Doxygen_Suppress
class HAMLIB_CPP_IMPEXP Amplifier
2019-06-12 20:52:35 +00:00
{
private:
2019-06-26 11:39:42 +00:00
AMP *theAmp; // Global ref. to the amp
2019-06-12 20:52:35 +00:00
protected:
public:
2020-03-19 17:10:20 +00:00
explicit Amplifier(amp_model_t amp_model);
2019-06-12 20:52:35 +00:00
2019-06-26 11:39:42 +00:00
virtual ~Amplifier();
2019-06-12 20:52:35 +00:00
2021-04-06 12:22:28 +00:00
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) || __cplusplus >= 201103L)
Amplifier(const Amplifier&) = default;
Amplifier(Amplifier&&) = default;
Amplifier& operator=(const Amplifier&) = default;
Amplifier& operator=(Amplifier&&) = default;
2021-04-06 12:22:28 +00:00
#endif
2019-06-26 11:39:42 +00:00
const struct amp_caps *caps;
2019-06-12 20:52:35 +00:00
2019-06-26 11:39:42 +00:00
// This method opens the communication port to the amp
2019-06-12 20:52:35 +00:00
void open(void);
2019-06-26 11:39:42 +00:00
// This method closes the communication port to the amp
2019-06-12 20:52:35 +00:00
void close(void);
void setConf(hamlib_token_t token, const char *val);
2019-06-12 20:52:35 +00:00
void setConf(const char *name, const char *val);
void getConf(hamlib_token_t token, char *val);
2019-06-12 20:52:35 +00:00
void getConf(const char *name, char *val);
hamlib_token_t tokenLookup(const char *name);
2019-06-12 20:52:35 +00:00
2019-06-26 11:39:42 +00:00
void setFreq(freq_t freq);
2019-10-15 14:07:19 +00:00
freq_t getFreq();
2019-06-12 20:52:35 +00:00
2019-06-26 11:39:42 +00:00
void reset(amp_reset_t reset);
2019-06-12 20:52:35 +00:00
};
2020-04-09 22:56:19 +00:00
//! @endcond
2019-06-12 20:52:35 +00:00
2019-06-26 11:39:42 +00:00
#endif // _AMPCLASS_H