Add Marionette
This commit was merged in pull request #1.
This commit is contained in:
@@ -78,6 +78,7 @@ AC_CONFIG_FILES([
|
||||
Makefile hcore/Makefile
|
||||
hcore/deviceManager/Makefile
|
||||
hcore/senseApis/Makefile
|
||||
hcore/marionette/Makefile
|
||||
commonLibs/Makefile
|
||||
commonLibs/xcbXorg/Makefile
|
||||
])
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
SUBDIRS = deviceManager senseApis
|
||||
SUBDIRS = deviceManager senseApis marionette
|
||||
AM_CPPFLAGS+= -I"$(top_srcdir)/hcore/include"
|
||||
|
||||
noinst_LIBRARIES = libhcore.a
|
||||
libhcore_a_SOURCES = mind.cpp opts.cpp componentThread.cpp
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef _BODY_H
|
||||
#define _BODY_H
|
||||
|
||||
namespace mrntt {
|
||||
namespace body {
|
||||
|
||||
class Body
|
||||
{
|
||||
public:
|
||||
Body() = default;
|
||||
~Body() = default;
|
||||
};
|
||||
|
||||
} // namespace body
|
||||
} // namespace mrntt
|
||||
|
||||
#endif // _BODY_H
|
||||
@@ -1,17 +1,23 @@
|
||||
#ifndef _BODY_MAP_H
|
||||
#define _BODY_MAP_H
|
||||
#ifndef MRNTT_BODY_BODYMAP_H
|
||||
#define MRNTT_BODY_BODYMAP_H
|
||||
|
||||
#include <set>
|
||||
#include <cstdint>
|
||||
|
||||
#include <body/limb.h>
|
||||
|
||||
namespace mrntt {
|
||||
namespace body {
|
||||
|
||||
class BodyMap {
|
||||
public:
|
||||
BodyMap() = default;
|
||||
~BodyMap() = default;
|
||||
|
||||
std::set<uint32_t, BodyLimb> limbs;
|
||||
public:
|
||||
std::set<uint32_t, Limb> limbs;
|
||||
};
|
||||
|
||||
#endif // _BODY_MAP_H
|
||||
} // namespace body
|
||||
} // namespace mrntt
|
||||
|
||||
#endif // MRNTT_BODY_BODYMAP_H
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
#ifndef BODY_MESSAGE_H
|
||||
#define BODY_MESSAGE_H
|
||||
#ifndef MRNTT_BODY_BODYMESSAGE_H
|
||||
#define MRNTT_BODY_BODYMESSAGE_H
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
#include <body/limb.h>
|
||||
#include <body/bodyPart.h>
|
||||
#include <body/part.h>
|
||||
|
||||
namespace mrntt {
|
||||
namespace body {
|
||||
|
||||
class BodyMessage
|
||||
{
|
||||
@@ -14,7 +17,7 @@ public:
|
||||
~BodyMessage() = default;
|
||||
};
|
||||
|
||||
class BodySpotImpactEntry
|
||||
class SpotImpactEntry
|
||||
{
|
||||
public:
|
||||
enum class ReportType
|
||||
@@ -26,10 +29,10 @@ public:
|
||||
COLD
|
||||
};
|
||||
|
||||
BodySpotImpactEntry(uint32_t _spot, ReportType _type, uint32_t _value)
|
||||
SpotImpactEntry(uint32_t _spot, ReportType _type, uint32_t _value)
|
||||
: spot(_spot), type(_type), value(_value)
|
||||
{}
|
||||
~BodySpotImpactEntry() = default;
|
||||
~SpotImpactEntry() = default;
|
||||
|
||||
public:
|
||||
uint32_t spot;
|
||||
@@ -37,28 +40,27 @@ public:
|
||||
uint32_t value;
|
||||
};
|
||||
|
||||
class BodySpotImpactInd
|
||||
: public BodyMessage
|
||||
class SpotImpactInd : public BodyMessage
|
||||
{
|
||||
public:
|
||||
BodySpotImpactInd(BodyPart &_part) : part(_part) {}
|
||||
~BodySpotImpactInd() = default;
|
||||
SpotImpactInd(Part &_part) : part(_part) {}
|
||||
~SpotImpactInd() = default;
|
||||
|
||||
public:
|
||||
BodyPart ∂
|
||||
std::vector<BodySpotImpactEntry> entries;
|
||||
Part ∂
|
||||
std::vector<SpotImpactEntry> entries;
|
||||
};
|
||||
|
||||
class BodyPartMsg
|
||||
: public BodyMessage
|
||||
class PartMsg : public BodyMessage
|
||||
{
|
||||
public:
|
||||
BodyPartMsg(const BodyPart& _part)
|
||||
:part(_part)
|
||||
{}
|
||||
PartMsg(const Part& _part) : part(_part) {}
|
||||
|
||||
public:
|
||||
const BodyPart& part;
|
||||
const Part& part;
|
||||
};
|
||||
|
||||
#endif // BODY_MESSAGE_H
|
||||
} // namespace body
|
||||
} // namespace mrntt
|
||||
|
||||
#endif // MRNTT_BODY_BODYMESSAGE_H
|
||||
@@ -1,28 +1,34 @@
|
||||
#ifndef BODY_LIMB_H
|
||||
#define BODY_LIMB_H
|
||||
#ifndef MRNTT_BODY_LIMB_H
|
||||
#define MRNTT_BODY_LIMB_H
|
||||
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include <cstdint>
|
||||
|
||||
#include <body/bodyPart.h>
|
||||
#include <body/part.h>
|
||||
|
||||
class BodyLimb
|
||||
namespace mrntt {
|
||||
namespace body {
|
||||
|
||||
class Limb
|
||||
{
|
||||
public:
|
||||
BodyLimb(uint32_t _id) : id(_id) {}
|
||||
BodyLimb(uint32_t _id,
|
||||
const std::string& _name, const std::string& _desc,
|
||||
const std::string& _loc)
|
||||
Limb(uint32_t _id) : id(_id) {}
|
||||
Limb(uint32_t _id,
|
||||
const std::string& _name, const std::string& _desc,
|
||||
const std::string& _loc)
|
||||
: id(_id), name(_name), description(_desc), location(_loc)
|
||||
{}
|
||||
|
||||
~BodyLimb() = default;
|
||||
~Limb() = default;
|
||||
|
||||
public:
|
||||
uint32_t id;
|
||||
std::string name, description, location;
|
||||
std::set<uint32_t, BodyPart> parts;
|
||||
std::set<uint32_t, Part> parts;
|
||||
};
|
||||
|
||||
#endif // BODY_LIMB_H
|
||||
} // namespace body
|
||||
} // namespace mrntt
|
||||
|
||||
#endif // MRNTT_BODY_LIMB_H
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef _BODY_MAP_H
|
||||
#define _BODY_MAP_H
|
||||
|
||||
#include <set>
|
||||
#include <cstdint>
|
||||
|
||||
#include <body/limb.h>
|
||||
|
||||
namespace mrntt {
|
||||
namespace body {
|
||||
|
||||
class BodyMap {
|
||||
public:
|
||||
BodyMap() = default;
|
||||
~BodyMap() = default;
|
||||
|
||||
std::set<uint32_t, Limb> limbs;
|
||||
};
|
||||
|
||||
} // namespace body
|
||||
} // namespace mrntt
|
||||
|
||||
#endif // _BODY_MAP_H
|
||||
@@ -7,14 +7,17 @@
|
||||
|
||||
#include <sensors/interoceptor.h>
|
||||
|
||||
class BodySpot
|
||||
namespace mrntt {
|
||||
namespace body {
|
||||
|
||||
class Spot
|
||||
{
|
||||
public:
|
||||
BodySpot(uint32_t _id, std::string _description)
|
||||
Spot(uint32_t _id, std::string _description)
|
||||
: id(_id), description(_description)
|
||||
{}
|
||||
|
||||
~BodySpot() = default;
|
||||
~Spot() = default;
|
||||
|
||||
public:
|
||||
uint32_t id;
|
||||
@@ -22,21 +25,24 @@ public:
|
||||
std::set<uint32_t, Interoceptor> interoceptors;
|
||||
};
|
||||
|
||||
class BodyPart
|
||||
class Part
|
||||
{
|
||||
public:
|
||||
BodyPart(uint32_t _partId, std::string _partName,
|
||||
Part(uint32_t _partId, std::string _partName,
|
||||
std::string _partDesc, std::string _partLoc)
|
||||
: id(_partId), name(_partName),
|
||||
description(_partDesc), location(_partLoc)
|
||||
{}
|
||||
|
||||
~BodyPart() = default;
|
||||
~Part() = default;
|
||||
|
||||
public:
|
||||
const uint32_t id;
|
||||
std::string name, description, location;
|
||||
std::set<uint32_t, BodySpot> spots;
|
||||
std::set<uint32_t, Spot> spots;
|
||||
};
|
||||
|
||||
} // namespace body
|
||||
} // namespace mrntt
|
||||
|
||||
#endif // BODYPART_H
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef _MARIONETTE_H
|
||||
#define _MARIONETTE_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace mrntt {
|
||||
|
||||
class Marionette
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace mrntt
|
||||
|
||||
#endif // _MARIONETTE_H
|
||||
@@ -0,0 +1,4 @@
|
||||
AM_CPPFLAGS+= -I"$(top_srcdir)/hcore/include"
|
||||
|
||||
noinst_LIBRARIES = libmarionette.a
|
||||
libmarionette_a_SOURCES = marionette.cpp
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
namespace mrntt {
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace mrntt
|
||||
Reference in New Issue
Block a user