pw_rpc: Move active() checks to SendPacket

- Consolidate active() checks to the SendPacket() function. Reorder
  SendPacket() calls so the call object is active when it is used.
- Expose the CloseClientStream() function on Nanopb client calls.
- Expand tests for default constructed and closed RPC calls.
- Clear the channel ID when closing a call.

Change-Id: I71b346ffc7c953042a5e3b8fddf6fb2774e5bfea
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/82822
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Erik Gilling <konkers@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
6 files changed
tree: 7795022e9b52b8020f3ae4392b2abe67352bfc5e
  1. build_overrides/
  2. docker/
  3. docs/
  4. pw_allocator/
  5. pw_analog/
  6. pw_android_toolchain/
  7. pw_arduino_build/
  8. pw_assert/
  9. pw_assert_basic/
  10. pw_assert_log/
  11. pw_assert_tokenized/
  12. pw_assert_zephyr/
  13. pw_base64/
  14. pw_bloat/
  15. pw_blob_store/
  16. pw_bluetooth_hci/
  17. pw_boot/
  18. pw_boot_cortex_m/
  19. pw_build/
  20. pw_build_info/
  21. pw_build_mcuxpresso/
  22. pw_bytes/
  23. pw_checksum/
  24. pw_chrono/
  25. pw_chrono_embos/
  26. pw_chrono_freertos/
  27. pw_chrono_stl/
  28. pw_chrono_threadx/
  29. pw_chrono_zephyr/
  30. pw_cli/
  31. pw_console/
  32. pw_containers/
  33. pw_cpu_exception/
  34. pw_cpu_exception_cortex_m/
  35. pw_crypto/
  36. pw_docgen/
  37. pw_doctor/
  38. pw_env_setup/
  39. pw_file/
  40. pw_function/
  41. pw_fuzzer/
  42. pw_hdlc/
  43. pw_hex_dump/
  44. pw_i2c/
  45. pw_interrupt/
  46. pw_interrupt_cortex_m/
  47. pw_interrupt_zephyr/
  48. pw_kvs/
  49. pw_libc/
  50. pw_log/
  51. pw_log_basic/
  52. pw_log_null/
  53. pw_log_rpc/
  54. pw_log_string/
  55. pw_log_tokenized/
  56. pw_log_zephyr/
  57. pw_malloc/
  58. pw_malloc_freelist/
  59. pw_metric/
  60. pw_minimal_cpp_stdlib/
  61. pw_module/
  62. pw_multisink/
  63. pw_package/
  64. pw_persistent_ram/
  65. pw_polyfill/
  66. pw_preprocessor/
  67. pw_presubmit/
  68. pw_protobuf/
  69. pw_protobuf_compiler/
  70. pw_random/
  71. pw_result/
  72. pw_ring_buffer/
  73. pw_router/
  74. pw_rpc/
  75. pw_snapshot/
  76. pw_software_update/
  77. pw_span/
  78. pw_spi/
  79. pw_status/
  80. pw_stm32cube_build/
  81. pw_stream/
  82. pw_string/
  83. pw_symbolizer/
  84. pw_sync/
  85. pw_sync_baremetal/
  86. pw_sync_embos/
  87. pw_sync_freertos/
  88. pw_sync_stl/
  89. pw_sync_threadx/
  90. pw_sync_zephyr/
  91. pw_sys_io/
  92. pw_sys_io_arduino/
  93. pw_sys_io_baremetal_lm3s6965evb/
  94. pw_sys_io_baremetal_stm32f429/
  95. pw_sys_io_mcuxpresso/
  96. pw_sys_io_stdio/
  97. pw_sys_io_stm32cube/
  98. pw_sys_io_zephyr/
  99. pw_system/
  100. pw_target_runner/
  101. pw_thread/
  102. pw_thread_embos/
  103. pw_thread_freertos/
  104. pw_thread_stl/
  105. pw_thread_threadx/
  106. pw_tls_client/
  107. pw_tls_client_boringssl/
  108. pw_tls_client_mbedtls/
  109. pw_tokenizer/
  110. pw_tool/
  111. pw_toolchain/
  112. pw_trace/
  113. pw_trace_tokenized/
  114. pw_transfer/
  115. pw_unit_test/
  116. pw_varint/
  117. pw_watch/
  118. pw_web_ui/
  119. pw_work_queue/
  120. targets/
  121. third_party/
  122. zephyr/
  123. .bazelignore
  124. .bazelrc
  125. .clang-format
  126. .clang-tidy
  127. .eslintrc.json
  128. .gitattributes
  129. .gitignore
  130. .gn
  131. .prettierrc.js
  132. .pylintrc
  133. activate.bat
  134. Android.bp
  135. AUTHORS
  136. bootstrap.bat
  137. bootstrap.sh
  138. BUILD.bazel
  139. BUILD.gn
  140. BUILDCONFIG.gn
  141. CMakeLists.txt
  142. Kconfig.zephyr
  143. LICENSE
  144. modules.gni
  145. OWNERS
  146. package.json
  147. PW_PLUGINS
  148. README.md
  149. tsconfig.json
  150. WORKSPACE
  151. yarn.lock
README.md

Pigweed

Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.

For more information please see our website: https://pigweed.dev/

Links