fesa-core  7.0.0
fesa::FieldTrackerDataManager Class Reference

#include <FieldTrackerDataManager.h>

Inheritance diagram for fesa::FieldTrackerDataManager:
fesa::FieldDataManager fesa::DataManager

Public Member Functions

uint32_t registerField (AbstractField &field)
 
uint32_t registerModifiedFields (const std::set< ModifiedField > &fields)
 
void initialCopy ()
 
void update (uint16_t oldIndex, uint16_t newIndex)
 
const void * getFieldAddress (uint16_t bufferIndex, uint32_t fieldIndex)
 
std::size_t getSharedFieldsSize (std::size_t numberOfFieldSlots, bool multiProcess) const
 
void mapSharedFields (char *memory, std::size_t numberOfFieldSlots, bool multiProcess, bool first)
 

Detailed Description

Implementation of FieldDataManager for shared setting fields.

Member Function Documentation

const void * fesa::FieldTrackerDataManager::getFieldAddress ( uint16_t  bufferIndex,
uint32_t  fieldIndex 
)
virtual

Returns the address of the field whose index id fieldIndex in the reader buffer whose index is bufferIndex.

Implements fesa::FieldDataManager.

std::size_t fesa::FieldTrackerDataManager::getSharedFieldsSize ( std::size_t  numberOfFieldSlots,
bool  multiProcess 
) const
virtual

Returns the size of the fields shared between the server and RT parts.

Parameters
numberOfFieldSlotstotal number of field slots to reserve memory for.
multiProcesstrue if multiple process will access the shared fields, false otherwise

Implements fesa::FieldDataManager.

void fesa::FieldTrackerDataManager::initialCopy ( )
virtual

Performs the initial copy of the data from the reference buffer to the reader buffers. Called once before any call to update().

Implements fesa::DataManager.

void fesa::FieldTrackerDataManager::mapSharedFields ( char *  memory,
std::size_t  numberOfFieldSlots,
bool  multiProcess,
bool  first 
)
virtual

Maps the shared fields, starting at the address pointed to by memory.

Parameters
memoryaddress where the mapping starts
numberOfFieldSlotsnumber of field slots for which memory was reserved
multiProcesstrue if multiple process will access the shared fields, false otherwise
firsttrue if shared fields must be initialized (typically when fields are mapped for the first time), false otherwise.

Implements fesa::FieldDataManager.

uint32_t fesa::FieldTrackerDataManager::registerField ( AbstractField field)
virtual

Registers a field as synchronizable (normally only shared setting fields).

Implements fesa::FieldDataManager.

uint32_t fesa::FieldTrackerDataManager::registerModifiedFields ( const std::set< ModifiedField > &  fields)
virtual

Registers a field as modified. To be called after field slots have been modified, so that they will be synchronized.

Implements fesa::FieldDataManager.

void fesa::FieldTrackerDataManager::update ( uint16_t  oldIndex,
uint16_t  newIndex 
)
virtual

Updates the reader buffers. Called by BufferSynchronizer when an update can be safely done.

Parameters
oldIndexindex of the reader buffer which is about to become the old buffer
newIndexindex of the reader buffer which is about to become the new buffer

Implements fesa::DataManager.


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