rogue
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
rogue::interfaces::memory::Variable Class Reference

Memory variable descriptor and typed accessor facade. More...

#include <Variable.h>

Inheritance diagram for rogue::interfaces::memory::Variable:
rogue::interfaces::memory::VariableWrap

Public Member Functions

 Variable (std::string name, std::string mode, double minimum, double maximum, uint64_t offset, std::vector< uint32_t > bitOffset, std::vector< uint32_t > bitSize, bool overlapEn, bool verify, bool bulkOpEn, bool updateNotify, uint32_t modelId, bool byteReverse, bool bitReverse, uint32_t binPoint, uint32_t numValues, uint32_t valueBits, uint32_t valueStride, uint32_t retryCount)
 Constructs a variable descriptor.
 
virtual ~Variable ()
 Destroys the variable instance.
 
void shiftOffsetDown (uint32_t shift, uint32_t minSize)
 Shifts variable offset and packed bit fields downward.
 
void updatePath (std::string path)
 Updates the hierarchical path string for this variable.
 
uint32_t modelId () const
 Returns model ID of the variable.
 
uint32_t bitTotal () const
 Returns total number of bits for this value.
 
uint32_t byteSize () const
 Returns total bytes (rounded up) for this value.
 
const std::string & name () const
 Returns variable name.
 
const std::string & mode () const
 Returns variable mode string.
 
const std::string & path () const
 Returns variable path.
 
double minimum ()
 Returns minimum value.
 
double maximum ()
 Returns maximum value.
 
uint32_t varBytes ()
 Returns variable range in bytes.
 
uint64_t offset ()
 Returns variable byte offset.
 
bool verifyEn ()
 Returns verify-enable flag.
 
bool overlapEn ()
 Returns overlap-enable flag.
 
bool bulkOpEn ()
 Returns bulk-operation enable flag.
 
uint32_t numValues ()
 Returns number of values.
 
uint32_t valueBits ()
 Returns number of bits per value.
 
uint32_t valueBytes ()
 Returns number of bytes per value.
 
uint32_t valueStride ()
 Returns byte stride per value.
 
uint32_t retryCount ()
 Returns retry count.
 
virtual void queueUpdate ()
 Executes queue update callback (unused in C++).
 
void rateTest ()
 Runs a local throughput benchmark for variable get/set operations.
 
void setLogLevel (uint32_t level)
 Sets logging level for variable's block.
 
std::string getDumpValue (bool read)
 Returns string representation of value using default converters.
 
void read ()
 Performs a read operation for this variable.
 
void setByteArray (uint8_t *value, int32_t index=-1)
 Sets value from a raw byte array.
 
void getByteArray (uint8_t *value, int32_t index=-1)
 Gets value into a raw byte array.
 
void setUInt (uint64_t &value, int32_t index=-1)
 Sets an unsigned integer value.
 
void setValue (uint64_t value, int32_t index=-1)
 Convenience alias for setUInt.
 
uint64_t getUInt (int32_t index=-1)
 Gets unsigned integer value.
 
void getValue (uint64_t &valueRet, int32_t index=-1)
 Gets unsigned integer value into output reference.
 
void setInt (int64_t &value, int32_t index=-1)
 Sets signed integer value.
 
void setValue (int64_t value, int32_t index=-1)
 Convenience alias for setInt.
 
int64_t getInt (int32_t index=-1)
 Gets signed integer value.
 
void getValue (int64_t &valueRet, int32_t index=-1)
 Gets signed integer value into output reference.
 
void setBool (bool &value, int32_t index=-1)
 Sets boolean value.
 
void setValue (bool value, int32_t index=-1)
 Convenience alias for setBool.
 
bool getBool (int32_t index=-1)
 Gets boolean value.
 
void getValue (bool &valueRet, int32_t index=-1)
 Gets boolean value into output reference.
 
void setString (const std::string &value, int32_t index=-1)
 Sets string value.
 
void setValue (const std::string &value, int32_t index=-1)
 Convenience alias for setString.
 
std::string getString (int32_t index=-1)
 Gets string value.
 
void getString (std::string &retString, int32_t index=-1)
 Gets string value into output reference.
 
void getValue (std::string &valueRet, int32_t index=-1)
 Gets string value into output reference.
 
void setFloat (float &value, int32_t index=-1)
 Sets float value.
 
void setValue (float value, int32_t index=-1)
 Convenience alias for setFloat.
 
float getFloat (int32_t index=-1)
 Gets float value.
 
void getValue (float &valueRet, int32_t index=-1)
 Gets float value into output reference.
 
void setDouble (double &value, int32_t index=-1)
 Sets double value.
 
void setValue (double value, int32_t index=-1)
 Convenience alias for setDouble.
 
double getDouble (int32_t index=-1)
 Gets double value.
 
void getValue (double &valueRet, int32_t index=-1)
 Gets double value into output reference.
 
void setFixed (double &value, int32_t index=-1)
 Sets fixed-point value.
 
double getFixed (int32_t index=-1)
 Gets fixed-point value.
 

Static Public Member Functions

static rogue::interfaces::memory::VariablePtr create (std::string name, std::string mode, double minimum, double maximum, uint64_t offset, std::vector< uint32_t > bitOffset, std::vector< uint32_t > bitSize, bool overlapEn, bool verify, bool bulkOpEn, bool updateNotify, uint32_t modelId, bool byteReverse, bool bitReverse, uint32_t binPoint, uint32_t numValues, uint32_t valueBits, uint32_t valueStride, uint32_t retryCount)
 Creates a memory variable descriptor.
 
static void setup_python ()
 Registers Python bindings for this class.
 

Protected Attributes

rogue::interfaces::memory::Blockblock_
 
std::string name_
 
std::string path_
 
uint32_t modelId_
 
bool byteReverse_
 
bool bitReverse_
 
uint32_t bitTotal_
 
uint32_t * fastByte_
 
uint32_t byteSize_
 
uint32_t varBytes_
 
uint64_t offset_
 
std::vector< uint32_t > bitOffset_
 
std::vector< uint32_t > bitSize_
 
double minValue_
 
double maxValue_
 
bool bulkOpEn_
 
bool updateNotify_
 
std::string mode_
 
bool overlapEn_
 
bool verifyEn_
 
uint32_t * lowTranByte_
 
uint32_t * highTranByte_
 
void * customData_
 
uint32_t binPoint_
 
bool stale_
 
uint32_t staleLowByte_
 
uint32_t staleHighByte_
 
uint32_t numValues_
 
uint32_t valueBits_
 
uint32_t valueBytes_
 
uint32_t valueStride_
 
uint32_t retryCount_
 
void(rogue::interfaces::memory::Block::* setFuncPy_ )(boost::python::object &, rogue::interfaces::memory::Variable *, int32_t index)
 
boost::python::object(rogue::interfaces::memory::Block::* getFuncPy_ )(rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* setByteArray_ )(const uint8_t *, rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* getByteArray_ )(uint8_t *, rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* setUInt_ )(const uint64_t &, rogue::interfaces::memory::Variable *, int32_t index)
 
uint64_t(rogue::interfaces::memory::Block::* getUInt_ )(rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* setInt_ )(const int64_t &, rogue::interfaces::memory::Variable *, int32_t index)
 
int64_t(rogue::interfaces::memory::Block::* getInt_ )(rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* setBool_ )(const bool &, rogue::interfaces::memory::Variable *, int32_t index)
 
bool(rogue::interfaces::memory::Block::* getBool_ )(rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* setString_ )(const std::string &, rogue::interfaces::memory::Variable *, int32_t index)
 
std::string(rogue::interfaces::memory::Block::* getString_ )(rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* setFloat_ )(const float &, rogue::interfaces::memory::Variable *, int32_t index)
 
float(rogue::interfaces::memory::Block::* getFloat_ )(rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* setDouble_ )(const double &, rogue::interfaces::memory::Variable *, int32_t index)
 
double(rogue::interfaces::memory::Block::* getDouble_ )(rogue::interfaces::memory::Variable *, int32_t index)
 
void(rogue::interfaces::memory::Block::* setFixed_ )(const double &, rogue::interfaces::memory::Variable *, int32_t index)
 
double(rogue::interfaces::memory::Block::* getFixed_ )(rogue::interfaces::memory::Variable *, int32_t index)
 

Friends

class Block
 

Detailed Description

Memory variable descriptor and typed accessor facade.

A Variable defines how one logical value (or value array) maps into a parent memory Block. It stores layout and conversion metadata such as bit offsets, bit widths, endianness/bit-order behavior, and model ID.

The Variable API is type-oriented (setUInt, getFloat, setString, etc.), while the owning Block performs the low-level marshaling and transport:

Dispatch to the underlying Block conversion path is selected from modelId_ during construction. Using a mismatched typed API for the configured model raises a runtime error.

Definition at line 62 of file Variable.h.

Constructor & Destructor Documentation

◆ Variable()

rogue::interfaces::memory::Variable::Variable ( std::string  name,
std::string  mode,
double  minimum,
double  maximum,
uint64_t  offset,
std::vector< uint32_t >  bitOffset,
std::vector< uint32_t >  bitSize,
bool  overlapEn,
bool  verify,
bool  bulkOpEn,
bool  updateNotify,
uint32_t  modelId,
bool  byteReverse,
bool  bitReverse,
uint32_t  binPoint,
uint32_t  numValues,
uint32_t  valueBits,
uint32_t  valueStride,
uint32_t  retryCount 
)

Constructs a variable descriptor.

This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.

Parameters
nameVariable name.
modeVariable mode string.
minimumMinimum allowed value (range checking), 0 to disable.
maximumMaximum allowed value (range checking), 0 to disable.
offsetVariable byte offset within the parent block.
bitOffsetBit offsets for one or more packed values.
bitSizeBit widths for one or more packed values.
overlapEnAllow overlap checks to be bypassed.
verifyEnable readback verification on writes.
bulkOpEnEnable bulk operations when supported by the parent block.
updateNotifyEnable update callbacks into the variable tree.
modelIdModel identifier associated with this variable.
byteReverseEnable byte-order reversal.
bitReverseEnable bit-order reversal.
binPointBinary point used for fixed-point conversion.
numValuesNumber of values represented by this variable.
valueBitsBit width per value.
valueStrideByte stride between values.
retryCountNumber of retries for transport operations.

Definition at line 128 of file Variable.cpp.

◆ ~Variable()

rogue::interfaces::memory::Variable::~Variable ( )
virtual

Destroys the variable instance.

Definition at line 444 of file Variable.cpp.

Member Function Documentation

◆ bitTotal()

uint32_t rogue::interfaces::memory::Variable::bitTotal ( ) const
inline

Returns total number of bits for this value.

Definition at line 404 of file Variable.h.

◆ bulkOpEn()

bool rogue::interfaces::memory::Variable::bulkOpEn ( )

Returns bulk-operation enable flag.

Return bulk enable flag.

Definition at line 546 of file Variable.cpp.

◆ byteSize()

uint32_t rogue::interfaces::memory::Variable::byteSize ( ) const
inline

Returns total bytes (rounded up) for this value.

Definition at line 409 of file Variable.h.

◆ create()

rogue::interfaces::memory::VariablePtr rogue::interfaces::memory::Variable::create ( std::string  name,
std::string  mode,
double  minimum,
double  maximum,
uint64_t  offset,
std::vector< uint32_t >  bitOffset,
std::vector< uint32_t >  bitSize,
bool  overlapEn,
bool  verify,
bool  bulkOpEn,
bool  updateNotify,
uint32_t  modelId,
bool  byteReverse,
bool  bitReverse,
uint32_t  binPoint,
uint32_t  numValues,
uint32_t  valueBits,
uint32_t  valueStride,
uint32_t  retryCount 
)
static

Creates a memory variable descriptor.

Class factory which returns a pointer to a Variable (VariablePtr)

Exposed to Python as rogue.interfaces.memory.Variable(). This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returns std::shared_ptr ownership compatible with Rogue pointer typedefs.

Parameters
nameVariable name
modeVariable mode
minimumVariable min value, 0 for none
maximumVariable max value, 0 for none
offsetVariable byte offset within the parent block.
bitOffsetBit offset vector
bitSizeBit size vector
overlapEnOverlap enable flag
verifyVerify enable flag
bulkOpEnBulk read/write flag
updateNotifyEnable variable tree updates
modelIdVariable model ID
byteReverseByte reverse flag
bitReverseBit reverse flag
binPointBinary point for fixed-point values.
numValuesNumber of values represented by this variable.
valueBitsBit width per value.
valueStrideByte stride between values.
retryCountNumber of retries for transport operations.
Returns
Shared pointer to the created variable descriptor.

