2024-11-22 13:11:33 +11:00
|
|
|
#ifndef _INTEROCEPTOR_H
|
|
|
|
|
#define _INTEROCEPTOR_H
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
class Interoceptor {
|
|
|
|
|
public:
|
|
|
|
|
Interoceptor(uint32_t _id, uint32_t _value = 0)
|
|
|
|
|
: id(_id), value(_value)
|
|
|
|
|
{}
|
|
|
|
|
~Interoceptor() = default;
|
|
|
|
|
|
|
|
|
|
public:
|
2024-11-22 20:07:42 +11:00
|
|
|
uint32_t id;
|
|
|
|
|
uint64_t value;
|
2024-11-22 13:11:33 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class NeutralInteroceptor
|
|
|
|
|
: public Interoceptor {
|
|
|
|
|
public:
|
|
|
|
|
NeutralInteroceptor(uint32_t _id, uint32_t _value = 0)
|
|
|
|
|
: Interoceptor(_id, _value)
|
|
|
|
|
{}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class IntrinInteroceptor
|
|
|
|
|
: public Interoceptor {
|
|
|
|
|
public:
|
|
|
|
|
static constexpr uint32_t DEFAULT_INDICATION_THRESHOLD = 1;
|
|
|
|
|
static constexpr uint32_t DEFAULT_ALERT_THRESHOLD = 5;
|
|
|
|
|
static constexpr uint32_t DEFAULT_OVERLOAD_THRESHOLD = 9;
|
|
|
|
|
|
|
|
|
|
IntrinInteroceptor(
|
|
|
|
|
uint32_t _id,
|
|
|
|
|
uint32_t _value = 0,
|
|
|
|
|
uint32_t _indicationThreshold = DEFAULT_INDICATION_THRESHOLD,
|
|
|
|
|
uint32_t _alertThreshold = DEFAULT_ALERT_THRESHOLD,
|
|
|
|
|
uint32_t _overloadThreshold = DEFAULT_OVERLOAD_THRESHOLD)
|
|
|
|
|
: Interoceptor(_id, _value),
|
|
|
|
|
indicationThreshold(_indicationThreshold),
|
|
|
|
|
alertThreshold(_alertThreshold),
|
|
|
|
|
overloadThreshold(_overloadThreshold)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
~IntrinInteroceptor() = default;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
uint32_t indicationThreshold;
|
|
|
|
|
uint32_t alertThreshold;
|
|
|
|
|
uint32_t overloadThreshold;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
2025-01-04 13:36:18 -04:00
|
|
|
* Negtrin and Postrin interoceptors are specialized intrinsic interoceptors that, unlike
|
2024-11-22 13:11:33 +11:00
|
|
|
* neutral interoceptors, have activation thresholds for different response levels
|
|
|
|
|
* (indication, alert, and overload). These thresholds allow them to trigger graduated
|
|
|
|
|
* responses based on stimulus intensity.
|
|
|
|
|
*
|
2025-01-04 13:36:18 -04:00
|
|
|
* While neutral interoceptors simply record a binary state or basic value, Negtrin and Postrin Interoceptors
|
|
|
|
|
* can model complex sensory responses with multiple activation levels, similar to biological
|
|
|
|
|
* pain/pleasure responses. Each threshold represents a different level of urgency or intensity in the
|
|
|
|
|
* sensory input.
|
2024-11-22 13:11:33 +11:00
|
|
|
*
|
|
|
|
|
* @see IntrinInteroceptor for the threshold values and implementation details
|
|
|
|
|
*****************************************************************************************/
|
|
|
|
|
|
2025-01-04 13:36:18 -04:00
|
|
|
class NegtrinTeroceptor
|
2024-11-22 13:11:33 +11:00
|
|
|
: public IntrinInteroceptor {
|
|
|
|
|
public:
|
2025-01-04 13:36:18 -04:00
|
|
|
NegtrinTeroceptor(
|
2024-11-22 13:11:33 +11:00
|
|
|
uint32_t _id,
|
|
|
|
|
uint32_t _value = 0,
|
|
|
|
|
uint32_t _indicationThreshold = DEFAULT_INDICATION_THRESHOLD,
|
|
|
|
|
uint32_t _alertThreshold = DEFAULT_ALERT_THRESHOLD,
|
|
|
|
|
uint32_t _overloadThreshold = DEFAULT_OVERLOAD_THRESHOLD)
|
|
|
|
|
: IntrinInteroceptor(_id, _value, _indicationThreshold, _alertThreshold, _overloadThreshold)
|
|
|
|
|
{}
|
|
|
|
|
};
|
|
|
|
|
|
2025-01-04 13:36:18 -04:00
|
|
|
class PostrinTeroceptor
|
2024-11-22 13:11:33 +11:00
|
|
|
: public IntrinInteroceptor {
|
|
|
|
|
public:
|
2025-01-04 13:36:18 -04:00
|
|
|
PostrinTeroceptor(
|
2024-11-22 13:11:33 +11:00
|
|
|
uint32_t _id,
|
|
|
|
|
uint32_t _value = 0,
|
|
|
|
|
uint32_t _indicationThreshold = DEFAULT_INDICATION_THRESHOLD,
|
|
|
|
|
uint32_t _alertThreshold = DEFAULT_ALERT_THRESHOLD,
|
|
|
|
|
uint32_t _overloadThreshold = DEFAULT_OVERLOAD_THRESHOLD)
|
|
|
|
|
: IntrinInteroceptor(_id, _value, _indicationThreshold, _alertThreshold, _overloadThreshold)
|
|
|
|
|
{}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // _INTEROCEPTOR_H
|