FARGOS/VISTA Object Management Environment Core
..
|
Shared memory variable which allows statistics and operational controls to be exposed to other processes with minimal runtime overhead. More...
#include <shared_variable.hpp>
Classes | |
struct | SharedMemoryVariable_Record |
Storage layout for shared memory variable record within a memory mapped segment. More... | |
Public Types | |
enum | SharedMemoryVariableType { SMV_TYPE_NONE =0, SMV_TYPE_UNSIGNED =1, SMV_TYPE_LARGE =2, SMV_TYPE_INT32 =4, SMV_TYPE_UINT32 =SMV_TYPE_INT32|SMV_TYPE_UNSIGNED, SMV_TYPE_INT64 =SMV_TYPE_INT32|SMV_TYPE_LARGE, SMV_TYPE_UINT64 =SMV_TYPE_INT64|SMV_TYPE_UNSIGNED, SMV_TYPE_FLOAT =8, SMV_TYPE_DOUBLE =SMV_TYPE_FLOAT|SMV_TYPE_LARGE, SMV_TYPE_FIXED =SMV_TYPE_FLOAT|SMV_TYPE_UNSIGNED, SMV_TYPE_TINY_STRING =16, SMV_TYPE_TINY_BINARY_STRING =SMV_TYPE_TINY_STRING|SMV_TYPE_UNSIGNED, SMV_TYPE_STRING =SMV_TYPE_TINY_STRING|SMV_TYPE_LARGE, SMV_TYPE_BINARY_STRING =SMV_TYPE_STRING|SMV_TYPE_UNSIGNED, SMV_TYPE_NAME_NODE =32 } |
enum | { SMV_DISPLAY_NAME =1, SMV_DISPLAY_VALUE =2, SMV_DISPLAY_TYPE =4, SMV_DISPLAY_EQUALS =8 } |
Public Member Functions | |
SharedMemoryVariableNode * | getParentNode () const |
SharedMemoryVariableManager * | getVariableManager () const |
unsigned int | getType () const OME_ALWAYS_INLINE |
Return type of variable, see SharedMemoryVariableType. More... | |
unsigned int | getMinLength () const OME_ALWAYS_INLINE |
Return minimum number of bytes required for variable record. More... | |
const char * | getName (uint_fast32_t *retNameLen=nullptr) const OME_ALWAYS_INLINE |
Get variable name. More... | |
int | setName (const char *newName) |
Set new variable name. More... | |
uint_fast32_t | getFullName (char *bfr, uint_fast32_t bfrLen) const |
Get full path name of variable. More... | |
SharedMemoryVariable (class SharedMemoryVariableManager *mgr, const char *varName, int varType, size_t length) | |
Construct an shared memory variable and attach to the indicated manager for the collection of variables. More... | |
SharedMemoryVariable (class SharedMemoryVariableNode *parentNode, const char *varName, int varType, size_t length) | |
virtual | ~SharedMemoryVariable () |
virtual void | noteNowRegistered (SharedMemoryVariable_Record *newArea) |
Extension mechanism to allow derived classes to be informed when they are about to be assigned storage; called at most once per lifetime of object. More... | |
void | makeAliasFor (SharedMemoryVariable *v) |
Static Public Member Functions | |
static const char * | typeName (unsigned int t) OME_CONST_FUNCTION |
Return type as text string. More... | |
Protected Attributes | |
SharedMemoryVariable_Record * | dataPointer |
class SharedMemoryVariableNode * | parentNodeRecord |
class SharedMemoryVariableManager * | variableManager |
const char * | variableName |
uint32_t | minLength |
unsigned char | dataType |
unsigned char | registered |
unsigned char | _pad1 [2] |
Static Protected Attributes | |
static SharedMemoryVariable_Record | unallocated_data |
Friends | |
class | SharedMemoryVariableManager |
Shared memory variable which allows statistics and operational controls to be exposed to other processes with minimal runtime overhead.
SharedMemoryVariable::SharedMemoryVariable | ( | class SharedMemoryVariableManager * | mgr, |
const char * | varName, | ||
int | varType, | ||
size_t | length | ||
) |
Construct an shared memory variable and attach to the indicated manager for the collection of variables.
References dataPointer, dataType, l, length(), minLength, OME_EXPECT_TRUE, parentNodeRecord, registered, SharedMemoryVariableManager::registerVariable(), variableManager, and variableName.
SharedMemoryVariable::SharedMemoryVariable | ( | class SharedMemoryVariableNode * | parentNode, |
const char * | varName, | ||
int | varType, | ||
size_t | length | ||
) |
|
virtual |
uint_fast32_t SharedMemoryVariable::getFullName | ( | char * | bfr, |
uint_fast32_t | bfrLen | ||
) | const |
Get full path name of variable.
References getName(), and parentNodeRecord.
|
inline |
Return minimum number of bytes required for variable record.
References minLength.
Referenced by SharedMemoryVariableManager::allocateVariable().
|
inline |
Get variable name.
References dataPointer, OME_EXPECT_TRUE, registered, variableName, SharedMemoryVariable::SharedMemoryVariable_Record::varName, and SharedMemoryVariable::SharedMemoryVariable_Record::varNameLength.
Referenced by SharedMemoryVariableManager::allocateVariable(), TimedCondition::getConditionName(), getFullName(), TimedMutex::getMutexName(), OMEprofileCounter< uint32_t >::getName(), OMEprofileString< MAX_STRING_LEN >::getName(), IO_Processor::IO_Processor(), and SharedMemoryVariableManager::registerVariable().
|
inline |
References parentNodeRecord.
|
inline |
Return type of variable, see SharedMemoryVariableType.
References dataType.
Referenced by SharedMemoryVariableManager::allocateVariable().
|
inline |
References variableManager.
Referenced by SharedMemoryVariable().
|
inline |
References dataPointer.
|
inlinevirtual |
Extension mechanism to allow derived classes to be informed when they are about to be assigned storage; called at most once per lifetime of object.
Reimplemented in SMV_StandaloneString< MAXLEN >, SMV_StandaloneString< 128 >, SMV_StandaloneNumeric< NUMTYPE >, SMV_StandaloneNumeric< uint32_t >, SMV_StandaloneNumeric< int32_t >, and SMV_StandaloneNumeric< uint64_t >.
Referenced by SharedMemoryVariableManager::allocateVariable().
|
inline |
Set new variable name.
References dataPointer, registered, variableName, SharedMemoryVariable::SharedMemoryVariable_Record::varName, and SharedMemoryVariable::SharedMemoryVariable_Record::varNameLength.
Referenced by SMV_StandaloneNode< MAXLEN >::SMV_StandaloneNode().
|
static |
Return type as text string.
References SMV_TYPE_BINARY_STRING, SMV_TYPE_DOUBLE, SMV_TYPE_FLOAT, SMV_TYPE_INT32, SMV_TYPE_INT64, SMV_TYPE_NAME_NODE, SMV_TYPE_STRING, SMV_TYPE_UINT32, and SMV_TYPE_UINT64.
Referenced by SharedMemoryVariable::SharedMemoryVariable_Record::formatAsText().
|
friend |
|
protected |
|
protected |
Referenced by SharedMemoryVariableManager::allocateVariable(), SMV_Numeric< NUMTYPE >::getAddress(), SMV_StandaloneNumeric< uint64_t >::getAddress(), getName(), makeAliasFor(), SMV_StandaloneNumeric< uint64_t >::noteNowRegistered(), SMV_StandaloneString< 128 >::noteNowRegistered(), SMV_String::operator const char *(), SMV_StandaloneString< 128 >::operator const char *(), SMV_Numeric< NUMTYPE >::operator const NUMTYPE *(), SMV_StandaloneNumeric< uint64_t >::operator const uint64_t *(), SMV_Numeric< NUMTYPE >::operator NUMTYPE(), SMV_StandaloneNumeric< uint64_t >::operator uint64_t(), SMV_Numeric< NUMTYPE >::operator*=(), SMV_StandaloneNumeric< uint64_t >::operator*=(), SMV_Numeric< NUMTYPE >::operator++(), SMV_StandaloneNumeric< uint64_t >::operator++(), SMV_Numeric< NUMTYPE >::operator+=(), SMV_StandaloneNumeric< uint64_t >::operator+=(), SMV_Numeric< NUMTYPE >::operator--(), SMV_StandaloneNumeric< uint64_t >::operator--(), SMV_Numeric< NUMTYPE >::operator-=(), SMV_StandaloneNumeric< uint64_t >::operator-=(), SMV_Numeric< NUMTYPE >::operator/=(), SMV_StandaloneNumeric< uint64_t >::operator/=(), SMV_Numeric< NUMTYPE >::operator=(), SMV_StandaloneNumeric< uint64_t >::operator=(), SMV_String::operator=(), SMV_StandaloneString< 128 >::operator=(), setName(), SharedMemoryVariable(), SMV_StandaloneNumeric< uint64_t >::SMV_StandaloneNumeric(), and SMV_StandaloneString< 128 >::SMV_StandaloneString().
|
protected |
Referenced by getType(), and SharedMemoryVariable().
|
protected |
Referenced by getMinLength(), and SharedMemoryVariable().
|
protected |
Referenced by SharedMemoryVariableManager::allocateVariable(), getFullName(), getParentNode(), and SharedMemoryVariable().
|
protected |
|
staticprotected |
|
protected |
|
protected |
Referenced by getName(), setName(), and SharedMemoryVariable().
![]() | Generated: Tue Jul 28 2020 16:03:27
Support Information |