⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 antennareadpoint.java

📁 关于 RFID 读写器的相关内容
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
		return failedWriteAlarmControl;
	}

	/**
	 * Returns the number of tags successfully killed at the
	 * <code>AntennaReadPoint</code>.
	 * 
	 * @return The count of the successful tag kills at this
	 *         <code>AntennaReadPoint</code>
	 */
	public int getKillCount() {
		return killCount;
	}

	/**
	 * Returns the number of the failed tag kills at the <count>AntennaReadPoint</count>.
	 * This count only includes failures where it attempts to kill a tag but the
	 * kill does not complete successfully.
	 * 
	 * @return The count of the failed tag kills at this
	 *         <code>AntennaReadPoint</code>
	 */
	public int getFailedKillCount() {
		return failedKillCount;
	}

	/**
	 * Returns the alarm control object which controls the generation of alarms
	 * triggered by failed kill operations across the
	 * <code>AntennaReadPoint</code>.
	 * 
	 * @return An alarm control for monitoring tag kill failures
	 */
	public AlarmControl getFailedKillAlarmControl() {
		return failedKillAlarmControl;
	}

	/**
	 * Returns the number of tags successfully erased at the
	 * <code>AntennaReadPoint</code>.
	 * 
	 * @return The count of the successful tag erasures at this
	 *         <code>AntennaReadPoint</code>
	 */
	public int getEraseCount() {
		return eraseCount;
	}

	/**
	 * Returns the number of the failed tag erasures at the
	 * <code>AntennaReadPoint</code>. This count only includes failures where
	 * it attempts to erase a tag but the erasure does not complete
	 * successfully.
	 * 
	 * @return The count of the failed tag erasures at this
	 *         <code>AntennaReadPoint</code>
	 */
	public int getFailedEraseCount() {
		return failedEraseCount;
	}

	/**
	 * Returns the alarm control object which controls the generation of alarms
	 * triggered by failed erase operations across the
	 * <code>AntennaReadPoint</code>.
	 * 
	 * @return An alarm control for monitoring tag erasure failures
	 */
	public AlarmControl getFailedEraseAlarmControl() {
		return failedEraseAlarmControl;
	}

	/**
	 * Returns the number of tags successfully locked at the
	 * <code>AntennaReadPoint</code>.
	 * 
	 * @return The count of tags successfully locked at this
	 *         <code>AntennaReadPoint</code>
	 */
	public int getLockCount() {
		return lockCount;
	}

	/**
	 * Returns the number of the failed tag locks at the
	 * <code>AntennaReadPoint</code>. This count only includes failures where
	 * it attempts to lock a tag but the lock does not complete successfully.
	 * 
	 * @return The count of the failed tag locks at this
	 *         <code>AntennaReadPoint</code>
	 */
	public int getFailedLockCount() {
		return failedLockCount;
	}

	/**
	 * Returns the alarm control object which controls the generation of alarms
	 * triggered by failed lock operations across the
	 * <code>AntennaReadPoint</code>.
	 * 
	 * @return An alarm control for monitoring tag lock failures
	 */
	public AlarmControl getFailedLockAlarmControl() {
		return failedLockAlarmControl;
	}

	/**
	 * Returns the number of milliseconds the <code>AntennaReadPoint</code>
	 * has been energized in order to communicate with tags.
	 * 
	 * @return The number of milliseconds the <code>AntennaReadPoint</code>
	 *         has been energized attempting communication with tags
	 */
	public long getTimeEnergized() {
		timeEnergized = System.currentTimeMillis() - energizedTimeStamp.getTime();
		return timeEnergized;
	}

	/**
	 * Returns the current transmit power level of the
	 * <code>AntennaReadPoint</code>.
	 * 
	 * @return The current transmit power level of the
	 *         <code>AntennaReadPoint</code>
	 */
	public int getPowerLevel() {
		try {
			powerLevel = reader.getReadPointPowerLevel(name, true);
		} catch (HardwareException e) {
			// return last power level
		}
		return powerLevel;
	}

	/**
	 * Returns the current noise level observed at the
	 * <code>AntennaReadPoint</code>.
	 * 
	 * @return The current noise level observed at the
	 *         <code>AntennaReadPoint</code>
	 */
	public int getNoiseLevel() {
		try {
			noiseLevel = reader.getReadPointNoiseLevel(name, true);
		} catch (HardwareException e) {
			// return last noise level
		}
		return noiseLevel;
	}
	
	/**
	 * Resets all counters.
	 */
	public void resetCounters() {
		identificationCount = 0;
		failedIdentificationCount = 0;
		memReadCount = 0;
		failedMemReadCount = 0;
		writeCount = 0;
		failedWriteCount = 0;
		killCount = 0;
		failedKillCount = 0;
		eraseCount = 0;
		failedEraseCount = 0;
		lockCount = 0;
		failedLockCount = 0;
		energizedTimeStamp = new Date();
	}
	
	/**
	 * This method should be called whenever a memory read failure occurred.
	 */
	public void memReadFailureOccurred() {
		failedMemReadCount++;
		FailedMemReadAlarm alarm = new FailedMemReadAlarm(name
				+ "_FailedMemReadAlarm", failedMemReadAlarmControl.getLevel(),
				readerDevice, this);
		readerDevice.getAlarmManager().fireAlarm(alarm,
				failedMemReadAlarmControl);
	}
	
	/**
	 * This method should be called whenever a write failure occurred.
	 */
	public void writeFailureOccurred() {
		failedWriteCount++;
		FailedWriteAlarm alarm = new FailedWriteAlarm(name
				+ "_FailedWriteAlarm", failedWriteAlarmControl.getLevel(),
				readerDevice, this);
		readerDevice.getAlarmManager()
				.fireAlarm(alarm, failedWriteAlarmControl);
	}
	
	/**
	 * This method should be called whenever a kill failure occurred.
	 */
	public void killFailureOccurred() {
		failedKillCount++;
		FailedKillAlarm alarm = new FailedKillAlarm(name + "_FailedKillAlarm",
				failedKillAlarmControl.getLevel(), readerDevice, this);
		readerDevice.getAlarmManager().fireAlarm(alarm, failedKillAlarmControl);
	}
	
	/**
	 * This method should be called whenever a erase failure occurred.
	 */
	public void eraseFailureOccurred() {
		failedEraseCount++;
		FailedEraseAlarm alarm = new FailedEraseAlarm(name
				+ "_FailedEraseAlarm", failedEraseAlarmControl.getLevel(),
				readerDevice, this);
		readerDevice.getAlarmManager()
				.fireAlarm(alarm, failedEraseAlarmControl);
	}
	
	/**
	 * This method should be called whenever a lock failure occurred.
	 */
	public void lockFailureOccurred() {
		failedLockCount++;
		FailedLockAlarm alarm = new FailedLockAlarm(name + "_FailedLockAlarm",
				failedLockAlarmControl.getLevel(), readerDevice, this);
		readerDevice.getAlarmManager().fireAlarm(alarm, failedLockAlarmControl);
	}
	
	/**
	 * Increases the <code>identificationCount</code> attribute by
	 * <code>1</code>.
	 */
	public void increaseIdentificationCount() {
		identificationCount++;
	}
	
	/**
	 * Increases the <code>failedIdentificationCount</code> attribute by
	 * <code>1</code>.
	 */
	public void increaseFailedIdentificationCount() {
		failedIdentificationCount++;
	}
	
	/**
	 * Increases the <code>memReadCount</code> attribute by <code>1</code>.
	 */
	public void increaseMemReadCount() {
		memReadCount++;
	}
	
	/**
	 * Increases the <code>writeCount</code> attribute by <code>1</code>.
	 */
	public void increaseWriteCount() {
		writeCount++;
	}
	
	/**
	 * Increases the <code>killCount</code> attribute by <code>1</code>.
	 */
	public void increaseKillCount() {
		killCount++;
	}
	
	/**
	 * Increases the <code>eraseCount</code> attribute by <code>1</code>.
	 */
	public void increaseEraseCount() {
		eraseCount++;
	}
	
	/**
	 * Increases the <code>lockCount</code> attribute by <code>1</code>.
	 */
	public void increaseLockCount() {
		lockCount++;
	}
	
	/**
	 * Increases the number of <code>FailedMemReadAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object by <code>1</code>.
	 */
	public void increaseReadFailureSuppressions() {
		readFailureSuppressions++;
	}
	
	/**
	 * Returns the number of <code>FailedMemReadAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object.
	 * 
	 * @return The number of <code>FailedMemReadAlarm</code>s that have been
	 *         suppressed for this <code>AntennaReadPoint</code> object
	 */
	public int getReadFailureSuppressions() {
		return readFailureSuppressions;
	}
	
	/**
	 * Resets the number of <code>FailedMemReadAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object to <code>0</code>.
	 */
	public void resetReadFailureSuppressions() {
		readFailureSuppressions = 0;
	}
	
	/**
	 * Increases the number of <code>FailedWriteAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object by <code>1</code>.
	 */
	public void increaseWriteFailureSuppressions() {
		writeFailureSuppressions++;
	}
	
	/**
	 * Returns the number of <code>FailedWriteAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object.
	 * 
	 * @return The number of <code>FailedWriteAlarm</code>s that have been
	 *         suppressed for this <code>AntennaReadPoint</code> object
	 */
	public int getWriteFailureSuppressions() {
		return writeFailureSuppressions;
	}
	
	/**
	 * Resets the number of <code>FailedWriteAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object to <code>0</code>.
	 */
	public void resetWriteFailureSuppressions() {
		writeFailureSuppressions = 0;
	}
	
	/**
	 * Increases the number of <code>FailedKillAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object by <code>1</code>.
	 */
	public void increaseKillFailureSuppressions() {
		killFailureSuppressions++;
	}
	
	/**
	 * Returns the number of <code>FailedKillAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object.
	 * 
	 * @return The number of <code>FailedKillAlarm</code>s that have been
	 *         suppressed for this <code>AntennaReadPoint</code> object
	 */
	public int getKillFailureSuppressions() {
		return killFailureSuppressions;
	}
	
	/**
	 * Resets the number of <code>FailedKillAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object to <code>0</code>.
	 */
	public void resetKillFailureSuppressions() {
		killFailureSuppressions = 0;
	}
	
	/**
	 * Increases the number of <code>FailedEraseAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object by <code>1</code>.
	 */
	public void increaseEraseFailureSuppressions() {
		eraseFailureSuppressions++;
	}
	
	/**
	 * Returns the number of <code>FailedEraseAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object.
	 * 
	 * @return The number of <code>FailedEraseAlarm</code>s that have been
	 *         suppressed for this <code>AntennaReadPoint</code> object
	 */
	public int getEraseFailureSuppressions() {
		return eraseFailureSuppressions;
	}
	
	/**
	 * Resets the number of <code>FailedEraseAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object to <code>0</code>.
	 */
	public void resetEraseFailureSuppressions() {
		eraseFailureSuppressions = 0;
	}
	
	/**
	 * Increases the number of <code>FailedLockAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object by <code>1</code>.
	 */
	public void increaseLockFailureSuppressions() {
		lockFailureSuppressions++;
	}
	
	/**
	 * Returns the number of <code>FailedLockAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object.
	 * 
	 * @return The number of <code>FailedLockAlarm</code>s that have been
	 *         suppressed for this <code>AntennaReadPoint</code> object
	 */
	public int getLockFailureSuppressions() {
		return lockFailureSuppressions;
	}
	
	/**
	 * Resets the number of <code>FailedLockAlarm</code>s that have been
	 * suppressed for this <code>AntennaReadPoint</code> object to <code>0</code>.
	 */
	public void resetLockFailureSuppressions() {
		lockFailureSuppressions = 0;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -