![]() |
|
Uniot Core
|
| 0.8.1 |
#include <unLisp.h>
Public Member Functions | |
| TaskScheduler::TaskPtr | getTask () |
| Get the task associated with Lisp evaluation. | |
| TaskScheduler::TaskPtr | getCleanupTask () |
| bool | isCreated () |
| Check if the Lisp machine has been created. | |
| bool | taskIsRunning () |
| Check if the Lisp evaluation task is currently running. | |
| size_t | memoryUsed () |
| Get the amount of memory used by the Lisp machine. | |
| void | runCode (const Bytes &data) |
| Run Lisp code in the interpreter. | |
| unLisp * | pushPrimitive (Primitive *primitive) |
| Add a new primitive function to the Lisp environment. | |
| void | serializePrimitives (CBORObject &obj) |
| Serialize all registered primitive functions to CBOR format. | |
| const Bytes & | getLastCode () |
| Get the last executed Lisp code. | |
| void | cleanLastCode () |
| Clear the stored last executed code. | |
| virtual void | onEventReceived (unsigned int topic, int msg) override |
| Event handler for received events. | |
Public Member Functions inherited from uniot::EventListener< unsigned int, int, Bytes > | |
| virtual | ~EventListener ()=default |
| Virtual destructor. | |
| virtual type_id | getTypeId () const override |
| Get the type ID of this class for RTTI. | |
| EventListener * | listenToEvent (unsigned int topic) |
| Subscribe to events of a specific topic. | |
| EventListener * | stopListeningToEvent (unsigned int topic) |
| Unsubscribe from events of a specific topic. | |
| bool | isListeningToEvent (unsigned int topic) |
| Check if this listener is subscribed to a specific topic. | |
| virtual | ~EventListener ()=default |
| Virtual destructor. | |
| virtual type_id | getTypeId () const override |
| Get the type ID of this class for RTTI. | |
| EventListener * | listenToEvent (unsigned int topic) |
| Subscribe to events of a specific topic. | |
| EventListener * | stopListeningToEvent (unsigned int topic) |
| Unsubscribe from events of a specific topic. | |
| bool | isListeningToEvent (unsigned int topic) |
| Check if this listener is subscribed to a specific topic. | |
Public Member Functions inherited from uniot::EventEmitter< unsigned int, int, Bytes > | |
| virtual | ~EventEmitter ()=default |
| Virtual destructor to ensure proper cleanup of derived classes. | |
| void | emitEvent (unsigned int topic, int msg) |
| Emits an event to all registered event buses. | |
| virtual | ~EventEmitter ()=default |
| Virtual destructor to ensure proper cleanup of derived classes. | |
| void | emitEvent (unsigned int topic, int msg) |
| Emits an event to all registered event buses. | |
Public Member Functions inherited from uniot::EventEntity< T_topic, T_msg, T_data > | |
| virtual | ~EventEntity () |
| Destructor - disconnects from all connected EventBus instances. | |
| bool | sendDataToChannel (T_topic channel, T_data data) |
| Sends data to a specific channel on all connected EventBus instances. | |
| void | receiveDataFromChannel (T_topic channel, DataChannelCallback callback) |
| Receives data from a specific channel on all connected EventBus instances. | |
Public Member Functions inherited from uniot::Singleton< unLisp > | |
| Singleton (const Singleton &)=delete | |
| Copy constructor is deleted to prevent duplicating the singleton instance. | |
| Singleton & | operator= (const Singleton &)=delete |
| Assignment operator is deleted to prevent duplicating the singleton instance. | |
Friends | |
| class | Singleton< unLisp > |
Additional Inherited Members | |
Public Types inherited from uniot::EventEntity< T_topic, T_msg, T_data > | |
| using | DataChannelCallback = std::function<void(unsigned int, bool, T_data)> |
| Callback type for handling data received from channels. | |
Static Public Member Functions inherited from uniot::Singleton< unLisp > | |
| static unLisp & | getInstance () |
| Gets the singleton instance of the derived class. | |
Protected Member Functions inherited from uniot::EventEntity< T_topic, T_msg, T_data > | |
| bool | connectUnique (EventBus< T_topic, T_msg, T_data > *eventBus) |
| Connects to an EventBus instance if not already connected. | |
Protected Member Functions inherited from uniot::Singleton< unLisp > | |
| Singleton ()=default | |
| Default constructor is protected to prevent instantiation outside of derived classes. | |
| ~Singleton ()=default | |
| Default destructor is protected to prevent deletion through base class pointer. | |
Protected Attributes inherited from uniot::EventEntity< T_topic, T_msg, T_data > | |
| IterableQueue< EventBus< T_topic, T_msg, T_data > * > | mEventBusQueue |
| Queue of EventBus instances this entity is connected to. | |
|
inline |
Clear the stored last executed code.
|
inline |
|
inline |
|
inline |
Get the task associated with Lisp evaluation.
| TaskScheduler::TaskPtr | The task pointer for the Lisp evaluation |
|
inline |
|
inline |
Get the amount of memory used by the Lisp machine.
| memoryUsed | Size in bytes of memory used |
|
inlineoverridevirtual |
Event handler for received events.
This method processes events directed to the Lisp environment, particularly handling incoming events from the application.
| topic | The topic of the received event |
| msg | The specific message type |
Implements uniot::EventListener< unsigned int, int, Bytes >.
|
inline |
|
inline |
|
inline |
Serialize all registered primitive functions to CBOR format.
This allows the runtime to expose information about available primitives to client applications or documentation systems.
| obj | CBOR object to populate with primitive information |
|
inline |
Check if the Lisp evaluation task is currently running.
| true | The task is running (attached) |
| false | The task is not running |