📄 connectivitytest.h
字号:
// *******************************************************************// connectivitytest.h//// Copyright 2006 by Ember Corporation. All rights reserved. *80*// *******************************************************************#include PLATFORM_HEADER //compiler/micro specifics, types#include "stack/include/ember.h"#include "stack/include/error.h"#include "hal/hal.h"#include "app/util/serial/serial.h"#include "stack/include/packet-buffer.h"#include "app/util/scan/scan-utils.h"#include "app/util/network/network-utils.h" // network utilities// *******************************************************************// Ember endpoint and interface configuration// The application profile ID we use. This profile ID is assigned to// Ember Corp. and can only be used during development.#define PROFILE_ID 0xC00F// Numeric index for the first endpoint. Applications can use any// endpoints between 1 and 238.// 0 = ZDO, 239 = SPDO, 240 = EDO, 241-255 reserved// This application uses only one endpoint. This constant makes the code// easier to read.#define ENDPOINT 1// End Ember endpoint and interface configuration// *******************************************************************// *******************************************************************// Application specific constants and globals// Value in milliseconds#define TRANSMIT_INTERVAL 300#define LED_BLINK_INTERVAL 100// **********************************// define the message types// serial ports#define APP_SERIAL 1#define DEBUG_SERIAL 0// End application specific constants and globals// *******************************************************************#define APP_CHANNEL (26)#define APP_PANID (0x1a1a)#define APP_POWER (-1)#define RX_MODE (0) // Receive mode (default)#define TX_MODE (1) // Transmit mode#define TX_LOCATE_RECEIVER_MODE (2) // Transmit mode (receiver search)#define RX_LED BOARDLED1#define TX_LED BOARDLED2#define TEST_PACKET_CLUSTER_ID (0x5) // Test packet ID#define RECEIVER_REQUEST_CLUSTER_ID (0x6) // Locate receiver request#define RECEIVER_RESPONSE_CLUSTER_ID (0x7)// Identify receiver response// *******************************************************************// Ember endpoint and interface configurationint8u emberEndpointCount = 1;EmberEndpointDescription PGM endpointDescription = { PROFILE_ID, 0, };EmberEndpoint emberEndpoints[] = { { ENDPOINT, &endpointDescription },};// End Ember endpoint and interface configuration// *******************************************************************// *******************************************************************// Forward declarationsvoid printHelp(void);void processSerialInput(void);static void applicationTick(void);void forceNetworkJoin(int16u panId, int8u channel);void checkButtonEvents(void);EmberStatus appSendApsUnicastDirect(int16u destNodeId, int8u clusterId, int8u *data, int8u length);EmberStatus appSendApsBroadcast(int8u clusterId, int8u *data, int8u length);//// *******************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -