def _generate_source(self, dest_dir='.', file_name=None):
      if file_name is None:
         file_name = 'RteApi.c'
      file_path = os.path.join(dest_dir,file_name)
      with io.open(file_path, 'w', newline='\n') as fp:
         self._write_includes(fp)
         self._write_constants_and_typedefs(fp)
         self._write_local_vars(fp)
         self._write_public_funcs(fp)