helics  3.3.0
TimeCoordinatorProcessing.hpp
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 
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::indicator_flag
@ indicator_flag
flag used for setting values
Definition: flagOperations.hpp:18
helics::MessageProcessingResult::USER_RETURN
@ USER_RETURN
indicator that there was a return request but no other conditions or issues
helics::returnableResult
bool returnableResult(MessageProcessingResult result)
Definition: CoreTypes.hpp:78
helics::message_process_result::delay_processing
@ delay_processing
the message should be delayed and reprocessed later
helics::FederateStates::TERMINATING
@ TERMINATING
the federate is in the process of shutting down
helics::parent_broker_id
constexpr GlobalBrokerId parent_broker_id
Definition: GlobalFederateId.hpp:64
helics::IterationRequest::FORCE_ITERATION
@ FORCE_ITERATION
force an iteration whether it is needed or not
helics::MessageProcessingResult::HALTED
@ HALTED
indicator that the simulation has been halted
helics::gRootBrokerID
constexpr GlobalBrokerId gRootBrokerID
Definition: GlobalFederateId.hpp:66
helics::IterationRequest
IterationRequest
Definition: CoreTypes.hpp:92
helics::MessageProcessingResult::ITERATING
@ ITERATING
indicator that the iterations need to continue
helics::FederateStates::INITIALIZING
@ INITIALIZING
helics::IterationRequest::ITERATE_IF_NEEDED
@ ITERATE_IF_NEEDED
indicator that the iterations need to continue
helics::MessageProcessingResult::ERROR_RESULT
@ ERROR_RESULT
indicator that an error has occurred
helics::MessageProcessingResult::CONTINUE_PROCESSING
@ CONTINUE_PROCESSING
the current loop should continue
helics::observer_flag
@ observer_flag
flag indicating that a federate is an observer only
Definition: flagOperations.hpp:83
helics::MessageProcessingResult
MessageProcessingResult
Definition: CoreTypes.hpp:64
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
helics::iteration_requested_flag
@ iteration_requested_flag
Definition: flagOperations.hpp:23
helics::checkActionFlag
bool checkActionFlag(uint16_t flags, FlagIndex flag)
Definition: flagOperations.hpp:138
helics::MessageProcessingResult::NEXT_STEP
@ NEXT_STEP
indicator that the iterations have completed
helics::FederateStates::EXECUTING
@ EXECUTING
the federation has entered execution state and it now advancing in time
helics::FederateStates::FINISHED
@ FINISHED
the federation has finished its execution
helics::required_flag
@ required_flag
flag indicating that an action or match is required
Definition: flagOperations.hpp:45
helics::MessageProcessingResult::DELAY_MESSAGE
@ DELAY_MESSAGE
delay the current message and continue processing
flagOperations.hpp
helics::IterationRequest::NO_ITERATIONS
@ NO_ITERATIONS
indicator that the iterations have completed
helics::FederateStates::ERRORED
@ ERRORED
the federation has encountered an error
helics::FederateStates
FederateStates
Definition: CoreTypes.hpp:21