def _genWrite(self, fp, prototypes):
      for port_func in prototypes:
         hasComSignal = False
         body = C.block(innerIndent=innerIndentDefault)
         if port_func.data_element.symbol is not None:
            body.code.append(C.statement('%s = %s'%(port_func.data_element.symbol, port_func.proto.args[0].name)))
         if port_func.data_element.com_access['Send'] is not None:
            com_func = port_func.data_element.com_access['Send']
            body.code.append(C.statement('return '+str(C.fcall(com_func.name, params=[port_func.proto.args[0].name]))))
         else:
            if port_func.data_element.result_var is not None:
               body.code.append(C.statement('return %s'%port_func.data_element.result_var.name))
            else:
               body.code.append(C.statement('return RTE_E_OK'))
         fp.write(str(port_func.proto)+'\n')
         fp.write('\n'.join(body.lines())+'\n\n')