-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
There are some cases where the builder.py is doing things that we probably should replicate in ibek support YAML.
e.g. in the asyn module we have a tidy way of adding configuration items to the asyn object as follows:
def Initialise(self):
print('%sConfigure("%s", "%s", %d, %d, %d)' % (
self.DbdFileList[0], self.asyn_name, self.port_name, self.priority,
self.noAutoConnect, self.noProcessEos))
for key, value in self.options.items():
print('asynSetOption("%s", 0, "%s", "%s")' % (
self.asyn_name, key, value))
if self.input_eos is not None:
print('asynOctetSetInputEos("%s", 0, %s)' % (
self.asyn_name, quote_c_string(self.input_eos)))
if self.output_eos is not None:
print('asynOctetSetOutputEos("%s", 0, %s)' % (
self.asyn_name, quote_c_string(self.output_eos)))In particular the options dictionary is really useful here. Also inheritance allows for this pattern to be reused in a few Asyn classes.
At present I have this in YAML which is adequate for the simple streamdevice I have made so far but is pretty limited and the approach does not scale.
@coretl @GDYendell do you think we should support dictionary arguments for this purpose?
Metadata
Metadata
Assignees
Labels
No labels