00001 /* -*- Mode: C++ -*- 00002 * $Id: BasicCoachMessageStrategy.cc,v 1.3 2004/09/01 15:50:41 frehe Exp $ 00003 * 00004 * 00005 * COPYRIGHT INFORMATION 00006 * 00007 * This file is part of RoboSoc created by Fredrik Heintz <frehe@ida.liu.se> 00008 * Copyright (C) 1999, 2000 Fredrik Heintz, Linköping University, Sweden 00009 * 00010 * You are allowed to modify and use this code as long as you retain this 00011 * notice. If you make any changes or have any comments I would appreciate 00012 * it if you send me a message. For more information, please see 00013 * http://www.ida.liu.se/~frehe/RoboCup/RoboSoc/ 00014 * 00015 * 00016 * IDENTIFICATION 00017 * 00018 * Filename: BasicCoachMessageStrategy.cc 00019 * Unitname: Framework/strategy 00020 * $Revision: 1.3 $ 00021 * Created by: David Rosén 2002-07-01 00022 * Last modified by $Author: frehe $ $Date: 2004/09/01 15:50:41 $ 00023 * 00024 * 00025 * HISTORY 00026 * 00027 * $Log: BasicCoachMessageStrategy.cc,v $ 00028 * Revision 1.3 2004/09/01 15:50:41 frehe 00029 * Implemented the basic coach strategy to actual store the coach message. 00030 * 00031 * Revision 1.2 2002/08/31 15:35:23 s02davro 00032 * Updated the strategies and the interface 00033 * 00034 * Revision 1.1 2002/08/02 22:00:51 s02davro 00035 * Created the Basic classes, needs improvements. 00036 * 00037 */ 00038 00051 #include "BasicCoachMessageStrategy.h" 00052 #include "WorldModelInterface.h" 00053 #include "rs_error.h" 00054 00055 00056 RS_BEGIN_NAMESPACE 00057 00058 00059 BasicCoachMessageStrategy::BasicCoachMessageStrategy() 00060 { 00061 } 00062 00063 00064 BasicCoachMessageStrategy::~BasicCoachMessageStrategy() 00065 { 00066 } 00067 00068 00069 void 00070 BasicCoachMessageStrategy::updateAfterCoachMessage() 00071 { 00072 observation = &wmi->getObservation(); 00073 00074 RS_LOG ( LA_STRATEGY, "BasicCoachMessageStrategy: got " 00075 << observation->coachMessage ); 00076 00077 // Update the agent 00078 wmi->getWorld().getAgent().setCoachMessage(observation->coachMessage); 00079 } 00080 00081 00082 RS_END_NAMESPACE
1.3-rc3