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;
......
......@@ -43,11 +43,10 @@
#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);
const char* v_device, pwr_tStatus* status);
~PnViewerGtk();
GtkWidget* parent_wid;
......@@ -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);
......
......@@ -50,11 +50,12 @@ extern "C" {
#include "pn_viewernav_gtk.h"
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)
viewer_eType l_type, GtkWidget** w)
: 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,11 +41,10 @@
#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);
viewer_eType v_type, GtkWidget** w);
~PnViewerNavGtk();
GtkWidget* parent_wid;
......
......@@ -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
......@@ -55,9 +55,14 @@
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)
pwr_tStatus* status)
: 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,20 +165,17 @@ 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);
sizeof(elemv) / sizeof(elemv[0]), sizeof(elemv[0]), 0);
if (nr != 6)
continue;
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;
......@@ -186,11 +184,10 @@ int PnViewer::fetch_config(std::vector<PnDevice>& vect)
}
sts = sscanf(elemv[3], "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
&pndevice.macaddress[5], &pndevice.macaddress[4],
&pndevice.macaddress[3], &pndevice.macaddress[2],
&pndevice.macaddress[1], &pndevice.macaddress[0]);
if (sts != 6)
{
&pndevice.macaddress[5], &pndevice.macaddress[4],
&pndevice.macaddress[3], &pndevice.macaddress[2],
&pndevice.macaddress[1], &pndevice.macaddress[0]);
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,11 +45,10 @@ 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);
pwr_tStatus* status);
virtual ~PnViewer();
virtual void message(char severity, const char* msg) {}
......@@ -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,21 +75,19 @@ 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));
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));
inet_ntoa(((struct sockaddr_in*)&ifr.ifr_netmask)->sin_addr));
}
sscanf(dev_data.ip_address, "%hhu.%hhu.%hhu.%hhu", &local->ipaddress[3],
&local->ipaddress[2], &local->ipaddress[1], &local->ipaddress[0]);
&local->ipaddress[2], &local->ipaddress[1], &local->ipaddress[0]);
sscanf(dev_data.subnet_mask, "%hhu.%hhu.%hhu.%hhu", &local->subnetmask[3],
&local->subnetmask[2], &local->subnetmask[1], &local->subnetmask[0]);
&local->subnetmask[2], &local->subnetmask[1], &local->subnetmask[0]);
strcpy(dev_data.device_name, "dumle");
dev_data.device_num = PN_DEVICE_REFERENCE_THIS_STATION;
......@@ -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];
......@@ -194,14 +181,13 @@ void PnViewerPNAC::fetch_devices(std::vector<PnDevice>& dev_vect)
device.macaddress[4] = local->dev_info[ii]->macaddress[4];
device.macaddress[5] = local->dev_info[ii]->macaddress[5];
strncpy(device.devname, local->dev_info[ii]->devname,
sizeof(device.devname));
sizeof(device.devname));
device.vendorid = local->dev_info[ii]->vendorid;
device.deviceid = local->dev_info[ii]->deviceid;
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();
......@@ -118,19 +116,18 @@ public:
int get_selected_device(ItemDevice** device);
void vendorid_to_str(unsigned int vendorid, char* vendorid_str, int size);
void get_device_info(unsigned int vendorid, unsigned int deviceid, char* info,
int info_size, char* family, int family_size);
int info_size, char* family, int family_size);
static int init_brow_cb(FlowCtx* fctx, void* client_data);
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,
char* item_devname, int vendorid, int deviceid, brow_tNode dest,
flow_eDest dest_code);
unsigned char* item_ipaddress, unsigned char* item_macaddress,
char* item_devname, int vendorid, int deviceid, brow_tNode dest,
flow_eDest dest_code);
virtual ~ItemDevice();
viewitem_eItemType type;
......@@ -152,12 +149,11 @@ 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,
flow_eDest dest_code);
pwr_eType item_attr_type, void* item_p, brow_tNode dest,
flow_eDest dest_code);
virtual ~ItemDeviceAttr();
viewitem_eItemType type;
......
......@@ -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;
......@@ -278,37 +268,36 @@ static gint delete_event(GtkWidget* w, GdkEvent* event, gpointer data)
static void destroy_event(GtkWidget* w, gpointer data) {}
GsdAttrGtk::GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx,
void* a_object, pb_gsd* a_gsd, int a_edit_mode)
void* a_object, pb_gsd* a_gsd, int a_edit_mode)
: GsdAttr(a_parent_ctx, a_object, a_gsd, a_edit_mode)
{
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);
......@@ -344,9 +333,9 @@ GsdAttrGtk::GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx,
// Functions entry
menubutton_changevalue = gtk_menu_item_new_with_mnemonic("_Change Value");
g_signal_connect(menubutton_changevalue, "activate",
G_CALLBACK(activate_change_value), this);
G_CALLBACK(activate_change_value), this);
gtk_widget_add_accelerator(menubutton_changevalue, "activate", accel_g, 'q',
GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkMenu* func_menu = (GtkMenu*)g_object_new(GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(func_menu), menubutton_changevalue);
......@@ -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;
......@@ -63,7 +62,7 @@ public:
CoWowFocusTimerGtk focustimer;
GsdAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
pb_gsd* a_gsd, int a_edit_mode);
pb_gsd* a_gsd, int a_edit_mode);
~GsdAttrGtk();
void message(char severity, const char* message);
......@@ -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,
pwr_tStatus* status)
: GsdAttrNav(xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status),
parent_wid(xn_parent_wid)
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)
{
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;
......@@ -66,8 +65,8 @@ public:
CoWowEntryGtk* cmd_entry;
GsdmlAttrGtk(GtkWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
pn_gsdml* a_gsdml, int a_edit_mode, const char* a_data_filename,
pwr_tStatus* a_sts);
pn_gsdml* a_gsdml, int a_edit_mode, const char* a_data_filename,
pwr_tStatus* a_sts);
~GsdmlAttrGtk();
void message(char severity, const char* message);
......@@ -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,
pwr_tStatus* status)
: GsdmlAttrNav(xn_parent_ctx, xn_name, xn_gsdml, xn_edit_mode, status),
parent_wid(xn_parent_wid)
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)
{
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();
......@@ -249,15 +236,17 @@ public:
int prm_len(gsd_sPrmDataItem* item, int item_size);
int prm_items_set_default_data(gsd_sPrmDataItem* item, int item_size);
int prm_items_to_data(gsd_sPrmDataItem* item, int item_size,
unsigned char* data, int data_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
......@@ -70,17 +70,13 @@ void GsdAttr::gsdattr_change_value_cb(void* attr_ctx)
//
void GsdAttr::activate_exit()
{
if (close_cb)
{
if (gsd->is_modified())
{
if (close_cb) {
if (gsd->is_modified()) {
wow->DisplayQuestion((void*)this, "Apply", "Do you want to apply changes",
cmd_close_apply_cb, cmd_close_no_cb, 0);
}
else
cmd_close_apply_cb, cmd_close_no_cb, 0);
} else
(close_cb)(parent_ctx);
}
else
} else
delete this;
}
......@@ -89,8 +85,7 @@ void GsdAttr::activate_help()
int sts;
if (help_cb)
sts = (help_cb)(
parent_ctx,
sts = (help_cb)(parent_ctx,
"pb_slave_editor /helpfile=\"$pwr_exe/profibus_xtthelp.dat\"");
}
......@@ -100,14 +95,12 @@ void GsdAttr::activate_copy()
int sts;
sts = attrnav->get_select((ItemPb**)&item);
if (EVEN(sts))
{
if (EVEN(sts)) {
message('E', "Select a module");
return;
}
if (item->type != attrnav_eItemType_PbModule)
{
if (item->type != attrnav_eItemType_PbModule) {
message('E', "Only modules can be copied");
return;
}
......@@ -122,14 +115,12 @@ void GsdAttr::activate_cut()
int sts;
sts = attrnav->get_select((ItemPb**)&item);
if (EVEN(sts))
{
if (EVEN(sts)) {
message('E', "Select a module");
return;
}
if (item->type != attrnav_eItemType_PbModule)
{
if (item->type != attrnav_eItemType_PbModule) {
message('E', "Only modules can be copied");
return;
}
......@@ -143,14 +134,12 @@ void GsdAttr::activate_paste()
int sts;
sts = attrnav->get_select((ItemPb**)&item);
if (EVEN(sts))
{
if (EVEN(sts)) {
message('E', "Select a module");
return;
}
if (item->type != attrnav_eItemType_PbModule)
{
if (item->type != attrnav_eItemType_PbModule) {
message('E', "Only modules can be copied");
return;
}
......@@ -180,7 +169,10 @@ void GsdAttr::activate_zoom_out()
attrnav->zoom(1.0 / 1.18);
}
void GsdAttr::activate_zoom_reset() { attrnav->unzoom(); }
void GsdAttr::activate_zoom_reset()
{
attrnav->unzoom();
}
void GsdAttr::activate_print()
{
......@@ -201,24 +193,21 @@ void GsdAttr::activate_cmd_ok()
int idx;
char msg[130];
if (save_cb)
{
if (save_cb) {
// Check syntax
sts = gsd->syntax_check(&idx);
if (EVEN(sts))
{
switch (sts)
{
if (EVEN(sts)) {
switch (sts) {
case PB__NOMODULENAME:
sprintf(msg, "Syntax error in module %d, No module name", idx + 1);
break;
case PB__DUPLMODULENAME:
sprintf(msg, "Syntax error in module %s, Duplicate module name",
gsd->module_conf[idx].name);
gsd->module_conf[idx].name);
break;
case PB__NOMODULECLASS:
sprintf(msg, "Syntax error in module %s, Module class is missing",
gsd->module_conf[idx].name);
gsd->module_conf[idx].name);
break;
default:
sprintf(msg, "Syntax error in module %d", idx + 1);
......@@ -232,8 +221,7 @@ void GsdAttr::activate_cmd_ok()
message('E', "Error saving profibus data");
else if (close_cb)
(close_cb)(parent_ctx);
}
else if (close_cb)
} else if (close_cb)
(close_cb)(parent_ctx);
}
......@@ -243,24 +231,21 @@ void GsdAttr::activate_cmd_apply()
int idx;
char msg[130];
if (save_cb)
{
if (save_cb) {
// Check syntax
sts = gsd->syntax_check(&idx);
if (EVEN(sts))
{
switch (sts)
{
if (EVEN(sts)) {
switch (sts) {
case PB__NOMODULENAME:
sprintf(msg, "Syntax error in module %d, No module name", idx + 1);
break;
case PB__DUPLMODULENAME:
sprintf(msg, "Syntax error in module %s, Duplicate module name",
gsd->module_conf[idx].name);
gsd->module_conf[idx].name);
break;
case PB__NOMODULECLASS:
sprintf(msg, "Syntax error in module %s, Module class is missing",
gsd->module_conf[idx].name);
gsd->module_conf[idx].name);
break;
default:
sprintf(msg, "Syntax error in module %d", idx + 1);
......@@ -285,8 +270,7 @@ void GsdAttr::cmd_close_apply_cb(void* ctx, void* data)
sts = (attr->save_cb)(attr->parent_ctx);
if (EVEN(sts))
attr->message('E', "Error saving profibus data");
else
{
else {
attr->gsd->set_modified(0);
(attr->close_cb)(attr->parent_ctx);
}
......@@ -301,24 +285,29 @@ void GsdAttr::cmd_close_no_cb(void* ctx, void* data)
void GsdAttr::activate_cmd_ca()
{
if (close_cb)
{
if (gsd->is_modified())
{
if (close_cb) {
if (gsd->is_modified()) {
wow->DisplayQuestion((void*)this, "Apply", "Do you want to apply changes",
cmd_close_apply_cb, cmd_close_no_cb, 0);
}
else
cmd_close_apply_cb, cmd_close_no_cb, 0);
} else
(close_cb)(parent_ctx);
}
}
GsdAttr::~GsdAttr() {}
GsdAttr::GsdAttr(void* a_parent_ctx, void* a_object, pb_gsd* a_gsd,
int a_edit_mode)
: parent_ctx(a_parent_ctx), gsd(a_gsd), edit_mode(a_edit_mode),
input_open(0), object(a_object), close_cb(0), save_cb(0), help_cb(0),
client_data(0), recall_idx(-1), value_current_recall(0)
GsdAttr::GsdAttr(
void* a_parent_ctx, void* a_object, pb_gsd* a_gsd, int a_edit_mode)
: parent_ctx(a_parent_ctx)
, gsd(a_gsd)
, edit_mode(a_edit_mode)
, input_open(0)
, object(a_object)
, close_cb(0)
, save_cb(0)
, help_cb(0)
, client_data(0)
, recall_idx(-1)
, value_current_recall(0)
{
}
......@@ -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];
......@@ -85,7 +83,7 @@ public:
CoWow* wow;
GsdmlAttr(void* a_parent_ctx, void* a_object, pn_gsdml* a_gsdml,
int a_edit_mode, const char* a_data_filename);
int a_edit_mode, const char* a_data_filename);
virtual ~GsdmlAttr();
virtual void message(char severity, const char* message) {}
......
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,8 +1389,9 @@ version
FUNCTION_BODY
if ((hDevice->hServiceReadDevice && hDevice->hServiceWriteDevice)
&& (hDevice->hDpDataDevice || (hDevice->hDpsInputDataDevice
&& hDevice->hDpsOutputDataDevice))) {
&& (hDevice->hDpDataDevice
|| (hDevice->hDpsInputDataDevice
&& hDevice->hDpsOutputDataDevice))) {
return (E_OK); // PAPI is already initialized
} else {
return (profi_set_default(
......@@ -1431,8 +1432,9 @@ version
FUNCTION_BODY
if ((hDevice.hServiceReadDevice && hDevice.hServiceWriteDevice)
&& (hDevice.hDpDataDevice || (hDevice.hDpsInputDataDevice
&& hDevice.hDpsOutputDataDevice))) {
&& (hDevice.hDpDataDevice
|| (hDevice.hDpsInputDataDevice
&& hDevice.hDpsOutputDataDevice))) {
return (E_OK); // PAPI is already initialized
} else {
return (profi_set_default(&hDevice, 0, 0, 0, 0)); // initalize PAPI
......
This diff is collapsed.
This diff is collapsed.
......@@ -54,7 +54,7 @@
printk(fmt, function, lineno, ##args)
#define DBG_PRN(fmt, args...) \
CIF_PRN((__FUNCTION__), (__LINE__), KERN_INFO __FILE__ "::%s(L%.4d): " fmt, \
##args)
##args)
#else
#define DBG_PRN(fmt, args...) /* not debugging: nothing */
#endif
......
This diff is collapsed.
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.
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.
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