helics  3.3.0
coreTypeOperations.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2022,
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
8 #include "CoreTypes.hpp"
9 
10 #include <string>
11 #include <string_view>
12 
17 namespace helics {
18 namespace core {
20  std::string to_string(CoreType type);
21 
27  CoreType coreTypeFromString(std::string_view type) noexcept;
28 
32  bool isCoreTypeAvailable(CoreType type) noexcept;
33 
39  bool matchingTypes(std::string_view type1, std::string_view type2);
40 } // namespace core
41 } // namespace helics
helics::CoreType::TCP_SS
@ TCP_SS
helics::CoreType::NNG
@ NNG
reserved for future Nanomsg implementation
helics::CoreType::UDP
@ UDP
use UDP packets to send the data
helics::CoreType::MULTI
@ MULTI
use the multi-broker
helics::CoreType::WEBSOCKET
@ WEBSOCKET
core/broker using web sockets
helics::coreTypeFromString
CoreType coreTypeFromString(std::string_view type) noexcept
Definition: typeOperations.cpp:17
helics::CoreType
CoreType
Definition: CoreTypes.hpp:36
helics::CoreType::ZMQ
@ ZMQ
use the Zero MQ networking protocol
helics::CoreType::INPROC
@ INPROC
core/broker using a stripped down in process core type
helics::CoreType::ZMQ_SS
@ ZMQ_SS
coreTypeOperations.hpp
helics::CoreType::DEFAULT
@ DEFAULT
ZMQ if available or UDP.
helics::isCoreTypeAvailable
bool isCoreTypeAvailable(CoreType type) noexcept
Definition: typeOperations.cpp:22
helics::CoreType::UNRECOGNIZED
@ UNRECOGNIZED
unknown
helics::CoreType::MPI
@ MPI
use MPI for operation on a parallel cluster
helics::CoreType::INTERPROCESS
@ INTERPROCESS
use when all federates are on the same machine
helics::CoreType::TEST
@ TEST
use the Test core if all federates are in the same process
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
core-exceptions.hpp
helics::CoreType::EMPTY
@ EMPTY
core type that does nothing and can't communicate
helics::CoreType::HTTP
@ HTTP
core/broker using web traffic
helics::CoreType::IPC
@ IPC
same as INTERPROCESS
helics::CoreType::TCP
@ TCP
use a generic TCP protocol message stream to send messages
helics::to_string
std::string to_string(CoreType type)
Definition: typeOperations.cpp:12
CoreTypes.hpp
helics::CoreType::NULLCORE
@ NULLCORE
explicit core type that doesn't exist