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
938df603
Commit
938df603
authored
Jan 17, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Class cache compatible with 4.6, and incompatible with 4.8.2 (refs #25)
parent
edfeab38
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
9 deletions
+82
-9
src/lib/rt/src/rt_cmvolc.c
src/lib/rt/src/rt_cmvolc.c
+28
-3
src/lib/rt/src/rt_cmvolsm.c
src/lib/rt/src/rt_cmvolsm.c
+18
-3
src/lib/rt/src/rt_net.x
src/lib/rt/src/rt_net.x
+36
-3
No files found.
src/lib/rt/src/rt_cmvolc.c
View file @
938df603
...
...
@@ -384,6 +384,9 @@ cmvolc_GetNonExistingClass (
net_sGclass
*
gcp
;
pwr_tObjid
poid
;
pwr_tTime
gcp_time
;
pwr_sClassDef
classdef
;
pwr_sObjBodyDef
objbodydef
;
pwr_sParam
attrdef
;
gdb_AssumeLocked
;
...
...
@@ -448,22 +451,44 @@ cmvolc_GetNonExistingClass (
poid
.
vid
=
cvid
;
poid
.
oix
=
1
;
/* ClassHier object is the father */
memset
(
&
classdef
,
0
,
sizeof
(
classdef
));
classdef
.
Editor
=
gcp
->
cb
.
Editor
;
classdef
.
Method
=
gcp
->
cb
.
Method
;
classdef
.
Flags
=
(
pwr_mClassDef
)
gcp
->
cb
.
Flags
;
classdef
.
NumOfObjBodies
=
gcp
->
cb
.
NumOfObjBodies
;
gcp_time
=
net_NetTimeToTime
(
&
gcp
->
time
);
cop
=
createObject
(
sts
,
vp
,
&
gcp
->
co
,
&
gcp_time
,
gcp
->
dbsFlags
,
&
gcp
->
cb
,
sizeof
(
gcp
->
cb
),
poid
);
&
classdef
,
sizeof
(
classdef
),
poid
);
if
(
cop
==
NULL
)
goto
cleanup
;
memset
(
&
objbodydef
,
0
,
sizeof
(
objbodydef
));
strcpy
(
objbodydef
.
StructName
,
gcp
->
bb
.
StructName
);
objbodydef
.
NumOfParams
=
gcp
->
bb
.
NumOfParams
;
objbodydef
.
Size
=
gcp
->
bb
.
Size
;
objbodydef
.
NextAix
=
gcp
->
bb
.
NextAix
;
objbodydef
.
Flags
=
gcp
->
bb
.
Flags
;
bop
=
createObject
(
&
lsts
,
vp
,
&
gcp
->
bo
,
&
gcp_time
,
0
,
&
gcp
->
bb
,
sizeof
(
gcp
->
bb
),
cop
->
g
.
oid
);
&
objbodydef
,
sizeof
(
objbodydef
),
cop
->
g
.
oid
);
if
(
bop
==
NULL
)
errh_Bugcheck
(
lsts
,
"cmvolc_GetNonExistingClass, load sys body failed"
);
for
(
i
=
j
=
0
,
gap
=
msgs
[
0
]
->
attr
;
i
<
gcp
->
acount
;
i
++
,
gap
++
)
{
strcpy
(
attrdef
.
Info
.
PgmName
,
gap
->
ab
.
Info
.
PgmName
);
attrdef
.
Info
.
Type
=
gap
->
ab
.
Info
.
Type
;
attrdef
.
Info
.
Offset
=
gap
->
ab
.
Info
.
Offset
;
attrdef
.
Info
.
Size
=
gap
->
ab
.
Info
.
Size
;
attrdef
.
Info
.
Flags
=
gap
->
ab
.
Info
.
Flags
;
attrdef
.
Info
.
Elements
=
gap
->
ab
.
Info
.
Elements
;
attrdef
.
Info
.
ParamIndex
=
gap
->
ab
.
Info
.
ParamIndex
;
attrdef
.
TypeRef
=
gap
->
ab
.
TypeRef
;
aop
=
createObject
(
&
lsts
,
vp
,
&
gap
->
ao
,
&
gcp_time
,
0
,
&
gap
->
ab
,
sizeof
(
gap
->
ab
),
bop
->
g
.
oid
);
&
attrdef
,
sizeof
(
gap
->
ab
),
bop
->
g
.
oid
);
if
(
aop
==
NULL
)
errh_Bugcheck
(
lsts
,
"cmvolc_GetNonExistingClass, load attribute failed"
);
...
...
src/lib/rt/src/rt_cmvolsm.c
View file @
938df603
...
...
@@ -231,7 +231,11 @@ cmvolsm_GetGclass (
cbp
=
pool_Address
(
&
sts
,
gdbroot
->
rtdb
,
cp
->
cbr
);
if
(
cbp
==
NULL
)
break
;
rmp
->
gclass
.
cb
=
*
cbp
;
rmp
->
gclass
.
cb
.
Editor
=
cbp
->
Editor
;
rmp
->
gclass
.
cb
.
Method
=
cbp
->
Method
;
rmp
->
gclass
.
cb
.
Flags
=
(
pwr_tUInt32
)
cbp
->
Flags
.
m
;
rmp
->
gclass
.
cb
.
NumOfObjBodies
=
cbp
->
NumOfObjBodies
;
rmp
->
gclass
.
cb
.
PopEditor
=
cbp
->
PopEditor
;
bop
=
pool_Address
(
&
sts
,
gdbroot
->
pool
,
cp
->
bor
);
if
(
bop
==
NULL
)
...
...
@@ -241,7 +245,11 @@ cmvolsm_GetGclass (
bbp
=
pool_Address
(
&
sts
,
gdbroot
->
rtdb
,
cp
->
bbr
);
if
(
bbp
==
NULL
)
break
;
rmp
->
gclass
.
bb
=
*
bbp
;
strcpy
(
rmp
->
gclass
.
bb
.
StructName
,
bbp
->
StructName
);
rmp
->
gclass
.
bb
.
NumOfParams
=
bbp
->
NumOfParams
;
rmp
->
gclass
.
bb
.
Size
=
bbp
->
Size
;
rmp
->
gclass
.
bb
.
NextAix
=
bbp
->
NextAix
;
rmp
->
gclass
.
bb
.
Flags
=
bbp
->
Flags
;
}
rmp
->
gclass
.
size
=
cp
->
size
;
...
...
@@ -260,7 +268,14 @@ cmvolsm_GetGclass (
abp
=
pool_Address
(
&
sts
,
gdbroot
->
rtdb
,
ap
->
abr
);
if
(
aop
==
NULL
)
break
;
gap
->
ab
=
*
abp
;
strcpy
(
gap
->
ab
.
Info
.
PgmName
,
abp
->
Info
.
PgmName
);
gap
->
ab
.
Info
.
Type
=
abp
->
Info
.
Type
;
gap
->
ab
.
Info
.
Offset
=
abp
->
Info
.
Offset
;
gap
->
ab
.
Info
.
Size
=
abp
->
Info
.
Size
;
gap
->
ab
.
Info
.
Flags
=
abp
->
Info
.
Flags
;
gap
->
ab
.
Info
.
Elements
=
abp
->
Info
.
Elements
;
gap
->
ab
.
Info
.
ParamIndex
=
abp
->
Info
.
ParamIndex
;
gap
->
ab
.
TypeRef
=
abp
->
TypeRef
;
}
rmp
->
acntmsg
=
acnt
;
...
...
src/lib/rt/src/rt_net.x
View file @
938df603
...
...
@@ -235,6 +235,39 @@ enum net_eState {
net_eState_
};
/* ClassDef backward compatible */
struct net_sClassDef {
pwr_tInt32 Editor;
pwr_tInt32 Method;
pwr_tUInt32 Flags;
pwr_tUInt32 NumOfObjBodies;
pwr_tInt32 PopEditor;
};
/* ObjBodyDef backward compatible */
struct net_sObjBodyDef {
pwr_tStructName StructName;
pwr_tUInt32 NumOfParams;
pwr_tUInt32 Size;
pwr_tUInt32 NextAix;
pwr_tUInt32 Flags;
};
struct net_sParInfo {
pwr_tPgmName PgmName;
pwr_eType Type;
pwr_tUInt32 Offset;
pwr_tUInt32 Size;
pwr_tUInt32 Flags;
pwr_tUInt32 Elements;
pwr_tUInt32 ParamIndex;
};
struct net_sParam {
net_sParInfo Info;
pwr_tTypeId TypeRef;
};
/* Add subscription. */
struct net_sSubSpec {
...
...
@@ -1029,7 +1062,7 @@ struct net_sMount {
struct net_sGattribute {
net_sGobject ao;
pwr
_sParam ab;
net
_sParam ab;
};
...
...
@@ -1037,9 +1070,9 @@ struct net_sGclass {
net_sTime time; /**< Time of last change */
pwr_tBitMask dbsFlags;
net_sGobject co;
pwr
_sClassDef cb;
net
_sClassDef cb;
net_sGobject bo;
pwr
_sObjBodyDef bb;
net
_sObjBodyDef bb;
pwr_tUInt32 size; /**< Size of objects body */
pwr_tUInt32 acount; /**< # of attributes */
};
...
...
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