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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? commn150hard.java

?? 一個(gè)多機(jī)器人的仿真平臺
?? JAVA
字號:
/* * CommN150Hard.java */package EDU.gatech.cc.is.abstractrobot;import java.util.*;import java.awt.Color;import EDU.gatech.cc.is.communication.*;import EDU.gatech.cc.is.util.*;/** * CommN150Hard implements SimpleN150 for * Nomad 150 hardware using the Ndirect class. * You should see the specifications in SimpleN150 * and Ndirect class documentation for details. * <P> * <A HREF="../COPYRIGHT.html">Copyright</A> * (c)1998 Tucker Balch * * @see CommN150 * @see EDU.gatech.cc.is.nomad150.Ndirect * @author Tucker Balch * @version $Revision: 1.2 $ */public class CommN150Hard extends SimpleN150Hard implements CommN150, HardObject	{	/**	 * The transceiver used to communicate with the rest of the robots.	 */	protected TransceiverHard t = null;	/**	 * Channel for recieving other robot positions.	 */	protected CircularBufferEnumeration rec_positions = null;        /**         * Instantiate a <B>CommN150Hard</B> object.  You should only         * instantiate one of these per robot connected to your         * computer.  Standard call is CommN150Hard(1,38400);         * @param serial_port 1 = ttys0 (COM1), 2 = ttys1 (COM2) ...         * @param baud baud rate for communication.         * @exception Exception If unable to configure the hardware.         */	public CommN150Hard(int serial_port, int baud, String server,		int id) throws Exception		{                super(serial_port, baud);		setID(id);		/*--- connect the transceiver ---*/		t = new TransceiverHard(server, id);		/*--- channel to listen for positions ---*/		rec_positions = t.getReceiveChannel();		}	boolean last_connected = true;        /**         * Conduct periodic I/O with the robot.  It runs at most every 	 * SimpleN150Hard.MIN_CYCLE_TIME milliseconds to gather sensor 	 * data from the robot, and issue movement commands.         */	public void takeStep()		{		/*--- do all the hardware stuff ---*/                super.takeStep();		/*--- handle KinSensor communication ---*/		// only do this if communication is connected		if (t.connected())			{			/*--- communicate position to everyone else ---*/			// send our position in absolute coordinates			Message m = new PositionMessage(last_Position);			t.broadcast(m);			/*--- listen to everyone else ---*/			// toss position messages into a vector			Vector othersv = new Vector(30);			// loop until got all messages			while(rec_positions.hasMoreElements())				{				// get a message				m = (Message)rec_positions.nextElement();				// disregard other types of message				if (m instanceof PositionMessage)					{					Vec2 p = new Vec2(						((PositionMessage)m).val);					// subtract our position to make it					// egocentric					p.sub(last_Position);					// stow it in the vector					othersv.addElement(p);					}				}			// make an array to old the other positions			last_teammates = new Vec2[othersv.size()];			Enumeration othersenum = othersv.elements();			// loop to get them all			for(int i = 0; i<last_teammates.length; i++)				last_teammates[i] = 					(Vec2)othersenum.nextElement();			}		}	/*--- KinSensor methods ---*/	protected Vec2[] last_teammates = new Vec2[0];        /**         * Get an array of Vec2s that represent the locations of          * teammates (Kin).         * @param timestamp only get new information if          * timestamp > than last call or timestamp == -1.         * @return the sensed teammates.         * @see EDU.gatech.cc.is.util.Vec2         */        public Vec2[] getTeammates(long timestamp)		{		return((Vec2[])last_teammates.clone());		}	protected Vec2[] last_opponents = new Vec2[0];        /**         * Get an array of Vec2s that represent the         * locations of opponents.         * @param timestamp only get new information if          *      timestamp > than last call or timestamp == -1.         * @return the sensed opponents.         * @see EDU.gatech.cc.is.util.Vec2         */        public Vec2[] getOpponents(long timestamp)		{		return(last_opponents);		}        /**         * Get the robot's player number, between 0         * and the number of robots on the team.         * Don't confuse this with getID which returns a unique number         * for the object in the simulation as a whole, not on its individual         * team.  On real hardware however, getID == PlayerNumber.         * @param timestamp only get new information if          *      timestamp > than last call or timestamp == -1.         * @return the player number.         */        public int getPlayerNumber(long timestamp)		{		return(unique_id);		}        /**	 * NOT IMPLEMENTED         * Set the maximum range at which kin may be sensed.  Primarily         * for use in simulation.         * @param r double, the maximum range.         */        public void setKinMaxRange(double r)		{		}	/*--- Transceiver methods ---*/        /**         * Broadcast a message to all teammates, except self.         * @param m Message, the message to be broadcast.         */        public void broadcast(Message m)		{		t.broadcast(m);		}        /**         * Transmit a message to just one teammate.  Transmission to         * self is allowed.         * @param id int, the ID of the agent to receive the message.         * @param m Message, the message to transmit.         * @exception CommunicationException if the receiving agent does not         *              exist.         */        public void unicast(int id, Message m)                 throws CommunicationException		{		t.unicast(id, m);		}        /**         * Transmit a message to specific teammates.  Transmission to         * self is allowed.         * @param ids int[], the IDs of the agents to receive the message.         * @param m Message, the message to transmit.         * @exception CommunicationException if one of the receiving agents          *              does not exist.         */        public void multicast(int[] ids, Message m)                throws CommunicationException		{		t.multicast(ids, m);		}        /**         * Get an enumeration of the incoming messages.  The messages         * are automatically buffered by the implementation.         * Unless the implementation guarantees it, you cannot         * count on all messages being delivered.         * Example, to print all incoming messages:         * <PRE>         * Transceiver c = new RobotComm();         * CircularBufferEnumeration r = c.getReceiveChannel();         * while (r.hasMoreElements())         *      System.out.println(r.nextElement());         * </PRE>         * @return the Enumeration.         */        public CircularBufferEnumeration getReceiveChannel()		{		return(t.getReceiveChannel());		}        /**         * Set the maximum range at which communication can occur.         * In simulation, this corresponds to a simulation of physical limits,         * on mobile robots it corresponds to a signal strength setting.         * @param r double, the maximum range.         */        public void setCommunicationMaxRange(double r)		{		t.setCommunicationMaxRange(r);		}        /**         * Check to see if the transceiver is connected to the server.         */        public boolean connected()		{		return(t.connected());		}	  public Color getForegroundColor() {return Color.black;}	  public Color getBackgroundColor() {return Color.black;}	}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久草中文综合在线| 亚洲一区二区三区美女| 欧美日韩精品一区二区在线播放| 97se亚洲国产综合自在线不卡| 国产91丝袜在线18| 不卡高清视频专区| 97精品久久久午夜一区二区三区| 欧美一区二区三区在线看| 欧美刺激脚交jootjob| 国产网站一区二区三区| 亚洲自拍偷拍综合| 欧美人狂配大交3d怪物一区| 亚洲制服丝袜av| 欧美tk—视频vk| av成人动漫在线观看| 91麻豆精品国产自产在线 | 图片区小说区国产精品视频| 国内精品伊人久久久久av一坑| 欧美伊人久久大香线蕉综合69| 在线播放一区二区三区| 亚洲国产日韩a在线播放| 99vv1com这只有精品| 日韩精品亚洲一区| 欧美性欧美巨大黑白大战| 免费观看成人鲁鲁鲁鲁鲁视频| 成人av在线影院| 日韩激情一区二区| 亚洲视频在线一区| 国产一区二区视频在线| 欧美精品三级日韩久久| 成人av午夜影院| 国模少妇一区二区三区| 午夜伊人狠狠久久| 欧美一区二区性放荡片| 91香蕉视频污| 中文字幕亚洲电影| 91极品美女在线| 亚洲一区二区在线免费看| 国产性做久久久久久| 欧美二区乱c少妇| 欧美日韩一本到| 激情国产一区二区| 美女尤物国产一区| 久久久久国产精品麻豆| 99re在线精品| aaa国产一区| 色综合久久99| 丝袜a∨在线一区二区三区不卡 | 欧美日韩电影一区| 欧美体内she精视频| 欧美日韩成人综合天天影院 | 成人动漫一区二区三区| 国产精品中文字幕日韩精品 | 欧美成人a视频| 久久久综合激的五月天| 国产精品丝袜久久久久久app| 99久久国产免费看| 欧洲一区在线电影| 久久精品久久综合| 亚洲一级不卡视频| 日本欧美一区二区| 亚洲欧美日韩国产综合在线| 制服丝袜一区二区三区| 日韩欧美一级精品久久| 欧美视频中文字幕| 精品国产a毛片| 欧美午夜电影在线播放| 欧美一级免费大片| 91成人免费网站| 日韩亚洲国产中文字幕欧美| 国产人成亚洲第一网站在线播放| 欧美日本一道本在线视频| 久久久久久免费毛片精品| 樱花草国产18久久久久| 亚洲精品成人悠悠色影视| 麻豆久久久久久久| 欧美三级电影网站| 国产精品久久久久久久久免费桃花 | 丁香六月综合激情| 韩日av一区二区| 欧美日韩黄色影视| 亚洲摸摸操操av| 粉嫩久久99精品久久久久久夜| 欧美肥大bbwbbw高潮| 一区二区三区四区视频精品免费| 亚洲精品欧美二区三区中文字幕| 蜜桃传媒麻豆第一区在线观看| 色一情一乱一乱一91av| 国产精品色一区二区三区| 国产尤物一区二区在线| 日韩精品一区二区三区三区免费| 亚洲大片免费看| 欧美在线你懂的| 亚洲国产视频直播| 欧美日韩亚洲综合| 亚洲成人自拍偷拍| 欧美日韩在线播放一区| 亚洲电影一级片| 亚洲图片另类小说| 91福利国产精品| 丁香婷婷综合五月| 亚洲欧美另类小说| 精品视频一区二区三区免费| 洋洋av久久久久久久一区| 欧美揉bbbbb揉bbbbb| 日韩精品高清不卡| 日韩精品一区二区三区视频在线观看 | 日韩欧美国产电影| 国产成人激情av| 欧美精品久久久久久久久老牛影院| 日韩精品91亚洲二区在线观看| 69堂精品视频| 波多野结衣一区二区三区 | 黄色精品一二区| 国产精品视频yy9299一区| 欧美日韩一区二区三区免费看| 秋霞午夜av一区二区三区| 国产精品毛片高清在线完整版| 久久亚洲综合色一区二区三区 | 国产欧美日韩三级| 欧美乱熟臀69xxxxxx| 国产一区999| 亚洲a一区二区| 亚洲品质自拍视频网站| 久久这里都是精品| 欧美日韩成人综合天天影院 | 日韩女优av电影| 欧美丝袜自拍制服另类| 不卡视频一二三四| 国产精品69毛片高清亚洲| 亚洲18女电影在线观看| 亚洲久草在线视频| 国产网站一区二区三区| 日韩欧美成人一区二区| 欧美日韩国产a| 欧美日韩久久一区| 欧美专区日韩专区| 91蜜桃免费观看视频| 成人97人人超碰人人99| 欧美日韩美女一区二区| 欧美在线观看一区| 欧美美女直播网站| 欧美日韩国产美女| 日韩一区二区三区视频| 欧美一区二区三区公司| 欧美午夜电影网| 91精品国产一区二区| 7777精品伊人久久久大香线蕉| 91精品国产91久久综合桃花 | 99久久亚洲一区二区三区青草| 国产成人免费av在线| 日韩欧美中文一区二区| 欧美一区二区视频在线观看| 精品三级av在线| 国产精品美日韩| 亚洲午夜免费视频| 三级久久三级久久久| 韩国欧美国产1区| 国产.欧美.日韩| 欧美视频在线不卡| 精品国产区一区| 椎名由奈av一区二区三区| 亚洲欧美综合色| 视频一区视频二区在线观看| 精品一区二区三区免费观看| 成人国产亚洲欧美成人综合网| 欧美综合亚洲图片综合区| 欧美v国产在线一区二区三区| 中文字幕欧美日本乱码一线二线 | 国产一区999| 欧美日韩在线免费视频| 欧美激情艳妇裸体舞| 三级欧美韩日大片在线看| 成av人片一区二区| 精品国产麻豆免费人成网站| 亚洲老妇xxxxxx| 成人av资源在线| 久久伊人蜜桃av一区二区| 丝袜诱惑制服诱惑色一区在线观看| 成人黄色在线看| 久久日一线二线三线suv| 一区二区三区四区高清精品免费观看 | 亚洲欧洲中文日韩久久av乱码| 韩国欧美一区二区| 日韩一区二区三免费高清| 一区二区三区欧美亚洲| 99国产精品久久久| 国产精品入口麻豆原神| 狠狠狠色丁香婷婷综合激情| 91精品在线一区二区| 一区二区三区美女| 色婷婷激情一区二区三区| 亚洲三级免费电影| 在线精品视频免费播放| 亚洲精品欧美激情| 欧美亚洲国产一区在线观看网站| 一区二区高清视频在线观看| 欧美伊人久久久久久久久影院 | 色激情天天射综合网| 1024国产精品|