Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Modules/BehaviorControl/MotionRatingBehaviorControl/MotionRatingBehaviorMessage.cpp

Go to the documentation of this file.

    00001 /**
    00002 * @file MotionRatingBehaviorMessage.cpp
    00003 *
    00004 * Implementation of class MotionRatingBehaviorMessage
    00005 *
    00006 * @author Sebastian Petters
    00007 * @author Dirk Thomas
    00008 */
    00009
    00010 #include "MotionRatingBehaviorMessage.h"
    00011
    00012 MotionRatingBehaviorMessage::MotionRatingBehaviorMessage()
    00013 {
    00014   // nothing to do so far
    00015 }
    00016
    00017 In& operator>>(In& stream,MotionRatingBehaviorMessage& message)
    00018 {
    00019   int temp;
    00020   stream >> temp;
    00021   message.type = (MotionRatingBehaviorMessage::MessageType)temp;
    00022   stream >> temp;
    00023   message.state = (MotionRatingBehaviorMessage::States)temp;
    00024   stream >> message.paramSetId;
    00025   stream >> message.data;
    00026   stream >> message.currentSpeed;
    00027   stream >> message.averageSpeed;
    00028   stream >> message.currentWalk;
    00029   stream >> message.walkCount;
    00030   stream >> message.distance;
    00031   stream >> message.time;
    00032   stream >> temp;
    00033   message.finished = (temp==1) ? true : false;
    00034   stream >> message.remainingPower;
    00035   stream >> message.start;
    00036   stream >> message.end;
    00037
    00038   return stream;
    00039 }
    00040
    00041 Out& operator<<(Out& stream, const MotionRatingBehaviorMessage& message)
    00042 {
    00043   stream << (int)message.type;
    00044   stream << (int)message.state;
    00045   stream << message.paramSetId;
    00046   stream << message.data;
    00047   stream << message.currentSpeed;
    00048   stream << message.averageSpeed;
    00049   stream << message.currentWalk;
    00050   stream << message.walkCount;
    00051   stream << message.distance;
    00052   stream << message.time;
    00053   stream << (int)(message.finished ? 1 : 0);
    00054   stream << message.remainingPower;
    00055   stream << message.start;
    00056   stream << message.end;
    00057
    00058   return stream;
    00059 }
    00060
    00061 /*
    00062 * Change log :
    00063 *
    00064 * $Log: MotionRatingBehaviorMessage.cpp,v $
    00065 * Revision 1.1  2004/03/17 16:18:49  thomas
    00066 * added preversion of motion optimisation with behaviour, selflocator, headcontrol and robotcontrol dialog
    00067 *
    00068 *
    00069 */