Company : SLAC National Accelerator Laboratory

Description:

Interface between RemoteVariables and lower level memory transactions.

This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms

contained in the LICENSE.txt file.

Definition at line 47 of file Variable.cpp.

◆ getBool()

bool rogue::interfaces::memory::Variable::getBool ( int32_t  index = -1)

Gets boolean value.

Issues a read transaction through the parent block, then converts staged bytes to bool.

Parameters
indexValue index, or -1 for the full variable.
Returns
Boolean value.

Definition at line 844 of file Variable.cpp.

◆ getByteArray()

void rogue::interfaces::memory::Variable::getByteArray ( uint8_t *  value,
int32_t  index = -1 
)

Gets value into a raw byte array.

Issues a read transaction through the parent block and then copies the staged value bytes into value.

Parameters
valuePointer to output byte buffer.
indexValue index, or -1 for the full variable.

Definition at line 784 of file Variable.cpp.

◆ getDouble()

double rogue::interfaces::memory::Variable::getDouble ( int32_t  index = -1)

Gets double value.

Issues a read transaction through the parent block, then converts staged bytes to double.

Parameters
indexValue index, or -1 for the full variable.
Returns
Double value.

Definition at line 913 of file Variable.cpp.

◆ getDumpValue()

std::string rogue::interfaces::memory::Variable::getDumpValue ( bool  read)

Returns string representation of value using default converters.

Return string representation of value using default converters.

Definition at line 690 of file Variable.cpp.

◆ getFixed()

double rogue::interfaces::memory::Variable::getFixed ( int32_t  index = -1)

Gets fixed-point value.

Issues a read transaction through the parent block, then converts staged bytes using configured fixed-point metadata.

Parameters
indexValue index, or -1 for the full variable.
Returns
Fixed-point value as double.

Definition at line 933 of file Variable.cpp.

◆ getFloat()

float rogue::interfaces::memory::Variable::getFloat ( int32_t  index = -1)

Gets float value.

Issues a read transaction through the parent block, then converts staged bytes to float.

Parameters
indexValue index, or -1 for the full variable.
Returns
Float value.

Definition at line 893 of file Variable.cpp.

◆ getInt()

int64_t rogue::interfaces::memory::Variable::getInt ( int32_t  index = -1)

Gets signed integer value.

Issues a read transaction through the parent block, then converts staged bytes to an int64_t.

Parameters
indexValue index, or -1 for the full variable.
Returns
Signed-integer value.

Definition at line 824 of file Variable.cpp.

◆ getString() [1/2]

std::string rogue::interfaces::memory::Variable::getString ( int32_t  index = -1)

Gets string value.

Issues a read transaction through the parent block, then converts staged bytes to std::string.

Parameters
indexValue index, or -1 for the full variable.
Returns
String value.

Definition at line 864 of file Variable.cpp.

◆ getString() [2/2]

void rogue::interfaces::memory::Variable::getString ( std::string &  retString,
int32_t  index = -1 
)
inline

Gets string value into output reference.

Parameters
retStringOutput reference receiving the value.
indexValue index, or -1 for the full variable.

Definition at line 725 of file Variable.h.

◆ getUInt()

uint64_t rogue::interfaces::memory::Variable::getUInt ( int32_t  index = -1)

Gets unsigned integer value.

Issues a read transaction through the parent block, then converts staged bytes to a uint64_t.

Parameters
indexValue index, or -1 for the full variable.
Returns
Unsigned-integer value.

Definition at line 804 of file Variable.cpp.

◆ getValue() [1/6]

void rogue::interfaces::memory::Variable::getValue ( bool &  valueRet,
int32_t  index = -1 
)
inline

Gets boolean value into output reference.

Parameters
valueRetOutput reference receiving the value.
indexValue index, or -1 for the full variable.

Definition at line 677 of file Variable.h.

◆ getValue() [2/6]

void rogue::interfaces::memory::Variable::getValue ( double &  valueRet,
int32_t  index = -1 
)
inline

Gets double value into output reference.

