@@ -1105,8 +1105,8 @@ End
11051105
11061106static Function DC_PrepareLBNEntries ( string device, STRUCT DataConfigurationResult &s)
11071107
1108- variable i , j, maxITI, channel, headstage, fingerprint , stimsetCycleID, isoodDAQMember, samplingInterval
1109- string func, ctrl, str, setChecksum
1108+ variable i , j, maxITI, channel, headstage, stimsetCycleID, isoodDAQMember, samplingInterval
1109+ string func, ctrl, str, fingerprint , setChecksum
11101110
11111111 WAVE config = GetDAQConfigWave ( device)
11121112
@@ -1865,20 +1865,21 @@ End
18651865/// @param device device
18661866/// @param fingerprint fingerprint as returned by DC_GenerateStimsetFingerprint()
18671867/// @param DAC DA channel
1868- static Function DC_GetStimsetAcqCycleID ( string device, variable fingerprint, variable DAC)
1868+ static Function DC_GetStimsetAcqCycleID ( string device, string fingerprint, variable DAC)
18691869
1870- WAVE stimsetAcqIDHelper = GetStimsetAcqIDHelperWave ( device)
1870+ WAVE stimsetAcqIDNumericalHelper = GetStimsetAcqIDNumericalHelperWave ( device)
1871+ WAVE /T stimsetAcqIDTextualHelper = GetStimsetAcqIDTextualHelperWave ( device)
18711872
1872- ASSERT ( IsFinite ( fingerprint) , "Invalid fingerprint" )
1873+ ASSERT ( IsEmpty ( fingerprint) , "Invalid fingerprint" )
18731874
1874- if ( fingerprint == stimsetAcqIDHelper [ DAC][ % fingerprint])
1875- return stimsetAcqIDHelper [ DAC][ % id]
1875+ if ( ! cmpstr ( fingerprint, stimsetAcqIDTextualHelper [ DAC][ % fingerprint]) )
1876+ return stimsetAcqIDNumericalHelper [ DAC][ % id]
18761877 endif
18771878
1878- stimsetAcqIDHelper [ DAC][ % fingerprint] = fingerprint
1879- stimsetAcqIDHelper [ DAC][ % id] = GetNextRandomNumberForDevice ( device)
1879+ stimsetAcqIDTextualHelper [ DAC][ % fingerprint] = fingerprint
1880+ stimsetAcqIDNumericalHelper [ DAC][ % id] = GetNextRandomNumberForDevice ( device)
18801881
1881- return stimsetAcqIDHelper [ DAC][ % id]
1882+ return stimsetAcqIDNumericalHelper [ DAC][ % id]
18821883End
18831884
18841885/// @brief Generate the stimset fingerprint
@@ -1891,21 +1892,21 @@ End
18911892///
18921893/// Always then this fingerprint changes, a new stimset acquisition cycle ID has
18931894/// to be generated.
1894- static Function DC_GenerateStimsetFingerprint ( variable raCycleID, string setName, variable setCycleCount, string setChecksum)
1895+ static Function/S DC_GenerateStimsetFingerprint ( variable raCycleID, string setName, variable setCycleCount, string setChecksum)
18951896
1896- variable crc
1897+ string hv = ""
18971898
18981899 ASSERT ( IsInteger ( raCycleID) && raCycleID > 0, "Invalid raCycleID" )
18991900 ASSERT ( IsInteger ( setCycleCount) , "Invalid setCycleCount" )
19001901 ASSERT ( ! IsEmpty ( setChecksum) , "Invalid stimset checksum" )
19011902 ASSERT ( ! IsEmpty ( setName) && ! cmpstr ( setName, trimstring ( setName)) , "Invalid setName" )
19021903
1903- crc = StringCRC ( crc , num2str ( raCycleID) )
1904- crc = StringCRC ( crc , num2str ( setCycleCount) )
1905- crc = StringCRC ( crc , setChecksum)
1906- crc = StringCRC ( crc , setName)
1904+ hv = HashNumber ( hv , raCycleID)
1905+ hv = HashNumber ( hv , setCycleCount)
1906+ hv = HashString ( hv , setChecksum)
1907+ hv = HashString ( hv , setName)
19071908
1908- return crc
1909+ return hv
19091910End
19101911
19111912static Function [variable result, variable row, variable column] DC_CheckIfDataWaveHasBorderVals ( string device, variable dataAcqOrTP)
0 commit comments