Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
321 lines (280 sloc) 11.3 KB

Setting environment for using Microsoft Visual Studio 2010 x86 tools.
Matrix Model Compiler - Professional Edition - SID/ANSIC/001 - Version 2.2.1
Architecture Design: Simple Interleaved Design - Version 1.3.2
Programming Templates: ANSI C/C++ - Version 1.2.0
Licenced to: Mike Finn, Dark Matter Systems Ltd
Single User Licence - Number: BB-72-02-87 - Expiry Date: None
Copyright (C) 2017 Dark Matter Systems Ltd. All rights reserved.
Support: support@ultradark.com - Website: www.analysisdesignmatrix.com
Connection established: MATRIX*CORE - Version 2.0.0
Development on FRI-08-DEC-2017 @ 12:41:13
Model Name:
Prof_Petrol_Station
Matrix Model Folder:
M:\Matrix\Models
Generated Source Code:
M:\Matrix\Generated
Auxiliary Scenarios Folder:
M:\Matrix\Scenarios
System:Prof_Petrol_Station
Matrix:Model:Application
Silo:M1:Software_Application
Realm:Analysis_Of_Application
Domain:Petrol_Station_Control
Entity:
Delivery
Pump
Tank
Transaction
Fuel_Grade
Pending_Transaction
Evaded_Transaction
Transaction_Policy
Paid_Transaction
Model Compilation Elapsed Time: 00:00:01
Disconnected from MATRIX*CORE on FRI-08-DEC-2017 @ 12:41:14
MATRIX PASSED
~ProfPetrolStation.0003.0001.Delivery.DataAccess.c
~ProfPetrolStation.0003.0003.Tank.Dispatcher.c
~ProfPetrolStation.0011.0003.Simulator.Stimulate.c
~ProfPetrolStation.0002.0001.Initialisation.c
~ProfPetrolStation.0001.0004.Initialisation.c
~ProfPetrolStation.0001.0005.Scheduler.c
~ProfPetrolStation.0001.0006.LiteralStrings.c
~ProfPetrolStation.0001.0007.Enumerations.c
~ProfPetrolStation.0003.0001.Delivery.Identifiers.c
~ProfPetrolStation.0002.0002.Scheduler.c
~ProfPetrolStation.0002.0003.SchedulerInitialisation.c
~ProfPetrolStation.0002.0004.ProcessIncludes.c
~ProfPetrolStation.0003.0001.Delivery.EventSenders.c
~ProfPetrolStation.0003.0005.FuelGrade.DataAccess.c
~ProfPetrolStation.0003.0002.Pump.StateActions.c
~ProfPetrolStation.0001.0001.Library.c
~ProfPetrolStation.0003.0001.Delivery.ProcessIncludes.c
~ProfPetrolStation.0003.0002.Pump.EventSenders.c
~ProfPetrolStation.0003.0002.Pump.Identifiers.c
~ProfPetrolStation.0003.0003.Tank.DataAccess.c
Generating Code...
Compiling...
~ProfPetrolStation.0003.0002.Pump.Dispatcher.c
~ProfPetrolStation.0003.0002.Pump.DataAccess.c
~ProfPetrolStation.0003.0002.Pump.ProcessIncludes.c
~ProfPetrolStation.0003.0003.Tank.EventSenders.c
~ProfPetrolStation.0003.0003.Tank.Identifiers.c
~ProfPetrolStation.0012.0003.Simulator.Tank.EventAcquireIdentity.c
~ProfPetrolStation.0012.0003.Simulator.Tank.StateDisplay.c
~ProfPetrolStation.0003.0003.Tank.ProcessIncludes.c
~ProfPetrolStation.0003.0003.Tank.StateActions.c
~ProfPetrolStation.0001.0003.MainProgram.c
~ProfPetrolStation.0003.0006.PendingTransaction.Identifiers.c
~ProfPetrolStation.0012.0002.Simulator.Pump.EventDisplay.c
~ProfPetrolStation.0003.0001.Delivery.StateActions.c
~ProfPetrolStation.0012.0001.Simulator.Delivery.StateDisplay.c
~ProfPetrolStation.0012.0003.Simulator.Tank.EventDisplay.c
~ProfPetrolStation.0012.0004.Simulator.Transaction.EventDisplay.c
~ProfPetrolStation.0001.0002.ErrorHandler.c
~ProfPetrolStation.0012.0002.Simulator.Pump.StateDisplay.c
~ProfPetrolStation.0012.0004.Simulator.Transaction.StateDisplay.c
~ProfPetrolStation.0003.0007.EvadedTransaction.DataAccess.c
Generating Code...
Compiling...
~ProfPetrolStation.0003.0006.PendingTransaction.DataAccess.c
~ProfPetrolStation.0003.0008.TransactionPolicy.DataAccess.c
~ProfPetrolStation.0011.0001.Simulator.Configuration.c
~ProfPetrolStation.0003.0001.Delivery.Dispatcher.c
~ProfPetrolStation.0003.0004.Transaction.EventSenders.c
~ProfPetrolStation.0011.0002.Simulator.LiteralStrings.c
~ProfPetrolStation.0012.0001.Simulator.Delivery.EntityDisplay.c
~ProfPetrolStation.0012.0001.Simulator.Delivery.EventAcquireIdentity.c
~ProfPetrolStation.0003.0004.Transaction.DataAccess.c
~ProfPetrolStation.0003.0004.Transaction.Identifiers.c
~ProfPetrolStation.0003.0009.PaidTransaction.DataAccess.c
~ProfPetrolStation.0012.0002.Simulator.Pump.EntityDisplay.c
~ProfPetrolStation.0012.0002.Simulator.Pump.EventAcquireIdentity.c
~ProfPetrolStation.0003.0004.Transaction.StateActions.c
~ProfPetrolStation.0012.0002.Simulator.Pump.EventAcquireIdentifier.c
~ProfPetrolStation.0012.0003.Simulator.Tank.EntityDisplay.c
~ProfPetrolStation.0003.0004.Transaction.Dispatcher.c
~ProfPetrolStation.0012.0003.Simulator.Tank.EventAcquireIdentifier.c
~ProfPetrolStation.0012.0001.Simulator.Delivery.EventDisplay.c
~ProfPetrolStation.0003.0004.Transaction.ProcessIncludes.c
Generating Code...
Compiling...
~ProfPetrolStation.0012.0006.Simulator.PendingTransaction.EntityDisplay.c
~ProfPetrolStation.0003.0005.FuelGrade.Identifiers.c
~ProfPetrolStation.0012.0001.Simulator.Delivery.EventAcquireIdentifier.c
~ProfPetrolStation.0012.0004.Simulator.Transaction.EntityDisplay.c
~ProfPetrolStation.0003.0007.EvadedTransaction.Identifiers.c
~ProfPetrolStation.0003.0008.TransactionPolicy.Identifiers.c
~ProfPetrolStation.0003.0009.PaidTransaction.Identifiers.c
~ProfPetrolStation.0012.0007.Simulator.EvadedTransaction.EntityDisplay.c
~ProfPetrolStation.0012.0008.Simulator.TransactionPolicy.EntityDisplay.c
~ProfPetrolStation.0012.0009.Simulator.PaidTransaction.EntityDisplay.c
~ProfPetrolStation.0012.0004.Simulator.Transaction.EventAcquireIdentity.c
~ProfPetrolStation.0012.0004.Simulator.Transaction.EventAcquireIdentifier.c
~ProfPetrolStation.0012.0005.Simulator.FuelGrade.EntityDisplay.c
Generating Code...
COMPILE PASSED
Matrix Model Simulator - Learning Edition - Version 2.0.0
Development on FRI-08-DEC-2017 @ 12:41:19
Copyright (C) 2017 Dark Matter Systems Ltd. All rights reserved.
Connection established: MATRIX*CORE - Version 2.0.0
$
$ | Prof Petrol Station Scenario
$
$ trace all off
$ trace display on
$ trace events on
$ trace states on
$
$ initialise all
$
$ display all
$
$ | //! CUSTOMER Removes Gun From Pump 2
$ | private service PSC::CUSTOMER_Removes_Gun_From_Pump_2_1 () is
$ | pump_instance : instance of PUMP;
$ |
$ | begin
$ |
$ | //# Customer removes gun from pump 2's holster
$ |
$ | pump_instance := find_one PUMP (Pump_Number = 2);
$ | generate PUMP.Gun_Removed() to pump_instance;
$ | end service;
$
$ create event identifier Petrol_Station_Control Pump Gun_removed Pump_Identifier 2
ATTENDANT~>Request_Pump_Enable
$
$ | //! ATTENDENT Enables Pump 2
$ | private service PSC::ATTENDENT_Enables_Pump_2_2 () is
$ |
$ | begin
$ | //# Attendent enables Pump number 2
$ |
$ | generate DELIVERY.Create_Delivery(2);
$ | end service;
$
$ create event creation Petrol_Station_Control Delivery Create_delivery 2 20 34 20
MOTOR~>Start_Motor
$
$ | //! CUSTOMER Presses Trigger At Pump 2
$ | private service PSC::CUSTOMER_Presses_Trigger_At_Pump_2_3 () is
$ | pump_instance : instance of PUMP;
$ |
$ | begin
$ | //# Customer presses Gun trigger on pump 2
$ |
$ | pump_instance := find_one PUMP (Pump_Number = 2);
$ | generate PUMP.Trigger_Depressed() to pump_instance;
$ | end service;
$
$ create event identifier Petrol_Station_Control Pump Trigger_depressed Pump_Identifier 2
CLUTCH~>Engage_Clutch
$
$ | //! METER Delivers Fuel Unit For Pump 2
$ | private service PSC::METER_Delivers_Fuel_Unit_For_Pump_2_4 () is
$ | delivery_instance : instance of DELIVERY;
$ |
$ | begin
$ | //# The delivery needs to be informed about each metered fuel delivery
$ |
$ | delivery_instance := find_one DELIVERY (Pump_Number = 2);
$ | generate DELIVERY.Fuel_Unit_Delivered() to delivery_instance;
$ | end service;
$
$ create event identifier Petrol_Station_Control Delivery Fuel_unit_delivered Delivery_Identifier 2
$
$ | //! CUSTOMER Releases Trigger At Pump 2
$ | private service PSC::CUSTOMER_Releases_Trigger_At_Pump_2_5 () is
$ | pump_instance : instance of PUMP;
$ |
$ | begin
$ | //# Customer releases Gun trigger on pump 2
$ |
$ | pump_instance := find_one PUMP (Pump_Number = 2);
$ | generate PUMP.Trigger_Released() to pump_instance;
$ | end service;
$
$ create event identifier Petrol_Station_Control Pump Trigger_released Pump_Identifier 2
CLUTCH~>Disengage_Clutch
$
$ | //! CUSTOMER Replaces Gun At Pump 2
$ | private service PSC::CUSTOMER_Replaces_Gun_At_Pump_2_6 () is
$ | pump_instance : instance of PUMP;
$ |
$ | begin
$ | //# Customer replaces gun in pump 2's holster
$ |
$ | pump_instance := find_one PUMP (Pump_Number = 2);
$ | generate PUMP.Gun_Replaced() to pump_instance;
$ | end service;
$
$ create event identifier Petrol_Station_Control Pump Gun_replaced Pump_Identifier 2
MOTOR~>Stop_Motor
$
$ | //! CUSTOMER Absconds From Pump 2
$ | private service PSC::CUSTOMER_Absconds_From_Pump_2_8 () is
$ | pump_instance : instance of PUMP;
$ | current_pending_transaction : instance of PENDING_TRANSACTION;
$ | current_transaction : instance of TRANSACTION;
$ |
$ | begin
$ | //# Customer absconds from Pump 2 without paying
$ |
$ | pump_instance := find_one PUMP (Pump_Number = 2);
$ |
$ | current_pending_transaction := pump_instance->R9;
$ |
$ | if current_pending_transaction /= null then
$ | current_transaction := current_pending_transaction->R4;
$ | generate TRANSACTION.Customer_Absconds("Details") to current_transaction;
$ | end if;
$ | end service;
$
$ create event identifier Petrol_Station_Control Transaction Customer_absconds Transaction_Identifier 1 "Details"
$
$ | //! CUSTOMER Pays For Fuel For Pump 2
$ | private service PSC::CUSTOMER_Pays_For_Fuel_For_Pump_2_7 () is
$ | pump_instance : instance of PUMP;
$ | current_pending_transaction : instance of PENDING_TRANSACTION;
$ | current_transaction : instance of TRANSACTION;
$ |
$ | begin
$ | //# Customer pays for fuel for Pump 2
$ |
$ | pump_instance := find_one PUMP (Pump_Number = 2);
$ |
$ | current_pending_transaction := pump_instance->R9;
$ |
$ | if current_pending_transaction /= null then
$ | current_transaction := current_pending_transaction->R4;
$ | generate TRANSACTION.Payment_Received() to current_transaction;
$ | end if;
$ | end service;
$
$ create event identifier Petrol_Station_Control Transaction Payment_received Transaction_Identifier 1
$
$ | //! TANKER Delivery For Tank 1002
$ | private service PSC::TANKER_Delivery_For_Tank_1002_9 () is
$ | tank_instance : instance of TANK;
$ |
$ | begin
$ | //# Tanker driver fills tank 1002 with 10000
$ |
$ | tank_instance := find_one TANK (Tank_Number = 1002);
$ | generate TANK.Tanker_Delivery(10000.00) to tank_instance;
$ | end service;
$
$ create event identifier Petrol_Station_Control Tank Tanker_delivery Tank_Identifier 1002 10000.00
$
$ display all
$
$ host pause
$
$ exit
Model Simulation Elapsed Time: 00:00:00
Disconnected from MATRIX*CORE on FRI-08-DEC-2017 @ 12:41:19
TEST PASSED
Tool completed successfully