24 #include "core/MACoreTypes.hpp" 25 #include "core/MASignal.hpp" 29 #include <MCThreadLocalData.hpp> 31 #include <boost/scoped_ptr.hpp> 62 typedef std::vector<int16_t> Int16List;
65 typedef std::vector<MANum<int>*> MANumIntPtrList;
68 typedef std::pair<int, MC::StringPtr> ValueNoteType;
70 typedef std::vector<ValueNoteType> ValueNoteList;
73 typedef std::map<const MANum<int>*, ValueNoteList> MANumIntPtrValueNotesMap;
91 MARobotState(
bool static_instance =
false,
bool updates =
false);
100 MARobotState(
const MARobotState& other);
102 virtual ~MARobotState();
114 void Init(
bool static_instance,
bool updates);
127 MALeg& GetLeg(MA::Leg::LegTypes leg)
const;
136 std::string GetDecodedVariableMap()
const;
147 const MANum<int>* GetVariable(
const std::string& variable_name)
const;
158 std::string GetDisplayName(
const std::string& variable_name)
const;
167 MC::StringList GetVariableNames()
const;
178 MA::ValueNoteList GetValueNotes(
const std::string& variable_name)
const;
189 std::string GetAsRichText(
const MC::StringList& highlighted_variables = MC::StringList())
const;
198 std::string GetAsNormalText()
const;
209 MARobotState& operator=(
const MARobotState& other);
220 MCBinaryData* Encode(
bool encode_variable_map =
true)
const;
233 static MARobotState* Decode(
const MCBinaryData& data,
const std::string& variable_map =
"");
246 void BindVariable(
const std::string& name,
MANum<int>& variable,
const std::string& display_name);
253 void RemoveCustomVariables();
264 int GetBinarySize()
const;
280 boost::scoped_ptr<MAHead>
Head;
290 boost::scoped_ptr<MAHri>
Hri;
MA::MANumIntPtrValueNotesMap VariableValueNotes
Notes for variable values.
std::string DecodedVariableMap
Decoded variable map from the network decoder.
boost::scoped_ptr< MAComplexIndicators > ComplexIndicators
Complex indicators.
boost::scoped_ptr< MALeg > LegRH
LegRH.
MA::Int16List VariableNames
Variable names.
MA::Int16List VariableDisplayNames
Variable display names.
This class represents a number with bound check.
boost::scoped_ptr< MAGoals > Goals
Goals.
Audio input/output state.
boost::scoped_ptr< MABodyMotion > BodyMotion
Body motion.
boost::scoped_ptr< MALeg > LegLF
LegLF.
MA::MANumIntPtrList DecodedCustomVariables
Decoded custom variable pointers.
boost::scoped_ptr< MAEmotions > Emotions
Emotions.
std::string ** StrBasePtr
Variable names.
boost::scoped_ptr< MALeg > LegRF
LegRF.
MA::MANumIntPtrList Variables
Variable pointers.
boost::scoped_ptr< MAAudio > Audio
Audio input/output.
A wrapper class to cover boost::thread_specific_ptr/folly::ThreadLocal API on certain targets...
boost::scoped_ptr< MAHri > Hri
Human-robot interaction data.
boost::scoped_ptr< MATorso > Torso
Torso.
Human-robot interaction data.
boost::scoped_ptr< MALeg > LegLH
LegLH.
Complex state indicators.
boost::scoped_ptr< MAHead > Head
Head.