Package com.pcmsolutions.comms

Examples of com.pcmsolutions.comms.SysexTransactionRecord


        return false;
    }

    public ZExternalDevice tryIdentify(Object o) throws IllegalArgumentException {
        if (o instanceof SysexTransactionRecord) {
            SysexTransactionRecord str = (SysexTransactionRecord) o;
            FinalMidiMessage msg = str.getReply();
            com.pcmsolutions.device.EMU.E4.EMU_E4_IRM e = (com.pcmsolutions.device.EMU.E4.EMU_E4_IRM) filter.filter(msg);
            if (e != null) {
                Preferences devicePrefs = Preferences.userNodeForPackage(E4Device.class).node("device").node(e.toString());
                Preferences remotePrefs = Preferences.userNodeForPackage(Remotable.class).node("remote").node(e.toString());
                RemotePreferences rprefs = new RemotePreferences(remotePrefs, new Double(e.getVersion()).doubleValue() >= DeviceContext.BASE_ULTRA_VERSION);
                DevicePreferences dprefs = new DevicePreferences(devicePrefs);

                com.pcmsolutions.device.EMU.E4.RawMidiDevice rmd = new com.pcmsolutions.device.EMU.E4.RawMidiDevice(e, str.getInDeviceInfo(), str.getOutDeviceInfo(), rprefs);

                File lastBank = SessionExternalization.getLastSessionFileForDevice(rmd);
                if (!Zoeos.getInstance().getDeviceManager().isDuplicate(e) && lastBank.exists()) {
                    boolean reload = false;
                    if (dprefs.ZPREF_sessionRestoreMode.getValue().equals(dprefs.SESSION_RESTORE_MODE_ASK)) {
View Full Code Here


                    if (num == 0)
                        new FlashMsg(ZoeosFrame.getInstance(), 2500, 500, FlashMsg.colorWarning, "NO DEVICES FOUND DURING HUNT");
                    else {
                        List unlicensed = new ArrayList();
                        for (Iterator i = replies.iterator(); i.hasNext();) {
                            final SysexTransactionRecord str = (SysexTransactionRecord) i.next();
                            ZExternalDevice d = m.tryIdentify(str);
                            if (d != null) {
                                ZExternalDevice dup = getDuplicate(d.getDeviceIdentityMessage());
                                if (dup == null) {
                                    if (!isDemo() && d instanceof LicensedEntity && !checkLicensed((LicensedEntity) d)) {
                                        unlicensed.add(d);
                                        continue;
                                    } else if (isDemo() && /*SecurityPreferences.expired()*/false) {
                                        unlicensed.add(d);
                                        continue;
                                    }

                                    devices.put(d, d.getDeviceIdentityMessage());
                                    //serializeDeviceMarshalling.setSelected(sun.getBoolean(Zoeos.PREF_serializeDeviceMarshalling, true));

                                    if (!ZoeosPreferences.ZPREF_stopHuntAtPending.getValue())
                                    //if (startBarrier == false)
                                        startDevice(d);
                                    else {
                                        Impl_ZDeviceManager.this.firePendingListChanged();
                                        Impl_ZDeviceManager.this.fireStoppedListChanged();
                                        Impl_ZDeviceManager.this.fireStartedListChanged();
                                        ZoeosFrame.getInstance().showDeviceManager();
                                    }
                                } else {
                                    duped++;
                                    duplicateDevices.put(d, dup);
                                    Impl_ZDeviceManager.this.fireDuplicateListChanged();
                                    System.out.println(Zoeos.getZoeosTime() + ": " + "DUPLICATE MIDI DEVICE: " + str.getReply());
                                }
                            } else {
                                unidentifiedMessages.add(str.getReply());
                                Impl_ZDeviceManager.this.fireUnidentifiedListChanged();
                                System.out.println(Zoeos.getZoeosTime() + ": " + "UNRESOLVED MIDI DEVICE: " + str.getReply());
                            }
                        }
                        if (unlicensed.size() > 0) {
                            UserMessaging.showError(unlicensed.size() + (unlicensed.size() == 1 ? " device was" : " devices were") + " not marshalled due to insufficient licensing");
                            ZUtilities.zDisposeCollection(unlicensed);
View Full Code Here

TOP

Related Classes of com.pcmsolutions.comms.SysexTransactionRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.