LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Static Public Member Functions | List of all members
rcsc::OpponentMessage Class Reference

opponent info message encoder More...

#include <say_message_builder.h>

Inheritance diagram for rcsc::OpponentMessage:
Inheritance graph
[legend]
Collaboration diagram for rcsc::OpponentMessage:
Collaboration graph
[legend]

Public Member Functions

 OpponentMessage (const int unum, const Vector2D &player_pos, const AngleDeg &player_body)
 construct with raw information More...
 
char header () const
 get the header character of this message More...
 
int length () const
 get the length of this message More...
 
bool appendTo (std::string &to) const
 append this info to the audio message More...
 
std::ostream & printDebug (std::ostream &os) const
 append the debug message More...
 
- Public Member Functions inherited from rcsc::SayMessage
virtual ~SayMessage ()=default
 virtual destruct. do nothing.
 
virtual char header () const =0
 pure virtual method. get the header character of this message More...
 
virtual int length () const =0
 pure virtual method. get the length of this message More...
 
virtual bool appendTo (std::string &to) const =0
 append an audio message to the string More...
 
virtual std::ostream & printDebug (std::ostream &os) const =0
 append the debug message More...
 

Static Public Member Functions

static int slength ()
 get the length of this message. More...
 

Additional Inherited Members

- Public Types inherited from rcsc::SayMessage
typedef std::shared_ptr< const SayMessagePtr
 definition of the smart pointer type.
 
- Protected Member Functions inherited from rcsc::SayMessage
 SayMessage ()=default
 protected constructer
 

Detailed Description

opponent info message encoder

format: "O<unum_pos_body:4>" the length of message == 5

Constructor & Destructor Documentation

◆ OpponentMessage()

rcsc::OpponentMessage::OpponentMessage ( const int  unum,
const Vector2D player_pos,
const AngleDeg player_body 
)
inline

construct with raw information

Parameters
unumplayer's unum
player_posgoalie's global position
player_bodygoalie's body angle

Member Function Documentation

◆ appendTo()

bool rcsc::OpponentMessage::appendTo ( std::string &  to) const
virtual

append this info to the audio message

Parameters
toreference to the message string instance
Returns
result status of encoding

Implements rcsc::SayMessage.

◆ header()

char rcsc::OpponentMessage::header ( ) const
inlinevirtual

get the header character of this message

Returns
header character of this message

Implements rcsc::SayMessage.

◆ length()

int rcsc::OpponentMessage::length ( ) const
inlinevirtual

get the length of this message

Returns
the length of encoded message

Implements rcsc::SayMessage.

◆ printDebug()

std::ostream & rcsc::OpponentMessage::printDebug ( std::ostream &  os) const
virtual

append the debug message

Parameters
osreference to the output stream
Returns
reference to the output stream

Implements rcsc::SayMessage.

◆ slength()

static int rcsc::OpponentMessage::slength ( )
inlinestatic

get the length of this message.

Returns
the length of encoded message

The documentation for this class was generated from the following file: