You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
testmodbus-server/guivalues.h

62 lines
1.3 KiB

/////////////////////////////////////////////////////////////////////////////////
//
// guivalues.h is part of TestModbus-Server.
//
/////////////////////////////////////////////////////////////////////////////////
#ifndef _GUIVALUE_H_
#define _GUIVALUE_H_
#include "gui.h"
#include "modbussrv.h"
#include <string>
enum {
VALDATA_COL_NAME = 0,
VALDATA_COL_FC,
VALDATA_COL_REGSTART,
VALDATA_COL_TYPE,
VALDATA_COL_SIM,
VALDATA_COL_VALUE,
VALDATA_COLCOUNT
};
class GuiValue {
public:
GuiValue ();
~GuiValue ();
std::string name;
std::string type;
std::string sim;
std::string value;
int reg;
int fc;
};
void Values_ChangeRegs (int fc, int regstart, int count, ModbusRegister *r);
void Value_Set(GuiValue *v);
void Value_Add(GuiValue *v);
void Value_Del(std::string name);
void Value_DelAll();
void Value_ModStore(GtkTreeModel *model, GtkTreeIter *iter, GuiValue *g);
int Value_GetSize(std::string type);
std::string Value_GetValue(int fc, int reg, string type);
int Value_SetValue(string value, string type, int fc, int *registers, uint16_t *regs);
gboolean Value_Exist (std::string name);
gboolean Value_Loop(gpointer data);
#ifdef __cplusplus
extern "C" {
#endif
G_MODULE_EXPORT void valdata_show(GtkWidget *widget, gpointer data);
#ifdef __cplusplus
}
#endif
#endif