[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EnergyPlus_Support] Connect EnergyPlus with own C++ socket server, using the ExternalInterface



Hi Group,

I'm trying to connect EnergyPlus with my own socket server in C++. (like BCVTB with EnergyPlus, for this case I'm using the example ePlus50-schedule from BCVTB for tests).

Actually, when I start my server and run the simulation from the E+ lunch, the client (in this case energyPlus) will be accepted. So, the connection works. 
Now I want to understand the format of the data between the externalInterface from energyPlus and the server.
In the idf file (e.g. above)two variables in the ExternalInterface (ExternalInterface:Schedule) and four Outputvariables are defined. (see the variable.cfg below) 
After the connection, the server receives 7 bytes: "1 -10 "
What's the meaning of these bytes? What have the server to send back as an answer?

How can I get more information about the stream from the socket between EnergyPlus and the C++ server? Regarding the data format.
And what data and at which time does energyplus from the socket expect?

Did anybody of you try the same in the past? 

I know that are a lot of questions, but it would be great, if I will get more information or hints from you. 


Thanking you in advance for your help. 
Regards,
Marion




variable.cfg:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE BCVTB-variables SYSTEM "variables.dtd">
<BCVTB-variables>
  <!-- The next two elements send the set points to E+ -->
  <variable source="Ptolemy">
    <EnergyPlus schedule="TSetHea"/>
  </variable>
  <variable source="Ptolemy">
    <EnergyPlus schedule="TSetCoo"/>
  </variable>
  <!-- The next two elements receive the outdoor and zone air temperature from E+ -->
  <variable source="EnergyPlus">
   <EnergyPlus name="ENVIRONMENT" type="OUTDOOR DRY BULB"/> 	
  </variable>
  <variable source="EnergyPlus">
    <EnergyPlus name="ZSF1" type="ZONE/SYS AIR TEMPERATURE"/>
  </variable>
  <!-- The next two elements receive the schedule value as an output from E+ -->
  <variable source="EnergyPlus">
    <EnergyPlus name="TSetHea" type="Schedule Value"/>
  </variable>
  <variable source="EnergyPlus">
    <EnergyPlus name="TSetCoo" type="Schedule Value"/>
  </variable>
</BCVTB-variables>




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

Primary EnergyPlus support is found at:
http://energyplus.helpserve.com or send a message to energyplus-support@xxxxxxxx

The primary EnergyPlus web site is found at:
http://www.energyplus.gov

The group web site is:
http://groups.yahoo.com/group/EnergyPlus_Support/

Attachments are currently allowed but be mindful that not everyone has a high speed connection.  Limit attachments to small files.

EnergyPlus Documentation is searchable.  Open EPlusMainMenu.pdf under the Documentation link and press the "search" button.
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/EnergyPlus_Support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/EnergyPlus_Support/join
    (Yahoo! ID required)

<*> To change settings via email:
    EnergyPlus_Support-digest@xxxxxxxxxxxxxxx 
    EnergyPlus_Support-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    EnergyPlus_Support-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/