-
Key: MARTE-19
-
Legacy Issue Number: 11544
-
Status: closed
-
Source: THALES ( Sebastien Demathieu)
-
Summary:
Operators (e.g., +, -, *, /, =, <, >) are not defined for the types in the MARTE_Library::BasicNFP_Types package. Such operators are required if one wants to define expressions such as "(end - start) < (10, ms)" where "end" and "start" are ObsCallExpression, for instance. Ideally, all the operators defined for the MARTE_Library::MARTE_PrimitiveTypes types should also exist for their MARTE_Library::BasicNFP_Types counterpart
-
Reported: MARTE 1.0b1 — Mon, 8 Oct 2007 04:00 GMT
-
Disposition: Resolved — MARTE 1.0b2
-
Disposition Summary:
One aspect that appears here is that the operations for NFP types like
NFP_Real, NFP_String, etc, should be the same as the primitive type
counterparts. So, it seems natural to reuse those operation definitions. One
mechanism to reuse the operations (e.g., +, -, *, /, =, <, >) is to inherit NFP types
from the primitive types.
Hence, this resolution proposes to define the operations of Nfp_Types by
inheriting from the corresponding MARTE primitive types.
In addition, the semantic of such NfpTypes operations (in physical Nfp_Types
such as NFP_Duration, NFP_Temperature, etc.) are different than their primitive
type counterparts (Real primitive types). Indeed, operations in NfpTypes involve
evaluating not only the “value” part but also the measurement “unit” part. This is
left out of the scope of this specification, and an implementation supporting
measurement unit conversion should take care of this. -
Updated: Fri, 6 Mar 2015 20:58 GMT