Commit 3f01b939 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Removed selective redrawing: This should fix those rendering artifacts.

+Autoformat on profibus files.
parent da14b842
......@@ -57,8 +57,7 @@ int main(int argc, char* argv[])
pwr_tStatus sts;
if (argc < 2 || streq(argv[1], "-h"))
{
if (argc < 2 || streq(argv[1], "-h")) {
printf("\nUsage: pn_get_deviceid \"file-pattern\" > "
"profinet_deviceid.dat\n\n");
exit(0);
......@@ -67,8 +66,7 @@ int main(int argc, char* argv[])
dcli_translate_filename(file_spec, argv[1]);
sts = dcli_search_file(file_spec, found_file, DCLI_DIR_SEARCH_INIT);
while (ODD(sts))
{
while (ODD(sts)) {
printf("# Processing file: %s\n", found_file);
parse_file(found_file);
......@@ -91,8 +89,7 @@ void parse_file(char* filename)
dcli_translate_filename(fname, filename);
fp.open(fname);
if (!fp)
{
if (!fp) {
printf("# Unable to open file\n");
exit(0);
}
......@@ -105,26 +102,19 @@ void parse_file(char* filename)
int vendorid_found = 0;
int infotextid_found = 0;
int infotext_found = 0;
while (fp.getline(line, sizeof(line)))
{
while (fp.getline(line, sizeof(line))) {
char* s;
if (!in_deviceid)
{
if (!in_deviceid) {
if ((s = strstr(line, "<DeviceIdentity")))
in_deviceid = 1;
}
if (in_deviceid)
{
if (!deviceid_found)
{
if ((s = strstr(line, "DeviceID")))
{
for (s += 9; *s; s++)
{
if (*s == '\"')
{
if (in_deviceid) {
if (!deviceid_found) {
if ((s = strstr(line, "DeviceID"))) {
for (s += 9; *s; s++) {
if (*s == '\"') {
sscanf(s + 3, "%x", &deviceid);
deviceid_found = 1;
break;
......@@ -132,14 +122,10 @@ void parse_file(char* filename)
}
}
}
if (!vendorid_found)
{
if ((s = strstr(line, "VendorID")))
{
for (s += 9; *s; s++)
{
if (*s == '\"')
{
if (!vendorid_found) {
if ((s = strstr(line, "VendorID"))) {
for (s += 9; *s; s++) {
if (*s == '\"') {
sscanf(s + 3, "%x", &vendorid);
vendorid_found = 1;
break;
......@@ -147,14 +133,10 @@ void parse_file(char* filename)
}
}
}
if (!infotextid_found)
{
if ((s = strstr(line, "<InfoText")))
{
for (s += 16; *s; s++)
{
if (*s == '\"')
{
if (!infotextid_found) {
if ((s = strstr(line, "<InfoText"))) {
for (s += 16; *s; s++) {
if (*s == '\"') {
strncpy(infotextid, s + 1, sizeof(infotextid));
if ((s = strchr(infotextid, '\"')))
*s = 0;
......@@ -164,8 +146,7 @@ void parse_file(char* filename)
}
}
}
if (strstr(line, "</DeviceIdentity>"))
{
if (strstr(line, "</DeviceIdentity>")) {
in_deviceid = 0;
printf("%u %u\n", vendorid, deviceid);
......@@ -180,22 +161,16 @@ void parse_file(char* filename)
}
}
if (!in_devicefunction)
{
if (!in_devicefunction) {
if ((s = strstr(line, "<DeviceFunction")))
in_devicefunction = 1;
}
if (in_devicefunction)
{
if (!family_found)
{
if ((s = strstr(line, "ProductFamily")))
{
for (s += 14; *s; s++)
{
if (*s == '\"')
{
if (in_devicefunction) {
if (!family_found) {
if ((s = strstr(line, "ProductFamily"))) {
for (s += 14; *s; s++) {
if (*s == '\"') {
strncpy(family, s + 1, sizeof(family));
if ((s = strchr(family, '\"')))
*s = 0;
......@@ -207,19 +182,14 @@ void parse_file(char* filename)
}
}
}
if (infotextid_found && !infotext_found)
{
if (infotextid_found && !infotext_found) {
if (strstr(line, "<Text") && strstr(line, infotextid))
in_text = 1;
if (in_text)
{
if ((s = strstr(line, "Value")))
{
for (s += 6; *s; s++)
{
if (*s == '\"')
{
if (in_text) {
if ((s = strstr(line, "Value"))) {
for (s += 6; *s; s++) {
if (*s == '\"') {
strncpy(infotext, s + 1, sizeof(infotext));
if ((s = strchr(infotext, '\"')))
*s = 0;
......
......@@ -61,16 +61,15 @@ static gint delete_event(GtkWidget* w, GdkEvent* event, gpointer viewer)
static void destroy_event(GtkWidget* w, gpointer data) {}
PnViewerGtk::PnViewerGtk(void* v_parent_ctx, GtkWidget* v_parent_wid,
const char* v_name, const char* v_device,
pwr_tStatus* status)
: PnViewer(v_parent_ctx, v_name, v_device, status), parent_wid(v_parent_wid)
const char* v_name, const char* v_device, pwr_tStatus* status)
: PnViewer(v_parent_ctx, v_name, v_device, status)
, parent_wid(v_parent_wid)
{
const int window_width = 800;
const int window_height = 600;
toplevel = (GtkWidget*)g_object_new(GTK_TYPE_WINDOW, "default-height",
window_height, "default-width",
window_width, "title", v_name, NULL);
window_height, "default-width", window_width, "title", v_name, NULL);
g_signal_connect(toplevel, "delete_event", G_CALLBACK(delete_event), this);
g_signal_connect(toplevel, "destroy", G_CALLBACK(destroy_event), this);
......@@ -79,17 +78,17 @@ PnViewerGtk::PnViewerGtk(void* v_parent_ctx, GtkWidget* v_parent_wid,
CoWowGtk::SetWindowIcon(toplevel);
GtkAccelGroup* accel_g =
(GtkAccelGroup*)g_object_new(GTK_TYPE_ACCEL_GROUP, NULL);
GtkAccelGroup* accel_g
= (GtkAccelGroup*)g_object_new(GTK_TYPE_ACCEL_GROUP, NULL);
gtk_window_add_accel_group(GTK_WINDOW(toplevel), accel_g);
GtkMenuBar* menu_bar = (GtkMenuBar*)g_object_new(GTK_TYPE_MENU_BAR, NULL);
// File Entry
GtkWidget* file_close =
gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, accel_g);
g_signal_connect(file_close, "activate",
G_CALLBACK(PnViewerGtk::activate_exit), this);
GtkWidget* file_close
= gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, accel_g);
g_signal_connect(
file_close, "activate", G_CALLBACK(PnViewerGtk::activate_exit), this);
GtkMenu* file_menu = (GtkMenu*)g_object_new(GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_close);
......@@ -100,20 +99,20 @@ PnViewerGtk::PnViewerGtk(void* v_parent_ctx, GtkWidget* v_parent_wid,
// Functions Entry
GtkWidget* functions_update = gtk_menu_item_new_with_mnemonic("_Update");
g_signal_connect(functions_update, "activate", G_CALLBACK(activate_update),
this);
g_signal_connect(
functions_update, "activate", G_CALLBACK(activate_update), this);
GtkWidget* functions_filter = gtk_menu_item_new_with_mnemonic("_Filter");
g_signal_connect(functions_filter, "activate", G_CALLBACK(activate_filter),
this);
g_signal_connect(
functions_filter, "activate", G_CALLBACK(activate_filter), this);
GtkWidget* functions_setdevice =
gtk_menu_item_new_with_mnemonic("_Set Device Properties");
g_signal_connect(functions_setdevice, "activate",
G_CALLBACK(activate_setdevice), this);
GtkWidget* functions_setdevice
= gtk_menu_item_new_with_mnemonic("_Set Device Properties");
g_signal_connect(
functions_setdevice, "activate", G_CALLBACK(activate_setdevice), this);
GtkWidget* functions_changevalue =
gtk_menu_item_new_with_mnemonic("_Change Value");
GtkWidget* functions_changevalue
= gtk_menu_item_new_with_mnemonic("_Change Value");
g_signal_connect(functions_changevalue, "activate",
G_CALLBACK(activate_changevalue), this);
gtk_widget_add_accelerator(functions_changevalue, "activate", accel_g, 'q',
......@@ -127,26 +126,26 @@ PnViewerGtk::PnViewerGtk(void* v_parent_ctx, GtkWidget* v_parent_wid,
GtkWidget* functions = gtk_menu_item_new_with_mnemonic("F_unctions");
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), functions);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(functions),
GTK_WIDGET(functions_menu));
gtk_menu_item_set_submenu(
GTK_MENU_ITEM(functions), GTK_WIDGET(functions_menu));
// View menu
GtkWidget* view_zoom_in =
gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_IN, NULL);
GtkWidget* view_zoom_in
= gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_IN, NULL);
g_signal_connect(view_zoom_in, "activate",
G_CALLBACK(PnViewerGtk::activate_zoom_in), this);
gtk_widget_add_accelerator(view_zoom_in, "activate", accel_g, 'i',
GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkWidget* view_zoom_out =
gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_OUT, NULL);
GtkWidget* view_zoom_out
= gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_OUT, NULL);
g_signal_connect(view_zoom_out, "activate",
G_CALLBACK(PnViewerGtk::activate_zoom_out), this);
gtk_widget_add_accelerator(view_zoom_out, "activate", accel_g, 'o',
GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkWidget* view_zoom_reset =
gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_100, NULL);
GtkWidget* view_zoom_reset
= gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_100, NULL);
g_signal_connect(view_zoom_reset, "activate",
G_CALLBACK(PnViewerGtk::activate_zoom_reset), this);
......@@ -160,8 +159,8 @@ PnViewerGtk::PnViewerGtk(void* v_parent_ctx, GtkWidget* v_parent_wid,
gtk_menu_item_set_submenu(GTK_MENU_ITEM(view), GTK_WIDGET(view_menu));
// Help menu
GtkWidget* help_help =
gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP, NULL);
GtkWidget* help_help
= gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP, NULL);
g_signal_connect(help_help, "activate", G_CALLBACK(activate_help), this);
GtkMenu* help_menu = (GtkMenu*)g_object_new(GTK_TYPE_MENU, NULL);
......@@ -184,8 +183,8 @@ PnViewerGtk::PnViewerGtk(void* v_parent_ctx, GtkWidget* v_parent_wid,
cmd_entry = new CoWowEntryGtk(value_recall);
cmd_input = cmd_entry->widget();
gtk_widget_set_size_request(cmd_input, -1, 25);
g_signal_connect(cmd_input, "activate", G_CALLBACK(valchanged_cmd_input),
this);
g_signal_connect(
cmd_input, "activate", G_CALLBACK(valchanged_cmd_input), this);
gtk_box_pack_start(GTK_BOX(statusbar), msg_label, FALSE, FALSE, 20);
gtk_box_pack_start(GTK_BOX(statusbar), cmd_prompt, FALSE, FALSE, 20);
......@@ -199,13 +198,13 @@ PnViewerGtk::PnViewerGtk(void* v_parent_ctx, GtkWidget* v_parent_wid,
GtkWidget* header_left = gtk_label_new("Devices on Network");
GtkWidget* header_right = gtk_label_new("Devices from Configuration");
viewernav =
new PnViewerNavGtk(this, nav_right, viewer_eType_Network, &nav_widget);
viewernav
= new PnViewerNavGtk(this, nav_right, viewer_eType_Network, &nav_widget);
viewernav->change_value_cb = &change_value;
viewernav->message_cb = &message_cb;
viewernavconf = new PnViewerNavGtk(this, nav_left, viewer_eType_Configuration,
&navconf_widget);
viewernavconf = new PnViewerNavGtk(
this, nav_left, viewer_eType_Configuration, &navconf_widget);
viewernavconf->change_value_cb = &change_value;
viewernavconf->message_cb = &message_cb;
......@@ -245,8 +244,8 @@ PnViewerGtk::~PnViewerGtk()
void PnViewerGtk::message(char severity, const char* msg)
{
char* messageutf8 =
g_convert(msg, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
char* messageutf8
= g_convert(msg, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
gtk_label_set_text(GTK_LABEL(msg_label), messageutf8);
g_free(messageutf8);
}
......@@ -255,8 +254,7 @@ void PnViewerGtk::open_change_value()
{
int sts;
if (input_open)
{
if (input_open) {
g_object_set(cmd_input, "visible", FALSE, NULL);
set_prompt("");
input_open = 0;
......@@ -264,8 +262,7 @@ void PnViewerGtk::open_change_value()
}
sts = viewernav->check_attr_value();
if (EVEN(sts))
{
if (EVEN(sts)) {
if (sts == PB__ATTRNOEDIT)
message('E', "Attribute is no edit");
else
......@@ -293,8 +290,7 @@ void PnViewerGtk::valchanged_cmd_input(GtkWidget* w, gpointer data)
text = g_convert(textutf8, -1, "ISO8859-1", "UTF-8", NULL, NULL, NULL);
g_free(textutf8);
if (viewer->input_open)
{
if (viewer->input_open) {
sts = viewer->viewernav->set_attr_value(text);
g_object_set(w, "visible", FALSE, NULL);
viewer->set_prompt("");
......@@ -305,15 +301,12 @@ void PnViewerGtk::valchanged_cmd_input(GtkWidget* w, gpointer data)
void PnViewerGtk::set_prompt(const char* prompt)
{
if (streq(prompt, ""))
{
if (streq(prompt, "")) {
g_object_set(cmd_prompt, "visible", FALSE, NULL);
g_object_set(msg_label, "visible", TRUE, NULL);
}
else
{
char* promptutf8 =
g_convert(prompt, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
} else {
char* promptutf8
= g_convert(prompt, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
g_object_set(msg_label, "visible", FALSE, NULL);
g_object_set(cmd_prompt, "visible", TRUE, "label", promptutf8, NULL);
......@@ -321,13 +314,12 @@ void PnViewerGtk::set_prompt(const char* prompt)
}
}
gboolean PnViewerGtk::action_inputfocus(GtkWidget* w, GdkEvent* event,
gpointer data)
gboolean PnViewerGtk::action_inputfocus(
GtkWidget* w, GdkEvent* event, gpointer data)
{
PnViewerGtk* viewer = (PnViewerGtk*)data;
if (viewer)
{
if (viewer) {
if (viewer->focustimer.disabled())
return FALSE;
......
......@@ -43,8 +43,7 @@
#include "../src/pn_viewer.h"
class PnViewerGtk : public PnViewer
{
class PnViewerGtk : public PnViewer {
public:
PnViewerGtk(void* v_parent_ctx, GtkWidget* v_parent_wid, const char* v_name,
const char* v_device, pwr_tStatus* status);
......@@ -67,8 +66,8 @@ public:
void set_prompt(const char* prompt);
void open_change_value();
static gboolean action_inputfocus(GtkWidget* w, GdkEvent* event,
gpointer data);
static gboolean action_inputfocus(
GtkWidget* w, GdkEvent* event, gpointer data);
static void valchanged_cmd_input(GtkWidget* w, gpointer data);
static void activate_exit(GtkWidget* w, gpointer data);
static void activate_update(GtkWidget* w, gpointer data);
......
......@@ -51,10 +51,11 @@ extern "C" {
PnViewerNavGtk::PnViewerNavGtk(void* l_parent_ctx, GtkWidget* l_parent_wid,
viewer_eType l_type, GtkWidget** w)
: PnViewerNav(l_parent_ctx, l_type), parent_wid(l_parent_wid)
: PnViewerNav(l_parent_ctx, l_type)
, parent_wid(l_parent_wid)
{
form_widget =
scrolledbrowwidgetgtk_new(PnViewerNav::init_brow_cb, this, &brow_widget);
form_widget = scrolledbrowwidgetgtk_new(
PnViewerNav::init_brow_cb, this, &brow_widget);
gtk_widget_show_all(brow_widget);
......@@ -71,6 +72,9 @@ PnViewerNavGtk::~PnViewerNavGtk()
gtk_widget_destroy(form_widget);
}
void PnViewerNavGtk::set_input_focus() { gtk_widget_grab_focus(brow_widget); }
void PnViewerNavGtk::set_input_focus()
{
gtk_widget_grab_focus(brow_widget);
}
#endif
......@@ -41,8 +41,7 @@
#include "../src/pn_viewernav.h"
class PnViewerNavGtk : public PnViewerNav
{
class PnViewerNavGtk : public PnViewerNav {
public:
PnViewerNavGtk(void* v_parent_ctx, GtkWidget* v_parent_wid,
viewer_eType v_type, GtkWidget** w);
......
......@@ -49,8 +49,7 @@
#include "pn_viewer_gtk.h"
typedef struct
{
typedef struct {
GtkWidget* toplevel;
PnViewer* viewer;
} tViewer;
......@@ -81,46 +80,35 @@ int main(int argc, char* argv[])
setlocale(LC_TIME, "en_US");
ctx->toplevel = (GtkWidget*)g_object_new(GTK_TYPE_WINDOW, "default-height",
100, "default-width", 100, "title",
"Profinet Viewer", NULL);
100, "default-width", 100, "title", "Profinet Viewer", NULL);
// Create help window
CoXHelpGtk* xhelp =
new CoXHelpGtk(ctx->toplevel, 0, xhelp_eUtility_Wtt, (int*)&sts);
CoXHelpGtk* xhelp
= new CoXHelpGtk(ctx->toplevel, 0, xhelp_eUtility_Wtt, (int*)&sts);
CoXHelpGtk::set_default(xhelp);
for (i = 1; i < argc; i++)
{
if (streq(argv[i], "-h"))
{
for (i = 1; i < argc; i++) {
if (streq(argv[i], "-h")) {
usage();
exit(0);
}
else if (streq(argv[i], "-l"))
{
if (i + 1 >= argc)
{
} else if (streq(argv[i], "-l")) {
if (i + 1 >= argc) {
usage();
exit(0);
}
Lng::set(argv[i + 1]);
i++;
}
else if (str_StartsWith(argv[i], "eth"))
{
} else if (str_StartsWith(argv[i], "eth")) {
snprintf(dev_name, sizeof(dev_name), "%s", argv[i]);
}
}
// Open window
try
{
ctx->viewer =
new PnViewerGtk(ctx, ctx->toplevel, "Profinet Viewer", dev_name, &sts);
try {
ctx->viewer = new PnViewerGtk(
ctx, ctx->toplevel, "Profinet Viewer", dev_name, &sts);
ctx->viewer->close_cb = viewer_close;
}
catch (co_error& e)
{
} catch (co_error& e) {
printf("** Exception: %s\n", e.what().c_str());
exit(0);
}
......@@ -129,12 +117,9 @@ int main(int argc, char* argv[])
g_object_set(ctx->toplevel, "visible", FALSE, NULL);
try
{
try {
ctx->viewer->update_devices();
}
catch (co_error& e)
{
} catch (co_error& e) {
printf("** Exception: %s\n", e.what().c_str());
}
......@@ -145,5 +130,8 @@ int main(int argc, char* argv[])
#else
#include <stdio.h>
int main() { printf("Softing PNAK not built with this Proview release\n"); }
int main()
{
printf("Softing PNAK not built with this Proview release\n");
}
#endif
......@@ -55,8 +55,9 @@ void PnViewerQtWidget::closeEvent(QCloseEvent* event)
QWidget::closeEvent(event);
}
PnViewerQt::PnViewerQt(const char* v_name, const char* v_device,
pwr_tStatus* status) : PnViewer(NULL, v_name, v_device, status)
PnViewerQt::PnViewerQt(
const char* v_name, const char* v_device, pwr_tStatus* status)
: PnViewer(NULL, v_name, v_device, status)
{
toplevel = new PnViewerQtWidget(this);
toplevel->setMinimumSize(800, 600);
......@@ -123,8 +124,8 @@ PnViewerQt::PnViewerQt(const char* v_name, const char* v_device,
viewernav->change_value_cb = &change_value;
viewernav->message_cb = &message_cb;
viewernavconf = new PnViewerNavQt(this, viewer_eType_Configuration,
&navconf_widget);
viewernavconf
= new PnViewerNavQt(this, viewer_eType_Configuration, &navconf_widget);
viewernavconf->change_value_cb = &change_value;
viewernavconf->message_cb = &message_cb;
......@@ -195,7 +196,8 @@ void PnViewerQt::open_change_value()
void PnViewerQtWidget::valchanged_cmd_entry()
{
if (viewer->input_open) {
viewer->viewernav->set_attr_value(qPrintableLatin1(viewer->cmd_entry->text()));
viewer->viewernav->set_attr_value(
qPrintableLatin1(viewer->cmd_entry->text()));
viewer->cmd_entry->setVisible(false);
viewer->set_prompt("");
viewer->input_open = 0;
......
......@@ -47,8 +47,7 @@
class PnViewerQtWidget;
class PnViewerQt : public PnViewer
{
class PnViewerQt : public PnViewer {
public:
PnViewerQt(const char* v_name, const char* v_device, pwr_tStatus* status);
~PnViewerQt();
......@@ -68,13 +67,13 @@ public:
PnViewerQtWidget* toplevel;
};
class PnViewerQtWidget : public QWidget
{
class PnViewerQtWidget : public QWidget {
Q_OBJECT
public:
PnViewerQtWidget(PnViewerQt* parent_ctx)
: QWidget(), viewer(parent_ctx)
: QWidget()
, viewer(parent_ctx)
{
}
......
......@@ -43,12 +43,12 @@
#include "pn_viewernav_qt.h"
PnViewerNavQt::PnViewerNavQt(void* l_parent_ctx, viewer_eType l_type,
QWidget** w)
PnViewerNavQt::PnViewerNavQt(
void* l_parent_ctx, viewer_eType l_type, QWidget** w)
: PnViewerNav(l_parent_ctx, l_type)
{
form_widget =
scrolledbrowwidgetqt_new(PnViewerNav::init_brow_cb, this, &brow_widget);
form_widget
= scrolledbrowwidgetqt_new(PnViewerNav::init_brow_cb, this, &brow_widget);
// Create the root item
*w = form_widget;
......@@ -60,6 +60,9 @@ PnViewerNavQt::~PnViewerNavQt()
form_widget->close();
}
void PnViewerNavQt::set_input_focus() { brow_widget->setFocus(); }
void PnViewerNavQt::set_input_focus()
{
brow_widget->setFocus();
}
#endif
......@@ -41,8 +41,7 @@
#include "../src/pn_viewernav.h"
class PnViewerNavQt : public PnViewerNav
{
class PnViewerNavQt : public PnViewerNav {
public:
PnViewerNavQt(void* v_parent_ctx, viewer_eType v_type, QWidget** w);
~PnViewerNavQt();
......
......@@ -63,37 +63,27 @@ int main(int argc, char* argv[])
setlocale(LC_NUMERIC, "POSIX");
setlocale(LC_TIME, "en_US");
for (i = 1; i < argc; i++)
{
if (streq(argv[i], "-h"))
{
for (i = 1; i < argc; i++) {
if (streq(argv[i], "-h")) {
printf("\nUsage: profinet_viewer [-l language] [device]\n");
exit(0);
}
else if (streq(argv[i], "-l"))
{
if (i + 1 >= argc)
{
} else if (streq(argv[i], "-l")) {
if (i + 1 >= argc) {
printf("\nUsage: profinet_viewer [-l language] [device]\n");
exit(0);
}
Lng::set(argv[i + 1]);
i++;
}
else if (str_StartsWith(argv[i], "eth"))
{
} else if (str_StartsWith(argv[i], "eth")) {
snprintf(dev_name, sizeof(dev_name), "%s", argv[i]);
}
}
// Open window
PnViewerQt* viewer;
try
{
try {
viewer = new PnViewerQt("Profinet Viewer", dev_name, &sts);
}
catch (co_error& e)
{
} catch (co_error& e) {
printf("** Exception: %s\n", e.what().c_str());
exit(0);
}
......@@ -102,12 +92,9 @@ int main(int argc, char* argv[])
CoXHelpQt* xhelp = new CoXHelpQt(NULL, xhelp_eUtility_Wtt, (int*)&sts);
CoXHelpQt::set_default(xhelp);
try
{
try {
viewer->update_devices();
}
catch (co_error& e)
{
} catch (co_error& e) {
printf("** Exception: %s\n", e.what().c_str());
}
......@@ -117,6 +104,9 @@ int main(int argc, char* argv[])
#else
#include <stdio.h>
int main() { printf("Softing PNAK not built with this Proview release\n"); }
int main()
{
printf("Softing PNAK not built with this Proview release\n");
}
#endif
......@@ -56,8 +56,13 @@ static int test = 0;
PnViewer::PnViewer(void* v_parent_ctx, const char* v_name, const char* v_device,
pwr_tStatus* status)
: parent_ctx(v_parent_ctx), viewernav(NULL), viewernavconf(NULL), wow(0),
input_open(0), pnet(0), close_cb(0)
: parent_ctx(v_parent_ctx)
, viewernav(NULL)
, viewernavconf(NULL)
, wow(0)
, input_open(0)
, pnet(0)
, close_cb(0)
{
strcpy(name, v_name);
strcpy(device, v_device);
......@@ -66,14 +71,16 @@ PnViewer::PnViewer(void* v_parent_ctx, const char* v_name, const char* v_device,
pnet = new PnViewerPNAC(status, device);
}
PnViewer::~PnViewer() { delete pnet; }
PnViewer::~PnViewer()
{
delete pnet;
}
void PnViewer::update_devices()
{
int sts;
if (!test)
{
if (!test) {
dev_vect.clear();
pnet->fetch_devices(dev_vect);
......@@ -84,9 +91,7 @@ void PnViewer::update_devices()
viewernav->set(dev_vect);
viewernavconf->set(conf_vect);
}
else
{
} else {
dev_vect.clear();
sts = fetch_config(dev_vect);
if (EVEN(sts))
......@@ -104,8 +109,7 @@ void PnViewer::update_devices()
void PnViewer::filter(viewer_eFilterType filtertype)
{
switch (filtertype)
{
switch (filtertype) {
case viewer_eFilterType_No:
for (unsigned int i = 0; i < dev_vect.size(); i++)
dev_vect[i].hide = false;
......@@ -120,18 +124,15 @@ void PnViewer::filter(viewer_eFilterType filtertype)
for (unsigned int i = 0; i < conf_vect.size(); i++)
conf_vect[i].hide = false;
for (unsigned int i = 0; i < dev_vect.size(); i++)
{
for (unsigned int j = 0; j < conf_vect.size(); j++)
{
if (streq(dev_vect[i].devname, conf_vect[j].devname) &&
dev_vect[i].vendorid == conf_vect[j].vendorid &&
dev_vect[i].deviceid == conf_vect[j].deviceid &&
dev_vect[i].ipaddress[0] == conf_vect[j].ipaddress[0] &&
dev_vect[i].ipaddress[1] == conf_vect[j].ipaddress[1] &&
dev_vect[i].ipaddress[2] == conf_vect[j].ipaddress[2] &&
dev_vect[i].ipaddress[3] == conf_vect[j].ipaddress[3])
{
for (unsigned int i = 0; i < dev_vect.size(); i++) {
for (unsigned int j = 0; j < conf_vect.size(); j++) {
if (streq(dev_vect[i].devname, conf_vect[j].devname)
&& dev_vect[i].vendorid == conf_vect[j].vendorid
&& dev_vect[i].deviceid == conf_vect[j].deviceid
&& dev_vect[i].ipaddress[0] == conf_vect[j].ipaddress[0]
&& dev_vect[i].ipaddress[1] == conf_vect[j].ipaddress[1]
&& dev_vect[i].ipaddress[2] == conf_vect[j].ipaddress[2]
&& dev_vect[i].ipaddress[3] == conf_vect[j].ipaddress[3]) {
dev_vect[i].hide = true;
conf_vect[j].hide = true;
break;
......@@ -164,8 +165,7 @@ int PnViewer::fetch_config(std::vector<PnDevice>& vect)
if (!fp)
return 0;
while (dcli_read_line(line, sizeof(line), fp))
{
while (dcli_read_line(line, sizeof(line), fp)) {
nr = dcli_parse(line, " ", "", (char*)elemv,
sizeof(elemv) / sizeof(elemv[0]), sizeof(elemv[0]), 0);
if (nr != 6)
......@@ -174,10 +174,8 @@ int PnViewer::fetch_config(std::vector<PnDevice>& vect)
strncpy(pndevice.devname, elemv[1], sizeof(pndevice.devname));
sts = sscanf(elemv[2], "%hhu.%hhu.%hhu.%hhu", &pndevice.ipaddress[3],
&pndevice.ipaddress[2], &pndevice.ipaddress[1],
&pndevice.ipaddress[0]);
if (sts != 4)
{
&pndevice.ipaddress[2], &pndevice.ipaddress[1], &pndevice.ipaddress[0]);
if (sts != 4) {
printf("Not a valid IP address: %s\n", elemv[2]);
pndevice.ipaddress[0] = 0;
pndevice.ipaddress[1] = 0;
......@@ -189,8 +187,7 @@ int PnViewer::fetch_config(std::vector<PnDevice>& vect)
&pndevice.macaddress[5], &pndevice.macaddress[4],
&pndevice.macaddress[3], &pndevice.macaddress[2],
&pndevice.macaddress[1], &pndevice.macaddress[0]);
if (sts != 6)
{
if (sts != 6) {
printf("Not a valid MAC address: %s\n", elemv[3]);
pndevice.macaddress[0] = 0;
pndevice.macaddress[1] = 0;
......@@ -213,8 +210,8 @@ int PnViewer::fetch_config(std::vector<PnDevice>& vect)
return 1;
}
void PnViewer::set_device_properties(unsigned char* macaddress,
unsigned char* ipaddress, char* devname)
void PnViewer::set_device_properties(
unsigned char* macaddress, unsigned char* ipaddress, char* devname)
{
pnet->set_device_properties(macaddress, ipaddress, devname);
}
......@@ -235,12 +232,9 @@ void PnViewer::message_cb(void* ctx, int severity, const char* msg)
void PnViewer::activate_update()
{
try
{
try {
update_devices();
}
catch (co_error& e)
{
} catch (co_error& e) {
printf("** Update exception: %s\n", e.what().c_str());
}
}
......@@ -256,30 +250,28 @@ void PnViewer::activate_setdevice()
ItemDevice* dev;
sts = viewernav->get_selected_device(&dev);
if (EVEN(sts))
{
if (EVEN(sts)) {
message('E', "Select a device");
return;
}
try
{
try {
set_device_properties(dev->macaddress, dev->ipaddress, dev->devname);
}
catch (co_error& e)
{
} catch (co_error& e) {
printf("** Exception, %s\n", e.what().c_str());
}
}
void PnViewer::activate_changevalue() { open_change_value(); }
void PnViewer::activate_changevalue()
{
open_change_value();
}
void PnViewer::activate_close()
{
if (close_cb)
close_cb(parent_ctx);
else
{
else {
delete this;
exit(0);
}
......@@ -287,8 +279,8 @@ void PnViewer::activate_close()
void PnViewer::activate_help()
{
CoXHelp::dhelp("profinet_viewer", 0, navh_eHelpFile_Other,
"$pwr_lang/man_pb.dat", true);
CoXHelp::dhelp(
"profinet_viewer", 0, navh_eHelpFile_Other, "$pwr_lang/man_pb.dat", true);
}
#endif
......@@ -45,8 +45,7 @@ class CoWow;
class CoWowFocusTimer;
class PnViewerPNAC;
class PnViewer
{
class PnViewer {
public:
PnViewer(void* v_parent_ctx, const char* v_name, const char* v_device,
pwr_tStatus* status);
......@@ -57,8 +56,8 @@ public:
virtual void open_change_value() {}
void update_devices();
void set_device_properties(unsigned char* macaddress,
unsigned char* ipaddress, char* devname);
void set_device_properties(
unsigned char* macaddress, unsigned char* ipaddress, char* devname);
int fetch_config(std::vector<PnDevice>& vect);
void filter(viewer_eFilterType filtertype);
void activate_update();
......
......@@ -66,8 +66,7 @@ PnViewerPNAC::PnViewerPNAC(pwr_tStatus* sts, const char* dev_name)
pnak_init();
*sts = pnak_start_profistack(0, PNAK_SUPERVISOR_MODE);
if (*sts != PNAK_OK)
{
if (*sts != PNAK_OK) {
printf("Starting profistack returned with error code\n");
exit(0);
}
......@@ -76,13 +75,11 @@ PnViewerPNAC::PnViewerPNAC(pwr_tStatus* sts, const char* dev_name)
s = socket(AF_INET, SOCK_DGRAM, 0);
strncpy(ifr.ifr_name, dev_name, sizeof(ifr.ifr_name));
if (ioctl(s, SIOCGIFADDR, &ifr) >= 0)
{
if (ioctl(s, SIOCGIFADDR, &ifr) >= 0) {
strcpy(dev_data.ip_address,
inet_ntoa(((struct sockaddr_in*)&ifr.ifr_addr)->sin_addr));
}
if (ioctl(s, SIOCGIFNETMASK, &ifr) >= 0)
{
if (ioctl(s, SIOCGIFNETMASK, &ifr) >= 0) {
strcpy(dev_data.subnet_mask,
inet_ntoa(((struct sockaddr_in*)&ifr.ifr_netmask)->sin_addr));
}
......@@ -107,17 +104,15 @@ PnViewerPNAC::PnViewerPNAC(pwr_tStatus* sts, const char* dev_name)
/* Download config */
pack_download_req(&local->service_req_res, &dev_data,
pn_dev_data->device_ref);
pack_download_req(
&local->service_req_res, &dev_data, pn_dev_data->device_ref);
*sts = pnak_send_service_req_res(0, &local->service_req_res);
if (*sts == PNAK_OK)
{
if (*sts == PNAK_OK) {
*sts = wait_service_con(local, 0);
if (*sts != PNAK_OK)
{
if (*sts != PNAK_OK) {
/* Loop through devices and calculate offset for io */
}
}
......@@ -128,8 +123,7 @@ PnViewerPNAC::PnViewerPNAC(pwr_tStatus* sts, const char* dev_name)
*sts = pnak_send_service_req_res(0, &local->service_req_res);
if (*sts == PNAK_OK)
{
if (*sts == PNAK_OK) {
*sts = wait_service_con(local, 0);
}
......@@ -141,8 +135,7 @@ PnViewerPNAC::PnViewerPNAC(pwr_tStatus* sts, const char* dev_name)
*sts = pnak_wait_for_multiple_objects(0, &wait_object, PNAK_INFINITE_TIMEOUT);
if (*sts != PNAK_OK)
{
if (*sts != PNAK_OK) {
printf("Setting state failed, sts: %d\r\n", *sts);
return;
}
......@@ -161,10 +154,8 @@ void PnViewerPNAC::fetch_devices(std::vector<PnDevice>& dev_vect)
unsigned int ii;
int sts;
while (1)
{
for (ii = 0; ii < local->dev_info.size(); ii++)
{
while (1) {
for (ii = 0; ii < local->dev_info.size(); ii++) {
delete local->dev_info[ii];
}
......@@ -174,15 +165,11 @@ void PnViewerPNAC::fetch_devices(std::vector<PnDevice>& dev_vect)
sts = pnak_send_service_req_res(0, &local->service_req_res);
if (sts == PNAK_OK)
{
if (sts == PNAK_OK) {
sts = wait_service_con(local, 0);
if (sts == PNAK_OK)
{
if (local->dev_info.size() > 0)
{
for (ii = 0; ii < local->dev_info.size(); ii++)
{
if (sts == PNAK_OK) {
if (local->dev_info.size() > 0) {
for (ii = 0; ii < local->dev_info.size(); ii++) {
device.ipaddress[0] = local->dev_info[ii]->ipaddress[0];
device.ipaddress[1] = local->dev_info[ii]->ipaddress[1];
device.ipaddress[2] = local->dev_info[ii]->ipaddress[2];
......@@ -200,8 +187,7 @@ void PnViewerPNAC::fetch_devices(std::vector<PnDevice>& dev_vect)
dev_vect.push_back(device);
}
break;
}
else
} else
continue;
}
}
......@@ -223,9 +209,8 @@ void PnViewerPNAC::fetch_devices(std::vector<PnDevice>& dev_vect)
// if ( ...error... ) throw co_error_str( "Somethings is wrong...");
}
void PnViewerPNAC::set_device_properties(unsigned char* macaddress,
unsigned char* ipaddress,
char* devname)
void PnViewerPNAC::set_device_properties(
unsigned char* macaddress, unsigned char* ipaddress, char* devname)
{
PnDevice device;
int sts;
......@@ -252,8 +237,7 @@ void PnViewerPNAC::set_device_properties(unsigned char* macaddress,
pack_set_device_name_req(&local->service_req_res, &dev_info);
sts = pnak_send_service_req_res(0, &local->service_req_res);
if (sts == PNAK_OK)
{
if (sts == PNAK_OK) {
sts = wait_service_con(local, 0);
}
......@@ -262,8 +246,7 @@ void PnViewerPNAC::set_device_properties(unsigned char* macaddress,
pack_set_ip_settings_req(&local->service_req_res, &dev_info);
sts = pnak_send_service_req_res(0, &local->service_req_res);
if (sts == PNAK_OK)
{
if (sts == PNAK_OK) {
sts = wait_service_con(local, 0);
}
}
......
......@@ -45,15 +45,14 @@
#include "rt_io_pnak_locals.h"
#include "rt_pn_gsdml_data.h"
class PnViewerPNAC
{
class PnViewerPNAC {
public:
PnViewerPNAC(pwr_tStatus* sts, const char* dev_name);
~PnViewerPNAC();
void fetch_devices(std::vector<PnDevice>& dev_vect);
void set_device_properties(unsigned char* macaddress,
unsigned char* ipaddress, char* devname);
void set_device_properties(
unsigned char* macaddress, unsigned char* ipaddress, char* devname);
GsdmlDeviceData dev_data;
io_sAgentLocal* local;
};
......
......@@ -45,8 +45,7 @@
#include "flow_browapi.h"
class PnDevice
{
class PnDevice {
public:
PnDevice();
unsigned char ipaddress[4];
......@@ -71,11 +70,11 @@ typedef enum {
viewitem_eItemType_DeviceAttr
} viewitem_eItemType;
class PnViewerNavBrow
{
class PnViewerNavBrow {
public:
PnViewerNavBrow(BrowCtx* brow_ctx, void* lvnav)
: ctx(brow_ctx), viewernav(lvnav)
: ctx(brow_ctx)
, viewernav(lvnav)
{
}
~PnViewerNavBrow();
......@@ -95,8 +94,7 @@ public:
void brow_setup();
};
class PnViewerNav
{
class PnViewerNav {
public:
PnViewerNav(void* l_parent_ctx, viewer_eType l_type);
virtual ~PnViewerNav();
......@@ -124,8 +122,7 @@ public:
static int brow_cb(FlowCtx* ctx, flow_tEvent event);
};
class ItemDevice
{
class ItemDevice {
public:
ItemDevice(PnViewerNav* viewernav, const char* item_name,
unsigned char* item_ipaddress, unsigned char* item_macaddress,
......@@ -152,8 +149,7 @@ public:
void close(PnViewerNav* viewernav);
};
class ItemDeviceAttr
{
class ItemDeviceAttr {
public:
ItemDeviceAttr(PnViewerNav* viewernav, const char* item_name,
pwr_eType item_attr_type, void* item_p, brow_tNode dest,
......
......@@ -41,12 +41,9 @@
int main(int argc, char* argv[])
{
for (int i = 1; i < argc; i++)
{
if (streq(argv[i], "-f"))
{
if (i + 1 >= argc)
{
for (int i = 1; i < argc; i++) {
if (streq(argv[i], "-f")) {
if (i + 1 >= argc) {
printf("\nUsage: profinet_viewer [-f windowmgr]");
exit(0);
}
......
......@@ -60,13 +60,10 @@ void GsdAttrGtk::message(char severity, const char* message)
void GsdAttrGtk::set_prompt(const char* prompt)
{
if (streq(prompt, ""))
{
if (streq(prompt, "")) {
g_object_set(cmd_prompt, "visible", FALSE, NULL);
g_object_set(msg_label, "visible", TRUE, NULL);
}
else
{
} else {
g_object_set(msg_label, "visible", FALSE, NULL);
g_object_set(cmd_prompt, "visible", TRUE, NULL);
}
......@@ -78,23 +75,20 @@ void GsdAttrGtk::change_value()
GtkWidget* text_w;
char* value;
if (input_open)
{
if (input_open) {
g_object_set(cmd_input, "visible", FALSE, NULL);
set_prompt("");
input_open = 0;
return;
}
if (!edit_mode)
{
if (!edit_mode) {
message('E', "Not in edit mode");
return;
}
sts = attrnav->check_attr_value(&value);
if (EVEN(sts))
{
if (EVEN(sts)) {
if (sts == PB__NOATTRSEL)
message('E', "No attribute is selected");
else
......@@ -108,19 +102,16 @@ void GsdAttrGtk::change_value()
message(' ', "");
gtk_widget_grab_focus(cmd_input);
if (value)
{
if (value) {
gint pos = 0;
gtk_editable_delete_text(GTK_EDITABLE(cmd_input), 0, -1);
gtk_editable_insert_text(GTK_EDITABLE(cmd_input), value, strlen(value),
&pos);
gtk_editable_insert_text(
GTK_EDITABLE(cmd_input), value, strlen(value), &pos);
// Select the text
gtk_editable_set_position(GTK_EDITABLE(cmd_input), -1);
gtk_editable_select_region(GTK_EDITABLE(cmd_input), 0, -1);
}
else
{
} else {
gtk_editable_delete_text(GTK_EDITABLE(cmd_input), 0, -1);
}
set_prompt("value >");
......@@ -233,8 +224,7 @@ void GsdAttrGtk::activate_cmd_input(GtkWidget* w, gpointer data)
attr->attrnav->set_inputfocus();
text = gtk_editable_get_chars(GTK_EDITABLE(w), 0, -1);
if (attr->input_open)
{
if (attr->input_open) {
sts = attr->attrnav->set_attr_value(text);
g_object_set(w, "visible", FALSE, NULL);
attr->set_prompt("");
......@@ -243,8 +233,8 @@ void GsdAttrGtk::activate_cmd_input(GtkWidget* w, gpointer data)
g_free(text);
}
gboolean GsdAttrGtk::action_inputfocus(GtkWidget* w, GdkEvent* event,
gpointer data)
gboolean GsdAttrGtk::action_inputfocus(
GtkWidget* w, GdkEvent* event, gpointer data)
{
GsdAttrGtk* attr = (GsdAttrGtk*)data;
gboolean input_visible;
......@@ -284,31 +274,30 @@ GsdAttrGtk::GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx,
int sts;
toplevel = (GtkWidget*)g_object_new(GTK_TYPE_WINDOW, "default-height", 600,
"default-width", 500, "title",
"pbGsdEditor", NULL);
"default-width", 500, "title", "pbGsdEditor", NULL);
g_signal_connect(toplevel, "delete_event", G_CALLBACK(delete_event), this);
g_signal_connect(toplevel, "destroy", G_CALLBACK(destroy_event), this);
g_signal_connect(toplevel, "focus-in-event", G_CALLBACK(action_inputfocus),
this);
g_signal_connect(
toplevel, "focus-in-event", G_CALLBACK(action_inputfocus), this);
GtkWidget* vbox = gtk_vbox_new(FALSE, 0);
// Menu
// Accelerators
GtkAccelGroup* accel_g =
(GtkAccelGroup*)g_object_new(GTK_TYPE_ACCEL_GROUP, NULL);
GtkAccelGroup* accel_g
= (GtkAccelGroup*)g_object_new(GTK_TYPE_ACCEL_GROUP, NULL);
gtk_window_add_accel_group(GTK_WINDOW(toplevel), accel_g);
GtkMenuBar* menu_bar = (GtkMenuBar*)g_object_new(GTK_TYPE_MENU_BAR, NULL);
// File entry
GtkWidget* file_print =
gtk_image_menu_item_new_from_stock(GTK_STOCK_PRINT, accel_g);
GtkWidget* file_print
= gtk_image_menu_item_new_from_stock(GTK_STOCK_PRINT, accel_g);
g_signal_connect(file_print, "activate", G_CALLBACK(activate_print), this);
GtkWidget* file_close =
gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, accel_g);
GtkWidget* file_close
= gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, accel_g);
g_signal_connect(file_close, "activate", G_CALLBACK(activate_exit), this);
GtkMenu* file_menu = (GtkMenu*)g_object_new(GTK_TYPE_MENU, NULL);
......@@ -321,16 +310,16 @@ GsdAttrGtk::GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx,
// Edit entry
menubutton_copy = gtk_image_menu_item_new_from_stock(GTK_STOCK_COPY, accel_g);
g_signal_connect(menubutton_copy, "activate", G_CALLBACK(activate_copy),
this);
g_signal_connect(
menubutton_copy, "activate", G_CALLBACK(activate_copy), this);
menubutton_cut = gtk_image_menu_item_new_from_stock(GTK_STOCK_CUT, accel_g);
g_signal_connect(menubutton_cut, "activate", G_CALLBACK(activate_cut), this);
menubutton_paste =
gtk_image_menu_item_new_from_stock(GTK_STOCK_PASTE, accel_g);
g_signal_connect(menubutton_paste, "activate", G_CALLBACK(activate_paste),
this);
menubutton_paste
= gtk_image_menu_item_new_from_stock(GTK_STOCK_PASTE, accel_g);
g_signal_connect(
menubutton_paste, "activate", G_CALLBACK(activate_paste), this);
GtkMenu* edit_menu = (GtkMenu*)g_object_new(GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(edit_menu), menubutton_copy);
......@@ -357,29 +346,26 @@ GsdAttrGtk::GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx,
// View Entry
GtkWidget* view_zoom_in =
gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_IN, NULL);
g_signal_connect(view_zoom_in, "activate", G_CALLBACK(activate_zoom_in),
this);
GtkWidget* view_zoom_in
= gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_IN, NULL);
g_signal_connect(
view_zoom_in, "activate", G_CALLBACK(activate_zoom_in), this);
gtk_widget_add_accelerator(view_zoom_in, "activate", accel_g, 'i',
GdkModifierType(GDK_CONTROL_MASK),
GTK_ACCEL_VISIBLE);
GdkModifierType(GDK_CONTROL_MASK), GTK_ACCEL_VISIBLE);
GtkWidget* view_zoom_out =
gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_OUT, NULL);
g_signal_connect(view_zoom_out, "activate", G_CALLBACK(activate_zoom_out),
this);
GtkWidget* view_zoom_out
= gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_OUT, NULL);
g_signal_connect(
view_zoom_out, "activate", G_CALLBACK(activate_zoom_out), this);
gtk_widget_add_accelerator(view_zoom_out, "activate", accel_g, 'o',
GdkModifierType(GDK_CONTROL_MASK),
GTK_ACCEL_VISIBLE);
GdkModifierType(GDK_CONTROL_MASK), GTK_ACCEL_VISIBLE);
GtkWidget* view_zoom_reset =
gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_100, NULL);
g_signal_connect(view_zoom_reset, "activate", G_CALLBACK(activate_zoom_reset),
this);
GtkWidget* view_zoom_reset
= gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_100, NULL);
g_signal_connect(
view_zoom_reset, "activate", G_CALLBACK(activate_zoom_reset), this);
gtk_widget_add_accelerator(view_zoom_reset, "activate", accel_g, 'b',
GdkModifierType(GDK_CONTROL_MASK),
GTK_ACCEL_VISIBLE);
GdkModifierType(GDK_CONTROL_MASK), GTK_ACCEL_VISIBLE);
GtkMenu* view_menu = (GtkMenu*)g_object_new(GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_zoom_in);
......@@ -391,8 +377,8 @@ GsdAttrGtk::GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx,
gtk_menu_item_set_submenu(GTK_MENU_ITEM(view), GTK_WIDGET(view_menu));
// Help entry
GtkWidget* help_help =
gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP, accel_g);
GtkWidget* help_help
= gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP, accel_g);
g_signal_connect(help_help, "activate", G_CALLBACK(activate_help), this);
GtkMenu* help_menu = (GtkMenu*)g_object_new(GTK_TYPE_MENU, NULL);
......@@ -403,8 +389,8 @@ GsdAttrGtk::GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx,
gtk_menu_item_set_submenu(GTK_MENU_ITEM(help), GTK_WIDGET(help_menu));
// Navigator
attrnav = new GsdAttrNavGtk(this, vbox, "Plant", gsd, edit_mode, &brow_widget,
&sts);
attrnav = new GsdAttrNavGtk(
this, vbox, "Plant", gsd, edit_mode, &brow_widget, &sts);
attrnav->message_cb = &GsdAttr::gsdattr_message;
attrnav->change_value_cb = &GsdAttr::gsdattr_change_value_cb;
......@@ -450,8 +436,7 @@ GsdAttrGtk::GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx,
g_object_set(cmd_prompt, "visible", FALSE, NULL);
g_object_set(cmd_input, "visible", FALSE, NULL);
if (!edit_mode)
{
if (!edit_mode) {
gtk_widget_set_sensitive(cmd_ok, FALSE);
gtk_widget_set_sensitive(cmd_apply, FALSE);
gtk_widget_set_sensitive(menubutton_copy, FALSE);
......
......@@ -42,8 +42,7 @@
#include "cow_pb_gsd_attr.h"
#include "cow_wow_gtk.h"
class GsdAttrGtk : public GsdAttr
{
class GsdAttrGtk : public GsdAttr {
public:
GtkWidget* parent_wid;
GtkWidget* brow_widget;
......@@ -88,8 +87,8 @@ public:
static void cmd_close_apply_cb(void* ctx, void* data);
static void cmd_close_no_cb(void* ctx, void* data);
static void activate_cmd_ca(GtkWidget* w, gpointer dataxo);
static gboolean action_inputfocus(GtkWidget* w, GdkEvent* event,
gpointer data);
static gboolean action_inputfocus(
GtkWidget* w, GdkEvent* event, gpointer data);
// static void valchanged_cmd_input( GtkWidget *w, gpointer data);
};
......
......@@ -56,11 +56,10 @@
// Create the navigator widget
//
GsdAttrNavGtk::GsdAttrNavGtk(void* xn_parent_ctx, GtkWidget* xn_parent_wid,
const char* xn_name, pb_gsd* xn_gsd,
int xn_edit_mode, GtkWidget** w,
const char* xn_name, pb_gsd* xn_gsd, int xn_edit_mode, GtkWidget** w,
pwr_tStatus* status)
: GsdAttrNav(xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status),
parent_wid(xn_parent_wid)
: GsdAttrNav(xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status)
, parent_wid(xn_parent_wid)
{
form_widget = scrolledbrowwidgetgtk_new(init_brow_cb, this, &brow_widget);
gtk_widget_show_all(brow_widget);
......@@ -83,4 +82,7 @@ GsdAttrNavGtk::~GsdAttrNavGtk()
gtk_widget_destroy(form_widget);
}
void GsdAttrNavGtk::set_inputfocus() { gtk_widget_grab_focus(brow_widget); }
void GsdAttrNavGtk::set_inputfocus()
{
gtk_widget_grab_focus(brow_widget);
}
......@@ -42,12 +42,11 @@
#include "cow_pb_gsd_attrnav.h"
//! The navigation area of the attribute editor.
class GsdAttrNavGtk : public GsdAttrNav
{
class GsdAttrNavGtk : public GsdAttrNav {
public:
GsdAttrNavGtk(void* xn_parent_ctx, GtkWidget* xn_parent_wid,
const char* xn_name, pb_gsd* xn_gsd, int xn_edit_mode,
GtkWidget** w, pwr_tStatus* status);
const char* xn_name, pb_gsd* xn_gsd, int xn_edit_mode, GtkWidget** w,
pwr_tStatus* status);
~GsdAttrNavGtk();
void set_inputfocus();
......
......@@ -42,8 +42,7 @@
#include "cow_pn_gsdml_attr.h"
#include "cow_wow_gtk.h"
class GsdmlAttrGtk : public GsdmlAttr
{
class GsdmlAttrGtk : public GsdmlAttr {
public:
GtkWidget* parent_wid;
GtkWidget* brow_widget;
......@@ -104,8 +103,8 @@ public:
static void cmd_close_apply_cb(void* ctx, void* data);
static void cmd_close_no_cb(void* ctx, void* data);
static void activate_cmd_ca(GtkWidget* w, gpointer dataxo);
static gboolean action_inputfocus(GtkWidget* w, GdkEvent* event,
gpointer data);
static gboolean action_inputfocus(
GtkWidget* w, GdkEvent* event, gpointer data);
// static void valchanged_cmd_input( GtkWidget *w, gpointer data);
};
......
......@@ -53,11 +53,10 @@
// Create the navigator widget
//
GsdmlAttrNavGtk::GsdmlAttrNavGtk(void* xn_parent_ctx, GtkWidget* xn_parent_wid,
const char* xn_name, pn_gsdml* xn_gsdml,
int xn_edit_mode, GtkWidget** w,
const char* xn_name, pn_gsdml* xn_gsdml, int xn_edit_mode, GtkWidget** w,
pwr_tStatus* status)
: GsdmlAttrNav(xn_parent_ctx, xn_name, xn_gsdml, xn_edit_mode, status),
parent_wid(xn_parent_wid)
: GsdmlAttrNav(xn_parent_ctx, xn_name, xn_gsdml, xn_edit_mode, status)
, parent_wid(xn_parent_wid)
{
form_widget = scrolledbrowwidgetgtk_new(init_brow_cb, this, &brow_widget);
gtk_widget_show_all(brow_widget);
......@@ -80,7 +79,10 @@ GsdmlAttrNavGtk::~GsdmlAttrNavGtk()
gtk_widget_destroy(form_widget);
}
void GsdmlAttrNavGtk::set_inputfocus() { gtk_widget_grab_focus(brow_widget); }
void GsdmlAttrNavGtk::set_inputfocus()
{
gtk_widget_grab_focus(brow_widget);
}
void GsdmlAttrNavGtk::display_attr_help_text()
{
......@@ -95,16 +97,14 @@ void GsdmlAttrNavGtk::display_attr_help_text()
brow_GetUserData(node_list[0], (void**)&base_item);
free(node_list);
switch (base_item->type)
{
switch (base_item->type) {
/*
* The following two item types could make use of the same info_text that the
* the base class does,
* but since they already contained references they were used instead...
*/
case attrnav_eItemType_PnParValue:
case attrnav_eItemType_PnParEnum:
{
case attrnav_eItemType_PnParEnum: {
ItemPnParEnum* item = (ItemPnParEnum*)base_item;
gsdml_ValueItem* vi = 0;
......@@ -119,8 +119,7 @@ void GsdmlAttrNavGtk::display_attr_help_text()
break;
}
default:
{
default: {
// Do we have an associated info text string to show the user some more
// info?
if (base_item->info_text)
......
......@@ -42,12 +42,11 @@
#include "cow_pn_gsdml_attrnav.h"
//! The navigation area of the attribute editor.
class GsdmlAttrNavGtk : public GsdmlAttrNav
{
class GsdmlAttrNavGtk : public GsdmlAttrNav {
public:
GsdmlAttrNavGtk(void* xn_parent_ctx, GtkWidget* xn_parent_wid,
const char* xn_name, pn_gsdml* xn_gsdml, int xn_edit_mode,
GtkWidget** w, pwr_tStatus* status);
const char* xn_name, pn_gsdml* xn_gsdml, int xn_edit_mode, GtkWidget** w,
pwr_tStatus* status);
~GsdmlAttrNavGtk();
void set_inputfocus();
void display_attr_help_text();
......
......@@ -214,8 +214,9 @@ GsdAttrQt::~GsdAttrQt()
delete attrnav;
}
GsdAttrQt::GsdAttrQt(void* a_parent_ctx, void* a_object, pb_gsd* a_gsd,
int a_edit_mode) : GsdAttr(a_parent_ctx, a_object, a_gsd, a_edit_mode)
GsdAttrQt::GsdAttrQt(
void* a_parent_ctx, void* a_object, pb_gsd* a_gsd, int a_edit_mode)
: GsdAttr(a_parent_ctx, a_object, a_gsd, a_edit_mode)
{
int sts;
......
......@@ -47,8 +47,7 @@
class GsdAttrQtWidget;
class GsdAttrQt : public GsdAttr
{
class GsdAttrQt : public GsdAttr {
public:
QWidget* brow_widget;
QWidget* form_widget;
......@@ -73,12 +72,15 @@ private:
GsdAttrQtWidget* toplevel;
};
class GsdAttrQtWidget : public QWidget
{
class GsdAttrQtWidget : public QWidget {
Q_OBJECT
public:
GsdAttrQtWidget(GsdAttrQt* parent_ctx) : QWidget(), attr(parent_ctx) {}
GsdAttrQtWidget(GsdAttrQt* parent_ctx)
: QWidget()
, attr(parent_ctx)
{
}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -44,8 +44,7 @@
#include "cow_pb_gsd_attrnav_qt.h"
GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, const char* xn_name,
pb_gsd* xn_gsd, int xn_edit_mode, QWidget** w,
pwr_tStatus* status)
pb_gsd* xn_gsd, int xn_edit_mode, QWidget** w, pwr_tStatus* status)
: GsdAttrNav(xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status)
{
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
......@@ -65,4 +64,7 @@ GsdAttrNavQt::~GsdAttrNavQt()
form_widget->close();
}
void GsdAttrNavQt::set_inputfocus() { brow_widget->setFocus(); }
void GsdAttrNavQt::set_inputfocus()
{
brow_widget->setFocus();
}
......@@ -44,8 +44,7 @@
#include <QWidget>
//! The navigation area of the attribute editor.
class GsdAttrNavQt : public GsdAttrNav
{
class GsdAttrNavQt : public GsdAttrNav {
public:
GsdAttrNavQt(void* xn_parent_ctx, const char* xn_name, pb_gsd* xn_gsd,
int xn_edit_mode, QWidget** w, pwr_tStatus* status);
......
......@@ -315,8 +315,8 @@ GsdmlAttrQt::GsdmlAttrQt(void* a_parent_ctx, void* a_object, pn_gsdml* a_gsdml,
toplevel, help, "&Help", SLOT(activate_help()), "CTRL+H", "system-help");
// Navigator
attrnav = new GsdmlAttrNavQt(this, "Plant", gsdml, edit_mode, &brow_widget,
&sts);
attrnav
= new GsdmlAttrNavQt(this, "Plant", gsdml, edit_mode, &brow_widget, &sts);
attrnav->message_cb = &GsdmlAttr::gsdmlattr_message;
attrnav->change_value_cb = &GsdmlAttr::gsdmlattr_change_value_cb;
......
......@@ -49,8 +49,7 @@
class GsdmlAttrQtWidget;
class GsdmlAttrQt : public GsdmlAttr
{
class GsdmlAttrQt : public GsdmlAttr {
public:
GsdmlAttrQtWidget* toplevel;
QWidget* brow_widget;
......@@ -76,12 +75,15 @@ public:
void change_value();
};
class GsdmlAttrQtWidget : public QWidget
{
class GsdmlAttrQtWidget : public QWidget {
Q_OBJECT
public:
GsdmlAttrQtWidget(GsdmlAttrQt* parent_ctx) : QWidget(), attr(parent_ctx) {}
GsdmlAttrQtWidget(GsdmlAttrQt* parent_ctx)
: QWidget()
, attr(parent_ctx)
{
}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -44,8 +44,7 @@
#include "cow_pn_gsdml_attrnav_qt.h"
GsdmlAttrNavQt::GsdmlAttrNavQt(void* xn_parent_ctx, const char* xn_name,
pn_gsdml* xn_gsdml, int xn_edit_mode,
QWidget** w, pwr_tStatus* status)
pn_gsdml* xn_gsdml, int xn_edit_mode, QWidget** w, pwr_tStatus* status)
: GsdmlAttrNav(xn_parent_ctx, xn_name, xn_gsdml, xn_edit_mode, status)
{
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
......@@ -65,7 +64,10 @@ GsdmlAttrNavQt::~GsdmlAttrNavQt()
form_widget->close();
}
void GsdmlAttrNavQt::set_inputfocus() { brow_widget->setFocus(); }
void GsdmlAttrNavQt::set_inputfocus()
{
brow_widget->setFocus();
}
void GsdmlAttrNavQt::display_attr_help_text()
{
......@@ -80,16 +82,14 @@ void GsdmlAttrNavQt::display_attr_help_text()
brow_GetUserData(node_list[0], (void**)&base_item);
free(node_list);
switch (base_item->type)
{
switch (base_item->type) {
/*
* The following two item types could make use of the same info_text that the
* the base class does,
* but since they already contained references they were used instead...
*/
case attrnav_eItemType_PnParValue:
case attrnav_eItemType_PnParEnum:
{
case attrnav_eItemType_PnParEnum: {
ItemPnParEnum* item = (ItemPnParEnum*)base_item;
gsdml_ValueItem* vi = 0;
......@@ -104,8 +104,7 @@ void GsdmlAttrNavQt::display_attr_help_text()
break;
}
default:
{
default: {
if (base_item->info_text)
((GsdmlAttrQt*)parent_ctx)->attr_help_text(base_item->info_text);
else
......
......@@ -44,8 +44,7 @@
#include <QWidget>
//! The navigation area of the attribute editor.
class GsdmlAttrNavQt : public GsdmlAttrNav
{
class GsdmlAttrNavQt : public GsdmlAttrNav {
public:
GsdmlAttrNavQt(void* xn_parent_ctx, const char* xn_name, pn_gsdml* xn_gsdml,
int xn_edit_mode, QWidget** w, pwr_tStatus* status);
......
This diff is collapsed.
......@@ -83,8 +83,7 @@ typedef enum {
gsd_End
} gsd_eType;
typedef struct
{
typedef struct {
char name[50];
char group[50];
int option;
......@@ -92,22 +91,19 @@ typedef struct
unsigned int value_default;
} gsd_sKeyword;
typedef struct
{
typedef struct {
char name[32];
pwr_tCid cid;
} gsd_sModuleClass;
typedef struct
{
typedef struct {
unsigned int value;
void* data;
int found;
int len;
} gsd_sData;
typedef struct sArea
{
typedef struct sArea {
char Area_Name[33];
int Related_CFG_Identifier;
int IO_Direction;
......@@ -120,29 +116,25 @@ typedef struct sArea
struct sArea* next;
} gsd_sArea;
typedef struct
{
typedef struct {
int Const_Offset;
unsigned char Const_Prm_Data[237];
int len;
} gsd_sExtUserPrmDataConst;
typedef struct sText
{
typedef struct sText {
int Prm_Data_Value;
char Text[33];
struct sText* next;
} gsd_sText;
typedef struct sPrmText
{
typedef struct sPrmText {
int Reference_Number;
gsd_sText* text_list;
struct sPrmText* next;
} gsd_sPrmText;
typedef struct sExtUserPrmData
{
typedef struct sExtUserPrmData {
int Reference_Number;
char Ext_User_Prm_Data_Name[33];
char Data_Type_Name[33];
......@@ -162,22 +154,19 @@ typedef struct sExtUserPrmData
struct sExtUserPrmData* next;
} gsd_sExtUserPrmData;
typedef struct sExtUserPrmDataRef
{
typedef struct sExtUserPrmDataRef {
int Reference_Offset;
int Reference_Number;
gsd_sExtUserPrmData* prm_data;
sExtUserPrmDataRef* next;
} gsd_sExtUserPrmDataRef;
typedef struct
{
typedef struct {
gsd_sExtUserPrmDataRef* ref;
int value;
} gsd_sPrmDataItem;
typedef struct sModule
{
typedef struct sModule {
char Mod_Name[33];
unsigned char* Config;
int config_size;
......@@ -191,8 +180,7 @@ typedef struct sModule
struct sModule* next;
} gsd_sModule;
typedef struct
{
typedef struct {
int idx;
gsd_sModule* module;
char name[80];
......@@ -203,8 +191,7 @@ typedef struct
unsigned char prm_data[237];
} gsd_sModuleConf;
class pb_gsd
{
class pb_gsd {
public:
pb_gsd();
~pb_gsd();
......@@ -251,13 +238,15 @@ public:
int prm_items_to_data(gsd_sPrmDataItem* item, int item_size,
unsigned char* data, int data_size);
int prm_data_to_items(gsd_sPrmDataItem* item, int item_size,
unsigned char* data, int data_size,
int set_default = 0);
void set_classes(gsd_sModuleClass* mclist) { module_classlist = mclist; }
unsigned char* data, int data_size, int set_default = 0);
void set_classes(gsd_sModuleClass* mclist)
{
module_classlist = mclist;
}
int get_svalue(const char* key, char* value, int size);
int get_ivalue(const char* key, int* value);
int add_module_conf(pwr_tCid cid, pwr_tOid oid, char* name,
char* module_name);
int add_module_conf(
pwr_tCid cid, pwr_tOid oid, char* name, char* module_name);
int move_module_conf(gsd_sModuleConf* src, gsd_sModuleConf* dest);
int copy_module_conf(gsd_sModuleConf* m);
int cut_module_conf(gsd_sModuleConf* m);
......@@ -268,8 +257,14 @@ public:
void pack_ext_user_prm_data(char* data, int* len);
void compress(char* line);
int syntax_check(int* idx);
void set_modified(int mod) { modified = mod; }
int is_modified() { return modified; }
void set_modified(int mod)
{
modified = mod;
}
int is_modified()
{
return modified;
}
};
#endif
This diff is collapsed.
......@@ -41,8 +41,7 @@
#include "cow_pb_gsd.h"
typedef struct
{
typedef struct {
void* value;
char name[80];
int type;
......@@ -57,8 +56,7 @@ typedef struct
class GsdAttrNav;
class CoWow;
class GsdAttr
{
class GsdAttr {
public:
void* parent_ctx;
char name[80];
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -42,8 +42,7 @@
#include "cow_pn_gsdml.h"
#include "rt_pn_gsdml_data.h"
typedef struct
{
typedef struct {
void* value;
char name[80];
int type;
......@@ -64,8 +63,7 @@ typedef enum {
class GsdmlAttrNav;
class CoWow;
class GsdmlAttr
{
class GsdmlAttr {
public:
void* parent_ctx;
char name[80];
......
This diff is collapsed.
......@@ -41,12 +41,8 @@
/*--- initialization/termination functions ----------------------------------*/
void pnak_init(void)
{
}
void pnak_term(void)
{
}
void pnak_init(void) {}
void pnak_term(void) {}
T_PNAK_RESULT pnak_start_profistack(unsigned short a1, const T_PNAK_MODE_ID a2)
{
......
......@@ -1389,7 +1389,8 @@ version
FUNCTION_BODY
if ((hDevice->hServiceReadDevice && hDevice->hServiceWriteDevice)
&& (hDevice->hDpDataDevice || (hDevice->hDpsInputDataDevice
&& (hDevice->hDpDataDevice
|| (hDevice->hDpsInputDataDevice
&& hDevice->hDpsOutputDataDevice))) {
return (E_OK); // PAPI is already initialized
} else {
......@@ -1431,7 +1432,8 @@ version
FUNCTION_BODY
if ((hDevice.hServiceReadDevice && hDevice.hServiceWriteDevice)
&& (hDevice.hDpDataDevice || (hDevice.hDpsInputDataDevice
&& (hDevice.hDpDataDevice
|| (hDevice.hDpsInputDataDevice
&& hDevice.hDpsOutputDataDevice))) {
return (E_OK); // PAPI is already initialized
} else {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -110,7 +110,7 @@ FUNCTION PUBLIC INT16 fdlgdl_get_data_len(IN INT16 result, /* Service-Result */
IN USIGN8 primitive, /* Service-Primitive */
IN USIGN8 FAR* data_ptr, /* pointer to data */
OUT INT16* data_len_ptr /* length of data */
)
)
/*-----------------------------------------------------------------------------
FUNCTIONAL_DESCRIPTION
......
This diff is collapsed.
......@@ -110,7 +110,7 @@ FUNCTION PUBLIC INT16 fmbgdl_get_data_len(IN INT16 result, /* Service-Result */
IN USIGN8 primitive, /* Service-Primitive */
IN USIGN8 FAR* data_ptr, /* pointer to data */
OUT INT16* data_len_ptr /* length of data */
)
)
/*-----------------------------------------------------------------------------
FUNCTIONAL_DESCRIPTION
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -682,7 +682,8 @@ static void dp_get_slave_diag_con(
}
if (log) {
sprintf(s, "Slave [%3hhu] [0x%04hX]: Status = 0x%02hhX 0x%02hhX 0x%02hhX, "
sprintf(s,
"Slave [%3hhu] [0x%04hX]: Status = 0x%02hhX 0x%02hhX 0x%02hhX, "
"Master = %3hhu, Ext = %u, Diags = %hu",
get_slave_diag_con_ptr->rem_add, swap16(diag_data_ptr->ident_number),
diag_data_ptr->station_status_1, diag_data_ptr->station_status_2,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -43,8 +43,7 @@
/* wb-c_pb_dp_slave.h -- Profibus gsd configure method */
typedef struct
{
typedef struct {
pb_gsd* gsd;
GsdAttr* attr;
ldh_tSession ldhses;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment