opponent info message encoder
More...
#include <say_message_builder.h>
|
| 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...
|
|
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...
|
|
|
typedef std::shared_ptr< const SayMessage > | Ptr |
| definition of the smart pointer type.
|
|
| SayMessage ()=default |
| protected constructer
|
|
opponent info message encoder
format: "O<unum_pos_body:4>" the length of message == 5
◆ OpponentMessage()
rcsc::OpponentMessage::OpponentMessage |
( |
const int |
unum, |
|
|
const Vector2D & |
player_pos, |
|
|
const AngleDeg & |
player_body |
|
) |
| |
|
inline |
construct with raw information
- Parameters
-
unum | player's unum |
player_pos | goalie's global position |
player_body | goalie's body angle |
◆ appendTo()
bool rcsc::OpponentMessage::appendTo |
( |
std::string & |
to | ) |
const |
|
virtual |
append this info to the audio message
- Parameters
-
to | reference 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
-
os | reference 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: