📄 leddim.h
字号:
/******************************** LEDdim.h ********************************
* #######
* ## ##
* # ## #### ##### ##### ## ## #####
* ## ## ## ## ## ## ## ## ##
* ## # ###### ## ## #### ## ## ####
* ## ## ## ## ## ## ##### ##
* ####### #### ## ## ##### ## #####
* #####
* Z-Wave, the wireless language.
*
* Copyright (c) 2001
* Zensys A/S
* Denmark
*
* All Rights Reserved
*
* This source file is subject to the terms and conditions of the
* Zensys Software License Agreement which restricts the manner
* in which it may be used.
*
*---------------------------------------------------------------------------
* Copyright Zensys A/S, 2001
*
* Description: Include file for LEDdimmer module
*
* Author: Johann Sigfredsson
*
* Last Changed By: $Author: psh $
* Revision: $Revision: 1.19 $
* Last Changed: $Date: 2007/03/08 14:17:32 $
*
****************************************************************************/
#ifndef _LEDDIM_H_
#define _LEDDIM_H_
/****************************************************************************/
/* EXPORTED TYPES and DEFINITIONS */
/****************************************************************************/
/* Offsets into frame received */
#define OFFSET_CLASSCMD 0x00
#define OFFSET_CMD 0x01
#define OFFSET_PARAM_1 0x02
#define OFFSET_PARAM_2 0x03
#define OFFSET_PARAM_3 0x04
#define OFFSET_PARAM_4 0x05
/* Size of Report (ALL/LOCK/MULTI/BASIC GET response) frame payload */
#define REPORTSIZE 3
/* Report command definition - ALL/LOCK/MULTI report use the same value ;-) */
#define REPORT_CMD SWITCH_MULTILEVEL_REPORT
/* dimStatus definitions :
bit7: Rollover, DS_ROLLOVER
bit6: up_down, DS_UP_DOWN
bit5: Changing dim, DS_CHANGING_DIM
bit4: on_off, DS_ON_OFF
*/
#define DS_ROLLOVER 7 /* if 1 then on reaching boundary change dim
direction, if 0 then stop dimming */
#define DS_UP_DOWN 6 /* if 1 dim down, if 0 dim up */
#define DS_CHANGING_DIM 5 /* are we dimming ? */
#define DS_ON_OFF 4 /* state of dimmer 1 = on , 0 = off */
#define M_DS_ROLLOVER (1<<DS_ROLLOVER)
#define M_DS_UP_DOWN (1<<DS_UP_DOWN)
#define M_DS_CHANGING_DIM (1<<DS_CHANGING_DIM)
#define M_DS_ON_OFF (1<<DS_ON_OFF)
/* How many classes do we belong to */
#if defined(ZW010x) || defined(ZW020x) || defined(ZW030x)
#define CLASS_MEMBERSHIP_COUNT 6
#else
#define CLASS_MEMBERSHIP_COUNT 5
#endif
typedef struct s_nodeInfo_
{
BYTE memberClass[CLASS_MEMBERSHIP_COUNT]; /* Command class membership */
} t_nodeInfo;
typedef struct s_nodeStatus_ {
BYTE status; /* Dimmer status */
BYTE level; /* Dimmer light level */
} t_nodeStatus;
/****************************************************************************/
/* EXPORTED DATA */
/****************************************************************************/
#endif /* _LEDDIM_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -