motorcortex-python 1.0.0rc1__tar.gz → 1.0.0rc2__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.
- {motorcortex_python-1.0.0rc1/motorcortex_python.egg-info → motorcortex_python-1.0.0rc2}/PKG-INFO +1 -1
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/__init__.py +48 -0
- motorcortex_python-1.0.0rc2/motorcortex/version.py +1 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2/motorcortex_python.egg-info}/PKG-INFO +1 -1
- motorcortex_python-1.0.0rc1/motorcortex/version.py +0 -1
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/LICENSE +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/MANIFEST.in +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/README.md +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_connection_state.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_request_builders.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_request_utils.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_subscribe_dispatch.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/exceptions.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/init_threads.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/message_types.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/motorcortex_hash.json +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/motorcortex_pb2.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/motorcortex_pb2.pyi +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/nng_url.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/parameter_tree.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/py.typed +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/reply.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/request.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/session.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/setup_logger.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/state_callback_handler.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/subscribe.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/subscription.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/timespec.py +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/SOURCES.txt +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/dependency_links.txt +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/requires.txt +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/top_level.txt +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/pyproject.toml +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/setup.cfg +0 -0
- {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/setup.py +0 -0
|
@@ -14,6 +14,7 @@ Provides high-level APIs for communication, login, and data exchange using proto
|
|
|
14
14
|
See documentation for usage examples.
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
|
+
from enum import IntEnum as _IntEnum
|
|
17
18
|
from typing import Any
|
|
18
19
|
|
|
19
20
|
from motorcortex.version import __version__
|
|
@@ -39,6 +40,39 @@ from motorcortex.exceptions import (
|
|
|
39
40
|
McxLoginError,
|
|
40
41
|
McxTimeout,
|
|
41
42
|
)
|
|
43
|
+
from motorcortex.motorcortex_pb2 import StatusCode as _PbStatusCode
|
|
44
|
+
from motorcortex.setup_logger import logger # not re-exported — ``__all__`` gates package surface
|
|
45
|
+
|
|
46
|
+
# Build an ``IntEnum`` facade over the protobuf ``StatusCode`` enum so
|
|
47
|
+
# callers can write ``motorcortex.StatusCode.OK`` without reaching into
|
|
48
|
+
# the generated protobuf module. Subclassing ``int`` means comparisons
|
|
49
|
+
# like ``reply.status == StatusCode.OK`` work against the raw ints that
|
|
50
|
+
# come back on the wire.
|
|
51
|
+
StatusCode = _IntEnum(
|
|
52
|
+
"StatusCode",
|
|
53
|
+
{v.name: v.number for v in _PbStatusCode.DESCRIPTOR.values},
|
|
54
|
+
)
|
|
55
|
+
StatusCode.__doc__ = (
|
|
56
|
+
"Motorcortex response status codes. Members mirror the ``StatusCode`` "
|
|
57
|
+
"enum in the wire protocol. Use ``motorcortex.StatusCode.OK`` (or the "
|
|
58
|
+
"flat re-exports such as ``motorcortex.OK``) to compare against "
|
|
59
|
+
"``reply.status``."
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Flat re-exports for the conventional ``motorcortex.OK`` idiom. Values
|
|
63
|
+
# are members of :class:`StatusCode` and therefore also ``int``.
|
|
64
|
+
OK = StatusCode.OK
|
|
65
|
+
READ_ONLY_MODE = StatusCode.READ_ONLY_MODE
|
|
66
|
+
FAILED = StatusCode.FAILED
|
|
67
|
+
FAILED_TO_DECODE = StatusCode.FAILED_TO_DECODE
|
|
68
|
+
SUB_LIST_IS_FULL = StatusCode.SUB_LIST_IS_FULL
|
|
69
|
+
WRONG_PARAMETER_PATH = StatusCode.WRONG_PARAMETER_PATH
|
|
70
|
+
FAILED_TO_SET_REQUESTED_FRQ = StatusCode.FAILED_TO_SET_REQUESTED_FRQ
|
|
71
|
+
FAILED_TO_OPEN_FILE = StatusCode.FAILED_TO_OPEN_FILE
|
|
72
|
+
GROUP_LIST_IS_FULL = StatusCode.GROUP_LIST_IS_FULL
|
|
73
|
+
WRONG_PASSWORD = StatusCode.WRONG_PASSWORD
|
|
74
|
+
USER_NOT_LOGGED_IN = StatusCode.USER_NOT_LOGGED_IN
|
|
75
|
+
PERMISSION_DENIED = StatusCode.PERMISSION_DENIED
|
|
42
76
|
|
|
43
77
|
# ``__all__`` is the 1.0 public API surface. Anything not listed here —
|
|
44
78
|
# including module-level helpers defined below (``parseUrl``,
|
|
@@ -72,6 +106,20 @@ __all__ = [
|
|
|
72
106
|
"McxConnectionError",
|
|
73
107
|
"McxLoginError",
|
|
74
108
|
"McxTimeout",
|
|
109
|
+
# Status codes
|
|
110
|
+
"StatusCode",
|
|
111
|
+
"OK",
|
|
112
|
+
"READ_ONLY_MODE",
|
|
113
|
+
"FAILED",
|
|
114
|
+
"FAILED_TO_DECODE",
|
|
115
|
+
"SUB_LIST_IS_FULL",
|
|
116
|
+
"WRONG_PARAMETER_PATH",
|
|
117
|
+
"FAILED_TO_SET_REQUESTED_FRQ",
|
|
118
|
+
"FAILED_TO_OPEN_FILE",
|
|
119
|
+
"GROUP_LIST_IS_FULL",
|
|
120
|
+
"WRONG_PASSWORD",
|
|
121
|
+
"USER_NOT_LOGGED_IN",
|
|
122
|
+
"PERMISSION_DENIED",
|
|
75
123
|
# Tuning
|
|
76
124
|
"init_nng_threads",
|
|
77
125
|
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.0.0rc2'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '1.0.0rc1'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_connection_state.py
RENAMED
|
File without changes
|
{motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_request_builders.py
RENAMED
|
File without changes
|
|
File without changes
|
{motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_subscribe_dispatch.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/motorcortex_hash.json
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
|
{motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/state_callback_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|