Skip to content

Commit

Permalink
FFI_SetCellElectrodeName: Add it
Browse files Browse the repository at this point in the history
  • Loading branch information
t-b committed Jul 29, 2024
1 parent 930125a commit 80bfc75
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 12 additions & 0 deletions Packages/MIES/MIES_ForeignFunctionInterface.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,15 @@ Function/WAVE FFI_GetAvailableMessageFilters()

return wv
End

/// @brief Set the headstage/cell electrode name
Function FFI_SetCellElectrodeName(string device, variable headstage, string name)

DAP_AbortIfUnlocked(device)
ASSERT(IsValidHeadstage(headstage), "Invalid headstage index")
ASSERT(H5_IsValidIdentifier(name), "Name of the electrode/headstage needs to be a valid HDF5 identifier")

WAVE/T cellElectrodeNames = GetCellElectrodeNames(device)

cellElectrodeNames[headstage] = name
End
6 changes: 2 additions & 4 deletions Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -2473,10 +2473,8 @@ End

static Function TestCustomElectrodeNamesInNWB_preAcq(string device)

WAVE/T cellElectrodeNames = GetCellElectrodeNames(device)
// must be valid HDF5 identifiers
cellElectrodeNames[0] = "Electric Dreams of Voltage"
cellElectrodeNames[1] = "Electric Dreams of Current"
FFI_SetCellElectrodeName(device, 0, "Electric Dreams of Voltage")
FFI_SetCellElectrodeName(device, 1, "Electric Dreams of Current")
End

// UTF_TD_GENERATOR DeviceNameGeneratorMD1
Expand Down

0 comments on commit 80bfc75

Please sign in to comment.