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
f7647de3
Commit
f7647de3
authored
Dec 20, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Plain Diff
Wmq added, conflicts fixed
parents
9e6b2f69
3a5a6322
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
730 additions
and
22 deletions
+730
-22
remote/changelog.txt
remote/changelog.txt
+1
-0
remote/exe/rs_remote_wmq/src/os_templ/hw_templ/makefile
remote/exe/rs_remote_wmq/src/os_templ/hw_templ/makefile
+12
-0
remote/exe/rs_remote_wmq/src/os_templ/link_rule.mk
remote/exe/rs_remote_wmq/src/os_templ/link_rule.mk
+12
-0
remote/exe/rs_remote_wmq/src/rs_remote_wmq.c
remote/exe/rs_remote_wmq/src/rs_remote_wmq.c
+437
-0
remote/exe/rs_remotehandler/src/rs_remotehandler.c
remote/exe/rs_remotehandler/src/rs_remotehandler.c
+26
-0
remote/wbl/remote/src/remote_c_remnodewmq.wb_load
remote/wbl/remote/src/remote_c_remnodewmq.wb_load
+199
-0
src/tools/pwre/src/os_linux/pwre_configure.sh
src/tools/pwre/src/os_linux/pwre_configure.sh
+7
-0
wb/exp/wb/src/pwr_wb_palette.cnf
wb/exp/wb/src/pwr_wb_palette.cnf
+2
-1
wb/lib/wb/gtk/wb_nav_gtk.cpp
wb/lib/wb/gtk/wb_nav_gtk.cpp
+15
-8
wb/lib/wb/gtk/wb_nav_gtk.h
wb/lib/wb/gtk/wb_nav_gtk.h
+1
-1
wb/lib/wb/motif/wb_nav_motif.cpp
wb/lib/wb/motif/wb_nav_motif.cpp
+13
-9
wb/lib/wb/motif/wb_nav_motif.h
wb/lib/wb/motif/wb_nav_motif.h
+1
-1
wb/lib/wb/src/wb_nav.cpp
wb/lib/wb/src/wb_nav.cpp
+3
-1
wb/lib/wb/src/wb_nav.h
wb/lib/wb/src/wb_nav.h
+1
-1
No files found.
remote/changelog.txt
View file @
f7647de3
#060227 cs - Changelog created.
070528 cs logg Env variable allowed in remotelogg filename.
071115 rk tcpip Fixed several bugs when acting as server.
101216 rk wmq Added functionality for handling Websphere MQ as remote node.
remote/exe/rs_remote_wmq/src/os_templ/hw_templ/makefile
0 → 100644
View file @
f7647de3
include
$(pwre_dir_symbols)
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq
($($(type_name)_generic_mk),)
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq
($($(type_name)_generic_mk),)
include
$(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
remote/exe/rs_remote_wmq/src/os_templ/link_rule.mk
0 → 100644
View file @
f7647de3
ifndef
link_rule_mk
link_rule_mk
:=
1
ifeq
($(PWRE_CONF_WMQ),1)
link
=
$(ldxx)
$(elinkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(objects)
$(rt_msg_eobjs)
\
$(pwre_conf_libdir)
$(pwre_conf_libpwrremote)
$(pwre_conf_libpwrrt)
\
$(pwre_conf_libwmq)
$(pwre_conf_lib)
else
link
=
echo
"WMQ not installed"
endif
endif
remote/exe/rs_remote_wmq/src/rs_remote_wmq.c
0 → 100644
View file @
f7647de3
This diff is collapsed.
Click to expand it.
remote/exe/rs_remotehandler/src/rs_remotehandler.c
View file @
f7647de3
...
...
@@ -43,6 +43,7 @@
* 040303 J Nylund ndrat till omgivningsvariabel
* i skvgarna till exe-filerna
* 040422 C Jurstrand 4.0.0
* 101209 R Karlsson Adderat std fr Websphere MQ
*
* Description:
* Start and control of transportprocesses for remote communication
...
...
@@ -111,6 +112,7 @@ static void AddTransports()
pwr_tObjid
objid
;
pwr_tAddress
objref
;
pwr_tStatus
sts
;
pwr_tUInt32
id
=
1
;
/* Init transport (process) counter */
tpcount
=
0
;
...
...
@@ -118,6 +120,30 @@ static void AddTransports()
/* Initialize transport vector with 0's */
memset
(
&
tp
,
0
,
sizeof
(
tp
));
/* Get and configure all WMQ remnodes, one process for each remnode */
sts
=
gdh_GetClassList
(
pwr_cClass_RemnodeWMQ
,
&
objid
);
while
(
ODD
(
sts
))
{
sts
=
gdh_ObjidToPointer
(
objid
,
&
objref
);
sprintf
(
tp
[
tpcount
].
path
,
"rs_remote_wmq"
);
tp
[
tpcount
].
id
=
id
++
;
tp
[
tpcount
].
disable
=
&
((
pwr_sClass_RemnodeWMQ
*
)
objref
)
->
Disable
;
tp
[
tpcount
].
restart_limit
=
&
((
pwr_sClass_RemnodeWMQ
*
)
objref
)
->
RestartLimit
;
tp
[
tpcount
].
restarts
=
&
((
pwr_sClass_RemnodeWMQ
*
)
objref
)
->
RestartCount
;
((
pwr_sClass_RemnodeWMQ
*
)
objref
)
->
RestartCount
=
0
;
tp
[
tpcount
].
objid
=
objid
;
tp
[
tpcount
].
objref
=
objref
;
tp
[
tpcount
].
classid
=
pwr_cClass_RemnodeWMQ
;
tp
[
tpcount
].
cpid
=
-
1
;
tp
[
tpcount
].
first
=
true
;
remcfgp
->
RemNodeObjects
[
tpcount
]
=
objid
;
tpcount
++
;
sts
=
gdh_GetNextObject
(
objid
,
&
objid
);
}
/* Get and configure all MQ remnodes, one process for each remnode */
sts
=
gdh_GetClassList
(
pwr_cClass_RemnodeMQ
,
&
objid
);
...
...
remote/wbl/remote/src/remote_c_remnodewmq.wb_load
0 → 100644
View file @
f7647de3
!
! Proview $Id: remote_c_remnodemq.wb_load,v 1.1 2006-01-12 06:39:33 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with the program, if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
! remote_c_remnodewmq.wb_load -- Defines the class RemnodeWMQ.
!
SObject Remote:Class
!/**
! @Version 1.0
! @Group Servers,NodeConfiguration
! @Summary Configures communication through a message queue using Webspere MQ.
! Configures communication through a message queue using Websphere MQ as a client.
! All regarding Server, channel, queue manager and queues to connect to is configured
! in the RemonodeWMQ-object.
! Configurations for the different messages is configured in the RemtTrans-object that define
! each in- and outgoing message. For each RemTrans-message the following can be configured:
!
! TransName - a string that defines the MsgId (message identity of the message).
! Address[0] - defines whether the message should be sent as a persistent message or not.
! 1 means that the message will be sent as a persistent message. 0 not.
!
! @b Object graph
! @image orm_remnodewmq_og.gif
!
! @b See also
! @classlink RemoteConfig pwrp_remoteconfig.html
! @classlink RemTrans ssab_remtrans.html
!*/
Object RemnodeWMQ $ClassDef 33
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
Attr PopEditor = 2
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "RemnodeWMQ"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Process priority for the transport process. For future use.
!*/
Object Prio $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
EndBody
EndObject
!/**
! Name of Queue Manager to connect to.
! Server to connect to is defined by enviroment variable MQSERVER.
! export MQSERVER=<ChannelName>/<TransportType>/<ConnectionName>[(port)]
! For example:
! export MQSERVER=CHANNEL1/TCP/192.168.40.20(2020)
! The port is by default 1414 and will be used if no port is given.
!*/
Object QueueManager $Attribute 3
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Name of WMQ queue for all incoming messages.
!*/
Object RcvQueue $Attribute 4
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Name of WMQ queue for all outgoing messages.
!*/
Object SndQueue $Attribute 5
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Scantime in seconds for outgoing RemTrans messages.
! Dynamic change is possible.
!*/
Object ScanTime $Attribute 6
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! When set, this attribute tells the remote handler not to start
! or restart the process that handles this remote node. If the transport process
! is running while the attribute is set it will terminate. This can be used to force
! a restart of the process.
!*/
Object Disable $Attribute 7
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!/**
! This attribute shows how many times the remote handler has restarted the
! transport process that handles this remnode.
! Dynamic change is possible and can be used in order to earn more restarts.
!*/
Object RestartCount $Attribute 8
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
!/**
! The restart limit tells the remote handler how many times the transport process
! that handle this remnode can be restarted.
! Dynamic change is possible and can be used in order to earn more restarts.
!*/
Object RestartLimit $Attribute 9
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! The restart time is set by the transport process at startup and therefore
! shows the latest (re)starttime.
!*/
Object RestartTime $Attribute 10
Body SysBody
Attr TypeRef = "pwrs:Type-$Time"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
!/**
! Error counter.
!*/
Object ErrCount $Attribute 11
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
!/**
! Type of remnode. Used in the RemoteConfig classgraph.
!*/
Object Id $Attribute 12
Body SysBody
Attr TypeRef = "pwrs:Type-$String8"
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
!/**
! Contains the objid for the RemTrans objects for this remnode.
! The objid's are inserted by the remote process.
!*/
Object RemTransObjects $Attribute 13
Body SysBody
Attr TypeRef = "pwrs:Type-$Objid"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_ARRAY
Attr Elements = 25
EndBody
EndObject
EndObject
Object Template RemnodeWMQ
Body RtBody
Attr Prio = 15
Attr Disable = 0
Attr RestartCount = 0
Attr RestartLimit = 100
Attr ScanTime = 0.1
Attr Id = "WMQ"
EndBody
EndObject
EndObject
EndSObject
src/tools/pwre/src/os_linux/pwre_configure.sh
View file @
f7647de3
...
...
@@ -113,6 +113,8 @@ pwre_config_check_lib()
conf_libwb
=
$conf_libwb
" -l
${
lib
%.*
}
"
elif
test
$4
==
"mq"
;
then
conf_libmq
=
$conf_libmq
" -l
${
lib
%.*
}
"
elif
test
$4
==
"wmq"
;
then
conf_libwmq
=
$conf_libwmq
" -l
${
lib
%.*
}
"
else
conf_lib
=
$conf_lib
" -l
${
lib
%.*
}
"
fi
...
...
@@ -203,6 +205,7 @@ conf_cc_define="-D$dos=1 -D$dhw=1 -DOS=${pwre_os:3} -DHW=${pwre_hw:3} -D_${dos:3
conf_lib
=
""
conf_libwb
=
""
conf_libmq
=
""
conf_libwmq
=
""
conf_libgtk
=
""
conf_libmotif
=
""
conf_libdir
=
""
...
...
@@ -288,6 +291,7 @@ if test $pwre_hw == "hw_arm"; then
echo
"export pwre_conf_lib=
\"
-lpthread -lm -lrt -lcrypt
\"
"
>>
$cfile
echo
"export pwre_conf_libwb=
\"
$conf_libwb
\"
"
>>
$cfile
echo
"export pwre_conf_libmq=
\"
$conf_libmq
\"
"
>>
$cfile
echo
"export pwre_conf_libwmq=
\"
$conf_libwmq
\"
"
>>
$cfile
echo
"export pwre_conf_libgtk=
\"
$conf_libgtk
\"
"
>>
$cfile
echo
"export pwre_conf_libmotif=
\"
$conf_libmotif
\"
"
>>
$cfile
echo
"export pwre_conf_libdir=
\"
$conf_libdir
\"
"
>>
$cfile
...
...
@@ -311,6 +315,7 @@ else
pwre_config_check_lib libcrypt LIBCRYPT lib lib 0 /usr/lib/libcrypt.so:/usr/lib/libcrypt.a
pwre_config_check_lib mysql MYSQL lib lib 1 /usr/lib/libmysqlclient.so:/usr/lib/mysql/libmysqlclient.so
pwre_config_check_lib mq MQ lib mq 1 /usr/lib/libdmq.so
pwre_config_check_lib wmq WMQ lib wmq 1 /usr/lib/libmqic.so
pwre_config_check_lib libpnioif PNAK lib lib 1 /usr/lib/libpnioif.a:/usr/local/lib/libpnioif.a
pwre_config_check_lib libusb LIBUSB lib lib 1 /usr/lib/libusb-1.0.so
pwre_config_check_lib librt LIBRT lib lib 0 /usr/lib/librt.so:/usr/lib/librt.a
...
...
@@ -323,6 +328,7 @@ else
pwre_config_check_include gtk GTK 1 /usr/local/include/gtk-2.0/gtk.h:/usr/local/include/gtk-2.0/gtk/gtk.h:/usr/include/gtk-2.0/gtk/gtk.h
pwre_config_check_include jni JNI 1
$jdk
/include/jni.h
pwre_config_check_include jni JNI 0
$jdk
/include/linux/jni_md.h
pwre_config_check_include wmq WMQ 1 /opt/mqm/inc/cmqc.h
export
pwre_conf_alsa
=
1
...
...
@@ -360,6 +366,7 @@ else
echo
"export pwre_conf_lib=
\"
$conf_lib
\"
"
>>
$cfile
echo
"export pwre_conf_libwb=
\"
$conf_libwb
\"
"
>>
$cfile
echo
"export pwre_conf_libmq=
\"
$conf_libmq
\"
"
>>
$cfile
echo
"export pwre_conf_libwmq=
\"
$conf_libwmq
\"
"
>>
$cfile
echo
"export pwre_conf_libgtk=
\"
$conf_libgtk
\"
"
>>
$cfile
echo
"export pwre_conf_libmotif=
\"
$conf_libmotif
\"
"
>>
$cfile
echo
"export pwre_conf_libdir=
\"
$conf_libdir
\"
"
>>
$cfile
...
...
wb/exp/wb/src/pwr_wb_palette.cnf
View file @
f7647de3
...
...
@@ -182,7 +182,7 @@ palette NavigatorPalette
menu Siemens
{
class Siemens_Motor_1LA
class Si
emen
s_G120_Tgm1
class Si
namic
s_G120_Tgm1
}
menu Suco
{
...
...
@@ -338,6 +338,7 @@ palette NavigatorPalette
class RemnodeALCM
class RemnodeModbus
class RemnodeMQ
class RemnodeWMQ
class RemnodeSerial
class RemnodeTCP
class RemnodeUDP
...
...
wb/lib/wb/gtk/wb_nav_gtk.cpp
View file @
f7647de3
...
...
@@ -118,10 +118,11 @@ static void nav_sel_lose_cb( GtkWidget *w, GdkEventSelection *event,
nav
->
selection_owner
=
0
;
}
void
NavGtk
::
set_selection_owner
()
void
NavGtk
::
set_selection_owner
(
int
set
)
{
gboolean
sts
;
if
(
set
)
{
sts
=
gtk_selection_owner_set
(
selection_widget
,
GDK_SELECTION_PRIMARY
,
gtk_get_current_event_time
());
if
(
!
sts
)
{
...
...
@@ -129,6 +130,12 @@ void NavGtk::set_selection_owner()
return
;
}
selection_owner
=
1
;
}
else
{
sts
=
gtk_selection_owner_set
(
NULL
,
GDK_SELECTION_PRIMARY
,
gtk_get_current_event_time
());
selection_owner
=
0
;
}
}
void
NavGtk
::
set_inputfocus
(
int
focus
)
...
...
wb/lib/wb/gtk/wb_nav_gtk.h
View file @
f7647de3
...
...
@@ -47,7 +47,7 @@ class NavGtk : public Nav {
gulong
sel_lose_id
;
void
set_inputfocus
(
int
focus
);
void
set_selection_owner
();
void
set_selection_owner
(
int
set
);
};
#endif
...
...
wb/lib/wb/motif/wb_nav_motif.cpp
View file @
f7647de3
...
...
@@ -147,18 +147,22 @@ static void nav_sel_lose_cb( Widget w, Atom *selection)
brow_SelectClear
(
nav
->
brow_ctx
);
}
void
NavMotif
::
set_selection_owner
()
void
NavMotif
::
set_selection_owner
(
int
set
)
{
int
sts
;
if
(
set
)
{
sts
=
XtOwnSelection
(
brow_widget
,
XA_PRIMARY
,
XtLastTimestampProcessed
(
flow_Display
(
brow_widget
)),
nav_sel_convert_cb
,
nav_sel_lose_cb
,
NULL
);
if
(
!
sts
)
{
if
(
!
sts
)
{
brow_SelectClear
(
brow_ctx
);
return
;
}
}
else
{
// Todo...
}
}
void
NavMotif
::
set_inputfocus
(
int
focus
)
...
...
wb/lib/wb/motif/wb_nav_motif.h
View file @
f7647de3
...
...
@@ -45,7 +45,7 @@ class NavMotif : public Nav {
Widget
toplevel
;
void
set_inputfocus
(
int
focus
);
void
set_selection_owner
();
void
set_selection_owner
(
int
set
);
};
#endif
...
...
wb/lib/wb/src/wb_nav.cpp
View file @
f7647de3
...
...
@@ -1549,16 +1549,18 @@ int Nav::brow_cb( FlowCtx *ctx, flow_tEvent event)
if
(
brow_FindSelectedObject
(
nav
->
brow_ctx
,
event
->
object
.
object
))
{
brow_SelectClear
(
nav
->
brow_ctx
);
nav
->
set_selection_owner
(
0
);
}
else
{
brow_SelectClear
(
nav
->
brow_ctx
);
brow_SetInverse
(
event
->
object
.
object
,
1
);
brow_SelectInsert
(
nav
->
brow_ctx
,
event
->
object
.
object
);
nav
->
set_selection_owner
(
1
);
}
nav
->
set_selection_owner
();
break
;
default:
brow_SelectClear
(
nav
->
brow_ctx
);
nav
->
set_selection_owner
(
0
);
}
break
;
}
...
...
wb/lib/wb/src/wb_nav.h
View file @
f7647de3
...
...
@@ -77,7 +77,7 @@ class Nav {
int
show_descrip
;
virtual
void
set_inputfocus
(
int
focus
)
{}
virtual
void
set_selection_owner
()
{}
virtual
void
set_selection_owner
(
int
set
)
{}
void
zoom
(
double
zoom_factor
);
void
unzoom
();
...
...
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