init commit
This commit is contained in:
@ -3,16 +3,21 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace storeId {
|
||||
static constexpr uint32_t INVALID_STORE_ADDRESS = 0xffffffff;
|
||||
}
|
||||
|
||||
/**
|
||||
* This union defines the type that identifies where a data packet is
|
||||
* stored in the store. It comprises of a raw part to read it as raw value and
|
||||
* a structured part to use it in pool-like stores.
|
||||
*/
|
||||
union store_address_t {
|
||||
|
||||
/**
|
||||
* Default Constructor, initializing to INVALID_ADDRESS
|
||||
*/
|
||||
store_address_t():raw(0xFFFFFFFF){}
|
||||
store_address_t(): raw(storeId::INVALID_STORE_ADDRESS){}
|
||||
/**
|
||||
* Constructor to create an address object using the raw address
|
||||
*
|
||||
@ -28,7 +33,7 @@ union store_address_t {
|
||||
* @param packetIndex
|
||||
*/
|
||||
store_address_t(uint16_t poolIndex, uint16_t packetIndex):
|
||||
pool_index(poolIndex),packet_index(packetIndex){}
|
||||
poolIndex(poolIndex), packetIndex(packetIndex){}
|
||||
/**
|
||||
* A structure with two elements to access the store address pool-like.
|
||||
*/
|
||||
@ -36,11 +41,11 @@ union store_address_t {
|
||||
/**
|
||||
* The index in which pool the packet lies.
|
||||
*/
|
||||
uint16_t pool_index;
|
||||
uint16_t poolIndex;
|
||||
/**
|
||||
* The position in the chosen pool.
|
||||
*/
|
||||
uint16_t packet_index;
|
||||
uint16_t packetIndex;
|
||||
};
|
||||
/**
|
||||
* Alternative access to the raw value.
|
||||
|
Reference in New Issue
Block a user