From 01589fdf22fcab942904ab5b75b200be523d393c Mon Sep 17 00:00:00 2001 From: Ivan Perez Date: Thu, 14 Mar 2024 08:29:58 +0000 Subject: [PATCH 1/2] ogma-core: Use same handler name in FPrime/ROS and Copilot. Refs #130. The Copilot, FPrime and ROS backends do not use the same name for the handler names. In one case, an extra "prop" is added to the name, which makes the resulting Copilot code not directly usable from FPrime / ROS without edits. This commit modifies the FPrime and ROS backends so that the handler names do not contain the additional "prop", making them match the Copilot backend. --- ogma-core/src/Command/FPrimeApp.hs | 2 +- ogma-core/src/Command/ROSApp.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ogma-core/src/Command/FPrimeApp.hs b/ogma-core/src/Command/FPrimeApp.hs index 225c91d..6020a5f 100644 --- a/ogma-core/src/Command/FPrimeApp.hs +++ b/ogma-core/src/Command/FPrimeApp.hs @@ -246,7 +246,7 @@ fretCSExtractHandlers (Just cs) = map handlerNameF $ map requirementName $ requirements cs where - handlerNameF = ("handlerprop" ++) . sanitizeUCIdentifier + handlerNameF = ("handler" ++) . sanitizeUCIdentifier -- | Return the variable information needed to generate declarations -- and subscriptions for a given variable name and variable database. diff --git a/ogma-core/src/Command/ROSApp.hs b/ogma-core/src/Command/ROSApp.hs index 072ed13..d53dc0b 100644 --- a/ogma-core/src/Command/ROSApp.hs +++ b/ogma-core/src/Command/ROSApp.hs @@ -250,7 +250,7 @@ fretCSExtractHandlers (Just cs) = map handlerNameF $ map requirementName $ requirements cs where - handlerNameF = ("handlerprop" ++) . sanitizeUCIdentifier + handlerNameF = ("handler" ++) . sanitizeUCIdentifier -- | Return the variable information needed to generate declarations -- and subscriptions for a given variable name and variable database. From 8082ff83059dec71ac1073dcc5ef3c7ab77ee198 Mon Sep 17 00:00:00 2001 From: Ivan Perez Date: Thu, 14 Mar 2024 09:14:50 +0000 Subject: [PATCH 2/2] ogma-core: Document changes in CHANGELOG. Refs #130. --- ogma-core/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ogma-core/CHANGELOG.md b/ogma-core/CHANGELOG.md index 931990b..8975f46 100644 --- a/ogma-core/CHANGELOG.md +++ b/ogma-core/CHANGELOG.md @@ -1,11 +1,12 @@ # Revision history for ogma-core -## [1.X.Y] - 2024-03-13 +## [1.X.Y] - 2024-03-14 * Fix missing stream name substitution (#120). * Use generalized JSON parser for DB Spec (#122). * Fix translation of equivalence boolean operator from SMV (#126). * Sanitize handler names (#127). +* Use same handler name in FPrime/ROS and Copilot (#130). ## [1.2.0] - 2024-01-21