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
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-26 11:39:42 +00:00
|
|
|
class BACKEND_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:
|
2019-06-26 11:39:42 +00:00
|
|
|
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
|
|
|
|
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(token_t token, const char *val);
|
|
|
|
void setConf(const char *name, const char *val);
|
|
|
|
void getConf(token_t token, char *val);
|
|
|
|
void getConf(const char *name, char *val);
|
|
|
|
token_t tokenLookup(const char *name);
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-26 11:39:42 +00:00
|
|
|
#endif // _AMPCLASS_H
|