libxcb #1

Merged
hayodea merged 20 commits from libxcb into master 2025-07-22 06:14:36 +00:00
11 changed files with 131 additions and 44 deletions
Showing only changes of commit e7974db324 - Show all commits
+1
View File
@@ -78,6 +78,7 @@ AC_CONFIG_FILES([
Makefile hcore/Makefile Makefile hcore/Makefile
hcore/deviceManager/Makefile hcore/deviceManager/Makefile
hcore/senseApis/Makefile hcore/senseApis/Makefile
hcore/marionette/Makefile
commonLibs/Makefile commonLibs/Makefile
commonLibs/xcbXorg/Makefile commonLibs/xcbXorg/Makefile
]) ])
+1 -2
View File
@@ -1,6 +1,5 @@
SUBDIRS = deviceManager senseApis SUBDIRS = deviceManager senseApis marionette
AM_CPPFLAGS+= -I"$(top_srcdir)/hcore/include" AM_CPPFLAGS+= -I"$(top_srcdir)/hcore/include"
noinst_LIBRARIES = libhcore.a noinst_LIBRARIES = libhcore.a
libhcore_a_SOURCES = mind.cpp opts.cpp componentThread.cpp libhcore_a_SOURCES = mind.cpp opts.cpp componentThread.cpp
+17
View File
@@ -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
+11 -5
View File
@@ -1,17 +1,23 @@
#ifndef _BODY_MAP_H #ifndef MRNTT_BODY_BODYMAP_H
#define _BODY_MAP_H #define MRNTT_BODY_BODYMAP_H
#include <set> #include <set>
#include <cstdint> #include <cstdint>
#include <body/limb.h> #include <body/limb.h>
namespace mrntt {
namespace body {
class BodyMap { class BodyMap {
public: public:
BodyMap() = default; BodyMap() = default;
~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
+21 -19
View File
@@ -1,11 +1,14 @@
#ifndef BODY_MESSAGE_H #ifndef MRNTT_BODY_BODYMESSAGE_H
#define BODY_MESSAGE_H #define MRNTT_BODY_BODYMESSAGE_H
#include <vector> #include <vector>
#include <cstdint> #include <cstdint>
#include <body/limb.h> #include <body/limb.h>
#include <body/bodyPart.h> #include <body/part.h>
namespace mrntt {
namespace body {
class BodyMessage class BodyMessage
{ {
@@ -14,7 +17,7 @@ public:
~BodyMessage() = default; ~BodyMessage() = default;
}; };
class BodySpotImpactEntry class SpotImpactEntry
{ {
public: public:
enum class ReportType enum class ReportType
@@ -26,10 +29,10 @@ public:
COLD 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) : spot(_spot), type(_type), value(_value)
{} {}
~BodySpotImpactEntry() = default; ~SpotImpactEntry() = default;
public: public:
uint32_t spot; uint32_t spot;
@@ -37,28 +40,27 @@ public:
uint32_t value; uint32_t value;
}; };
class BodySpotImpactInd class SpotImpactInd : public BodyMessage
: public BodyMessage
{ {
public: public:
BodySpotImpactInd(BodyPart &_part) : part(_part) {} SpotImpactInd(Part &_part) : part(_part) {}
~BodySpotImpactInd() = default; ~SpotImpactInd() = default;
public: public:
BodyPart &part; Part &part;
std::vector<BodySpotImpactEntry> entries; std::vector<SpotImpactEntry> entries;
}; };
class BodyPartMsg class PartMsg : public BodyMessage
: public BodyMessage
{ {
public: public:
BodyPartMsg(const BodyPart& _part) PartMsg(const Part& _part) : part(_part) {}
:part(_part)
{}
public: public:
const BodyPart& part; const Part& part;
}; };
#endif // BODY_MESSAGE_H } // namespace body
} // namespace mrntt
#endif // MRNTT_BODY_BODYMESSAGE_H
+17 -11
View File
@@ -1,28 +1,34 @@
#ifndef BODY_LIMB_H #ifndef MRNTT_BODY_LIMB_H
#define BODY_LIMB_H #define MRNTT_BODY_LIMB_H
#include <string> #include <string>
#include <set> #include <set>
#include <cstdint> #include <cstdint>
#include <body/bodyPart.h> #include <body/part.h>
class BodyLimb namespace mrntt {
namespace body {
class Limb
{ {
public: public:
BodyLimb(uint32_t _id) : id(_id) {} Limb(uint32_t _id) : id(_id) {}
BodyLimb(uint32_t _id, Limb(uint32_t _id,
const std::string& _name, const std::string& _desc, const std::string& _name, const std::string& _desc,
const std::string& _loc) const std::string& _loc)
: id(_id), name(_name), description(_desc), location(_loc) : id(_id), name(_name), description(_desc), location(_loc)
{} {}
~BodyLimb() = default; ~Limb() = default;
public: public:
uint32_t id; uint32_t id;
std::string name, description, location; 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
+23
View File
@@ -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> #include <sensors/interoceptor.h>
class BodySpot namespace mrntt {
namespace body {
class Spot
{ {
public: public:
BodySpot(uint32_t _id, std::string _description) Spot(uint32_t _id, std::string _description)
: id(_id), description(_description) : id(_id), description(_description)
{} {}
~BodySpot() = default; ~Spot() = default;
public: public:
uint32_t id; uint32_t id;
@@ -22,21 +25,24 @@ public:
std::set<uint32_t, Interoceptor> interoceptors; std::set<uint32_t, Interoceptor> interoceptors;
}; };
class BodyPart class Part
{ {
public: public:
BodyPart(uint32_t _partId, std::string _partName, Part(uint32_t _partId, std::string _partName,
std::string _partDesc, std::string _partLoc) std::string _partDesc, std::string _partLoc)
: id(_partId), name(_partName), : id(_partId), name(_partName),
description(_partDesc), location(_partLoc) description(_partDesc), location(_partLoc)
{} {}
~BodyPart() = default; ~Part() = default;
public: public:
const uint32_t id; const uint32_t id;
std::string name, description, location; std::string name, description, location;
std::set<uint32_t, BodySpot> spots; std::set<uint32_t, Spot> spots;
}; };
} // namespace body
} // namespace mrntt
#endif // BODYPART_H #endif // BODYPART_H
+14
View File
@@ -0,0 +1,14 @@
#ifndef _MARIONETTE_H
#define _MARIONETTE_H
#include <cstdint>
namespace mrntt {
class Marionette
{
};
} // namespace mrntt
#endif // _MARIONETTE_H
+4
View File
@@ -0,0 +1,4 @@
AM_CPPFLAGS+= -I"$(top_srcdir)/hcore/include"
noinst_LIBRARIES = libmarionette.a
libmarionette_a_SOURCES = marionette.cpp
+9
View File
@@ -0,0 +1,9 @@
namespace mrntt {
int main(int argc, char *argv[])
{
return 0;
}
} // namespace mrntt