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 10class rpc_interface { 11 +rpc_status_t {abstract}receive(call_req) 12} 13 14class service_provider { 15 +void init(handlers, num_handlers) 16 +void extend(service_provider) 17 -rpc_status_t receive(call_req) 18} 19 20class 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 31class 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 40service_provider -up--|> rpc_interface 41block_storage_provider -up--|> service_provider 42block_storage_provider --> block_store 43block_storage_provider --> block_storage_serializer 44 45@enduml 46