Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCDDS-core
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
SCDDS
SCDDS-core
Commits
8f324490
Commit
8f324490
authored
3 years ago
by
Antoine Merle
Committed by
Cristian Galperti
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
First fully working version
parent
7ae0a712
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mds/tdi/dicts/make_dict.fun
+22
-9
22 additions, 9 deletions
mds/tdi/dicts/make_dict.fun
mds/tdi/dicts/rtc_get.fun
+12
-7
12 additions, 7 deletions
mds/tdi/dicts/rtc_get.fun
with
34 additions
and
16 deletions
mds/tdi/dicts/make_dict.fun
+
22
−
9
View file @
8f324490
...
...
@@ -5,17 +5,30 @@ FUN PUBLIC make_dict(_type, optional _inode, optional _ithread)
_thread
=
present
(_
ithread
)
?
iii
(_
ithread
,
2
)
:
"%%"
;
_
node
=
present
(_
inode
)
?
iii
(_
inode
,
2
)
:
"%%"
;
_
nodestr
=
(
$SHOT>
65700
)
?
"
\\
top.
node"
:
"
\\
top.
tcvrt"
;
_
nodestr
=
(
$SHOT>
65700
||
$SHOT==-
1
)
?
"
node"
:
"tcvrt"
;
_
base
=
_
nodestr//
_
node//
".thread"
//
_
thread//
"."
//
_
type
//
"
s:
"
//_type//
"
_%%%
";
_
base
=
"
\\
rtc::top."
//
_
nodestr//
_
node//
".thread"
//
_
thread//
"."
//
_
type
//
"
s:
"
//_type//
"
_%%%
";
write
(*
,"[make_dict] base="//_base);
_nids = TreeFindNodeWild(_base);
_path = getnci(_nids,"PATH");
if (size(_path)>0)
{
_len = getnci(_path//":raw","LENGTH");
_path = pack(_path,_len>0);
}
_len
=
getnci
(_
base//
":raw"
,
"LENGTH"
);
_
path
=
getnci
(_
base
,
"PATH"
);
if (size(_path)>0)
{
_name = getnci(_path//":name","record");
_order = sort(_name) : *;
_
path
=
pack
(_
path
,_
len>
0
);
_
name
=
getnci
(_
path//
":name"
,
"record"
);
_
order
=
sort
(_
name
);
return
(
MAKE_SIGNAL
(_
path
[_
order
],
*
,_
name
[_
order
]));
_dict = MAKE_SIGNAL(_path[_order],*,_name[_order]);
}
else
{
_dict = MAKE_SIGNAL([],*,[]);
}
return(_dict);
}
This diff is collapsed.
Click to expand it.
mds/tdi/dicts/rtc_get.fun
+
12
−
7
View file @
8f324490
FUN
PUBLIC
rtc_get
(_
type
,
_name
,
optional
_inode
,
optional
_ithread
,
optional
_dict
)
{
if
(
!present
(_
dict
))
_has_inode
=
present
(_
inode
)
&&
KIND
(_
inode
)
>
0
;
_
has_ithread
=
present
(_
ithread
)
&&
KIND
(_
ithread
)
>
0
;
_
has_dict
=
present
(_
dict
)
&&
KIND
(_
dict
)
>
0
;
if
(
!
_
has_dict
)
{
_
thread
=
present
(_
ithread
)
?
iii
(_
ithread
,
2
)
:
"%%"
;
_
node
=
present
(_
inode
)
?
iii
(_
inode
,
2
)
:
"%%"
;
_
nodestr
=
(
$SHOT>
65700
||
$SHOT==-
1
)
?
"node"
:
"tcvrt"
;
_
thread
=
_
has_ithread
?
".thread"
//iii
(_
ithread
,
2
)
:
""
;
_
node
=
_
has_inode
?
_
nodestr
//iii
(_
inode
,
2
)
:
""
;
_
nodestr
=
(
$SHOT>
65700
)
?
"
\\
top.node"
:
"
\\
top.tcvrt"
;
_
base
=
_
nodestr//
_
node//
".thread"
//
_
thread//
":dict_"
//
_
type
//
"
s
";
_
base
=
"
\\
rtc::top."
//
_
node//
_
thread//
":dict_"
//
_
type
//
"
s
";
/*write
(*
,"[rtc_get] type="//_type//" base="//_base);*/
_dict = build_path(_base);
}
_
mem
=
_
dict
[_
name
];
_mem =
size(_dict)>0 ?
_dict[_name]
: abort()
;
if (dim_of(_mem) != _name) { abort();}
return(BUILD_PATH(data(_mem)));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment