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
2b6d9b8e
Commit
2b6d9b8e
authored
Mar 14, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function gdh_AttrArefToObjectAref added
parent
fb078a81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
2 deletions
+63
-2
src/lib/rt/src/rt_gdh.c
src/lib/rt/src/rt_gdh.c
+56
-1
src/lib/rt/src/rt_gdh.h
src/lib/rt/src/rt_gdh.h
+7
-1
No files found.
src/lib/rt/src/rt_gdh.c
View file @
2b6d9b8e
/*
* Proview $Id: rt_gdh.c,v 1.2
8 2006-09-14 14:16:07
claes Exp $
* Proview $Id: rt_gdh.c,v 1.2
9 2007-03-14 06:42:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -235,6 +235,61 @@ gdh_ArefANameToAref (
return
sts
;
}
/**
* @brief Get the object attrref for an attribute attrref.
*
* @return pwr_tStatus
*/
pwr_tStatus
gdh_AttrArefToObjectAref
(
pwr_sAttrRef
*
arp
,
pwr_sAttrRef
*
oarp
)
{
pwr_tStatus
sts
=
GDH__SUCCESS
;
mvol_sAttribute
Attribute
;
mvol_sAttribute
*
ap
;
char
string
[
512
];
char
*
s
=
NULL
;
char
*
t
;
cdh_sParseName
parseName
;
cdh_sParseName
*
pn
=
NULL
;
if
(
arp
->
Flags
.
b
.
Object
)
return
GDH__NOATTR
;
gdh_ScopeLock
{
memset
(
&
Attribute
,
0
,
sizeof
(
Attribute
));
ap
=
vol_ArefToAttribute
(
&
sts
,
&
Attribute
,
arp
,
gdb_mLo_global
,
vol_mTrans_all
);
if
(
ap
==
NULL
)
break
;
touchObject
(
ap
->
op
);
s
=
vol_AttributeToName
(
&
sts
,
ap
,
cdh_mName_volumeStrict
,
string
);
t
=
strrchr
(
string
,
'.'
);
if
(
!
t
)
{
sts
=
GDH__NOATTR
;
break
;
}
*
t
=
0
;
pn
=
cdh_ParseName
(
&
sts
,
&
parseName
,
pwr_cNOid
,
string
,
0
);
if
(
pn
==
NULL
)
break
;
memset
(
&
Attribute
,
0
,
sizeof
(
Attribute
));
ap
=
vol_NameToAttribute
(
&
sts
,
&
Attribute
,
pn
,
gdb_mLo_global
,
vol_mTrans_all
);
if
(
ap
==
NULL
)
break
;
mvol_AttributeToAref
(
&
sts
,
ap
,
oarp
);
}
gdh_ScopeUnlock
;
return
sts
;
}
/**
* @brief Converts a class & attribute to attrref format.
...
...
src/lib/rt/src/rt_gdh.h
View file @
2b6d9b8e
/*
* Proview $Id: rt_gdh.h,v 1.1
5 2006-09-14 14:16:07
claes Exp $
* Proview $Id: rt_gdh.h,v 1.1
6 2007-03-14 06:42:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -617,6 +617,12 @@ gdh_GetAttributeCharAttrref (
unsigned
int
*
attributeDimension
);
pwr_tStatus
gdh_AttrArefToObjectAref
(
pwr_sAttrRef
*
arp
,
pwr_sAttrRef
*
oarp
);
pwr_tStatus
gdh_ArefANameToAref
(
pwr_sAttrRef
*
arp
,
...
...
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