Uniot Docs
  • Introduction
  • Guides
    • Getting Started
    • Uniot Badge
    • Device Network
  • Foundations
    • Edge Logic Deployment
  • General Concepts
    • Primitives
    • Scripting
  • Platform
    • Dashboard
    • Sandbox
      • Visual Editor
        • Special
        • Logic
        • Math
        • Loops
        • Text
        • Variables
        • Functions
        • Primitives
      • Logger
      • Emulator
      • Control Panel
  • Advanced
    • Uniot Core
      • Scheduler
        • TaskScheduler
        • IExecutor
        • ISchedulerConnectionKit
        • Task
        • SchedulerTask
      • AppKit
        • AppKit
        • LispDevice
        • LispPrimitives
        • TopDevice
      • CBORWrapper
        • CBORObject
        • COSE
        • COSEMessage
        • ICOSESigner
      • Date
        • Date
        • SimpleNTP
      • EventBus
        • EventBus
        • IEventBusConnectionKit
        • DataChannels
        • EventEmitter
        • EventListener
        • EventEntity
        • CallbackEventListener
      • Hardware
        • Button
      • LispWrapper
        • DefaultPrimitives
        • LispHelper
        • PrimitiveExpeditor
        • unLisp
      • MQTTWrapper
        • CallbackMQTTDevice
        • MQTTDevice
        • MQTTKit
        • MQTTPath
      • Network
        • ConfigCaptivePortal
        • NetworkController
        • NetworkScheduler
      • Register
        • GpioRegister
        • ObjectRegister
        • ObjectRegisterRecord
        • Register
        • RegisterManager
        • RegisterManagerProxy
      • Storage
        • CBORStorage
        • CrashStorage
        • Storage
        • WifiStorage
      • Utils
        • Array
        • Bytes
        • ClearQueue
        • IterableQueue
        • LimitedQueue
        • GlobalBufferMemoryManager
        • Map
        • Singleton
        • TypeId
      • Credentials
    • Uniot Lisp
      • Language Description
      • Embedding Instructions
  • API
    • MQTT Convention
Powered by GitBook
On this page
  1. Advanced
  2. Uniot Core
  3. AppKit

TopDevice

PreviousLispPrimitivesNextCBORWrapper

Last updated 4 months ago

The TopDevice class extends the class to handle device-specific debugging functionalities. It subscribes to debug topics, processes top-related and memory-related requests, and publishes relevant diagnostic information using the . This class enables real-time monitoring and debugging of device performance and resource utilization.

Constructor:

  • TopDevice() Constructs a TopDevice instance and initializes member variables.

Methods:

  • virtual void syncSubscriptions() override Subscribes to device-specific debug topics for top and memory requests.

  • void setScheduler(const TaskScheduler& scheduler) Assigns a reference to a TaskScheduler instance for managing scheduled tasks.

  • virtual void handle(const String& topic, const Bytes& payload) override Processes incoming MQTT messages by delegating to specific handlers based on the topic.

  • void handleTop() Gathers and publishes top-related diagnostic information, such as task statuses and uptime.

  • void handleMem() Gathers and publishes memory-related diagnostic information, such as available heap memory.

Private Members:

  • const TaskScheduler* mpScheduler Pointer to the TaskScheduler instance used for managing scheduled tasks.

  • String mTopicTopAsk Stores the MQTT topic string for top-related debug requests.

  • String mTopicMemAsk Stores the MQTT topic string for memory-related debug requests.

MQTTDevice
TaskScheduler