1#ifndef NXT_Sound_Control_DEFINED
2#define NXT_Sound_Control_DEFINED
22#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
30 std::ostringstream ss;
31 ss << static_cast<int>(frequency()) <<
",";
32 ss << static_cast<int>(duration()) <<
",";
41 vector<string> elements = components_of_string_separated(str,
',',
true);
43 if (elements.size() == 0)
return;
46 set_frequency(
static_cast<uint16_t
>(atoi(elements[0].c_str()) ));
47 if (elements.size() < 2)
return;
48 set_duration(
static_cast<uint16_t
>(atoi(elements[0].c_str()) ));
54 if (frequency()!= s.frequency() )
56 if (duration()!= s.duration() )
Class for controlling differential robots Defines whiteboard message.
NXT_Sound_Control(const std::string &name)
String constructor.
void from_string(std::string str)
string conversion
bool operator==(const NXT_Sound_Control &s)
override equality operator so we can compare instances
NXT_Sound_Control()
Designated constructor.
std::string description()
get message description