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
0b7f0cb1
Commit
0b7f0cb1
authored
Sep 05, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PSS9000 remote rack check of return status added
parent
07267d37
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
12 deletions
+84
-12
src/doc/man/en_us/man_iog.odt
src/doc/man/en_us/man_iog.odt
+0
-0
ssabox/lib/rt/src/os_linux/rt_io_bfbeth.c
ssabox/lib/rt/src/os_linux/rt_io_bfbeth.c
+12
-0
ssabox/lib/rt/src/os_linux/rt_io_bfbeth.h
ssabox/lib/rt/src/os_linux/rt_io_bfbeth.h
+4
-0
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
+32
-1
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_do.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_do.c
+36
-11
No files found.
src/doc/man/en_us/man_iog.odt
View file @
0b7f0cb1
No preview for this file type
ssabox/lib/rt/src/os_linux/rt_io_bfbeth.c
View file @
0b7f0cb1
...
@@ -38,3 +38,15 @@ pwr_tUInt16 bfbeth_get_data(io_sRackLocal *r, pwr_tUInt16 address, int *sts) {
...
@@ -38,3 +38,15 @@ pwr_tUInt16 bfbeth_get_data(io_sRackLocal *r, pwr_tUInt16 address, int *sts) {
}
}
return
0
;
return
0
;
}
}
void
bfbeth_get_write_status
(
io_sRackLocal
*
r
,
pwr_tUInt16
address
,
int
*
sts
)
{
int
i
;
*
sts
=
1
;
for
(
i
=
0
;
i
<
350
;
i
++
)
{
if
(
(
0x8000
|
r
->
write_area
.
item
[
i
].
address
)
==
address
)
{
*
sts
=
0x8000
&
r
->
write_area
.
item
[
i
].
address
?
1
:
-
1
;
return
;
}
}
}
ssabox/lib/rt/src/os_linux/rt_io_bfbeth.h
View file @
0b7f0cb1
...
@@ -8,3 +8,7 @@ void bfbeth_set_write_req( io_sRackLocal *r,
...
@@ -8,3 +8,7 @@ void bfbeth_set_write_req( io_sRackLocal *r,
pwr_tUInt16
bfbeth_get_data
(
io_sRackLocal
*
r
,
pwr_tUInt16
bfbeth_get_data
(
io_sRackLocal
*
r
,
pwr_tUInt16
address
,
pwr_tUInt16
address
,
int
*
sts
);
int
*
sts
);
void
bfbeth_get_write_status
(
io_sRackLocal
*
r
,
pwr_tUInt16
address
,
int
*
sts
);
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
View file @
0b7f0cb1
...
@@ -77,6 +77,7 @@ typedef struct {
...
@@ -77,6 +77,7 @@ typedef struct {
pwr_tBoolean
OldTestOn
[
IO_MAXCHAN
];
pwr_tBoolean
OldTestOn
[
IO_MAXCHAN
];
int
WriteFirst
;
int
WriteFirst
;
pwr_tTime
ErrTime
;
pwr_tTime
ErrTime
;
int
FirstScan
;
}
io_sLocal
;
}
io_sLocal
;
static
pwr_tStatus
AoRangeToCoef
(
static
pwr_tStatus
AoRangeToCoef
(
...
@@ -148,6 +149,7 @@ static pwr_tStatus IoCardInit (
...
@@ -148,6 +149,7 @@ static pwr_tStatus IoCardInit (
local
=
calloc
(
1
,
sizeof
(
*
local
));
local
=
calloc
(
1
,
sizeof
(
*
local
));
local
->
Address
=
op
->
RegAddress
;
local
->
Address
=
op
->
RegAddress
;
local
->
Qbus_fp
=
r_local
->
Qbus_fp
;
local
->
Qbus_fp
=
r_local
->
Qbus_fp
;
local
->
FirstScan
=
1
;
errh_Info
(
"Init of ao card '%s'"
,
cp
->
Name
);
errh_Info
(
"Init of ao card '%s'"
,
cp
->
Name
);
...
@@ -214,6 +216,8 @@ static pwr_tStatus IoCardWrite (
...
@@ -214,6 +216,8 @@ static pwr_tStatus IoCardWrite (
qbus_io_write
wb
;
qbus_io_write
wb
;
int
sts
;
int
sts
;
pwr_tTime
now
;
pwr_tTime
now
;
int
bfb_error
=
0
;
pwr_sClass_Ssab_RemoteRack
*
rrp
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ssab_BaseACard
*
)
cp
->
op
;
op
=
(
pwr_sClass_Ssab_BaseACard
*
)
cp
->
op
;
...
@@ -271,8 +275,35 @@ static pwr_tStatus IoCardWrite (
...
@@ -271,8 +275,35 @@ static pwr_tStatus IoCardWrite (
}
}
else
{
else
{
/* Ethernet I/O, Request a write to current address */
/* Ethernet I/O, Request a write to current address */
sts
=
1
;
if
(
!
local
->
FirstScan
)
bfbeth_get_write_status
(
r_local
,
(
pwr_tUInt16
)
(
local
->
Address
+
2
*
i
),
&
sts
);
bfbeth_set_write_req
(
r_local
,
(
pwr_tUInt16
)
(
local
->
Address
+
2
*
i
),
data
);
bfbeth_set_write_req
(
r_local
,
(
pwr_tUInt16
)
(
local
->
Address
+
2
*
i
),
data
);
sts
=
1
;
if
(
sts
==
-
1
)
{
/* Error handling for ethernet Qbus-I/O */
rrp
=
(
pwr_sClass_Ssab_RemoteRack
*
)
rp
->
op
;
if
(
bfb_error
==
0
)
{
op
->
ErrorCount
++
;
bfb_error
=
1
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
if
(
op
->
ErrorCount
==
op
->
ErrorHardLimit
)
errh_Error
(
"IO Error hard limit reached on card '%s', stall action %d"
,
cp
->
Name
,
rrp
->
StallAction
);
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
&&
rrp
->
StallAction
==
pwr_eSsabStallAction_ResetInputs
)
{
sts
=
1
;
}
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
&&
rrp
->
StallAction
==
pwr_eSsabStallAction_EmergencyBreak
)
{
ctx
->
Node
->
EmergBreakTrue
=
1
;
return
IO__ERRDEVICE
;
}
}
if
(
sts
==
-
1
)
continue
;
}
else
{
op
->
ErrorCount
=
0
;
}
}
}
if
(
sts
==
-
1
)
if
(
sts
==
-
1
)
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_do.c
View file @
0b7f0cb1
...
@@ -77,6 +77,7 @@ typedef struct {
...
@@ -77,6 +77,7 @@ typedef struct {
pwr_tBoolean
Found
;
pwr_tBoolean
Found
;
}
Filter
[
2
];
}
Filter
[
2
];
pwr_tTime
ErrTime
;
pwr_tTime
ErrTime
;
int
FirstScan
;
}
io_sLocal
;
}
io_sLocal
;
static
pwr_tStatus
IoCardInit
(
static
pwr_tStatus
IoCardInit
(
...
@@ -99,6 +100,7 @@ static pwr_tStatus IoCardInit (
...
@@ -99,6 +100,7 @@ static pwr_tStatus IoCardInit (
local
->
Address
[
0
]
=
op
->
RegAddress
;
local
->
Address
[
0
]
=
op
->
RegAddress
;
local
->
Address
[
1
]
=
op
->
RegAddress
+
2
;
local
->
Address
[
1
]
=
op
->
RegAddress
+
2
;
local
->
Qbus_fp
=
((
io_sRackLocal
*
)(
rp
->
Local
))
->
Qbus_fp
;
local
->
Qbus_fp
=
((
io_sRackLocal
*
)(
rp
->
Local
))
->
Qbus_fp
;
local
->
FirstScan
=
1
;
/* Init filter for Po signals */
/* Init filter for Po signals */
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
2
;
i
++
)
...
@@ -166,6 +168,8 @@ static pwr_tStatus IoCardWrite (
...
@@ -166,6 +168,8 @@ static pwr_tStatus IoCardWrite (
qbus_io_write
wb
;
qbus_io_write
wb
;
int
sts
;
int
sts
;
pwr_tTime
now
;
pwr_tTime
now
;
int
bfb_error
=
0
;
pwr_sClass_Ssab_RemoteRack
*
rrp
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ssab_BaseDoCard
*
)
cp
->
op
;
op
=
(
pwr_sClass_Ssab_BaseDoCard
*
)
cp
->
op
;
...
@@ -227,23 +231,41 @@ static pwr_tStatus IoCardWrite (
...
@@ -227,23 +231,41 @@ static pwr_tStatus IoCardWrite (
}
}
else
{
else
{
/* Ethernet I/O, Request a write to current address */
/* Ethernet I/O, Request a write to current address */
bfbeth_set_write_req
(
r_local
,
(
pwr_tUInt16
)
local
->
Address
[
i
],
data
);
sts
=
1
;
sts
=
1
;
if
(
!
local
->
FirstScan
)
bfbeth_get_write_status
(
r_local
,
(
pwr_tUInt16
)
local
->
Address
[
i
],
&
sts
);
bfbeth_set_write_req
(
r_local
,
(
pwr_tUInt16
)
local
->
Address
[
i
],
data
);
if
(
sts
==
-
1
)
{
/* Error handling for ethernet Qbus-I/O */
rrp
=
(
pwr_sClass_Ssab_RemoteRack
*
)
rp
->
op
;
if
(
bfb_error
==
0
)
{
op
->
ErrorCount
++
;
bfb_error
=
1
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
if
(
op
->
ErrorCount
==
op
->
ErrorHardLimit
)
errh_Error
(
"IO Error hard limit reached on card '%s', stall action %d"
,
cp
->
Name
,
rrp
->
StallAction
);
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
&&
rrp
->
StallAction
==
pwr_eSsabStallAction_ResetInputs
)
{
sts
=
1
;
}
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
&&
rrp
->
StallAction
==
pwr_eSsabStallAction_EmergencyBreak
)
{
ctx
->
Node
->
EmergBreakTrue
=
1
;
return
IO__ERRDEVICE
;
}
}
if
(
sts
==
-
1
)
continue
;
}
else
{
op
->
ErrorCount
=
0
;
}
}
}
/* Error handling for local Qbus-I/O */
if
(
sts
==
-
1
)
if
(
sts
==
-
1
)
{
{
#if 0
/* Exceptionhandler was called */
if ( io_fatal_error)
{
/* Activate emergency break */
errh_Error( "Fatal write error, card '%s', IO is stopped", cp->Name);
ctx->Node->EmergBreakTrue = 1;
return IO__ERRDEVICE;
}
#endif
/* Increase error count and check error limits */
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
time_GetTime
(
&
now
);
...
@@ -268,6 +290,8 @@ static pwr_tStatus IoCardWrite (
...
@@ -268,6 +290,8 @@ static pwr_tStatus IoCardWrite (
continue
;
continue
;
}
}
}
}
if
(
local
->
FirstScan
)
local
->
FirstScan
=
0
;
return
1
;
return
1
;
}
}
...
@@ -302,6 +326,7 @@ static pwr_tStatus IoCardSwap (
...
@@ -302,6 +326,7 @@ static pwr_tStatus IoCardSwap (
local
->
Address
[
0
]
=
op
->
RegAddress
;
local
->
Address
[
0
]
=
op
->
RegAddress
;
local
->
Address
[
1
]
=
op
->
RegAddress
+
2
;
local
->
Address
[
1
]
=
op
->
RegAddress
+
2
;
local
->
Qbus_fp
=
((
io_sRackLocal
*
)(
rp
->
Local
))
->
Qbus_fp
;
local
->
Qbus_fp
=
((
io_sRackLocal
*
)(
rp
->
Local
))
->
Qbus_fp
;
local
->
FirstScan
=
1
;
}
}
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
...
...
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