moved naming of enum types

moved adjusting of the name of enum types from the parameter name to
secop.datatypes.get_datatype

+ ignore additional items in datainfo (must-ignore policy)

Change-Id: Id1bb089c33729f15f06ad51e5c03bb333ef3c307
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22513
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2020-02-25 08:21:45 +01:00
parent 107e1d84b0
commit d021a116f1
4 changed files with 55 additions and 23 deletions

View File

@ -30,7 +30,7 @@ from collections import defaultdict
from secop.lib import mkthread, formatExtendedTraceback, formatExtendedStack
from secop.lib.asynconn import AsynConn, ConnectionClosed
from secop.datatypes import get_datatype
from secop.datatypes import get_datatype, EnumType
from secop.protocol.interface import encode_msg_frame, decode_msg
from secop.protocol.messages import REQUEST2REPLY, ERRORPREFIX, EVENTREPLY, WRITEREQUEST, WRITEREPLY, \
READREQUEST, READREPLY, IDENTREQUEST, IDENTPREFIX, ENABLEEVENTSREQUEST, COMMANDREQUEST, DESCRIPTIONREQUEST
@ -428,12 +428,13 @@ class SecopClient(ProxyClient):
commands = {}
accessibles = moddescr['accessibles']
for aname, aentry in accessibles.items():
aentry = dict(aentry, datatype=get_datatype(aentry['datainfo']))
iname = self.internalize_name(aname)
datatype = get_datatype(aentry['datainfo'], iname)
aentry = dict(aentry, datatype=datatype)
ident = '%s:%s' % (modname, aname)
self.identifier[modname, iname] = ident
self.internal[ident] = modname, iname
if aentry['datainfo']['type'] == 'command':
if datatype.IS_COMMAND:
commands[iname] = aentry
else:
parameters[iname] = aentry