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
b11f6edd
Commit
b11f6edd
authored
Sep 16, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt command 'send signal' and Ge action CatchSignal added
parent
e54a53a4
Changes
17
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
328 additions
and
115 deletions
+328
-115
xtt/lib/ge/src/ge_attrnav.cpp
xtt/lib/ge/src/ge_attrnav.cpp
+1
-0
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+137
-99
xtt/lib/ge/src/ge_dyn.h
xtt/lib/ge/src/ge_dyn.h
+31
-15
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+19
-0
xtt/lib/ge/src/ge_graph.h
xtt/lib/ge/src/ge_graph.h
+1
-0
xtt/lib/glow/src/glow.h
xtt/lib/glow/src/glow.h
+17
-1
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+6
-0
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+1
-0
xtt/lib/glow/src/glow_growctx.cpp
xtt/lib/glow/src/glow_growctx.cpp
+38
-0
xtt/lib/glow/src/glow_growctx.h
xtt/lib/glow/src/glow_growctx.h
+1
-0
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
+27
-0
xtt/lib/xtt/gtk/xtt_multiview_gtk.h
xtt/lib/xtt/gtk/xtt_multiview_gtk.h
+1
-0
xtt/lib/xtt/src/xtt_ge.cpp
xtt/lib/xtt/src/xtt_ge.cpp
+5
-0
xtt/lib/xtt/src/xtt_ge.h
xtt/lib/xtt/src/xtt_ge.h
+1
-0
xtt/lib/xtt/src/xtt_multiview.cpp
xtt/lib/xtt/src/xtt_multiview.cpp
+1
-0
xtt/lib/xtt/src/xtt_multiview.h
xtt/lib/xtt/src/xtt_multiview.h
+1
-0
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+40
-0
No files found.
xtt/lib/ge/src/ge_attrnav.cpp
View file @
b11f6edd
...
...
@@ -179,6 +179,7 @@ static attrnav_sEnumElement elem_action_type[] = {
{
(
unsigned
int
)
ge_mActionType1_OptionMenu
,
"OptionMenu"
},
{
(
unsigned
int
)
ge_mActionType1_MethodPulldownMenu
,
"MethodPulldownMenu"
},
{
(
unsigned
int
)
ge_mActionType1_Slider
,
"Slider"
},
{
(
unsigned
int
)
ge_mActionType1_CatchSignal
,
"CatchSignal"
},
{
0
,
""
}};
static
attrnav_sEnumElement
elem_color
[]
=
{
...
...
xtt/lib/ge/src/ge_dyn.cpp
View file @
b11f6edd
This diff is collapsed.
Click to expand it.
xtt/lib/ge/src/ge_dyn.h
View file @
b11f6edd
...
...
@@ -197,6 +197,7 @@
ge_eDynPrio_ColorThemeLightness
,
ge_eDynPrio_DigSwap
,
ge_eDynPrio_DigScript
,
ge_eDynPrio_CatchSignal
,
// This should always be last
ge_eDynPrio_Script
=
9998
,
...
...
@@ -281,7 +282,8 @@
ge_mActionType1_SetValue
=
1
<<
21
,
ge_mActionType1_MethodToolbar
=
1
<<
22
,
ge_mActionType1_MethodPulldownMenu
=
1
<<
23
,
ge_mActionType1_Script
=
1
<<
24
ge_mActionType1_Script
=
1
<<
24
,
ge_mActionType1_CatchSignal
=
1
<<
25
}
ge_mActionType1
;
typedef
enum
{
...
...
@@ -393,6 +395,7 @@
ge_eSave_MethodToolbar
=
71
,
ge_eSave_MethodPulldownMenu
=
72
,
ge_eSave_Script
=
73
,
ge_eSave_CatchSignal
=
74
,
ge_eSave_End
=
99
,
ge_eSave_Dyn_dyn_type1
=
100
,
ge_eSave_Dyn_action_type1
=
101
,
...
...
@@ -786,7 +789,8 @@
ge_eSave_MethodPulldownMenu_method_object
=
7200
,
ge_eSave_MethodPulldownMenu_menu_type
=
7201
,
ge_eSave_Script_script_len
=
7300
,
ge_eSave_Script_script
=
7301
ge_eSave_Script_script
=
7301
,
ge_eSave_CatchSignal_signal_name
=
7400
}
ge_eSave
;
...
...
@@ -2467,14 +2471,12 @@ class GeSlider : public GeDynElem {
GeSlider
(
GeDyn
*
e_dyn
)
:
GeDynElem
(
e_dyn
,
ge_mDynType1_No
,
ge_mDynType2_No
,
ge_mActionType1_Slider
,
ge_mActionType2_No
,
ge_eDynPrio_Slider
),
min_value_p
(
0
),
max_value_p
(
0
),
old_min_value
(
0
),
old_max_value
(
0
),
min_value_subid
(
pwr_cNSubid
),
max_value_subid
(
pwr_cNSubid
),
insensitive_p
(
0
)
min_value_p
(
0
),
max_value_p
(
0
),
old_min_value
(
0
),
old_max_value
(
0
),
insensitive_p
(
0
)
{
strcpy
(
attribute
,
""
);
strcpy
(
minvalue_attr
,
""
);
strcpy
(
maxvalue_attr
,
""
);
strcpy
(
insensitive_attr
,
""
);
strcpy
(
release_attr
,
""
);}
GeSlider
(
const
GeSlider
&
x
)
:
GeDynElem
(
x
.
dyn
,
x
.
dyn_type1
,
x
.
dyn_type2
,
x
.
action_type1
,
x
.
action_type2
,
x
.
prio
),
min_value_p
(
0
),
max_value_p
(
0
),
old_min_value
(
0
),
old_max_value
(
0
),
min_value_subid
(
pwr_cNSubid
),
max_value_subid
(
pwr_cNSubid
),
insensitive_p
(
0
)
min_value_p
(
0
),
max_value_p
(
0
),
old_min_value
(
0
),
old_max_value
(
0
),
insensitive_p
(
0
)
{
strcpy
(
attribute
,
x
.
attribute
);
strcpy
(
minvalue_attr
,
x
.
minvalue_attr
);
strcpy
(
maxvalue_attr
,
x
.
maxvalue_attr
);
strcpy
(
insensitive_attr
,
x
.
insensitive_attr
);
strcpy
(
release_attr
,
x
.
release_attr
);}
...
...
@@ -2514,13 +2516,11 @@ class GeBar : public GeDynElem {
GeBar
(
GeDyn
*
e_dyn
)
:
GeDynElem
(
e_dyn
,
ge_mDynType1_Bar
,
ge_mDynType2_No
,
ge_mActionType1_No
,
ge_mActionType2_No
,
ge_eDynPrio_Bar
),
min_value_p
(
0
),
max_value_p
(
0
),
old_min_value
(
0
),
old_max_value
(
0
),
min_value_subid
(
pwr_cNSubid
),
max_value_subid
(
pwr_cNSubid
)
min_value_p
(
0
),
max_value_p
(
0
),
old_min_value
(
0
),
old_max_value
(
0
)
{
strcpy
(
attribute
,
""
);
strcpy
(
minvalue_attr
,
""
);
strcpy
(
maxvalue_attr
,
""
);}
GeBar
(
const
GeBar
&
x
)
:
GeDynElem
(
x
.
dyn
,
x
.
dyn_type1
,
x
.
dyn_type2
,
x
.
action_type1
,
x
.
action_type2
,
x
.
prio
),
min_value_p
(
0
),
max_value_p
(
0
),
old_min_value
(
0
),
old_max_value
(
0
),
min_value_subid
(
pwr_cNSubid
),
max_value_subid
(
pwr_cNSubid
)
min_value_p
(
0
),
max_value_p
(
0
),
old_min_value
(
0
),
old_max_value
(
0
)
{
strcpy
(
attribute
,
x
.
attribute
);
strcpy
(
minvalue_attr
,
x
.
minvalue_attr
);
strcpy
(
maxvalue_attr
,
x
.
maxvalue_attr
);}
void
get_attributes
(
attr_sItem
*
attrinfo
,
int
*
item_count
);
...
...
@@ -2587,7 +2587,6 @@ class GeTrend : public GeDynElem {
GeTrend
(
GeDyn
*
e_dyn
)
:
GeDynElem
(
e_dyn
,
ge_mDynType1_Trend
,
ge_mDynType2_No
,
ge_mActionType1_No
,
ge_mActionType2_No
,
ge_eDynPrio_Trend
),
min_value1_p
(
0
),
max_value1_p
(
0
),
old_min_value1
(
0
),
old_max_value1
(
0
),
min_value_subid1
(
pwr_cNSubid
),
max_value_subid1
(
pwr_cNSubid
),
min_value2_p
(
0
),
max_value2_p
(
0
),
old_min_value2
(
0
),
old_max_value2
(
0
),
hold_p
(
0
),
timerange_p
(
0
),
old_timerange
(
0
)
{
strcpy
(
attribute1
,
""
);
strcpy
(
attribute2
,
""
);
...
...
@@ -3167,13 +3166,12 @@ class GeAxis : public GeDynElem {
GeDynElem
(
e_dyn
,
ge_mDynType1_No
,
ge_mDynType2_Axis
,
ge_mActionType1_No
,
ge_mActionType2_No
,
ge_eDynPrio_Axis
),
min_value
(
0
),
max_value
(
100
),
keep_settings
(
0
),
imin_value
(
0
),
imax_value
(
0
),
min_value_p
(
0
),
max_value_p
(
0
),
imin_value_p
(
0
),
imax_value_p
(
0
),
min_value_subid
(
pwr_cNSubid
),
max_value_subid
(
pwr_cNSubid
),
attr_type
(
0
)
imax_value_p
(
0
),
attr_type
(
0
)
{
strcpy
(
minvalue_attr
,
""
);
strcpy
(
maxvalue_attr
,
""
);}
GeAxis
(
const
GeAxis
&
x
)
:
GeDynElem
(
x
.
dyn
,
x
.
dyn_type1
,
x
.
dyn_type2
,
x
.
action_type1
,
x
.
action_type2
,
x
.
prio
),
min_value
(
x
.
min_value
),
max_value
(
x
.
max_value
),
keep_settings
(
x
.
keep_settings
),
min_value_p
(
0
),
max_value_p
(
0
),
imin_value_p
(
0
),
imax_value_p
(
0
),
min_value_subid
(
pwr_cNSubid
),
max_value_subid
(
pwr_cNSubid
)
min_value_p
(
0
),
max_value_p
(
0
),
imin_value_p
(
0
),
imax_value_p
(
0
)
{
strcpy
(
minvalue_attr
,
x
.
minvalue_attr
);
strcpy
(
maxvalue_attr
,
x
.
maxvalue_attr
);
}
void
get_attributes
(
attr_sItem
*
attrinfo
,
int
*
item_count
);
void
save
(
ofstream
&
fp
);
...
...
@@ -3218,6 +3216,24 @@ class GeTimeoutColor : public GeDynElem {
};
//! Catch signal.
class
GeCatchSignal
:
public
GeDynElem
{
public:
pwr_tString80
signal_name
;
GeCatchSignal
(
GeDyn
*
e_dyn
)
:
GeDynElem
(
e_dyn
,
ge_mDynType1_No
,
ge_mDynType2_No
,
ge_mActionType1_CatchSignal
,
ge_mActionType2_No
,
ge_eDynPrio_CatchSignal
)
{
strcpy
(
signal_name
,
""
);}
GeCatchSignal
(
const
GeCatchSignal
&
x
)
:
GeDynElem
(
x
.
dyn
,
x
.
dyn_type1
,
x
.
dyn_type2
,
x
.
action_type1
,
x
.
action_type2
,
x
.
prio
)
{
strcpy
(
signal_name
,
x
.
signal_name
);}
void
get_attributes
(
attr_sItem
*
attrinfo
,
int
*
item_count
);
void
save
(
ofstream
&
fp
);
void
open
(
ifstream
&
fp
);
int
action
(
grow_tObject
object
,
glow_tEvent
event
);
int
export_java
(
grow_tObject
object
,
ofstream
&
fp
,
bool
first
,
char
*
var_name
);
};
/*@}*/
#endif
...
...
xtt/lib/ge/src/ge_graph.cpp
View file @
b11f6edd
...
...
@@ -3422,6 +3422,8 @@ void GraphGrow::grow_trace_setup()
graph_grow_cb
);
grow_EnableEvent
(
ctx
,
glow_eEvent_MenuDelete
,
glow_eEventType_CallBack
,
graph_grow_cb
);
grow_EnableEvent
(
ctx
,
glow_eEvent_Signal
,
glow_eEventType_CallBack
,
graph_grow_cb
);
grow_RegisterEventLogCallback
(
ctx
,
graph_eventlog_cb
);
}
...
...
@@ -4251,6 +4253,18 @@ static int graph_trace_grow_cb( GlowCtx *ctx, glow_tEvent event)
graph
->
exec_dynamic
(
event
->
dynamics
.
object
,
event
->
dynamics
.
code
,
event
->
dynamics
.
dynamic_type
);
break
;
case
glow_eEvent_Signal
:
{
if
(
event
->
signal
.
object_type
==
glow_eObjectType_NoObject
)
break
;
if
(
grow_GetObjectType
(
event
->
signal
.
object
)
==
glow_eObjectType_GrowNode
||
grow_GetObjectType
(
event
->
signal
.
object
)
==
glow_eObjectType_GrowGroup
)
{
GeDyn
*
dyn
;
grow_GetUserData
(
event
->
signal
.
object
,
(
void
**
)
&
dyn
);
dyn
->
action
(
event
->
signal
.
object
,
event
);
}
break
;
}
default:
;
}
...
...
@@ -5688,6 +5702,11 @@ int Graph::get_object_name( unsigned int idx, int size, char *name)
return
1
;
}
void
Graph
::
signal_send
(
char
*
signalname
)
{
grow_SignalSend
(
grow
->
ctx
,
signalname
);
}
static
void
graph_free_dyn
(
grow_tObject
object
)
{
if
(
grow_GetObjectType
(
object
)
==
glow_eObjectType_GrowNode
||
...
...
xtt/lib/ge/src/ge_graph.h
View file @
b11f6edd
...
...
@@ -1413,6 +1413,7 @@ class Graph {
int
key_pressed
(
int
key
);
void
close_input_all
();
int
get_object_name
(
unsigned
int
idx
,
int
size
,
char
*
name
);
void
signal_send
(
char
*
signalname
);
static
int
get_colortheme_colors
(
char
*
file
,
double
**
colors
,
int
*
size
);
...
...
xtt/lib/glow/src/glow.h
View file @
b11f6edd
...
...
@@ -1091,7 +1091,8 @@ typedef enum {
glow_eEventType_Menu
,
//!< Menu callback.
glow_eEventType_Table
,
//!< Table callback.
glow_eEventType_Toolbar
,
//!< Toolbar callback.
glow_eEventType_CustomColor
//!< Custom color modified callback.
glow_eEventType_CustomColor
,
//!< Custom color modified callback.
glow_eEventType_Signal
//!< Signal event callback.
}
glow_eEventType
;
//! Glow events
...
...
@@ -1183,6 +1184,7 @@ typedef enum {
glow_eEvent_ScrollDown
,
//!< Scroll down.
glow_eEvent_AnteUndo
,
//!< Before undo.
glow_eEvent_PostUndo
,
//!< Store undo.
glow_eEvent_Signal
,
//!< Signal event.
glow_eEvent__
}
glow_eEvent
;
...
...
@@ -2268,6 +2270,19 @@ typedef struct {
double
blue
;
//!< rgb blue value
}
glow_sEventCustomColor
,
*
glow_tEventCustomColor
;
//! Data structure for signal event callback.
typedef
struct
{
glow_eEvent
event
;
//!< Event
glow_eEventType
type
;
//!< Event type
int
x_pixel
;
//!< x-coordinate i pixels
int
y_pixel
;
//!< y-coordinate i pixels
double
x
;
//!< x-coordinate
double
y
;
//!< y-coordinate
glow_eObjectType
object_type
;
//!< Type of object
void
*
object
;
//!< Pointer to object
char
signal_name
[
80
];
//!< Signal name
}
glow_sEventSignal
,
*
glow_tEventSignal
;
//! Union for event data structures
typedef
union
{
glow_eEvent
event
;
...
...
@@ -2285,6 +2300,7 @@ typedef union {
glow_sEventTable
table
;
glow_sEventToolbar
toolbar
;
glow_sEventCustomColor
customcolor
;
glow_sEventSignal
signal
;
}
glow_sEvent
,
*
glow_tEvent
;
//! Pixmap data structure
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
b11f6edd
...
...
@@ -5817,6 +5817,12 @@ int grow_KeyPressed( grow_tCtx ctx, int key)
return
((
GrowCtx
*
)
ctx
)
->
key_pressed
(
key
);
}
void
grow_SignalSend
(
grow_tCtx
ctx
,
char
*
signalname
)
{
((
GrowCtx
*
)
ctx
)
->
signal_send
(
signalname
);
}
/*@}*/
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
b11f6edd
...
...
@@ -3156,6 +3156,7 @@ extern "C" {
int
grow_SetObjectClass
(
grow_tObject
object
,
grow_tNodeClass
nodeclass
);
int
grow_CheckObjectName
(
grow_tCtx
ctx
,
char
*
name
);
int
grow_KeyPressed
(
grow_tCtx
ctx
,
int
key
);
void
grow_SignalSend
(
grow_tCtx
ctx
,
char
*
signalname
);
/*@}*/
...
...
xtt/lib/glow/src/glow_growctx.cpp
View file @
b11f6edd
...
...
@@ -4858,3 +4858,41 @@ int GrowCtx::key_pressed( int key)
}
return
0
;
}
int
GrowCtx
::
signal_send
(
char
*
signalname
)
{
int
sts
=
0
;
// Make a signal event callback for all nodes
for
(
int
i
=
0
;
i
<
a
.
a_size
;
i
++
)
{
switch
(
a
[
i
]
->
type
())
{
case
glow_eObjectType_GrowNode
:
case
glow_eObjectType_GrowGroup
:
{
if
(
event_callback
[
glow_eEvent_Signal
])
{
static
glow_sEvent
e
;
e
.
event
=
glow_eEvent_Signal
;
e
.
any
.
type
=
glow_eEventType_Signal
;
e
.
any
.
x_pixel
=
0
;
e
.
any
.
y_pixel
=
0
;
e
.
any
.
x
=
0
;
e
.
any
.
y
=
0
;
e
.
signal
.
object
=
a
[
i
];
e
.
signal
.
object_type
=
a
[
i
]
->
type
();
strncpy
(
e
.
signal
.
signal_name
,
signalname
,
sizeof
(
e
.
signal
.
signal_name
));
sts
=
event_callback
[
glow_eEvent_Signal
](
this
,
&
e
);
if
(
sts
==
GLOW__NO_PROPAGATE
)
return
sts
;
}
break
;
}
case
glow_eObjectType_GrowWindow
:
case
glow_eObjectType_GrowFolder
:
sts
=
((
GrowWindow
*
)
a
[
i
])
->
window_ctx
->
signal_send
(
signalname
);
if
(
sts
==
GLOW__NO_PROPAGATE
)
return
sts
;
break
;
default:
;
}
}
return
1
;
}
xtt/lib/glow/src/glow_growctx.h
View file @
b11f6edd
...
...
@@ -888,6 +888,7 @@ class GrowCtx : public GlowCtx {
double
*
ur_x
,
double
*
ur_y
);
int
key_pressed
(
int
key
);
int
signal_send
(
char
*
signalname
);
void
pop
(
GlowArrayElem
*
element
)
{
a
.
pop
(
element
);}
void
set_text_coding
(
glow_eTextCoding
coding
);
...
...
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
View file @
b11f6edd
...
...
@@ -1385,3 +1385,30 @@ void XttMultiViewGtk::close_input_all()
}
}
void
XttMultiViewGtk
::
signal_send
(
char
*
signalname
)
{
pwr_sClass_XttMultiView
mv
;
pwr_tStatus
sts
;
sts
=
gdh_GetObjectInfoAttrref
(
&
aref
,
&
mv
,
sizeof
(
mv
));
if
(
EVEN
(
sts
))
return
;
for
(
int
i
=
0
;
i
<
cols
;
i
++
)
{
for
(
int
j
=
0
;
j
<
rows
;
j
++
)
{
// Call signal_send in component
switch
(
mv
.
Action
[
i
*
rows
+
j
].
Type
)
{
case
pwr_eMultiViewContentEnum_Graph
:
case
pwr_eMultiViewContentEnum_ObjectGraph
:
gectx
[
i
*
rows
+
j
]
->
signal_send
(
signalname
);
break
;
case
pwr_eMultiViewContentEnum_MultiView
:
{
mvctx
[
i
*
rows
+
j
]
->
signal_send
(
signalname
);
break
;
}
default:
;
}
}
}
}
xtt/lib/xtt/gtk/xtt_multiview_gtk.h
View file @
b11f6edd
...
...
@@ -94,6 +94,7 @@ class XttMultiViewGtk : public XttMultiView {
int
insert
=
1
,
int
more
=
0
);
int
key_pressed
(
int
key
);
void
close_input_all
();
void
signal_send
(
char
*
signalname
);
static
void
ge_change_value_cb
(
void
*
ge_ctx
,
void
*
value_object
,
char
*
text
);
static
void
confirm_cb
(
void
*
ge_ctx
,
void
*
confirm_object
,
char
*
text
);
...
...
xtt/lib/xtt/src/xtt_ge.cpp
View file @
b11f6edd
...
...
@@ -246,6 +246,11 @@ void XttGe::update_color_theme( int theme)
graph
->
update_color_theme
(
color_theme
);
}
void
XttGe
::
signal_send
(
char
*
signalname
)
{
graph
->
signal_send
(
signalname
);
}
void
XttGe
::
event_exec
(
int
type
,
void
*
event
,
unsigned
int
size
)
{
switch
(
type
)
{
...
...
xtt/lib/xtt/src/xtt_ge.h
View file @
b11f6edd
...
...
@@ -105,6 +105,7 @@ class XttGe : XttUtility {
int
key_pressed
(
int
key
);
void
close_input_all
();
int
get_object_name
(
unsigned
int
idx
,
int
size
,
char
*
name
);
void
signal_send
(
char
*
signalname
);
static
void
graph_init_cb
(
void
*
client_data
);
static
int
graph_close_cb
(
void
*
client_data
);
...
...
xtt/lib/xtt/src/xtt_multiview.cpp
View file @
b11f6edd
...
...
@@ -334,6 +334,7 @@ XNav *XttMultiView::get_xnav()
return
(
XNav
*
)
parent_ctx
;
}
XttMultiView
::
XttMultiView
(
void
*
mv_parent_ctx
,
const
char
*
mv_name
,
pwr_tAttrRef
*
mv_aref
,
int
mv_width
,
int
mv_height
,
int
mv_x
,
int
mv_y
,
unsigned
int
mv_options
,
int
mv_color_theme
,
...
...
xtt/lib/xtt/src/xtt_multiview.h
View file @
b11f6edd
...
...
@@ -115,6 +115,7 @@ class XttMultiView : XttUtility {
int
insert
=
1
,
int
cont
=
0
)
{
return
0
;}
virtual
int
key_pressed
(
int
key
)
{
return
0
;}
virtual
void
close_input_all
()
{}
virtual
void
signal_send
(
char
*
signalname
)
{}
xtt_eUtility
get_type
()
{
return
xtt_eUtility_MultiView
;}
void
message
(
char
severity
,
const
char
*
msg
);
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
b11f6edd
...
...
@@ -259,6 +259,8 @@ static int xnav_wait_func( void *client_data,
void
*
client_flag
);
static
int
xnav_oplog_func
(
void
*
client_data
,
void
*
client_flag
);
static
int
xnav_send_func
(
void
*
client_data
,
void
*
client_flag
);
dcli_tCmdTable
xnav_command_table
[]
=
{
{
...
...
@@ -449,6 +451,11 @@ dcli_tCmdTable xnav_command_table[] = {
&
xnav_oplog_func
,
{
"dcli_arg1"
,
"/FILE"
,
"/SPEED"
,
"/PID"
,
"/EVENT"
,
""
}
},
{
"SEND"
,
&
xnav_send_func
,
{
"dcli_arg1"
,
"/SIGNALNAME"
,
""
}
},
{
""
,}};
...
...
@@ -7741,6 +7748,39 @@ static int xnav_oplog_func(void *client_data,
return
XNAV__SUCCESS
;
}
static
int
xnav_send_func
(
void
*
client_data
,
void
*
client_flag
)
{
XNav
*
xnav
=
(
XNav
*
)
client_data
;
char
arg1_str
[
80
];
int
arg1_sts
;
arg1_sts
=
dcli_get_qualifier
(
"dcli_arg1"
,
arg1_str
,
sizeof
(
arg1_str
));
if
(
cdh_NoCaseStrncmp
(
arg1_str
,
"SIGNAL"
,
strlen
(
arg1_str
))
==
0
)
{
pwr_tString80
signalname_str
;
ApplListElem
*
elem
;
if
(
EVEN
(
dcli_get_qualifier
(
"/SIGNALNAME"
,
signalname_str
,
sizeof
(
signalname_str
))))
{
xnav
->
message
(
'E'
,
"Syntax error"
);
return
XNAV__HOLDCOMMAND
;
}
for
(
elem
=
xnav
->
appl
.
root
;
elem
;
elem
=
elem
->
next
)
{
if
(
elem
->
type
==
applist_eType_Graph
)
((
XttGe
*
)
elem
->
ctx
)
->
signal_send
(
signalname_str
);
else
if
(
elem
->
type
==
applist_eType_MultiView
)
((
XttMultiView
*
)
elem
->
ctx
)
->
signal_send
(
signalname_str
);
}
}
else
{
xnav
->
message
(
'E'
,
"Syntax error"
);
return
XNAV__HOLDCOMMAND
;
}
return
XNAV__SUCCESS
;
}
int
XNav
::
show_database
()
{
int
sts
;
...
...
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