diff --git a/secop/modules.py b/secop/modules.py index defefd2..ea2c6b6 100644 --- a/secop/modules.py +++ b/secop/modules.py @@ -54,7 +54,6 @@ except ImportError: from secop.lib import formatExtendedStack, mkthread, unset_value from secop.lib.enum import Enum -from secop.lib.parsing import format_time from secop.errors import ConfigError, ProgrammingError from secop.datatypes import DataType, EnumType, TupleOf, StringType, FloatRange, get_datatype @@ -119,7 +118,7 @@ class Param(object): # return a copy of ourselfs return Param(**self.__dict__) - def as_dict(self, static_only=False): + def as_dict(self): # used for serialisation only res = dict( description=self.description, @@ -130,10 +129,6 @@ class Param(object): res['unit'] = self.unit if self.group: res['group'] = self.group - if not static_only: - res['value'] = self.value - if self.timestamp: - res['timestamp'] = format_time(self.timestamp) return res def export_value(self): diff --git a/secop/protocol/dispatcher.py b/secop/protocol/dispatcher.py index af0042a..f39cda4 100644 --- a/secop/protocol/dispatcher.py +++ b/secop/protocol/dispatcher.py @@ -150,14 +150,14 @@ class Dispatcher(object): # return a copy of our list return self._export[:] - def list_module_params(self, modulename, only_static=False): + def list_module_params(self, modulename): self.log.debug(u'list_module_params(%r)' % modulename) if modulename in self._export: # omit export=False params! res = {} for paramname, param in list(self.get_module(modulename).parameters.items()): if param.export: - res[paramname] = param.as_dict(only_static) + res[paramname] = param.as_dict() self.log.debug(u'list params for module %s -> %r' % (modulename, res)) return res @@ -186,7 +186,7 @@ class Dispatcher(object): # some of these need rework ! mod_desc = {u'parameters': [], u'commands': []} for pname, param in list(self.list_module_params( - modulename, only_static=True).items()): + modulename).items()): mod_desc[u'parameters'].extend([pname, param]) for cname, cmd in list(self.list_module_cmds(modulename).items()): mod_desc[u'commands'].extend([cname, cmd])