Package org.jscsi.target.scsi.cdb

Examples of org.jscsi.target.scsi.cdb.ModeSense6Cdb


    @Override
    public void execute (final ProtocolDataUnit pdu) throws IOException , InterruptedException , InternetSCSIException , DigestException , SettingsException {

        final BasicHeaderSegment bhs = pdu.getBasicHeaderSegment();
        final SCSICommandParser parser = (SCSICommandParser) bhs.getParser();
        final ModeSense6Cdb cdb = new ModeSense6Cdb(parser.getCDB());

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug(Boolean.toString(cdb.getDisableBlockDescriptors()));
            LOGGER.debug(cdb.getPageControl().toString());
            LOGGER.debug(Integer.toString(cdb.getPageCode()));
            LOGGER.debug(Integer.toString(cdb.getSubpageCode()));
            LOGGER.debug("cdb.getAllocationLength() = " + cdb.getAllocationLength());
            // LOGGER.debug(cdb.getModePage());
        }

        // final PageControl pageControl = cdb.getPageControl();//see 8 lines
        // below
        final ModePageCode modePageCode = cdb.getModePage();

        // ModeParameterList and ModeParameterListBuilder common to
        // all supported ModePage requests

        ModePage[] modePages = null;
View Full Code Here


    }

    public boolean canHandle (final ProtocolDataUnit pdu) {
        final BasicHeaderSegment bhs = pdu.getBasicHeaderSegment();
        final SCSICommandParser parser = (SCSICommandParser) bhs.getParser();
        final ModeSense6Cdb cdb = new ModeSense6Cdb(parser.getCDB());
        final ModePageCode modePageCode = cdb.getModePage();
        if (modePageCode == ModePageCode.INFORMATIONAL_EXCEPTIONS_CONTROL_MODE_PAGE) {
            return true;
        } else if (modePageCode == ModePageCode.CACHING_MODE_PAGE) {
            return true;
        } else if (modePageCode == ModePageCode.RETURN_ALL_MODE_PAGES_ONLY) {
View Full Code Here

TOP

Related Classes of org.jscsi.target.scsi.cdb.ModeSense6Cdb

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.