ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
ModuleHandler::ModulePower Class Reference

#include <module_handler/include/modules/power.hpp>

Inheritance diagram for ModuleHandler::ModulePower:
ModuleHandler::Module

Public Member Functions

 ModulePower ()
 
 ~ModulePower ()
 
void OnReceive (const Esp32Command &cmd)
 
size_t OnRequest (uint8_t *buffer)
 
void EnterSleep ()
 Put the esp32 into a deep sleep state if stated.
 
- Public Member Functions inherited from ModuleHandler::Module
 Module (void)
 Construct a new Module object.
 
 ~Module (void)
 Destroy the Module object.
 
int State (void)
 Get the current state of the module.
 
int Type ()
 Get the message type associated with the module.
 
void Reset (void)
 Resets the module to default state.
 

Additional Inherited Members

- Protected Attributes inherited from ModuleHandler::Module
int state = 0
 
int type = 0
 

Detailed Description

Definition at line 30 of file power.hpp.

Constructor & Destructor Documentation

◆ ModulePower()

ModuleHandler::ModulePower::ModulePower ( )

Definition at line 14 of file power.cpp.

References ModuleHandler::Module::type.

◆ ~ModulePower()

ModuleHandler::ModulePower::~ModulePower ( )

Definition at line 21 of file power.cpp.

Member Function Documentation

◆ EnterSleep()

void ModuleHandler::ModulePower::EnterSleep ( )

Put the esp32 into a deep sleep state if stated.

Wakeup is triggered by an external GPIO pin. Checks if boot_count flag is set internally.

Definition at line 82 of file power.cpp.

◆ OnReceive()

void ModuleHandler::ModulePower::OnReceive ( const Esp32Command &  cmd)
virtual
See also
ModuleHandler::Module.OnReceive

Implements ModuleHandler::Module.

Definition at line 23 of file power.cpp.

◆ OnRequest()

size_t ModuleHandler::ModulePower::OnRequest ( uint8_t *  buffer)
virtual
See also
ModuleHandler::Module.OnRequest

Implements ModuleHandler::Module.

Definition at line 51 of file power.cpp.

References buffer.


The documentation for this class was generated from the following files: