This is an automated email from the ASF dual-hosted git repository. hutcheb pushed a commit to branch fix/plc4py/documentation in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/fix/plc4py/documentation by this push: new 356488b8bd fix(plc4py/umas): Add support for metadata. 356488b8bd is described below commit 356488b8bd019a4eee7f375750f366cc59cece69 Author: Ben Hutcheson <ben.hut...@gmail.com> AuthorDate: Thu Feb 15 20:20:17 2024 +0100 fix(plc4py/umas): Add support for metadata. --- .../plc4py/plc4py/drivers/umas/UmasConnection.py | 32 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/sandbox/plc4py/plc4py/drivers/umas/UmasConnection.py b/sandbox/plc4py/plc4py/drivers/umas/UmasConnection.py index ca222d4b20..08f87b36fb 100644 --- a/sandbox/plc4py/plc4py/drivers/umas/UmasConnection.py +++ b/sandbox/plc4py/plc4py/drivers/umas/UmasConnection.py @@ -21,7 +21,7 @@ import logging from typing import Type, Awaitable import plc4py -from plc4py.api.PlcConnection import PlcConnection +from plc4py.api.PlcConnection import PlcConnection, PlcConnectionMetaData from plc4py.api.PlcDriver import PlcDriver from plc4py.api.authentication.PlcAuthentication import PlcAuthentication from plc4py.api.exceptions.exceptions import PlcConnectionException @@ -51,7 +51,7 @@ from plc4py.spi.transport.Plc4xBaseTransport import Plc4xBaseTransport from plc4py.spi.transport.TCPTransport import TCPTransport -class UmasConnection(PlcConnection): +class UmasConnection(PlcConnection, PlcConnectionMetaData): """ Umas TCP PLC connection implementation """ @@ -202,6 +202,34 @@ class UmasConnection(PlcConnection): future = asyncio.ensure_future(_request(request, self._device)) return future + def is_read_supported(self) -> bool: + """ + Indicates if the connection supports read requests. + :return: True if connection supports reading, False otherwise + """ + return True + + def is_write_supported(self) -> bool: + """ + Indicates if the connection supports write requests. + :return: True if connection supports writing, False otherwise + """ + return False + + def is_subscribe_supported(self) -> bool: + """ + Indicates if the connection supports subscription requests. + :return: True if connection supports subscriptions, False otherwise + """ + return False + + def is_browse_supported(self) -> bool: + """ + Indicates if the connection supports browsing requests. + :return: True if connection supports browsing, False otherwise + """ + return True + class UmasDriver(PlcDriver): def __init__(self):