helics  3.5.1
queryFunctions.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2024,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
4 Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 #pragma once
11 #include "helics_cxx_export.h"
12 
13 #include <chrono>
14 #include <string>
15 #include <string_view>
16 #include <vector>
17 
18 // forward declare Federate
19 namespace helics {
20 class Federate;
21 
25 HELICS_CXX_EXPORT std::vector<std::string> vectorizeQueryResult(std::string_view queryres);
29 HELICS_CXX_EXPORT std::vector<std::string> vectorizeQueryResult(std::string_view queryres);
30 
34 HELICS_CXX_EXPORT std::vector<int> vectorizeIndexQuery(std::string_view queryres);
35 
39 HELICS_CXX_EXPORT std::vector<std::string> vectorizeAndSortQueryResult(std::string_view queryres);
43 HELICS_CXX_EXPORT std::vector<std::string> vectorizeAndSortQueryResult(std::string_view queryres);
44 
53 HELICS_CXX_EXPORT bool
55  std::string_view fedName,
56  std::chrono::milliseconds timeout = std::chrono::milliseconds(10000));
57 
65 HELICS_CXX_EXPORT bool
67  std::string_view fedName,
68  std::chrono::milliseconds timeout = std::chrono::milliseconds(10000));
69 
75 HELICS_CXX_EXPORT std::string queryFederateSubscriptions(helics::Federate* fed,
76  std::string_view fedName);
77 
78 } // namespace helics
Definition: application_api/Federate.hpp:48
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
std::vector< int > vectorizeIndexQuery(std::string_view queryres)
Definition: queryFunctions.cpp:52
std::vector< std::string > vectorizeQueryResult(std::string_view queryres)
Definition: queryFunctions.cpp:19
bool waitForFed(helics::Federate *fed, std::string_view fedName, std::chrono::milliseconds timeout)
Definition: queryFunctions.cpp:120
std::string queryFederateSubscriptions(helics::Federate *fed, std::string_view fedName)
Definition: queryFunctions.cpp:136
bool waitForInit(helics::Federate *fed, std::string_view fedName, std::chrono::milliseconds timeout)
Definition: queryFunctions.cpp:101
std::vector< std::string > vectorizeAndSortQueryResult(std::string_view queryres)
Definition: queryFunctions.cpp:94