Rename hk=>smo

This commit is contained in:
2025-07-22 06:48:04 -04:00
parent 79f3e84ff8
commit d0aa8e2306
26 changed files with 119 additions and 119 deletions
+5 -5
View File
@@ -1,10 +1,10 @@
#include <iostream>
#include <componentThread.h>
namespace hk {
namespace smo {
namespace director {
/* The director is the seat of volition in Harikoff. It receives sensor
/* The director is the seat of volition in Salmanoff. It receives sensor
* events from the body and world, and uses them to direct its implexors
* to implex new menties. It then loads the menties into canvas for simulation
* and correlation with intrins, in order to form new attrimotions and
@@ -13,14 +13,14 @@ namespace director {
ComponentThread director;
}
namespace simulator {
/* The canvas is the simulation engine in Harikoff. It receives menties and
/* The canvas is the simulation engine in Salmanoff. It receives menties and
* simulates them in accordance with the instructions from director. It then
* re-renders them into perception for director to get feedback.
*/
ComponentThread canvas;
}
namespace subconscious {
/* The subconscious is the seat of memory in Harikoff. It receives menties
/* The subconscious is the seat of memory in Salmanoff. It receives menties
* from director and stores them in memory for later recall.
*/
ComponentThread subconscious;
@@ -95,4 +95,4 @@ void ComponentThread::validateThreadIds(void)
}
}
} // namespace hk
} // namespace smo
+2 -2
View File
@@ -8,7 +8,7 @@
#include <opts.h>
#include <deviceManager/deviceManager.h>
namespace hk {
namespace smo {
namespace device {
std::vector<std::shared_ptr<InteroceptorDeviceSpec>>
@@ -34,4 +34,4 @@ const std::string DeviceManager::stringifyDeviceSpecs(void)
}
} // namespace device
} // namespace hk
} // namespace smo
+2 -2
View File
@@ -10,7 +10,7 @@
#include "deviceSpecp.hh"
#include "deviceSpecl.hh"
namespace hk {
namespace smo {
namespace device {
std::string DeviceManager::readDeviceFile(const std::string& filename)
@@ -68,4 +68,4 @@ void DeviceManager::parseAllDeviceSpecs(void)
}
} // namespace device
} // namespace hk
} // namespace smo
+12 -12
View File
@@ -46,9 +46,9 @@ void yyerror(const char *message)
%union {
char* str;
char chr;
hk::device::SenseDeviceSpec* sensorSpec;
hk::device::InteroceptorDeviceSpec* interoceptorSpec;
hk::device::ExtrospectorDeviceSpec* extrospectorSpec;
smo::device::SenseDeviceSpec* sensorSpec;
smo::device::InteroceptorDeviceSpec* interoceptorSpec;
smo::device::ExtrospectorDeviceSpec* extrospectorSpec;
std::vector<std::pair<std::string,std::string>>* paramVector;
std::pair<std::string,std::string>* param;
}
@@ -83,12 +83,12 @@ sensor_spec:
interoceptor_spec:
KEYWORD_SPECTYPE_INTEROSPECTOR PIPE spec_body {
auto spec = std::make_shared<hk::device::InteroceptorDeviceSpec>(
*static_cast<hk::device::InteroceptorDeviceSpec *>($3));
auto spec = std::make_shared<smo::device::InteroceptorDeviceSpec>(
*static_cast<smo::device::InteroceptorDeviceSpec *>($3));
spec->sensorType = $1;
hk::device::DeviceManager::interoceptorDeviceSpecs.push_back(spec);
hk::device::DeviceManager::senseDeviceSpecs.push_back(spec);
smo::device::DeviceManager::interoceptorDeviceSpecs.push_back(spec);
smo::device::DeviceManager::senseDeviceSpecs.push_back(spec);
delete $3;
}
@@ -96,12 +96,12 @@ interoceptor_spec:
extrospector_spec:
KEYWORD_SPECTYPE_EXTROSPECTOR PIPE spec_body {
auto spec = std::make_shared<hk::device::ExtrospectorDeviceSpec>(
*static_cast<hk::device::ExtrospectorDeviceSpec *>($3));
auto spec = std::make_shared<smo::device::ExtrospectorDeviceSpec>(
*static_cast<smo::device::ExtrospectorDeviceSpec *>($3));
spec->sensorType = $1;
hk::device::DeviceManager::extrospectorDeviceSpecs.push_back(spec);
hk::device::DeviceManager::senseDeviceSpecs.push_back(spec);
smo::device::DeviceManager::extrospectorDeviceSpecs.push_back(spec);
smo::device::DeviceManager::senseDeviceSpecs.push_back(spec);
delete $3;
}
@@ -109,7 +109,7 @@ extrospector_spec:
spec_body:
STRING PIPE STRING LPAREN opt_params RPAREN PIPE STRING LPAREN opt_params RPAREN PIPE STRING {
$$ = new hk::device::SenseDeviceSpec();
$$ = new smo::device::SenseDeviceSpec();
$$->sensorType = '\0';
$$->implexor = std::string($1);
$$->api = std::string($3);
+2 -2
View File
@@ -7,7 +7,7 @@
#include <boost/asio.hpp>
#include <stdexcept>
namespace hk {
namespace smo {
class ComponentThread
{
@@ -64,6 +64,6 @@ namespace subconscious {
extern ComponentThread subconscious;
}
} // namespace hk
} // namespace smo
#endif // COMPONENT_THREAD_H
@@ -9,7 +9,7 @@
#include <iostream>
#include <user/senseDeviceSpec.h>
namespace hk {
namespace smo {
namespace device {
class DeviceManager
@@ -43,6 +43,6 @@ public:
};
} // namespace device
} // namespace hk
} // namespace smo
#endif // DEVICEMANAGER_H
+2 -2
View File
@@ -5,7 +5,7 @@
#include <cstdint>
#include <mentalEntity.h>
namespace hk {
namespace smo {
namespace director {
/**
@@ -74,6 +74,6 @@ public:
};
} // namespace director
} // namespace hk
} // namespace smo
#endif // DIRECTOR_COMMANDLIST_H
+2 -2
View File
@@ -4,7 +4,7 @@
#include <config.h>
#include <goal.h>
namespace hk {
namespace smo {
namespace director {
class Director {
@@ -16,6 +16,6 @@ public:
};
} // namespace director
} // namespace hk
} // namespace smo
#endif // DIRECTOR_H
+2 -2
View File
@@ -3,7 +3,7 @@
#include <simulator/scene.h>
namespace hk {
namespace smo {
class Goal
: public simulator::Scene {
@@ -12,6 +12,6 @@ public:
~Goal() = default;
};
} // namespace hk
} // namespace smo
#endif
+2 -2
View File
@@ -1,7 +1,7 @@
#ifndef IMPLIX_H
#define IMPLIX_H
namespace hk {
namespace smo {
namespace implix {
class Implix
@@ -12,6 +12,6 @@ public:
};
} // namespace implix
} // namespace hk
} // namespace smo
#endif // IMPLIX_H
+2 -2
View File
@@ -1,7 +1,7 @@
#ifndef _MENTAL_ENTITY_H
#define _MENTAL_ENTITY_H
namespace hk {
namespace smo {
class MentalEntity
{
@@ -9,6 +9,6 @@ public:
using Id = uint32_t;
};
} // namespace hk
} // namespace smo
#endif
+2 -2
View File
@@ -7,7 +7,7 @@
#include <director/director.h>
#include <simulator/simulator.h>
namespace hk {
namespace smo {
class Mind
{
@@ -23,6 +23,6 @@ public:
simulator::Simulator canvas;
};
} // namespace hk
} // namespace smo
#endif
+9 -9
View File
@@ -8,7 +8,7 @@
#include <functional>
#include <user/senseApiDesc.h>
namespace hk {
namespace smo {
namespace sense_api {
class SenseApiLib
@@ -28,10 +28,10 @@ private:
public:
SenseApiLib(
const std::string& path, void *_dlopen_handle,
HK_GET_SENSE_API_DESC_FN_TYPEDEF *descFn)
SMO_GET_SENSE_API_DESC_FN_TYPEDEF *descFn)
: libraryPath(path),
dlopen_handle(_dlopen_handle, DlCloser()),
HK_GET_SENSE_API_DESC_FN_NAME(descFn)
SMO_GET_SENSE_API_DESC_FN_NAME(descFn)
{}
void setSenseApiDesc(const SenseApiDesc &desc)
@@ -57,16 +57,16 @@ public:
/**
* @brief Every sense API lib is required to provide a function that returns
* a SenseApiDesc struct. This struct states which API the lib uses to
* connect Harikoff to the sense provider it supports.
* connect Salmanoff to the sense provider it supports.
*
* This getter function should be visible to dlsym() so that Harikoff can
* This getter function should be visible to dlsym() so that Salmanoff can
* find it in the lib after loading it, and call it.
*/
std::function<HK_GET_SENSE_API_DESC_FN_TYPEDEF>
HK_GET_SENSE_API_DESC_FN_NAME;
std::function<SMO_GET_SENSE_API_DESC_FN_TYPEDEF>
SMO_GET_SENSE_API_DESC_FN_NAME;
/**
* @brief Harikoff will call the `HK_GET_SENSE_API_DESC_FN_NAME` getter
* @brief Salmanoff will call the `SMO_GET_SENSE_API_DESC_FN_NAME` getter
* function and use the data it provides in order to fill out this
* descriptor.
*/
@@ -80,6 +80,6 @@ public:
};
} // namespace sense_api
} // namespace hk
} // namespace smo
#endif // SENSE_API_PROVIDER_DESC_H
+2 -2
View File
@@ -10,7 +10,7 @@
#include <senseApis/senseApiLib.h>
#include <user/senseDeviceSpec.h>
namespace hk {
namespace smo {
namespace sense_api {
class SenseApiManager
@@ -55,6 +55,6 @@ private:
};
} // namespace sense_api
} // namespace hk
} // namespace smo
#endif // SENSE_API_MANAGER_H
+2 -2
View File
@@ -4,7 +4,7 @@
#include <cstdint>
#include <sensors/sensor.h>
namespace hk {
namespace smo {
namespace sensors {
class Extrospector
@@ -18,6 +18,6 @@ public:
};
} // namespace sensors
} // namespace hk
} // namespace smo
#endif // _EXTROSPECTOR_H
+2 -2
View File
@@ -4,7 +4,7 @@
#include <cstdint>
#include <sensors/sensor.h>
namespace hk {
namespace smo {
namespace sensors {
class Interoceptor
@@ -104,6 +104,6 @@ public:
};
} // namespace sensors
} // namespace hk
} // namespace smo
#endif // _INTEROCEPTOR_H
+2 -2
View File
@@ -3,7 +3,7 @@
#include <cstdint>
namespace hk {
namespace smo {
namespace sensors {
class Sensor
@@ -16,6 +16,6 @@ public:
};
} // namespace sensors
} // namespace hk
} // namespace smo
#endif // _SENSOR_H
+2 -2
View File
@@ -5,7 +5,7 @@
#include <cstdint>
#include <mentalEntity.h>
namespace hk {
namespace smo {
namespace simulator {
/**
@@ -74,6 +74,6 @@ public:
};
} // namespace simulator
} // namespace hk
} // namespace smo
#endif // SIMULATOR_COMMANDLIST_H
+2 -2
View File
@@ -6,7 +6,7 @@
#include <mentalEntity.h>
#include <simulator/commandList.h>
namespace hk {
namespace smo {
namespace simulator {
class Scene
@@ -34,7 +34,7 @@ private:
};
} // namespace simulator
} // namespace hk
} // namespace smo
#endif
+2 -2
View File
@@ -4,7 +4,7 @@
#include <config.h>
#include <simulator/scene.h>
namespace hk {
namespace smo {
namespace simulator {
class Simulator {
@@ -21,6 +21,6 @@ private:
};
} // namespace simulator
} // namespace hk
} // namespace smo
#endif // SIMULATOR_H
+5 -5
View File
@@ -10,7 +10,7 @@
namespace fs = std::filesystem;
namespace hk {
namespace smo {
namespace sense_api {
/**
@@ -92,13 +92,13 @@ SenseApiLib& SenseApiManager::loadSenseApiLib(const std::string& libraryPath)
}
// Initialize getSenseApiDescriptor
auto func = reinterpret_cast<HK_GET_SENSE_API_DESC_FN_TYPEDEF *>(
dlsym(dlopen_handle.get(), HK_GET_SENSE_API_DESC_FN_NAME_STR));
auto func = reinterpret_cast<SMO_GET_SENSE_API_DESC_FN_TYPEDEF *>(
dlsym(dlopen_handle.get(), SMO_GET_SENSE_API_DESC_FN_NAME_STR));
if (!func)
{
throw std::runtime_error(
std::string(__func__) + ": dlsym('"
HK_GET_SENSE_API_DESC_FN_NAME_STR "') failed for library '"
SMO_GET_SENSE_API_DESC_FN_NAME_STR "') failed for library '"
+ libraryPath + "'");
}
@@ -265,4 +265,4 @@ void SenseApiManager::detachAllSenseDevices(void)
}
} // namespace sense_api
} // namespace hk
} // namespace smo