[TRNSYS-users] Error using getLabel-function in C++ type

gernot.steindl at gmx.at gernot.steindl at gmx.at
Wed Sep 25 06:36:01 PDT 2013


Hello Marcello,

thanks for your reply.  
I would prefer to set the IP from the Simulation Studio in the type.  I think I should try contact the distributor and tell them my problem. I’ve found some posts describing the same behavior of GetLabel in a C++ type. But sadly there is no solution…

If anybody has a hint, please let me know.

Best regards,
Gernot


> Gesendet: Dienstag, 24. September 2013 um 09:49 Uhr
> Von: marcello.caciolo at cofelyaxima-gdfsuez.com
> An: trnsys-users at cae.wisc.edu
> Betreff: Re: [TRNSYS-users] Error using getLabel-function in C++ type
>
> Dear Gernot,
> 
> I cannot help you about C++ because we use to develop components in Fortran. However, if there is a problem with GetLabel function in C++, why not use a text file to communicate the IP Address? 
> 
> Best regards,
> 
> Marcello Caciolo
> Responsable Outils et Méthodes d'Analyse Energétique
> 
> 
> Cellule Efficacité Energétique et Environnementale - Pôle Projets et Réalisations
> 46 Boulevard de la Prairie au Duc
> BP 40119 - 44201 Nantes Cedex 02
> Tél.: +33 02 40 41 06 57
> marcello.caciolo at cofelyaxima-gdfsuez.com
> Pensez à l'environnement avant d'imprimer ce message
> 
> 
> 
> 
> 
> -----Message d'origine-----
> De : trnsys-users-bounces at cae.wisc.edu [mailto:trnsys-users-bounces at cae.wisc.edu] De la part de g-steindl at gmx.at
> Envoyé : mardi 24 septembre 2013 09:29
> À : trnsys-users at cae.wisc.edu
> Objet : [TRNSYS-users] Error using getLabel-function in C++ type
> 
> Hello everyone,
>  
> I’ve searched the Mailing list but I didn't find a satisfying answer.
>  
> I am writing a type which is communicating over a TCP-Socket with another software.
> I wrote that Type in C++ and I have to say, it wasn’t that difficult. But now I need a possibility to hand over the IP-Address as String. 
>  
> My first attempt was to use a String parameter. But as I read here this is not possible, because a parameter intend to be numerical. (I am confused why it is possible to select the String as parameter type ?).
> Now I am trying to use Labels. The Problem is that I get an error when I call the getLabel-Function: “Access violation at address … in module ‘DFORRT.dll’. Write of address 0000017”
> I read here that I have to change the declaration in trnsys.h into TRNSYSFUNCTIONS_mp_GETLABEL(int*, int*) instead of TRNSYSFUNCTIONS_mp_GETLABEL(int, int). But that is also not working! Then I found the hint to write my own getLabel-Function in the TRNDLL to avoid using return values.
> Know I am confused! Why is this function in the trnsys.h, if it is not working?
> Maybe there is a simpler way to pass a String into a Type written in C++?  I’ve never used Fortran before and I have no idea how to use sockets in Fortran. So I’d like to avoid learning a new programing language, especially because the rest of the component is working!
>  
> Regards,
>  
> Gernot
> 
> By the way: I am using TRNSYS 17
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users
>



More information about the TRNSYS-users mailing list