github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/core/neb_ipc/ipc_pkg.h (about) 1 // Copyright (C) 2018 go-nebulas authors 2 // 3 // This file is part of the go-nebulas library. 4 // 5 // the go-nebulas library is free software: you can redistribute it and/or 6 // modify 7 // it under the terms of the GNU General Public License as published by 8 // the Free Software Foundation, either version 3 of the License, or 9 // (at your option) any later version. 10 // 11 // the go-nebulas library is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU General Public License for more details. 15 // 16 // You should have received a copy of the GNU General Public License 17 // along with the go-nebulas library. If not, see 18 // <http://www.gnu.org/licenses/>. 19 // 20 #pragma once 21 #include "common/common.h" 22 #include "core/neb_ipc/internal/ipc_pkg_internal.h" 23 #include "core/neb_ipc/ipc_common.h" 24 25 namespace neb { 26 namespace core { 27 enum { 28 ipc_pkg_nbre_version_req, 29 ipc_pkg_nbre_version_ack, 30 ipc_pkg_nbre_init_req, 31 ipc_pkg_nbre_init_ack, 32 ipc_pkg_nbre_ir_list_req, 33 ipc_pkg_nbre_ir_list_ack, 34 ipc_pkg_nbre_versions_req, 35 ipc_pkg_nbre_versions_ack, 36 ipc_pkg_nbre_nr_handler_req, 37 ipc_pkg_nbre_nr_handler_ack, 38 ipc_pkg_nbre_nr_result_req, 39 ipc_pkg_nbre_nr_result_ack, 40 ipc_pkg_nbre_dip_reward_req, 41 ipc_pkg_nbre_dip_reward_ack, 42 }; 43 namespace ipc_pkg { 44 using namespace internal; 45 46 using height = ipc_elem_base<0, uint64_t>; 47 using nbre_version_req = define_ipc_pkg<ipc_pkg_nbre_version_req, height>; 48 using major = ipc_elem_base<1, uint32_t>; 49 using minor = ipc_elem_base<2, uint32_t>; 50 using patch = ipc_elem_base<3, uint32_t>; 51 using nbre_version_ack = 52 define_ipc_pkg<ipc_pkg_nbre_version_ack, major, minor, patch>; 53 54 using nbre_init_req = define_ipc_pkg<ipc_pkg_nbre_init_req>; 55 using nbre_root_dir = ipc_elem_base<104, neb::ipc::char_string_t>; 56 using nbre_exe_name = ipc_elem_base<105, neb::ipc::char_string_t>; 57 using neb_db_dir = ipc_elem_base<106, neb::ipc::char_string_t>; 58 using nbre_db_dir = ipc_elem_base<107, neb::ipc::char_string_t>; 59 using nbre_log_dir = ipc_elem_base<108, neb::ipc::char_string_t>; 60 using admin_pub_addr = ipc_elem_base<109, neb::ipc::char_string_t>; 61 using nbre_start_height = ipc_elem_base<110, uint64_t>; 62 using nbre_init_ack = 63 define_ipc_pkg<ipc_pkg_nbre_init_ack, nbre_root_dir, nbre_exe_name, 64 neb_db_dir, nbre_db_dir, nbre_log_dir, admin_pub_addr, 65 nbre_start_height>; 66 67 using nbre_ir_list_req = define_ipc_pkg<ipc_pkg_nbre_ir_list_req>; 68 using ir_name_list = 69 ipc_elem_base<10, neb::ipc::vector<neb::ipc::char_string_t>>; 70 using nbre_ir_list_ack = define_ipc_pkg<ipc_pkg_nbre_ir_list_ack, ir_name_list>; 71 72 using ir_name = ipc_elem_base<11, neb::ipc::char_string_t>; 73 using nbre_ir_versions_req = define_ipc_pkg<ipc_pkg_nbre_versions_req, ir_name>; 74 using ir_versions = ipc_elem_base<12, neb::ipc::vector<uint64_t>>; 75 using nbre_ir_versions_ack = 76 define_ipc_pkg<ipc_pkg_nbre_versions_ack, ir_name, ir_versions>; 77 78 using start_block = ipc_elem_base<13, uint64_t>; 79 using end_block = ipc_elem_base<14, uint64_t>; 80 using nr_version = ipc_elem_base<15, uint64_t>; 81 using nbre_nr_handler_req = define_ipc_pkg<ipc_pkg_nbre_nr_handler_req, 82 start_block, end_block, nr_version>; 83 using nr_handler_id = ipc_elem_base<16, neb::ipc::char_string_t>; 84 using nbre_nr_handler_ack = 85 define_ipc_pkg<ipc_pkg_nbre_nr_handler_ack, nr_handler_id>; 86 87 using nbre_nr_result_req = 88 define_ipc_pkg<ipc_pkg_nbre_nr_result_req, nr_handler_id>; 89 using nr_result = ipc_elem_base<17, neb::ipc::char_string_t>; 90 using nbre_nr_result_ack = 91 define_ipc_pkg<ipc_pkg_nbre_nr_result_ack, nr_result>; 92 93 using nbre_dip_reward_req = define_ipc_pkg<ipc_pkg_nbre_dip_reward_req, height>; 94 using dip_reward = ipc_elem_base<18, neb::ipc::char_string_t>; 95 using nbre_dip_reward_ack = 96 define_ipc_pkg<ipc_pkg_nbre_dip_reward_ack, dip_reward>; 97 98 } // namespace ipc_pkg 99 } // namespace core 100 } // namespace neb