Skip to content

Commit 915f93f

Browse files
committed
Remove handleBroadcastMessage function from LfpDisplayNode
1 parent 94b40a5 commit 915f93f

File tree

2 files changed

+0
-75
lines changed

2 files changed

+0
-75
lines changed

Plugins/LfpViewer/LfpDisplayNode.cpp

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -317,75 +317,3 @@ void LfpDisplayNode::acknowledgeTrigger (int id)
317317
{
318318
latestTrigger.set (id, -1);
319319
}
320-
321-
void LfpDisplayNode::handleBroadcastMessage (const String& msg, const int64 messageTimeMillis)
322-
{
323-
var parsedMessage = JSON::parse (msg);
324-
325-
if (! parsedMessage.isObject())
326-
{
327-
LOGC ("Failed to parse JSON message");
328-
329-
return;
330-
}
331-
332-
DynamicObject::Ptr jsonMessage = parsedMessage.getDynamicObject();
333-
334-
if (jsonMessage == nullptr)
335-
{
336-
LOGC ("Json message did not map to dynamic object");
337-
338-
return;
339-
}
340-
341-
String pluginName = jsonMessage->getProperty ("plugin");
342-
343-
if (pluginName != "LFPViewer")
344-
return;
345-
346-
String command = jsonMessage->getProperty ("command");
347-
DynamicObject::Ptr payload = jsonMessage->getProperty ("payload").getDynamicObject();
348-
349-
if (command == "filter")
350-
{
351-
if (payload.get() == nullptr)
352-
{
353-
LOGD ("Tried to filter in LFPViewer, but could not find a payload");
354-
355-
return;
356-
}
357-
358-
if (! payload->hasProperty ("stream_id"))
359-
return;
360-
361-
auto& p = payload->getProperty ("stream_id");
362-
363-
if (! p.isInt())
364-
return;
365-
366-
auto filteredStreamId = p.operator int();
367-
368-
if (! payload->hasProperty ("local_channel_indices"))
369-
return;
370-
371-
auto& filteredLocalChidxsVar = payload->getProperty ("local_channel_indices");
372-
373-
if (! filteredLocalChidxsVar.isArray())
374-
return;
375-
376-
auto& filteredLocalChidxsV = *filteredLocalChidxsVar.getArray();
377-
Array<int> filteredLocalChidxs;
378-
379-
for (const auto& chidx : filteredLocalChidxsV)
380-
filteredLocalChidxs.add ((int) chidx);
381-
382-
for (auto& display : splitDisplays)
383-
{
384-
if (display->selectedStreamId == filteredStreamId)
385-
{
386-
display->setFilteredChannels (filteredLocalChidxs);
387-
display->shouldRebuildChannelList = true;
388-
}
389-
}
390-
}
391-
}

Plugins/LfpViewer/LfpDisplayNode.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ class TESTABLE LfpDisplayNode : public GenericProcessor
9999
/** Acknowledges receipt of a trigger for a given split display*/
100100
void acknowledgeTrigger (int splitId);
101101

102-
/** Handles messages from other processors during acquisition*/
103-
void handleBroadcastMessage (const String& msg, const int64 messageTimeMillis) override;
104-
105102
bool getHeadlessMode() const
106103
{
107104
return headlessMode;

0 commit comments

Comments
 (0)