Parameters
valueRetOutput reference receiving the value.
indexValue index, or -1 for the full variable.

Definition at line 829 of file Variable.h.

◆ getValue() [3/6]

void rogue::interfaces::memory::Variable::getValue ( float &  valueRet,
int32_t  index = -1 
)
inline

Gets float value into output reference.

Parameters
valueRetOutput reference receiving the value.
indexValue index, or -1 for the full variable.

Definition at line 781 of file Variable.h.

◆ getValue() [4/6]

void rogue::interfaces::memory::Variable::getValue ( int64_t &  valueRet,
int32_t  index = -1 
)
inline

Gets signed integer value into output reference.

Parameters
valueRetOutput reference receiving the value.
indexValue index, or -1 for the full variable.

Definition at line 629 of file Variable.h.

◆ getValue() [5/6]

void rogue::interfaces::memory::Variable::getValue ( std::string &  valueRet,
int32_t  index = -1 
)

Gets string value into output reference.

Parameters
valueRetOutput reference receiving the value.
indexValue index, or -1 for the full variable.

Definition at line 872 of file Variable.cpp.

◆ getValue() [6/6]

void rogue::interfaces::memory::Variable::getValue ( uint64_t &  valueRet,
int32_t  index = -1 
)
inline

Gets unsigned integer value into output reference.

Parameters
valueRetOutput reference receiving the value.
indexValue index, or -1 for the full variable.

Definition at line 581 of file Variable.h.

◆ maximum()

double rogue::interfaces::memory::Variable::maximum ( )

Returns maximum value.

Return the maximum value.

Definition at line 521 of file Variable.cpp.

◆ minimum()

double rogue::interfaces::memory::Variable::minimum ( )

Returns minimum value.

Return the minimum value.

Definition at line 516 of file Variable.cpp.

◆ mode()

const std::string & rogue::interfaces::memory::Variable::mode ( ) const
inline

Returns variable mode string.

Common modes are "RW" (read/write), "RO" (read-only), and "WO" (write-only). Mode affects block-level transaction behavior.

Returns
Mode string.

Definition at line 427 of file Variable.h.

◆ modelId()

uint32_t rogue::interfaces::memory::Variable::modelId ( ) const
inline

Returns model ID of the variable.

See model ID constants in rogue/interfaces/memory/Constants.h, including: PyFunc, Bytes, UInt, Int, Bool, String, Float, Double, Fixed, and Custom.

Returns
Model identifier constant.

Definition at line 399 of file Variable.h.

◆ name()

const std::string & rogue::interfaces::memory::Variable::name ( ) const
inline

Returns variable name.

Definition at line 414 of file Variable.h.

◆ numValues()

uint32_t rogue::interfaces::memory::Variable::numValues ( )
inline

Returns number of values.

Definition at line 458 of file Variable.h.

◆ offset()

uint64_t rogue::interfaces::memory::Variable::offset ( )

Returns variable byte offset.

Get offset.

Definition at line 531 of file Variable.cpp.

◆ overlapEn()

bool rogue::interfaces::memory::Variable::overlapEn ( )

Returns overlap-enable flag.

Return overlap enable flag.

Definition at line 541 of file Variable.cpp.

◆ path()

const std::string & rogue::interfaces::memory::Variable::path ( ) const
inline

Returns variable path.

Definition at line 432 of file Variable.h.

◆ queueUpdate()

void rogue::interfaces::memory::Variable::queueUpdate ( )
virtual

Executes queue update callback (unused in C++).

Reimplemented in rogue::interfaces::memory::VariableWrap.

Definition at line 642 of file Variable.cpp.

◆ rateTest()

void rogue::interfaces::memory::Variable::rateTest ( )

Runs a local throughput benchmark for variable get/set operations.

Executes repeated typed accesses and prints timing/rate results. Intended for diagnostics/performance testing and not for normal control flow.

Definition at line 644 of file Variable.cpp.

◆ read()

void rogue::interfaces::memory::Variable::read ( )

Performs a read operation for this variable.

Requests that the parent block refresh this variable's bytes from downstream memory, then updates local staged state for subsequent typed get* calls.

Definition at line 685 of file Variable.cpp.

◆ retryCount()

