Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c065bcd9
Commit
c065bcd9
authored
Oct 15, 2019
by
Claes Sjofors
Committed by
Claes Sjöfors
Mar 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt eventlog and eventlist, analyse added to menu
parent
2ba953ba
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
56 additions
and
2 deletions
+56
-2
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
+11
-0
xtt/lib/xtt/gtk/xtt_ev_gtk.h
xtt/lib/xtt/gtk/xtt_ev_gtk.h
+1
-0
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
+12
-0
xtt/lib/xtt/gtk/xtt_hist_gtk.h
xtt/lib/xtt/gtk/xtt_hist_gtk.h
+1
-0
xtt/lib/xtt/qt/xtt_ev_qt.cqt
xtt/lib/xtt/qt/xtt_ev_qt.cqt
+6
-0
xtt/lib/xtt/qt/xtt_ev_qt.h
xtt/lib/xtt/qt/xtt_ev_qt.h
+1
-0
xtt/lib/xtt/qt/xtt_hist_qt.cqt
xtt/lib/xtt/qt/xtt_hist_qt.cqt
+7
-0
xtt/lib/xtt/qt/xtt_hist_qt.h
xtt/lib/xtt/qt/xtt_hist_qt.h
+1
-0
xtt/lib/xtt/src/xtt_ev.cpp
xtt/lib/xtt/src/xtt_ev.cpp
+7
-1
xtt/lib/xtt/src/xtt_ev.h
xtt/lib/xtt/src/xtt_ev.h
+1
-0
xtt/lib/xtt/src/xtt_hist.cpp
xtt/lib/xtt/src/xtt_hist.cpp
+7
-1
xtt/lib/xtt/src/xtt_hist.h
xtt/lib/xtt/src/xtt_hist.h
+1
-0
No files found.
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
View file @
c065bcd9
...
@@ -161,6 +161,11 @@ EvGtk::EvGtk(void* ev_parent_ctx, GtkWidget* ev_parent_wid, char* eve_name,
...
@@ -161,6 +161,11 @@ EvGtk::EvGtk(void* ev_parent_ctx, GtkWidget* ev_parent_wid, char* eve_name,
g_signal_connect
(
g_signal_connect
(
file_export
,
"activate"
,
G_CALLBACK
(
eve_activate_export
),
this
);
file_export
,
"activate"
,
G_CALLBACK
(
eve_activate_export
),
this
);
GtkWidget
*
file_analyse
=
gtk_image_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"Open _Analyser"
));
g_signal_connect
(
file_analyse
,
"activate"
,
G_CALLBACK
(
eve_activate_analyse
),
this
);
GtkWidget
*
file_close
=
gtk_image_menu_item_new_with_mnemonic
(
GtkWidget
*
file_close
=
gtk_image_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"_Close"
));
CoWowGtk
::
translate_utf8
(
"_Close"
));
gtk_image_menu_item_set_image
(
GTK_IMAGE_MENU_ITEM
(
file_close
),
gtk_image_menu_item_set_image
(
GTK_IMAGE_MENU_ITEM
(
file_close
),
...
@@ -173,6 +178,7 @@ EvGtk::EvGtk(void* ev_parent_ctx, GtkWidget* ev_parent_wid, char* eve_name,
...
@@ -173,6 +178,7 @@ EvGtk::EvGtk(void* ev_parent_ctx, GtkWidget* ev_parent_wid, char* eve_name,
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_print
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_print
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_export
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_export
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_analyse
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
GtkWidget
*
file
GtkWidget
*
file
...
@@ -1225,6 +1231,11 @@ void EvGtk::eve_activate_export(GtkWidget* w, gpointer ev)
...
@@ -1225,6 +1231,11 @@ void EvGtk::eve_activate_export(GtkWidget* w, gpointer ev)
((
Ev
*
)
ev
)
->
eve_activate_export
();
((
Ev
*
)
ev
)
->
eve_activate_export
();
}
}
void
EvGtk
::
eve_activate_analyse
(
GtkWidget
*
w
,
gpointer
ev
)
{
((
Ev
*
)
ev
)
->
eve_activate_analyse
();
}
void
EvGtk
::
eve_activate_ack_last
(
GtkWidget
*
w
,
gpointer
ev
)
void
EvGtk
::
eve_activate_ack_last
(
GtkWidget
*
w
,
gpointer
ev
)
{
{
Ev
*
ev
=
(
Ev
*
)
data
;
Ev
*
ev
=
(
Ev
*
)
data
;
...
...
xtt/lib/xtt/gtk/xtt_ev_gtk.h
View file @
c065bcd9
...
@@ -95,6 +95,7 @@ public:
...
@@ -95,6 +95,7 @@ public:
static
void
ala_activate_print
(
GtkWidget
*
w
,
gpointer
data
);
static
void
ala_activate_print
(
GtkWidget
*
w
,
gpointer
data
);
static
void
blk_activate_print
(
GtkWidget
*
w
,
gpointer
data
);
static
void
blk_activate_print
(
GtkWidget
*
w
,
gpointer
data
);
static
void
eve_activate_export
(
GtkWidget
*
w
,
gpointer
data
);
static
void
eve_activate_export
(
GtkWidget
*
w
,
gpointer
data
);
static
void
eve_activate_analyse
(
GtkWidget
*
w
,
gpointer
data
);
static
void
eve_activate_ack_last
(
GtkWidget
*
w
,
gpointer
data
);
static
void
eve_activate_ack_last
(
GtkWidget
*
w
,
gpointer
data
);
static
void
ala_activate_ack_last
(
GtkWidget
*
w
,
gpointer
data
);
static
void
ala_activate_ack_last
(
GtkWidget
*
w
,
gpointer
data
);
static
void
ala_activate_ack_all
(
GtkWidget
*
w
,
gpointer
data
);
static
void
ala_activate_ack_all
(
GtkWidget
*
w
,
gpointer
data
);
...
...
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
View file @
c065bcd9
...
@@ -126,6 +126,10 @@ HistGtk::HistGtk(void* hist_parent_ctx, GtkWidget* hist_parent_wid,
...
@@ -126,6 +126,10 @@ HistGtk::HistGtk(void* hist_parent_ctx, GtkWidget* hist_parent_wid,
CoWowGtk
::
translate_utf8
(
"_Export"
));
CoWowGtk
::
translate_utf8
(
"_Export"
));
g_signal_connect
(
file_export
,
"activate"
,
G_CALLBACK
(
activate_export
),
this
);
g_signal_connect
(
file_export
,
"activate"
,
G_CALLBACK
(
activate_export
),
this
);
GtkWidget
*
file_analyse
=
gtk_image_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"Open _Analyser"
));
g_signal_connect
(
file_analyse
,
"activate"
,
G_CALLBACK
(
activate_analyse
),
this
);
GtkWidget
*
file_close
=
gtk_image_menu_item_new_with_mnemonic
(
GtkWidget
*
file_close
=
gtk_image_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"_Close"
));
CoWowGtk
::
translate_utf8
(
"_Close"
));
gtk_image_menu_item_set_image
(
GTK_IMAGE_MENU_ITEM
(
file_close
),
gtk_image_menu_item_set_image
(
GTK_IMAGE_MENU_ITEM
(
file_close
),
...
@@ -137,6 +141,7 @@ HistGtk::HistGtk(void* hist_parent_ctx, GtkWidget* hist_parent_wid,
...
@@ -137,6 +141,7 @@ HistGtk::HistGtk(void* hist_parent_ctx, GtkWidget* hist_parent_wid,
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_print
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_print
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_export
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_export
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_analyse
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
GtkWidget
*
file
GtkWidget
*
file
...
@@ -729,6 +734,13 @@ void HistGtk::activate_export(GtkWidget* w, gpointer data)
...
@@ -729,6 +734,13 @@ void HistGtk::activate_export(GtkWidget* w, gpointer data)
histOP
->
activate_export
();
histOP
->
activate_export
();
}
}
void
HistGtk
::
activate_analyse
(
GtkWidget
*
w
,
gpointer
data
)
{
Hist
*
histOP
=
(
Hist
*
)
data
;
histOP
->
activate_analyse
();
}
void
HistGtk
::
activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
)
void
HistGtk
::
activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
)
{
{
Hist
*
histOP
=
(
Hist
*
)
data
;
Hist
*
histOP
=
(
Hist
*
)
data
;
...
...
xtt/lib/xtt/gtk/xtt_hist_gtk.h
View file @
c065bcd9
...
@@ -93,6 +93,7 @@ public:
...
@@ -93,6 +93,7 @@ public:
static
void
activate_exit
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_exit
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_print
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_print
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_export
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_export
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_analyse
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_out
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_out
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_reset
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_reset
(
GtkWidget
*
w
,
gpointer
data
);
...
...
xtt/lib/xtt/qt/xtt_ev_qt.cqt
View file @
c065bcd9
...
@@ -136,6 +136,7 @@ EvQt::EvQt(void* ev_parent_ctx, char* eve_name, char* ala_name, char* blk_name,
...
@@ -136,6 +136,7 @@ EvQt::EvQt(void* ev_parent_ctx, char* eve_name, char* ala_name, char* blk_name,
addMenuItem(object, file, "&Print", SLOT(eve_activate_print()), "",
addMenuItem(object, file, "&Print", SLOT(eve_activate_print()), "",
"document-print");
"document-print");
addMenuItem(object, file, "&Export", SLOT(eve_activate_export()));
addMenuItem(object, file, "&Export", SLOT(eve_activate_export()));
addMenuItem(object, file, "&Analyse", SLOT(eve_activate_analyse()));
addMenuItem(
addMenuItem(
object, file, "&Close", SLOT(eve_activate_exit()), "CTRL+W", "window-close");
object, file, "&Close", SLOT(eve_activate_exit()), "CTRL+W", "window-close");
...
@@ -693,6 +694,11 @@ void EvQtObject::eve_activate_export()
...
@@ -693,6 +694,11 @@ void EvQtObject::eve_activate_export()
ev->eve_activate_export();
ev->eve_activate_export();
}
}
void EvQtObject::eve_activate_analyse()
{
ev->eve_activate_analyse();
}
void EvQtObject::eve_activate_ack_last()
void EvQtObject::eve_activate_ack_last()
{
{
ev->eve_activate_ack_last();
ev->eve_activate_ack_last();
...
...
xtt/lib/xtt/qt/xtt_ev_qt.h
View file @
c065bcd9
...
@@ -100,6 +100,7 @@ public slots:
...
@@ -100,6 +100,7 @@ public slots:
void
ala_activate_print
();
void
ala_activate_print
();
void
blk_activate_print
();
void
blk_activate_print
();
void
eve_activate_export
();
void
eve_activate_export
();
void
eve_activate_analyse
();
void
eve_activate_ack_last
();
void
eve_activate_ack_last
();
void
ala_activate_ack_last
();
void
ala_activate_ack_last
();
void
ala_activate_ack_all
();
void
ala_activate_ack_all
();
...
...
xtt/lib/xtt/qt/xtt_hist_qt.cqt
View file @
c065bcd9
...
@@ -90,6 +90,8 @@ HistQt::HistQt(void* hist_parent_ctx, char* hist_name, pwr_tAttrRef* arp,
...
@@ -90,6 +90,8 @@ HistQt::HistQt(void* hist_parent_ctx, char* hist_name, pwr_tAttrRef* arp,
toplevel, file, "&Print", SLOT(activate_print()), "", "document-print");
toplevel, file, "&Print", SLOT(activate_print()), "", "document-print");
addMenuItem(
addMenuItem(
toplevel, file, "&Export", SLOT(activate_export()));
toplevel, file, "&Export", SLOT(activate_export()));
addMenuItem(
toplevel, file, "&Analyse", SLOT(activate_analyse()));
addMenuItem(
addMenuItem(
toplevel, file, "&Close", SLOT(close()), "CTRL+W", "window-close");
toplevel, file, "&Close", SLOT(close()), "CTRL+W", "window-close");
...
@@ -390,6 +392,11 @@ void HistQtWidget::activate_export()
...
@@ -390,6 +392,11 @@ void HistQtWidget::activate_export()
hist->activate_export();
hist->activate_export();
}
}
void HistQtWidget::activate_analyse()
{
hist->activate_analyse();
}
void HistQtWidget::activate_zoom_in()
void HistQtWidget::activate_zoom_in()
{
{
hist->hist->zoom(1.2);
hist->hist->zoom(1.2);
...
...
xtt/lib/xtt/qt/xtt_hist_qt.h
View file @
c065bcd9
...
@@ -107,6 +107,7 @@ protected:
...
@@ -107,6 +107,7 @@ protected:
public
slots
:
public
slots
:
void
activate_print
();
void
activate_print
();
void
activate_export
();
void
activate_export
();
void
activate_analyse
();
void
activate_zoom_in
();
void
activate_zoom_in
();
void
activate_zoom_out
();
void
activate_zoom_out
();
void
activate_zoom_reset
();
void
activate_zoom_reset
();
...
...
xtt/lib/xtt/src/xtt_ev.cpp
View file @
c065bcd9
...
@@ -297,7 +297,7 @@ int Ev::eve_export_events(const char *filename)
...
@@ -297,7 +297,7 @@ int Ev::eve_export_events(const char *filename)
return
0
;
return
0
;
fprintf
(
fp
,
"Time,Type,Prio,Text,Name,SupObject,Id,Status
\n
"
);
fprintf
(
fp
,
"Time,Type,Prio,Text,Name,SupObject,Id,Status
\n
"
);
brow_GetObjectList
(
eve
->
brow
->
ctx
,
&
list
,
&
list_cnt
);
brow_GetObjectList
(
eve
->
brow
->
ctx
,
&
list
,
&
list_cnt
);
for
(
int
i
=
0
;
i
<
list_cnt
;
i
++
)
{
for
(
int
i
=
list_cnt
-
1
;
i
>=
0
;
i
--
)
{
brow_GetUserData
(
list
[
i
],
(
void
**
)
&
item
);
brow_GetUserData
(
list
[
i
],
(
void
**
)
&
item
);
time_AtoAscii
(
&
item
->
time
,
time_eFormat_NumDateAndTime
,
timstr
,
sizeof
(
timstr
));
time_AtoAscii
(
&
item
->
time
,
time_eFormat_NumDateAndTime
,
timstr
,
sizeof
(
timstr
));
strcpy
(
supobjectstr
,
cdh_ObjidToString
(
item
->
supobject
.
Objid
,
1
));
strcpy
(
supobjectstr
,
cdh_ObjidToString
(
item
->
supobject
.
Objid
,
1
));
...
@@ -312,6 +312,12 @@ int Ev::eve_export_events(const char *filename)
...
@@ -312,6 +312,12 @@ int Ev::eve_export_events(const char *filename)
return
1
;
return
1
;
}
}
void
Ev
::
eve_activate_analyse
()
{
eve_export_events
(
"$pwrp_tmp/pwr_eventlist.dat"
);
system
(
"sev_eva.py -f $pwrp_tmp/pwr_eventlist.dat &"
);
}
void
Ev
::
eve_activate_ack_last
()
void
Ev
::
eve_activate_ack_last
()
{
{
mh_sEventId
*
id
;
mh_sEventId
*
id
;
...
...
xtt/lib/xtt/src/xtt_ev.h
View file @
c065bcd9
...
@@ -185,6 +185,7 @@ public:
...
@@ -185,6 +185,7 @@ public:
void
ala_activate_print
();
void
ala_activate_print
();
void
blk_activate_print
();
void
blk_activate_print
();
void
eve_activate_export
();
void
eve_activate_export
();
void
eve_activate_analyse
();
void
ala_activate_ack_last
();
void
ala_activate_ack_last
();
void
eve_activate_ack_last
();
void
eve_activate_ack_last
();
void
eve_activate_ack_all
();
void
eve_activate_ack_all
();
...
...
xtt/lib/xtt/src/xtt_hist.cpp
View file @
c065bcd9
...
@@ -154,6 +154,12 @@ void Hist::activate_export()
...
@@ -154,6 +154,12 @@ void Hist::activate_export()
export_file_selected_cb
,
wow_eFileSelType_Tmp
,
wow_eFileSelAction_Save
);
export_file_selected_cb
,
wow_eFileSelType_Tmp
,
wow_eFileSelAction_Save
);
}
}
void
Hist
::
activate_analyse
()
{
export_events
(
"$pwrp_tmp/pwr_eventlog.dat"
);
system
(
"sev_eva.py -f $pwrp_tmp/pwr_eventlog.dat &"
);
}
void
Hist
::
export_file_selected_cb
(
void
*
ctx
,
char
*
filename
,
wow_eFileSelType
file_type
)
void
Hist
::
export_file_selected_cb
(
void
*
ctx
,
char
*
filename
,
wow_eFileSelType
file_type
)
{
{
((
Hist
*
)
ctx
)
->
export_events
(
filename
);
((
Hist
*
)
ctx
)
->
export_events
(
filename
);
...
@@ -175,7 +181,7 @@ int Hist::export_events(const char *filename)
...
@@ -175,7 +181,7 @@ int Hist::export_events(const char *filename)
return
0
;
return
0
;
fprintf
(
fp
,
"Time,Type,Prio,Text,Name,SupObject,Id,Status
\n
"
);
fprintf
(
fp
,
"Time,Type,Prio,Text,Name,SupObject,Id,Status
\n
"
);
brow_GetObjectList
(
hist
->
brow
->
ctx
,
&
list
,
&
list_cnt
);
brow_GetObjectList
(
hist
->
brow
->
ctx
,
&
list
,
&
list_cnt
);
for
(
int
i
=
0
;
i
<
list_cnt
;
i
++
)
{
for
(
int
i
=
list_cnt
-
1
;
i
>=
0
;
i
--
)
{
brow_GetUserData
(
list
[
i
],
(
void
**
)
&
item
);
brow_GetUserData
(
list
[
i
],
(
void
**
)
&
item
);
time_AtoAscii
(
&
item
->
time
,
time_eFormat_NumDateAndTime
,
timstr
,
sizeof
(
timstr
));
time_AtoAscii
(
&
item
->
time
,
time_eFormat_NumDateAndTime
,
timstr
,
sizeof
(
timstr
));
strcpy
(
supobjectstr
,
cdh_ObjidToString
(
item
->
supobject
.
Objid
,
1
));
strcpy
(
supobjectstr
,
cdh_ObjidToString
(
item
->
supobject
.
Objid
,
1
));
...
...
xtt/lib/xtt/src/xtt_hist.h
View file @
c065bcd9
...
@@ -137,6 +137,7 @@ public:
...
@@ -137,6 +137,7 @@ public:
void
activate_print
();
void
activate_print
();
void
activate_export
();
void
activate_export
();
void
activate_analyse
();
void
activate_help
();
void
activate_help
();
void
activate_helpevent
();
void
activate_helpevent
();
void
time_cb
(
time_ePeriod
period
);
void
time_cb
(
time_ePeriod
period
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment