Skip to content

Commit fcf4769

Browse files
committed
Update ProcessorGraphTests with new XML settings
1 parent 46fdcd7 commit fcf4769

1 file changed

Lines changed: 75 additions & 65 deletions

File tree

Tests/Processors/ProcessorGraphTests.cpp

Lines changed: 75 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -55,71 +55,81 @@ TEST_F (ProcessorGraphTest, LoadFromXMLTest)
5555

5656
// An example XML from a real run of OpenEphys. To generate this, we opened OpenEphys, dragged a FileReader and
5757
// BandpassFilter, and then did File > Save As... and saved the XML. The XML contents were then copied here.
58-
std::string docText = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
59-
"\n"
60-
"<SETTINGS>\n"
61-
" <INFO>\n"
62-
" <VERSION>0.6.4</VERSION>\n"
63-
" <PLUGIN_API_VERSION>8</PLUGIN_API_VERSION>\n"
64-
" <DATE>17 May 2023 12:50:55</DATE>\n"
65-
" <OS>Mac OSX 12.6.1</OS>\n"
66-
" <MACHINE name=\"XXXX-MBP-2\" cpu_model=\"Apple M1 Pro\" cpu_num_cores=\"10\"/>\n"
67-
" </INFO>\n"
68-
" <SIGNALCHAIN>\n"
69-
" <PROCESSOR name=\"File Reader\" insertionPoint=\"0\" pluginName=\"File Reader\"\n"
70-
" type=\"0\" index=\"2\" libraryName=\"\" libraryVersion=\"\" processorType=\"2\"\n"
71-
" nodeId=\"100\">\n"
72-
" <GLOBAL_PARAMETERS/>\n"
73-
" <STREAM name=\"example_data\" description=\"A description of the File Reader Stream\"\n"
74-
" sample_rate=\"40000.0\" channel_count=\"16\">\n"
75-
" <PARAMETERS/>\n"
76-
" </STREAM>\n"
77-
" <CUSTOM_PARAMETERS>\n"
78-
" <FILENAME path=\""
79-
+ defaultFileReaderPath + "\" recording=\"0\"/>\n"
80-
" </CUSTOM_PARAMETERS>\n"
81-
" <EDITOR isCollapsed=\"0\" isDrawerOpen=\"0\" displayName=\"File Reader\" activeStream=\"0\">\n"
82-
" <TIME_LIMITS start_time=\"0.0\" stop_time=\"4999.0\"/>\n"
83-
" </EDITOR>\n"
84-
" </PROCESSOR>\n"
85-
" <PROCESSOR name=\"Bandpass Filter\" insertionPoint=\"1\" pluginName=\"Bandpass Filter\"\n"
86-
" type=\"1\" index=\"0\" libraryName=\"Bandpass Filter\" libraryVersion=\"0.1.0\"\n"
87-
" processorType=\"1\" nodeId=\"101\">\n"
88-
" <GLOBAL_PARAMETERS/>\n"
89-
" <STREAM name=\"example_data\" description=\"A description of the File Reader Stream\"\n"
90-
" sample_rate=\"40000.0\" channel_count=\"16\">\n"
91-
" <PARAMETERS enable_stream=\"1\" low_cut=\"300.0\" high_cut=\"6000.0\" Channels=\"\"/>\n"
92-
" </STREAM>\n"
93-
" <CUSTOM_PARAMETERS/>\n"
94-
" <EDITOR isCollapsed=\"0\" isDrawerOpen=\"0\" displayName=\"Bandpass Filter\"\n"
95-
" activeStream=\"0\"/>\n"
96-
" </PROCESSOR>\n"
97-
" </SIGNALCHAIN>\n"
98-
" <CONTROLPANEL isOpen=\"0\" recordPath=\"\" recordEngine=\"BINARY\"\n"
99-
" clockMode=\"0\"/>\n"
100-
" <AUDIOEDITOR isMuted=\"0\" volume=\"50.0\" noiseGate=\"0.0\"/>\n"
101-
" <FILENAMECONFIG>\n"
102-
" <PREPEND state=\"0\" value=\"\"/>\n"
103-
" <MAIN state=\"1\" value=\"YYYY-MM-DD_HH-MM-SS\"/>\n"
104-
" <APPEND state=\"0\" value=\"\"/>\n"
105-
" </FILENAMECONFIG>\n"
106-
" <EDITORVIEWPORT scroll=\"0\">\n"
107-
" <FILE_READER ID=\"100\"/>\n"
108-
" <BANDPASS_FILTER ID=\"101\"/>\n"
109-
" </EDITORVIEWPORT>\n"
110-
" <DATAVIEWPORT selectedTab=\"2\"/>\n"
111-
" <PROCESSORLIST>\n"
112-
" <COLOR ID=\"801\" R=\"59\" G=\"59\" B=\"59\"/>\n"
113-
" <COLOR ID=\"804\" R=\"241\" G=\"90\" B=\"41\"/>\n"
114-
" <COLOR ID=\"802\" R=\"0\" G=\"174\" B=\"239\"/>\n"
115-
" <COLOR ID=\"803\" R=\"0\" G=\"166\" B=\"81\"/>\n"
116-
" <COLOR ID=\"805\" R=\"147\" G=\"149\" B=\"152\"/>\n"
117-
" <COLOR ID=\"806\" R=\"255\" G=\"0\" B=\"0\"/>\n"
118-
" <COLOR ID=\"807\" R=\"0\" G=\"0\" B=\"0\"/>\n"
119-
" </PROCESSORLIST>\n"
120-
" <UICOMPONENT isProcessorListOpen=\"1\" isEditorViewportOpen=\"1\"/>\n"
121-
" <AUDIO sampleRate=\"44100.0\" bufferSize=\"1024\" deviceType=\"CoreAudio\"/>\n"
122-
"</SETTINGS>";
58+
std::string docText = R"(<?xml version="1.0" encoding="UTF-8"?>
59+
<SETTINGS>
60+
<INFO>
61+
<VERSION>1.0.0</VERSION>
62+
<PLUGIN_API_VERSION>9</PLUGIN_API_VERSION>
63+
<DATE>14 March 2025 12:00:00</DATE>
64+
<OS>fedora</OS>
65+
<MACHINE name="Open-Ephys" cpu_model="11th Gen Intel(R) Core(TM) i7-11700F @ 2.50GHz" cpu_num_cores="16"/>
66+
</INFO>
67+
<SIGNALCHAIN>
68+
<PROCESSOR name="File Reader" insertionPoint="0" pluginName="File Reader"
69+
type="0" index="2" libraryName="" libraryVersion="" processorType="2"
70+
nodeId="100">
71+
<PROCESSOR_PARAMETERS selected_file=")"
72+
+ defaultFileReaderPath +
73+
R"(" active_stream="0" start_time="00:00:00" end_time="00:00:03.999"/>
74+
<STREAM name="example_data" description="A description of the File Reader Stream"
75+
sample_rate="40000.0" channel_count="16">
76+
<PARAMETERS enable_stream="1"/>
77+
</STREAM>
78+
<CUSTOM_PARAMETERS>
79+
<SCRUBBERINTERFACE show="false"/>
80+
</CUSTOM_PARAMETERS>
81+
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="File Reader" activeStream="0"/>
82+
</PROCESSOR>
83+
<PROCESSOR name="Bandpass Filter" insertionPoint="1" pluginName="Bandpass Filter"
84+
type="1" index="1" libraryName="Bandpass Filter" libraryVersion="1.0.0-dev"
85+
processorType="1" nodeId="101">
86+
<PROCESSOR_PARAMETERS threads="1"/>
87+
<STREAM name="example_data" description="A description of the File Reader Stream"
88+
sample_rate="40000.0" channel_count="16">
89+
<PARAMETERS enable_stream="1" low_cut="300.0" high_cut="6000.0" channels=""/>
90+
</STREAM>
91+
<CUSTOM_PARAMETERS/>
92+
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="Bandpass Filter"
93+
activeStream="0"/>
94+
</PROCESSOR>
95+
</SIGNALCHAIN>
96+
<CONTROLPANEL isOpen="0" recordPath="/" recordEngine="BINARY"
97+
clockMode="0" clockReferenceTime="0" forceNewDirectory="0"/>
98+
<AUDIOEDITOR isMuted="0" volume="50.0" noiseGate="0.0"/>
99+
<FILENAMECONFIG>
100+
<PREPEND state="0" value=""/>
101+
<MAIN state="1" value="YYYY-MM-DD_HH-MM-SS"/>
102+
<APPEND state="0" value=""/>
103+
</FILENAMECONFIG>
104+
<EDITORVIEWPORT selectedTab="0" scroll="0"/>
105+
<GRAPHVIEWER>
106+
<NODE id="100" isProcessorInfoVisible="0">
107+
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
108+
</NODE>
109+
<NODE id="101" isProcessorInfoVisible="0">
110+
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
111+
</NODE>
112+
</GRAPHVIEWER>
113+
<DATAVIEWPORT>
114+
<TABBEDCOMPONENT index="0" selectedTabNodeId="1">
115+
<TAB nodeId="0"/>
116+
<TAB nodeId="1"/>
117+
</TABBEDCOMPONENT>
118+
</DATAVIEWPORT>
119+
<PROCESSORLIST>
120+
<COLOUR ID="801" R="50" G="50" B="50"/>
121+
<COLOUR ID="804" R="241" G="90" B="41"/>
122+
<COLOUR ID="802" R="0" G="160" B="225"/>
123+
<COLOUR ID="803" R="0" G="166" B="81"/>
124+
<COLOUR ID="805" R="90" G="110" B="110"/>
125+
<COLOUR ID="806" R="255" G="0" B="0"/>
126+
<COLOUR ID="807" R="0" G="0" B="0"/>
127+
</PROCESSORLIST>
128+
<UICOMPONENT isProcessorListOpen="1" isEditorViewportOpen="1" consoleOpenInWindow="0"/>
129+
<AUDIO sampleRate="44100.0" bufferSize="1024" deviceType="ALSA"/>
130+
<MESSAGES/>
131+
</SETTINGS>
132+
)";
123133

124134
XmlDocument doc (docText);
125135
std::unique_ptr<XmlElement> xml = doc.getDocumentElement();

0 commit comments

Comments
 (0)