ball & player info message parser
More...
#include <say_message_parser.h>
|
| BallPlayerMessageParser (std::shared_ptr< AudioMemory > memory) |
| construct with audio memory More...
|
|
char | header () const |
| get the header character. More...
|
|
int | parse (const int sender, const double &dir, const char *msg, const GameTime ¤t) |
| virtual method which analyzes audio messages. More...
|
|
virtual | ~SayMessageParser ()=default |
| virtual destruct. do nothing.
|
|
virtual char | header () const =0 |
| pure virtual method that returns header character. More...
|
|
virtual int | parse (const int sender, const double &dir, const char *msg, const GameTime ¤t)=0 |
| virtual method which analyzes audio messages. More...
|
|
|
typedef std::shared_ptr< SayMessageParser > | Ptr |
| pointer type alias
|
|
| SayMessageParser ()=default |
| protected constructer
|
|
ball & player info message parser
format: "B<bpos_bvel_unum_ppos_pbody:9>" the length of message == 10
◆ BallPlayerMessageParser()
rcsc::BallPlayerMessageParser::BallPlayerMessageParser |
( |
std::shared_ptr< AudioMemory > |
memory | ) |
|
|
explicit |
construct with audio memory
- Parameters
-
memory | pointer to the memory |
◆ header()
char rcsc::BallPlayerMessageParser::header |
( |
| ) |
const |
|
inlinevirtual |
◆ parse()
int rcsc::BallPlayerMessageParser::parse |
( |
const int |
sender, |
|
|
const double & |
dir, |
|
|
const char * |
msg, |
|
|
const GameTime & |
current |
|
) |
| |
|
virtual |
virtual method which analyzes audio messages.
- Parameters
-
sender | sender's uniform number |
dir | sender's direction |
msg | raw audio message |
current | current game time |
- Return values
-
bytes | read if success |
0 | message ID is not match. other parser should be tried. |
-1 | failed to parse |
Implements rcsc::SayMessageParser.
◆ sheader()
static char rcsc::BallPlayerMessageParser::sheader |
( |
| ) |
|
|
inlinestatic |
get the header character.
- Returns
- header character.
◆ slength()
static int rcsc::BallPlayerMessageParser::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: