mv_value.h File Reference

API function definitions for manipulating values. More...

Functions

MVLibExport MVCode_t MV_Value_Scalar_Init (MVDataType_t dataType, MVValue_t *pValue)
 Initializes a new value to hold a scalar value. More...
 
MVLibExport MVCode_t MV_Value_Array_Init (MVDataType_t dataType, size_t size, MVValue_t *pValue)
 Initializes a new value to hold an array value. More...
 
MVLibExport void MV_Value_Clear (MVValue_t *pValue)
 Destroys the value. More...
 
MVLibExport MVValueType_t MV_Value_GetType (MVValue_t value)
 Gets the type of value which is stored – scalar or array. More...
 
MVLibExport MVDataType_t MV_Value_GetDataType (MVValue_t value)
 Gets the data type of the data stored in the value. More...
 
MVLibExport size_t MV_Value_GetSize (MVValue_t value)
 Gets the size (i.e. number of elements) of an array value. More...
 
MVLibExport MVDataType_t MV_Value_Array_GetDataType (MVValue_t value, size_t index)
 Gets the data type of individual elements in an array value. More...
 
Scalar value access functions
MVLibExport MVCode_t MV_Value_Scalar_SetBool (MVValue_t value, bool val)
 Sets the contents of a value holding a scalar of type Bool. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetBool (MVValue_t value, bool *val)
 Gets the contents stored inside a scalar of type Bool. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetInt8 (MVValue_t value, int8_t val)
 Sets the contents of a value holding a scalar of type Int8. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetInt8 (MVValue_t value, int8_t *val)
 Gets the contents stored inside a scalar of type Int8. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetUInt8 (MVValue_t value, uint8_t val)
 Sets the contents of a value holding a scalar of type UInt8. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetUInt8 (MVValue_t value, uint8_t *val)
 Gets the contents stored inside a scalar of type UInt8. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetInt16 (MVValue_t value, int16_t val)
 Sets the contents of a value holding a scalar of type Int16. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetInt16 (MVValue_t value, int16_t *val)
 Gets the contents stored inside a scalar of type Int16. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetUInt16 (MVValue_t value, uint16_t val)
 Sets the contents of a value holding a scalar of type UInt16. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetUInt16 (MVValue_t value, uint16_t *val)
 Gets the contents stored inside a scalar of type UInt16. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetInt32 (MVValue_t value, int32_t val)
 Sets the contents of a value holding a scalar of type Int32. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetInt32 (MVValue_t value, int32_t *val)
 Gets the contents stored inside a scalar of type Int32. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetUInt32 (MVValue_t value, uint32_t val)
 Sets the contents of a value holding a scalar of type UInt32. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetUInt32 (MVValue_t value, uint32_t *val)
 Gets the contents stored inside a scalar of type UInt32. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetInt64 (MVValue_t value, int64_t val)
 Sets the contents of a value holding a scalar of type Int64. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetInt64 (MVValue_t value, int64_t *val)
 Gets the contents stored inside a scalar of type Int64. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetUInt64 (MVValue_t value, uint64_t val)
 Sets the contents of a value holding a scalar of type UInt64. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetUInt64 (MVValue_t value, uint64_t *val)
 Gets the contents stored inside a scalar of type UInt64. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetFloat (MVValue_t value, float val)
 Sets the contents of a value holding a scalar of type Float. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetFloat (MVValue_t value, float *val)
 Gets the contents stored inside a scalar of type Float. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetDouble (MVValue_t value, double val)
 Sets the contents of a value holding a scalar of type Double. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetDouble (MVValue_t value, double *val)
 Gets the contents stored inside a scalar of type Double. More...
 
MVLibExport MVCode_t MV_Value_Scalar_SetString (MVValue_t value, const char *val)
 Sets the contents of a value holding a scalar of type String. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetString (MVValue_t value, size_t maxSize, char *val)
 Gets the contents stored inside a scalar of type String. More...
 
MVLibExport MVCode_t MV_Value_Scalar_GetStringSize (MVValue_t value, size_t *size)
 Gets the size of the string stored inside a scalar of type String. More...
 
Array value element access functions
MVLibExport MVCode_t MV_Value_Array_SetBool (MVValue_t value, size_t index, bool val)
 Sets an element in a value holding an array of Bools. More...
 
MVLibExport MVCode_t MV_Value_Array_GetBool (MVValue_t value, size_t index, bool *val)
 Gets an element from an array of Bools. More...
 
MVLibExport MVCode_t MV_Value_Array_SetInt8 (MVValue_t value, size_t index, int8_t val)
 Sets an element in a value holding an array of Int8s. More...
 
MVLibExport MVCode_t MV_Value_Array_GetInt8 (MVValue_t value, size_t index, int8_t *val)
 Gets an element from an array of Int8s. More...
 
MVLibExport MVCode_t MV_Value_Array_SetUInt8 (MVValue_t value, size_t index, uint8_t val)
 Sets an element in a value holding an array of UInt8s. More...
 
MVLibExport MVCode_t MV_Value_Array_GetUInt8 (MVValue_t value, size_t index, uint8_t *val)
 Gets an element from an array of UInt8s. More...
 
MVLibExport MVCode_t MV_Value_Array_SetInt16 (MVValue_t value, size_t index, int16_t val)
 Sets an element in a value holding an array of Int16s. More...
 
MVLibExport MVCode_t MV_Value_Array_GetInt16 (MVValue_t value, size_t index, int16_t *val)
 Gets an element from an array of Int16s. More...
 
MVLibExport MVCode_t MV_Value_Array_SetUInt16 (MVValue_t value, size_t index, uint16_t val)
 Sets an element in a value holding an array of UInt16s. More...
 
MVLibExport MVCode_t MV_Value_Array_GetUInt16 (MVValue_t value, size_t index, uint16_t *val)
 Gets an element from an array of UInt16s. More...
 
MVLibExport MVCode_t MV_Value_Array_SetInt32 (MVValue_t value, size_t index, int32_t val)
 Sets an element in a value holding an array of Int32s. More...
 
MVLibExport MVCode_t MV_Value_Array_GetInt32 (MVValue_t value, size_t index, int32_t *val)
 Gets an element from an array of Int32s. More...
 
MVLibExport MVCode_t MV_Value_Array_SetUInt32 (MVValue_t value, size_t index, uint32_t val)
 Sets an element in a value holding an array of UInt32s. More...
 
MVLibExport MVCode_t MV_Value_Array_GetUInt32 (MVValue_t value, size_t index, uint32_t *val)
 Gets an element from an array of UInt32s. More...
 
MVLibExport MVCode_t MV_Value_Array_SetInt64 (MVValue_t value, size_t index, int64_t val)
 Sets an element in a value holding an array of Int64s. More...
 
MVLibExport MVCode_t MV_Value_Array_GetInt64 (MVValue_t value, size_t index, int64_t *val)
 Gets an element from an array of Int64s. More...
 
MVLibExport MVCode_t MV_Value_Array_SetUInt64 (MVValue_t value, size_t index, uint64_t val)
 Sets an element in a value holding an array of UInt64s. More...
 
MVLibExport MVCode_t MV_Value_Array_GetUInt64 (MVValue_t value, size_t index, uint64_t *val)
 Gets an element from an array of UInt64s. More...
 
MVLibExport MVCode_t MV_Value_Array_SetFloat (MVValue_t value, size_t index, float val)
 Sets an element in a value holding an array of Floats. More...
 
MVLibExport MVCode_t MV_Value_Array_GetFloat (MVValue_t value, size_t index, float *val)
 Gets an element from an array of Floats. More...
 
MVLibExport MVCode_t MV_Value_Array_SetDouble (MVValue_t value, size_t index, double val)
 Sets an element in a value holding an array of Doubles. More...
 
MVLibExport MVCode_t MV_Value_Array_GetDouble (MVValue_t value, size_t index, double *val)
 Gets an element from an array of Doubles. More...
 
MVLibExport MVCode_t MV_Value_Array_SetString (MVValue_t value, size_t index, const char *val)
 Sets an element in a value holding an array of Strings. More...
 
MVLibExport MVCode_t MV_Value_Array_GetString (MVValue_t value, size_t index, size_t maxSize, char *val)
 Gets an element from an array of Strings. More...
 
MVLibExport MVCode_t MV_Value_Array_GetStringSize (MVValue_t value, size_t index, size_t *size)
 Gets the size of the String stored inside an element of an array. More...
 

Detailed Description

API function definitions for manipulating values.

Result and Parameter Values

Action and Event parameters can be either values or tuples. This header lists API functions for manipulating values; see mv_tuples.h for the API functions which allow for the extraction of the individual values from a tuple.

A value can be either a scalar (i.e. it holds just one element) or an array comprising multiple elements.

Function Documentation

◆ MV_Value_Array_GetBool()

MVLibExport MVCode_t MV_Value_Array_GetBool ( MVValue_t  value,
size_t  index,
bool *  val 
)

Gets an element from an array of Bools.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the boolean variable into which the value is written.
Returns

◆ MV_Value_Array_GetDataType()

MVLibExport MVDataType_t MV_Value_Array_GetDataType ( MVValue_t  value,
size_t  index 
)

Gets the data type of individual elements in an array value.

In case the data type of an array value returned by MV_Value_GetDataType() returns eMVDataType_Variant, the array is inhomogeneous and each of its elements may have a different data type. In this situation, this function can be used to query the types of the individual elements.

If the data type of the array value is anything but eMVDataType_Variant, i.e., the array is homogeneous in data type, this function will also return that data type.

Parameters
[in]valueis the handle of the array value that is queried.
[in]indexis the index of the element in the array that is queried.
Returns
The enumerator of type MVDataType_t corresponding to the data type of the queried array element.

◆ MV_Value_Array_GetDouble()

MVLibExport MVCode_t MV_Value_Array_GetDouble ( MVValue_t  value,
size_t  index,
double *  val 
)

Gets an element from an array of Doubles.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the double variable into which the value is written.
Returns

◆ MV_Value_Array_GetFloat()

MVLibExport MVCode_t MV_Value_Array_GetFloat ( MVValue_t  value,
size_t  index,
float *  val 
)

Gets an element from an array of Floats.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the float variable into which the value is written.
Returns

◆ MV_Value_Array_GetInt16()

MVLibExport MVCode_t MV_Value_Array_GetInt16 ( MVValue_t  value,
size_t  index,
int16_t *  val 
)

Gets an element from an array of Int16s.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the uint16_t variable into which the value is written.
Returns

◆ MV_Value_Array_GetInt32()

MVLibExport MVCode_t MV_Value_Array_GetInt32 ( MVValue_t  value,
size_t  index,
int32_t *  val 
)

Gets an element from an array of Int32s.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the int32_t variable into which the value is written.
Returns

◆ MV_Value_Array_GetInt64()

MVLibExport MVCode_t MV_Value_Array_GetInt64 ( MVValue_t  value,
size_t  index,
int64_t *  val 
)

Gets an element from an array of Int64s.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the int64_t variable into which the value is written.
Returns

◆ MV_Value_Array_GetInt8()

MVLibExport MVCode_t MV_Value_Array_GetInt8 ( MVValue_t  value,
size_t  index,
int8_t *  val 
)

Gets an element from an array of Int8s.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the int8_t variable into which the value is written.
Returns

◆ MV_Value_Array_GetString()

MVLibExport MVCode_t MV_Value_Array_GetString ( MVValue_t  value,
size_t  index,
size_t  maxSize,
char *  val 
)

Gets an element from an array of Strings.

Note that the size of the output character buffer (maxSize) must exceed the size of the string (as returned by MV_Value_Array_GetStringSize) by at least one byte to account for the trailing null-terminator.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[in]maxSizeis the size of the character buffer.
[out]valpoints to the beginning of the char buffer into which the string is written.
Returns

◆ MV_Value_Array_GetStringSize()

MVLibExport MVCode_t MV_Value_Array_GetStringSize ( MVValue_t  value,
size_t  index,
size_t *  size 
)

Gets the size of the String stored inside an element of an array.

The size returned does not account for a trailing null-terminator. This is the size in bytes, i.e. it is different from the number of characters if UTF-8 multi-byte characters are used.

Parameters
[in]valueis the handle of the scalar value.
[in]indexis the index of the element that is read.
[out]sizepoints to the size_t variable into which the size is written.
Returns

◆ MV_Value_Array_GetUInt16()

MVLibExport MVCode_t MV_Value_Array_GetUInt16 ( MVValue_t  value,
size_t  index,
uint16_t *  val 
)

Gets an element from an array of UInt16s.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the uint16_t variable into which the value is written.
Returns

◆ MV_Value_Array_GetUInt32()

MVLibExport MVCode_t MV_Value_Array_GetUInt32 ( MVValue_t  value,
size_t  index,
uint32_t *  val 
)

Gets an element from an array of UInt32s.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the uint32_t variable into which the value is written.
Returns

◆ MV_Value_Array_GetUInt64()

MVLibExport MVCode_t MV_Value_Array_GetUInt64 ( MVValue_t  value,
size_t  index,
uint64_t *  val 
)

Gets an element from an array of UInt64s.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the uint64_t variable into which the value is written.
Returns

◆ MV_Value_Array_GetUInt8()

MVLibExport MVCode_t MV_Value_Array_GetUInt8 ( MVValue_t  value,
size_t  index,
uint8_t *  val 
)

Gets an element from an array of UInt8s.

Parameters
[in]valueis the handle of the array value whose element is read.
[in]indexis the index of the element that is read.
[out]valpoints to the uint8_t variable into which the value is written.
Returns

◆ MV_Value_Array_Init()

MVLibExport MVCode_t MV_Value_Array_Init ( MVDataType_t  dataType,
size_t  size,
MVValue_t pValue 
)

Initializes a new value to hold an array value.

Parameters
[in]dataTypeis the data type of the elements that are stored in the array value.
[in]sizeis the number of elements the array should hold.
[out]pValuepoints to the handle of the value that is initialized.
Returns

◆ MV_Value_Array_SetBool()

MVLibExport MVCode_t MV_Value_Array_SetBool ( MVValue_t  value,
size_t  index,
bool  val 
)

Sets an element in a value holding an array of Bools.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the boolean which is stored.
Returns

◆ MV_Value_Array_SetDouble()

MVLibExport MVCode_t MV_Value_Array_SetDouble ( MVValue_t  value,
size_t  index,
double  val 
)

Sets an element in a value holding an array of Doubles.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the double-precision floating-point number that is stored.
Returns

◆ MV_Value_Array_SetFloat()

MVLibExport MVCode_t MV_Value_Array_SetFloat ( MVValue_t  value,
size_t  index,
float  val 
)

Sets an element in a value holding an array of Floats.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the single-precision floating-point number that is stored.
Returns

◆ MV_Value_Array_SetInt16()

MVLibExport MVCode_t MV_Value_Array_SetInt16 ( MVValue_t  value,
size_t  index,
int16_t  val 
)

Sets an element in a value holding an array of Int16s.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the signed 16-bit which is stored.
Returns

◆ MV_Value_Array_SetInt32()

MVLibExport MVCode_t MV_Value_Array_SetInt32 ( MVValue_t  value,
size_t  index,
int32_t  val 
)

Sets an element in a value holding an array of Int32s.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the signed 32-bit integer that is stored.
Returns

◆ MV_Value_Array_SetInt64()

MVLibExport MVCode_t MV_Value_Array_SetInt64 ( MVValue_t  value,
size_t  index,
int64_t  val 
)

Sets an element in a value holding an array of Int64s.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the signed 64-bit integer that is stored.
Returns

◆ MV_Value_Array_SetInt8()

MVLibExport MVCode_t MV_Value_Array_SetInt8 ( MVValue_t  value,
size_t  index,
int8_t  val 
)

Sets an element in a value holding an array of Int8s.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the signed 8-bit integer that is stored.
Returns

◆ MV_Value_Array_SetString()

MVLibExport MVCode_t MV_Value_Array_SetString ( MVValue_t  value,
size_t  index,
const char *  val 
)

Sets an element in a value holding an array of Strings.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the C-style string that is stored.
Returns

◆ MV_Value_Array_SetUInt16()

MVLibExport MVCode_t MV_Value_Array_SetUInt16 ( MVValue_t  value,
size_t  index,
uint16_t  val 
)

Sets an element in a value holding an array of UInt16s.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the unsigned 16-bit integer which is stored.
Returns

◆ MV_Value_Array_SetUInt32()

MVLibExport MVCode_t MV_Value_Array_SetUInt32 ( MVValue_t  value,
size_t  index,
uint32_t  val 
)

Sets an element in a value holding an array of UInt32s.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the unsigned 32-bit integer that is stored.
Returns

◆ MV_Value_Array_SetUInt64()

MVLibExport MVCode_t MV_Value_Array_SetUInt64 ( MVValue_t  value,
size_t  index,
uint64_t  val 
)

Sets an element in a value holding an array of UInt64s.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the unsigned 64-bit integer that is stored.
Returns

◆ MV_Value_Array_SetUInt8()

MVLibExport MVCode_t MV_Value_Array_SetUInt8 ( MVValue_t  value,
size_t  index,
uint8_t  val 
)

Sets an element in a value holding an array of UInt8s.

Parameters
[in]valueis the handle of the array value whose element is set.
[in]indexis the index of the element that is set.
[in]valis the unsigned 8-bit integer that is stored.
Returns

◆ MV_Value_Clear()

MVLibExport void MV_Value_Clear ( MVValue_t pValue)

Destroys the value.

Every initialization of a value by either

must be balanced by a call to MV_Value_Clear().

Parameters
[in,out]pValuepoints to the handle of the value that is destroyed.

◆ MV_Value_GetDataType()

MVLibExport MVDataType_t MV_Value_GetDataType ( MVValue_t  value)

Gets the data type of the data stored in the value.

Parameters
[in]valueis the handle of the value that is queried.
Returns
The enumerator of type MVDataType_t corresponding to the stored data type.

◆ MV_Value_GetSize()

MVLibExport size_t MV_Value_GetSize ( MVValue_t  value)

Gets the size (i.e. number of elements) of an array value.

Parameters
[in]valueis the handle of the array value that is queried.
Returns
The number of elements in the array.

◆ MV_Value_GetType()

MVLibExport MVValueType_t MV_Value_GetType ( MVValue_t  value)

Gets the type of value which is stored – scalar or array.

Parameters
[in]valueis the handle of the value that is queried.
Returns
The enumerator of type MVValueType_t corresponding to the type of value.

◆ MV_Value_Scalar_GetBool()

MVLibExport MVCode_t MV_Value_Scalar_GetBool ( MVValue_t  value,
bool *  val 
)

Gets the contents stored inside a scalar of type Bool.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the boolean variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetDouble()

MVLibExport MVCode_t MV_Value_Scalar_GetDouble ( MVValue_t  value,
double *  val 
)

Gets the contents stored inside a scalar of type Double.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the double variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetFloat()

MVLibExport MVCode_t MV_Value_Scalar_GetFloat ( MVValue_t  value,
float *  val 
)

Gets the contents stored inside a scalar of type Float.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the float variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetInt16()

MVLibExport MVCode_t MV_Value_Scalar_GetInt16 ( MVValue_t  value,
int16_t *  val 
)

Gets the contents stored inside a scalar of type Int16.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the int16_t variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetInt32()

MVLibExport MVCode_t MV_Value_Scalar_GetInt32 ( MVValue_t  value,
int32_t *  val 
)

Gets the contents stored inside a scalar of type Int32.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the int32_t variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetInt64()

MVLibExport MVCode_t MV_Value_Scalar_GetInt64 ( MVValue_t  value,
int64_t *  val 
)

Gets the contents stored inside a scalar of type Int64.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the int64_t variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetInt8()

MVLibExport MVCode_t MV_Value_Scalar_GetInt8 ( MVValue_t  value,
int8_t *  val 
)

Gets the contents stored inside a scalar of type Int8.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the int8_t variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetString()

MVLibExport MVCode_t MV_Value_Scalar_GetString ( MVValue_t  value,
size_t  maxSize,
char *  val 
)

Gets the contents stored inside a scalar of type String.

Note that the size of the output character buffer (maxSize) must exceed the size of the string (as returned by MV_Value_Scalar_GetStringSize) by at least one byte to account for the trailing null-terminator.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[in]maxSizeis the size of the character buffer.
[out]valpoints to the beginning of the char buffer into which the string is written.
Returns

◆ MV_Value_Scalar_GetStringSize()

MVLibExport MVCode_t MV_Value_Scalar_GetStringSize ( MVValue_t  value,
size_t *  size 
)

Gets the size of the string stored inside a scalar of type String.

The size returned does not account for a trailing null-terminator. This is the size in bytes, i.e., it is different from the number of characters if UTF-8 multi-byte characters are used.

Parameters
[in]valueis the handle of the scalar value.
[out]sizepoints to the size_t variable into which the size is written.
Returns

◆ MV_Value_Scalar_GetUInt16()

MVLibExport MVCode_t MV_Value_Scalar_GetUInt16 ( MVValue_t  value,
uint16_t *  val 
)

Gets the contents stored inside a scalar of type UInt16.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the uint16_t variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetUInt32()

MVLibExport MVCode_t MV_Value_Scalar_GetUInt32 ( MVValue_t  value,
uint32_t *  val 
)

Gets the contents stored inside a scalar of type UInt32.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the uint32_t variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetUInt64()

MVLibExport MVCode_t MV_Value_Scalar_GetUInt64 ( MVValue_t  value,
uint64_t *  val 
)

Gets the contents stored inside a scalar of type UInt64.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the uint64_t variable into which the value is written.
Returns

◆ MV_Value_Scalar_GetUInt8()

MVLibExport MVCode_t MV_Value_Scalar_GetUInt8 ( MVValue_t  value,
uint8_t *  val 
)

Gets the contents stored inside a scalar of type UInt8.

Parameters
[in]valueis the handle of the scalar value whose value is read.
[out]valpoints to the uint8_t variable into which the value is written.
Returns

◆ MV_Value_Scalar_Init()

MVLibExport MVCode_t MV_Value_Scalar_Init ( MVDataType_t  dataType,
MVValue_t pValue 
)

Initializes a new value to hold a scalar value.

Parameters
[in]dataTypeis the data type of the scalar that is stored in the value.
[out]pValuepoints to the handle of the value that is initialized.
Returns

◆ MV_Value_Scalar_SetBool()

MVLibExport MVCode_t MV_Value_Scalar_SetBool ( MVValue_t  value,
bool  val 
)

Sets the contents of a value holding a scalar of type Bool.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the boolean that is stored.
Returns

◆ MV_Value_Scalar_SetDouble()

MVLibExport MVCode_t MV_Value_Scalar_SetDouble ( MVValue_t  value,
double  val 
)

Sets the contents of a value holding a scalar of type Double.

Parameters
[in]valueis the handle of the scalar value which is set.
[in]valis the double-precision floating-point number that is stored.
Returns

◆ MV_Value_Scalar_SetFloat()

MVLibExport MVCode_t MV_Value_Scalar_SetFloat ( MVValue_t  value,
float  val 
)

Sets the contents of a value holding a scalar of type Float.

Parameters
[in]valueis the handle of the scalar value which is set.
[in]valis the single-precision floating-point number that is stored.
Returns

◆ MV_Value_Scalar_SetInt16()

MVLibExport MVCode_t MV_Value_Scalar_SetInt16 ( MVValue_t  value,
int16_t  val 
)

Sets the contents of a value holding a scalar of type Int16.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the signed 16-bit integer that is stored.
Returns

◆ MV_Value_Scalar_SetInt32()

MVLibExport MVCode_t MV_Value_Scalar_SetInt32 ( MVValue_t  value,
int32_t  val 
)

Sets the contents of a value holding a scalar of type Int32.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the signed 32-bit integer that is stored.
Returns

◆ MV_Value_Scalar_SetInt64()

MVLibExport MVCode_t MV_Value_Scalar_SetInt64 ( MVValue_t  value,
int64_t  val 
)

Sets the contents of a value holding a scalar of type Int64.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the signed 64-bit integer that is stored.
Returns

◆ MV_Value_Scalar_SetInt8()

MVLibExport MVCode_t MV_Value_Scalar_SetInt8 ( MVValue_t  value,
int8_t  val 
)

Sets the contents of a value holding a scalar of type Int8.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the signed 8-bit integer that is stored.
Returns

◆ MV_Value_Scalar_SetString()

MVLibExport MVCode_t MV_Value_Scalar_SetString ( MVValue_t  value,
const char *  val 
)

Sets the contents of a value holding a scalar of type String.

Parameters
[in]valueis the handle of the scalar value which is set.
[in]valis the C-style string that is stored.
Returns

◆ MV_Value_Scalar_SetUInt16()

MVLibExport MVCode_t MV_Value_Scalar_SetUInt16 ( MVValue_t  value,
uint16_t  val 
)

Sets the contents of a value holding a scalar of type UInt16.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the unsigned 16-bit integer that is stored.
Returns

◆ MV_Value_Scalar_SetUInt32()

MVLibExport MVCode_t MV_Value_Scalar_SetUInt32 ( MVValue_t  value,
uint32_t  val 
)

Sets the contents of a value holding a scalar of type UInt32.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the unsigned 32-bit integer that is stored.
Returns

◆ MV_Value_Scalar_SetUInt64()

MVLibExport MVCode_t MV_Value_Scalar_SetUInt64 ( MVValue_t  value,
uint64_t  val 
)

Sets the contents of a value holding a scalar of type UInt64.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the unsigned 64-bit integer that is stored.
Returns

◆ MV_Value_Scalar_SetUInt8()

MVLibExport MVCode_t MV_Value_Scalar_SetUInt8 ( MVValue_t  value,
uint8_t  val 
)

Sets the contents of a value holding a scalar of type UInt8.

Parameters
[in]valueis the handle of the scalar value that is set.
[in]valis the unsigned 8-bit integer that is stored.
Returns