[docs] added docs folder
moved uml diagram to docs folder changed readme communcation model to a result image view
This commit is contained in:
parent
1ab01134c5
commit
b28c1b8e7f
75
README.md
75
README.md
@ -11,77 +11,6 @@ Communication JSON RPC protocol and implementation with Unity Scene.
|
|||||||
|
|
||||||
See [API.md](API.md) for detailed request/response formats.
|
See [API.md](API.md) for detailed request/response formats.
|
||||||
|
|
||||||
## Comm model
|
|
||||||
|
|
||||||
```plantuml
|
|
||||||
@startuml
|
|
||||||
box ClientProcess #LightBlue
|
|
||||||
Participant Caller
|
|
||||||
Participant CloudPointClient
|
|
||||||
Participant TCPClient
|
|
||||||
end box
|
|
||||||
box UnityProcess #LightGreen
|
|
||||||
Participant TCPServer
|
|
||||||
Participant CloudPointServer
|
|
||||||
Participant UnityWorld
|
|
||||||
end box
|
|
||||||
UnityWorld -> CloudPointServer : init thread
|
|
||||||
activate CloudPointServer
|
|
||||||
CloudPointServer -> TCPServer : await for connection
|
|
||||||
activate TCPServer
|
|
||||||
->CloudPointClient : init thread
|
|
||||||
activate CloudPointClient
|
|
||||||
CloudPointClient -> TCPClient : createConnection
|
|
||||||
TCPClient -> TCPServer : establish connection
|
|
||||||
TCPServer -> CloudPointServer : established
|
|
||||||
deactivate TCPServer
|
|
||||||
CloudPointServer -> TCPServer : await for calls
|
|
||||||
|
|
||||||
TCPServer -> TCPServer : await for packet
|
|
||||||
Caller -> CloudPointClient : I want something
|
|
||||||
activate CloudPointClient
|
|
||||||
CloudPointClient -> CloudPointClient : CallMethod<Something>
|
|
||||||
CloudPointClient -> TCPClient : send(message)
|
|
||||||
activate TCPClient
|
|
||||||
TCPClient -> TCPServer : packet send
|
|
||||||
TCPServer -> TCPServer : await for packet
|
|
||||||
activate TCPServer
|
|
||||||
TCPServer -> TCPServer : read packet
|
|
||||||
TCPServer -> TCPClient : packet read
|
|
||||||
TCPClient -> CloudPointClient : done
|
|
||||||
deactivate TCPClient
|
|
||||||
CloudPointClient -> TCPClient : await for response
|
|
||||||
activate TCPClient
|
|
||||||
TCPClient -> TCPClient : await for packet
|
|
||||||
TCPServer -> CloudPointServer : callMethod
|
|
||||||
activate CloudPointServer
|
|
||||||
CloudPointServer -> UnityWorld : addToStaticQueue
|
|
||||||
|
|
||||||
UnityWorld -> UnityWorld : read from queue
|
|
||||||
activate UnityWorld
|
|
||||||
UnityWorld -> UnityWorld : callMethod
|
|
||||||
UnityWorld -> CloudPointServer: set task return value
|
|
||||||
deactivate UnityWorld
|
|
||||||
CloudPointServer -> TCPServer : return task
|
|
||||||
deactivate CloudPointServer
|
|
||||||
TCPServer -> TCPClient : send response
|
|
||||||
TCPClient -> TCPServer : response read
|
|
||||||
TCPClient -> CloudPointClient : response received
|
|
||||||
TCPServer -> CloudPointServer : done
|
|
||||||
deactivate TCPServer
|
|
||||||
CloudPointClient -> Caller : here what you wanted
|
|
||||||
deactivate CloudPointClient
|
|
||||||
|
|
||||||
Caller -> CloudPointClient : destruct
|
|
||||||
CloudPointClient -> TCPClient : finish waiting
|
|
||||||
deactivate TCPClient
|
|
||||||
deactivate CloudPointClient
|
|
||||||
UnityWorld -> CloudPointServer : destruct
|
|
||||||
deactivate CloudPointServer
|
|
||||||
|
|
||||||
@enduml
|
|
||||||
```
|
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
The project uses **Meson** build system and **C++20**.
|
The project uses **Meson** build system and **C++20**.
|
||||||
@ -150,3 +79,7 @@ You also can mount your own `config.yaml` to override the default settings:
|
|||||||
```bash
|
```bash
|
||||||
docker run --network=host -it -v $(pwd)/my_config.yaml:/app/config.yaml cloud-point-rpc
|
docker run --network=host -it -v $(pwd)/my_config.yaml:/app/config.yaml cloud-point-rpc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Communication model
|
||||||
|
|
||||||
|

