| helics 3.6.1

Public Member Functions | Public Attributes | List of all members
helics::Message Class Reference

`#include <core-data.hpp>`

## Public Member Functions
| Message ()=default
void | swap (Message &m2) noexcept
bool | isValid () const noexcept
std::string_view | to_string () const
void | clear ()

## Public Attributes
Time | time = timeZero
| the event time the message is sent
std::uint16_t | flags {0}
| message flags
std::uint16_t | messageValidation {0U}
| extra field for user object usage, not used by HELICS
std::int32_t | messageID {0}
| the messageID for a message
SmallBuffer | data
| the data packet for the message
std::string | dest
| the destination of the message
std::string | source
| the most recent source of the message
std::string | original_source
| the original source of the message
std::string | original_dest
| the original destination of a message
std::int32_t | counter {0}
| indexing counter not used directly by helics
void * | backReference {nullptr}
| back referencing pointer not used by helics

## Detailed Description

class containing a message structure

## Constructor & Destructor Documentation

## ◆ Message()

helics::Message::Message | ( |  | ) |
| default

default constructor

## Member Function Documentation

## ◆ clear()

void helics::Message::clear | ( |  | ) |
| inline

clear all data from the message

References counter, data, dest, flags, messageID, original_dest, original_source, source, time, and helics::timeZero.

## ◆ isValid()

bool helics::Message::isValid | ( |  | ) | const
| inline noexcept

check if the Message contains an actual Message

Returns
  false if there is no Message data

References data, dest, helics::SmallBuffer::empty(), and source.

## ◆ swap()

void helics::Message::swap | ( | Message & | m2 | ) |
| inline noexcept

swap operation for the Message

References data, dest, flags, messageID, original_dest, original_source, source, helics::SmallBuffer::swap(), and time.

## ◆ to_string()

std::string_view helics::Message::to_string | ( |  | ) | const
| inline

get the payload as a string

References data, and helics::SmallBuffer::to_string().

The documentation for this class was generated from the following file:

- core-data.hpp