<commit_before>#ifndef AWG_2015_09_28
#define AWG_2015_09_28
#include <string>
#include <cstdio>

#include "pulseTrain.hpp"

class awg {
	public:
		// Constructor
		awg(
			pulseTrain outputPulses=pulseTrain(),
			unsigned long baudRate=19200,
			double clockFrequency=1024.0,
			std::string COMPort=std::string("COM1"),
			std::string waveName=std::string("awgWave.txt")
		)
			: _outputPulses(outputPulses)
			, _baudRate(baudRate)
			, _clockFrequency(clockFrequency)
			, _sampleRate(1000.0/clockFrequency)
			, _waveName(waveName)
			, _COMPort(COMPort)
		{ };
		// Write Accessors
		inline void clockFrequency(double newFreq) {
			if (newFreq < 0) newFreq = -newFreq;

			_clockFrequency = newFreq;
			_sampleRate     = 1000.0/newFreq;
		}
		inline void sampleRate(double newSampleRate) {
			if (newSampleRate < 0) newSampleRate = -newSampleRate;

			_sampleRate     = newSampleRate;
			_clockFrequency = 1000.0/newSampleRate;
		}
		inline void COMPort(const std::string newCOM) {
			_COMPort = newCOM;
		}
		inline void COMPort(const unsigned int newCOMNum) {
			char buffer[16];
			snprintf(buffer, 16, "COM%u", newCOMNum);
			_COMPort = buffer;
		}
		inline void waveName(const std::string newName) {
			_waveName = newName;
		}
		inline void baudRate(const unsigned int newBaudRate) {
			_baudRate = newBaudRate;
		}
		inline void outputPulses(const pulseTrain newPulseTrain) {
			_outputPulses = newPulseTrain;
		}
		// Read Accessors
		inline unsigned long	baudRate()	{return _baudRate;}
		inline std::string	waveName()	{return _waveName;}
		inline std::string	COMPort()	{return _COMPort;}
		inline double	clockFrequency()	{return _clockFrequency;}
		inline double	sampleRate()	{return _sampleRate;}
		inline pulseTrain	outputPulses()	{return _outputPulses;}
	private:
		pulseTrain    _outputPulses;
		unsigned long _baudRate;
		double        _clockFrequency;
		double        _sampleRate;
		std::string   _waveName;
		std::string   _COMPort;
};

#endif //AWG_2015_09_28<commit_msg>outputPulses is public, COMPort -> comPort<commit_after>#ifndef AWG_2015_09_28
#define AWG_2015_09_28
#include <string>
#include <cstdio>

#include "pulseTrain.hpp"

class awg {
	public:
		pulseTrain	outputPulses;
		// Constructor
		awg(
			pulseTrain outputPulses=pulseTrain(),
			unsigned long baudRate=19200,
			double clockFrequency=1024.0,
			std::string comPort=std::string("COM1"),
			std::string waveName=std::string("awgWave.txt")
		)
			: outputPulses(outputPulses)
			, _baudRate(baudRate)
			, _clockFrequency(clockFrequency)
			, _sampleRate(1000.0/clockFrequency)
			, _waveName(waveName)
			, _comPort(comPort)
		{ };
		// Write Accessors
		inline void clockFrequency(double newFreq) {
			if (newFreq < 0) newFreq = -newFreq;

			_clockFrequency = newFreq;
			_sampleRate     = 1000.0/newFreq;
		}
		inline void sampleRate(double newSampleRate) {
			if (newSampleRate < 0) newSampleRate = -newSampleRate;

			_sampleRate     = newSampleRate;
			_clockFrequency = 1000.0/newSampleRate;
		}
		inline void comPort(const std::string newCOM) {
			_comPort = newCOM;
		}
		inline void comPort(const unsigned int newCOMNum) {
			char buffer[16];
			snprintf(buffer, 16, "COM%u", newCOMNum);
			_comPort = buffer;
		}
		inline void waveName(const std::string newName) {
			_waveName = newName;
		}
		inline void baudRate(const unsigned int newBaudRate) {
			_baudRate = newBaudRate;
		}
		// Read Accessors
		inline unsigned long	baudRate()	{return _baudRate;}
		inline std::string	waveName()	{return _waveName;}
		inline std::string	comPort()	{return _comPort;}
		inline double	clockFrequency()	{return _clockFrequency;}
		inline double	sampleRate()	{return _sampleRate;}
	private:
		unsigned long _baudRate;
		double        _clockFrequency;
		double        _sampleRate;
		std::string   _waveName;
		std::string   _comPort;
};

#endif //AWG_2015_09_28
{'fraction_non_alphanumeric': 0.1043613707165109, 'fraction_numerical': 0.029075804776739357, 'mean_word_length': 4.164879356568365, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5950085', 'n_tokens_mistral': 1627, 'n_tokens_neox': 1332, 'n_words': 295}