30#include "slc_macros.h"
31#include "sysutil_proto.h"
37static void allocateTableColumn(JNIEnv* env,
Table* table,
Type aidaType,
size_t elementSize);
38static Type tableArrayTypeOf(
Type type);
39static size_t tableElementSizeOfOf(
Type type);
40static int vavscanf(JNIEnv* env,
Arguments* arguments,
Value* value,
const char* formatString, va_list argp);
41static Type getAidaType(JNIEnv* env,
char format,
short isArray,
short isLong,
short isShort);
42static void getJsonPathElements(
char* fullJsonPath,
char* variableName,
char** path);
43static void parseFormatString(
char* formatString,
short formatCharsToProcess,
char* format,
44 short* isRequired,
short* isLong,
short* isShort,
short* isArray);
45static void expectingJsonOrValue(
const char* argumentName,
short isArray,
short* isValue,
46 short* valueShouldBeJson);
47static int getFloatArgument(
Arguments* arguments,
char* path,
float* target);
48static int getDoubleArgument(
Arguments* arguments,
char* path,
double* target);
49static int getFloatArrayArgument(
Arguments* arguments,
char* path,
float** target,
unsigned int* elementCount);
50static int getDoubleArrayArgument(
Arguments* arguments,
char* path,
double** target,
unsigned int* elementCount);
52static void* _getFloatArray(
Arguments* arguments,
char* path,
bool forFloat,
unsigned int* elementCount);
53static float* getFloatArray(
Arguments* arguments,
char* path,
unsigned int* elementCount);
54static double* getDoubleArray(
Arguments* arguments,
char* path,
unsigned int* elementCount);
55static int getBooleanValue(
char* stringValue);
56static Value asArrayValue(
char* stringValue);
89 va_start(argp, formatString);
90 int status = vavscanf(env, arguments, NULL, formatString, argp);
253 va_start(argp, formatString);
254 int status = vavscanf(env, arguments, value, formatString, argp);
259static int vavscanf(JNIEnv* env,
Arguments* arguments,
Value* value,
const char* formatString, va_list argp)
271 char _formatString[strlen(formatString) + 1];
272 sprintf(_formatString,
"- %s", formatString);
273 char* formatSpecifier = strtok(_formatString,
"% ");
274 int numberOfFormatStrings = 0;
276 for (
int i = 0; formatSpecifier; ++i) {
277 numberOfFormatStrings++;
278 strcpy(formatSpecifiers[i], formatSpecifier);
279 formatSpecifier = strtok(NULL,
"% ");
282 if (!numberOfFormatStrings) {
296 char* nextStringPosition;
299 for (
int formatNumber = 0; formatNumber < numberOfFormatStrings; formatNumber++) {
300 formatSpecifier = formatSpecifiers[formatNumber];
302 short formatSpecifierLength = (short)strlen(formatSpecifier);
305 if (!formatSpecifierLength || *formatSpecifier ==
'-') {
311 short isRequired =
true, isLong =
false, isShort =
false, isArray =
false;
313 parseFormatString(formatSpecifier, formatSpecifierLength, &format, &isRequired, &isLong, &isShort, &isArray);
323 char* argumentName = va_arg (argp,
char *);
326 formatSpecifier, EXIT_FAILURE)
332 short valueShouldBeJson =
false, isValue =
false;
333 expectingJsonOrValue(argumentName, isArray, &isValue, &valueShouldBeJson);
336 void* target = va_arg (argp,
void *);
337 void** arrayPtr = (
void**)target;
338 unsigned int* elementCount;
340 elementCount = va_arg (argp,
unsigned int *);
345 Type aidaType = getAidaType(env, format, isArray, isLong, isShort);
350 float* floatArrayTarget;
352 double* doubleArrayTarget;
355 if (getDoubleArgument(arguments, argumentName, (
double*)&doubleTarget) == EXIT_SUCCESS) {
357 *((
float*)target) = (float)doubleTarget;
359 *((
double*)target) = doubleTarget;
364 if (getFloatArgument(arguments, argumentName, (
float*)&floatTarget) == EXIT_SUCCESS) {
366 *((
double*)target) = (double)floatTarget;
368 *((
float*)target) = floatTarget;
376 if (getDoubleArrayArgument(arguments, argumentName, (
double**)&doubleArrayTarget, elementCount)
381 floatArrayTarget = calloc(*elementCount,
sizeof(
float));
383 if (!floatArrayTarget) {
385 "Could not allocate memory for float argument",
388 *((
float**)target) = floatArrayTarget;
389 for (
int i = 0; i < *elementCount; i++) {
390 floatArrayTarget[i] = (float)doubleArrayTarget[i];
394 *((
double**)target) = doubleArrayTarget;
400 if (getFloatArrayArgument(arguments, argumentName, (
float**)&floatArrayTarget, elementCount)
405 doubleArrayTarget = calloc(*elementCount,
sizeof(
double));
407 if (!doubleArrayTarget) {
409 "Could not allocate memory for double argument",
412 *((
double**)target) = doubleArrayTarget;
413 for (
int i = 0; i < *elementCount; i++) {
414 doubleArrayTarget[i] = (double)floatArrayTarget[i];
418 *((
float**)target) = floatArrayTarget;
429 char jsonArgumentName[strlen(argumentName) + 1];
442 char* stringValue = NULL;
443 json_value* jsonRoot = NULL;
444 json_type jsonType = json_none;
446 if (valueShouldBeJson) {
447 getJsonPathElements(argumentName, jsonArgumentName, &jsonPath);
464 value = &elementValue;
468 if (isArray && !*jsonPath) {
471 elementValue =
getValue(env, *arguments);
474 value = &elementValue;
477 valueShouldBeJson = true;
485 argumentName, EXIT_FAILURE)
490 char* defaultString = *(
char**)target;
492 char* allocatedString;
494 env, allocatedString, defaultString,
"default arguments", EXIT_FAILURE)
495 *(
char**)target = allocatedString;
501 if (valueShouldBeJson) {
503 jsonType = jsonRoot->type;
509 if (valueShouldBeJson) {
511 if (isArray && !*jsonPath) {
514 elementValue =
getNamedValue(env, *arguments, jsonArgumentName);
520 "Missing required argument: %s", argumentName, EXIT_FAILURE)
527 jsonType = jsonRoot->type;
531 if (!elementArgument.
name) {
534 "Missing required argument: %s", argumentName, EXIT_FAILURE)
539 stringValue = elementArgument.
value;
551 json_value* arrayRoot = NULL;
552 unsigned int arrayCount;
554 if (jsonType != json_array) {
556 "Array expected but found scalar or string: %s", argumentName, EXIT_FAILURE)
558 arrayRoot = jsonRoot;
559 arrayCount = arrayRoot->u.array.length;
620 *elementCount = arrayCount;
675 memset(&table, 0,
sizeof(table));
760 "Internal Error: more columns added than table size");
767 "Internal Error: Attempt to add column with no data");
772 type = tableArrayTypeOf(type);
775 allocateTableColumn(env, table, type, tableElementSizeOfOf(type));
796 for (
int row = 0; row < table->
rowCount; row++) {
820 "Internal Error: Call to tableAddColumn() un-supported type");
832 "Internal Error: more fields added than table size");
837 if (!fieldName || !*fieldName) {
839 "Internal Error: Attempt to add empty field name");
851 "Internal Error: more labels added than table size");
856 if (!labelName || !*labelName) {
858 "Internal Error: Attempt to add empty label name");
919 for (
int row = 0; row < table->
rowCount; row++, data++) {
962 char* dataPointer = (
char*)data;
963 for (
int row = 0; row < table->
rowCount; row++, dataPointer += width) {
965 stringArray[row][width] = 0x0;
1220static int getFloatArgument(
Arguments* arguments,
char* path,
float* target)
1223 if (floatingPointValue) {
1225 return EXIT_SUCCESS;
1227 return EXIT_FAILURE;
1240static int getDoubleArgument(
Arguments* arguments,
char* path,
double* target)
1243 if (floatingPointValue) {
1245 return EXIT_SUCCESS;
1247 return EXIT_FAILURE;
1261static int getFloatArrayArgument(
Arguments* arguments,
char* path,
float** target,
unsigned int* elementCount)
1263 float* floatArray = getFloatArray(arguments, path, elementCount);
1265 *target = floatArray;
1266 return EXIT_SUCCESS;
1268 return EXIT_FAILURE;
1282static int getDoubleArrayArgument(
Arguments* arguments,
char* path,
double** target,
unsigned int* elementCount)
1284 double* doubleArray = getDoubleArray(arguments, path, elementCount);
1286 *target = doubleArray;
1287 return EXIT_SUCCESS;
1289 return EXIT_FAILURE;
1322static float* getFloatArray(
Arguments* arguments,
char* path,
unsigned int* elementCount)
1324 return (
float*)_getFloatArray(arguments, path,
true, elementCount);
1337static double* getDoubleArray(
Arguments* arguments,
char* path,
unsigned int* elementCount)
1339 return (
double*)_getFloatArray(arguments, path,
false, elementCount);
1342static void* _getFloatArray(
Arguments* arguments,
char* path,
bool forFloat,
unsigned int* elementCount)
1345 void* theArray = NULL;
1348 char elementPath[strlen(path) + 10];
1350 int numberOfFloatAllocated = 0, numberOfFloatsFound = 0;
1353 sprintf(elementPath,
"%s[%d]", path, numberOfFloatsFound);
1355 while ((floatingPointValue = getFloatingPointValue(arguments, elementPath))) {
1357 if (floatingPointValue->
isFloat == forFloat) {
1358 if (numberOfFloatAllocated == 0) {
1360 theArray = calloc(numberOfFloatAllocated, forFloat ?
sizeof(
float) :
sizeof(
double));
1361 if (theArray == NULL) {
1364 }
else if (numberOfFloatAllocated
1365 <= numberOfFloatsFound) {
1367 theArray = realloc(theArray, numberOfFloatAllocated * (forFloat ?
sizeof(
float) :
sizeof(
double)));
1372 ((
float*)theArray)[numberOfFloatsFound] = floatingPointValue->
value.
floatValue;
1374 ((
double*)theArray)[numberOfFloatsFound] = floatingPointValue->
value.
doubleValue;
1379 sprintf(elementPath,
"%s[%d]", path, ++numberOfFloatsFound);
1381 *elementCount = numberOfFloatsFound;
1393static void expectingJsonOrValue(
const char* argumentName,
short isArray,
short* isValue,
1394 short* valueShouldBeJson)
1396 if (strcasecmp(argumentName,
"value") == 0) {
1400 if (isArray || strchr(argumentName,
'.') != NULL || strchr(argumentName,
'[') != NULL) {
1401 (*valueShouldBeJson) =
true;
1416static void parseFormatString(
char* formatString,
short formatCharsToProcess,
char* format,
1417 short* isRequired,
short* isLong,
short* isShort,
short* isArray)
1420 (*isRequired) =
false;
1421 formatCharsToProcess--;
1425 if (formatCharsToProcess) {
1428 formatCharsToProcess--;
1432 formatCharsToProcess--;
1437 if (formatCharsToProcess) {
1438 (*format) = *formatString++;
1439 formatCharsToProcess--;
1459static void getJsonPathElements(
char* fullJsonPath,
char* variableName,
char** path)
1461 char* firstDot = strchr(fullJsonPath,
'.');
1462 char* firstParen = strchr(fullJsonPath,
'[');
1465 if (firstDot == NULL && firstParen == NULL) {
1466 strcpy(variableName, fullJsonPath);
1467 *path = &fullJsonPath[strlen(fullJsonPath)];
1471 char* relativeJsonPath = (firstDot == NULL || firstParen == NULL) ?
1472 MAX(firstDot, firstParen) :
1473 MIN(firstParen, firstDot);
1474 int lenRootArgument = (int)(relativeJsonPath - fullJsonPath);
1476 if (*relativeJsonPath ==
'.') {
1479 memcpy(variableName, fullJsonPath, lenRootArgument);
1480 variableName[lenRootArgument] = 0x0;
1481 *path = relativeJsonPath;
1494static Type getAidaType(JNIEnv* env,
char format,
short isArray,
short isLong,
short isShort)
1508 }
else if (isShort) {
1547 }
else if (isShort) {
1587Value asArrayValue(
char* stringValue)
1589 char arrayValueToParse[
1590 strlen(stringValue) + 20];
1591 if (isdigit(*stringValue)) {
1592 sprintf(arrayValueToParse,
"{\"_array\": [%s]}", stringValue);
1594 sprintf(arrayValueToParse,
"{\"_array\": [\"%s\"]}", stringValue);
1598 value.
value.
jsonValue = json_parse(arrayValueToParse, strlen(arrayValueToParse));
1611static Type tableArrayTypeOf(
Type type)
1650static size_t tableElementSizeOfOf(
Type type)
1659 size =
sizeof(
unsigned char);
1663 size =
sizeof(short);
1671 size =
sizeof(long);
1675 size =
sizeof(float);
1679 size =
sizeof(double);
1683 size =
sizeof(
char*);
1699static void allocateTableColumn(JNIEnv* env,
Table* table,
Type aidaType,
size_t elementSize)
1710static int getBooleanValue(
char* stringValue)
1712 if (strcasecmp(stringValue,
"y") == 0
1713 || strcasecmp(stringValue,
"1") == 0
1714 || strcasecmp(stringValue,
"yes") == 0
1715 || strcasecmp(stringValue,
"true") == 0
1716 || strcasecmp(stringValue,
"t") == 0) {
1719 if (strcasecmp(stringValue,
"n") == 0
1720 || strcasecmp(stringValue,
"0") == 0
1721 || strcasecmp(stringValue,
"no") == 0
1722 || strcasecmp(stringValue,
"false") == 0
1723 || strcasecmp(stringValue,
"f") == 0) {
#define CONVERT_FROM_VMS_FLOAT(_float, _count)
Convert in-place, floating point numbers from VMS to ieee format.
#define CONVERT_FROM_VMS_DOUBLE(_double, _count)
Convert in-place, doubles from VMS to ieee format.
#define PRINT_ERROR_FREE_MEMORY_AND_RETURN_(_exception, _errorText, _r)
Throw error message in an exception, free any allocated memory and return the error code.
#define ON_EXCEPTION_RETURN_VOID
Check to see if an exception has been raised, and return void,.
#define MISSING_REQUIRED_ARGUMENT_EXCEPTION
Use this string to signal Missing Required Argument Exceptions in aidaThrow()
#define ON_EXCEPTION_RETURN_(_r)
Check to see if an exception has been raised, and return the given return value.
#define AIDA_INTERNAL_EXCEPTION
Use this string to signal Internal Exceptions in aidaThrow()
#define SPRINTF_ERROR_FREE_MEMORY_AND_RETURN_(_exception, _errorText, _ref, _r)
Format an error message, throw it in an exception, free any allocated memory and return the error cod...
#define ON_EXCEPTION_FREE_MEMORY_AND_RETURN_(_r)
Check to see if an exception has been raised, then free tracked memory, and return the given return v...
#define UNABLE_TO_GET_DATA_EXCEPTION
Use this string to signal Exceptions when trying to Get Data in aidaThrow()
Value getArrayValue(JNIEnv *env, Arguments arguments)
Get value from the VALUE argument, in the provided Arguments structure, when the value is a scalar ar...
Value getValue(JNIEnv *env, Arguments arguments)
Get value from the VALUE request argument, in the provided Arguments structure, when the value is a s...
The Header File for the JNI helper functions.
#define TRACK_JSON(_ptr)
Register this newly allocated json value so that it will be freed by FREE_JSON_MEMORY.
#define ALLOCATE_STRING_AND_ON_ERROR_RETURN_VOID(_env, _var, _string, _purpose)
Allocate memory for a string and copy the given string into this allocated space The specified variab...
#define ALLOCATE_COPY_AND_TRACK_STRING_AND_ON_ERROR_RETURN_(_env, _var, _string, _purpose, _r)
Allocate and track a string.
#define ALLOCATE_MEMORY(_env, _size, _purpose)
Allocate memory.
#define TRACK_ALLOCATED_MEMORY
Create tracking variables so that memory can be freed with FREE_MEMORY macro.
#define ALLOCATE_FIXED_LENGTH_STRING_AND_ON_ERROR_RETURN_VOID(_env, _var, _string, _size, _purpose)
Allocate space for a fixed length string and copy date from the given string into the newly allocated...
#define FREE_MEMORY
Free any allocated memory.
#define ALLOCATE_MEMORY_AND_ON_ERROR_RETURN_(_env, _var, _size, _purpose, _r)
Allocate memory and on error return the given value.
#define FREE_TRACKED_MEMORY(_ptr)
Free a single tracked memory allocation and remove from list.
#define TRACK_MEMORY(_ptr)
Register this newly allocated memory so that it will be freed by FREE_MEMORY.
#define FREE_JSON
Free any allocated json memory.
Value getNamedArrayValue(JNIEnv *env, Arguments arguments, char *name)
Get value from a named argument in the provided arguments structure.
json_value * getJsonValue(Value *value, char *passedInPath)
Get the json value from the given value identified by the path.
Argument getArgument(Arguments arguments, char *name)
Get a named argument.
Value getNamedValue(JNIEnv *env, Arguments arguments, char *name)
Get value from a named argument in the provided arguments structure.
void aidaThrowNonOsException(JNIEnv *env, char *exception, const char *message)
To log any non-OS exceptions and throw back to java.
The Header File for the Native Channel Provider Server Helper functions.
Type
The definition of Aida Types.
@ AIDA_BYTE_TYPE
Represents a byte.
@ AIDA_SHORT_ARRAY_TYPE
Represents a short array.
@ AIDA_VOID_TYPE
Used when no return value is to be returned from a channel.
@ AIDA_UNSIGNED_INTEGER_TYPE
Represents an internal type of unsigned integer.
@ AIDA_UNSIGNED_LONG_ARRAY_TYPE
Represents an internal type of unsigned long array.
@ AIDA_UNSIGNED_SHORT_ARRAY_TYPE
Represents an internal type of unsigned short array.
@ AIDA_FLOAT_ARRAY_TYPE
Represents a float array.
@ AIDA_UNSIGNED_LONG_TYPE
Represents an internal type of unsigned long.
@ AIDA_BOOLEAN_ARRAY_TYPE
Represents a boolean array.
@ AIDA_INTEGER_ARRAY_TYPE
Represents an integer array.
@ AIDA_JSON_TYPE
Argument was provided as JSON text.
@ AIDA_STRING_TYPE
Represents a string.
@ AIDA_BYTE_ARRAY_TYPE
Represents a byte array.
@ AIDA_FLOAT_TYPE
Represents a float.
@ AIDA_INTEGER_TYPE
Represents an integer.
@ AIDA_SHORT_TYPE
Represents a short.
@ AIDA_LONG_ARRAY_TYPE
Represents a long array.
@ AIDA_STRING_ARRAY_TYPE
Represents a string array.
@ AIDA_LONG_TYPE
Represents a long.
@ AIDA_BOOLEAN_TYPE
Represents a boolean.
@ AIDA_UNSIGNED_INTEGER_ARRAY_TYPE
Represents an internal type of unsigned integer array.
@ AIDA_UNSIGNED_SHORT_TYPE
Represents an internal type of unsigned short.
@ AIDA_NO_TYPE
Used to indicate that no type was provided as an argument.
@ AIDA_DOUBLE_TYPE
Represents a double.
@ AIDA_DOUBLE_ARRAY_TYPE
Represents a double array.
@ AIDA_TABLE_TYPE
Represents a table.
void tableAddField(JNIEnv *env, Table *table, char *fieldName)
Add a dynamic field to a table.
void tableAddStringColumn(JNIEnv *env, Table *table, char **data)
Add a String column to the given Table.
void tableAddFixedWidthStringColumn(JNIEnv *env, Table *table, char *data, int width)
This reads data from an allocated space that is rows * width with each string occupying width charact...
void tableAddSingleRowFloatColumn(JNIEnv *env, Table *table, float data, bool ieeeFloat)
Add a float column to a Table with only one row.
int ascanf(JNIEnv *env, Arguments *arguments, const char *formatString,...)
ascanf(), avscanf()
void tableAddSingleRowLongColumn(JNIEnv *env, Table *table, long data)
Add a long column to a Table with only one row.
Table tableCreate(JNIEnv *env, int rows, int columns)
Make a Table for return to client.
void tableAddLabel(JNIEnv *env, Table *table, char *labelName)
Add a dynamic column to a table.
void tableAddSingleRowIntegerColumn(JNIEnv *env, Table *table, int data)
Add a integer column to a Table with only one row.
void tableAddSingleRowShortColumn(JNIEnv *env, Table *table, short data)
Add a short column to a Table with only one row.
void tableAddSingleRowByteColumn(JNIEnv *env, Table *table, unsigned char data)
Add a byte column to a Table with only one row.
void tableAddSingleRowDoubleColumn(JNIEnv *env, Table *table, double data, bool ieeeDouble)
Add a double column to a Table with only one row.
void tableAddSingleRowBooleanColumn(JNIEnv *env, Table *table, unsigned char data)
Add a boolean column to a Table with only one row.
void tableAddColumn(JNIEnv *env, Table *table, Type type, void *data, bool ieeeFormat)
Add a column of arbitrary type to a Table.
int avscanf(JNIEnv *env, Arguments *arguments, Value *value, const char *formatString,...)
ascanf(), avscanf()
void tableAddSingleRowStringColumn(JNIEnv *env, Table *table, char *data)
Add a string column to a Table with only one row.
Table tableCreateDynamic(JNIEnv *env, int rows, int columns)
Make a Dynamic Table for return to client.
The Header File for the Native Channel Provider AIDA-PVA type related functions.
#define FORMAT_SUFFIX_ARRAY
array format definition character for ascanf() and avscanf().
#define ASCANF_SET_BOOLEAN(_targetBoolean)
Macro used internally to set a scalar boolean for ascanf() and avscanf().
#define FORMAT_PREFIX_SHORT
short format definition character for ascanf() and avscanf().
#define FORMAT_BYTE
byte format definition character for ascanf() and avscanf().
#define MAX_FORMAT
Maximum length of s single format specifier for ascanf() and avscanf().
#define FORMAT_STRING
string format definition character for ascanf() and avscanf().
#define ASCANF_SET_BYTE(_targetByte)
Macro used internally to set a scalar byte for ascanf() and avscanf().
#define ASCANF_SET_BYTE_ARRAY
Macro used internally for setting a byte array for ascanf() and avscanf().
#define FORMAT_OPTIONAL_FLAG
optional format definition character for ascanf() and avscanf().
#define ASCANF_SET_STRING_ARRAY
Macro used internally to set a string array for ascanf() and avscanf().
#define MAX_FORMAT_SPECIFIERS
Maximum number of permitted format specifiers for ascanf() and avscanf().
#define ASCANF_SET_ARRAY(_format, _cType, _jsonType, _typeName)
Macro used internally to set an array for ascanf() and avscanf().
#define ASCANF_SET_STRING(_targetString)
Macro used internally to set a string for ascanf() and avscanf().
#define ASCANF_SET_BOOLEAN_ARRAY
Macro used to internally for setting a boolean array for ascanf() and avscanf().
#define FORMAT_UNSIGNED_INTEGER
unsigned int format definition character for ascanf() and avscanf().
#define FORMAT_FLOAT
float format definition character for ascanf() and avscanf().
#define FORMAT_PREFIX_LONG
long format definition character for ascanf() and avscanf().
#define ASCANF_SET_SCALAR(_format, _cType, _jsonType, _typeName, _target)
Macro used internally to set a scalar value for ascanf() and avscanf().
#define MIN_FLOAT_ALLOCATIONS
Minimum number of floating point allocations.
#define FORMAT_BOOLEAN
boolean format definition character for ascanf() and avscanf().
#define FORMAT_INTEGER
int format definition character for ascanf() and avscanf().
A single request argument.
char * value
The string value of the argument.
char * name
The name of the argument.
An Arguments structure stores all of the arguments passed from the request to the Native Channel Prov...
int floatingPointValuesCount
The number of floating point numbers in the arguments of this request.
FloatingPointValue * floatingPointValues
The array of FloatingPointValue.
Represents a floating point number.
char * path
The string path from the root of the json structure in which this value is found.
bool isFloat
Determines whether the value is a single or double precision floating point value.
FloatOrDoubleValue value
The floating point value.
int columnCount
number of columns in table
char ** ppLabels
the overridden label names. if null, not overridden. If not null then array of pointers to allocated ...
int _currentLabel
For internal use by addLabel() etc.
char ** ppFields
the overridden field names. if null, not overridden. If not null then array of pointers to allocated ...
Type * types
the scalar type of each column, one of BOOLEAN, BYTE, SHORT, INTEGER, LONG, FLOAT,...
void ** ppData
the data. an array of [rows][columns]
int _currentField
For internal use by addField() etc.
int rowCount
number of rows in table
int _currentColumn
For internal use by addColumn() etc.
This special type represents a Value.
ValueContents value
The value's contents, either a string or parsed json.
Type type
AIDA_STRING_TYPE or AIDA_JSON_TYPE.
double doubleValue
The double precision floating point value.
float floatValue
The single precision floating point value.
json_value * jsonValue
The parsed json_value of this Value if the type is AIDA_JSON_TYPE.
char * stringValue
The string value of this Value if the type is AIDA_STRING_TYPE.