Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CCS
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marko Mecina
CCS
Commits
d687c114
Commit
d687c114
authored
Oct 4, 2021
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
changed get_tm_id
added get_data_pool_items
parent
d287c0ea
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Ccs/ccs_function_lib.py
+25
-4
25 additions, 4 deletions
Ccs/ccs_function_lib.py
with
25 additions
and
4 deletions
Ccs/ccs_function_lib.py
+
25
−
4
View file @
d687c114
...
@@ -2688,10 +2688,11 @@ def get_tc_calibration_and_parameters(ccf_descr=None):
...
@@ -2688,10 +2688,11 @@ def get_tc_calibration_and_parameters(ccf_descr=None):
return
calibrations_dict
return
calibrations_dict
def
get_tm_id
(
c
cf_descr
=
None
):
def
get_tm_id
(
p
cf_descr
=
None
):
if
c
cf_descr
is
None
:
if
p
cf_descr
is
None
:
tms
=
scoped_session_idb
.
execute
(
'
SELECT pid_type, pid_stype, pid_apid, pid_pi1_val, pid_descr, pid_tpsd,
'
tms
=
scoped_session_idb
.
execute
(
'
SELECT pid_type, pid_stype, pid_apid, pid_pi1_val, pid_descr, pid_tpsd,
'
'
pid_spid, pcf_name, pcf_descr, pcf_curtx, txp_from, txp_altxt, plf_offby
'
'
pid_spid, pcf_name, pcf_descr, pcf_curtx, txp_from, txp_altxt, plf_offby,
'
'
pcf_ptc, pcf_pfc
'
'
FROM pid
'
'
FROM pid
'
'
LEFT JOIN plf
'
'
LEFT JOIN plf
'
'
ON pid_spid = plf_spid AND pid_tpsd = -1
'
'
ON pid_spid = plf_spid AND pid_tpsd = -1
'
...
@@ -2706,7 +2707,8 @@ def get_tm_id(ccf_descr=None):
...
@@ -2706,7 +2707,8 @@ def get_tm_id(ccf_descr=None):
else
:
else
:
tms
=
scoped_session_idb
.
execute
(
'
SELECT pid_type, pid_stype, pid_apid, pid_pi1_val, pid_descr , pid_tpsd,
'
tms
=
scoped_session_idb
.
execute
(
'
SELECT pid_type, pid_stype, pid_apid, pid_pi1_val, pid_descr , pid_tpsd,
'
'
pid_spid, pcf_name, pcf_descr, pcf_curtx, txp_from, txp_altxt, plf_offby
'
'
pid_spid, pcf_name, pcf_descr, pcf_curtx, txp_from, txp_altxt, plf_offby,
'
'
pcf_ptc, pcf_pfc
'
'
FROM pid
'
'
FROM pid
'
'
LEFT JOIN plf
'
'
LEFT JOIN plf
'
'
ON pid_spid = plf_spid AND pid_tpsd = -1
'
'
ON pid_spid = plf_spid AND pid_tpsd = -1
'
...
@@ -2730,6 +2732,25 @@ def get_tm_id(ccf_descr=None):
...
@@ -2730,6 +2732,25 @@ def get_tm_id(ccf_descr=None):
return
tms_dict
return
tms_dict
def
get_data_pool_items
(
pcf_descr
=
None
):
if
pcf_descr
is
None
:
data_pool
=
scoped_session_idb
.
execute
(
'
SELECT pcf_pid, pcf_descr, pcf_ptc, pcf_pfc
'
'
FROM pcf
'
).
fetchall
()
else
:
data_pool
=
scoped_session_idb
.
execute
(
'
SELECT pcf_pid, pcf_descr, pcf_ptc, pcf_pfc
'
'
FROM pcf
'
.
format
(
ccf_descr
)).
fetchall
()
scoped_session_idb
.
close
()
data_pool_dict
=
{}
for
row
in
data_pool
:
data_pool_dict
.
setdefault
(
row
[
0
:
4
],
[]).
append
(
row
[
5
:])
return
data_pool_dict
def
make_tc_template
(
ccf_descr
,
pool_name
=
'
LIVE
'
,
preamble
=
'
cfl.Tcsend_DB
'
,
options
=
''
,
comment
=
True
,
add_parcfg
=
False
):
def
make_tc_template
(
ccf_descr
,
pool_name
=
'
LIVE
'
,
preamble
=
'
cfl.Tcsend_DB
'
,
options
=
''
,
comment
=
True
,
add_parcfg
=
False
):
...
...
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