File: __init__.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 (40 lines) | stat: -rw-r--r-- 799 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
30
31
32
33
34
35
36
37
38
39
40
from .af import AF
from .app import APP
from .mac import MAC
from .sys import SYS
from .ubl import UBL
from .zdo import ZDO
from .zgp import ZGP
from .znp import ZNP
from .sapi import SAPI
from .util import UTIL
from .rpc_error import RPCError
from .app_config import AppConfig

ALL_COMMANDS = [
    RPCError,
    AF,
    APP,
    AppConfig,
    MAC,
    SAPI,
    SYS,
    UTIL,
    ZDO,
    ZGP,
    ZNP,
    UBL,
]

COMMANDS_BY_ID = {}

for cmds in ALL_COMMANDS:
    for command in cmds:
        if command.Req is not None:
            COMMANDS_BY_ID[command.Req.header] = command.Req

        if command.Rsp is not None:
            COMMANDS_BY_ID[command.Rsp.header] = command.Rsp

        if command.Callback is not None:
            COMMANDS_BY_ID[command.Callback.header] = command.Callback