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
dfaf7cc6
Commit
dfaf7cc6
authored
Jul 07, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UDP IO bugfix and template values for error limits set
parent
b213361d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
otherio/lib/rt/src/os_linux/rt_io_m_udp_io.c
otherio/lib/rt/src/os_linux/rt_io_m_udp_io.c
+22
-7
otherio/wbl/mcomp/src/otherio.wb_load
otherio/wbl/mcomp/src/otherio.wb_load
+3
-1
No files found.
otherio/lib/rt/src/os_linux/rt_io_m_udp_io.c
View file @
dfaf7cc6
...
@@ -116,7 +116,7 @@ pwr_tStatus udp_recv_data( io_sLocalUDP_IO *local, io_sCard *cp,
...
@@ -116,7 +116,7 @@ pwr_tStatus udp_recv_data( io_sLocalUDP_IO *local, io_sCard *cp,
sts
=
1
;
sts
=
1
;
/* while (sts > 0) */
while
(
sts
>
0
)
{
{
FD_ZERO
(
&
fdr
);
FD_ZERO
(
&
fdr
);
FD_ZERO
(
&
fdw
);
FD_ZERO
(
&
fdw
);
...
@@ -134,14 +134,20 @@ pwr_tStatus udp_recv_data( io_sLocalUDP_IO *local, io_sCard *cp,
...
@@ -134,14 +134,20 @@ pwr_tStatus udp_recv_data( io_sLocalUDP_IO *local, io_sCard *cp,
op
->
Status
=
IOM__UDP_DOWN
;
op
->
Status
=
IOM__UDP_DOWN
;
// close(local->socket);
// close(local->socket);
errh_Error
(
"Connection lost to modbus slave, %s"
,
cp
->
Name
);
errh_Error
(
"Connection lost to modbus slave, %s"
,
cp
->
Name
);
return
IO__SUCCESS
;
if
(
received
)
return
IO__SUCCESS
;
else
return
0
;
}
}
if
(
!
(
FD_ISSET
(
local
->
socket
,
&
fdw
)))
{
if
(
!
(
FD_ISSET
(
local
->
socket
,
&
fdw
)))
{
op
->
Status
=
IOM__UDP_DOWN
;
op
->
Status
=
IOM__UDP_DOWN
;
// close(local->socket);
// close(local->socket);
errh_Error
(
"Connection down to modbus slave, %s"
,
cp
->
Name
);
errh_Error
(
"Connection down to modbus slave, %s"
,
cp
->
Name
);
return
IO__SUCCESS
;
if
(
received
)
return
IO__SUCCESS
;
else
return
0
;
}
}
tv
.
tv_sec
=
0
;
tv
.
tv_sec
=
0
;
...
@@ -158,7 +164,10 @@ pwr_tStatus udp_recv_data( io_sLocalUDP_IO *local, io_sCard *cp,
...
@@ -158,7 +164,10 @@ pwr_tStatus udp_recv_data( io_sLocalUDP_IO *local, io_sCard *cp,
op
->
Status
=
IOM__UDP_DOWN
;
op
->
Status
=
IOM__UDP_DOWN
;
// close(local->socket);
// close(local->socket);
errh_Error
(
"Connection lost to modbus slave, %s"
,
cp
->
Name
);
errh_Error
(
"Connection lost to modbus slave, %s"
,
cp
->
Name
);
return
IO__SUCCESS
;
if
(
received
)
return
IO__SUCCESS
;
else
return
0
;
}
}
if
(
sts
==
0
)
{
if
(
sts
==
0
)
{
...
@@ -175,14 +184,20 @@ pwr_tStatus udp_recv_data( io_sLocalUDP_IO *local, io_sCard *cp,
...
@@ -175,14 +184,20 @@ pwr_tStatus udp_recv_data( io_sLocalUDP_IO *local, io_sCard *cp,
op
->
Status
=
IOM__UDP_DOWN
;
op
->
Status
=
IOM__UDP_DOWN
;
// close(local->socket);
// close(local->socket);
errh_Error
(
"UDP IO Connection lost, %s"
,
cp
->
Name
);
errh_Error
(
"UDP IO Connection lost, %s"
,
cp
->
Name
);
return
IO__SUCCESS
;
if
(
received
)
return
IO__SUCCESS
;
else
return
0
;
}
}
if
(
data_size
==
0
)
{
if
(
data_size
==
0
)
{
op
->
Status
=
IOM__UDP_DOWN
;
op
->
Status
=
IOM__UDP_DOWN
;
// close(local->socket);
// close(local->socket);
errh_Error
(
"UDP IO Connection down, %s"
,
cp
->
Name
);
errh_Error
(
"UDP IO Connection down, %s"
,
cp
->
Name
);
return
IO__SUCCESS
;
if
(
received
)
return
IO__SUCCESS
;
else
return
0
;
}
}
if
(
data_size
<
buf_size
)
{
if
(
data_size
<
buf_size
)
{
...
...
otherio/wbl/mcomp/src/otherio.wb_load
View file @
dfaf7cc6
...
@@ -4575,12 +4575,14 @@ Volume OtherIO $ClassVolume 0.0.250.10
...
@@ -4575,12 +4575,14 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndBody
EndObject
EndObject
Object Template UDP_IO 2153742336 01-JAN-1970 01:00:00.00
Object Template UDP_IO 2153742336 01-JAN-1970 01:00:00.00
Body RtBody
20-MAY-2011 14:29:46.64
Body RtBody
07-JUL-2011 16:16:10.56
Attr Process = 1
Attr Process = 1
Attr Device = "eth0"
Attr Device = "eth0"
Attr LinkTimeout = 3.000000e+00
Attr LinkTimeout = 3.000000e+00
Attr ReconnectTime = 2.000000e+00
Attr ReconnectTime = 2.000000e+00
Attr KeepAliveTime = 1.000000e+00
Attr KeepAliveTime = 1.000000e+00
Attr ErrorSoftLimit = 50
Attr ErrorHardLimit = 100
EndBody
EndBody
EndObject
EndObject
EndObject
EndObject
...
...
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