stinger-ipc 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl
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.1.dist-info → stinger_ipc-0.0.2.dist-info}/METADATA +3 -3
- stinger_ipc-0.0.2.dist-info/RECORD +48 -0
- stinger_ipc-0.0.2.dist-info/entry_points.txt +4 -0
- stingeripc/args.py +6 -5
- stingeripc/asyncapi.py +249 -167
- stingeripc/components.py +301 -136
- stingeripc/connection.py +2 -1
- stingeripc/exceptions.py +1 -2
- stingeripc/interface.py +8 -4
- stingeripc/lang_symb.py +68 -0
- stingeripc/templates/cpp/CMakeLists.txt.jinja2 +26 -0
- stingeripc/templates/cpp/examples/client_main.cpp.jinja2 +47 -0
- stingeripc/templates/cpp/examples/server_main.cpp.jinja2 +35 -0
- stingeripc/templates/cpp/include/broker.hpp.jinja2 +132 -0
- stingeripc/templates/cpp/include/client.hpp.jinja2 +53 -0
- stingeripc/templates/cpp/include/enums.hpp.jinja2 +17 -0
- stingeripc/templates/cpp/include/ibrokerconnection.hpp.jinja2 +42 -0
- stingeripc/templates/cpp/include/return_types.hpp.jinja2 +14 -0
- stingeripc/templates/cpp/include/server.hpp.jinja2 +44 -0
- stingeripc/templates/cpp/include/structs.hpp.jinja2 +13 -0
- stingeripc/templates/cpp/src/broker.cpp.jinja2 +243 -0
- stingeripc/templates/cpp/src/client.cpp.jinja2 +202 -0
- stingeripc/templates/cpp/src/server.cpp.jinja2 +170 -0
- stingeripc/templates/markdown/index.md.jinja2 +142 -0
- stingeripc/templates/python/__init__.py.jinja2 +1 -0
- stingeripc/templates/python/client.py.jinja2 +309 -0
- stingeripc/templates/python/connection.py.jinja2 +164 -0
- stingeripc/templates/python/interface_types.py.jinja2 +48 -0
- stingeripc/templates/python/method_codes.py.jinja2 +30 -0
- stingeripc/templates/python/pyproject.toml.jinja2 +9 -0
- stingeripc/templates/python/server.py.jinja2 +214 -0
- stingeripc/templates/rust/Cargo.toml.jinja2 +4 -0
- stingeripc/templates/rust/client/Cargo.toml.jinja2 +25 -0
- stingeripc/templates/rust/client/examples/client.rs.jinja2 +53 -0
- stingeripc/templates/rust/client/src/lib.rs.jinja2 +247 -0
- stingeripc/templates/rust/connection/Cargo.toml.jinja2 +21 -0
- stingeripc/templates/rust/connection/examples/pub_and_recv.rs.jinja2 +44 -0
- stingeripc/templates/rust/connection/src/handler.rs.jinja2 +0 -0
- stingeripc/templates/rust/connection/src/lib.rs.jinja2 +262 -0
- stingeripc/templates/rust/connection/src/payloads.rs.jinja2 +131 -0
- stingeripc/templates/rust/server/Cargo.toml.jinja2 +19 -0
- stingeripc/templates/rust/server/examples/server.rs.jinja2 +83 -0
- stingeripc/templates/rust/server/src/lib.rs.jinja2 +272 -0
- stingeripc/topic.py +11 -8
- stinger_ipc-0.0.1.dist-info/RECORD +0 -13
- {stinger_ipc-0.0.1.dist-info → stinger_ipc-0.0.2.dist-info}/WHEEL +0 -0
- {stinger_ipc-0.0.1.dist-info → stinger_ipc-0.0.2.dist-info}/licenses/LICENSE +0 -0
- {stinger_ipc-0.0.1.dist-info → stinger_ipc-0.0.2.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: stinger-ipc
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.2
|
4
4
|
Summary: Add your description here
|
5
5
|
Requires-Python: >=3.12
|
6
6
|
Description-Content-Type: text/markdown
|
7
7
|
License-File: LICENSE
|
8
|
-
Requires-Dist: jacobs-jinja-too>=0.0
|
8
|
+
Requires-Dist: jacobs-jinja-too>=0.1.0
|
9
9
|
Requires-Dist: packaging>=25.0
|
10
10
|
Requires-Dist: pydantic>=2.11.7
|
11
11
|
Requires-Dist: pyyaml>=6.0.2
|
@@ -28,7 +28,7 @@ StingerIPC takes a interface description file (.singeripc), and will generate co
|
|
28
28
|
|
29
29
|
```yaml
|
30
30
|
stingeripc:
|
31
|
-
version: 0.0.
|
31
|
+
version: 0.0.7
|
32
32
|
|
33
33
|
interface:
|
34
34
|
name: Example
|
@@ -0,0 +1,48 @@
|
|
1
|
+
stinger_ipc-0.0.2.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
2
|
+
stingeripc/__init__.py,sha256=PTr5WfMfB-GL4vp3-XMU8IwGv3Q5RXQ24H7JuEo3hdk,133
|
3
|
+
stingeripc/args.py,sha256=x3P8GRu9-jyiMl62t0FPqbWY18FbhMVN4eSa2UzUv6c,3960
|
4
|
+
stingeripc/asyncapi.py,sha256=DJZuz_LiQEJjQGlnfRtgOToWVD55uLw5ZoiZ95-bxZc,23291
|
5
|
+
stingeripc/components.py,sha256=m4w1bVhMDEg1nvvfteJXrHtigdJ5yF_JkXQpIpXbT4o,38442
|
6
|
+
stingeripc/connection.py,sha256=DfBG9LKaEuGacmX5NPphDabJqJmO3tVUg8Oa-efCd7w,184
|
7
|
+
stingeripc/exceptions.py,sha256=nX5Xl4KjPTfSRTVZIB9NkgM0g_6auXgr5fTyunCZy5Q,51
|
8
|
+
stingeripc/interface.py,sha256=ypt4T7hTH7ePKLy3JCl1b1ggyH5T38m68Gt0m_5VOBM,1558
|
9
|
+
stingeripc/lang_symb.py,sha256=jyKokKXEGAz6pRU-1_pzpt67cB5fRoqoWcKtMYJqlio,1918
|
10
|
+
stingeripc/topic.py,sha256=mIL6Abf3fcI0yeSGj_o9ulV6xFNIfyfwGZ5joEVXyzE,2404
|
11
|
+
stingeripc/templates/cpp/CMakeLists.txt.jinja2,sha256=jXlF2GOAt1mBsm6JqPZGaRr53NV5oJsfTd6nedeJ-GA,945
|
12
|
+
stingeripc/templates/cpp/examples/client_main.cpp.jinja2,sha256=r89IpvvDDpcsxwOMV6Fb7PEGnOxk6ApRuwblvO6K93Q,2642
|
13
|
+
stingeripc/templates/cpp/examples/server_main.cpp.jinja2,sha256=-VFJQyPGFftfW-8IX8yebZwb091e8_1m5NorIb_Fy54,1475
|
14
|
+
stingeripc/templates/cpp/include/broker.hpp.jinja2,sha256=i2ndp5zxuXevZ1SFvpRbSlaeOyrbaRs8ixKB0gr6LTs,5383
|
15
|
+
stingeripc/templates/cpp/include/client.hpp.jinja2,sha256=EvTplwqFjYbPycW4RLfUt4Xvfs-KEmozXpByMAj4pY4,2420
|
16
|
+
stingeripc/templates/cpp/include/enums.hpp.jinja2,sha256=psTnV1KXr72RfL4ufdtX8BO0Ub_CJm9Uj5h8UUM_-uI,598
|
17
|
+
stingeripc/templates/cpp/include/ibrokerconnection.hpp.jinja2,sha256=ugKPfYbdv1iMn2qFjIfPMvITvjkG5bjJEb_TzMmJmNA,1643
|
18
|
+
stingeripc/templates/cpp/include/return_types.hpp.jinja2,sha256=rRCQ6FRXUdTKio9enusUZjoVYTpJ0rSD5aXxFHXveKA,319
|
19
|
+
stingeripc/templates/cpp/include/server.hpp.jinja2,sha256=khBSXQQr6kHp1beGRaSMdpSfMiMlK8OQglhJ5iPcMpA,1842
|
20
|
+
stingeripc/templates/cpp/include/structs.hpp.jinja2,sha256=EHX28p0JydDuq7k8gLh0ujowzbtwrmUcQLNxvt891lg,299
|
21
|
+
stingeripc/templates/cpp/src/broker.cpp.jinja2,sha256=32bfKFJIzHe8w4JKZKjJ-wv8vVrYtOULyRK8f2lF1ow,9345
|
22
|
+
stingeripc/templates/cpp/src/client.cpp.jinja2,sha256=KJEsY7pCJl5myop61NRLCL9mVef3jjr-sAluJh5eNKY,8813
|
23
|
+
stingeripc/templates/cpp/src/server.cpp.jinja2,sha256=KvwUgSm7T21EjNqUF7DpKE1WyQhZC7JXBzgg8HjgmFA,7643
|
24
|
+
stingeripc/templates/markdown/index.md.jinja2,sha256=gmLUIPDF9Kpr0OkWu_IMuUNO5pGurOCh5QyWAYwLvBg,4317
|
25
|
+
stingeripc/templates/python/__init__.py.jinja2,sha256=jdZ07ogzJLOgzqqkHjj2_8hld9uBDnvB1DXPXnWkt98,22
|
26
|
+
stingeripc/templates/python/client.py.jinja2,sha256=lUlnh-Z2ulDaomx-bR7RAgovmZ4QYLjck0c_885x8DY,16461
|
27
|
+
stingeripc/templates/python/connection.py.jinja2,sha256=-ftw5lHa2ab_hfQLhVuFK5HTY5cdetk4YeDjI-KvUe0,7159
|
28
|
+
stingeripc/templates/python/interface_types.py.jinja2,sha256=BcCD0uCzDn1TAn1IvWhHiOsai6MczIBu12Xg0snTHk8,1711
|
29
|
+
stingeripc/templates/python/method_codes.py.jinja2,sha256=74i8iKk4Fu9_nE2SYTRrRK2G4mogfJx88ihbmjyfYVQ,1089
|
30
|
+
stingeripc/templates/python/pyproject.toml.jinja2,sha256=R-rgSv6RTdgPINvhCwJ180Vzjy9-WkqtLbLgnCov3CI,195
|
31
|
+
stingeripc/templates/python/server.py.jinja2,sha256=pxjzLPE7k3DG6zE-zXyK_I16ZF8k-xgbdh_182Fx_E8,11217
|
32
|
+
stingeripc/templates/rust/Cargo.toml.jinja2,sha256=lj9sCbw5-mJ4dz8-naEsc3xOlpgW6rdAxasuDjmag6M,72
|
33
|
+
stingeripc/templates/rust/client/Cargo.toml.jinja2,sha256=2996MNw2YVxQuneuQBNypQzgig1W5rS915LahM1jFl8,743
|
34
|
+
stingeripc/templates/rust/client/examples/client.rs.jinja2,sha256=xBrIwHJOrMjxFI-nUBejvI52JxgBBQ52KVzLK_ONyVM,2070
|
35
|
+
stingeripc/templates/rust/client/src/lib.rs.jinja2,sha256=CQIXAhwTeU1pNSJhdD9mxmQOoaoKIwW2VNykryOeRJs,12756
|
36
|
+
stingeripc/templates/rust/connection/Cargo.toml.jinja2,sha256=-DkDvR7q6l5SNsl9fcvDS05wXGGag9jv3tsXd4xmOuQ,553
|
37
|
+
stingeripc/templates/rust/connection/examples/pub_and_recv.rs.jinja2,sha256=dD0HnFdXqpMYQK8u-37hl1c24dtrg6vbGVjWEjZA-1k,1513
|
38
|
+
stingeripc/templates/rust/connection/src/handler.rs.jinja2,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
|
+
stingeripc/templates/rust/connection/src/lib.rs.jinja2,sha256=00J0gOg3MZZIejFzay2ELCZZSiR_i0hsuF7ZQXk0lWE,10062
|
40
|
+
stingeripc/templates/rust/connection/src/payloads.rs.jinja2,sha256=rlQgHeiCYGU8yq2fKlt9-khVfwvZdVjQNHOmLuzZznI,4130
|
41
|
+
stingeripc/templates/rust/server/Cargo.toml.jinja2,sha256=eyMM4xmZP-9mlDJMQ5zrFR1dWWmoldMac6h_aFKtPQs,476
|
42
|
+
stingeripc/templates/rust/server/examples/server.rs.jinja2,sha256=6XrMXUrcr9c0_m5u02kQzM88UHngVcUQCqL5uChefS8,3682
|
43
|
+
stingeripc/templates/rust/server/src/lib.rs.jinja2,sha256=CFIrHI9LkZ2P1vX-YOOa0TwVVzqnVo59RnDAIXYV5Iw,13580
|
44
|
+
stinger_ipc-0.0.2.dist-info/METADATA,sha256=S9D5U25RmJQ_onkPuV5mQgvRY1vPhFoj6NX0cuxsUUY,5993
|
45
|
+
stinger_ipc-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
46
|
+
stinger_ipc-0.0.2.dist-info/entry_points.txt,sha256=OP6HFi6z11HE_zxLsy9kPnoq8C2anF--_NiHMsMcazY,171
|
47
|
+
stinger_ipc-0.0.2.dist-info/top_level.txt,sha256=mSNwAf83_1qiTP_vu7XEPBrZu-fDusT1FFyQZzCrRcU,11
|
48
|
+
stinger_ipc-0.0.2.dist-info/RECORD,,
|
stingeripc/args.py
CHANGED
@@ -17,6 +17,7 @@ from __future__ import annotations
|
|
17
17
|
from enum import Enum
|
18
18
|
from .exceptions import InvalidStingerStructure
|
19
19
|
|
20
|
+
|
20
21
|
class ArgType(Enum):
|
21
22
|
UNKNOWN = 0
|
22
23
|
PRIMITIVE = 1
|
@@ -25,7 +26,7 @@ class ArgType(Enum):
|
|
25
26
|
|
26
27
|
|
27
28
|
class ArgPrimitiveType(Enum):
|
28
|
-
"""
|
29
|
+
"""This is not an Arg, rather it is an enumeration of different primitives that an ArgPrimitive can represent."""
|
29
30
|
|
30
31
|
BOOLEAN = 0
|
31
32
|
INTEGER = 1
|
@@ -40,7 +41,7 @@ class ArgPrimitiveType(Enum):
|
|
40
41
|
raise InvalidStingerStructure(f"No ArgType called '{arg_type}'")
|
41
42
|
|
42
43
|
@classmethod
|
43
|
-
def to_python_type(cls, arg_type: ArgPrimitiveType, optional: bool=False) -> str:
|
44
|
+
def to_python_type(cls, arg_type: ArgPrimitiveType, optional: bool = False) -> str:
|
44
45
|
if optional:
|
45
46
|
return f"{cls.to_python_type(arg_type, optional=False)} | None"
|
46
47
|
if arg_type == cls.BOOLEAN:
|
@@ -54,7 +55,7 @@ class ArgPrimitiveType(Enum):
|
|
54
55
|
raise InvalidStingerStructure("Unhandled arg type")
|
55
56
|
|
56
57
|
@classmethod
|
57
|
-
def to_rust_type(cls, arg_type: ArgPrimitiveType, optional:bool=False) -> str:
|
58
|
+
def to_rust_type(cls, arg_type: ArgPrimitiveType, optional: bool = False) -> str:
|
58
59
|
if optional:
|
59
60
|
return f"Option<{cls.to_rust_type(arg_type, optional=False)}>"
|
60
61
|
if arg_type == cls.BOOLEAN:
|
@@ -80,7 +81,7 @@ class ArgPrimitiveType(Enum):
|
|
80
81
|
raise InvalidStingerStructure("Unhandled arg type")
|
81
82
|
|
82
83
|
@classmethod
|
83
|
-
def to_cpp_type(cls, arg_type: ArgPrimitiveType, optional: bool=False) -> str:
|
84
|
+
def to_cpp_type(cls, arg_type: ArgPrimitiveType, optional: bool = False) -> str:
|
84
85
|
if arg_type == cls.BOOLEAN:
|
85
86
|
if optional:
|
86
87
|
return "boost::optional<bool>"
|
@@ -113,4 +114,4 @@ class ArgPrimitiveType(Enum):
|
|
113
114
|
return "Double"
|
114
115
|
elif arg_type == cls.STRING:
|
115
116
|
return "String"
|
116
|
-
raise InvalidStingerStructure("Unhandled arg type")
|
117
|
+
raise InvalidStingerStructure("Unhandled arg type")
|