helics  3.0.1
TimeCoordinatorProcessing.hpp
1 /*
2 Copyright (c) 2017-2021,
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 
9 #include "TimeCoordinator.hpp"
10 
11 #include <tuple>
12 
13 namespace helics {
14 std::tuple<FederateStates, MessageProcessingResult, bool>
15  processCoordinatorMessage(ActionMessage& cmd,
16  TimeCoordinator* timeCoord,
17  const FederateStates state,
18  const bool timeGranted_mode,
19  const GlobalFederateId localID);
20 
21 }
helics::message_process_result::processed
@ processed
the message was used to update the current state
helics::returnableResult
bool returnableResult(MessageProcessingResult result)
Definition: CoreTypes.hpp:75
helics::message_process_result::delay_processing
@ delay_processing
the message should be delayed and reprocessed later
helics::parent_broker_id
constexpr GlobalBrokerId parent_broker_id
Definition: GlobalFederateId.hpp:60
iteration_requested_flag
@ iteration_requested_flag
indicator that an iteration has been requested
Definition: flagOperations.hpp:16
helics::IterationRequest::FORCE_ITERATION
@ FORCE_ITERATION
force an iteration whether it is needed or not
checkActionFlag
bool checkActionFlag(uint16_t flags, FlagIndex flag)
Definition: flagOperations.hpp:85
helics::MessageProcessingResult::ITERATING
@ ITERATING
indicator that the iterations need to continue
helics::root_broker_id
constexpr GlobalBrokerId root_broker_id
Definition: GlobalFederateId.hpp:62
observer_flag
constexpr uint16_t observer_flag
overload of optional_flag indicating that a federate is an observer only
Definition: flagOperations.hpp:43
helics::IterationRequest
IterationRequest
Definition: CoreTypes.hpp:89
helics::MessageProcessingResult::DELAY_MESSAGE
@ DELAY_MESSAGE
delay the current message and continue processing
indicator_flag
@ indicator_flag
flag used for setting values
Definition: flagOperations.hpp:21
helics::IterationRequest::ITERATE_IF_NEEDED
@ ITERATE_IF_NEEDED
indicator that the iterations need to continue
helics::HELICS_EXECUTING
@ HELICS_EXECUTING
the federation has entered execution state and it now advancing in time
Definition: CoreTypes.hpp:25
helics::MessageProcessingResult::ERROR_RESULT
@ ERROR_RESULT
indicator that an error has occurred
helics::HELICS_TERMINATING
@ HELICS_TERMINATING
the federate is in the process of shutting down
Definition: CoreTypes.hpp:26
helics::message_process_result::no_effect
@ no_effect
the message did not result in an update
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
required_flag
@ required_flag
flag indicating that an action or match is required
Definition: flagOperations.hpp:18
helics::FederateStates
FederateStates
Definition: CoreTypes.hpp:21
helics::MessageProcessingResult::CONTINUE_PROCESSING
@ CONTINUE_PROCESSING
the current loop should continue
helics::MessageProcessingResult::HALTED
@ HALTED
indicator that the simulation has been halted
flagOperations.hpp
helics::HELICS_ERROR
@ HELICS_ERROR
the federation has encountered an error
Definition: CoreTypes.hpp:27
helics::MessageProcessingResult
MessageProcessingResult
Definition: CoreTypes.hpp:64
helics::HELICS_INITIALIZING
@ HELICS_INITIALIZING
Definition: CoreTypes.hpp:23
helics::IterationRequest::NO_ITERATIONS
@ NO_ITERATIONS
indicator that the iterations have completed
helics::HELICS_FINISHED
@ HELICS_FINISHED
the federation has finished its execution
Definition: CoreTypes.hpp:28
helics::MessageProcessingResult::NEXT_STEP
@ NEXT_STEP
indicator that the iterations have completed