diff --git a/Packages/MIES/MIES_CheckInstallation.ipf b/Packages/MIES/MIES_CheckInstallation.ipf index 3683d7a9f2..9d885a2e8c 100644 --- a/Packages/MIES/MIES_CheckInstallation.ipf +++ b/Packages/MIES/MIES_CheckInstallation.ipf @@ -12,7 +12,7 @@ /// MIES installation static StrConstant CHI_NIDAQ_XOP_64_HASH = "b13267a080053c07b80302212b7f73ac199e1f001d9a1b4303e2d7dce1aeb39e" -static StrConstant CHI_JSON_XOP_VERSION = "version-882-gad839a0" +static StrConstant CHI_JSON_XOP_VERSION = "version-892-g9251933" static StrConstant CHI_TUF_XOP_VERSION = "version-163-g686effb" static StrConstant CHI_ITC_XOP_VERSION = "latest-174-gb9915a9" diff --git a/Packages/MIES/json_functions.ipf b/Packages/MIES/json_functions.ipf index c753a2c550..40dbced106 100644 --- a/Packages/MIES/json_functions.ipf +++ b/Packages/MIES/json_functions.ipf @@ -47,7 +47,7 @@ static Constant JSON_QFLAG_DEFAULT = 1 #endif /// @addtogroup JSON_TYPES -///@{ +/// @{ Constant JSON_INVALID = -1 Constant JSON_OBJECT = 0 Constant JSON_ARRAY = 1 @@ -55,22 +55,24 @@ Constant JSON_NUMERIC = 2 Constant JSON_STRING = 3 Constant JSON_BOOL = 4 Constant JSON_NULL = 5 -///@} +/// @} /// @addtogroup JSON_SYNC_OPTIONS -///@{ +/// @{ // if element in source exists, but not in target, then add element in target Constant JSON_SYNC_ADD_TO_TARGET = 0x0 // if element in target exists, but not in source, then remove element in target Constant JSON_SYNC_REMOVE_IN_TARGET = 0x1 // if element in source exists and in target, then overwrite element in target Constant JSON_SYNC_OVERWRITE_IN_TARGET = 0x2 -///@} +/// @} static Constant IGOR_STRING_MAX_SIZE = 2147483647 +static Constant INT64_MAX_IN_DOUBLE = 9223372036854774784 +static Constant INT64_MIN_IN_DOUBLE = -9223372036854775808 /// @addtogroup JSONXOP_Parse -///@{ +/// @{ /// @brief Parse a JSON string with the XOP /// /// @param jsonStr string representation of the JSON object @@ -93,10 +95,10 @@ threadsafe Function JSON_Parse(jsonStr, [ignoreErr]) return V_Value End -///@} +/// @} /// @addtogroup JSONXOP_Dump -///@{ +/// @{ /// @brief Dump a JSON id to its string representation /// @@ -123,10 +125,10 @@ threadsafe Function/S JSON_Dump(jsonID, [indent, ignoreErr]) return S_Value End -///@} +/// @} /// @addtogroup JSONXOP_New -///@{ +/// @{ /// @brief register a new object /// /// @param ignoreErr [optional, default 0] set to ignore runtime errors @@ -147,10 +149,10 @@ threadsafe Function JSON_New([ignoreErr]) return V_Value End -///@} +/// @} /// @addtogroup JSONXOP_Release -///@{ +/// @{ /// @brief Release a JSON id from memory /// /// @param jsonID numeric identifier of the main object @@ -173,10 +175,10 @@ threadsafe Function JSON_Release(jsonID, [ignoreErr]) return 0 End -///@} +/// @} /// @addtogroup JSONXOP_Remove -///@{ +/// @{ /// @brief Remove a path element from a JSON string representation /// /// @param jsonID numeric identifier of the main object @@ -201,10 +203,10 @@ threadsafe Function JSON_Remove(jsonID, jsonPath, [ignoreErr]) return 0 End -///@} +/// @} /// @addtogroup JSONXOP_AddTree -///@{ +/// @{ /// @brief Recursively add new objects to the tree /// @@ -258,9 +260,9 @@ threadsafe static Function JSON_AddTree(jsonID, jsonPath, type, ignoreErr) return 0 End -///@} +/// @} /// @addtogroup JSONXOP_GetKeys -///@{ +/// @{ /// @brief Get the name of all object members of the specified path /// /// @param jsonID numeric identifier of the JSON object @@ -292,10 +294,10 @@ threadsafe Function/WAVE JSON_GetKeys(jsonID, jsonPath, [esc, ignoreErr]) return result End -///@} +/// @} /// @addtogroup JSONXOP_GetType -///@{ +/// @{ /// @brief get the JSON Type for an element at the given path. /// /// @param jsonID numeric identifier of the JSON object @@ -321,10 +323,10 @@ threadsafe Function JSON_GetType(jsonID, jsonPath, [ignoreErr]) return V_Value End -///@} +/// @} /// @addtogroup JSONXOP_GetArraySize -///@{ +/// @{ /// @brief Get the number of elements in an array. /// /// @param jsonID numeric identifier of the JSON object @@ -349,10 +351,10 @@ threadsafe Function JSON_GetArraySize(jsonID, jsonPath, [ignoreErr]) return V_Value End -///@} +/// @} /// @addtogroup JSONXOP_GetMaxArraySize -///@{ +/// @{ /// @brief Get the maximum element size for each dimension in an array /// /// @param jsonID numeric identifier of the JSON object @@ -377,10 +379,10 @@ threadsafe Function/WAVE JSON_GetMaxArraySize(jsonID, jsonPath, [ignoreErr]) return w End -///@} +/// @} /// @addtogroup JSONXOP_GetValue -///@{ +/// @{ /// @brief Get new JSON object from a json path of an existing JSON object. /// The original jsonID is not freed and stays valid. @@ -564,10 +566,10 @@ threadsafe Function [UInt64 result] JSON_GetUInt64(Variable jsonID, String jsonP return [result] End -///@} +/// @} /// @addtogroup JSONXOP_AddValue -///@{ +/// @{ /// @brief Add a string entity to a JSON object /// @@ -611,7 +613,7 @@ threadsafe Function JSON_AddVariable(jsonID, jsonPath, value, [significance, ign ignoreErr = ParamIsDefault(ignoreErr) ? JSON_ZFLAG_DEFAULT : !!ignoreErr - if(trunc(value) == value && !numtype(value)) + if(trunc(value) == value && !numtype(value) && value >= INT64_MIN_IN_DOUBLE && value <= INT64_MAX_IN_DOUBLE) JSONXOP_AddValue/Z=1/Q=(JSON_QFLAG_DEFAULT)/I=(value) jsonID, jsonPath elseif(ParamIsDefault(significance)) JSONXOP_AddValue/Z=1/Q=(JSON_QFLAG_DEFAULT)/V=(value) jsonID, jsonPath @@ -857,7 +859,7 @@ threadsafe Function JSON_SetVariable(jsonID, jsonPath, value, [significance, ign ignoreErr = ParamIsDefault(ignoreErr) ? JSON_ZFLAG_DEFAULT : !!ignoreErr - if(trunc(value) == value && !numtype(value)) + if(trunc(value) == value && !numtype(value) && value >= INT64_MIN_IN_DOUBLE && value <= INT64_MAX_IN_DOUBLE) JSONXOP_AddValue/Z=1/Q=(JSON_QFLAG_DEFAULT)/O/I=(value) jsonID, jsonPath elseif(ParamIsDefault(significance)) JSONXOP_AddValue/Z=1/Q=(JSON_QFLAG_DEFAULT)/O/V=(value) jsonID, jsonPath @@ -1061,7 +1063,7 @@ threadsafe Function JSON_SetJSON(jsonID, jsonPath, jsonID2, [ignoreErr]) return 0 End -///@} +/// @} threadsafe static Function JSON_KVPairsToJSON(jsonID, jsonPath, str, ignoreErr) variable jsonID, ignoreErr @@ -1082,7 +1084,7 @@ threadsafe static Function JSON_KVPairsToJSON(jsonID, jsonPath, str, ignoreErr) End /// @addtogroup JSON_GetIgorInfo -///@{ +/// @{ /// @brief Return JSON with Igor information /// @@ -1105,10 +1107,10 @@ threadsafe Function JSON_GetIgorInfo([ignoreErr]) return jsonID End -///@} +/// @} /// @addtogroup JSONXOP_Version -///@{ +/// @{ /// @brief Output version information useful for issue reports /// @@ -1138,10 +1140,10 @@ Function/S JSON_Version([ignoreErr]) return rep End -///@} +/// @} /// @addtogroup JSONXOP_Exists -///@{ +/// @{ /// @brief Check if the jsonID/jsonPath is valid /// @@ -1155,10 +1157,10 @@ threadsafe Function JSON_Exists(jsonID, jsonPath) return JSON_GetType(jsonID, jsonPath, ignoreErr = 1) != JSON_INVALID End -///@} +/// @} /// @addtogroup JSONXOP_Options -///@{ +/// @{ /// @brief Disables quiet mode Function JSON_DisableQuietMode() @@ -1184,10 +1186,10 @@ Function JSON_UnsetIgnoreErrors() Execute/P/Q "COMPILEPROCEDURES " End -///@} +/// @} /// @addtogroup JSON_SyncJSON -///@{ +/// @{ /// @brief Syncs data from a source json into a target json. /// @@ -1298,7 +1300,7 @@ threadsafe Function JSON_SyncJSON(variable srcJsonId, variable tgtJsonId, string return 0 End -///@} +/// @} threadsafe static Function JSON_AddArrayElementToParentIfArray(variable jsonId, string jsonPath) @@ -1318,7 +1320,7 @@ threadsafe static Function JSON_CopyJSON(variable srcJsonId, variable tgtJsonId, End /// @addtogroup JSON_LoadSave -///@{ +/// @{ /// @brief Loads a text file and parses it to JSON, then returns jsonId /// @@ -1402,10 +1404,10 @@ threadsafe Function JSON_Save(variable jsonId, string fullFilepath, [variable ig return 0 End -///@} +/// @} /// @addtogroup JSON_IsValid -///@{ +/// @{ /// @brief Check if the given JSON identifier refers to an open JSON document /// @@ -1422,4 +1424,4 @@ threadsafe Function JSON_IsValid(variable jsonID) return !V_flag End -///@} +/// @} diff --git a/Packages/tests/UTF_Constants.ipf b/Packages/tests/UTF_Constants.ipf index 8b0be728ad..50cb63b4a9 100644 --- a/Packages/tests/UTF_Constants.ipf +++ b/Packages/tests/UTF_Constants.ipf @@ -13,4 +13,4 @@ StrConstant ZSTD_SUFFIX = ".zst" Constant TP_DURATION_S = 5 -Constant PSQ_TEST_VERY_LARGE_FREQUENCY = 1e300 +Constant PSQ_TEST_VERY_LARGE_FREQUENCY = 1e350 diff --git a/Packages/tests/UTF_HardwareHelperFunctions.ipf b/Packages/tests/UTF_HardwareHelperFunctions.ipf index 4b1edc5fa9..fe40fbc167 100644 --- a/Packages/tests/UTF_HardwareHelperFunctions.ipf +++ b/Packages/tests/UTF_HardwareHelperFunctions.ipf @@ -772,8 +772,6 @@ static Function CheckRangeOfUserLabnotebookKeys(string device, variable type, va endif endif - CHECK(IsFinite(value)) - INFO("sweepNo=%g, entry=%s, unit=%s\r", n0 = sweepNo, s0 = entry, s1 = unit) // do a coarse range check diff --git a/XOPs-IP9-64bit/JSON-64.xop b/XOPs-IP9-64bit/JSON-64.xop index 47fbb18424..55b0b1c216 100644 Binary files a/XOPs-IP9-64bit/JSON-64.xop and b/XOPs-IP9-64bit/JSON-64.xop differ diff --git a/XOPs-MacOSX-IP9-64bit/JSON-64.xop/Contents/CodeResources b/XOPs-MacOSX-IP9-64bit/JSON-64.xop/Contents/CodeResources index 70db2168ed..2b54135640 100644 Binary files a/XOPs-MacOSX-IP9-64bit/JSON-64.xop/Contents/CodeResources and b/XOPs-MacOSX-IP9-64bit/JSON-64.xop/Contents/CodeResources differ diff --git a/XOPs-MacOSX-IP9-64bit/JSON-64.xop/Contents/MacOS/JSON-64 b/XOPs-MacOSX-IP9-64bit/JSON-64.xop/Contents/MacOS/JSON-64 index 54d19a3787..eddfa30924 100644 Binary files a/XOPs-MacOSX-IP9-64bit/JSON-64.xop/Contents/MacOS/JSON-64 and b/XOPs-MacOSX-IP9-64bit/JSON-64.xop/Contents/MacOS/JSON-64 differ