Espressif ESP32-S2 Programming Manual page 166

Table of Contents

Advertisement

Chapter 2. API Reference
• ESP_OK
• ESP_FAIL
Parameters
• [in] nwk_duty: network duty cycle
• [in] duration_mins: duration (unit: minutes)
• [in] applied_rule: only support MESH_PS_NETWORK_DUTY_APPLIED_ENTIRE
esp_err_t
esp_mesh_get_network_duty_cycle(int
Get the network duty cycle, duration, type and rule.
Return
• ESP_OK
Parameters
• [out] nwk_duty: current network duty cycle
• [out] duration_mins: the duration of current nwk_duty
• [out] dev_duty_type: if it includes MESH_PS_DEVICE_DUTY_MASTER, this device is
the current NWK-DUTY-MASTER.
• [out] applied_rule: MESH_PS_NETWORK_DUTY_APPLIED_ENTIRE
int esp_mesh_get_running_active_duty_cycle(void)
Get the running active duty cycle.
• The running active duty cycle of the root is 100.
• If duty type is set to MESH_PS_DEVICE_DUTY_REQUEST, the running active duty cycle is nwk_duty
provided by the network.
• If duty type is set to MESH_PS_DEVICE_DUTY_DEMAND, the running active duty cycle is dev_duty
specified by the users.
• In a mesh network, devices are typically working with a certain duty-cycle (transmitting, receiving and
sleep) to reduce the power consumption. The running active duty cycle decides the amount of awake
time within a beacon interval. At each start of beacon interval, all devices wake up, broadcast beacons,
and transmit packets if they do have pending packets for their parents or for their children. Note that
Low-duty-cycle means devices may not be active in most of the time, the latency of data transmission
might be greater.
Return the running active duty cycle
esp_err_t
esp_mesh_ps_duty_signaling(int fwd_times)
Duty signaling.
Return
• ESP_OK
Parameters
• [in] fwd_times: the times of forwarding duty signaling packets
Unions
union mesh_addr_t
#include <esp_mesh.h> Mesh address.
Public Members
uint8_t addr[6]
mac address
mip_t
mip
mip address
union mesh_event_info_t
#include <esp_mesh.h> Mesh event information.
Espressif Systems
*nwk_duty,
*dev_duty_type, int *applied_rule)
155
Submit Document Feedback
int
*duration_mins,
int
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF