📄 zigbeeif.h
字号:
/*
** ============================================================================
**
** FILE
** ZigBeeIf.h
**
** DESCRIPTION
** The CZigBeeIf class header file
**
** CREATED
** I.A.Marsden Integration UK Ltd
**
** COPYRIGHT
** Copyright 2005 Integration Associates Inc. All rights reserved.
**
** LIMITED USE LICENSE. By using this software, the user agrees to the terms of the
** following license. If the user does not agree to these terms,
** then this software should be returned within 30 days and a full
** refund of the purchase price or license fee will provided.
** Integration Associates hereby grants a license to the user on the
** following terms and conditions: The user may use, copy, modify,
** revise, translate, abridge, condense, expand, collect, compile,
** link, recast, distribute, transform or adapt this software solely
** in connection with the development of products incorporating
** integrated circuits sold by Integration Associates. Any other use
** for any other purpose is expressly prohibited with the prior written
** consent of Integration Associates.
**
** Any copy or modification made must satisfy the following conditions:
**
** 1. Both the copyright notice and this permission notice appear in all copies of the software,
** derivative works or modified versions, and any portions thereof, and that both notices
** appear in supporting documentation.
**
** 2. All copies of the software shall contain the following acknowledgement: "Portions of this
** software are used under license from Integration Associates Inc. and are copyrighted."
**
** 3 Neither the name of Integration Associates Inc. nor any of its subsidiaries may be used
** to endorse or promote products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY "AS IS" AND ALL WARRANTIES OF ANY KIND, INCLUDING THE IMPLIED
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR USE, ARE EXPRESSLY DISCLAIMED. THE DEVELOPER
** SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
** THIS SOFTWARE MAY NOT BE USED IN PRODUCTS INTENDED FOR USE IN IMPLANTATION OR OTHER DIRECT
** LIFE SUPPORT APPLICATIONS WHERE MALFUNCTION MAY RESULT IN THE DIRECT PHYSICAL HARM OR INJURY
** TO PERSONS. ALL SUCH IS USE IS EXPRESSLY PROHIBITED.
**
** ============================================================================
*/
#pragma once
#include "ZBDLLApi.h"
/*
** ============================================================================
** Status Codes Returned
** ============================================================================
*/
#define ZBIF_ERROR_DEVICE_ALREADY_CONNECTED 1100
#define ZBIF_ERROR_FUNCTIONS_MISSING 1101
#define ZBIF_ERROR_LOAD_LIBARY 1102
#define ZBIF_ERROR_CREATING_TIMER 1103
#define ZBIF_NO_DEVICE_CONNECTED 1104
/*
** ============================================================================
** CZigBeeIf Class Definition
** ============================================================================
*/
class CZigBeeIf
{
public:
CZigBeeIf();
~CZigBeeIf();
int ZBIFConnect( HWND hWnd );
int ZBIFDisconnect();
int ZBIFSubscribe( UCHAR primitive );
/* ZigBee IF Downlink Messages */
void AF_INDIRECT_request
(
unsigned char SrcEndpoint,
unsigned char ClusterId,
unsigned char afduLength,
unsigned char* afdu,
unsigned char TxOptions,
unsigned char DiscoverRoute,
unsigned char BroadcastRadius,
unsigned char afduHandle
);
void AF_DIRECT_request
(
unsigned short DstShort,
unsigned char DstEndpoint,
unsigned char SrcEndpoint,
unsigned char ClusterId,
unsigned char afduLength,
unsigned char* afdu,
unsigned char TxOptions,
unsigned char DiscoverRoute,
unsigned char BroadcastRadius,
unsigned char afduHandle
);
void ZDO_RESET_request
(
unsigned char type
);
void ZDO_SET_request
(
unsigned char Attribute,
unsigned char AttributeLength,
unsigned char *AttributeValue
);
void ZDO_GET_request
(
unsigned char Attribute
);
void ZDO_START_request
(
void
);
void ZDO_NWK_ADDR_request
(
unsigned char *IEEE_Address,
unsigned char Request_type,
unsigned char Start_Index,
unsigned char TransactionType
);
void ZDO_IEEE_ADDR_request
(
unsigned short Network_Address,
unsigned char Request_type,
unsigned char Start_Index,
unsigned char TransactionType
);
void ZDO_NODE_DESC_request
(
unsigned short Network_Address
);
void ZDO_POWER_DESC_request
(
unsigned short Network_Address
);
void ZDO_SIMPLE_DESC_request
(
unsigned short Network_Address,
unsigned char Endpoint
);
void ZDO_ACTIVE_EP_DESC_request
(
unsigned short Network_Address
);
void ZDO_MATCH_DESC_request
(
unsigned short Network_Address,
unsigned short ProfileId,
unsigned char nic,
unsigned char* iclist,
unsigned char noc,
unsigned char* oclist
);
void ZDO_COMPLEX_DESC_request
(
unsigned short Network_Address
);
void ZDO_USER_DESC_request
(
unsigned short Network_Address
);
void ZDO_DISCOVERY_REGISTER_request
(
unsigned short Network_Address,
unsigned char* IEEE_Address
);
void ZDO_END_DEVICE_ANNCE_request
(
unsigned short Network_Address,
unsigned char* IEEE_Address
);
void ZDO_USER_DESC_SET_request
(
unsigned short NWKAddr,
unsigned char length,
unsigned char* text
);
void ZDO_PERMIT_JOINING_request
(
unsigned short DstShort,
unsigned char Significance,
unsigned char Duration
);
void ZDO_END_DEVICE_BIND_request
(
unsigned short LocalCoordinator,
unsigned char DEP,
unsigned short ProfileID,
unsigned char NumInClusters,
unsigned char* InClusterList,
unsigned char NumOutClusters,
unsigned char* OutClusterList
);
void ZDO_BIND_request
(
unsigned short DstShort,
unsigned char* SrcAddress,
unsigned char SrcEndPoint,
unsigned char ClusterID,
unsigned char* DstAddress,
unsigned char DstEndPoint
);
void ZDO_UNBIND_request
(
unsigned short DstShort,
unsigned char* SrcAddress,
unsigned char SrcEndPoint,
unsigned char ClusterID,
unsigned char* DstAddress,
unsigned char DstEndPoint
);
void ZDO_MGMT_NWK_DISC_request
(
unsigned short DstShort,
unsigned long ScanChannels,
unsigned char ScanDuration,
unsigned char StartIndex
);
void ZDO_MGMT_LQI_request
(
unsigned short DstShort,
unsigned char StartIndex
);
void ZDO_MGMT_RTG_request
(
unsigned short DstShort,
unsigned char StartIndex
);
void ZDO_MGMT_BIND_request
(
unsigned short DstShort,
unsigned char StartIndex
);
void ZDO_MGMT_LEAVE_request
(
unsigned short DstShort,
unsigned char DeviceAddress[8]
);
void ZDO_MGMT_DIRECT_JOIN_request
(
unsigned short DstShort,
unsigned char DeviceAddress[8],
unsigned char MacCapability
);
void ZDO_NLME_PERMIT_JOINING_request
(
unsigned char Duration
);
void ZDO_NLME_SYNC_request
(
unsigned char Track
);
void ZDO_NLME_LEAVE_request
(
unsigned char* Device,
unsigned char RemoveChildren,
unsigned char MacSecurityEnable
);
void ZDO_NLME_NETWORK_DISCOVERY_request
(
unsigned long ScanChannels,
unsigned char ScanDuration
);
ZBTick32Hz_t ZBDLLTick32Hz;
UCHAR callback_table[255]; // The callback table
HWND ptr_Wnd;
protected:
HINSTANCE hinstLib; // Library Handle
// ZBDLL Function pointers
ZBSend_t ZBDLLSend;
ZBPnpEvent_t ZBDLLPnpEvent;
ZBConnect_t ZBDLLConnect;
ZBDisconnect_t ZBDLLDisconnect;
UINT_PTR m_ZBTimer;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -