资源简介
robocup世界冠军代码,学习robocup的入门经典。
代码片段和文件信息
/*
Copyright (c) 2000-2003 Jelle Kok University of Amsterdam
All rights reserved.
Redistribution and use in source and binary forms with or without
modification are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the University of Amsterdam nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL
DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*! \file ActHandler.cpp
File: ActHandler.cpp
Project: Robocup Soccer Simulation Team: UvA Trilearn
Authors: Jelle Kok
Created: 28/11/2000
Last Revision: $ID$
Contents: This file contains the class definitions for the
ActHandler that handles the outgoing messages to the
server.
Changes
Date Author Comment
28/11/2000 Jelle Kok Initial version created
*/
#include “ActHandler.h“
#ifndef WIN32
#include // poll
#include // poll
#endif
#include // SIGALARM
ActHandler* ACT; /*!< Pointer to ActHandler class needed by signal handler */
/*! This function is executed when a SIGALARM singal arrives. The time this
signal comes is defined by the SenseHandler (depending on incoming
sense_body messages). When the signal arrives the commands currently
stored in the queue of the ActHandler are send to the server (using the
method sendCommands).
\param i is ignored */
#ifdef WIN32
extern void CALLBACK sigalarmHandler(UINT UINT DWORD DWORD DWORD )
#else
extern void sigalarmHandler( int i )
#endif
{
Log.logFromSignal( 2 “alarm handler!!“ );
ACT->sendCommands( );
}
/*! This is the constructor for the ActHandler class. All the variables are
initialized.
\param c Connection that is connected
- 上一篇:头文件-lodepng.h
- 下一篇:UE4 人物骨骼和动作
评论
共有 条评论