亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? alarm.java

?? 關于 RFID 讀寫器的相關內容
?? JAVA
字號:
/*
 * Copyright (C) 2007 ETH Zurich
 *
 * This file is part of Fosstrak (www.fosstrak.org).
 *
 * Fosstrak is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1, as published by the Free Software Foundation.
 *
 * Fosstrak is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with Fosstrak; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA
 */

package org.fosstrak.reader.rprm.core.mgmt.alarm;

import java.util.Date;

import org.fosstrak.reader.rprm.core.AntennaReadPoint;
import org.fosstrak.reader.rprm.core.NotificationChannel;
import org.fosstrak.reader.rprm.core.ReadPoint;
import org.fosstrak.reader.rprm.core.ReaderDevice;
import org.fosstrak.reader.rprm.core.ReaderProtocolException;
import org.fosstrak.reader.rprm.core.Source;
import org.fosstrak.reader.rprm.core.mgmt.IOPort;
import org.apache.log4j.Logger;

/**
 * <code>Alarm</code> is the base of all the classes within the object model
 * that define the contents of alarm messages.
 */
public class Alarm {
	
	/**
	 * The logger.
	 */
	private static Logger log = Logger.getLogger(Alarm.class);
	
	/**
	 * The <code>epc</code> attribute of the reader that generated the alarm.
	 */
	protected String readerDeviceEPC;
	
	/**
	 * The name of the reader that generated the alarm.
	 */
	protected String readerDeviceName;
	
	/**
	 * The <code>handle</code> attribute of the reader that generated the
	 * alarm.
	 */
	protected int readerDeviceHandle;
	
	/**
	 * The <code>role</code> attribute of the reader that generated the alarm.
	 */
	protected String readerDeviceRole;
	
	/**
	 * The return value of the <code>ReaderDevice</code>'s
	 * <code>getTimeTicks()</code> method at the time the <code>Alarm</code>
	 * was generated.
	 */
	protected long timeTicks;
	
	/**
	 * The return value of the <code>ReaderDevice</code>'s
	 * <code>getTimeUTC()</code> method at the time the <code>Alarm</code>
	 * was generated.
	 */
	protected Date timeUTC;
	
	/**
	 * The name of the <code>Alarm</code> object identifying the type of
	 * alarm, e.g., "FreeMemoryAlarm", "TagListFullAlarm",
	 * "ReadPointOperStatusAlarm".
	 */
	protected String name;
	
	/**
	 * Indicates the severity level assigned to this alarm.
	 */
	protected AlarmLevel alarmLevel;
	
	/**
	 * Indicates the number of times the generation of this alarm has been
	 * suppressed. It is reset to <code>0</code> after the alarm is generated.
	 */
	protected int suppressCount;
	
	/**
	 * The reader device.
	 */
	private ReaderDevice readerDevice;
	
	/**
	 * Protected constructor.
	 * 
	 * @param name
	 *            The name of the alarm identifying the type of alarm, e.g.,
	 *            "FreeMemoryAlarm", "TagListFullAlarm",
	 *            "ReadPointOperStatusAlarm"
	 * @param alarmLevel
	 *            The severity level of the alarm
	 * @param readerDevice
	 *            The reader device
	 */
	protected Alarm(String name, AlarmLevel alarmLevel, ReaderDevice readerDevice) {
		this.name = name;
		this.alarmLevel = alarmLevel;
		this.readerDeviceEPC = readerDevice.getEPC();
		this.readerDeviceName = readerDevice.getName();
		this.readerDeviceHandle = readerDevice.getHandle();
		this.readerDeviceRole = readerDevice.getRole();
		this.timeTicks = readerDevice.getTimeTicks();
		this.timeUTC = readerDevice.getTimeUTC();
		this.suppressCount = 0;
		this.readerDevice = readerDevice;
	}
	
	/**
	 * Returns the <code>epc</code> attribute of the reader that generated the
	 * alarm.
	 * 
	 * @return The <code>epc</code> attribute of the reader that generated the
	 *         alarm
	 */
	public String getReaderDeviceEPC() {
		return readerDeviceEPC;
	}
	
	/**
	 * Returns the name of the reader that generated the alarm.
	 * 
	 * @return The name of the reader that generated the alarm
	 */
	public String getReaderDeviceName() {
		return readerDeviceName;
	}
	
