Repository: pcdshub/pytmc

Issue:
pytmc link settings should be "CP" instead of "CPP"
Code:
https://github.com/pcdshub/pytmc/blob/bd2529195298e5b1dbfd96772a7702b2199f4f4b/pytmc/record.py#L496

Otherwise, we will be stuck at the 2Hz updates in the record:

> If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record’s SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.

Comments:

Patch:
diff --git a/pytmc/record.py b/pytmc/record.py
index 5451552..0f04c67 100644
--- a/pytmc/record.py
+++ b/pytmc/record.py
@@ -214,7 +214,7 @@ class RecordPackage:
         return config
 
     def _configure_link(self):
-        'Link this record to a pre-existing EPICS record via a CA (CPP) link'
+        'Link this record to a pre-existing EPICS record via a CA (CP) link'
         self.linked_to_pv = self.config.get('link') or None
 
     def _configure_pvname(self):
@@ -493,7 +493,7 @@ class TwincatTypeRecordPackage(RecordPackage):
         linked_to_pv = linked_to_pv.replace(self.macro_character, '$')
         return {
             'OMSL': 'closed_loop',
-            'DOL': linked_to_pv + ' CPP MS',
+            'DOL': linked_to_pv + ' CP MS',
             'SCAN': self.config.get('link_scan', '.5 second'),
         }
 


Test patch:
diff --git a/pytmc/tests/test_xml_collector.py b/pytmc/tests/test_xml_collector.py
index c709c10..1051146 100644
--- a/pytmc/tests/test_xml_collector.py
+++ b/pytmc/tests/test_xml_collector.py
@@ -517,7 +517,7 @@ def test_pv_linking():
     assert isinstance(pkg, IntegerRecordPackage)
     rec = pkg.generate_output_record()
     assert rec.fields['OMSL'] == 'closed_loop'
-    assert rec.fields['DOL'] == 'OTHER:RECORD CPP MS'
+    assert rec.fields['DOL'] == 'OTHER:RECORD CP MS'
     assert rec.fields['SCAN'] == '.5 second'
 
 
@@ -539,7 +539,7 @@ def test_pv_linking_string():
     assert lso_rec.pvname == lso_pvname
     assert lso_rec.record_type == "lso"
     assert lso_rec.fields["OMSL"] == "closed_loop"
-    assert lso_rec.fields["DOL"] == "OTHER:RECORD.VAL$ CPP MS"
+    assert lso_rec.fields["DOL"] == "OTHER:RECORD.VAL$ CP MS"
     assert lso_rec.fields["SCAN"] == ".5 second"
     assert lso_rec.fields["SIZV"] == 70
 
@@ -571,10 +571,10 @@ def test_pv_linking_struct():
 
     pkg1, pkg2 = list(pragmas.record_packages_from_symbol(struct))
     rec = pkg1.generate_output_record()
-    assert rec.fields['DOL'] == 'PREFIX:ABCD.STAT CPP MS'
+    assert rec.fields['DOL'] == 'PREFIX:ABCD.STAT CP MS'
 
     rec = pkg2.generate_output_record()
-    assert rec.fields['DOL'] == 'LINK:OTHER_PV CPP MS'
+    assert rec.fields['DOL'] == 'LINK:OTHER_PV CP MS'
 
 
 def test_pv_linking_special():
@@ -594,7 +594,7 @@ def test_pv_linking_special():
 
     pkg, = list(pragmas.record_packages_from_symbol(struct))
     rec = pkg.generate_output_record()
-    assert rec.fields['DOL'] == 'PREFIX:ABCD.STAT CPP MS'
+    assert rec.fields['DOL'] == 'PREFIX:ABCD.STAT CP MS'
 
 
 @pytest.mark.parametrize(