CashDeskSystem.secarc 948 Bytes
Newer Older
Paff's avatar
Paff committed
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package secarc.seccds;

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

// import components
import secarc.seccds.fe.CashDesk;
import secarc.seccds.be.Bank;
import secarc.seccds.fe.Store;

component CashDeskSystem {

	trustlevel -1;

	autoconnect encrypted port;
	autoinstantiate on;
	accesscontrol on;

	port 
		in Event newSale,
		in Image barcode,
		in String identifier,
		in Event endSale,
		out ProductData;
		
	port 
		in Event cardPay,
		in CardData,
		in Integer pin,
		out Boolean validation;
		
	port
		out Bill;
	
	component CashDesk cashDesk
		[encrypted bdOut -> bank.bankData; 
		saleInformation -> store.saleInformation];
	
	
	component Bank;
	
	component Store;
	
	connect encrypted bank.paymentAck -> cashDesk.paIn;

	connect cashDesk -> store;
	
	connect cashDesk.outProductData -> productData;
	
	connect store.productData -> cashDesk.inProductData;
	
	connect identifier -> cashDesk.inIdentifier;

}