@Test public void testSetEnabledChannels() { this.config.setEnabledChannels( 0x00 ); assertEquals( 0, this.config.getEnabledChannelsMask() ); this.config.setEnabledChannels( 0xFFFFFFFF ); assertEquals( 0xFFFFFFFF, this.config.getEnabledChannelsMask() ); this.config.setEnabledChannels( -1 ); assertEquals( 0xFFFFFFFF, this.config.getEnabledChannelsMask() ); }
public void setEnabledChannels( final int aMask ) { this.enabledChannels = ( aMask & 0xFFFFFFFF ); int newRLEDataBytes = 0; int mask = this.enabledChannels; for ( int i = 0; i < this.enabledGroups.length; i++ ) { final boolean groupEnabled = ( mask & 0xff ) != 0x00; this.enabledGroups[i] = groupEnabled; if ( groupEnabled ) { newRLEDataBytes++; } mask >>= 8; } if ( isDoubleDataRateEnabled() ) { newRLEDataBytes = Math.min( MAX_CHANNEL_GROUPS_DDR, newRLEDataBytes ); } this.rleDataWidth = 8 * newRLEDataBytes; }
LogicSnifferConfig { public void setEnabledChannels( final int aMask ) { this.enabledChannels = ( aMask & 0xFFFFFFFF ); int newRLEDataBytes = 0; int mask = this.enabledChannels; for ( int i = 0; i < this.enabledGroups.length; i++ ) { final boolean groupEnabled = ( mask & 0xff ) != 0x00; this.enabledGroups[i] = groupEnabled; if ( groupEnabled ) { newRLEDataBytes++; } mask >>= 8; } if ( isDoubleDataRateEnabled() ) { newRLEDataBytes = Math.min( MAX_CHANNEL_GROUPS_DDR, newRLEDataBytes ); } this.rleDataWidth = 8 * newRLEDataBytes; } }
LogicSnifferConfig { public void setEnabledChannels( final int aMask ) { this.enabledChannels = ( aMask & 0xFFFFFFFF ); int newRLEDataBytes = 0; int mask = this.enabledChannels; for ( int i = 0; i < this.enabledGroups.length; i++ ) { final boolean groupEnabled = ( mask & 0xff ) != 0x00; this.enabledGroups[i] = groupEnabled; if ( groupEnabled ) { newRLEDataBytes++; } mask >>= 8; } if ( isDoubleDataRateEnabled() ) { newRLEDataBytes = Math.min( MAX_CHANNEL_GROUPS_DDR, newRLEDataBytes ); } this.rleDataWidth = 8 * newRLEDataBytes; } LogicSnifferConfig(); }
LogicSnifferConfig { public void setEnabledChannels( final int aMask ) { this.enabledChannels = ( aMask & 0xFFFFFFFF ); int newRLEDataBytes = 0; int mask = this.enabledChannels; for ( int i = 0; i < this.enabledGroups.length; i++ ) { final boolean groupEnabled = ( mask & 0xff ) != 0x00; this.enabledGroups[i] = groupEnabled; if ( groupEnabled ) { newRLEDataBytes++; } mask >>= 8; } if ( isDoubleDataRateEnabled() ) { newRLEDataBytes = Math.min( MAX_CHANNEL_GROUPS_DDR, newRLEDataBytes ); } this.rleDataWidth = 8 * newRLEDataBytes; } LogicSnifferConfig(); int getChannelCount(); CaptureClockSource getClockSource(); int getClockspeed(); String getConnectionURI(); DeviceProfile getDeviceProfile(); int getDivider(); int getDividerClockspeed(); int getEnabledChannelsCount(); int getEnabledChannelsMask(); int getEnabledGroupCount(); int getGroupCount(); int getMaxTriggerStages(); int getOpenPortDelay(); double getRatio(); int getReadCounter(); int getRLEDataWidth(); int getSampleCount(); int getSampleRate(); int getStopCounter(); int getTriggerConfig( final int aStage ); int getTriggerMask( final int aStage ); int getTriggerValue( final int aStage ); boolean isAltNumberSchemeEnabled(); boolean isDoubleDataRateEnabled(); boolean isExternalClock(); boolean isFilterAvailable(); boolean isFilterEnabled(); boolean isGroupEnabled( final int aGroupNr ); boolean isInternalClock(); boolean isOpenPortDtr(); boolean isRleEnabled(); boolean isSamplesInReverseOrder(); boolean isTestModeEnabled(); boolean isTriggerEnabled(); void setAltNumberSchemeEnabled( final boolean aEnable ); void setClockSource( final CaptureClockSource aSource ); void setConnectionURI( final String aConnectionURI ); void setEnabledChannels( final int aMask ); void setFilterEnabled( final boolean aEnable ); void setParallelTrigger( final int aStage, final int aMask, final int aValue, final int aLevel,
      final int aDelay, final boolean aStartCapture ); void setRatio( final double aRatio ); void setRleEnabled( final boolean enable ); void setSampleCount( final int aCount ); void setSampleRate( final int aSampleRate ); void setSerialTrigger( final int aStage, final int aChannel, final int aMask, final int aValue,
      final int aLevel, final int aDelay, final boolean aStartCapture ); void setTestModeEnabled( final boolean enable ); void setTriggerEnabled( final boolean enable ); }
LogicSnifferConfig { public void setEnabledChannels( final int aMask ) { this.enabledChannels = ( aMask & 0xFFFFFFFF ); int newRLEDataBytes = 0; int mask = this.enabledChannels; for ( int i = 0; i < this.enabledGroups.length; i++ ) { final boolean groupEnabled = ( mask & 0xff ) != 0x00; this.enabledGroups[i] = groupEnabled; if ( groupEnabled ) { newRLEDataBytes++; } mask >>= 8; } if ( isDoubleDataRateEnabled() ) { newRLEDataBytes = Math.min( MAX_CHANNEL_GROUPS_DDR, newRLEDataBytes ); } this.rleDataWidth = 8 * newRLEDataBytes; } LogicSnifferConfig(); int getChannelCount(); CaptureClockSource getClockSource(); int getClockspeed(); String getConnectionURI(); DeviceProfile getDeviceProfile(); int getDivider(); int getDividerClockspeed(); int getEnabledChannelsCount(); int getEnabledChannelsMask(); int getEnabledGroupCount(); int getGroupCount(); int getMaxTriggerStages(); int getOpenPortDelay(); double getRatio(); int getReadCounter(); int getRLEDataWidth(); int getSampleCount(); int getSampleRate(); int getStopCounter(); int getTriggerConfig( final int aStage ); int getTriggerMask( final int aStage ); int getTriggerValue( final int aStage ); boolean isAltNumberSchemeEnabled(); boolean isDoubleDataRateEnabled(); boolean isExternalClock(); boolean isFilterAvailable(); boolean isFilterEnabled(); boolean isGroupEnabled( final int aGroupNr ); boolean isInternalClock(); boolean isOpenPortDtr(); boolean isRleEnabled(); boolean isSamplesInReverseOrder(); boolean isTestModeEnabled(); boolean isTriggerEnabled(); void setAltNumberSchemeEnabled( final boolean aEnable ); void setClockSource( final CaptureClockSource aSource ); void setConnectionURI( final String aConnectionURI ); void setEnabledChannels( final int aMask ); void setFilterEnabled( final boolean aEnable ); void setParallelTrigger( final int aStage, final int aMask, final int aValue, final int aLevel,
      final int aDelay, final boolean aStartCapture ); void setRatio( final double aRatio ); void setRleEnabled( final boolean enable ); void setSampleCount( final int aCount ); void setSampleRate( final int aSampleRate ); void setSerialTrigger( final int aStage, final int aChannel, final int aMask, final int aValue,
      final int aLevel, final int aDelay, final boolean aStartCapture ); void setTestModeEnabled( final boolean enable ); void setTriggerEnabled( final boolean enable ); final static int TRIGGER_STAGES; final static int TRIGGER_CAPTURE; }