Commit f75681e8 authored by Chris Woodall's avatar Chris Woodall
Browse files

Added in array types

parent 51d347d4
......@@ -87,3 +87,6 @@ mapping:
writeCallback:
type: str
required: no
array:
type: bool
required: no
......@@ -109,6 +109,25 @@ def cli(ctx, doc_dir, output_dir, master_dir, yaml_files):
# Next lets read that yaml file into a python dictionary.
objdict = yaml.load(open(yaml_file))
# Find all array types and expand them out.
for (j, index) in enumerate(objdict['indexes']):
if index.get('array', False):
for i in range(index['default']):
objdict['indexes'].append({
"index": index["index"],
"subindex": i + 1,
"name": "{0}_{1}".format(index["name"], i+1),
"datatype": index["datatype"],
"access": index["access"],
"save": index["save"],
"default": 0,
"comment": "{0} element {1}".format(index["name"], i+1)
})
objdict['indexes'][j]["datatype"] = "U8"
objdict['indexes'][j]["access"] = "RO"
objdict['indexes'][j]["save"] = False
objdict['indexes'][j]["subindex"] = 0
# Let's sort the object dictionary by index and subindex. This should be
# done so that the C/C++ program can search it as a binary search.
objdict['indexes'] = multikeysort(objdict['indexes'],
......
#!/usr/bin/env python3
__version__ = "0.5.0"
\ No newline at end of file
__version__ = "0.6.0"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment