Skip to content

Commit

Permalink
Description field is injected in missing codecs
Browse files Browse the repository at this point in the history
Signed-off-by: andreu.castillo <[email protected]>
  • Loading branch information
andreu.castillo committed Dec 5, 2024
1 parent 1ff2a34 commit 9a81f1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cbexigen/datatype_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def generate_file(self):
try:
temp = self.generator.get_template("BaseDatatypes.c.jinja")
code = temp.render(filename=self.c_params["filename"], filekey=self.c_params["identifier"],
includes_code=includes, code=content)
description=self.c_params.get('description'), includes_code=includes, code=content)
tools.save_code_to_file(self.c_params["filename"], code, self.parameters['folder'])
except KeyError as err:
tools_logging.log_write_error(f'Exception in {self.__class__.__name__}.{self.generate_file.__name__} '
Expand Down
6 changes: 4 additions & 2 deletions src/cbexigen/decoder_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def __render_file(self):
try:
temp = self.generator.get_template('DatatypesDecoder.h.jinja')
code = temp.render(filename=self.h_params["filename"], filekey=self.h_params['identifier'],
include_content=self.__include_content, code_content=self.__code_content)
description=self.h_params.get('description'), include_content=self.__include_content,
code_content=self.__code_content)
tools.save_code_to_file(self.h_params['filename'], code, self.parameters['folder'])
except KeyError as err:
log_write_error(f'Exception in {self.__class__.__name__}.{self.__render_file.__name__} '
Expand Down Expand Up @@ -918,7 +919,8 @@ def __render_file(self):
try:
temp = self.generator.get_template("DatatypesDecoder.c.jinja")
code = temp.render(filename=self.c_params["filename"], filekey=self.c_params["identifier"],
includes_code=self.__include_content, code=self.__code_content)
description=self.c_params.get('description'), includes_code=self.__include_content,
code=self.__code_content)
tools.save_code_to_file(self.c_params["filename"], code, self.parameters['folder'])
except KeyError as err:
log_write_error(f'Exception in {self.__class__.__name__}.{self.__render_file.__name__} '
Expand Down
6 changes: 4 additions & 2 deletions src/cbexigen/encoder_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def __render_file(self):
try:
temp = self.generator.get_template('DataTypesEncoder.h.jinja')
code = temp.render(filename=self.h_params["filename"], filekey=self.h_params['identifier'],
include_content=self.__include_content, code_content=self.__code_content)
description=self.h_params.get('description'), include_content=self.__include_content,
code_content=self.__code_content)
tools.save_code_to_file(self.h_params['filename'], code, self.parameters['folder'])
except KeyError as err:
log_write_error(f'Exception in {self.__class__.__name__}.{self.__render_file.__name__} '
Expand Down Expand Up @@ -924,7 +925,8 @@ def __render_file(self):
try:
temp = self.generator.get_template("DataTypesEncoder.c.jinja")
code = temp.render(filename=self.c_params["filename"], filekey=self.c_params["identifier"],
includes_code=self.__include_content, code=self.__code_content)
description=self.c_params.get('description'), includes_code=self.__include_content,
code=self.__code_content)
tools.save_code_to_file(self.c_params["filename"], code, self.parameters['folder'])
except KeyError as err:
log_write_error(f'Exception in {self.__class__.__name__}.{self.__render_file.__name__} '
Expand Down

0 comments on commit 9a81f1a

Please sign in to comment.