lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lintel::PropertyChange Struct Reference

#include <PropertyChange.h>

Public Member Functions

std::string identifier () const
 

Static Public Member Functions

static PropertyChange of (PropertyBase &property)
 

Public Attributes

char processName [PART_SIZE] {}
 
char className [PART_SIZE] {}
 
char instanceName [PART_SIZE] {}
 
char name [PART_SIZE] {}
 
char value [VALUE_SIZE] {}
 
bool m_valueTruncated = false
 

Static Public Attributes

static constexpr std::size_t PART_SIZE = 32
 
static constexpr std::size_t VALUE_SIZE = Event::CONTENT_SIZE - 4 * PART_SIZE - 1
 
static constexpr std::size_t MAX_VALUE_LENGTH = VALUE_SIZE - 1
 

Detailed Description

Fixed-size change notification for a property, exchanged over the EventBus.

Carries the property coordinates and the new value as a string. The struct is trivially copyable and fits into the Event payload, so it can be stored inside the lock-free queues of the bus.

Values longer than the value buffer are marked as truncated (m_valueTruncated). The receiving side must then resolve the full value from a locked source (e.g. the shared memory repository) instead of using the truncated string; a truncated change is never applied with a wrong value.

Member Function Documentation

◆ identifier()

std::string lintel::PropertyChange::identifier ( ) const
inline
Returns
the unique identifier name_instanceName_className_processName

◆ of()

static PropertyChange lintel::PropertyChange::of ( PropertyBase &  property)
inlinestatic

Create a change notification from a property.

Parameters
propertythe property that was changed
Returns
the change notification carrying the new value

Member Data Documentation

◆ className

char lintel::PropertyChange::className[PART_SIZE] {}

◆ instanceName

char lintel::PropertyChange::instanceName[PART_SIZE] {}

◆ m_valueTruncated

bool lintel::PropertyChange::m_valueTruncated = false

True if the value did not fit into the buffer and was truncated.

◆ MAX_VALUE_LENGTH

constexpr std::size_t lintel::PropertyChange::MAX_VALUE_LENGTH = VALUE_SIZE - 1
staticconstexpr

Maximum length of the value that fits into the buffer.

◆ name

char lintel::PropertyChange::name[PART_SIZE] {}

◆ PART_SIZE

constexpr std::size_t lintel::PropertyChange::PART_SIZE = 32
staticconstexpr

Buffer size for each identifier part.

◆ processName

char lintel::PropertyChange::processName[PART_SIZE] {}

◆ value

char lintel::PropertyChange::value[VALUE_SIZE] {}

◆ VALUE_SIZE

constexpr std::size_t lintel::PropertyChange::VALUE_SIZE = Event::CONTENT_SIZE - 4 * PART_SIZE - 1
staticconstexpr

Buffer size for the serialized value string (including terminator).


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