1
/***************************************************************************
3
HSS1394 Device Enumerator Class
4
--------------------------------
5
begin : Fri Feb 26 2010
6
copyright : (C) 2010 Sean M. Pappalardo
7
email : spappalardo@mixxx.org
9
***************************************************************************/
11
/***************************************************************************
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
18
***************************************************************************/
20
#include <hss1394/HSS1394.h>
22
#include "mididevicehss1394.h"
23
#include "hss1394enumerator.h"
26
Hss1394Enumerator::Hss1394Enumerator() : MidiDeviceEnumerator() {
29
Hss1394Enumerator::~Hss1394Enumerator() {
30
qDebug() << "Deleting HSS1394 devices...";
31
QListIterator<MidiDevice*> dev_it(m_devices);
32
while (dev_it.hasNext()) {
35
using namespace hss1394;
39
// Enumerate the HSS1394 MIDI devices
40
QList<MidiDevice*> Hss1394Enumerator::queryDevices() {
41
qDebug() << "Scanning HSS1394 devices:";
42
using namespace hss1394;
44
hss1394::uint uNodes = Node::Instance()->GetNodeCount();
45
qDebug() << " Nodes detected:" << uNodes;
47
for(hss1394::uint i=0; i<40; i++) {
50
if (Node::Instance()->GetNodeInfo(tNodeInfo, i, NULL, &bInstalled)) {
51
QString message = QString("Node %1 (%2): Name = <%3>, GUID = %4 %5, FW[%6]")
52
.arg(QString::number(i),
53
(bInstalled)?"installed":"not installed",
54
tNodeInfo.sName.c_str(),
55
QString("%1").arg(tNodeInfo.uGUID.mu32High, 0, 16),
56
QString("%1").arg(tNodeInfo.uGUID.mu32Low, 0, 16),
57
QString("%1").arg(tNodeInfo.uProtocolVersion, 0, 16));
58
qDebug() << " " << message;
59
MidiDeviceHss1394 *currentDevice = new MidiDeviceHss1394(/*new MidiControlProcessor(NULL)*/ NULL,
62
m_devices.push_back((MidiDevice*)currentDevice);