|
||||||
|
|||||||
BIN
docs/cm.png
Normal file
BIN
docs/cm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
66
docs/communication_model.pu
Normal file
66
docs/communication_model.pu
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
@startuml comm
|
||||||
|
box ClientProcess #LightBlue
|
||||||
|
Participant Caller
|
||||||
|
Participant CloudPointClient
|
||||||
|
Participant TCPClient
|
||||||
|
end box
|
||||||
|
box UnityProcess #LightGreen
|
||||||
|
Participant TCPServer
|
||||||
|
Participant CloudPointServer
|
||||||
|
Participant UnityWorld
|
||||||
|
end box
|
||||||
|
UnityWorld -> CloudPointServer : init thread
|
||||||
|
activate CloudPointServer
|
||||||
|
CloudPointServer -> TCPServer : await for connection
|
||||||
|
activate TCPServer
|
||||||
|
->CloudPointClient : init thread
|
||||||
|
activate CloudPointClient
|
||||||
|
CloudPointClient -> TCPClient : createConnection
|
||||||
|
TCPClient -> TCPServer : establish connection
|
||||||
|
TCPServer -> CloudPointServer : established
|
||||||
|
deactivate TCPServer
|
||||||
|
CloudPointServer -> TCPServer : await for calls
|
||||||
|
|
||||||
|
TCPServer -> TCPServer : await for packet
|
||||||
|
Caller -> CloudPointClient : I want something
|
||||||
|
activate CloudPointClient
|
||||||
|
CloudPointClient -> CloudPointClient : CallMethod<Something>
|
||||||
|
CloudPointClient -> TCPClient : send(message)
|
||||||
|
activate TCPClient
|
||||||
|
TCPClient -> TCPServer : packet send
|
||||||
|
TCPServer -> TCPServer : await for packet
|
||||||
|
activate TCPServer
|
||||||
|
TCPServer -> TCPServer : read packet
|
||||||
|
TCPServer -> TCPClient : packet read
|
||||||
|
TCPClient -> CloudPointClient : done
|
||||||
|
deactivate TCPClient
|
||||||
|
CloudPointClient -> TCPClient : await for response
|
||||||
|
activate TCPClient
|
||||||
|
TCPClient -> TCPClient : await for packet
|
||||||
|
TCPServer -> CloudPointServer : callMethod
|
||||||
|
activate CloudPointServer
|
||||||
|
CloudPointServer -> UnityWorld : addToStaticQueue
|
||||||
|
|
||||||
|
UnityWorld -> UnityWorld : read from queue
|
||||||
|
activate UnityWorld
|
||||||
|
UnityWorld -> UnityWorld : callMethod
|
||||||
|
UnityWorld -> CloudPointServer: set task return value
|
||||||
|
deactivate UnityWorld
|
||||||
|
CloudPointServer -> TCPServer : return task
|
||||||
|
deactivate CloudPointServer
|
||||||
|
TCPServer -> TCPClient : send response
|
||||||
|
TCPClient -> TCPServer : response read
|
||||||
|
TCPClient -> CloudPointClient : response received
|
||||||
|
TCPServer -> CloudPointServer : done
|
||||||
|
deactivate TCPServer
|
||||||
|
CloudPointClient -> Caller : here what you wanted
|
||||||
|
deactivate CloudPointClient
|
||||||
|
|
||||||
|
Caller -> CloudPointClient : destruct
|
||||||
|
CloudPointClient -> TCPClient : finish waiting
|
||||||
|
deactivate TCPClient
|
||||||
|
deactivate CloudPointClient
|
||||||
|
UnityWorld -> CloudPointServer : destruct
|
||||||
|
deactivate CloudPointServer
|
||||||
|
|
||||||
|
@enduml
|
||||||
Loading…
x
Reference in New Issue
Block a user