[TRNSYS-users] SETSTORAGESIZE, SETSTORAGEVARS and GETSTORAGEVARS in C++

keilholz, werner werner.keilholz at cstb.fr
Mon Jan 14 09:16:22 PST 2008


Strangely, there seems to be a C access function to get the maximum number of storage spots, but none to actually push values to the S-array (let alone retrieve them).

 

You could of course add these functions to TRNSYS.h + the kernel, or threaten the TRNSYS developers until they do it, but most of the time you could just declare a static global variable or structure (or both) in your DLL and save the info you need there. (I guess that's why nobody ever missed that function - remember it was made for FORTRAN programmers who used horrors like COMMON blocks and such back in the last century...)

 

Werner

PS: The pacemaker type I sent recently uses this technique to remember the 'real world time' when it was started and the time it was last called in the line 

CTime lastRealTime;

CTime startRealTime;

 

(To be really clean, it should actually read 

static CTime lastRealTime;

)

 

-----Message d'origine-----
De : knut.erik.enerstvedt at niva.no [mailto:knut.erik.enerstvedt at niva.no] 
Envoyé : vendredi 11 janvier 2008 15:57
À : trnsys-users at engr.wisc.edu
Objet : [TRNSYS-users] SETSTORAGESIZE,SETSTORAGEVARS and GETSTORAGEVARS in C++

 

Dear TRNSYS users,

 

Does anyone know how to declare SETSTORAGESIZE, SETSTORAGEVARS and

GETSTORAGEVARS correctly in the TRNSYS.h file, and then use these functions

in a C++ Type?

 

Kind regards,

Knut Erik

 

 

 

 

----------------------------------------------------------------------------------------------------------------------

NIVAs hovedkontor har flyttet til nye lokaler i CIENS - Forskningssenter

for miljø og samfunn; Gaustadalléen 21, 0349 Oslo. Meld deg på vårt

nyhetsbrev på www.niva.no

 

 

_______________________________________________

TRNSYS-users mailing list

TRNSYS-users at engr.wisc.edu

https://www.cae.wisc.edu/mailman/listinfo/trnsys-users

 

 

 

 

 

************************************************************************************

This footnote confirms that this email message has been scanned by

PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.

************************************************************************************

 

 

 





 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20080114/ba3758a3/attachment-0005.htm>


More information about the TRNSYS-users mailing list