-
Notifications
You must be signed in to change notification settings - Fork 47
/
Simulated-Read.msc
41 lines (34 loc) · 1.76 KB
/
Simulated-Read.msc
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
msc {
hscale = "2";
CM[label="App"], CBC[label="Mock CBCentralManager"],
BLE[label="Simulated Connection\nand Central"],
CBP[label="Mock CBPeripheralManager"],PM[label="Simulated Device\n(Another App)"];
--- [label = "Read Request", ID="*" ];
CM=>>CBC[label = "connectPeripheral:X options:"];
CBC-xBLE[label = "mockCentralManager: X connectPeripheral: options:"];
PM=>>CBP[label = "addService:Y[Characteristic=Z]"];
...;
... [label = "Time Passes"];
PM=>>CBP[label = "startAdvertising:"];
CBP=>>BLE[label = "mockPeripheralManager: startAdvertising:"];
BLE=>>CBC[label = "fakeConnectPeripheralWithUUID: error:"];
CBC=>CM [label = "centralManager:didConnectPeripheral:X"];
CM=>>CBC[label = "X.discoverServices:[Y]"];
CBC=>>BLE[label = "mockPeripheral:X discoverServices:Y"];
BLE<<=>>CBP[label = "Lookup Service Y"];
BLE=>>CBC[label = "fakeDiscoverServices:Y"];
CBC=>CM [label = "peripheral:X didDiscoverServices: Y"];
CM=>>CBC[label = "X.discoverCharacteristics:Z forService: Y"];
CBC=>>BLE[label = "mockPeripheral:X discoveryCharacteristics:Z forService:Y"];
BLE<<=>>CBP[label = "Lookup Characteristic Z in service Y"];
BLE=>>CBC[label = "fakeDiscoverCharacteristicsZ forService: Y"];
CBC=>CM [label = "peripheral:X didDiscoverCharacteristicsForService: Y\n\n"];
CM=>>CBC[label = "X.readValueForCharacteristic:Z"];
CBC=>>BLE[label = "mockPeripheral:X readValueForCharacteristic:Z"];
BLE=>>CBP[label = "fakeReadRequest:"];
CBP=>PM [label = "peripheralManager:didReceiveReadRequest:"];
PM=>>CBP[label = "respondToRequest:withResult:(Payload)"];
CBP=>>CBC[label = "GAP Update Characteristic Z(Payload)"];
CBC=>CM [label = "peripheral:X didUpdateValueForCharacteristic: Z\n\n"];
CM=>CM [label = "Decode (Payload)"];
}