saeaadl / aadlv2.2

SAE AADL core language, version 2.2
1 stars 0 forks source link

Typos in example on page 145 #22

Closed AaronGreenhouse closed 5 years ago

AaronGreenhouse commented 6 years ago

The example on page 145 has some errors:

  1. The public section of package Navigation needs a with Nav_Types.
  2. The notation for the record terms is wrong:
    1. using parens () instead of brackets [].
    2. using a comma ',' instead of a semicolon ';' to separate the second from the third element.

So it should be

package Navigation
public
    with Nav_Types;

    process Blended_Navigation
    features
        GPS_Data : in data port Nav_Types::GPS;
        INS_Data : in data port Nav_Types::INS;
        Position_ECEF : out data port Nav_Types::Position_ECEF;
        Position_NED : out data port Nav_Types::Position_NED;
    properties
    -- the input rate of GPS is twice that of INS
        Input_Rate => [ Value_Range => 50.0 .. 50.0; Rate_Unit => perSecond; Rate_Distribution => Fixed; ] applies to GPS_Data;
        Input_Rate => [ Value_Range => 100.0 .. 100.0; Rate_Unit => perSecond; Rate_Distribution => Fixed; ] applies to INS_Data;
    end Blended_Navigation;

    process implementation Blended_Navigation.Simple
    subcomponents
        Integrate : thread;
        Navigate : thread;
    end Blended_Navigation.Simple;
end Navigation;