lib/driver.js
function(me, deviceType, connectionType) {
        if (!self.hasOpenAll) {
            throw new DriverInterfaceError(
                'openAll is not loaded. Use ListAll and Open functions instead.'
            );
        }

        if (deviceType === undefined || connectionType === undefined) {
            throw 'Insufficient parameters for OpenAll - DeviceType and ConnectionType required';
        }

        me.numOpened = new ref.alloc('int', 0);
        me.aHandles = new Buffer(ARCH_INT_NUM_BYTES * LJM_LIST_ALL_SIZE);
        me.aHandles.fill(0);
        me.numErrors = new ref.alloc('int', 0);
        me.errorHandle = new ref.alloc('int', 0);
        me.errors = new Buffer(ARCH_POINTER_SIZE);
        me.errors.fill(0);

        me.devType = driver_const.deviceTypes[deviceType];
        me.deviceType = deviceType;
        me.connType = driver_const.connectionTypes[connectionType];
        me.connectionType = connectionType;
    }
function(me, deviceType, connectionType) {
        if (!self.hasOpenAll) {
            throw new DriverInterfaceError(
                'openAll is not loaded. Use ListAll and Open functions instead.'
            );
        }

        if (deviceType === undefined || connectionType === undefined) {
            throw 'Insufficient parameters for OpenAll - DeviceType and ConnectionType required';
        }

        me.numOpened = new ref.alloc('int', 0);
        me.aHandles = new Buffer(ARCH_INT_NUM_BYTES * LJM_LIST_ALL_SIZE);
        me.aHandles.fill(0);
        me.numErrors = new ref.alloc('int', 0);
        me.errorHandle = new ref.alloc('int', 0);
        me.errors = new Buffer(ARCH_POINTER_SIZE);
        me.errors.fill(0);

        me.devType = driver_const.deviceTypes[deviceType];
        me.deviceType = deviceType;
        me.connType = driver_const.connectionTypes[connectionType];
        me.connectionType = connectionType;
    }
function ( me , deviceType , connectionType ) { if ( ! self . hasOpenAll ) { throw new DriverInterfaceError ( 'openAll is not loaded. Use ListAll and Open functions instead.' ) ; } if ( deviceType === undefined || connectionType === undefined ) { throw 'Insufficient parameters for OpenAll - DeviceType and ConnectionType required' ; } me . numOpened = new ref . alloc ( 'int' , 0 ) ; me . aHandles = new Buffer ( ARCH_INT_NUM_BYTES * LJM_LIST_ALL_SIZE ) ; me . aHandles . fill ( 0 ) ; me . numErrors = new ref . alloc ( 'int' , 0 ) ; me . errorHandle = new ref . alloc ( 'int' , 0 ) ; me . errors = new Buffer ( ARCH_POINTER_SIZE ) ; me . errors . fill ( 0 ) ; me . devType = driver_const . deviceTypes [ deviceType ] ; me . deviceType = deviceType ; me . connType = driver_const . connectionTypes [ connectionType ] ; me . connectionType = connectionType ; }
Internal helper function to prepare the arguments for an OpenAll call.
Internal helper function to prepare the arguments for an OpenAll call .