helics  2.8.1
Enumerations | Functions | Variables
flagOperations.hpp File Reference
#include <cstdint>

Go to the source code of this file.

Enumerations

enum  operation_flags : uint16_t {
  iteration_requested_flag = 0, destination_target = 1, required_flag = 2, core_flag = 3,
  error_flag = 4, indicator_flag = 5, use_json_serialization_flag = 6, extra_flag1 = 7,
  optional_flag = 8, clone_flag, extra_flag2 = 10, destination_processing_flag,
  disconnected_flag = 12, extra_flag3 = 13, extra_flag4 = 14, empty_flag = 15
}
 

Functions

template<class FlagContainer , class FlagIndex >
void setActionFlag (FlagContainer &M, FlagIndex flag)
 
template<class FlagIndex >
bool checkActionFlag (uint16_t flags, FlagIndex flag)
 
template<class FlagContainer , class FlagIndex >
bool checkActionFlag (const FlagContainer &M, FlagIndex flag)
 
template<class FlagContainer , class FlagIndex >
void clearActionFlag (FlagContainer &M, FlagIndex flag)
 
constexpr uint16_t make_flags (unsigned int flag)
 
constexpr uint16_t make_flags (unsigned int flag1, unsigned int flag2)
 
constexpr uint16_t make_flags (unsigned int flag1, unsigned int flag2, unsigned int flag3)
 

Variables

constexpr uint16_t slow_responding_flag = extra_flag4
 overload of extra_flag4 indicating a federate, core or broker is slow responding
 
constexpr uint16_t cancel_flag = extra_flag3
 overload of extra_flag3 indicating an operation is canceled
 
constexpr uint16_t parent_flag = extra_flag3
 overload of extra_flag3 indicating the message is from a parent object
 
constexpr uint16_t child_flag = extra_flag4
 overload of extra_flag4 indicating a message is from a child object
 
constexpr uint16_t non_counting_flag = empty_flag
 overload of nameless_interface_flag indicating that a federate should not count in any totals
 
constexpr uint16_t non_granting_flag = extra_flag1
 overload of extra_flag1 to indicate the request is from a non-granting federate
 
constexpr uint16_t delayed_timing_flag = extra_flag2
 overload of extra_flag2 to indicate the request is from federate with delayed timing
 
constexpr uint16_t nameless_interface_flag = empty_flag
 overload of flag to indicate an interface is nameless
 

Detailed Description

operations and helper functions for handling flags in helics

Enumeration Type Documentation

◆ operation_flags

enum operation_flags : uint16_t

flag definitions for the action Message Flag field

Enumerator
iteration_requested_flag 

indicator that an iteration has been requested

destination_target 

indicator that the target is a destination target

required_flag 

flag indicating that an action or match is required

core_flag 

flag indicating that message comes from a core vs a broker

error_flag 

flag indicating an error condition associated with the command

indicator_flag 

flag used for setting values

use_json_serialization_flag 

flag to indicate it should use the json packetization

extra_flag1 

extra flag

optional_flag 

flag indicating that a connection is optional and may not be matched

clone_flag 

flag indicating the filter is a clone filter or the data needs to be cloned

extra_flag2 

extra flag

destination_processing_flag 

flag indicating the message is for destination processing

disconnected_flag 

flag indicating that a broker/federate is disconnected

extra_flag3 

extra flag

extra_flag4 

extra flag

empty_flag 

flag indicating the interface is nameless

Function Documentation

◆ checkActionFlag() [1/2]

template<class FlagContainer , class FlagIndex >
bool checkActionFlag ( const FlagContainer &  M,
FlagIndex  flag 
)
inline

template function to check a flag in an object containing a flags field

◆ checkActionFlag() [2/2]

template<class FlagIndex >
bool checkActionFlag ( uint16_t  flags,
FlagIndex  flag 
)
inline

◆ clearActionFlag()

template<class FlagContainer , class FlagIndex >
void clearActionFlag ( FlagContainer &  M,
FlagIndex  flag 
)
inline

template function to clear a flag in an object containing a flags field

◆ make_flags() [1/3]

constexpr uint16_t make_flags ( unsigned int  flag)
inlineconstexpr

◆ make_flags() [2/3]

constexpr uint16_t make_flags ( unsigned int  flag1,
unsigned int  flag2 
)
inlineconstexpr

helper function to facilitate make a flag variable out of two flags

References make_flags().

◆ make_flags() [3/3]

constexpr uint16_t make_flags ( unsigned int  flag1,
unsigned int  flag2,
unsigned int  flag3 
)
inlineconstexpr

helper function to facilitate make a flag variable out of three flags

References make_flags().

◆ setActionFlag()

template<class FlagContainer , class FlagIndex >
void setActionFlag ( FlagContainer &  M,
FlagIndex  flag 
)
inline