// Independent worked listings. Load this chapter with vocabulary.sysml, not with other chapters.

package Lappendixh_01 {
    private import CoffeeVocabulary::*;
// ANCHOR: listing-1
    part grinder : CoffeeMachineDomain::Definitions::Grinder;
// ANCHOR_END: listing-1
}

package Lappendixh_02 {
    private import CoffeeVocabulary::*;
// ANCHOR: listing-2
    requirement def <'REQ-TEMP-01'> 'Extraction Temperature' {
        doc /* Water temperature shall remain within operating range. */
    }
// ANCHOR_END: listing-2
}

package Lappendixh_03 {
    private import CoffeeVocabulary::*;
    private import ScalarValues::Boolean;
    private import ScalarValues::Real;
    private import ScalarValues::String;

    part def Station {
// ANCHOR: listing-3
        attribute grindSize   : Real    = 0.4;
        attribute enabled     : Boolean = true;
        attribute label       : String  = "Main Grinder";
// ANCHOR_END: listing-3
    }
}

package Lappendixh_04 {
    private import CoffeeVocabulary::*;
    private import ScalarValues::Real;
// ANCHOR: listing-4
    part def Brewer {
        doc /* Heats and pressurizes water for extraction. */

        // A note to whoever is editing this file next.
        attribute waterTemp : Real = 93.0;
    }
// ANCHOR_END: listing-4
}

package Lappendixh_05 {
    private import CoffeeVocabulary::*;
// ANCHOR: listing-5
    part def Brewer {
        doc locale "en-GB" /* Heats and pressurises water for extraction. */
    }
// ANCHOR_END: listing-5
}
