]> sigrok.org Git - libsigrokdecode.git/blob - decoders/dali/lists.py
Add a CFP decoder.
[libsigrokdecode.git] / decoders / dali / lists.py
1 ##
2 ## This file is part of the libsigrokdecode project.
3 ##
4 ## Copyright (C) 2015 Jeremy Swanson <jeremy@rakocontrols.com>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 ##
19
20 # DALI extended commands
21 extended_commands = {
22     0xA1: ['Terminate special processes', 'Terminate'],
23     0xA3: ['DTR = DATA', 'DTR'],
24     0xA5: ['INITIALISE', 'INIT'],
25     0xA7: ['RANDOMISE', 'RAND'],
26     0xA9: ['COMPARE', 'COMP'],
27     0xAB: ['WITHDRAW', 'WDRAW'],
28     0xB1: ['SET SEARCH H', 'SAH'],
29     0xB3: ['SET SEARCH M', 'SAM'],
30     0xB5: ['SET SEARCH L', 'SAL'],
31     0xB7: ['Program Short Address', 'ProgSA'],
32     0xB9: ['Verify Short Address', 'VfySA'],
33     0xBB: ['Query Short Address', 'QryShort'],
34     0xBD: ['Physical Selection', 'PysSel'],
35     0xC1: ['Enable Device Type X', 'EnTyp'],
36     0xC3: ['DTR1 = DATA', 'DTR1'],
37     0xC5: ['DTR2 = DATA', 'DTR2'],
38     0xC7: ['Write Memory Location', 'WRI'],
39 }
40
41 # List of commands
42 dali_commands = {
43     0x00: ['Immediate Off', 'IOFF'],
44     0x01: ['Up 200ms', 'Up'],
45     0x02: ['Down 200ms', 'Down'],
46     0x03: ['Step Up', 'Step+'],
47     0x04: ['Step Down', 'Step-'],
48     0x05: ['Recall Maximum Level', 'Recall Max'],
49     0x06: ['Recall Minimum Level', 'Recall Min'],
50     0x07: ['Step down and off', 'Down Off'],
51     0x08: ['Step ON and UP', 'On Up'],
52     0x20: ['Reset', 'Rst'],
53     0x21: ['Store Dim Level in DTR', 'Level -> DTR'],
54     0x2A: ['Store DTR as Max Level', 'DTR->Max'],
55     0x2B: ['Store DTR as Min Level', 'DTR->Min'],
56     0x2C: ['Store DTR as Fail Level', 'DTR->Fail'],
57     0x2D: ['Store DTR as Power On Level', 'DTR->Poweron'],
58     0x2E: ['Store DTR as Fade Time', 'DTR->Fade'],
59     0x2F: ['Store DTR as Fade Rate', 'DTR->Rate'],
60     0x80: ['Store DTR as Short Address', 'DTR->Add'],
61     0x81: ['Enable Memory Write', 'WEn'],
62     0x90: ['Query Status', 'Status'],
63     0x91: ['Query Ballast', 'Ballast'],
64     0x92: ['Query Lamp Failure', 'LmpFail'],
65     0x93: ['Query Power On', 'Power On'],
66     0x94: ['Query Limit Error', 'Limit Err'],
67     0x95: ['Query Reset', 'Reset State'],
68     0x96: ['Query Missing Short Address', 'NoSrt'],
69     0x97: ['Query Version', 'Ver'],
70     0x98: ['Query DTR', 'GetDTR'],
71     0x99: ['Query Device Type', 'Type'],
72     0x9A: ['Query Physical Minimum', 'PhysMin'],
73     0x9B: ['Query Power Fail', 'PowerFailed'],
74     0x9C: ['Query DTR1', 'GetDTR1'],
75     0x9D: ['Query DTR2', 'GetDTR2'],
76     0xA0: ['Query Level', 'GetLevel'],
77     0xA1: ['Query Max Level', 'GetMax'],
78     0xA2: ['Query Min Level', 'GetMin'],
79     0xA3: ['Query Power On', 'GetPwrOn'],
80     0xA4: ['Query Fail Level', 'GetFail'],
81     0xA5: ['Query Fade Rate', 'GetRate'],
82     0xA6: ['Query Power Fail', 'PwrFail'],
83     0xC0: ['Query Groups 0-7', 'GetGrpsL'],
84     0xC1: ['Query Groups 7-15', 'GetGrpsH'],
85     0xC2: ['Query BRNH', 'BRNH'],
86     0xC3: ['Query BRNM', 'BRNM'],
87     0xC4: ['Query BRNL', 'BRNL'],
88     0xC5: ['Query Memory', 'GetMem'],
89 }
90
91 # DALI device type 8
92 dali_device_type8 = {
93     0xE0: ['Set Temp X-Y Coordinate', 'Set X-Y'],
94     0xE2: ['Activate Colour Set point', 'Activate SetPoint'],
95     0xE7: ['Set Colour Temperature Tc', 'DTRs->ColTemp'],
96     0xF9: ['Query Features', 'QryFeats'],
97     0xFA: ['Query Current Setpoint Colour', 'GetSetPoint'],
98 }