MeshProtocolSimulator  1.0.0
Public Member Functions | Public Attributes | List of all members
RawMessageDescriptor Struct Reference

Class, that holds description of shared pointer to RawMessage instance. This is most effective way, how to store RawMessage in all neighbor nodes without any data copying or allocating place for them. So only shared pointer to RawMessage is shared and other fields are not shared (can be changed on each neighbor node and this change will not be reflected to another neighbor node's messages). More...

#include <Emulator_helpers.h>

Public Member Functions

 RawMessageDescriptor (std::shared_ptr< RawMessage > &msg_ptr)
 

Public Attributes

bool IsInterfered = false
 True if message was interfered yet.
 
float RSSI = 0.00
 RSSI value of received message.
 
bool BadQuality = false
 True if message cannot be read due to bad quality.
 
std::shared_ptr< RawMessageMessage
 Shared pointer to sent message. This acts as pointer to sent message. It is used to prevent copying same message data for each neighbor node. Main advantage of shared_ptr is, that instance, it is pointing to will be automatically destroyied when no shared pointer points to that instance, same as garbagge collector does. More...
 

Detailed Description

Class, that holds description of shared pointer to RawMessage instance. This is most effective way, how to store RawMessage in all neighbor nodes without any data copying or allocating place for them. So only shared pointer to RawMessage is shared and other fields are not shared (can be changed on each neighbor node and this change will not be reflected to another neighbor node's messages).

Member Data Documentation

◆ Message

std::shared_ptr<RawMessage> RawMessageDescriptor::Message

Shared pointer to sent message. This acts as pointer to sent message. It is used to prevent copying same message data for each neighbor node. Main advantage of shared_ptr is, that instance, it is pointing to will be automatically destroyied when no shared pointer points to that instance, same as garbagge collector does.

Warning
As this is only pointer, every change will be reflected to other descriptors, which has pointers to same message.

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