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::BallPlayerMessageParser Class Reference

ball & player info message parser More...

#include <say_message_parser.h>

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

Public Member Functions

 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 &current)
 virtual method which analyzes audio messages. More...
 
- Public Member Functions inherited from rcsc::SayMessageParser
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 &current)=0
 virtual method which analyzes audio messages. More...
 

Static Public Member Functions

static char sheader ()
 get the header character. More...
 
static int slength ()
 get the length of this message. More...
 

Additional Inherited Members

- Public Types inherited from rcsc::SayMessageParser
typedef std::shared_ptr< SayMessageParserPtr
 pointer type alias
 
- Protected Member Functions inherited from rcsc::SayMessageParser
 SayMessageParser ()=default
 protected constructer
 

Detailed Description

ball & player info message parser

format: "B<bpos_bvel_unum_ppos_pbody:9>" the length of message == 10

Constructor & Destructor Documentation

◆ BallPlayerMessageParser()

rcsc::BallPlayerMessageParser::BallPlayerMessageParser ( std::shared_ptr< AudioMemory memory)
explicit

construct with audio memory

Parameters
memorypointer to the memory

Member Function Documentation

◆ header()

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

get the header character.

Returns
header character.

Implements rcsc::SayMessageParser.

◆ 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
sendersender's uniform number
dirsender's direction
msgraw audio message
currentcurrent game time
Return values
bytesread if success
0message ID is not match. other parser should be tried.
-1failed 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: