Armando Montanez | a0eb85c | 2023-09-13 15:25:59 +0000 | [diff] [blame] | 1 | # Copyright 2023 The Pigweed Authors |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 | # use this file except in compliance with the License. You may obtain a copy of |
| 5 | # the License at |
| 6 | # |
| 7 | # https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations under |
| 13 | # the License. |
| 14 | """Wraps pw_system's console to inject additional RPC protos.""" |
| 15 | |
| 16 | import sys |
| 17 | |
| 18 | from pw_protobuf_protos import common_pb2 |
Anthony DiGirolamo | 21f1c8c | 2024-06-10 22:10:21 +0000 | [diff] [blame] | 19 | from pw_rpc import echo_pb2 |
Armando Montanez | a0eb85c | 2023-09-13 15:25:59 +0000 | [diff] [blame] | 20 | import pw_system.console |
| 21 | from rpc_example_protos import rpc_example_service_pb2 |
| 22 | |
| 23 | |
Anthony DiGirolamo | 21f1c8c | 2024-06-10 22:10:21 +0000 | [diff] [blame] | 24 | def main() -> int: |
| 25 | compiled_protos = [common_pb2, echo_pb2, rpc_example_service_pb2] |
| 26 | return pw_system.console.main_with_compiled_protos(compiled_protos) |
Armando Montanez | a0eb85c | 2023-09-13 15:25:59 +0000 | [diff] [blame] | 27 | |
| 28 | |
| 29 | if __name__ == '__main__': |
| 30 | sys.exit(main()) |