Skip to content

Commit

Permalink
Add the ability for remote/plc to forget an address' value
Browse files Browse the repository at this point in the history
  • Loading branch information
pjkundert committed Feb 18, 2025
1 parent aaf3347 commit f7c224b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions remote/plc.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ def _read( self, address ):
""" Read a value at an address from an underlying device. """
raise Exception( "Not Implemented" )

def _forget( self, address ):
"""Remove any current value from address; by default, clears _data store entry."""
log.detail( "%s/%6d %s= None (forgetting %s)",
self.description, address, "-x" if not self.online else "--",
self._data.get(address))
self._data[address] = None

def forget( self, address ):
"""Forget about any data from the provided address."""
self._forget( address )


class poller_simulator( poller ):
"""
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__ = ( 5, 2, 4 )
__version_info__ = ( 5, 2, 5 )
__version__ = '.'.join( map( str, __version_info__ ))

0 comments on commit f7c224b

Please sign in to comment.