From 1be85cbb2967d8ec4d383eabcc88950d9160d7cf Mon Sep 17 00:00:00 2001 From: Filip Florczyk Date: Thu, 18 Apr 2024 13:19:59 +0000 Subject: [PATCH] TMCC#453 Fixed timer ads stub generation --- opengeode/AdaGenerator.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/opengeode/AdaGenerator.py b/opengeode/AdaGenerator.py index cb2ca6ef..d74c62bf 100644 --- a/opengeode/AdaGenerator.py +++ b/opengeode/AdaGenerator.py @@ -934,16 +934,20 @@ def case_state(state): ads_template.append( f'procedure RESET_{timer} (Dest_PID : {ASN1SCC}PID := {ASN1SCC}Env) ' f'renames {process.name}_RI.Reset_{timer};') + ri_stub_ads.append(f'procedure SET_{timer} (Val : in out {ASN1SCC}T_UInt32; Dest_PID : {ASN1SCC}PID := {ASN1SCC}Env);') + ri_stub_adb.append(f'procedure SET_{timer} (Val : in out {ASN1SCC}T_UInt32; Dest_PID : {ASN1SCC}PID := {ASN1SCC}Env) is null;') + ri_stub_ads.append(f'procedure RESET_{timer} (Dest_PID : {ASN1SCC}PID := {ASN1SCC}Env);') + ri_stub_adb.append(f'procedure RESET_{timer} (Dest_PID : {ASN1SCC}PID := {ASN1SCC}Env) is null;') else: ads_template.append( f'procedure SET_{timer} (Val : in out {ASN1SCC}T_UInt32) ' f'renames {process.name}_RI.Set_{timer};') ads_template.append( f'procedure RESET_{timer} renames {process.name}_RI.Reset_{timer};') - ri_stub_ads.append(f'procedure SET_{timer} (Val : in out {ASN1SCC}T_UInt32);') - ri_stub_adb.append(f'procedure SET_{timer} (Val : in out {ASN1SCC}T_UInt32) is null;') - ri_stub_ads.append(f'procedure RESET_{timer};') - ri_stub_adb.append(f'procedure RESET_{timer} is null;') + ri_stub_ads.append(f'procedure SET_{timer} (Val : in out {ASN1SCC}T_UInt32);') + ri_stub_adb.append(f'procedure SET_{timer} (Val : in out {ASN1SCC}T_UInt32) is null;') + ri_stub_ads.append(f'procedure RESET_{timer};') + ri_stub_adb.append(f'procedure RESET_{timer} is null;') else: # Generic functions get the SET and RESET from template pass