File: znp.py

package info (click to toggle)
zigpy-znp 0.13.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,120 kB
  • sloc: python: 14,459; makefile: 6
file content (29 lines) | stat: -rw-r--r-- 983 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import zigpy_znp.types as t


class DiscreteCommand(t.bitmap8):
    ZDOStart = 0x40
    ResetNwk = 0x80


class ZNP(t.CommandsBase, subsystem=t.Subsystem.ZNP):
    BasicCfg = t.CommandDef(
        t.CommandType.SREQ,
        0x00,
        req_schema=(
            t.Param(
                "BasicRspRate",
                t.uint32_t,
                "Rate at which to generate the basic response",
            ),
            t.Param("ChannelList", t.Channels, "CHANLIST NV item"),
            t.Param("PanId", t.NWK, "PANID NV item"),
            t.Param("LogicalType", t.DeviceLogicalType, "LOGICAL_TYPE NV item"),
            t.Param("CmdDisc", DiscreteCommand, "Discrete command bits"),
        ),
        rsp_schema=t.STATUS_SCHEMA,
    )

    # These exist in the codebase but the functions are completely empty
    # ZclCfg = t.CommandDef(t.CommandType.SREQ, 0x10, req_schema=(), rsp_schema=())
    # SeCfg = t.CommandDef(t.CommandType.SREQ, 0x20, req_schema=(), rsp_schema=())