stinger-ipc 0.0.9__tar.gz → 0.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. {stinger_ipc-0.0.9/stinger_ipc.egg-info → stinger_ipc-0.0.10}/PKG-INFO +1 -1
  2. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/pyproject.toml +1 -1
  3. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10/stinger_ipc.egg-info}/PKG-INFO +1 -1
  4. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/server/src/lib.rs.jinja2 +6 -4
  5. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/LICENSE +0 -0
  6. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/README.md +0 -0
  7. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/setup.cfg +0 -0
  8. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stinger_ipc.egg-info/SOURCES.txt +0 -0
  9. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stinger_ipc.egg-info/dependency_links.txt +0 -0
  10. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stinger_ipc.egg-info/entry_points.txt +0 -0
  11. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stinger_ipc.egg-info/requires.txt +0 -0
  12. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stinger_ipc.egg-info/top_level.txt +0 -0
  13. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/__init__.py +0 -0
  14. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/args.py +0 -0
  15. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/asyncapi.py +0 -0
  16. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/components.py +0 -0
  17. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/connection.py +0 -0
  18. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/exceptions.py +0 -0
  19. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/interface.py +0 -0
  20. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/lang_symb.py +0 -0
  21. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/CMakeLists.txt.jinja2 +0 -0
  22. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/examples/client_main.cpp.jinja2 +0 -0
  23. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/examples/server_main.cpp.jinja2 +0 -0
  24. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/include/broker.hpp.jinja2 +0 -0
  25. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/include/client.hpp.jinja2 +0 -0
  26. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/include/enums.hpp.jinja2 +0 -0
  27. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/include/ibrokerconnection.hpp.jinja2 +0 -0
  28. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/include/property_structs.hpp.jinja2 +0 -0
  29. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/include/return_types.hpp.jinja2 +0 -0
  30. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/include/server.hpp.jinja2 +0 -0
  31. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/include/structs.hpp.jinja2 +0 -0
  32. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/src/broker.cpp.jinja2 +0 -0
  33. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/src/client.cpp.jinja2 +0 -0
  34. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/cpp/src/server.cpp.jinja2 +0 -0
  35. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/html/app.js.jinja2 +0 -0
  36. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/html/index.html.jinja2 +0 -0
  37. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/html/styles.css.jinja2 +0 -0
  38. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/markdown/index.md.jinja2 +0 -0
  39. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/python/__init__.py.jinja2 +0 -0
  40. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/python/client.py.jinja2 +0 -0
  41. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/python/connection.py.jinja2 +0 -0
  42. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/python/interface_types.py.jinja2 +0 -0
  43. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/python/method_codes.py.jinja2 +0 -0
  44. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/python/pyproject.toml.jinja2 +0 -0
  45. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/python/server.py.jinja2 +0 -0
  46. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/Cargo.toml.jinja2 +0 -0
  47. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/client/Cargo.toml.jinja2 +0 -0
  48. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/client/examples/client.rs.jinja2 +0 -0
  49. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/client/src/lib.rs.jinja2 +0 -0
  50. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/payloads/Cargo.toml.jinja2 +0 -0
  51. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/payloads/examples/pub_and_recv.rs.jinja2 +0 -0
  52. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/payloads/src/handler.rs.jinja2 +0 -0
  53. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/payloads/src/lib.rs.jinja2 +0 -0
  54. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/payloads/src/payloads.rs.jinja2 +0 -0
  55. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/server/Cargo.toml.jinja2 +0 -0
  56. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/templates/rust/server/examples/server.rs.jinja2 +0 -0
  57. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/tools/__init__.py +0 -0
  58. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/tools/cli.py +0 -0
  59. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/tools/markdown_generator.py +0 -0
  60. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/tools/python_generator.py +0 -0
  61. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/tools/rust_generator.py +0 -0
  62. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/stingeripc/topic.py +0 -0
  63. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/tests/test_args.py +0 -0
  64. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/tests/test_enum.py +0 -0
  65. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/tests/test_examples.py +0 -0
  66. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/tests/test_interface.py +0 -0
  67. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/tests/test_signal.py +0 -0
  68. {stinger_ipc-0.0.9 → stinger_ipc-0.0.10}/tests/test_topics.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stinger-ipc
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: Tools to create code to do IPC over MQTT
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stinger-ipc"
3
- version = "0.0.9"
3
+ version = "0.0.10"
4
4
  description = "Tools to create code to do IPC over MQTT"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stinger-ipc
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: Tools to create code to do IPC over MQTT
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -50,13 +50,13 @@ struct {{stinger.name | UpperCamelCase}}Properties {
50
50
  }
51
51
  {%endif%}
52
52
  {%endif%}{# any methods or properties #}
53
-
53
+ #[derive(Clone)]
54
54
  pub struct {{stinger.rust.server_struct_name}} {
55
55
  mqttier_client: MqttierClient,
56
56
  {%if stinger.methods|length > 0 or stinger.properties|length > 0 %}
57
57
  /// Temporarily holds the receiver for the MPSC channel. The Receiver will be moved
58
58
  /// to a process loop when it is needed. MQTT messages will be received with this.
59
- msg_streamer_rx: Option<mpsc::Receiver<ReceivedMessage>>,
59
+ msg_streamer_rx: Arc<Mutex<Option<mpsc::Receiver<ReceivedMessage>>>>,
60
60
 
61
61
  /// The Sender side of MQTT messages that are received from the broker. This tx
62
62
  /// side is cloned for each subscription made.
@@ -133,7 +133,7 @@ impl {{stinger.rust.server_struct_name}} {
133
133
  {{stinger.rust.server_struct_name}} {
134
134
  mqttier_client: connection.clone(),
135
135
  {%if stinger.methods|length > 0 or stinger.properties|length > 0 %}
136
- msg_streamer_rx: Some(message_received_rx),
136
+ msg_streamer_rx: Arc::new(Mutex::new(Some(message_received_rx))),
137
137
  msg_streamer_tx: message_received_tx,{%if stinger.methods | length > 0 %}
138
138
  method_handlers: method_handlers,{%endif%}{%if stinger.properties | length > 0 %}
139
139
  properties: property_values,{%endif%}
@@ -255,7 +255,9 @@ impl {{stinger.rust.server_struct_name}} {
255
255
 
256
256
  {%if stinger.methods|length > 0 or stinger.properties|length > 0 %}
257
257
  // Take ownership of the RX channel that receives MQTT messages. This will be moved into the loop_task.
258
- let mut message_receiver = self.msg_streamer_rx.take().expect("msg_streamer_rx should be Some");
258
+ let mut message_receiver = {
259
+ self.msg_streamer_rx.lock().unwrap().take().expect("msg_streamer_rx should be Some")
260
+ };
259
261
 
260
262
  {%if stinger.methods|length > 0 -%}
261
263
  let mut method_handlers = self.method_handlers.clone();
File without changes
File without changes
File without changes