FieldParameterAccess Struct Reference |
FieldParameterAccess Struct Reference
Detailed Descriptionaccessor struct for array parameters This struct allows access to array parameters of any type in a flexible way. Both range accesses as well as single value accesses are possible. struct FieldParameterAccess singleaccess;
struct FieldParameterAccess rangeaccess;
uint64_t primes[7] = { 1, 2, 3, 5, 7, 11, 13 };
uint32_t answer = 42;
// set up single value access
singleaccess.vtype = FG_PARAM_TYPE_UINT32_T;
singleaccess.index = 17;
singleaccess.count = 1;
singleaccess.p_uint32_t = &answer;
// set up range access
rangeaccess.vtype = FG_PARAM_TYPE_UINT64_T; // every data value is an uint64_t
rangeaccess.index = 0;
rangeaccess.count = 7;
rangeaccess.p_uint64_t = primes;
Definition fg_struct.h:114 Field Documentation◆ [union]
◆ count
gives the value count of the range ◆ index
gives the first index in the range ◆ p_double
a range of double values ◆ p_int32_t
a range of signed 32 bit integer values ◆ p_int64_t
a range of signed 64 bit integer values ◆ p_uint32_t
a range of unsigned 32 bit integer values ◆ p_uint64_t
a range of unsigned 64 bit integer values ◆ ptr
for internal access of generalized type ◆ vtype
gives the type of the included data |