Skip to content

Commit

Permalink
Merge pull request #24 from GMLC-TDC/develop
Browse files Browse the repository at this point in the history
Update for 2.2.1 release
  • Loading branch information
nightlark authored Sep 27, 2019
2 parents babdcd1 + 6a570cf commit 5f4affb
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions cpp98/nonlings/nonlings_fed1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ All rights reserved. See LICENSE file and DISCLAIMER for more details.
#include <helics/cpp98/ValueFederate.hpp>
#include <helics/cpp98/Broker.hpp>
#include <helics/cpp98/helics.hpp> // helicsVersionString
#include <math.h>
#include <stdio.h>
#include <cmath>
#include <cstdio>

int main (int /*argc*/, char ** /*argv*/)
{
std::string initstring = "=f 2 --name=mainbroker";
std::string initstring = "-f 2 --name=mainbroker";
std::string fedinitstring = "--broker=mainbroker --federates=1";
double deltat = 0.01;
helicscpp::Publication pub;
Expand All @@ -36,7 +36,7 @@ int main (int /*argc*/, char ** /*argv*/)
helicscpp::FederateInfo fi ( "zmq");

/* Federate init string */
fi.setCoreInitString (fedinitstring);
fi.setCoreInit (fedinitstring);
fi.setProperty(helics_property_time_delta, deltat);
fi.setProperty(helics_property_int_max_iterations, 100);

Expand All @@ -47,7 +47,7 @@ int main (int /*argc*/, char ** /*argv*/)
printf (" Value federate created\n");

/* Register the publication */
pub = vfed->registerGlobalTypePublication ("testA", "double");
pub = vfed->registerGlobalPublication ("testA", "double");
printf (" Publication registered\n");

sub = vfed->registerSubscription ("testB");
Expand Down
8 changes: 4 additions & 4 deletions cpp98/nonlings/nonlings_fed2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Copyright © 2017-2018,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC
All rights reserved. See LICENSE file and DISCLAIMER for more details.
*/
#include <stdio.h>
#include <math.h>
#include <cstdio>
#include <cmath>
#include <helics/cpp98/ValueFederate.hpp>
#include <helics/cpp98/helics.hpp> // helicsVersionString

Expand All @@ -27,7 +27,7 @@ int main(int /*argc*/,char ** /*argv*/)
helicscpp::FederateInfo fi ( "zmq");

/* Federate init string */
fi.setCoreInitString (fedinitstring);
fi.setCoreInit (fedinitstring);

fi.setProperty(helics_property_time_delta, deltat);
fi.setProperty(helics_property_int_log_level, helics_log_level_warning);
Expand All @@ -41,7 +41,7 @@ int main(int /*argc*/,char ** /*argv*/)
printf(" Subscription registered\n");

/* Register the publication */
pub = vfed->registerGlobalTypePublication("testB","double");
pub = vfed->registerGlobalPublication("testB","double");
printf(" Publication registered\n");


Expand Down
4 changes: 2 additions & 2 deletions cpp98/pi-exchange/pi_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static char help[] = " PI RECEIVER: Simple program to demonstrate the usage of H
This example creates a value federate subscribing to the publication \n\
registered by PI SENDER.\n\n";

#include <stdio.h>
#include <cstdio>
#include <helics/cpp98/ValueFederate.hpp>
#include <helics/cpp98/helics.hpp>

Expand All @@ -30,7 +30,7 @@ int main(int /*argc*/,char ** /*argv*/)
helicscpp::FederateInfo fi( "zmq");

/* Federate init string */
fi.setCoreInitString(fedinitstring);
fi.setCoreInit(fedinitstring);

/* Set the message interval (timedelta) for federate. Note that
HELICS minimum message time interval is 1 ns and by default
Expand Down
6 changes: 3 additions & 3 deletions cpp98/pi-exchange/pi_receiver2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static char help[] = "Example to demonstrate the usage of HELICS C Interface wit
Here, a value federate, that can both publish and subscribe is created.\n\
This federate can only publish a value once it receives value from the other federate.\n\n";

#include <stdio.h>
#include <cstdio>
#include <helics/cpp98/ValueFederate.hpp>
#include <helics/cpp98/helics.hpp> // helicsVersionString
#include <cmath>
Expand All @@ -30,7 +30,7 @@ int main(int /*argc*/,char ** /*argv*/)
helicscpp::FederateInfo fi( "zmq");

/* Federate init string */
fi.setCoreInitString(fedinitstring);
fi.setCoreInit(fedinitstring);

/* Set the message interval (timedelta) for federate. Note that
HELICS minimum message time interval is 1 ns and by default
Expand All @@ -51,7 +51,7 @@ int main(int /*argc*/,char ** /*argv*/)
printf("PI RECEIVER: Subscription registered\n");

/* Register the publication */
pub = vfed.registerGlobalTypePublication("testB","double");
pub = vfed.registerGlobalPublication("testB","double");
printf("PI RECEIVER: Publication registered\n");

fflush(NULL);
Expand Down
2 changes: 1 addition & 1 deletion cpp98/pi-exchange/pi_sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main(int /*argc*/,char ** /*argv*/)
helicscpp::FederateInfo fi( "zmq");

/* Federate init string */
fi.setCoreInitString(fedinitstring);
fi.setCoreInit(fedinitstring);

/* Set the message interval (timedelta) for federate. Note that
HELICS minimum message time interval is 1 ns and by default
Expand Down
6 changes: 3 additions & 3 deletions cpp98/pi-exchange/pi_sender2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static char help[] = "Example to demonstrate the usage of HELICS Cpp98 Interface
publish and subscribe. This federate publishes a value and waits for the value \n\
published by the other federate. Once the value has arrived, it publishes its next value \n\n";

#include <stdio.h>
#include <cstdio>
#include <helics/cpp98/ValueFederate.hpp>
#include <helics/cpp98/Broker.hpp>
#include <helics/cpp98/helics.hpp> // helicsVersionString
Expand Down Expand Up @@ -41,7 +41,7 @@ int main(int /*argc*/,char ** /*argv*/)
helicscpp::FederateInfo fi( "zmq");

/* Federate init string */
fi.setCoreInitString(fedinitstring);
fi.setCoreInit(fedinitstring);

/* Set the message interval (timedelta) for federate. Note that
HELICS minimum message time interval is 1 ns and by default
Expand All @@ -58,7 +58,7 @@ int main(int /*argc*/,char ** /*argv*/)
printf("PI SENDER: Value federate created\n");

/* Register the publication */
pub = vfed->registerGlobalTypePublication("testA","double");
pub = vfed->registerGlobalPublication("testA","double");
printf("PI SENDER: Publication registered\n");

/* Subscribe to PI SENDER's publication */
Expand Down

0 comments on commit 5f4affb

Please sign in to comment.