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
9b4de8cc
Commit
9b4de8cc
authored
Aug 27, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alarm window, button to ack all alarms, and xtt command 'eventlist ack/all' (refs #78)
parent
bb31c7b4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
109 additions
and
9 deletions
+109
-9
src/doc/man/en_us/man_opg.dat
src/doc/man/en_us/man_opg.dat
+30
-1
src/doc/man/sv_se/man_opg.dat
src/doc/man/sv_se/man_opg.dat
+30
-1
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
+13
-0
xtt/lib/xtt/gtk/xtt_ev_gtk.h
xtt/lib/xtt/gtk/xtt_ev_gtk.h
+1
-0
xtt/lib/xtt/src/xtt_ev.cpp
xtt/lib/xtt/src/xtt_ev.cpp
+21
-0
xtt/lib/xtt/src/xtt_ev.h
xtt/lib/xtt/src/xtt_ev.h
+2
-0
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+12
-7
No files found.
src/doc/man/en_us/man_opg.dat
View file @
9b4de8cc
...
...
@@ -1536,10 +1536,11 @@ close navigator <t>Close the navigator <LINK> close navigator
create item <t>Create a menu item in the Xtt menu <LINK> create item
create opmenuitem <t>Create a menu item in the operator window menu <LINK> create opmenuitem
crossreference<t>Show crossreferenses <LINK> crossreference
exit <t>close xtt <LINK> exit
define <t>Define a symbol <LINK> define
delete item <t>Delete a menu item in the Xtt menu <LINK> delete item
delete opmenuitem <t>Delete a menu item in the operator window menu <LINK> delete opmenuitem
eventlist <t>Handle the eventlist <LINK> eventlist
exit <t>close xtt <LINK> exit
help <t>Display help <LINK> help
login <t>User login <LINK> login
logout <t>User logout <LINK> logout
...
...
@@ -1953,6 +1954,34 @@ add menu <LINK> add menu
create item <LINK> create item
</TOPIC>
<TOPIC> eventlist <style> function
Command eventlist
Handle the eventlist
<b>xtt> eventlist load
Load the eventlist.
<b>xtt> eventlist unload
Unload the eventlist.
<b>xtt> eventlist acknowledge /priority=
Acknowledge last alarm of specified priority. Priority can be A, B, C, D, I or NOA.
NOA acknowleges the last not A alarm.
<b>xtt> eventlist acknowledge /all
Acknowledge all alarms.
<H2>related subjects
show alarmlist <LINK> show alarmlist
show eventlist <LINK> show eventlist
</TOPIC>
<TOPIC> help <style> function
Command help
...
...
src/doc/man/sv_se/man_opg.dat
View file @
9b4de8cc
...
...
@@ -1545,10 +1545,11 @@ close navigator <t>St
create opmenuitem <t>Skapa ett menyalternativ i operatörsfönstret <LINK> create opmenuitem
create item <t>Skapa ett xtt menyalternativ <LINK> create item
crossreference<t>Visa korsreferenser <LINK> crossreference
exit <t>Stäng xtt <LINK> exit
define <t>Definiera en symbol <LINK> define
delete opmenuitem <t>Ta bort ett xtt menyalternativ <LINK> delete item
delete item <t>Ta bort ett menyalternativ i operatörsfönstret <LINK> delete item
eventlist <t>Hantera händlselistan <LINK> eventlist
exit <t>Stäng xtt <LINK> exit
help <t>Visa hjälp <LINK> help
login <t>Inloggning av användare <LINK> login
logout <t>Utloggning av änvändare <LINK> logout
...
...
@@ -1916,6 +1917,34 @@ add menu <LINK> add menu
create item <LINK> create item
</TOPIC>
<TOPIC> eventlist <style> function
Kommando eventlist
Hantera händelselistan
<b>xtt> eventlist load
Ladda händelselistan.
<b>xtt> eventlist unload
Ta bort händelselistan.
<b>xtt> eventlist acknowledge /priority=
Kvittera det sista larmet med angiven priritet. Prioriteten kan vara A, B, C, D, I
eller NOA. NOA kvitterar det sista larmet som inte är ett A larm.
<b>xtt> eventlist acknowledge /all
Kvittera alla larm.
<H2>Se även
show alarmlist <LINK> show alarmlist
show eventlist <LINK> show eventlist
</TOPIC>
<TOPIC> help <style> function
Kommando help
...
...
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
View file @
9b4de8cc
...
...
@@ -406,6 +406,11 @@ EvGtk::EvGtk( void *ev_parent_ctx,
'k'
,
GdkModifierType
(
GDK_CONTROL_MASK
),
GTK_ACCEL_VISIBLE
);
GtkWidget
*
functions_ack_all
=
gtk_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"A_cknowledge All"
));
g_signal_connect
(
functions_ack_all
,
"activate"
,
G_CALLBACK
(
ala_activate_ack_all
),
this
);
GtkWidget
*
functions_open_plc
=
gtk_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"Open _Program"
));
g_signal_connect
(
functions_open_plc
,
"activate"
,
...
...
@@ -424,6 +429,7 @@ EvGtk::EvGtk( void *ev_parent_ctx,
GtkMenu
*
func_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
func_menu
),
functions_ack_last
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
func_menu
),
functions_ack_all
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
func_menu
),
functions_open_plc
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
func_menu
),
functions_display_object
);
...
...
@@ -914,6 +920,13 @@ void EvGtk::ala_activate_ack_last( GtkWidget *w, gpointer data)
eve_activate_ack_last
(
w
,
data
);
}
void
EvGtk
::
ala_activate_ack_all
(
GtkWidget
*
w
,
gpointer
data
)
{
Ev
*
ev
=
(
Ev
*
)
data
;
ev
->
eve_activate_ack_all
();
}
void
EvGtk
::
eve_activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
)
{
Ev
*
ev
=
(
Ev
*
)
data
;
...
...
xtt/lib/xtt/gtk/xtt_ev_gtk.h
View file @
9b4de8cc
...
...
@@ -95,6 +95,7 @@ class EvGtk : public Ev {
static
void
blk_activate_print
(
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_all
(
GtkWidget
*
w
,
gpointer
data
);
static
void
eve_activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
);
static
void
ala_activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
);
static
void
blk_activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
);
...
...
xtt/lib/xtt/src/xtt_ev.cpp
View file @
9b4de8cc
...
...
@@ -211,6 +211,11 @@ void Ev::eve_activate_ack_last()
mh_OutunitAck
(
&
lid
);
}
void
Ev
::
eve_activate_ack_all
()
{
ack_all
();
}
void
Ev
::
eve_activate_help
()
{
if
(
help_cb
)
...
...
@@ -329,6 +334,22 @@ void Ev::ack_last_prio( unsigned long type, unsigned long prio)
}
}
void
Ev
::
ack_all
()
{
mh_sEventId
*
id
;
int
sts
;
sts
=
ala
->
get_last_not_acked
(
&
id
);
while
(
ODD
(
sts
))
{
mh_sEventId
lid
=
*
id
;
ala
->
ack
(
id
);
eve
->
ack
(
id
);
mh_OutunitAck
(
&
lid
);
sts
=
ala
->
get_last_not_acked
(
&
id
);
}
}
int
Ev
::
get_last_not_acked_prio
(
mh_sEventId
**
id
,
unsigned
long
type
,
unsigned
long
prio
)
{
...
...
xtt/lib/xtt/src/xtt_ev.h
View file @
9b4de8cc
...
...
@@ -122,6 +122,7 @@ class Ev {
int
is_mapped_blk
()
{
return
blk_displayed
;};
int
get_alarm_info
(
evlist_sAlarmInfo
*
info
);
void
ack_last_prio
(
unsigned
long
type
,
unsigned
long
prio
);
void
ack_all
();
int
get_last_not_acked_prio
(
mh_sEventId
**
id
,
unsigned
long
type
,
unsigned
long
prio
);
void
create_aliaslist
(
void
*
up
);
...
...
@@ -131,6 +132,7 @@ class Ev {
void
ala_activate_print
();
void
blk_activate_print
();
void
eve_activate_ack_last
();
void
eve_activate_ack_all
();
void
eve_activate_help
();
void
eve_activate_helpevent
();
void
ala_activate_help
();
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
9b4de8cc
...
...
@@ -361,7 +361,7 @@ dcli_tCmdTable xnav_command_table[] = {
{
"EVENTLIST"
,
&
xnav_eventlist_func
,
{
"dcli_arg1"
,
"/PRIORITY"
,
"/NAME"
,
""
,}
{
"dcli_arg1"
,
"/PRIORITY"
,
"/NAME"
,
"
/ALL"
,
"
"
,}
},
{
"TEST"
,
...
...
@@ -2151,11 +2151,17 @@ static int xnav_eventlist_func( void *client_data,
// Command is "EVENTLIST ACKNOWLEDGE"
char
prio_str
[
80
];
mh_sEventId
*
id
;
int
all
;
if
(
xnav
->
ev
)
{
if
(
ODD
(
dcli_get_qualifier
(
"/PRIORITY"
,
prio_str
,
sizeof
(
prio_str
))))
{
all
=
ODD
(
dcli_get_qualifier
(
"/ALL"
,
0
,
0
));
if
(
all
)
{
if
(
xnav
->
ev
)
xnav
->
ev
->
ack_all
();
return
XNAV__SUCCESS
;
}
if
(
xnav
->
ev
)
{
if
(
ODD
(
dcli_get_qualifier
(
"/PRIORITY"
,
prio_str
,
sizeof
(
prio_str
))))
{
cdh_ToUpper
(
prio_str
,
prio_str
);
if
(
strcmp
(
prio_str
,
"A"
)
==
0
)
xnav
->
ev
->
ack_last_prio
(
evlist_eEventType_Alarm
,
mh_eEventPrio_A
);
...
...
@@ -2167,8 +2173,7 @@ static int xnav_eventlist_func( void *client_data,
xnav
->
ev
->
ack_last_prio
(
evlist_eEventType_Alarm
,
mh_eEventPrio_D
);
else
if
(
strncmp
(
prio_str
,
"I"
,
1
)
==
0
)
xnav
->
ev
->
ack_last_prio
(
evlist_eEventType_Info
,
0
);
else
if
(
strcmp
(
prio_str
,
"NOA"
)
==
0
)
{
else
if
(
strcmp
(
prio_str
,
"NOA"
)
==
0
)
{
if
(
ODD
(
xnav
->
ev
->
get_last_not_acked_prio
(
&
id
,
evlist_eEventType_Alarm
,
mh_eEventPrio_B
)))
xnav
->
ev
->
ack_last_prio
(
evlist_eEventType_Alarm
,
mh_eEventPrio_B
);
...
...
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