@@ -141,6 +141,8 @@ namespace OnixSourcePlugin
141141 std::vector<std::string> m_channelIdentifierSubTypes = { " subtypes" };
142142 };
143143
144+ using OnixDeviceMap = std::map<uint32_t , OnixDeviceType>;
145+
144146 /* *
145147
146148 Streams data from an ONIX device
@@ -153,32 +155,21 @@ namespace OnixSourcePlugin
153155 /* * Constructor */
154156 OnixDevice (std::string name_, std::string hubName, OnixDeviceType type_, const oni_dev_idx_t , std::shared_ptr<Onix1> oni_ctx, bool passthrough = false );
155157
156- /* * Destructor */
157- ~OnixDevice () { }
158-
159158 virtual void addFrame (oni_frame_t *) {};
160-
161159 virtual void processFrames () {};
162160
163161 const std::string getName () { return name; }
164-
165162 bool isEnabled () const { return enabled; }
166-
167163 void setEnabled (bool newState) { enabled = newState; }
164+ oni_dev_idx_t getDeviceIdx (bool getPassthroughIndex = false );
168165
169166 virtual int configureDevice () { return -1 ; };
170-
171167 virtual bool updateSettings () { return false ; };
172-
173168 virtual void startAcquisition () {};
174-
175169 virtual void stopAcquisition () {};
176-
177170 /* * Given the sourceBuffers from OnixSource, add all streams for the current device to the array */
178171 virtual void addSourceBuffers (OwnedArray<DataBuffer>& sourceBuffers) {};
179172
180- oni_dev_idx_t getDeviceIdx (bool getPassthroughIndex = false );
181-
182173 /* * Creates a stream name using the provided inputs, returning a string following the pattern: name[0]-name[1]-name[2]-etc., with all spaces removed */
183174 static std::string createStreamName (std::vector<std::string> names);
184175
@@ -196,11 +187,12 @@ namespace OnixSourcePlugin
196187 static int getPortOffset (PortName port);
197188 static std::string getPortName (int offset);
198189 static std::string getPortName (PortName port);
199- static std::string getPortNameFromIndex (oni_dev_idx_t index);
190+ static std::string getPortName (oni_dev_idx_t index);
200191 static PortName getPortFromIndex (oni_dev_idx_t index);
201- static int getOffsetFromIndex (oni_dev_idx_t index);
202- static std::vector<int > getUniqueOffsetsFromIndices (std::vector<int > indices, bool ignoreBreakoutBoard = true );
203- static Array<PortName> getUniquePortsFromIndices (std::vector<int > indices);
192+ static int getOffset (oni_dev_idx_t index);
193+ static std::vector<int > getUniqueOffsets (std::vector<int > indices, bool ignoreBreakoutBoard = true );
194+ static std::vector<int > getUniqueOffsets (OnixDeviceMap devices, bool ignoreBreakoutBoard = true );
195+ static Array<PortName> getUniquePorts (std::vector<int > indices);
204196
205197 OnixDeviceType getDeviceType () const ;
206198
0 commit comments