Julian Hall | 1751ce7 | 2022-08-30 13:54:13 +0100 | [diff] [blame^] | 1 | '------------------------------------------------------------------------------- |
| 2 | ' Copyright (c) 2022, Arm Limited and Contributors. All rights reserved. |
| 3 | ' |
| 4 | ' SPDX-License-Identifier: BSD-3-Clause |
| 5 | ' |
| 6 | '------------------------------------------------------------------------------- |
| 7 | |
| 8 | @startuml |
| 9 | |
| 10 | class rpc_interface { |
| 11 | +rpc_status_t {abstract}receive(call_req) |
| 12 | } |
| 13 | |
| 14 | class service_provider { |
| 15 | +void init(handlers, num_handlers) |
| 16 | +void extend(service_provider) |
| 17 | -rpc_status_t receive(call_req) |
| 18 | } |
| 19 | |
| 20 | class block_storage_provider { |
| 21 | +void init(block_store) |
| 22 | +void regsiter_serializer(encoding, serializer) |
| 23 | -rpc_status_t open_handler(call_req) |
| 24 | -rpc_status_t close_handler(call_req) |
| 25 | -rpc_status_t get_partition_info_handler(call_req) |
| 26 | -rpc_status_t read_handler(call_req) |
| 27 | -rpc_status_t write_handler(call_req) |
| 28 | -rpc_status_t erase_handler(call_req) |
| 29 | } |
| 30 | |
| 31 | class block_store { |
| 32 | +int {abstract}open(client_id, uuid, *handle) |
| 33 | +int {abstract}close(handle) |
| 34 | +int {abstract}get_partition_info(uuid, *partition_info) |
| 35 | +int {abstract}read(handle, lba, size, *buffer, *len) |
| 36 | +int {abstract}write(handle, lba, *buffer, len) |
| 37 | +int {abstract}erase(handle, *lba, num_blocks) |
| 38 | } |
| 39 | |
| 40 | service_provider -up--|> rpc_interface |
| 41 | block_storage_provider -up--|> service_provider |
| 42 | block_storage_provider --> block_store |
| 43 | block_storage_provider --> block_storage_serializer |
| 44 | |
| 45 | @enduml |