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
83a913a0
Commit
83a913a0
authored
Mar 07, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remote remnode QCom fix
parent
5c7e21f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
15 deletions
+25
-15
remote/exe/rs_remote_qcom/src/rs_remote_qcom.c
remote/exe/rs_remote_qcom/src/rs_remote_qcom.c
+11
-8
remote/wbl/remote/src/remote_c_remnodeqcom.wb_load
remote/wbl/remote/src/remote_c_remnodeqcom.wb_load
+1
-5
remote/wbl/remote/src/remote_c_remtrans.wb_load
remote/wbl/remote/src/remote_c_remtrans.wb_load
+13
-2
No files found.
remote/exe/rs_remote_qcom/src/rs_remote_qcom.c
View file @
83a913a0
...
...
@@ -127,14 +127,14 @@ unsigned int qcom_receive()
search_remtrans
=
false
;
sts
=
RemTrans_Receive
(
remtrans
,
(
char
*
)
get
.
data
,
get
.
size
);
if
(
sts
!=
STATUS_OK
&&
sts
!=
STATUS_BUFF
)
errh_Error
(
"Error from RemTrans_Receive, queue %d, status %d"
,
rn_qcom
->
My
Queue
,
sts
,
0
);
errh_Error
(
"Error from RemTrans_Receive, queue %d, status %d"
,
rn_qcom
->
Receive
Queue
,
sts
,
0
);
break
;
}
remtrans
=
(
remtrans_item
*
)
remtrans
->
next
;
}
if
(
search_remtrans
)
{
rn_qcom
->
ErrCount
++
;
errh_Info
(
"No remtrans for received message, queue %d, class "
,
rn_qcom
->
My
Queue
,
get
.
type
.
s
,
0
);
errh_Info
(
"No remtrans for received message, queue %d, class "
,
rn_qcom
->
Receive
Queue
,
get
.
type
.
s
,
0
);
}
if
(
get
.
data
)
...
...
@@ -180,10 +180,13 @@ unsigned int qcom_send(remnode_item *remnode,
put
.
reply
.
qix
=
0
;
put
.
reply
.
nid
=
0
;
if
(
remtrans
->
ReplacePrev
)
put
.
msg_id
=
remtrans
->
Address
[
0
]
+
1
;
qcom_Put
(
&
sts
,
&
target_qid
,
&
put
);
if
(
EVEN
(
sts
))
{
remtrans
->
ErrCount
++
;
errh_Error
(
"Send failed, queue %d, QCom status %d"
,
rn_qcom
->
My
Queue
,
sts
,
0
);
errh_Error
(
"Send failed, queue %d, QCom status %d"
,
rn_qcom
->
Receive
Queue
,
sts
,
0
);
if
(
debug
)
printf
(
"Send failed sts:%d
\n
"
,
(
int
)
sts
);
}
...
...
@@ -257,7 +260,7 @@ int main(int argc, char *argv[])
exit
(
sts
);
}
if
(
!
rn_qcom
->
My
Queue
&&
!
rn_qcom
->
TargetQueue
)
{
if
(
!
rn_qcom
->
Receive
Queue
&&
!
rn_qcom
->
TargetQueue
)
{
errh_Fatal
(
"Process terminated, neither send or receive queue configured, %s"
,
id
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
sts
);
...
...
@@ -289,14 +292,14 @@ int main(int argc, char *argv[])
}
/* Create queue */
if
(
rn_qcom
->
My
Queue
)
{
if
(
rn_qcom
->
Receive
Queue
)
{
qattr
.
type
=
qcom_eQtype_private
;
qattr
.
quota
=
100
;
local_qid
.
nid
=
0
;
local_qid
.
qix
=
rn_qcom
->
My
Queue
;
local_qid
.
qix
=
rn_qcom
->
Receive
Queue
;
sprintf
(
queue_name
,
"RemQue%d"
,
rn_qcom
->
My
Queue
);
sprintf
(
queue_name
,
"RemQue%d"
,
rn_qcom
->
Receive
Queue
);
qcom_CreateQ
(
&
sts
,
&
local_qid
,
&
qattr
,
queue_name
);
if
(
sts
==
QCOM__QALLREXIST
)
{
...
...
@@ -354,7 +357,7 @@ int main(int argc, char *argv[])
}
aproc_TimeStamp
(
TIME_INCR
,
5
);
if
(
rn_qcom
->
My
Queue
)
if
(
rn_qcom
->
Receive
Queue
)
sts
=
qcom_receive
();
else
RemoteSleep
(
TIME_INCR
);
...
...
remote/wbl/remote/src/remote_c_remnodeqcom.wb_load
View file @
83a913a0
...
...
@@ -86,7 +86,7 @@ SObject Remote:Class
! Number for queue used to receive messages on the current node.
! Can be set to 0 if no receive transactions exist.
!*/
Object
My
Queue $Attribute 3
Object
Receive
Queue $Attribute 3
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
EndBody
...
...
@@ -199,10 +199,6 @@ SObject Remote:Class
Object Template RemnodeQCom
Body RtBody
Attr Prio = 15
Attr MyQueue = 0
Attr TargetQueue = 0
Attr Disable = 0
Attr RestartCount = 0
Attr RestartLimit = 100
Attr ScanTime = 0.1
Attr Id = "QCom"
...
...
remote/wbl/remote/src/remote_c_remtrans.wb_load
View file @
83a913a0
...
...
@@ -131,13 +131,13 @@ SObject Remote:Class
! The WF_DQF delivery mode delivers the message to the remote
! recovery journal and blocks for verification or timeout.
! The NN_MEM delivery mode delivers the message to the
! destination queue and doesn
\u2019
t wait for any verification at all.
! destination queue and doesn
'
t wait for any verification at all.
! The SAF function puts the message in the local recovery journal
! if the link is down. When using SAF, DMQ handles the
! retransmission meaning that we (Proview) can forget the
! message and treat it as sent. This works on DMQ 3.2 but is not
! supported in the earlier version 3.0.
! The DISC function tells DMQ to discard the message if it isn
\u2019
t
! The DISC function tells DMQ to discard the message if it isn
'
t
! deliverable. Can be used with WF_DQF along with the remote
! buffering mechanism.
! For a deeper description of delivery modes, consult the DMQ
...
...
@@ -233,6 +233,17 @@ SObject Remote:Class
EndBody
EndObject
!/**
! When set, old messages in the outgoing buffer are replace by new ones.
! This can be used for cyclic transactions and ensures that the outgoing buffer
! is not filled with obsolete messages in times of bad network.
! Only implemented for QCom.
!*/
Object ReplacePrev $Attribute 19
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!/**
! Current number or stored messages.
! For incoming messages this indicates the number of messages waiting
! to be taken by the PLC-process. For outgoing messages it tells the
...
...
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