CashDeskSystem.secarc 699 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package secarc.cds;

// import message types
import secarc.cds.msg.*;
import java.awt.Image;

// import components
import secarc.cds.fe.CashDesk;
import secarc.cds.be.Bank;

component CashDeskSystem {

	autoconnect port;
	autoinstantiate on;

	port 
		in Event newSale,
		in Image barcode,
		in Event endSale,
		out ProductData;
		
	port 
		in Event cardPay,
		in CardData,
		in Integer pin,
		out Boolean validation;
		
	component Store {

		port
			in String identifier,
Paff's avatar
Paff committed
32
			out ProductData;
33
34
35
36

	}
	
	component CashDesk cashDesk
Paff's avatar
Paff committed
37
		[bdOut -> bank.bankData];
38
39
40
41
42
43
44
45
46
47
	
	component Bank;
	
	connect bank.paymentAck -> cashDesk.paIn;

	connect cashDesk -> store;
	
	connect cashDesk.productData -> productData;

}