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
04959b88
Commit
04959b88
authored
Jun 30, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InitialValue introduced for ai, ao, di, do, ii and io. Used when warm restarting
parent
8c602222
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
src/lib/rt/src/rt_io_base.c
src/lib/rt/src/rt_io_base.c
+70
-0
No files found.
src/lib/rt/src/rt_io_base.c
View file @
04959b88
...
...
@@ -114,6 +114,7 @@ pwr_tStatus io_init_ai_signals(
char
buf
[
140
];
pwr_tUInt32
sig_count
=
0
;
pwr_tClassId
class
;
pwr_sClass_IvArea
*
iarea_op
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-ai"
,
&
area_objid
);
...
...
@@ -122,6 +123,13 @@ pwr_tStatus io_init_ai_signals(
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
area_op
);
if
(
EVEN
(
sts
))
return
sts
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-ai_init"
,
&
area_objid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
iarea_op
);
if
(
EVEN
(
sts
))
return
sts
;
// Check SigChanCon and put signal in channels SigChanCon
sts
=
gdh_GetClassList
(
pwr_cClass_Ai
,
&
sig_objid
);
while
(
ODD
(
sts
))
...
...
@@ -152,6 +160,9 @@ pwr_tStatus io_init_ai_signals(
}
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
sig_op
->
ActualValue
,
&
area_op
->
Value
[
sig_count
]);
sig_op
->
ValueIndex
=
sig_count
;
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
iarea_op
->
Value
[
sig_count
],
&
sig_op
->
InitialValue
);
sig_count
++
;
sts
=
gdh_GetNextObject
(
sig_objid
,
&
sig_objid
);
...
...
@@ -180,6 +191,7 @@ pwr_tStatus io_init_ao_signals(
char
buf
[
140
];
pwr_tUInt32
sig_count
=
0
;
pwr_tClassId
class
;
pwr_sClass_IvArea
*
iarea_op
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-ao"
,
&
area_objid
);
...
...
@@ -188,6 +200,13 @@ pwr_tStatus io_init_ao_signals(
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
area_op
);
if
(
EVEN
(
sts
))
return
sts
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-ao_init"
,
&
area_objid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
iarea_op
);
if
(
EVEN
(
sts
))
return
sts
;
// Check SigChanCon and put signal in channels SigChanCon
sts
=
gdh_GetClassList
(
pwr_cClass_Ao
,
&
sig_objid
);
while
(
ODD
(
sts
))
...
...
@@ -218,6 +237,9 @@ pwr_tStatus io_init_ao_signals(
}
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
sig_op
->
ActualValue
,
&
area_op
->
Value
[
sig_count
]);
sig_op
->
ValueIndex
=
sig_count
;
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
iarea_op
->
Value
[
sig_count
],
&
sig_op
->
InitialValue
);
sig_count
++
;
sts
=
gdh_GetNextObject
(
sig_objid
,
&
sig_objid
);
...
...
@@ -245,6 +267,7 @@ pwr_tStatus io_init_di_signals(
char
buf
[
140
];
pwr_tUInt32
sig_count
=
0
;
pwr_tClassId
class
;
pwr_sClass_IvArea
*
iarea_op
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-di"
,
&
area_objid
);
...
...
@@ -253,6 +276,13 @@ pwr_tStatus io_init_di_signals(
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
area_op
);
if
(
EVEN
(
sts
))
return
sts
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-di_init"
,
&
area_objid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
iarea_op
);
if
(
EVEN
(
sts
))
return
sts
;
// Check SigChanCon and put signal in channels SigChanCon
sts
=
gdh_GetClassList
(
pwr_cClass_Di
,
&
sig_objid
);
while
(
ODD
(
sts
))
...
...
@@ -283,6 +313,9 @@ pwr_tStatus io_init_di_signals(
}
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
sig_op
->
ActualValue
,
&
area_op
->
Value
[
sig_count
]);
sig_op
->
ValueIndex
=
sig_count
;
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
iarea_op
->
Value
[
sig_count
],
&
sig_op
->
InitialValue
);
sig_count
++
;
sts
=
gdh_GetNextObject
(
sig_objid
,
&
sig_objid
);
...
...
@@ -311,6 +344,7 @@ pwr_tStatus io_init_do_signals(
char
buf
[
140
];
pwr_tUInt32
sig_count
=
0
;
pwr_tClassId
class
;
pwr_sClass_IvArea
*
iarea_op
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-do"
,
&
area_objid
);
...
...
@@ -319,6 +353,13 @@ pwr_tStatus io_init_do_signals(
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
area_op
);
if
(
EVEN
(
sts
))
return
sts
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-do_init"
,
&
area_objid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
iarea_op
);
if
(
EVEN
(
sts
))
return
sts
;
// Check SigChanCon and put signal in channels SigChanCon
sts
=
gdh_GetClassList
(
pwr_cClass_Do
,
&
sig_objid
);
while
(
ODD
(
sts
))
...
...
@@ -349,6 +390,9 @@ pwr_tStatus io_init_do_signals(
}
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
sig_op
->
ActualValue
,
&
area_op
->
Value
[
sig_count
]);
sig_op
->
ValueIndex
=
sig_count
;
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
iarea_op
->
Value
[
sig_count
],
&
sig_op
->
InitialValue
);
sig_count
++
;
sts
=
gdh_GetNextObject
(
sig_objid
,
&
sig_objid
);
...
...
@@ -486,6 +530,7 @@ io_init_av_signals (
pwr_tFloat32
*
p
;
pwr_tInt32
av_count
=
0
;
pwr_sClass_IvArea
*
iarea_op
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-av"
,
&
area_objid
);
...
...
@@ -621,6 +666,7 @@ pwr_tStatus io_init_ii_signals(
char
buf
[
140
];
pwr_tUInt32
sig_count
=
0
;
pwr_tClassId
class
;
pwr_sClass_IvArea
*
iarea_op
;
// Get pointer to area-object
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-ii"
,
&
area_objid
);
...
...
@@ -629,6 +675,13 @@ pwr_tStatus io_init_ii_signals(
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
area_op
);
if
(
EVEN
(
sts
))
return
sts
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-ii_init"
,
&
area_objid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
iarea_op
);
if
(
EVEN
(
sts
))
return
sts
;
// Check SigChanCon and put signal in channels SigChanCon
sts
=
gdh_GetClassList
(
pwr_cClass_Ii
,
&
sig_objid
);
while
(
ODD
(
sts
))
...
...
@@ -659,6 +712,9 @@ pwr_tStatus io_init_ii_signals(
}
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
sig_op
->
ActualValue
,
&
area_op
->
Value
[
sig_count
]);
sig_op
->
ValueIndex
=
sig_count
;
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
iarea_op
->
Value
[
sig_count
],
&
sig_op
->
InitialValue
);
sig_count
++
;
sts
=
gdh_GetNextObject
(
sig_objid
,
&
sig_objid
);
...
...
@@ -687,6 +743,7 @@ pwr_tStatus io_init_io_signals(
char
buf
[
140
];
pwr_tUInt32
sig_count
=
0
;
pwr_tClassId
class
;
pwr_sClass_IvArea
*
iarea_op
;
// Get pointer to area-object
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-io"
,
&
area_objid
);
...
...
@@ -695,6 +752,13 @@ pwr_tStatus io_init_io_signals(
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
area_op
);
if
(
EVEN
(
sts
))
return
sts
;
/* Get pointer to area-object */
sts
=
gdh_NameToObjid
(
"pwrNode-active-io-io_init"
,
&
area_objid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
gdh_ObjidToPointer
(
area_objid
,
(
void
*
)
&
iarea_op
);
if
(
EVEN
(
sts
))
return
sts
;
// Check SigChanCon and put signal in channels SigChanCon
sts
=
gdh_GetClassList
(
pwr_cClass_Io
,
&
sig_objid
);
while
(
ODD
(
sts
))
...
...
@@ -725,6 +789,9 @@ pwr_tStatus io_init_io_signals(
}
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
sig_op
->
ActualValue
,
&
area_op
->
Value
[
sig_count
]);
sig_op
->
ValueIndex
=
sig_count
;
gdh_StoreRtdbPointer
(
(
pwr_tUInt32
*
)
&
iarea_op
->
Value
[
sig_count
],
&
sig_op
->
InitialValue
);
sig_count
++
;
sts
=
gdh_GetNextObject
(
sig_objid
,
&
sig_objid
);
...
...
@@ -1284,6 +1351,7 @@ static pwr_tStatus io_init_card(
cp
->
chanlist
=
(
io_sChannel
*
)
calloc
(
maxchan
,
sizeof
(
io_sChannel
));
cp
->
ChanListSize
=
maxchan
;
cp
->
Class
=
class
;
cp
->
Local
=
NULL
;
cp
->
Objid
=
objid
;
strcpy
(
cp
->
Name
,
cname
);
if
(
CardRead
!=
NULL
)
...
...
@@ -1561,6 +1629,7 @@ static pwr_tStatus io_init_rack(
/* Treat this rack in this process */
rp
=
calloc
(
1
,
sizeof
(
io_sRack
));
rp
->
Local
=
NULL
;
rp
->
Class
=
class
;
rp
->
Objid
=
objid
;
strcpy
(
rp
->
Name
,
rname
);
...
...
@@ -1675,6 +1744,7 @@ static pwr_tStatus io_init_agent(
/* Treat this agent in this process */
ap
=
calloc
(
1
,
sizeof
(
io_sAgent
));
ap
->
Class
=
class
;
ap
->
Local
=
NULL
;
ap
->
Objid
=
objid
;
strcpy
(
ap
->
Name
,
aname
);
ap
->
Process
=
process
;
...
...
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