Small progress. Have to continue here..
This commit is contained in:
@@ -22,7 +22,7 @@ public:
|
||||
m_source_file = source_file;
|
||||
}
|
||||
|
||||
int analyze();
|
||||
virtual int analyze() = 0;
|
||||
|
||||
const std::string &get_src_file()
|
||||
{
|
||||
|
@@ -11,8 +11,7 @@ class TprFrontend : public TempLangFrontend {
|
||||
private:
|
||||
public:
|
||||
TprFrontend(const std::string &source_file);
|
||||
|
||||
int analyze();
|
||||
int analyze() override;
|
||||
|
||||
};
|
||||
|
||||
|
47
tprcc/include/tpr/tpr-types.hpp
Normal file
47
tprcc/include/tpr/tpr-types.hpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef _TPR_TYPES_HPP_
|
||||
#define _TPR_TYPES_HPP_
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace tpr {
|
||||
|
||||
enum class CommandType {
|
||||
pid_conf,
|
||||
temp_set,
|
||||
wait_temp,
|
||||
wait_time,
|
||||
temp_ramp,
|
||||
beep,
|
||||
temp_off,
|
||||
clear_flags,
|
||||
digio_conf,
|
||||
digio_set,
|
||||
digio_wait,
|
||||
};
|
||||
|
||||
struct CommandSpec {
|
||||
CommandType type;
|
||||
std::vector<bool> param_is_whole_num;
|
||||
};
|
||||
|
||||
class TprCommand {
|
||||
private:
|
||||
static const CommandSpec m_specs[11];
|
||||
|
||||
CommandType m_type;
|
||||
std::vector<float> m_parameters;
|
||||
bool is_whole_number(float num) const;
|
||||
|
||||
public:
|
||||
TprCommand(CommandType type);
|
||||
TprCommand(CommandType type, const std::vector<float> ¶ms);
|
||||
TprCommand(CommandType type, const std::vector<float> &¶ms);
|
||||
|
||||
|
||||
bool check_command(bool print_status) const;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif /* _TPR_TYPES_HPP_ */
|
Reference in New Issue
Block a user