?? rfidaction.cpp
字號:
#include <iostream>#include <iomanip>#include "RFIDAction.h"#include "msg_types.h"#include "ipc/ipc.h"#include "util/timeutil.h"#include "util/robotId.h"#include "com/ipc_com.h"RFIDAction::RFIDAction(){ _tagCount=0; _lastDeployTime.tv_sec = 0; _lastDeployTime.tv_usec = 0;}RFIDAction::~RFIDAction(){}int RFIDAction::deployTag(){ timeval now; gettimeofday(&now,0); double diff = TimevalDiff(&now, &_lastDeployTime); if (diff > MIN_WAIT_TIME_BETWEEN_DEPLOYMENT) { rescue_rfid_actuator_message msg; msg.triggerTag=1; msg.robot.id = getRobotId(); msg.robot.ts = getCurrentTime(); ComPublishToRobot(RESCUE_RFID_ACTUATOR_NAME, &msg); gettimeofday(&_lastDeployTime,0); return _tagCount++; } return -1;}/********************************************************************* * (C) Copyright 2006 Albert Ludwigs University Freiburg * Institute of Computer Science * * All rights reserved. Use of this software is permitted for * non-commercial research purposes, and it may be copied only * for that use. All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the Albert Ludwigs University Freiburg make any warranty * about the software or its performance. *********************************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -