/** * Returns all channel labels. * * @return an array of all channel's label, never <code>null</code>. */ public Channel[] getAllChannels() { return getCurrentDataSet().getChannels(); }
/** * @return the cursorPositions */ private Cursor[] getCursors() { return getCurrentDataSet().getCursors(); } }
/** * Returns the current acquisition results. * * @return the captured data, never <code>null</code>. */ private AcquisitionResult getAcquisitionData() { return getCurrentDataSet().getCapturedData(); }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ( prime * result ) + this.value; return result; } }
/** * {@inheritDoc} */ public boolean isCursorDefined( final int aCursorIdx ) { Cursor[] cursors = this.dataSet.getCursors(); if ( ( aCursorIdx < 0 ) || ( aCursorIdx > cursors.length ) ) { throw new IllegalArgumentException( "Invalid cursor index!" ); } return cursors[aCursorIdx].isDefined(); }
/** * @return */ public AcquisitionResult getCapturedData() { if ( this.dataSet == null ) { return null; } return this.dataSet.getCapturedData(); }
/** * {@inheritDoc} */ @Override public void clearAnnotations() { for ( Channel channel : getCurrentDataSet().getChannels() ) { channel.clearAnnotations(); } repaintMainFrame(); }
/** * {@inheritDoc} */ @Override public int compareTo( final Channel aChannel ) { return this.index - aChannel.getIndex(); }
@Override public int compare( final Cursor aCursor1, final Cursor aCursor2 ) { return ( int )( aCursor1.getTimestamp() - aCursor2.getTimestamp() ); } }
/** * Calculates the time value corresponding to the given sample index. * * @param aSampleIndex * the sample index to get the time value for, >= 0. * @return the time value, in seconds. */ public double calculateTime( final int aSampleIndex ) { double timestamp = calculateTimeOffset( getTimestamps()[aSampleIndex] ); return ( timestamp / getSampleRate() ); }
/** * @see nl.lxtreme.ols.api.data.BaseDataSet#sort() */ @Override public void sort() { super.sort(); } }
/** * @see java.lang.Comparable#compareTo(java.lang.Object) */ public int compareTo( final TYPE aComparable ) { return ( this.idx - ( ( nl.lxtreme.ols.api.data.BaseData<?> )aComparable ).getIndex() ); }
/** * Returns whether any captured data is available. * * @return <code>true</code> if there is captured data, <code>false</code> * otherwise. */ public boolean hasCapturedData() { return getAcquisitionData() != null; }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + this.dataValue; return result; }
/** * {@inheritDoc} */ @Override public AcquisitionResult getData() { return this.dataSet.getCapturedData(); }
/** * {@inheritDoc} */ @Override public int compareTo( final Channel aChannel ) { return ( this.index - aChannel.getIndex() ); }
/** * @see nl.lxtreme.ols.api.data.BaseDataSet#sort() */ @Override public void sort() { super.sort(); } }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + this.data; result = prime * result + this.type; return result; }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ( prime * result ) + this.value; return result; } }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + this.value; return result; } }