stinger-ipc 0.0.8__tar.gz → 0.0.9__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.
- {stinger_ipc-0.0.8/stinger_ipc.egg-info → stinger_ipc-0.0.9}/PKG-INFO +1 -1
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/pyproject.toml +1 -1
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9/stinger_ipc.egg-info}/PKG-INFO +1 -1
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/python/connection.py.jinja2 +2 -1
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/client/Cargo.toml.jinja2 +3 -1
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/server/Cargo.toml.jinja2 +2 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/server/examples/server.rs.jinja2 +4 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/server/src/lib.rs.jinja2 +2 -1
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/LICENSE +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/README.md +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/setup.cfg +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stinger_ipc.egg-info/SOURCES.txt +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stinger_ipc.egg-info/dependency_links.txt +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stinger_ipc.egg-info/entry_points.txt +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stinger_ipc.egg-info/requires.txt +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stinger_ipc.egg-info/top_level.txt +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/__init__.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/args.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/asyncapi.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/components.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/connection.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/exceptions.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/interface.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/lang_symb.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/CMakeLists.txt.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/examples/client_main.cpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/examples/server_main.cpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/broker.hpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/client.hpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/enums.hpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/ibrokerconnection.hpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/property_structs.hpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/return_types.hpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/server.hpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/structs.hpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/src/broker.cpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/src/client.cpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/src/server.cpp.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/html/app.js.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/html/index.html.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/html/styles.css.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/markdown/index.md.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/python/__init__.py.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/python/client.py.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/python/interface_types.py.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/python/method_codes.py.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/python/pyproject.toml.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/python/server.py.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/Cargo.toml.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/client/examples/client.rs.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/client/src/lib.rs.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/Cargo.toml.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/examples/pub_and_recv.rs.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/src/handler.rs.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/src/lib.rs.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/src/payloads.rs.jinja2 +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/tools/__init__.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/tools/cli.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/tools/markdown_generator.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/tools/python_generator.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/tools/rust_generator.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/topic.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/tests/test_args.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/tests/test_enum.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/tests/test_examples.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/tests/test_interface.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/tests/test_signal.py +0 -0
- {stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/tests/test_topics.py +0 -0
@@ -45,7 +45,7 @@ class {{broker.class_name}}(BrokerConnection):
|
|
45
45
|
class PendingSubscription:
|
46
46
|
def __init__(self, topic: str, subscription_id: int):
|
47
47
|
self.topic = topic
|
48
|
-
self.subscription_id
|
48
|
+
self.subscription_id = subscription_id
|
49
49
|
|
50
50
|
def __init__(self{%if broker.hostname is none%}, host: str, port: int{%endif%}):
|
51
51
|
self._logger = logging.getLogger('Connection')
|
@@ -83,6 +83,7 @@ class {{broker.class_name}}(BrokerConnection):
|
|
83
83
|
self._message_callback = callback
|
84
84
|
|
85
85
|
def _on_message(self, client, userdata, msg):
|
86
|
+
self._logger.debug("Got a message to %s", msg.topic)
|
86
87
|
if self._message_callback:
|
87
88
|
properties = msg.properties.__dict__ if hasattr(msg, 'properties') else {}
|
88
89
|
if "UserProperty" in properties:
|
@@ -14,6 +14,8 @@ num-traits = "0.2.19"
|
|
14
14
|
tokio = { version = "1", features = ["full"] }
|
15
15
|
serde = { version = "1.0.219", features = ["derive"] }
|
16
16
|
serde_json = "1.0.142"
|
17
|
+
log = "0.4"
|
18
|
+
env_logger = "0.10"
|
17
19
|
|
18
20
|
[dependencies.uuid]
|
19
21
|
version = "1.2.1"
|
@@ -24,4 +26,4 @@ features = [
|
|
24
26
|
]
|
25
27
|
[[example]]
|
26
28
|
name = "{{stinger.name | snake_case}}_client_demo"
|
27
|
-
path = "examples/client.rs"
|
29
|
+
path = "examples/client.rs"
|
@@ -13,6 +13,8 @@ num-traits = "0.2.19"
|
|
13
13
|
tokio = { version = "1", features = ["full"] }
|
14
14
|
serde = { version = "1.0.219", features = ["derive"] }
|
15
15
|
serde_json = "1.0.142"
|
16
|
+
log = "0.4"
|
17
|
+
env_logger = "0.10"
|
16
18
|
|
17
19
|
[[example]]
|
18
20
|
name = "{{stinger.name | snake_case}}_server_demo"
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/server/examples/server.rs.jinja2
RENAMED
@@ -33,6 +33,10 @@ fn {{method_name|snake_case}}_handler({%for arg in method.arg_list%}_{{arg.name|
|
|
33
33
|
|
34
34
|
#[tokio::main]
|
35
35
|
async fn main() {
|
36
|
+
env_logger::Builder::from_default_env()
|
37
|
+
.target(env_logger::Target::Stdout)
|
38
|
+
.init();
|
39
|
+
|
36
40
|
block_on(async {
|
37
41
|
{%set broker = stinger.get_example_broker()%}
|
38
42
|
let mut connection = MqttierClient::new("localhost", 1883, None).unwrap();
|
@@ -151,7 +151,7 @@ impl {{stinger.rust.server_struct_name}} {
|
|
151
151
|
{{arg.name}}: {{arg.name|snake_case}},
|
152
152
|
{%endfor%}
|
153
153
|
};
|
154
|
-
let _ = self.mqttier_client.
|
154
|
+
let _ = self.mqttier_client.publish_structure("{{sig.topic}}".to_string(), &data).await;
|
155
155
|
}
|
156
156
|
{%endfor%}
|
157
157
|
|
@@ -199,6 +199,7 @@ impl {{stinger.rust.server_struct_name}} {
|
|
199
199
|
let new_data = {{prop_name | UpperCamelCase}}Property {
|
200
200
|
{{prop.arg_list[0].name}}: data,
|
201
201
|
};
|
202
|
+
println!("Publishing to topic {}", topic);
|
202
203
|
let _pub_result = publisher.publish_state(topic, &new_data, 1).await;
|
203
204
|
{%else%}
|
204
205
|
let _pub_result = publisher.publish_state(topic, &data, 1).await;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/examples/client_main.cpp.jinja2
RENAMED
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/examples/server_main.cpp.jinja2
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/property_structs.hpp.jinja2
RENAMED
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/cpp/include/return_types.hpp.jinja2
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/python/interface_types.py.jinja2
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/client/examples/client.rs.jinja2
RENAMED
File without changes
|
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/Cargo.toml.jinja2
RENAMED
File without changes
|
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/src/handler.rs.jinja2
RENAMED
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/src/lib.rs.jinja2
RENAMED
File without changes
|
{stinger_ipc-0.0.8 → stinger_ipc-0.0.9}/stingeripc/templates/rust/payloads/src/payloads.rs.jinja2
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|