pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

ENH: PV linking via DOL/OMSL + CPP input link #167

Closed klauer closed 4 years ago

klauer commented 4 years ago

Closes #166

I think this could pair with an lcls-twincat-general set of structures, as indicated in the issue.

cc @ghalym

codecov-io commented 4 years ago

Codecov Report

Merging #167 into master will increase coverage by 0.26%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #167      +/-   ##
==========================================
+ Coverage   79.57%   79.83%   +0.26%     
==========================================
  Files          18       18              
  Lines        2208     2237      +29     
==========================================
+ Hits         1757     1786      +29     
  Misses        451      451
Impacted Files Coverage Δ
pytmc/pragmas.py 96.42% <100%> (+0.09%) :arrow_up:
pytmc/bin/pragmalint.py 84.93% <100%> (+0.56%) :arrow_up:
pytmc/record.py 94.62% <100%> (+0.37%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a383194...03f1412. Read the comment docs.

klauer commented 4 years ago

Also need to add some FBs to lcls-twincat-general that support this easily

klauer commented 4 years ago

Most recent commit allows for chaining of link: ... pragmas, such that the following is possible:

    {attribute 'pytmc' := '
        pv: TEST
        link: PV_TO_LINK_TO
    '}
    fbTest : FB_LREALFromEPICS;
FUNCTION_BLOCK FB_LREALFromEPICS
VAR
    {attribute 'pytmc' := '
        pv: FromEPICS
        link:
    '}
    fFromEPICS : LREAL;

    {attribute 'pytmc' := '
        pv: FromEPICS:Sevr
        link: .SEVR
    '}
    iSeverityFromEPICS : INT;