[WIP] work on history writer
Change-Id: If8c42091c734fb8c7b386c06429f1b21a7e169ec
This commit is contained in:
@ -47,7 +47,8 @@ from secop.errors import NoSuchCommandError, NoSuchModuleError, \
|
||||
from secop.params import Parameter
|
||||
from secop.protocol.messages import COMMANDREPLY, DESCRIPTIONREPLY, \
|
||||
DISABLEEVENTSREPLY, ENABLEEVENTSREPLY, ERRORPREFIX, EVENTREPLY, \
|
||||
HEARTBEATREPLY, IDENTREPLY, IDENTREQUEST, READREPLY, WRITEREPLY
|
||||
HEARTBEATREPLY, IDENTREPLY, IDENTREQUEST, READREPLY, WRITEREPLY, \
|
||||
ERRORCLOSED
|
||||
|
||||
|
||||
def make_update(modulename, pobj):
|
||||
@ -297,6 +298,7 @@ class Dispatcher:
|
||||
self.log.error('should have been handled in the interface!')
|
||||
|
||||
def handle__ident(self, conn, specifier, data):
|
||||
self._active_connections.discard(conn)
|
||||
return (IDENTREPLY, None, None)
|
||||
|
||||
def handle_describe(self, conn, specifier, data):
|
||||
@ -372,3 +374,12 @@ class Dispatcher:
|
||||
self._active_connections.discard(conn)
|
||||
# XXX: also check all entries in self._subscriptions?
|
||||
return (DISABLEEVENTSREPLY, None, None)
|
||||
|
||||
def close(self):
|
||||
for conn in self._connections:
|
||||
try:
|
||||
# - may be used for the 'closed' message in serial interface
|
||||
# - is used in frappy history for indicating the close time
|
||||
conn.close_message((ERRORCLOSED, None, None))
|
||||
except AttributeError:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user