summaryrefslogtreecommitdiffstats
path: root/src/include/usr/ecmddatabuffer/ecmdDataBuffer.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/ecmddatabuffer/ecmdDataBuffer.H')
-rw-r--r--src/include/usr/ecmddatabuffer/ecmdDataBuffer.H19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/usr/ecmddatabuffer/ecmdDataBuffer.H b/src/include/usr/ecmddatabuffer/ecmdDataBuffer.H
index 203a966cc..1b65e643e 100644
--- a/src/include/usr/ecmddatabuffer/ecmdDataBuffer.H
+++ b/src/include/usr/ecmddatabuffer/ecmdDataBuffer.H
@@ -130,6 +130,25 @@ public:
*/
uint32_t flushTo0();
+ /**
+ * @brief Set a word of data in buffer
+ * @param i_wordoffset Offset of word to set
+ * @param i_value 32 bits of data to put into word
+ * @retval ECMD_DBUF_SUCCESS on success
+ * @retval ECMD_DBUF_BUFFER_OVERFLOW i_wordoffset is not contained in the size of this buffer
+ *
+ * NOTE : If the buffer length != word boundary, when setting the last word
+ * data in i_value past the buffer length is cleared before being stored in the buffer
+ */
+ uint32_t setWord(uint32_t i_wordoffset, uint32_t i_value);
+
+ /**
+ * @brief Fetch a word from ecmdDataBuffer
+ * @param i_wordoffset Offset of word to fetch
+ * @retval Value of word requested
+ */
+ uint32_t getWord(uint32_t i_wordoffset) const;
+
protected:
uint32_t iv_Capacity; ///< Actual buffer capacity - always >= getNumWords()
uint32_t iv_NumBits; ///< Specified buffer size in bits
OpenPOWER on IntegriCloud