2
* @file hss1394enumerator.cpp
3
* @author Sean Pappalardo spappalardo@mixxx.org
4
* @date Thu 15 Mar 2012
7
#include <hss1394/HSS1394.h>
9
#include "controllers/midi/hss1394controller.h"
10
#include "controllers/midi/hss1394enumerator.h"
12
Hss1394Enumerator::Hss1394Enumerator() : MidiEnumerator() {
15
Hss1394Enumerator::~Hss1394Enumerator() {
16
qDebug() << "Deleting HSS1394 devices...";
17
QListIterator<Controller*> dev_it(m_devices);
18
while (dev_it.hasNext()) {
21
using namespace hss1394;
25
// Enumerate the HSS1394 MIDI devices
26
QList<Controller*> Hss1394Enumerator::queryDevices() {
27
qDebug() << "Scanning HSS1394 devices:";
28
using namespace hss1394;
30
hss1394::uint uNodes = Node::Instance()->GetNodeCount();
31
qDebug() << " Nodes detected:" << uNodes;
33
for(hss1394::uint i=0; i<40; i++) {
36
if (Node::Instance()->GetNodeInfo(tNodeInfo, i, NULL, &bInstalled)) {
37
QString message = QString("Node %1 (%2): Name = <%3>, GUID = %4 %5, FW[%6]")
38
.arg(QString::number(i),
39
(bInstalled)?"installed":"not installed",
40
tNodeInfo.sName.c_str(),
41
QString("%1").arg(tNodeInfo.uGUID.mu32High, 0, 16),
42
QString("%1").arg(tNodeInfo.uGUID.mu32Low, 0, 16),
43
QString("%1").arg(tNodeInfo.uProtocolVersion, 0, 16));
44
qDebug() << " " << message;
45
Hss1394Controller *currentDevice = new Hss1394Controller(
47
m_devices.push_back(currentDevice);