📄 gmcode.hh
字号:
#ifndef GMCODE_LIST_HH
#define GMCODE_LIST_HH
/*
Mechanism for building lists of arbitrary NML messages, used by
the canonical interface and interpreter to pass planned sequences
to the HME.
Modification history:
25-Jun-2001 made commandbuf part of a union and add dummy variable
to ensure alignment.
25-Jul-1997 FMP changed line number stuff;
changed MAX_EMC_NML_COMMAND_SIZE to MAX_NML_COMMAND_SIZE (I'm trying
to get the EMC prejudice out of here)
22-Oct-1996 WPS attempted to fix alignment problems by moving the
command member of NML_INTERP_LIST_NODE to the begining of the structure.
16-Nov-1995 Fred Proctor created
*/
#include "rs274ngc.hh"
//#define MAX_GMCODE_SIZE 1000
class RCS_LINKED_LIST;
struct ACTIVE_CODES
{
int active_g_codes[RS274NGC_ACTIVE_G_CODES];
int active_m_codes[RS274NGC_ACTIVE_M_CODES];
double active_settings[RS274NGC_ACTIVE_SETTINGS];
//double comp_radius_x;
//double comp_radius_y;
};
// these go on the interp list
struct GMCODE_LIST_NODE
{
int line_number; // line number it was on
ACTIVE_CODES gmcodes;
};
// here's the interp list itself
class GMCODE_LIST
{
public:
GMCODE_LIST();
~GMCODE_LIST();
int set_line_number(int line);
int get_line_number();
int append(ACTIVE_CODES &);
int append(ACTIVE_CODES *);
ACTIVE_CODES *get();
void clear();
void print();
int len();
private:
RCS_LINKED_LIST *linked_list_ptr;
GMCODE_LIST_NODE temp_node; // filled in and put on the list
int next_line_number; // line number used to fill temp_node
int line_number; // line number of node from get()
};
extern GMCODE_LIST GMcode_list; /* NML Union, for interpreter */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -