conson-xp 1.26.0__py3-none-any.whl → 1.27.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: conson-xp
3
- Version: 1.26.0
3
+ Version: 1.27.0
4
4
  Summary: XP Protocol Communication Tools
5
5
  Author-Email: ldvchosal <ldvchosal@github.com>
6
6
  License: MIT License
@@ -1,8 +1,8 @@
1
- conson_xp-1.26.0.dist-info/METADATA,sha256=x2lguLJmE7yZdTNZLrogbVdb93RrTgFOv-Izz_7-eII,10298
2
- conson_xp-1.26.0.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
3
- conson_xp-1.26.0.dist-info/entry_points.txt,sha256=1OcdIcDM1hz3ljCXgybaPUh1IOFEwkaTgLIW9u9zGeg,50
4
- conson_xp-1.26.0.dist-info/licenses/LICENSE,sha256=rxj6woMM-r3YCyGq_UHFtbh7kHTAJgrccH6O-33IDE4,1419
5
- xp/__init__.py,sha256=w0zdd6Iu_R5Xugn6Z7IEbzdaTA5LPt1ALETFqFfqQtc,181
1
+ conson_xp-1.27.0.dist-info/METADATA,sha256=5eKGY1BwK31UUlBeKY7UO1oV_bUOX48Nu8Qq1CdkCwA,10298
2
+ conson_xp-1.27.0.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
3
+ conson_xp-1.27.0.dist-info/entry_points.txt,sha256=1OcdIcDM1hz3ljCXgybaPUh1IOFEwkaTgLIW9u9zGeg,50
4
+ conson_xp-1.27.0.dist-info/licenses/LICENSE,sha256=rxj6woMM-r3YCyGq_UHFtbh7kHTAJgrccH6O-33IDE4,1419
5
+ xp/__init__.py,sha256=oeK4ZrD0Lxf1u59BKhKprbn_yw_JcxIHSVma8YiI5M8,181
6
6
  xp/cli/__init__.py,sha256=QjnKB1KaI2aIyKlzrnvCwfbBuUj8HNgwNMvNJVQofbI,81
7
7
  xp/cli/__main__.py,sha256=l2iKwMdat5rTGd3JWs-uGksnYYDDffp_Npz05QdKEeU,117
8
8
  xp/cli/commands/__init__.py,sha256=noh8fdZAWq-ihJEboP8WugbIgq4LJ3jUWMRA7720xWE,4909
@@ -179,9 +179,9 @@ xp/services/telegram/telegram_output_service.py,sha256=UaUv_14fR8o5K2PxQBXrCzx-H
179
179
  xp/services/telegram/telegram_service.py,sha256=XrP1CPi0ckxoKBaNwLA6lo-TogWxXgmXDOsU4Xl8BlY,13237
180
180
  xp/services/telegram/telegram_version_service.py,sha256=M5HdOTsLdcwo122FP-jW6R740ktLrtKf2TiMDVz23h8,10528
181
181
  xp/services/term/__init__.py,sha256=rWZ9hypFYDwrUCW_36cRZ4RalaPByyHQCEnOxgHrbuk,151
182
- xp/services/term/protocol_monitor_service.py,sha256=q24gnRB4SQ1BA9ZeSU7ylYQ6yQ4j12HlSPgQowsAOv8,9950
182
+ xp/services/term/protocol_monitor_service.py,sha256=PhEzLNzWf1XieQw94ua-hJu9ccwrAzhdxSZGe4kHghs,9945
183
183
  xp/term/__init__.py,sha256=Xg2DhBeI3xQJLfc7_BPWI1por-rUXemyer5OtOt9Cus,51
184
- xp/term/protocol.py,sha256=rJmhvXaLBC9tVg7oYew6yAuCO0I9n-N7uIyOLm25Wnc,3330
184
+ xp/term/protocol.py,sha256=oLJAExvIaOSpy75A5TaYB_7R9skTTtNtPx8hiJLdy_U,3425
185
185
  xp/term/protocol.tcss,sha256=r_KfxrbpycGHLVXqZc6INBBcUJME0hLrAZkF1oqnab4,2126
186
186
  xp/term/widgets/__init__.py,sha256=ftWmN_fmjxy2E8Qfm-YSRmzKfgL0KTBCTpgvYWCPbUY,274
