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

stamina info message encoder More...

#include <say_message_builder.h>

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

Public Member Functions

 StaminaMessage (const double &stamina)
 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

stamina info message encoder

format: "s<rate:1>" the length of message == 2

Constructor & Destructor Documentation

◆ StaminaMessage()

rcsc::StaminaMessage::StaminaMessage ( const double &  stamina)
inlineexplicit

construct with raw information

Parameters
staminaraw stamina value

Member Function Documentation

◆ appendTo()

bool rcsc::StaminaMessage::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::StaminaMessage::header ( ) const
inlinevirtual

get the header character of this message

Returns
header character of this message

Implements rcsc::SayMessage.

◆ length()

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

get the length of this message

Returns
the length of encoded message

Implements rcsc::SayMessage.

◆ printDebug()

std::ostream & rcsc::StaminaMessage::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::StaminaMessage::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: