• 大小: 7.31MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-26
  • 语言: Java
  • 标签: ESP8266  android  

资源简介

ESP8266 安卓 Android控制端程序,可实现SmartConfig,和开关等操作

资源截图

代码片段和文件信息

package com.espressif.iot.action.device.array;

import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;

import com.espressif.iot.action.device.common.EspActionDevicePostStatusInternet;
import com.espressif.iot.action.device.common.EspActionDevicePostStatusLocal;
import com.espressif.iot.action.device.common.IEspActionDevicePostStatusInternet;
import com.espressif.iot.action.device.common.IEspActionDevicePostStatusLocal;
import com.espressif.iot.command.device.light.EspCommandLightPostStatusInternet;
import com.espressif.iot.command.device.light.EspCommandLightPostStatusLocal;
import com.espressif.iot.command.device.light.IEspCommandLightPostStatusInternet;
import com.espressif.iot.command.device.light.IEspCommandLightPostStatusLocal;
import com.espressif.iot.command.device.plug.EspCommandPlugPostStatusInternet;
import com.espressif.iot.command.device.plug.EspCommandPlugPostStatusLocal;
import com.espressif.iot.command.device.plug.IEspCommandPlugPostStatusInternet;
import com.espressif.iot.command.device.plug.IEspCommandPlugPostStatusLocal;
import com.espressif.iot.device.IEspDevice;
import com.espressif.iot.device.array.IEspDeviceArray;
import com.espressif.iot.type.device.EspDeviceType;
import com.espressif.iot.type.device.IEspDeviceState;
import com.espressif.iot.type.device.IEspDeviceStatus;
import com.espressif.iot.type.device.state.EspDeviceState;
import com.espressif.iot.type.device.status.IEspStatusLight;
import com.espressif.iot.type.device.status.IEspStatusPlug;
import com.espressif.iot.user.builder.BEspUser;

public class EspActionDeviceArrayPostStatus implements IEspActionDeviceArrayPostStatus
{
    private class NetworkGroup
    {
        String rootDeviceKey;
        
        IEspDeviceState state;
        
        StringBuilder bssids;
        
        InetAddress inetAddress;
        
        List postBssidList;
        
        public NetworkGroup()
        {
            state = new EspDeviceState();
            bssids = new StringBuilder();
            postBssidList = new ArrayList();
        }
    }
    
    @Override
    public void doActionDeviceArrayPostStatus(IEspDeviceArray deviceArray IEspDeviceStatus status)
    {
        List devices = deviceArray.getDeviceList();
        List nonMeshDevices = new ArrayList();
        List meshDevices = new ArrayList();
        for (IEspDevice deviceInArray : devices)
        {
            if (deviceInArray.getIsMeshDevice())
            {
                meshDevices.add(deviceInArray);
            }
            else
            {
                nonMeshDevices.add(deviceInArray);
            }
        }
        
        processNonMeshDevices(nonMeshDevices status);
        
        processMeshDevices(meshDevices status);
    }
    
    /**
     * Post status one by one
     * 
     * @param nonMeshDevices
     * @param status
     */
    private void processNonMeshDevices(List

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\
     文件         950  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\.classpath
     文件          30  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\.gitignore
     文件         824  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\.project
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\.settings\
     文件         173  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\.settings\org.eclipse.jdt.core.prefs
     文件        8343  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\AndroidManifest.xml
     文件        2090  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\ESPRESSIF MIT LICENSE V1.LICENSE
     文件        5565  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\README.md
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\assets\
     文件        4574  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\assets\ShareSDK.xml
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\assets\html\
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\assets\html\en_us\
     文件        8067  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\assets\html\en_us\update.html
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\assets\html\zh_cn\
     文件        8072  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\assets\html\zh_cn\update.html
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\documents\
     文件        2973  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\documents\third-party_login.txt
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\action\
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\action\device\
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\action\device\New\
     文件        4914  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\action\device\New\EspActionDeviceNewActivateInternet.java
     文件        3280  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\action\device\New\EspActionDeviceNewConfigureLocal.java
     文件        1356  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\action\device\New\EspActionDeviceNewGetInfoLocal.java
     目录           0  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\action\device\array\
     文件       10347  2016-11-10 08:25  IOT-Espressif-Android-1.2.3\java\ACTION\com\espressif\iot\action\device\array\EspActionDeviceArrayPostStatus.java
............此处省略1169个文件信息

评论

共有 条评论