[TRNSYS-users] C++ API not working
Michael Holzhauser via TRNSYS-users
trnsys-users at lists.onebuilding.org
Fri May 20 08:22:09 PDT 2016
Hello all,
I managed to build a customized TRNSYS Type in C++ by extending the Type202 example that is delivered with TRNSYS 17. I can access the input values and return the corresponding output values without any problems. However, the communication with the TRNSYS Core functions somehow don’t work. Whenever I invoke some function that returns an integer value (like getMaxLabelLength()), the result is NaN. Whenever I try to invoke some function that returns characters (like getDeckFileName()), TRNSYS crashes with something like „Access violation at address XXXXX in module ‚TRNDLL.DLL‘. Write of address XXXXX.“ or with „forttrl: severe (408): fort: (18): Dummy character variable ‚GETLABEL at 0‘ has length 300 which is greater than actual variable length 1“ (in case of getLabel).
As I read in other topics like this one, there seemed to be several issues in the TRNSYS.h header file and the library files long ago:
https://www.mail-archive.com/trnsys-users@engr.wisc.edu/msg00005.html
However, 11 years later, is there a workaround for this problem?
Thanks in advance.
--
M.Sc. Michael Holzhauser
AG Optimization
University of Kaiserslautern
Paul-Ehrlich-Str. 14 - 451
67663 Kaiserslautern, Germany
Phone: +49 (631) 205-2511
E-mail: holzhauser at mathematik.uni-kl.de <mailto:holzhauser at mathematik.uni-kl.de>
www.mathematik.uni-kl.de/~holzhauser <http://www.mathematik.uni-kl.de/~holzhauser>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20160520/45836a86/attachment-0003.htm>
More information about the TRNSYS-users
mailing list