187
187
  xp/term/widgets/help_menu.py,sha256=7viKIfyPJr-uz55Y1kgo6h4iHhntxwKs_qmC5siRYNM,1821
@@ -195,4 +195,4 @@ xp/utils/logging.py,sha256=rZDXwlBrYK8A6MPq5StsMNpgsRowzJXM6fvROPwJdGM,3750
195
195
  xp/utils/serialization.py,sha256=RWHHk86feaB4ZP7rjE4qOWK0900yg2joUBDkP76gfOY,4618
196
196
  xp/utils/state_machine.py,sha256=Oe2sLwCh9z_vr1tF6X0ZRGTeuckRQAGzmef7xc9CNdc,2413
197
197
  xp/utils/time_utils.py,sha256=dEyViDlAG9GWU-J3D_YVa-sGma6yiyyMTgN4h2x3PY4,3781
198
- conson_xp-1.26.0.dist-info/RECORD,,
198
+ conson_xp-1.27.0.dist-info/RECORD,,
xp/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  conson-xp package.
4
4
  """
5
5
 
6
- __version__ = "1.26.0"
6
+ __version__ = "1.27.0"
7
7
  __manufacturer__ = "salchichon"
8
8
  __model__ = "xp.cli"
9
9
  __serial__ = "2025.09.23.000"
@@ -93,7 +93,7 @@ class ProtocolMonitorService:
93
93
  """
94
94
  return f"{self._conbus_protocol.cli_config.ip}:{self._conbus_protocol.cli_config.port}"
95
95
 
96
- def _connect(self) -> None:
96
+ def connect(self) -> None:
97
97
  """Initiate connection to server."""
98
98
  if not self._state_machine.can_transition("connect"):
99
99
  self.logger.warning(
@@ -108,7 +108,7 @@ class ProtocolMonitorService:
108
108
 
109
109
  self._conbus_protocol.connect()
110
110
 
111
- def _disconnect(self) -> None:
111
+ def disconnect(self) -> None:
112
112
  """Disconnect from server."""
113
113
  if not self._state_machine.can_transition("disconnect"):
114
114
  self.logger.warning(
@@ -140,9 +140,9 @@ class ProtocolMonitorService:
140
140
  ConnectionState.CONNECTED,
141
141
  ConnectionState.CONNECTING,
142
142
  ):
143
- self._disconnect()
143
+ self.disconnect()
144
144
  else:
145
- self._connect()
145
+ self.connect()
146
146
 
147
147
  def _send_telegram(self, name: str, telegram: str) -> None:
148
148
  """Send a raw telegram.
@@ -231,7 +231,7 @@ class ProtocolMonitorService:
231
231
  """Clean up service resources."""
232
232
  self._disconnect_signals()
233
233
  if self._conbus_protocol.transport:
234
- self._disconnect()
234
+ self.disconnect()
235
235
 
236
236
  def get_keys(self) -> ItemsView[str, ProtocolKeyConfig]:
237
237
  """Get protocol key mappings.
xp/term/protocol.py CHANGED
@@ -6,6 +6,7 @@ from typing import Any, Optional
6
6
  from textual.app import App, ComposeResult
7
7
  from textual.containers import Horizontal
8
8
 
9
+ from xp.services.term import ProtocolMonitorService
9
10
  from xp.term.widgets.help_menu import HelpMenuWidget
10
11
  from xp.term.widgets.protocol_log import ProtocolLogWidget
11
12
  from xp.term.widgets.status_footer import StatusFooterWidget
@@ -36,14 +37,14 @@ class ProtocolMonitorApp(App[None]):
36
37
  ("0-9,a-q", "protocol_keys", "Keys"),
37
38
  ]
38
39
 
39
- def __init__(self, protocol_service: Any) -> None:
40
+ def __init__(self, protocol_service: ProtocolMonitorService) -> None:
40
41
  """Initialize the Protocol Monitor app.
41
42
 
42
43
  Args:
43
44
  protocol_service: ProtocolMonitorService for protocol operations.
44
45
  """
45
46
  super().__init__()
46
- self.protocol_service = protocol_service
47
+ self.protocol_service: ProtocolMonitorService = protocol_service
47
48
  self.protocol_widget: Optional[ProtocolLogWidget] = None
48
49
  self.help_menu: Optional[HelpMenuWidget] = None
49
50
  self.footer_widget: Optional[StatusFooterWidget] = None