@@ -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- }
0 commit comments