uint32_t rogue::interfaces::memory::Variable::retryCount ( )
inline

Returns retry count.

Definition at line 478 of file Variable.h.

◆ setBool()

void rogue::interfaces::memory::Variable::setBool ( bool &  value,
int32_t  index = -1 
)

Sets boolean value.

Valid when this variable is configured for boolean conversion. Stages bytes and issues a write/verify transaction through the parent block.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 836 of file Variable.cpp.

◆ setByteArray()

void rogue::interfaces::memory::Variable::setByteArray ( uint8_t *  value,
int32_t  index = -1 
)

Sets value from a raw byte array.

Uses the byte-array conversion path selected for this variable and then issues a write/verify transaction through the parent block.

Parameters
valuePointer to input byte buffer.
indexValue index, or -1 for the full variable.

Definition at line 776 of file Variable.cpp.

◆ setDouble()

void rogue::interfaces::memory::Variable::setDouble ( double &  value,
int32_t  index = -1 
)

Sets double value.

Valid when this variable is configured for double-precision conversion. Stages bytes and issues a write/verify transaction through the parent block.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 905 of file Variable.cpp.

◆ setFixed()

void rogue::interfaces::memory::Variable::setFixed ( double &  value,
int32_t  index = -1 
)

Sets fixed-point value.

Valid when this variable is configured for fixed-point conversion. Uses configured binary-point metadata and issues a write/verify transaction through the parent block.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 925 of file Variable.cpp.

◆ setFloat()

void rogue::interfaces::memory::Variable::setFloat ( float &  value,
int32_t  index = -1 
)

Sets float value.

Valid when this variable is configured for floating-point conversion. Stages bytes and issues a write/verify transaction through the parent block.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 885 of file Variable.cpp.

◆ setInt()

void rogue::interfaces::memory::Variable::setInt ( int64_t &  value,
int32_t  index = -1 
)

Sets signed integer value.

Valid when this variable is configured for a signed-integer conversion path. Stages bytes and issues a write/verify transaction through the parent block.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 816 of file Variable.cpp.

◆ setLogLevel()

void rogue::interfaces::memory::Variable::setLogLevel ( uint32_t  level)

Sets logging level for variable's block.

Definition at line 681 of file Variable.cpp.

◆ setString()

void rogue::interfaces::memory::Variable::setString ( const std::string &  value,
int32_t  index = -1 
)

Sets string value.

Valid when this variable is configured for string conversion. Stages bytes and issues a write/verify transaction through the parent block.

Parameters
valueInput string value.
indexValue index, or -1 for the full variable.

Definition at line 856 of file Variable.cpp.

◆ setUInt()

void rogue::interfaces::memory::Variable::setUInt ( uint64_t &  value,
int32_t  index = -1 
)

Sets an unsigned integer value.

Valid when this variable is configured for an unsigned-integer conversion path. Stages bytes and issues a write/verify transaction through the parent block.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 796 of file Variable.cpp.

◆ setup_python()

void rogue::interfaces::memory::Variable::setup_python ( )
static

Registers Python bindings for this class.

Definition at line 89 of file Variable.cpp.

◆ setValue() [1/6]

void rogue::interfaces::memory::Variable::setValue ( bool  value,
int32_t  index = -1 
)
inline

Convenience alias for setBool.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 655 of file Variable.h.

◆ setValue() [2/6]

void rogue::interfaces::memory::Variable::setValue ( const std::string &  value,
int32_t  index = -1 
)
inline

Convenience alias for setString.

Parameters
valueInput string value.
indexValue index, or -1 for the full variable.

Definition at line 703 of file Variable.h.

◆ setValue() [3/6]

void rogue::interfaces::memory::Variable::setValue ( double  value,
int32_t  index = -1 
)
inline

Convenience alias for setDouble.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 807 of file Variable.h.

◆ setValue() [4/6]

void rogue::interfaces::memory::Variable::setValue ( float  value,
int32_t  index = -1 
)
inline

Convenience alias for setFloat.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 759 of file Variable.h.

◆ setValue() [5/6]

void rogue::interfaces::memory::Variable::setValue ( int64_t  value,
int32_t  index = -1 
)
inline

Convenience alias for setInt.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 607 of file Variable.h.

◆ setValue() [6/6]