	/**
	 * Returns the <code>handle</code> attribute of the reader that generated
	 * the alarm.
	 * 
	 * @return The <code>handle</code> attribute of the reader that generated
	 *         the alarm
	 */
	public int getReaderDeviceHandle() {
		return readerDeviceHandle;
	}
	
	/**
	 * Returns the <code>role</code> attribute of the reader that generated
	 * the alarm.
	 * 
	 * @return The <code>role</code> attribute of the reader that generated
	 *         the alarm
	 */
	public String getReaderDeviceRole() {
		return readerDeviceRole;
	}
	
	/**
	 * Returns the return value of the <code>ReaderDevice</code>'s
	 * <code>getTimeTicks()</code> method at the time the <code>Alarm</code>
	 * was generated.
	 * 
	 * @return The return value of the <code>ReaderDevice</code>'s
	 *         <code>getTimeTicks()</code> method at the time the
	 *         <code>Alarm</code> was generated
	 */
	public long getTimeTicks() {
		return timeTicks;
	}
	
	/**
	 * Returns the return value of the <code>ReaderDevice</code>'s
	 * <code>getTimeUTC()</code> method at the time the <code>Alarm</code>
	 * was generated.
	 * 
	 * @return The return value of the <code>ReaderDevice</code>'s
	 *         <code>getTimeUTC()</code> method at the time the
	 *         <code>Alarm</code> was generated
	 */
	public Date getTimeUTC() {
		return timeUTC;
	}
	
	/**
	 * Returns the name of the <code>Alarm</code> object identifying the type
	 * of alarm, e.g., "FreeMemoryAlarm", "TagListFullAlarm",
	 * "ReadPointOperStatusAlarm".
	 * 
	 * @return The name of the <code>Alarm</code> object
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Returns the severity level assigned to this alarm.
	 * 
	 * @return The severity level assigned to this alarm
	 */
	public AlarmLevel getAlarmLevel() {
		return alarmLevel;
	}
	
	/**
	 * Returns the number of times the generation of this alarm has been
	 * suppressed.
	 * 
	 * @return The number of times the generation of this alarm has been
	 *         suppressed
	 */
	public int getSuppressCount() {
		return suppressCount;
	}
	
	/**
	 * Increases the number of times the generation of this alarm has been
	 * suppressed by <code>1</code>.
	 */
	public void suppress() {
		suppressCount++;
		
		if (this instanceof ReaderDeviceOperStatusAlarm) {
			ReaderDevice.increaseOperStateSuppressions();
		} else if (this instanceof FreeMemoryAlarm) {
			ReaderDevice.increaseMemStateSuppressions();
		} else if (this instanceof ReadPointOperStatusAlarm) {
			try {
				ReadPoint readPoint = readerDevice.getReadPoint(((ReadPointOperStatusAlarm) this).getReadPointName());
				readPoint.increaseOperStateSuppressions();
			} catch (ReaderProtocolException rpe) {
				log.error("ReadPoint not found");
			}
		} else if (this instanceof FailedMemReadAlarm) {
			try {
				ReadPoint readPoint = readerDevice.getReadPoint(((FailedMemReadAlarm) this).getReadPointName());
				if (readPoint instanceof AntennaReadPoint) {
					((AntennaReadPoint) readPoint).increaseReadFailureSuppressions();
				}
			} catch (ReaderProtocolException rpe) {
				log.error("ReadPoint not found");
			}
		} else if (this instanceof FailedWriteAlarm) {
			try {
				ReadPoint readPoint = readerDevice.getReadPoint(((FailedWriteAlarm) this).getReadPointName());
				if (readPoint instanceof AntennaReadPoint) {
					((AntennaReadPoint) readPoint).increaseWriteFailureSuppressions();
				}
			} catch (ReaderProtocolException rpe) {
				log.error("ReadPoint not found");
			}
		} else if (this instanceof FailedKillAlarm) {
			try {
				ReadPoint readPoint = readerDevice.getReadPoint(((FailedKillAlarm) this).getReadPointName());
				if (readPoint instanceof AntennaReadPoint) {
					((AntennaReadPoint) readPoint).increaseKillFailureSuppressions();
				}
			} catch (ReaderProtocolException rpe) {
				log.error("ReadPoint not found");
			}
		} else if (this instanceof FailedEraseAlarm) {
			try {
				ReadPoint readPoint = readerDevice.getReadPoint(((FailedEraseAlarm) this).getReadPointName());
				if (readPoint instanceof AntennaReadPoint) {
					((AntennaReadPoint) readPoint).increaseEraseFailureSuppressions();
				}
			} catch (ReaderProtocolException rpe) {
				log.error("ReadPoint not found");
			}
		} else if (this instanceof FailedLockAlarm) {
			try {
				ReadPoint readPoint = readerDevice.getReadPoint(((FailedLockAlarm) this).getReadPointName());
				if (readPoint instanceof AntennaReadPoint) {
					((AntennaReadPoint) readPoint).increaseLockFailureSuppressions();
				}
			} catch (ReaderProtocolException rpe) {
				log.error("ReadPoint not found");
			}
		} else if (this instanceof IOPortOperStatusAlarm) {
			try {
				IOPort ioPort = readerDevice.getIOPort(((IOPortOperStatusAlarm) this).getIOPortName());
				ioPort.increaseOperStateSuppressions();
			} catch (ReaderProtocolException rpe) {
				log.error("IOPort not found");
			}
		} else if (this instanceof SourceOperStatusAlarm) {
			try {
				Source source = readerDevice.getSource(((SourceOperStatusAlarm) this).getSourceName());
				source.increaseOperStateSuppressions();
			} catch (ReaderProtocolException rpe) {
				log.error("Source not found");
			}
		} else if (this instanceof NotificationChannelOperStatusAlarm) {
			try {
				NotificationChannel notifChan = readerDevice.getNotificationChannel(((NotificationChannelOperStatusAlarm) this).getNotificationChannelName());
				notifChan.increaseOperStateSuppressions();
			} catch (ReaderProtocolException rpe) {
				log.error("NotificationChannel not found");
			}
		}
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久99| 欧美高清一级片在线观看| 国产精品性做久久久久久| 亚洲人成人一区二区在线观看 | 欧美不卡一区二区三区四区| 99热精品国产| 捆绑变态av一区二区三区| 亚洲欧美一区二区久久| 久久亚洲精品国产精品紫薇| 欧美亚州韩日在线看免费版国语版 | 国产精品人成在线观看免费| 欧美男人的天堂一二区| 99久久精品久久久久久清纯| 久草在线在线精品观看| 天堂蜜桃91精品| 中文字幕亚洲视频| 国产欧美日韩一区二区三区在线观看| 欧美精三区欧美精三区| 色悠久久久久综合欧美99| 岛国av在线一区| 久久se这里有精品| 免费高清在线视频一区·| 亚洲国产精品人人做人人爽| 中文字幕一区二区在线观看| 久久久精品国产免费观看同学| 欧美裸体一区二区三区| 色噜噜久久综合| 91在线码无精品| 成人av电影免费在线播放| 国产精品88av| 国产福利91精品一区二区三区| 蜜臀久久99精品久久久久宅男| 亚洲国产cao| 天天爽夜夜爽夜夜爽精品视频| 亚洲精品成人天堂一二三| 中文字幕永久在线不卡| 中文字幕在线不卡一区| 亚洲欧美怡红院| 成人欧美一区二区三区小说| 亚洲欧美在线观看| 综合av第一页| 亚洲私人黄色宅男| 日韩美女视频一区| 亚洲黄色在线视频| 夜夜精品视频一区二区| 亚洲一区二区视频| 香蕉成人伊视频在线观看| 日韩成人精品在线观看| 日韩电影一区二区三区| 久久国产精品区| 国产一区二区免费视频| 国产91精品久久久久久久网曝门 | 亚洲精品日韩综合观看成人91| 一区二区三区精品| 日韩黄色免费网站| 免费久久精品视频| 国产福利一区二区三区| k8久久久一区二区三区| 色老汉一区二区三区| 欧美日韩亚洲综合一区二区三区| 欧美午夜不卡视频| 欧美一级xxx| 久久综合久久久久88| 国产精品久久毛片a| 亚洲免费色视频| 日韩国产欧美在线视频| 国产一区二区0| 91麻豆免费观看| 欧美三级日韩三级国产三级| 日韩一区二区在线观看| 国产欧美精品区一区二区三区 | 日本精品一级二级| 日韩一区二区电影网| 国产婷婷色一区二区三区| 成人免费一区二区三区视频 | 国产一区二区女| 97精品国产露脸对白| 777奇米四色成人影色区| 久久久天堂av| 一区二区高清视频在线观看| 免费看黄色91| 成人久久久精品乱码一区二区三区| 色婷婷av一区二区三区软件| 欧美刺激脚交jootjob| 国产精品卡一卡二| 男男gaygay亚洲| 97se亚洲国产综合自在线| 91精品国产色综合久久不卡电影| 国产婷婷色一区二区三区四区| 亚洲大片在线观看| 成人av在线观| 日韩欧美国产一区二区三区| 国产精品美女久久久久久久久| 午夜一区二区三区在线观看| 国产盗摄一区二区三区| 欧美日本精品一区二区三区| 久久精品一二三| 日本伊人精品一区二区三区观看方式| 国产成人h网站| 日韩免费在线观看| 亚洲综合丁香婷婷六月香| 国产精品911| 精品日韩成人av| 天堂成人国产精品一区| 色婷婷av一区二区三区之一色屋| 国产亚洲成av人在线观看导航| 亚洲福利视频一区二区| 91首页免费视频| 国产亚洲精品久| 九九**精品视频免费播放| 欧美日韩国产123区| 亚洲午夜羞羞片| 风间由美性色一区二区三区| 欧美剧情电影在线观看完整版免费励志电影 | 在线国产电影不卡| 国产精品麻豆欧美日韩ww| 激情欧美一区二区三区在线观看| 欧美另类z0zxhd电影| 亚洲精品大片www| 99久久婷婷国产综合精品电影| www欧美成人18+| 蜜臀久久久久久久| 91精品婷婷国产综合久久性色| 亚洲第一成人在线| 欧美日韩三级在线| 亚洲综合成人网| 91免费在线播放| 中文字幕一区二区在线播放| 国产99久久久精品| 亚洲国产成人自拍| 国产**成人网毛片九色| 久久久www成人免费无遮挡大片| 男女激情视频一区| 日韩一区二区三区电影 | 久久精品国产99国产精品| 欧美日本精品一区二区三区| 亚洲成年人影院| 欧美日韩国产大片| 视频一区欧美精品| 精品视频123区在线观看| 亚洲一区二区三区小说| 精品视频在线免费看| 午夜国产精品一区| 7777精品伊人久久久大香线蕉经典版下载 | 色婷婷综合五月| 亚洲国产日韩精品| 欧美一区二区久久久| 久久国产精品99久久久久久老狼| 精品久久久久久综合日本欧美| 精品亚洲欧美一区| 国产人久久人人人人爽| 成人av午夜电影| 亚洲最大成人综合| 欧美精品少妇一区二区三区| 久色婷婷小香蕉久久| 久久久久久97三级| 99国产精品一区| 亚欧色一区w666天堂| 精品理论电影在线观看| 国产激情一区二区三区四区 | 99久久精品免费| 性久久久久久久久| 久久久五月婷婷| 色网综合在线观看| 久久99蜜桃精品| 国产精品久久久久久久久晋中 | 99视频超级精品| 亚洲不卡一区二区三区| 欧美刺激脚交jootjob| 99在线精品观看| 日韩成人午夜电影| 久久精品一区四区| 欧洲av在线精品| 狠狠色丁香婷婷综合| 亚洲日本丝袜连裤袜办公室| 欧美美女网站色| 国产成人av电影在线| 夜夜精品浪潮av一区二区三区| 日韩欧美视频在线| 一本色道a无线码一区v| 精品一区二区三区影院在线午夜| 亚洲国产精品99久久久久久久久| 91黄色免费看| 国产福利一区二区三区视频在线 | 欧美日韩一区二区在线视频| 久久99精品久久久久久动态图 | 视频一区中文字幕| 中文字幕中文字幕一区二区| 884aa四虎影成人精品一区| 国产99久久久国产精品潘金 | 丝袜美腿亚洲一区二区图片| 国产欧美在线观看一区| 91麻豆精品国产91久久久使用方法| 国产成人精品一区二| 性做久久久久久久免费看| 综合激情成人伊人| 国产区在线观看成人精品| 91精品一区二区三区久久久久久| 9久草视频在线视频精品| 韩国精品主播一区二区在线观看 |