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.
60 lines
1.4 KiB
60 lines
1.4 KiB
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// client.h is part of TestModbus-Client.
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _CLIENT_H_
|
|
#define _CLIENT_H_
|
|
|
|
#include <gtk/gtk.h>
|
|
#include <gdk/gdk.h>
|
|
#include <glib.h>
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <list>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "modbus.h"
|
|
|
|
#define LEN_STATUSTEXT 255
|
|
|
|
void displayerror (std::string error);
|
|
|
|
|
|
// ***********************************************************************
|
|
//
|
|
// main windows call backs
|
|
//
|
|
gboolean mbcli_thread_cb_error(gpointer data);
|
|
gboolean mbcli_thread_cb_status(gpointer data);
|
|
gboolean mbcli_thread_cb_net(gpointer data);
|
|
|
|
int mbcli_get_FC ();
|
|
int mbcli_get_register ();
|
|
int mbcli_get_unitid ();
|
|
int mbcli_get_number ();
|
|
int mbcli_get_update ();
|
|
void mbcli_set_update (int active);
|
|
int mbcli_get_FC1516 ();
|
|
void mbcli_readdata();
|
|
gboolean mbcli_refreshtimeout(gpointer data);
|
|
|
|
std::string to_hex16 (int v);
|
|
|
|
G_MODULE_EXPORT void mbcli_cb_show(GtkWidget *widget, gpointer data);
|
|
G_MODULE_EXPORT void mbcli_cb_updateread (GtkToggleButton *togglebutton, gpointer user_data);
|
|
G_MODULE_EXPORT void mbcli_cb_connect (GtkWidget *widget, gpointer data);
|
|
G_MODULE_EXPORT void mbcli_cb_disconnect (GtkWidget *widget, gpointer data);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif
|