MMDVMHost/FMNetwork.h

50 lines
1.3 KiB
C
Raw Normal View History

2020-12-15 17:21:07 +01:00
/*
2024-01-31 16:34:19 +01:00
* Copyright (C) 2020,2021,2023,2024 by Jonathan Naylor G4KLX
2020-12-15 17:21:07 +01:00
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef FMNetwork_H
#define FMNetwork_H
#include <cstdint>
#include <string>
2024-01-31 16:34:19 +01:00
class IFMNetwork {
2020-12-15 17:21:07 +01:00
public:
2024-01-31 16:34:19 +01:00
virtual ~IFMNetwork() = 0;
2020-12-15 17:21:07 +01:00
2024-01-31 16:34:19 +01:00
virtual bool open() = 0;
2020-12-15 17:21:07 +01:00
2024-01-31 16:34:19 +01:00
virtual void enable(bool enabled) = 0;
2020-12-15 17:21:07 +01:00
2024-01-31 16:34:19 +01:00
virtual bool writeData(const float* data, unsigned int nSamples) = 0;
2020-12-15 17:21:07 +01:00
2024-01-31 16:34:19 +01:00
virtual bool writeEnd() = 0;
2020-12-15 17:21:07 +01:00
2024-01-31 16:34:19 +01:00
virtual unsigned int readData(float* out, unsigned int nOut) = 0;
2020-12-15 17:21:07 +01:00
2024-01-31 16:34:19 +01:00
virtual void reset() = 0;
2020-12-15 17:21:07 +01:00
2024-01-31 16:34:19 +01:00
virtual void close() = 0;
2020-12-15 17:21:07 +01:00
2024-01-31 16:34:19 +01:00
virtual void clock(unsigned int ms) = 0;
2020-12-15 17:21:07 +01:00
private:
};
#endif