Package de.dermoba.srcp.devices

Examples of de.dermoba.srcp.devices.LOCK


        if (addressToControlObject.get(deviceGroup).get(address) != null) {
            // got it already
            return;
        }
        addressToControlObject.get(deviceGroup).put(address, object);
        SRCPLock lock = new SRCPLock(new LOCK(session, address.getBus1()),
                false, -1);
        locks.put(object, lock);
    }
View Full Code Here


        if (addressToControlObject.get(deviceGroup).get(address) == null)
            throw new SRCPLockingException("Object to lock not found");

        Object obj = addressToControlObject.get(deviceGroup).get(address);
        SRCPLock sLock = locks.get(obj);
        LOCK lock = sLock.getLock();
        try {
            // sLock.setLocked(true);
            // sLock.setSessionID(session.getCommandChannelID());
            lock.set(deviceGroup, address.getAddress1(), lockDuration);
        } catch (SRCPException e) {
            throw new SRCPLockingException(ERR_FAILED, e);
        }
        return true;
    }
View Full Code Here

            throw new SRCPLockingException("Object to unlock not found");

        Object obj = addressToControlObject.get(deviceGroup).get(address);

        SRCPLock sLock = locks.get(obj);
        LOCK lock = sLock.getLock();
        try {
            lock.term(deviceGroup, address.getAddress1());
            // sLock.setLocked(false);
            // sLock.setSessionID(-1);
        } catch (SRCPException e) {
            throw new SRCPLockingException(ERR_FAILED, e);
        }
View Full Code Here

TOP

Related Classes of de.dermoba.srcp.devices.LOCK

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.