void rogue::interfaces::memory::Variable::setValue ( uint64_t  value,
int32_t  index = -1 
)
inline

Convenience alias for setUInt.

Parameters
valueInput value.
indexValue index, or -1 for the full variable.

Definition at line 559 of file Variable.h.

◆ shiftOffsetDown()

void rogue::interfaces::memory::Variable::shiftOffsetDown ( uint32_t  shift,
uint32_t  minSize 
)

Shifts variable offset and packed bit fields downward.

Used by Block during mapping/normalization to convert an absolute bit layout into block-local coordinates and to recompute cached transfer boundaries. This updates derived members such as byte coverage, fast-copy regions, and per-value low/high transaction byte ranges.

Parameters
shiftNumber of bits to shift down.
minSizeMinimum alignment/size constraint in bits.

Definition at line 451 of file Variable.cpp.

◆ updatePath()

void rogue::interfaces::memory::Variable::updatePath ( std::string  path)

Updates the hierarchical path string for this variable.

Called when the variable is attached/moved within a device tree so logs, diagnostics, and exported metadata reflect the full resolved path.

Parameters
pathNew full path in the variable tree.

Definition at line 511 of file Variable.cpp.

◆ valueBits()

uint32_t rogue::interfaces::memory::Variable::valueBits ( )
inline

Returns number of bits per value.

Definition at line 463 of file Variable.h.

◆ valueBytes()

uint32_t rogue::interfaces::memory::Variable::valueBytes ( )
inline

Returns number of bytes per value.

Definition at line 468 of file Variable.h.

◆ valueStride()

uint32_t rogue::interfaces::memory::Variable::valueStride ( )
inline

Returns byte stride per value.

Definition at line 473 of file Variable.h.

◆ varBytes()

uint32_t rogue::interfaces::memory::Variable::varBytes ( )

Returns variable range in bytes.

Return variable range bytes.

Definition at line 526 of file Variable.cpp.

◆ verifyEn()

bool rogue::interfaces::memory::Variable::verifyEn ( )

Returns verify-enable flag.

Return verify enable flag.

Definition at line 536 of file Variable.cpp.

Friends And Related Symbol Documentation

◆ Block

friend class Block
friend

Definition at line 63 of file Variable.h.

Member Data Documentation

◆ binPoint_

uint32_t rogue::interfaces::memory::Variable::binPoint_
protected

Definition at line 136 of file Variable.h.

◆ bitOffset_

std::vector<uint32_t> rogue::interfaces::memory::Variable::bitOffset_
protected

Definition at line 100 of file Variable.h.

◆ bitReverse_

bool rogue::interfaces::memory::Variable::bitReverse_
protected

Definition at line 82 of file Variable.h.

◆ bitSize_

std::vector<uint32_t> rogue::interfaces::memory::Variable::bitSize_
protected

Definition at line 103 of file Variable.h.

◆ bitTotal_

uint32_t rogue::interfaces::memory::Variable::bitTotal_
protected

Definition at line 85 of file Variable.h.

◆ block_

rogue::interfaces::memory::Block* rogue::interfaces::memory::Variable::block_
protected

Definition at line 67 of file Variable.h.

◆ bulkOpEn_

bool rogue::interfaces::memory::Variable::bulkOpEn_
protected

Definition at line 112 of file Variable.h.

◆ byteReverse_

bool rogue::interfaces::memory::Variable::byteReverse_
protected

Definition at line 79 of file Variable.h.

◆ byteSize_

uint32_t rogue::interfaces::memory::Variable::byteSize_
protected

Definition at line 91 of file Variable.h.

◆ customData_

void* rogue::interfaces::memory::Variable::customData_
protected

Definition at line 133 of file Variable.h.

◆ fastByte_

uint32_t* rogue::interfaces::memory::Variable::fastByte_
protected

Definition at line 88 of file Variable.h.

◆ getBool_

bool(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getBool_) (rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 217 of file Variable.h.

◆ getByteArray_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getByteArray_) (uint8_t *, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 185 of file Variable.h.

◆ getDouble_

double(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getDouble_) (rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 247 of file Variable.h.

◆ getFixed_

double(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getFixed_) (rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 257 of file Variable.h.

◆ getFloat_

float(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getFloat_) (rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 237 of file Variable.h.

◆ getFuncPy_

boost::python::object(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getFuncPy_) (rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 173 of file Variable.h.

◆ getInt_

int64_t(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getInt_) (rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 207 of file Variable.h.

◆ getString_

std::string(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getString_) (rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 227 of file Variable.h.

◆ getUInt_

uint64_t(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::getUInt_) (rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 197 of file Variable.h.

◆ highTranByte_

uint32_t* rogue::interfaces::memory::Variable::highTranByte_
protected

Definition at line 130 of file Variable.h.

◆ lowTranByte_

uint32_t* rogue::interfaces::memory::Variable::lowTranByte_
protected

Definition at line 127 of file Variable.h.

◆ maxValue_

double rogue::interfaces::memory::Variable::maxValue_
protected

Definition at line 109 of file Variable.h.

◆ minValue_

double rogue::interfaces::memory::Variable::minValue_
protected

Definition at line 106 of file Variable.h.

◆ mode_

std::string rogue::interfaces::memory::Variable::mode_
protected

Definition at line 118 of file Variable.h.

◆ modelId_

uint32_t rogue::interfaces::memory::Variable::modelId_
protected

Definition at line 76 of file Variable.h.

◆ name_

std::string rogue::interfaces::memory::Variable::name_
protected

Definition at line 70 of file Variable.h.

◆ numValues_

uint32_t rogue::interfaces::memory::Variable::numValues_
protected

Definition at line 148 of file Variable.h.

◆ offset_

uint64_t rogue::interfaces::memory::Variable::offset_
protected

Definition at line 97 of file Variable.h.

◆ overlapEn_

bool rogue::interfaces::memory::Variable::overlapEn_
protected

Definition at line 121 of file Variable.h.

◆ path_

std::string rogue::interfaces::memory::Variable::path_
protected

Definition at line 73 of file Variable.h.

◆ retryCount_

uint32_t rogue::interfaces::memory::Variable::retryCount_
protected

Definition at line 160 of file Variable.h.

◆ setBool_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setBool_) (const bool &, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 213 of file Variable.h.

◆ setByteArray_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setByteArray_) (const uint8_t *, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 181 of file Variable.h.

◆ setDouble_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setDouble_) (const double &, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 243 of file Variable.h.

◆ setFixed_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setFixed_) (const double &, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 253 of file Variable.h.

◆ setFloat_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setFloat_) (const float &, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 233 of file Variable.h.

◆ setFuncPy_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setFuncPy_) (boost::python::object &, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 168 of file Variable.h.

◆ setInt_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setInt_) (const int64_t &, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 203 of file Variable.h.

◆ setString_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setString_) (const std::string &, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 223 of file Variable.h.

◆ setUInt_

void(rogue::interfaces::memory::Block::* rogue::interfaces::memory::Variable::setUInt_) (const uint64_t &, rogue::interfaces::memory::Variable *, int32_t index)
protected

Definition at line 193 of file Variable.h.

◆ stale_

bool rogue::interfaces::memory::Variable::stale_
protected

Definition at line 139 of file Variable.h.

◆ staleHighByte_

uint32_t rogue::interfaces::memory::Variable::staleHighByte_
protected

Definition at line 145 of file Variable.h.

◆ staleLowByte_

uint32_t rogue::interfaces::memory::Variable::staleLowByte_
protected

Definition at line 142 of file Variable.h.

◆ updateNotify_

bool rogue::interfaces::memory::Variable::updateNotify_
protected

Definition at line 115 of file Variable.h.

◆ valueBits_

uint32_t rogue::interfaces::memory::Variable::valueBits_
protected

Definition at line 151 of file Variable.h.

◆ valueBytes_

uint32_t rogue::interfaces::memory::Variable::valueBytes_
protected

Definition at line 154 of file Variable.h.

◆ valueStride_

uint32_t rogue::interfaces::memory::Variable::valueStride_
protected

Definition at line 157 of file Variable.h.

◆ varBytes_

uint32_t rogue::interfaces::memory::Variable::varBytes_
protected

Definition at line 94 of file Variable.h.

◆ verifyEn_

bool rogue::interfaces::memory::Variable::verifyEn_
protected

Definition at line 124 of file Variable.h.


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