zigbee-herdsman 0.50.1 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/adapter/ember/adapter/emberAdapter.d.ts +23 -441
- package/dist/adapter/ember/adapter/emberAdapter.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/emberAdapter.js +446 -1083
- package/dist/adapter/ember/adapter/emberAdapter.js.map +1 -1
- package/dist/adapter/ember/adapter/oneWaitress.d.ts +5 -4
- package/dist/adapter/ember/adapter/oneWaitress.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/oneWaitress.js +28 -14
- package/dist/adapter/ember/adapter/oneWaitress.js.map +1 -1
- package/dist/adapter/ember/adapter/requestQueue.d.ts +14 -4
- package/dist/adapter/ember/adapter/requestQueue.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/requestQueue.js +55 -35
- package/dist/adapter/ember/adapter/requestQueue.js.map +1 -1
- package/dist/adapter/ember/adapter/tokensManager.d.ts +10 -9
- package/dist/adapter/ember/adapter/tokensManager.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/tokensManager.js +34 -34
- package/dist/adapter/ember/adapter/tokensManager.js.map +1 -1
- package/dist/adapter/ember/consts.d.ts +1 -0
- package/dist/adapter/ember/consts.d.ts.map +1 -1
- package/dist/adapter/ember/consts.js +2 -0
- package/dist/adapter/ember/consts.js.map +1 -1
- package/dist/adapter/ember/enums.d.ts +128 -407
- package/dist/adapter/ember/enums.d.ts.map +1 -1
- package/dist/adapter/ember/enums.js +140 -436
- package/dist/adapter/ember/enums.js.map +1 -1
- package/dist/adapter/ember/ezsp/buffalo.d.ts +13 -2
- package/dist/adapter/ember/ezsp/buffalo.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/buffalo.js +137 -28
- package/dist/adapter/ember/ezsp/buffalo.js.map +1 -1
- package/dist/adapter/ember/ezsp/consts.d.ts +2 -1
- package/dist/adapter/ember/ezsp/consts.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/consts.js +4 -3
- package/dist/adapter/ember/ezsp/consts.js.map +1 -1
- package/dist/adapter/ember/ezsp/enums.d.ts +160 -49
- package/dist/adapter/ember/ezsp/enums.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/enums.js +177 -47
- package/dist/adapter/ember/ezsp/enums.js.map +1 -1
- package/dist/adapter/ember/ezsp/ezsp.d.ts +975 -716
- package/dist/adapter/ember/ezsp/ezsp.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/ezsp.js +2413 -1882
- package/dist/adapter/ember/ezsp/ezsp.js.map +1 -1
- package/dist/adapter/ember/ezspError.d.ts +6 -0
- package/dist/adapter/ember/ezspError.d.ts.map +1 -0
- package/dist/adapter/ember/ezspError.js +13 -0
- package/dist/adapter/ember/ezspError.js.map +1 -0
- package/dist/adapter/ember/types.d.ts +89 -42
- package/dist/adapter/ember/types.d.ts.map +1 -1
- package/dist/adapter/ember/uart/ash.d.ts +11 -7
- package/dist/adapter/ember/uart/ash.d.ts.map +1 -1
- package/dist/adapter/ember/uart/ash.js +15 -17
- package/dist/adapter/ember/uart/ash.js.map +1 -1
- package/dist/adapter/ember/utils/math.d.ts +0 -8
- package/dist/adapter/ember/utils/math.d.ts.map +1 -1
- package/dist/adapter/ember/utils/math.js +1 -20
- package/dist/adapter/ember/utils/math.js.map +1 -1
- package/package.json +1 -1
- package/dist/adapter/ember/zdo.d.ts +0 -925
- package/dist/adapter/ember/zdo.d.ts.map +0 -1
- package/dist/adapter/ember/zdo.js +0 -723
- package/dist/adapter/ember/zdo.js.map +0 -1
|
@@ -1,28 +1,58 @@
|
|
|
1
1
|
import EventEmitter from "events";
|
|
2
2
|
import { SerialPortOptions } from "../../tstype";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import * as Zdo from "../../../zspec/zdo";
|
|
4
|
+
import { EmberOutgoingMessageType, EmberCounterType, EmberDutyCycleState, EmberEntropySource, EmberEventUnits, EmberLibraryId, EmberLibraryStatus, EmberMultiPhyNwkConfig, EmberNetworkStatus, EmberNodeType, EzspNetworkScanType, EzspStatus, SLStatus, EmberIncomingMessageType, EmberSourceRouteDiscoveryMode, EmberMacPassthroughType, EmberKeyStatus, SecManFlag, EmberDeviceUpdate, EmberJoinDecision, EzspZllNetworkOperation, EmberGpSecurityLevel, EmberGpKeyType, EmberTXPowerMode, EmberExtendedSecurityBitmask, EmberStackError, EmberLeaveNetworkOption, EmberGPStatus, EmberTransmitPriority } from "../enums";
|
|
5
|
+
import { EmberVersion, EmberBeaconData, EmberBindingTableEntry, EmberChildData, EmberDutyCycleLimits, EmberMultiPhyRadioParameters, EmberNeighborTableEntry, EmberNetworkInitStruct, EmberNetworkParameters, EmberPerDeviceDutyCycle, EmberRouteTableEntry, EmberApsFrame, EmberMulticastTableEntry, EmberBeaconClassificationParams, EmberInitialSecurityState, EmberCurrentSecurityState, SecManContext, SecManKey, SecManNetworkKeyInfo, SecManAPSKeyMetadata, EmberKeyData, EmberAesMmoHashContext, EmberPublicKeyData, EmberCertificateData, EmberSmacData, EmberPublicKey283k1Data, EmberCertificate283k1Data, EmberMessageDigest, EmberSignatureData, EmberSignature283k1Data, EmberPrivateKeyData, EmberZllNetwork, EmberZllInitialSecurityState, EmberZllDeviceInfoRecord, EmberZllAddressAssignment, EmberTokTypeStackZllData, EmberTokTypeStackZllSecurity, EmberGpAddress, EmberGpProxyTableEntry, EmberGpSinkTableEntry, EmberTokenInfo, EmberTokenData, EmberZigbeeNetwork, EmberEndpointDescription, EmberMultiprotocolPriorities, EmberRxPacketInfo } from "../types";
|
|
5
6
|
import { EmberLeaveReason, EmberRejoinReason, EzspConfigId, EzspEndpointFlag, EzspExtendedValueId, EzspMfgTokenId, EzspPolicyId, EzspValueId } from "./enums";
|
|
6
7
|
import { UartAsh } from "../uart/ash";
|
|
8
|
+
import { EzspBuffalo } from "./buffalo";
|
|
9
|
+
import { EUI64, ExtendedPanId, NodeId, PanId } from "../../../zspec/tstypes";
|
|
7
10
|
export declare enum EzspEvents {
|
|
8
11
|
NCP_NEEDS_RESET_AND_INIT = "NCP_NEEDS_RESET_AND_INIT",
|
|
9
|
-
/** params => status: EmberZdoStatus, sender: EmberNodeId, apsFrame: EmberApsFrame, payload: { cluster-dependent @see zdo.ts } */
|
|
10
12
|
ZDO_RESPONSE = "ZDO_RESPONSE",
|
|
11
|
-
/** params => type: EmberIncomingMessageType, apsFrame: EmberApsFrame, lastHopLqi: number, sender: EmberNodeId, messageContents: Buffer */
|
|
12
13
|
INCOMING_MESSAGE = "INCOMING_MESSAGE",
|
|
13
|
-
/** params => sourcePanId: EmberPanId, sourceAddress: EmberEUI64, groupId: number | null, lastHopLqi: number, messageContents: Buffer */
|
|
14
14
|
TOUCHLINK_MESSAGE = "TOUCHLINK_MESSAGE",
|
|
15
|
-
/** params => sender: EmberNodeId, apsFrame: EmberApsFrame, payload: EndDeviceAnnouncePayload */
|
|
16
|
-
END_DEVICE_ANNOUNCE = "END_DEVICE_ANNOUNCE",
|
|
17
|
-
/** params => status: EmberStatus */
|
|
18
15
|
STACK_STATUS = "STACK_STATUS",
|
|
19
|
-
/** params => newNodeId: EmberNodeId, newNodeEui64: EmberEUI64, status: EmberDeviceUpdate, policyDecision: EmberJoinDecision, parentOfNewNodeId: EmberNodeId */
|
|
20
16
|
TRUST_CENTER_JOIN = "TRUST_CENTER_JOIN",
|
|
21
|
-
/** params => type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, messageTag: number, status: EmberStatus */
|
|
22
17
|
MESSAGE_SENT = "MESSAGE_SENT",
|
|
23
|
-
/** params => sequenceNumber: number, commandIdentifier: number, sourceId: number, frameCounter: number, gpdCommandId: number, gpdCommandPayload: Buffer, gpdLink: number */
|
|
24
18
|
GREENPOWER_MESSAGE = "GREENPOWER_MESSAGE"
|
|
25
19
|
}
|
|
20
|
+
interface EzspEventMap {
|
|
21
|
+
[EzspEvents.NCP_NEEDS_RESET_AND_INIT]: [status: EzspStatus];
|
|
22
|
+
[EzspEvents.ZDO_RESPONSE]: [apsFrame: EmberApsFrame, sender: NodeId, messageContents: Buffer];
|
|
23
|
+
[EzspEvents.INCOMING_MESSAGE]: [
|
|
24
|
+
type: EmberIncomingMessageType,
|
|
25
|
+
apsFrame: EmberApsFrame,
|
|
26
|
+
lastHopLqi: number,
|
|
27
|
+
sender: NodeId,
|
|
28
|
+
messageContents: Buffer
|
|
29
|
+
];
|
|
30
|
+
[EzspEvents.TOUCHLINK_MESSAGE]: [sourcePanId: PanId, sourceAddress: EUI64, groupId: number | null, lastHopLqi: number, messageContents: Buffer];
|
|
31
|
+
[EzspEvents.STACK_STATUS]: [status: SLStatus];
|
|
32
|
+
[EzspEvents.TRUST_CENTER_JOIN]: [
|
|
33
|
+
newNodeId: NodeId,
|
|
34
|
+
newNodeEui64: EUI64,
|
|
35
|
+
status: EmberDeviceUpdate,
|
|
36
|
+
policyDecision: EmberJoinDecision,
|
|
37
|
+
parentOfNewNodeId: NodeId
|
|
38
|
+
];
|
|
39
|
+
[EzspEvents.MESSAGE_SENT]: [
|
|
40
|
+
status: SLStatus,
|
|
41
|
+
type: EmberOutgoingMessageType,
|
|
42
|
+
indexOrDestination: number,
|
|
43
|
+
apsFrame: EmberApsFrame,
|
|
44
|
+
messageTag: number
|
|
45
|
+
];
|
|
46
|
+
[EzspEvents.GREENPOWER_MESSAGE]: [
|
|
47
|
+
sequenceNumber: number,
|
|
48
|
+
commandIdentifier: number,
|
|
49
|
+
sourceId: number,
|
|
50
|
+
frameCounter: number,
|
|
51
|
+
gpdCommandId: number,
|
|
52
|
+
gpdCommandPayload: Buffer,
|
|
53
|
+
gpdLink: number
|
|
54
|
+
];
|
|
55
|
+
}
|
|
26
56
|
/**
|
|
27
57
|
* Host EZSP layer.
|
|
28
58
|
*
|
|
@@ -33,10 +63,9 @@ export declare enum EzspEvents {
|
|
|
33
63
|
* Callers are expected to handle errors appropriately.
|
|
34
64
|
* - They will throw `EzspStatus` if `sendCommand` fails or the returned value(s) by NCP are invalid (wrong length, etc).
|
|
35
65
|
* - Most will return `EmberStatus` given by NCP (some `EzspStatus`, some `SLStatus`...).
|
|
36
|
-
*
|
|
37
|
-
* @event 'NCP_NEEDS_RESET_AND_INIT(EzspStatus)' An error was detected that requires resetting the NCP.
|
|
38
66
|
*/
|
|
39
|
-
export declare class Ezsp extends EventEmitter {
|
|
67
|
+
export declare class Ezsp extends EventEmitter<EzspEventMap> {
|
|
68
|
+
private version;
|
|
40
69
|
private readonly tickInterval;
|
|
41
70
|
readonly ash: UartAsh;
|
|
42
71
|
private readonly buffalo;
|
|
@@ -44,6 +73,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
44
73
|
private readonly frameContents;
|
|
45
74
|
/** The total Length of the incoming frame */
|
|
46
75
|
private frameLength;
|
|
76
|
+
private readonly callbackBuffalo;
|
|
77
|
+
/** The contents of the current EZSP frame. CAREFUL using this guy, it's pre-allocated. */
|
|
78
|
+
private readonly callbackFrameContents;
|
|
79
|
+
/** The total Length of the incoming frame */
|
|
80
|
+
private callbackFrameLength;
|
|
47
81
|
private initialVersionSent;
|
|
48
82
|
/** True if a command is in the process of being sent. */
|
|
49
83
|
private sendingCommand;
|
|
@@ -51,15 +85,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
51
85
|
private frameSequence;
|
|
52
86
|
/** Sequence used for EZSP send() tagging. static uint8_t */
|
|
53
87
|
private sendSequence;
|
|
54
|
-
/**
|
|
55
|
-
private waitingForResponse;
|
|
56
|
-
/** Awaiting response resolve/timer struct. If waitingForResponse is not true, this should not be used. */
|
|
88
|
+
/** Awaiting response resolve/timer struct. Null if not waiting for response. */
|
|
57
89
|
private responseWaiter;
|
|
58
90
|
/** Counter for Queue Full errors */
|
|
59
91
|
counterErrQueueFull: number;
|
|
60
|
-
|
|
61
|
-
private tickHandle;
|
|
62
|
-
constructor(tickInterval: number, options: SerialPortOptions);
|
|
92
|
+
constructor(options: SerialPortOptions);
|
|
63
93
|
/**
|
|
64
94
|
* Returns the number of EZSP responses that have been received by the serial
|
|
65
95
|
* protocol and are ready to be collected by the EZSP layer via
|
|
@@ -70,6 +100,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
70
100
|
* Create a string representation of the last frame in storage (sent or received).
|
|
71
101
|
*/
|
|
72
102
|
get frameToString(): string;
|
|
103
|
+
/**
|
|
104
|
+
* Create a string representation of the last callback frame in storage (received only).
|
|
105
|
+
*/
|
|
106
|
+
get callbackFrameToString(): string;
|
|
73
107
|
private initVariables;
|
|
74
108
|
start(): Promise<EzspStatus>;
|
|
75
109
|
/**
|
|
@@ -77,6 +111,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
77
111
|
* After this function has been called, init() must be called to resume communication with the NCP.
|
|
78
112
|
*/
|
|
79
113
|
stop(): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Must be called immediately after `ezspVersion` to sync the Host protocol version.
|
|
116
|
+
* @param version Version for the Host to use.
|
|
117
|
+
*/
|
|
118
|
+
setProtocolVersion(version: number): void;
|
|
80
119
|
/**
|
|
81
120
|
* Check if connected.
|
|
82
121
|
* If not, attempt to restore the connection.
|
|
@@ -84,7 +123,13 @@ export declare class Ezsp extends EventEmitter {
|
|
|
84
123
|
* @returns
|
|
85
124
|
*/
|
|
86
125
|
checkConnection(): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Triggered by @see AshEvents.FATAL_ERROR
|
|
128
|
+
*/
|
|
87
129
|
private onAshFatalError;
|
|
130
|
+
/**
|
|
131
|
+
* Triggered by @see AshEvents.FRAME
|
|
132
|
+
*/
|
|
88
133
|
private onAshFrame;
|
|
89
134
|
/**
|
|
90
135
|
* Event from the EZSP layer indicating that the transaction with the NCP could not be completed due to a
|
|
@@ -94,10 +139,6 @@ export declare class Ezsp extends EventEmitter {
|
|
|
94
139
|
* @param status
|
|
95
140
|
*/
|
|
96
141
|
ezspErrorHandler(status: EzspStatus): void;
|
|
97
|
-
/**
|
|
98
|
-
* The Host application must call this function periodically to allow the EZSP layer to handle asynchronous events.
|
|
99
|
-
*/
|
|
100
|
-
private tick;
|
|
101
142
|
private nextFrameSequence;
|
|
102
143
|
private startCommand;
|
|
103
144
|
/**
|
|
@@ -128,18 +169,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
128
169
|
*/
|
|
129
170
|
private sendCommand;
|
|
130
171
|
/**
|
|
131
|
-
*
|
|
132
|
-
* If any, the response payload is stored in frameContents/frameLength.
|
|
133
|
-
* Any other return value means that an error has been detected by the serial protocol layer.
|
|
134
|
-
* @returns NO_RX_DATA if no new response has been received.
|
|
135
|
-
* @returns SUCCESS if a new response has been received.
|
|
136
|
-
*/
|
|
137
|
-
checkResponseReceived(): EzspStatus;
|
|
138
|
-
/**
|
|
139
|
-
* Check if a response was received and sets the stage for parsing if valid (indexes buffalo to params index).
|
|
172
|
+
* Sets the stage for parsing if valid (indexes buffalo to params index).
|
|
140
173
|
* @returns
|
|
141
174
|
*/
|
|
142
|
-
|
|
175
|
+
validateReceivedFrame(buffalo: EzspBuffalo): EzspStatus;
|
|
143
176
|
/**
|
|
144
177
|
* Dispatches callback frames handlers.
|
|
145
178
|
*/
|
|
@@ -155,7 +188,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
155
188
|
* Alias types expect `alias` & `sequence` params, along with `apsFrame.radius`.
|
|
156
189
|
*
|
|
157
190
|
* @param type Specifies the outgoing message type.
|
|
158
|
-
* @param indexOrDestination uint16_t Depending on the type of addressing used, this is either the
|
|
191
|
+
* @param indexOrDestination uint16_t Depending on the type of addressing used, this is either the NodeId of the destination,
|
|
159
192
|
* an index into the address table, or an index into the binding table.
|
|
160
193
|
* Unused for multicast types.
|
|
161
194
|
* This must be one of the three ZigBee broadcast addresses for broadcast.
|
|
@@ -163,18 +196,18 @@ export declare class Ezsp extends EventEmitter {
|
|
|
163
196
|
* @param message uint8_t * Content of the message.
|
|
164
197
|
* @param alias The alias source address
|
|
165
198
|
* @param sequence uint8_t The alias sequence number
|
|
166
|
-
* @returns Result of the ezspSend${x} call or EmberStatus.
|
|
199
|
+
* @returns Result of the ezspSend${x} call or EmberStatus.INVALID_PARAMETER if type not supported.
|
|
167
200
|
* @returns apsSequence as returned by ezspSend${x} command
|
|
168
201
|
* @returns messageTag Tag used for ezspSend${x} command
|
|
169
202
|
*/
|
|
170
|
-
send(type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, message: Buffer, alias:
|
|
203
|
+
send(type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, message: Buffer, alias: NodeId, sequence: number): Promise<[SLStatus, messageTag: number]>;
|
|
171
204
|
/**
|
|
172
205
|
* Retrieving the new version info.
|
|
173
206
|
* Wrapper for `ezspGetValue`.
|
|
174
207
|
* @returns Send status
|
|
175
208
|
* @returns EmberVersion*, null if status not SUCCESS.
|
|
176
209
|
*/
|
|
177
|
-
ezspGetVersionStruct(): Promise<[
|
|
210
|
+
ezspGetVersionStruct(): Promise<[SLStatus, version: EmberVersion]>;
|
|
178
211
|
/**
|
|
179
212
|
* Function for manipulating the endpoints flags on the NCP.
|
|
180
213
|
* Wrapper for `ezspGetExtendedValue`
|
|
@@ -182,7 +215,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
182
215
|
* @param flags EzspEndpointFlags
|
|
183
216
|
* @returns EzspStatus
|
|
184
217
|
*/
|
|
185
|
-
ezspSetEndpointFlags(endpoint: number, flags: EzspEndpointFlag): Promise<
|
|
218
|
+
ezspSetEndpointFlags(endpoint: number, flags: EzspEndpointFlag): Promise<SLStatus>;
|
|
186
219
|
/**
|
|
187
220
|
* Function for manipulating the endpoints flags on the NCP.
|
|
188
221
|
* Wrapper for `ezspGetExtendedValue`.
|
|
@@ -190,49 +223,49 @@ export declare class Ezsp extends EventEmitter {
|
|
|
190
223
|
* @returns EzspStatus
|
|
191
224
|
* @returns flags
|
|
192
225
|
*/
|
|
193
|
-
ezspGetEndpointFlags(endpoint: number): Promise<[
|
|
226
|
+
ezspGetEndpointFlags(endpoint: number): Promise<[SLStatus, flags: EzspEndpointFlag]>;
|
|
194
227
|
/**
|
|
195
228
|
* Wrapper for `ezspGetExtendedValue`.
|
|
196
|
-
* @param
|
|
229
|
+
* @param NodeId
|
|
197
230
|
* @param destination
|
|
198
231
|
* @returns EzspStatus
|
|
199
232
|
* @returns overhead uint8_t
|
|
200
233
|
*/
|
|
201
|
-
ezspGetSourceRouteOverhead(destination:
|
|
234
|
+
ezspGetSourceRouteOverhead(destination: NodeId): Promise<[SLStatus, overhead: number]>;
|
|
202
235
|
/**
|
|
203
236
|
* Wrapper for `ezspGetExtendedValue`.
|
|
204
237
|
* @returns EzspStatus
|
|
205
238
|
* @returns reason
|
|
206
|
-
* @returns nodeId
|
|
239
|
+
* @returns nodeId NodeId*
|
|
207
240
|
*/
|
|
208
|
-
ezspGetLastLeaveReason(): Promise<[
|
|
241
|
+
ezspGetLastLeaveReason(): Promise<[SLStatus, reason: EmberLeaveReason, nodeId: NodeId]>;
|
|
209
242
|
/**
|
|
210
243
|
* Wrapper for `ezspGetValue`.
|
|
211
244
|
* @returns EzspStatus
|
|
212
245
|
* @returns reason
|
|
213
246
|
*/
|
|
214
|
-
ezspGetLastRejoinReason(): Promise<[
|
|
247
|
+
ezspGetLastRejoinReason(): Promise<[SLStatus, reason: EmberRejoinReason]>;
|
|
215
248
|
/**
|
|
216
249
|
* Wrapper for `ezspSetValue`.
|
|
217
250
|
* @param mask
|
|
218
251
|
* @returns
|
|
219
252
|
*/
|
|
220
|
-
ezspSetExtendedSecurityBitmask(mask: EmberExtendedSecurityBitmask): Promise<
|
|
253
|
+
ezspSetExtendedSecurityBitmask(mask: EmberExtendedSecurityBitmask): Promise<SLStatus>;
|
|
221
254
|
/**
|
|
222
255
|
* Wrapper for `ezspGetValue`.
|
|
223
256
|
* @returns
|
|
224
257
|
*/
|
|
225
|
-
ezspGetExtendedSecurityBitmask(): Promise<[
|
|
258
|
+
ezspGetExtendedSecurityBitmask(): Promise<[SLStatus, mask: EmberExtendedSecurityBitmask]>;
|
|
226
259
|
/**
|
|
227
260
|
* Wrapper for `ezspSetValue`.
|
|
228
261
|
* @returns
|
|
229
262
|
*/
|
|
230
|
-
ezspStartWritingStackTokens(): Promise<
|
|
263
|
+
ezspStartWritingStackTokens(): Promise<SLStatus>;
|
|
231
264
|
/**
|
|
232
265
|
* Wrapper for `ezspSetValue`.
|
|
233
266
|
* @returns
|
|
234
267
|
*/
|
|
235
|
-
ezspStopWritingStackTokens(): Promise<
|
|
268
|
+
ezspStopWritingStackTokens(): Promise<SLStatus>;
|
|
236
269
|
/**
|
|
237
270
|
* The command allows the Host to specify the desired EZSP version and must be
|
|
238
271
|
* sent before any other command. The response provides information about the
|
|
@@ -240,10 +273,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
240
273
|
*
|
|
241
274
|
* @param desiredProtocolVersion uint8_t The EZSP version the Host wishes to use.
|
|
242
275
|
* To successfully set the version and allow other commands, this must be same as EZSP_PROTOCOL_VERSION.
|
|
243
|
-
* @
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* - uint16_t * The version number of the stack.
|
|
276
|
+
* @returns uint8_t The EZSP version the NCP is using.
|
|
277
|
+
* @returns uint8_t * The type of stack running on the NCP (2).
|
|
278
|
+
* @returns uint16_t * The version number of the stack.
|
|
247
279
|
*/
|
|
248
280
|
ezspVersion(desiredProtocolVersion: number): Promise<[protocolVersion: number, stackType: number, stackVersion: number]>;
|
|
249
281
|
/**
|
|
@@ -251,11 +283,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
251
283
|
*
|
|
252
284
|
* @param configId Identifies which configuration value to read.
|
|
253
285
|
* @returns
|
|
254
|
-
* -
|
|
255
|
-
* -
|
|
256
|
-
*
|
|
286
|
+
* - SLStatus.OK if the value was read successfully,
|
|
287
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR (for SL_ZIGBEE_EZSP_ERROR_INVALID_ID) if the NCP does not recognize configId.
|
|
288
|
+
* @returns uint16_t * The configuration value.
|
|
257
289
|
*/
|
|
258
|
-
ezspGetConfigurationValue(configId: EzspConfigId): Promise<[
|
|
290
|
+
ezspGetConfigurationValue(configId: EzspConfigId): Promise<[SLStatus, value: number]>;
|
|
259
291
|
/**
|
|
260
292
|
* Writes a configuration value to the NCP. Configuration values can be modified
|
|
261
293
|
* by the Host after the NCP has reset. Once the status of the stack changes to
|
|
@@ -265,13 +297,13 @@ export declare class Ezsp extends EventEmitter {
|
|
|
265
297
|
* @param configId Identifies which configuration value to change.
|
|
266
298
|
* @param value uint16_t The new configuration value.
|
|
267
299
|
* @returns EzspStatus
|
|
268
|
-
* -
|
|
269
|
-
* -
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
300
|
+
* - SLStatus.OK if the configuration value was changed,
|
|
301
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the new value exceeded the available memory,
|
|
302
|
+
* if the new value was out of bounds,
|
|
303
|
+
* if the NCP does not recognize configId,
|
|
304
|
+
* if configuration values can no longer be modified.
|
|
273
305
|
*/
|
|
274
|
-
ezspSetConfigurationValue(configId: EzspConfigId, value: number): Promise<
|
|
306
|
+
ezspSetConfigurationValue(configId: EzspConfigId, value: number): Promise<SLStatus>;
|
|
275
307
|
/**
|
|
276
308
|
* Read attribute data on NCP endpoints.
|
|
277
309
|
* @param endpoint uint8_t Endpoint
|
|
@@ -279,13 +311,12 @@ export declare class Ezsp extends EventEmitter {
|
|
|
279
311
|
* @param attributeId uint16_t Attribute ID.
|
|
280
312
|
* @param mask uint8_t Mask.
|
|
281
313
|
* @param manufacturerCode uint16_t Manufacturer code.
|
|
282
|
-
* @returns
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* - uint8_t * Attribute data.
|
|
314
|
+
* @returns An sl_zigbee_af_status_t value indicating success or the reason for failure, handled by the EZSP layer as a uint8_t.
|
|
315
|
+
* @returns uint8_t * Attribute data type.
|
|
316
|
+
* @returns uint8_t * Length of attribute data.
|
|
317
|
+
* @returns uint8_t * Attribute data.
|
|
287
318
|
*/
|
|
288
|
-
ezspReadAttribute(endpoint: number, cluster: number, attributeId: number, mask: number, manufacturerCode: number, readLength: number): Promise<[
|
|
319
|
+
ezspReadAttribute(endpoint: number, cluster: number, attributeId: number, mask: number, manufacturerCode: number, readLength: number): Promise<[SLStatus, dataType: number, outReadLength: number, data: number[]]>;
|
|
289
320
|
/**
|
|
290
321
|
* Write attribute data on NCP endpoints.
|
|
291
322
|
* @param endpoint uint8_t Endpoint
|
|
@@ -297,9 +328,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
297
328
|
* @param justTest Override read only and data type.
|
|
298
329
|
* @param dataType uint8_t Attribute data type.
|
|
299
330
|
* @param data uint8_t * Attribute data.
|
|
300
|
-
* @returns
|
|
331
|
+
* @returns An sl_zigbee_af_status_t value indicating success or the reason for failure.
|
|
301
332
|
*/
|
|
302
|
-
ezspWriteAttribute(endpoint: number, cluster: number, attributeId: number, mask: number, manufacturerCode: number, overrideReadOnlyAndDataType: boolean, justTest: boolean, dataType: number, data: Buffer): Promise<
|
|
333
|
+
ezspWriteAttribute(endpoint: number, cluster: number, attributeId: number, mask: number, manufacturerCode: number, overrideReadOnlyAndDataType: boolean, justTest: boolean, dataType: number, data: Buffer): Promise<SLStatus>;
|
|
303
334
|
/**
|
|
304
335
|
* Configures endpoint information on the NCP. The NCP does not remember these
|
|
305
336
|
* settings after a reset. Endpoints can be added by the Host after the NCP has
|
|
@@ -311,98 +342,126 @@ export declare class Ezsp extends EventEmitter {
|
|
|
311
342
|
* @param deviceVersion uint8_t The endpoint's device version.
|
|
312
343
|
* @param inputClusterList uint16_t * Input cluster IDs the endpoint will accept.
|
|
313
344
|
* @param outputClusterList uint16_t * Output cluster IDs the endpoint may send.
|
|
314
|
-
* @returns
|
|
315
|
-
* -
|
|
316
|
-
* -
|
|
317
|
-
*
|
|
318
|
-
*
|
|
345
|
+
* @returns
|
|
346
|
+
* - SLStatus.OK if the endpoint was added,
|
|
347
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if there is not enough memory available to add the endpoint,
|
|
348
|
+
* if the endpoint already exists,
|
|
349
|
+
* if endpoints can no longer be added.
|
|
319
350
|
*/
|
|
320
|
-
ezspAddEndpoint(endpoint: number, profileId: number, deviceId: number, deviceVersion: number, inputClusterList: number[], outputClusterList: number[]): Promise<
|
|
351
|
+
ezspAddEndpoint(endpoint: number, profileId: number, deviceId: number, deviceVersion: number, inputClusterList: number[], outputClusterList: number[]): Promise<SLStatus>;
|
|
321
352
|
/**
|
|
322
353
|
* Allows the Host to change the policies used by the NCP to make fast
|
|
323
354
|
* decisions.
|
|
324
355
|
* @param policyId Identifies which policy to modify.
|
|
325
356
|
* @param decisionId The new decision for the specified policy.
|
|
326
357
|
* @returns
|
|
327
|
-
* -
|
|
328
|
-
* -
|
|
358
|
+
* - SLStatus.OK if the policy was changed,
|
|
359
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize policyId.
|
|
329
360
|
*/
|
|
330
|
-
ezspSetPolicy(policyId: EzspPolicyId, decisionId: number): Promise<
|
|
361
|
+
ezspSetPolicy(policyId: EzspPolicyId, decisionId: number): Promise<SLStatus>;
|
|
331
362
|
/**
|
|
332
363
|
* Allows the Host to read the policies used by the NCP to make fast decisions.
|
|
333
364
|
* @param policyId Identifies which policy to read.
|
|
334
365
|
* @returns
|
|
335
|
-
* -
|
|
336
|
-
* -
|
|
337
|
-
*
|
|
366
|
+
* - SLStatus.OK if the policy was read successfully,
|
|
367
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize policyId.
|
|
368
|
+
* @returns EzspDecisionId * The current decision for the specified policy.
|
|
338
369
|
*/
|
|
339
|
-
ezspGetPolicy(policyId: EzspPolicyId): Promise<[
|
|
370
|
+
ezspGetPolicy(policyId: EzspPolicyId): Promise<[SLStatus, number]>;
|
|
340
371
|
/**
|
|
341
372
|
* Triggers a pan id update message.
|
|
342
373
|
* @param The new Pan Id
|
|
343
374
|
* @returns true if the request was successfully handed to the stack, false otherwise
|
|
344
375
|
*/
|
|
345
|
-
ezspSendPanIdUpdate(newPan:
|
|
376
|
+
ezspSendPanIdUpdate(newPan: PanId): Promise<boolean>;
|
|
346
377
|
/**
|
|
347
378
|
* Reads a value from the NCP.
|
|
348
379
|
* @param valueId Identifies which value to read.
|
|
349
380
|
* @returns
|
|
350
|
-
* -
|
|
351
|
-
* -
|
|
352
|
-
*
|
|
353
|
-
*
|
|
381
|
+
* - SLStatus.OK if the value was read successfully,
|
|
382
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize valueId,
|
|
383
|
+
* if the length of the returned value exceeds the size of local storage allocated to receive it.
|
|
384
|
+
* @returns uint8_t * Both a command and response parameter.
|
|
354
385
|
* On command, the maximum in bytes of local storage allocated to receive the returned value.
|
|
355
386
|
* On response, the actual length in bytes of the returned value.
|
|
356
|
-
*
|
|
387
|
+
* @returns uint8_t * The value.
|
|
357
388
|
*/
|
|
358
|
-
ezspGetValue(valueId: EzspValueId, valueLength: number): Promise<[
|
|
389
|
+
ezspGetValue(valueId: EzspValueId, valueLength: number): Promise<[SLStatus, outValueLength: number, outValue: number[]]>;
|
|
359
390
|
/**
|
|
360
391
|
* Reads a value from the NCP but passes an extra argument specific to the value
|
|
361
392
|
* being retrieved.
|
|
362
393
|
* @param valueId Identifies which extended value ID to read.
|
|
363
394
|
* @param characteristics uint32_t Identifies which characteristics of the extended value ID to read. These are specific to the value being read.
|
|
364
395
|
* @returns
|
|
365
|
-
* -
|
|
366
|
-
* -
|
|
367
|
-
*
|
|
368
|
-
*
|
|
396
|
+
* - SLStatus.OK if the value was read successfully,
|
|
397
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize valueId,
|
|
398
|
+
* if the length of the returned value exceeds the size of local storage allocated to receive it.
|
|
399
|
+
* @returns uint8_t * Both a command and response parameter.
|
|
369
400
|
* On command, the maximum in bytes of local storage allocated to receive the returned value.
|
|
370
401
|
* On response, the actual length in bytes of the returned value.
|
|
371
|
-
*
|
|
402
|
+
* @returns uint8_t * The value.
|
|
372
403
|
*/
|
|
373
|
-
ezspGetExtendedValue(valueId: EzspExtendedValueId, characteristics: number, valueLength: number): Promise<[
|
|
404
|
+
ezspGetExtendedValue(valueId: EzspExtendedValueId, characteristics: number, valueLength: number): Promise<[SLStatus, outValueLength: number, outValue: number[]]>;
|
|
374
405
|
/**
|
|
375
406
|
* Writes a value to the NCP.
|
|
376
407
|
* @param valueId Identifies which value to change.
|
|
377
408
|
* @param valueLength uint8_t The length of the value parameter in bytes.
|
|
378
409
|
* @param value uint8_t * The new value.
|
|
379
|
-
* @returns
|
|
380
|
-
* -
|
|
381
|
-
* -
|
|
382
|
-
*
|
|
383
|
-
*
|
|
410
|
+
* @returns
|
|
411
|
+
* - SLStatus.OK if the value was changed,
|
|
412
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the new value was out of bounds,
|
|
413
|
+
* if the NCP does not recognize valueId,
|
|
414
|
+
* if the value could not be modified.
|
|
384
415
|
*/
|
|
385
|
-
ezspSetValue(valueId: EzspValueId, valueLength: number, value: number[]): Promise<
|
|
416
|
+
ezspSetValue(valueId: EzspValueId, valueLength: number, value: number[]): Promise<SLStatus>;
|
|
386
417
|
/**
|
|
387
|
-
* Allows the Host to control the broadcast behaviour of a routing device used
|
|
388
|
-
* by the NCP.
|
|
418
|
+
* Allows the Host to control the broadcast behaviour of a routing device used by the NCP.
|
|
389
419
|
* @param config uint8_t Passive ack config enum.
|
|
390
420
|
* @param minAcksNeeded uint8_t The minimum number of acknowledgments (re-broadcasts) to wait for until
|
|
391
421
|
* deeming the broadcast transmission complete.
|
|
392
|
-
* @returns
|
|
422
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
423
|
+
*/
|
|
424
|
+
ezspSetPassiveAckConfig(config: number, minAcksNeeded: number): Promise<SLStatus>;
|
|
425
|
+
/**
|
|
426
|
+
* Set the PAN ID to be accepted by the device in a NLME Network Update command.
|
|
427
|
+
* If this is set to a different value than its default 0xFFFF, NLME network update messages will be ignored if they do not match this PAN ID.
|
|
428
|
+
* @param panId uint16_t PAN ID to be accepted in a network update.
|
|
429
|
+
*/
|
|
430
|
+
ezspSetPendingNetworkUpdatePanId(panId: PanId): Promise<void>;
|
|
431
|
+
/**
|
|
432
|
+
* Retrieve the endpoint number located at the specified index.
|
|
433
|
+
* @param index uint8_t Index to retrieve the endpoint number for.
|
|
434
|
+
* @returns uint8_t Endpoint number at the index.
|
|
393
435
|
*/
|
|
394
|
-
|
|
436
|
+
ezspGetEndpoint(index: number): Promise<number>;
|
|
437
|
+
/**
|
|
438
|
+
* Get the number of configured endpoints.
|
|
439
|
+
* @returns uint8_t Number of configured endpoints.
|
|
440
|
+
*/
|
|
441
|
+
ezspGetEndpointCount(): Promise<number>;
|
|
442
|
+
/**
|
|
443
|
+
* Retrieve the endpoint description for the given endpoint number.
|
|
444
|
+
* @param endpoint Endpoint number to get the description of.
|
|
445
|
+
* @returns Description of this endpoint.
|
|
446
|
+
*/
|
|
447
|
+
ezspGetEndpointDescription(endpoint: number): Promise<EmberEndpointDescription>;
|
|
448
|
+
/**
|
|
449
|
+
* Retrieve one of the cluster IDs associated with the given endpoint.
|
|
450
|
+
* @param endpoint Endpoint number to get a cluster ID for.
|
|
451
|
+
* @param listId Which list to get the cluster ID from. (0 for input, 1 for output).
|
|
452
|
+
* @param listIndex Index from requested list to look at the cluster ID of.
|
|
453
|
+
* @returns ID of the requested cluster.
|
|
454
|
+
*/
|
|
455
|
+
ezspGetEndpointCluster(endpoint: number, listId: number, listIndex: number): Promise<number>;
|
|
395
456
|
/**
|
|
396
457
|
* A command which does nothing. The Host can use this to set the sleep mode or to check the status of the NCP.
|
|
397
458
|
*/
|
|
398
459
|
ezspNop(): Promise<void>;
|
|
399
460
|
/**
|
|
400
|
-
* Variable length data from the Host is echoed back by the NCP.
|
|
401
|
-
* has no other effects and is designed for testing the link between the Host and NCP.
|
|
461
|
+
* Variable length data from the Host is echoed back by the NCP.
|
|
462
|
+
* This command has no other effects and is designed for testing the link between the Host and NCP.
|
|
402
463
|
* @param data uint8_t * The data to be echoed back.
|
|
403
|
-
* @returns
|
|
404
|
-
* - The length of the echo parameter in bytes.
|
|
405
|
-
* - echo uint8_t * The echo of the data.
|
|
464
|
+
* @returns uint8_t * The echo of the data.
|
|
406
465
|
*/
|
|
407
466
|
ezspEcho(data: Buffer): Promise<Buffer>;
|
|
408
467
|
/**
|
|
@@ -418,24 +477,22 @@ export declare class Ezsp extends EventEmitter {
|
|
|
418
477
|
* Sets a token (8 bytes of non-volatile storage) in the Simulated EEPROM of the NCP.
|
|
419
478
|
* @param tokenId uint8_t Which token to set
|
|
420
479
|
* @param tokenData uint8_t * The data to write to the token.
|
|
421
|
-
* @returns
|
|
480
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
422
481
|
*/
|
|
423
|
-
ezspSetToken(tokenId: number, tokenData: number[]): Promise<
|
|
482
|
+
ezspSetToken(tokenId: number, tokenData: number[]): Promise<SLStatus>;
|
|
424
483
|
/**
|
|
425
484
|
* Retrieves a token (8 bytes of non-volatile storage) from the Simulated EEPROM of the NCP.
|
|
426
485
|
* @param tokenId uint8_t Which token to read
|
|
427
|
-
* @returns
|
|
428
|
-
*
|
|
429
|
-
* - uint8_t * The contents of the token.
|
|
486
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
487
|
+
* @returns uint8_t * The contents of the token.
|
|
430
488
|
*/
|
|
431
|
-
ezspGetToken(tokenId: number): Promise<[
|
|
489
|
+
ezspGetToken(tokenId: number): Promise<[SLStatus, tokenData: number[]]>;
|
|
432
490
|
/**
|
|
433
491
|
* Retrieves a manufacturing token from the Flash Information Area of the NCP
|
|
434
492
|
* (except for EZSP_STACK_CAL_DATA which is managed by the stack).
|
|
435
|
-
* @param
|
|
436
|
-
* @returns
|
|
437
|
-
*
|
|
438
|
-
* - uint8_t * The manufacturing token data.
|
|
493
|
+
* @param tokenId Which manufacturing token to read.
|
|
494
|
+
* @returns uint8_t The length of the tokenData parameter in bytes.
|
|
495
|
+
* @returns uint8_t * The manufacturing token data.
|
|
439
496
|
*/
|
|
440
497
|
ezspGetMfgToken(tokenId: EzspMfgTokenId): Promise<[number, tokenData: number[]]>;
|
|
441
498
|
/**
|
|
@@ -445,9 +502,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
445
502
|
* EZSP_MFG_CBKE_DATA token.
|
|
446
503
|
* @param tokenId Which manufacturing token to set.
|
|
447
504
|
* @param tokenData uint8_t * The manufacturing token data.
|
|
448
|
-
* @returns An
|
|
505
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
449
506
|
*/
|
|
450
|
-
ezspSetMfgToken(tokenId: EzspMfgTokenId, tokenData: Buffer): Promise<
|
|
507
|
+
ezspSetMfgToken(tokenId: EzspMfgTokenId, tokenData: Buffer): Promise<SLStatus>;
|
|
451
508
|
/**
|
|
452
509
|
* Callback
|
|
453
510
|
* A callback invoked to inform the application that a stack token has changed.
|
|
@@ -456,11 +513,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
456
513
|
ezspStackTokenChangedHandler(tokenAddress: number): void;
|
|
457
514
|
/**
|
|
458
515
|
* Returns a pseudorandom number.
|
|
459
|
-
* @returns
|
|
460
|
-
*
|
|
461
|
-
* - uint16_t * A pseudorandom number.
|
|
516
|
+
* @returns Always returns SLStatus.OK.
|
|
517
|
+
* @returns uint16_t * A pseudorandom number.
|
|
462
518
|
*/
|
|
463
|
-
ezspGetRandomNumber(): Promise<[
|
|
519
|
+
ezspGetRandomNumber(): Promise<[SLStatus, value: number]>;
|
|
464
520
|
/**
|
|
465
521
|
* Sets a timer on the NCP. There are 2 independent timers available for use by the Host.
|
|
466
522
|
* A timer can be cancelled by setting time to 0 or units to EMBER_EVENT_INACTIVE.
|
|
@@ -470,18 +526,17 @@ export declare class Ezsp extends EventEmitter {
|
|
|
470
526
|
* This means that the actual delay will be between time and (time - 1). The maximum delay is 32767.
|
|
471
527
|
* @param units The units for time.
|
|
472
528
|
* @param repeat If true, a timerHandler callback will be generated repeatedly. If false, only a single timerHandler callback will be generated.
|
|
473
|
-
* @returns An
|
|
529
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
474
530
|
*/
|
|
475
|
-
ezspSetTimer(timerId: number, time: number, units: EmberEventUnits, repeat: boolean): Promise<
|
|
531
|
+
ezspSetTimer(timerId: number, time: number, units: EmberEventUnits, repeat: boolean): Promise<SLStatus>;
|
|
476
532
|
/**
|
|
477
533
|
* Gets information about a timer. The Host can use this command to find out how
|
|
478
534
|
* much longer it will be before a previously set timer will generate a
|
|
479
535
|
* callback.
|
|
480
536
|
* @param timerId uint8_t Which timer to get information about (0 or 1).
|
|
481
|
-
* @returns
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
* - bool * True if a timerHandler callback will be generated repeatedly. False if only a single timerHandler callback will be generated.
|
|
537
|
+
* @returns uint16_t The delay before the timerHandler callback will be generated.
|
|
538
|
+
* @returns EmberEventUnits * The units for time.
|
|
539
|
+
* @returns bool * True if a timerHandler callback will be generated repeatedly. False if only a single timerHandler callback will be generated.
|
|
485
540
|
*/
|
|
486
541
|
ezspGetTimer(timerId: number): Promise<[number, units: EmberEventUnits, repeat: boolean]>;
|
|
487
542
|
/**
|
|
@@ -494,9 +549,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
494
549
|
* Sends a debug message from the Host to the Network Analyzer utility via the NCP.
|
|
495
550
|
* @param binaryMessage true if the message should be interpreted as binary data, false if the message should be interpreted as ASCII text.
|
|
496
551
|
* @param messageContents uint8_t * The binary message.
|
|
497
|
-
* @returns An
|
|
552
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
498
553
|
*/
|
|
499
|
-
ezspDebugWrite(binaryMessage: boolean, messageContents: Buffer): Promise<
|
|
554
|
+
ezspDebugWrite(binaryMessage: boolean, messageContents: Buffer): Promise<SLStatus>;
|
|
500
555
|
/**
|
|
501
556
|
* Retrieves and clears Ember counters. See the EmberCounterType enumeration for the counter types.
|
|
502
557
|
* @returns uint16_t * A list of all counter values ordered according to the EmberCounterType enumeration.
|
|
@@ -529,12 +584,12 @@ export declare class Ezsp extends EventEmitter {
|
|
|
529
584
|
* the response contains also the manufacturer ID and the version number of the
|
|
530
585
|
* XNCP application that is running on the NCP.
|
|
531
586
|
* @returns
|
|
532
|
-
* -
|
|
533
|
-
* -
|
|
534
|
-
*
|
|
535
|
-
*
|
|
587
|
+
* - SLStatus.OK if the NCP is running the XNCP library.
|
|
588
|
+
* - SLStatus.INVALID_STATE otherwise.
|
|
589
|
+
* @returns manufacturerId uint16_t * The manufactured ID the user has defined in the XNCP application.
|
|
590
|
+
* @returns versionNumber uint16_t * The version number of the XNCP application.
|
|
536
591
|
*/
|
|
537
|
-
ezspGetXncpInfo(): Promise<[
|
|
592
|
+
ezspGetXncpInfo(): Promise<[SLStatus, manufacturerId: number, versionNumber: number]>;
|
|
538
593
|
/**
|
|
539
594
|
* Provides the customer a custom EZSP frame. On the NCP, these frames are only
|
|
540
595
|
* handled if the XNCP library is included. On the NCP side these frames are
|
|
@@ -542,28 +597,26 @@ export declare class Ezsp extends EventEmitter {
|
|
|
542
597
|
* function.
|
|
543
598
|
* @param uint8_t * The payload of the custom frame (maximum 119 bytes).
|
|
544
599
|
* @param uint8_t The expected length of the response.
|
|
545
|
-
* @returns
|
|
546
|
-
*
|
|
547
|
-
* - uint8_t *The response.
|
|
600
|
+
* @returns The status returned by the custom command.
|
|
601
|
+
* @returns uint8_t *The response.
|
|
548
602
|
*/
|
|
549
|
-
ezspCustomFrame(payload: Buffer, replyLength: number): Promise<[
|
|
603
|
+
ezspCustomFrame(payload: Buffer, replyLength: number): Promise<[SLStatus, outReply: Buffer]>;
|
|
550
604
|
/**
|
|
551
605
|
* Callback
|
|
552
606
|
* A callback indicating a custom EZSP message has been received.
|
|
553
|
-
* @param payloadLength uint8_t The length of the custom frame payload.
|
|
554
607
|
* @param payload uint8_t * The payload of the custom frame.
|
|
555
608
|
*/
|
|
556
|
-
ezspCustomFrameHandler(
|
|
609
|
+
ezspCustomFrameHandler(payload: Buffer): void;
|
|
557
610
|
/**
|
|
558
611
|
* Returns the EUI64 ID of the local node.
|
|
559
612
|
* @returns The 64-bit ID.
|
|
560
613
|
*/
|
|
561
|
-
ezspGetEui64(): Promise<
|
|
614
|
+
ezspGetEui64(): Promise<EUI64>;
|
|
562
615
|
/**
|
|
563
616
|
* Returns the 16-bit node ID of the local node.
|
|
564
617
|
* @returns The 16-bit ID.
|
|
565
618
|
*/
|
|
566
|
-
ezspGetNodeId(): Promise<
|
|
619
|
+
ezspGetNodeId(): Promise<NodeId>;
|
|
567
620
|
/**
|
|
568
621
|
* Returns number of phy interfaces present.
|
|
569
622
|
* @returns uint8_t Value indicate how many phy interfaces present.
|
|
@@ -574,30 +627,77 @@ export declare class Ezsp extends EventEmitter {
|
|
|
574
627
|
* @returns Value indicates the used entropy source.
|
|
575
628
|
*/
|
|
576
629
|
ezspGetTrueRandomEntropySource(): Promise<EmberEntropySource>;
|
|
630
|
+
/**
|
|
631
|
+
* Extend a joiner's timeout to wait for the network key on the joiner default key timeout is 3 sec,
|
|
632
|
+
* and only values greater equal to 3 sec are accepted.
|
|
633
|
+
* @param networkKeyTimeoutS Network key timeout
|
|
634
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
635
|
+
*/
|
|
636
|
+
ezspSetupDelayedJoin(networkKeyTimeoutS: number): Promise<SLStatus>;
|
|
637
|
+
/**
|
|
638
|
+
* Get the current scheduler priorities for multiprotocol apps.
|
|
639
|
+
* @returns The current priorities.
|
|
640
|
+
*/
|
|
641
|
+
ezspRadioGetSchedulerPriorities(): Promise<EmberMultiprotocolPriorities>;
|
|
642
|
+
/**
|
|
643
|
+
* Set the current scheduler priorities for multiprotocol apps.
|
|
644
|
+
* @param priorities The current priorities.
|
|
645
|
+
*/
|
|
646
|
+
ezspRadioSetSchedulerPriorities(priorities: EmberMultiprotocolPriorities): Promise<void>;
|
|
647
|
+
/**
|
|
648
|
+
* Get the current multiprotocol sliptime
|
|
649
|
+
* @returns Value of the current slip time.
|
|
650
|
+
*/
|
|
651
|
+
ezspRadioGetSchedulerSliptime(): Promise<number>;
|
|
652
|
+
/**
|
|
653
|
+
* Set the current multiprotocol sliptime
|
|
654
|
+
* @param slipTime Value of the current slip time.
|
|
655
|
+
*/
|
|
656
|
+
ezspRadioSetSchedulerSliptime(slipTime: number): Promise<void>;
|
|
657
|
+
/**
|
|
658
|
+
* Check if a particular counter is one that could report from either a 2.4GHz or sub-GHz interface.
|
|
659
|
+
* @param counter The counter to be checked.
|
|
660
|
+
* @returns Whether this counter requires a PHY index when operating on a dual-PHY system.
|
|
661
|
+
*/
|
|
662
|
+
ezspCounterRequiresPhyIndex(counter: EmberCounterType): Promise<boolean>;
|
|
663
|
+
/**
|
|
664
|
+
* Check if a particular counter can report on the destination node ID they have been triggered from.
|
|
665
|
+
* @param counter The counter to be checked.
|
|
666
|
+
* @returns Whether this counter requires the destination node ID.
|
|
667
|
+
*/
|
|
668
|
+
ezspCounterRequiresDestinationNodeId(counter: EmberCounterType): Promise<boolean>;
|
|
577
669
|
/**
|
|
578
670
|
* Sets the manufacturer code to the specified value.
|
|
579
671
|
* The manufacturer code is one of the fields of the node descriptor.
|
|
580
672
|
* @param code uint16_t The manufacturer code for the local node.
|
|
581
673
|
*/
|
|
582
674
|
ezspSetManufacturerCode(code: number): Promise<void>;
|
|
675
|
+
/**
|
|
676
|
+
* Gets the manufacturer code to the specified value.
|
|
677
|
+
* The manufacturer code is one of the fields of the node descriptor.
|
|
678
|
+
* @returns The manufacturer code for the local node.
|
|
679
|
+
*/
|
|
680
|
+
ezspGetManufacturerCode(): Promise<number>;
|
|
583
681
|
/**
|
|
584
682
|
* Sets the power descriptor to the specified value. The power descriptor is a
|
|
585
683
|
* dynamic value. Therefore, you should call this function whenever the value
|
|
586
684
|
* changes.
|
|
587
685
|
* @param descriptor uint16_t The new power descriptor for the local node.
|
|
686
|
+
* @returns An SLStatus value indicating success or the reason for failure. Always `OK` in v13-.
|
|
588
687
|
*/
|
|
589
|
-
ezspSetPowerDescriptor(descriptor: number): Promise<
|
|
688
|
+
ezspSetPowerDescriptor(descriptor: number): Promise<SLStatus>;
|
|
590
689
|
/**
|
|
591
690
|
* Resume network operation after a reboot. The node retains its original type.
|
|
592
691
|
* This should be called on startup whether or not the node was previously part
|
|
593
692
|
* of a network. EMBER_NOT_JOINED is returned if the node is not part of a
|
|
594
693
|
* network. This command accepts options to control the network initialization.
|
|
595
694
|
* @param networkInitStruct EmberNetworkInitStruct * An EmberNetworkInitStruct containing the options for initialization.
|
|
596
|
-
* @returns
|
|
597
|
-
*
|
|
598
|
-
*
|
|
695
|
+
* @returns
|
|
696
|
+
* - SLStatus.OK if successful initialization,
|
|
697
|
+
* - SLStatus.NOT_JOINED if the node is not part of a network
|
|
698
|
+
* - or the reason for failure.
|
|
599
699
|
*/
|
|
600
|
-
ezspNetworkInit(networkInitStruct: EmberNetworkInitStruct): Promise<
|
|
700
|
+
ezspNetworkInit(networkInitStruct: EmberNetworkInitStruct): Promise<SLStatus>;
|
|
601
701
|
/**
|
|
602
702
|
* Returns a value indicating whether the node is joining, joined to, or leaving a network.
|
|
603
703
|
* @returns Command send status.
|
|
@@ -613,7 +713,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
613
713
|
* updated.
|
|
614
714
|
* @param status Stack status
|
|
615
715
|
*/
|
|
616
|
-
ezspStackStatusHandler(status:
|
|
716
|
+
ezspStackStatusHandler(status: SLStatus): void;
|
|
617
717
|
/**
|
|
618
718
|
* This function will start a scan.
|
|
619
719
|
* @param scanType Indicates the type of scan to be performed. Possible values are: EZSP_ENERGY_SCAN and EZSP_ACTIVE_SCAN.
|
|
@@ -627,11 +727,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
627
727
|
* @param duration uint8_t Sets the exponent of the number of scan periods, where a scan period is 960 symbols.
|
|
628
728
|
* The scan will occur for ((2^duration) + 1) scan periods.
|
|
629
729
|
* @returns
|
|
630
|
-
* -
|
|
631
|
-
* -
|
|
632
|
-
* -
|
|
633
|
-
* -
|
|
634
|
-
* -
|
|
730
|
+
* - SLStatus.OK signals that the scan successfully started. Possible error responses and their meanings:
|
|
731
|
+
* - SLStatus.MAC_SCANNING, we are already scanning;
|
|
732
|
+
* - SLStatus.BAD_SCAN_DURATION, we have set a duration value that is not 0..14 inclusive;
|
|
733
|
+
* - SLStatus.MAC_INCORRECT_SCAN_TYPE, we have requested an undefined scanning type;
|
|
734
|
+
* - SLStatus.INVALID_CHANNEL_MASK, our channel mask did not specify any valid channels.
|
|
635
735
|
*/
|
|
636
736
|
ezspStartScan(scanType: EzspNetworkScanType, channelMask: number, duration: number): Promise<SLStatus>;
|
|
637
737
|
/**
|
|
@@ -654,12 +754,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
654
754
|
/**
|
|
655
755
|
* Callback
|
|
656
756
|
* @param channel uint8_t The channel on which the current error occurred. Undefined for the case of EMBER_SUCCESS.
|
|
657
|
-
* @param status The error condition that occurred on the current channel. Value will be
|
|
658
|
-
*
|
|
659
|
-
* EZSP_ACTIVE_SCAN. EMBER_SUCCESS signals that the scan has completed. Other
|
|
660
|
-
* error conditions signify a failure to scan on the channel specified.
|
|
757
|
+
* @param status The error condition that occurred on the current channel. Value will be SLStatus.OK when the scan has completed.
|
|
758
|
+
* Other error conditions signify a failure to scan on the channel specified.
|
|
661
759
|
*/
|
|
662
|
-
ezspScanCompleteHandler(channel: number, status:
|
|
760
|
+
ezspScanCompleteHandler(channel: number, status: SLStatus): void;
|
|
663
761
|
/**
|
|
664
762
|
* Callback
|
|
665
763
|
* This function returns an unused panID and channel pair found via the find
|
|
@@ -667,26 +765,25 @@ export declare class Ezsp extends EventEmitter {
|
|
|
667
765
|
* @param The unused panID which has been found.
|
|
668
766
|
* @param channel uint8_t The channel that the unused panID was found on.
|
|
669
767
|
*/
|
|
670
|
-
ezspUnusedPanIdFoundHandler(panId:
|
|
768
|
+
ezspUnusedPanIdFoundHandler(panId: PanId, channel: number): void;
|
|
671
769
|
/**
|
|
672
770
|
* This function starts a series of scans which will return an available panId.
|
|
673
771
|
* @param channelMask uint32_t The channels that will be scanned for available panIds.
|
|
674
772
|
* @param duration uint8_t The duration of the procedure.
|
|
675
|
-
* @returns The error condition that occurred during the scan. Value will be
|
|
676
|
-
* EMBER_SUCCESS if there are no errors.
|
|
773
|
+
* @returns The error condition that occurred during the scan. Value will be SLStatus.OK if there are no errors.
|
|
677
774
|
*/
|
|
678
|
-
ezspFindUnusedPanId(channelMask: number, duration: number): Promise<
|
|
775
|
+
ezspFindUnusedPanId(channelMask: number, duration: number): Promise<SLStatus>;
|
|
679
776
|
/**
|
|
680
777
|
* Terminates a scan in progress.
|
|
681
|
-
* @returns An
|
|
778
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
682
779
|
*/
|
|
683
|
-
ezspStopScan(): Promise<
|
|
780
|
+
ezspStopScan(): Promise<SLStatus>;
|
|
684
781
|
/**
|
|
685
782
|
* Forms a new network by becoming the coordinator.
|
|
686
783
|
* @param parameters EmberNetworkParameters * Specification of the new network.
|
|
687
|
-
* @returns An
|
|
784
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
688
785
|
*/
|
|
689
|
-
ezspFormNetwork(parameters: EmberNetworkParameters): Promise<
|
|
786
|
+
ezspFormNetwork(parameters: EmberNetworkParameters): Promise<SLStatus>;
|
|
690
787
|
/**
|
|
691
788
|
* Causes the stack to associate with the network using the specified network
|
|
692
789
|
* parameters. It can take several seconds for the stack to associate with the
|
|
@@ -695,9 +792,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
695
792
|
* @param nodeType Specification of the role that this node will have in the network.
|
|
696
793
|
* This role must not be EMBER_COORDINATOR. To be a coordinator, use the formNetwork command.
|
|
697
794
|
* @param parameters EmberNetworkParameters * Specification of the network with which the node should associate.
|
|
698
|
-
* @returns An
|
|
795
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
699
796
|
*/
|
|
700
|
-
ezspJoinNetwork(nodeType: EmberNodeType, parameters: EmberNetworkParameters): Promise<
|
|
797
|
+
ezspJoinNetwork(nodeType: EmberNodeType, parameters: EmberNetworkParameters): Promise<SLStatus>;
|
|
701
798
|
/**
|
|
702
799
|
* Causes the stack to associate with the network using the specified network
|
|
703
800
|
* parameters in the beacon parameter. It can take several seconds for the stack
|
|
@@ -713,16 +810,17 @@ export declare class Ezsp extends EventEmitter {
|
|
|
713
810
|
* @param beacon EmberBeaconData * Specifies the network with which the node should associate.
|
|
714
811
|
* @param radioTxPower int8_t The radio transmit power to use, specified in dBm.
|
|
715
812
|
* @param clearBeaconsAfterNetworkUp If true, clear beacons in cache upon join success. If join fail, do nothing.
|
|
716
|
-
* @returns An
|
|
813
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
717
814
|
*/
|
|
718
|
-
ezspJoinNetworkDirectly(localNodeType: EmberNodeType, beacon: EmberBeaconData, radioTxPower: number, clearBeaconsAfterNetworkUp: boolean): Promise<
|
|
815
|
+
ezspJoinNetworkDirectly(localNodeType: EmberNodeType, beacon: EmberBeaconData, radioTxPower: number, clearBeaconsAfterNetworkUp: boolean): Promise<SLStatus>;
|
|
719
816
|
/**
|
|
720
817
|
* Causes the stack to leave the current network. This generates a
|
|
721
818
|
* stackStatusHandler callback to indicate that the network is down. The radio
|
|
722
819
|
* will not be used until after sending a formNetwork or joinNetwork command.
|
|
723
|
-
* @
|
|
820
|
+
* @param options This parameter gives options when leave network
|
|
821
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
724
822
|
*/
|
|
725
|
-
ezspLeaveNetwork(): Promise<
|
|
823
|
+
ezspLeaveNetwork(options?: EmberLeaveNetworkOption): Promise<SLStatus>;
|
|
726
824
|
/**
|
|
727
825
|
* The application may call this function when contact with the network has been
|
|
728
826
|
* lost. The most common usage case is when an end device can no longer
|
|
@@ -740,17 +838,21 @@ export declare class Ezsp extends EventEmitter {
|
|
|
740
838
|
* If the Trust Center allows the rejoin then the current Network Key will be sent encrypted using the device's Link Key.
|
|
741
839
|
* @param channelMask uint32_t A mask indicating the channels to be scanned. See emberStartScan for format details.
|
|
742
840
|
* A value of 0 is reinterpreted as the mask for the current channel.
|
|
743
|
-
* @
|
|
841
|
+
* @param reason uint8_t A sl_zigbee_rejoin_reason_t variable which could be passed in if there is actually a reason for rejoin,
|
|
842
|
+
* or could be left at 0xFF
|
|
843
|
+
* @param nodeType uint8_t The rejoin could be triggered with a different nodeType.
|
|
844
|
+
* This value could be set to 0 or SL_ZIGBEE_DEVICE_TYPE_UNCHANGED if not needed.
|
|
845
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
744
846
|
*/
|
|
745
|
-
ezspFindAndRejoinNetwork(haveCurrentNetworkKey: boolean, channelMask: number): Promise<
|
|
847
|
+
ezspFindAndRejoinNetwork(haveCurrentNetworkKey: boolean, channelMask: number, reason?: number, nodeType?: number): Promise<SLStatus>;
|
|
746
848
|
/**
|
|
747
849
|
* Tells the stack to allow other nodes to join the network with this node as
|
|
748
850
|
* their parent. Joining is initially disabled by default.
|
|
749
851
|
* @param duration uint8_t A value of 0x00 disables joining. A value of 0xFF enables joining.
|
|
750
852
|
* Any other value enables joining for that number of seconds.
|
|
751
|
-
* @returns An
|
|
853
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
752
854
|
*/
|
|
753
|
-
ezspPermitJoining(duration: number): Promise<
|
|
855
|
+
ezspPermitJoining(duration: number): Promise<SLStatus>;
|
|
754
856
|
/**
|
|
755
857
|
* Callback
|
|
756
858
|
* Indicates that a child has joined or left.
|
|
@@ -760,7 +862,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
760
862
|
* @param childEui64 The EUI64 of the child.
|
|
761
863
|
* @param childType The node type of the child.
|
|
762
864
|
*/
|
|
763
|
-
ezspChildJoinHandler(index: number, joining: boolean, childId:
|
|
865
|
+
ezspChildJoinHandler(index: number, joining: boolean, childId: NodeId, childEui64: EUI64, childType: EmberNodeType): void;
|
|
764
866
|
/**
|
|
765
867
|
* Sends a ZDO energy scan request. This request may only be sent by the current
|
|
766
868
|
* network manager and must be unicast, not broadcast. See ezsp-utils.h for
|
|
@@ -771,58 +873,149 @@ export declare class Ezsp extends EventEmitter {
|
|
|
771
873
|
* @param scanDuration uint8_t How long to scan on each channel.
|
|
772
874
|
* Allowed values are 0..5, with the scan times as specified by 802.15.4 (0 = 31ms, 1 = 46ms, 2 = 77ms, 3 = 138ms, 4 = 261ms, 5 = 507ms).
|
|
773
875
|
* @param scanCount uint16_t The number of scans to be performed on each channel (1..8).
|
|
774
|
-
* @returns An
|
|
876
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
775
877
|
*/
|
|
776
|
-
ezspEnergyScanRequest(target:
|
|
878
|
+
ezspEnergyScanRequest(target: NodeId, scanChannels: number, scanDuration: number, scanCount: number): Promise<SLStatus>;
|
|
777
879
|
/**
|
|
778
880
|
* Returns the current network parameters.
|
|
779
|
-
* @returns An
|
|
881
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
780
882
|
* @returns EmberNodeType * An EmberNodeType value indicating the current node type.
|
|
781
883
|
* @returns EmberNetworkParameters * The current network parameters.
|
|
782
884
|
*/
|
|
783
|
-
ezspGetNetworkParameters(): Promise<[
|
|
885
|
+
ezspGetNetworkParameters(): Promise<[SLStatus, nodeType: EmberNodeType, parameters: EmberNetworkParameters]>;
|
|
784
886
|
/**
|
|
785
887
|
* Returns the current radio parameters based on phy index.
|
|
786
888
|
* @param phyIndex uint8_t Desired index of phy interface for radio parameters.
|
|
787
|
-
* @returns An
|
|
889
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
788
890
|
* @returns EmberMultiPhyRadioParameters * The current radio parameters based on provided phy index.
|
|
789
891
|
*/
|
|
790
|
-
ezspGetRadioParameters(phyIndex: number): Promise<[
|
|
892
|
+
ezspGetRadioParameters(phyIndex: number): Promise<[SLStatus, parameters: EmberMultiPhyRadioParameters]>;
|
|
791
893
|
/**
|
|
792
894
|
* Returns information about the children of the local node and the parent of
|
|
793
895
|
* the local node.
|
|
794
896
|
* @returns uint8_t The number of children the node currently has.
|
|
795
897
|
* @returns The parent's EUI64. The value is undefined for nodes without parents (coordinators and nodes that are not joined to a network).
|
|
796
|
-
* @returns
|
|
898
|
+
* @returns NodeId * The parent's node ID. The value is undefined for nodes without parents
|
|
797
899
|
* (coordinators and nodes that are not joined to a network).
|
|
798
900
|
*/
|
|
799
|
-
ezspGetParentChildParameters(): Promise<[number, parentEui64:
|
|
901
|
+
ezspGetParentChildParameters(): Promise<[number, parentEui64: EUI64, parentNodeId: NodeId]>;
|
|
902
|
+
/**
|
|
903
|
+
* Return the number of router children that the node currently has.
|
|
904
|
+
* @returns The number of router children.
|
|
905
|
+
*/
|
|
906
|
+
ezspRouterChildCount(): Promise<number>;
|
|
907
|
+
/**
|
|
908
|
+
* Return the maximum number of children for this node.
|
|
909
|
+
* The return value is undefined for nodes that are not joined to a network.
|
|
910
|
+
* @returns The maximum number of children.
|
|
911
|
+
*/
|
|
912
|
+
ezspMaxChildCount(): Promise<number>;
|
|
913
|
+
/**
|
|
914
|
+
* Return the maximum number of router children for this node.
|
|
915
|
+
* The return value is undefined for nodes that are not joined to a network.
|
|
916
|
+
* @returns The maximum number of router children.
|
|
917
|
+
*/
|
|
918
|
+
ezspMaxRouterChildCount(): Promise<number>;
|
|
919
|
+
/**
|
|
920
|
+
*
|
|
921
|
+
* @returns
|
|
922
|
+
*/
|
|
923
|
+
ezspGetParentIncomingNwkFrameCounter(): Promise<number>;
|
|
924
|
+
/**
|
|
925
|
+
*
|
|
926
|
+
* @param value uint32_t
|
|
927
|
+
* @returns
|
|
928
|
+
*/
|
|
929
|
+
ezspSetParentIncomingNwkFrameCounter(value: number): Promise<SLStatus>;
|
|
930
|
+
/**
|
|
931
|
+
* Return a bitmask indicating the stack's current tasks.
|
|
932
|
+
* The mask ::SL_ZIGBEE_HIGH_PRIORITY_TASKS defines which tasks are high priority.
|
|
933
|
+
* Devices should not sleep if any high priority tasks are active.
|
|
934
|
+
* Active tasks that are not high priority are waiting for messages to arrive from other devices.
|
|
935
|
+
* If there are active tasks, but no high priority ones, the device may sleep but should periodically wake up
|
|
936
|
+
* and call ::emberPollForData() in order to receive messages.
|
|
937
|
+
* Parents will hold messages for ::SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT milliseconds before discarding them.
|
|
938
|
+
* @returns A bitmask of the stack's active tasks.
|
|
939
|
+
*/
|
|
940
|
+
ezspCurrentStackTasks(): Promise<number>;
|
|
941
|
+
/**
|
|
942
|
+
* Indicate whether the stack is currently in a state where there are no high-priority tasks, allowing the device to sleep.
|
|
943
|
+
* There may be tasks expecting incoming messages, in which case the device should periodically wake up
|
|
944
|
+
* and call ::emberPollForData() in order to receive messages.
|
|
945
|
+
* This function can only be called when the node type is ::SL_ZIGBEE_SLEEPY_END_DEVICE
|
|
946
|
+
* @returns True if the application may sleep but the stack may be expecting incoming messages.
|
|
947
|
+
*/
|
|
948
|
+
ezspOkToNap(): Promise<boolean>;
|
|
949
|
+
/**
|
|
950
|
+
* Indicate whether the parent token has been set by association.
|
|
951
|
+
* @returns True if the parent token has been set.
|
|
952
|
+
*/
|
|
953
|
+
ezspParentTokenSet(): Promise<boolean>;
|
|
954
|
+
/**
|
|
955
|
+
* Indicate whether the stack currently has any tasks pending.
|
|
956
|
+
* If no tasks are pending, ::emberTick() does not need to be called until the next time a stack API function is called.
|
|
957
|
+
* This function can only be called when the node type is ::SL_ZIGBEE_SLEEPY_END_DEVICE.
|
|
958
|
+
* @returns True if the application may sleep for as long as it wishes.
|
|
959
|
+
*/
|
|
960
|
+
ezspOkToHibernate(): Promise<boolean>;
|
|
961
|
+
/**
|
|
962
|
+
* Indicate whether the stack is currently in a state that does not require the application to periodically poll.
|
|
963
|
+
* @returns True if the device may poll less frequently.
|
|
964
|
+
*/
|
|
965
|
+
ezspOkToLongPoll(): Promise<boolean>;
|
|
966
|
+
/**
|
|
967
|
+
* Calling this function will render all other stack functions except ezspStackPowerUp() non-functional until the radio is powered back on.
|
|
968
|
+
*/
|
|
969
|
+
ezspStackPowerDown(): Promise<void>;
|
|
970
|
+
/**
|
|
971
|
+
* Initialize the radio. Typically called coming out of deep sleep.
|
|
972
|
+
* For non-sleepy devices, also turns the radio on and leaves it in RX mode.
|
|
973
|
+
*/
|
|
974
|
+
ezspStackPowerUp(): Promise<void>;
|
|
800
975
|
/**
|
|
801
976
|
* Returns information about a child of the local node.
|
|
802
977
|
* @param uint8_t The index of the child of interest in the child table. Possible indexes range from zero to EMBER_CHILD_TABLE_SIZE.
|
|
803
|
-
* @returns
|
|
978
|
+
* @returns
|
|
979
|
+
* - SLStatus.OK if there is a child at index.
|
|
980
|
+
* - SLStatus.NOT_JOINED if there is no child at index.
|
|
804
981
|
* @returns EmberChildData * The data of the child.
|
|
805
982
|
*/
|
|
806
|
-
ezspGetChildData(index: number): Promise<[
|
|
983
|
+
ezspGetChildData(index: number): Promise<[SLStatus, childData: EmberChildData]>;
|
|
807
984
|
/**
|
|
808
985
|
* Sets child data to the child table token.
|
|
809
986
|
* @param index uint8_t The index of the child of interest in the child table. Possible indexes range from zero to (EMBER_CHILD_TABLE_SIZE - 1).
|
|
810
987
|
* @param childData EmberChildData * The data of the child.
|
|
811
|
-
* @returns
|
|
988
|
+
* @returns
|
|
989
|
+
* - SLStatus.OK if the child data is set successfully at index.
|
|
990
|
+
* - SLStatus.INVALID_INDEX if provided index is out of range.
|
|
812
991
|
*/
|
|
813
|
-
ezspSetChildData(index: number, childData: EmberChildData): Promise<
|
|
992
|
+
ezspSetChildData(index: number, childData: EmberChildData): Promise<SLStatus>;
|
|
814
993
|
/**
|
|
815
994
|
* Convert a child index to a node ID
|
|
816
995
|
* @param childIndex uint8_t The index of the child of interest in the child table. Possible indexes range from zero to EMBER_CHILD_TABLE_SIZE.
|
|
817
996
|
* @returns The node ID of the child or EMBER_NULL_NODE_ID if there isn't a child at the childIndex specified
|
|
818
997
|
*/
|
|
819
|
-
ezspChildId(childIndex: number): Promise<
|
|
998
|
+
ezspChildId(childIndex: number): Promise<NodeId>;
|
|
999
|
+
/**
|
|
1000
|
+
* Return radio power value of the child from the given childIndex
|
|
1001
|
+
* @param childIndex uint8_t The index of the child of interest in the child table.
|
|
1002
|
+
* Possible indexes range from zero to SL_ZIGBEE_CHILD_TABLE_SIZE.
|
|
1003
|
+
* @returns The power of the child or maximum radio power, which is the power value provided by the user
|
|
1004
|
+
* while forming/joining a network if there isn't a child at the childIndex specified
|
|
1005
|
+
*/
|
|
1006
|
+
ezspChilPower(childIndex: number): Promise<number>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Set the radio power value for a given child index.
|
|
1009
|
+
* @param childIndex uint8_t
|
|
1010
|
+
* @param newPower int8_t
|
|
1011
|
+
*/
|
|
1012
|
+
ezspSetChildPower(childIndex: number, newPower: number): Promise<void>;
|
|
820
1013
|
/**
|
|
821
1014
|
* Convert a node ID to a child index
|
|
822
1015
|
* @param childId The node ID of the child
|
|
823
1016
|
* @returns uint8_t The child index or 0xFF if the node ID doesn't belong to a child
|
|
824
1017
|
*/
|
|
825
|
-
ezspChildIndex(childId:
|
|
1018
|
+
ezspChildIndex(childId: NodeId): Promise<number>;
|
|
826
1019
|
/**
|
|
827
1020
|
* Returns the source route table total size.
|
|
828
1021
|
* @returns uint8_t Total size of source route table.
|
|
@@ -837,47 +1030,52 @@ export declare class Ezsp extends EventEmitter {
|
|
|
837
1030
|
* Returns information about a source route table entry
|
|
838
1031
|
* @param index uint8_t The index of the entry of interest in the source route table.
|
|
839
1032
|
* Possible indexes range from zero to SOURCE_ROUTE_TABLE_FILLED_SIZE.
|
|
840
|
-
* @returns
|
|
841
|
-
*
|
|
1033
|
+
* @returns
|
|
1034
|
+
* - SLStatus.OK if there is source route entry at index.
|
|
1035
|
+
* - SLStatus.NOT_FOUND if there is no source route at index.
|
|
1036
|
+
* @returns NodeId * The node ID of the destination in that entry.
|
|
842
1037
|
* @returns uint8_t * The closer node index for this source route table entry
|
|
843
1038
|
*/
|
|
844
|
-
ezspGetSourceRouteTableEntry(index: number): Promise<[
|
|
1039
|
+
ezspGetSourceRouteTableEntry(index: number): Promise<[SLStatus, destination: NodeId, closerIndex: number]>;
|
|
845
1040
|
/**
|
|
846
1041
|
* Returns the neighbor table entry at the given index. The number of active
|
|
847
1042
|
* neighbors can be obtained using the neighborCount command.
|
|
848
1043
|
* @param index uint8_t The index of the neighbor of interest. Neighbors are stored in ascending order by node id,
|
|
849
1044
|
* with all unused entries at the end of the table.
|
|
850
|
-
* @returns
|
|
851
|
-
*
|
|
1045
|
+
* @returns
|
|
1046
|
+
* - SLStatus.FAIL if the index is greater or equal to the number of active neighbors, or if the device is an end device.
|
|
1047
|
+
* - SLStatus.OK otherwise.
|
|
852
1048
|
* @returns EmberNeighborTableEntry * The contents of the neighbor table entry.
|
|
853
1049
|
*/
|
|
854
|
-
ezspGetNeighbor(index: number): Promise<[
|
|
1050
|
+
ezspGetNeighbor(index: number): Promise<[SLStatus, value: EmberNeighborTableEntry]>;
|
|
855
1051
|
/**
|
|
856
1052
|
* Return EmberStatus depending on whether the frame counter of the node is
|
|
857
1053
|
* found in the neighbor or child table. This function gets the last received
|
|
858
1054
|
* frame counter as found in the Network Auxiliary header for the specified
|
|
859
1055
|
* neighbor or child
|
|
860
1056
|
* @param eui64 eui64 of the node
|
|
861
|
-
* @returns
|
|
1057
|
+
* @returns
|
|
1058
|
+
* - SLStatus.NOT_FOUND if the node is not found in the neighbor or child table.
|
|
1059
|
+
* - SLStatus.OK otherwise
|
|
862
1060
|
* @returns uint32_t * Return the frame counter of the node from the neighbor or child table
|
|
863
1061
|
*/
|
|
864
|
-
ezspGetNeighborFrameCounter(eui64:
|
|
1062
|
+
ezspGetNeighborFrameCounter(eui64: EUI64): Promise<[SLStatus, returnFrameCounter: number]>;
|
|
865
1063
|
/**
|
|
866
1064
|
* Sets the frame counter for the neighbour or child.
|
|
867
1065
|
* @param eui64 eui64 of the node
|
|
868
1066
|
* @param frameCounter uint32_t Return the frame counter of the node from the neighbor or child table
|
|
869
1067
|
* @returns
|
|
870
|
-
* -
|
|
871
|
-
* -
|
|
1068
|
+
* - SLStatus.NOT_FOUND if the node is not found in the neighbor or child table.
|
|
1069
|
+
* - SLStatus.OK otherwise
|
|
872
1070
|
*/
|
|
873
|
-
ezspSetNeighborFrameCounter(eui64:
|
|
1071
|
+
ezspSetNeighborFrameCounter(eui64: EUI64, frameCounter: number): Promise<SLStatus>;
|
|
874
1072
|
/**
|
|
875
1073
|
* Sets the routing shortcut threshold to directly use a neighbor instead of
|
|
876
1074
|
* performing routing.
|
|
877
1075
|
* @param costThresh uint8_t The routing shortcut threshold to configure.
|
|
878
|
-
* @returns An
|
|
1076
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
879
1077
|
*/
|
|
880
|
-
ezspSetRoutingShortcutThreshold(costThresh: number): Promise<
|
|
1078
|
+
ezspSetRoutingShortcutThreshold(costThresh: number): Promise<SLStatus>;
|
|
881
1079
|
/**
|
|
882
1080
|
* Gets the routing shortcut threshold used to differentiate between directly
|
|
883
1081
|
* using a neighbor vs. performing routing.
|
|
@@ -894,11 +1092,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
894
1092
|
* obtained using the getConfigurationValue command.
|
|
895
1093
|
* @param index uint8_t The index of the route table entry of interest.
|
|
896
1094
|
* @returns
|
|
897
|
-
* -
|
|
898
|
-
* -
|
|
1095
|
+
* - SLStatus.FAIL if the index is out of range or the device is an end
|
|
1096
|
+
* - SLStatus.OK otherwise.
|
|
899
1097
|
* @returns EmberRouteTableEntry * The contents of the route table entry.
|
|
900
1098
|
*/
|
|
901
|
-
ezspGetRouteTableEntry(index: number): Promise<[
|
|
1099
|
+
ezspGetRouteTableEntry(index: number): Promise<[SLStatus, value: EmberRouteTableEntry]>;
|
|
902
1100
|
/**
|
|
903
1101
|
* Sets the radio output power at which a node is operating. Ember radios have
|
|
904
1102
|
* discrete power settings. For a list of available power settings, see the
|
|
@@ -908,18 +1106,18 @@ export declare class Ezsp extends EventEmitter {
|
|
|
908
1106
|
* with the node on which it is called. This can lead to disruption of existing
|
|
909
1107
|
* routes and erratic network behavior.
|
|
910
1108
|
* @param power int8_t Desired radio output power, in dBm.
|
|
911
|
-
* @returns An
|
|
1109
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
912
1110
|
*/
|
|
913
|
-
ezspSetRadioPower(power: number): Promise<
|
|
1111
|
+
ezspSetRadioPower(power: number): Promise<SLStatus>;
|
|
914
1112
|
/**
|
|
915
1113
|
* Sets the channel to use for sending and receiving messages. For a list of
|
|
916
1114
|
* available radio channels, see the technical specification for the RF
|
|
917
1115
|
* communication module in your Developer Kit. Note: Care should be taken when
|
|
918
1116
|
* using this API, as all devices on a network must use the same channel.
|
|
919
1117
|
* @param channel uint8_t Desired radio channel.
|
|
920
|
-
* @returns An
|
|
1118
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
921
1119
|
*/
|
|
922
|
-
ezspSetRadioChannel(channel: number): Promise<
|
|
1120
|
+
ezspSetRadioChannel(channel: number): Promise<SLStatus>;
|
|
923
1121
|
/**
|
|
924
1122
|
* Gets the channel in use for sending and receiving messages.
|
|
925
1123
|
* @returns uint8_t Current radio channel.
|
|
@@ -928,10 +1126,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
928
1126
|
/**
|
|
929
1127
|
* Set the configured 802.15.4 CCA mode in the radio.
|
|
930
1128
|
* @param ccaMode uint8_t A RAIL_IEEE802154_CcaMode_t value.
|
|
931
|
-
* @returns An
|
|
932
|
-
* command.
|
|
1129
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
933
1130
|
*/
|
|
934
|
-
ezspSetRadioIeee802154CcaMode(ccaMode: number): Promise<
|
|
1131
|
+
ezspSetRadioIeee802154CcaMode(ccaMode: number): Promise<SLStatus>;
|
|
935
1132
|
/**
|
|
936
1133
|
* Enable/disable concentrator support.
|
|
937
1134
|
* @param on If this bool is true the concentrator support is enabled. Otherwise is disabled.
|
|
@@ -947,16 +1144,31 @@ export declare class Ezsp extends EventEmitter {
|
|
|
947
1144
|
* @param deliveryFailureThreshold uint8_t The number of APS delivery failures that will trigger a re-broadcast of the MTORR.
|
|
948
1145
|
* @param maxHops uint8_t The maximum number of hops that the MTORR broadcast will be allowed to have.
|
|
949
1146
|
* A value of 0 will be converted to the EMBER_MAX_HOPS value set by the stack.
|
|
950
|
-
* @returns An
|
|
1147
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1148
|
+
*/
|
|
1149
|
+
ezspSetConcentrator(on: boolean, concentratorType: number, minTime: number, maxTime: number, routeErrorThreshold: number, deliveryFailureThreshold: number, maxHops: number): Promise<SLStatus>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Starts periodic many-to-one route discovery.
|
|
1152
|
+
* Periodic discovery is started by default on bootup, but this function may be used if discovery
|
|
1153
|
+
* has been stopped by a call to ::ezspConcentratorStopDiscovery().
|
|
951
1154
|
*/
|
|
952
|
-
|
|
1155
|
+
ezspConcentratorStartDiscovery(): Promise<void>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Stops periodic many-to-one route discovery.
|
|
1158
|
+
*/
|
|
1159
|
+
ezspConcentratorStopDiscovery(): Promise<void>;
|
|
1160
|
+
/**
|
|
1161
|
+
* Notes when a route error has occurred.
|
|
1162
|
+
* @param status
|
|
1163
|
+
* @param nodeId
|
|
1164
|
+
*/
|
|
1165
|
+
ezspConcentratorNoteRouteError(status: SLStatus, nodeId: NodeId): Promise<void>;
|
|
953
1166
|
/**
|
|
954
1167
|
* Sets the error code that is sent back from a router with a broken route.
|
|
955
1168
|
* @param errorCode uint8_t Desired error code.
|
|
956
|
-
* @returns An
|
|
957
|
-
* command.
|
|
1169
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
958
1170
|
*/
|
|
959
|
-
ezspSetBrokenRouteErrorCode(errorCode: number): Promise<
|
|
1171
|
+
ezspSetBrokenRouteErrorCode(errorCode: number): Promise<SLStatus>;
|
|
960
1172
|
/**
|
|
961
1173
|
* This causes to initialize the desired radio interface other than native and
|
|
962
1174
|
* form a new network by becoming the coordinator with same panId as native
|
|
@@ -966,15 +1178,15 @@ export declare class Ezsp extends EventEmitter {
|
|
|
966
1178
|
* @param channel uint8_t Desired radio channel.
|
|
967
1179
|
* @param power int8_t Desired radio output power, in dBm.
|
|
968
1180
|
* @param bitmask Network configuration bitmask.
|
|
969
|
-
* @returns An
|
|
1181
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
970
1182
|
*/
|
|
971
|
-
ezspMultiPhyStart(phyIndex: number, page: number, channel: number, power: number, bitmask: EmberMultiPhyNwkConfig): Promise<
|
|
1183
|
+
ezspMultiPhyStart(phyIndex: number, page: number, channel: number, power: number, bitmask: EmberMultiPhyNwkConfig): Promise<SLStatus>;
|
|
972
1184
|
/**
|
|
973
1185
|
* This causes to bring down the radio interface other than native.
|
|
974
1186
|
* @param phyIndex uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.
|
|
975
|
-
* @returns An
|
|
1187
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
976
1188
|
*/
|
|
977
|
-
ezspMultiPhyStop(phyIndex: number): Promise<
|
|
1189
|
+
ezspMultiPhyStop(phyIndex: number): Promise<SLStatus>;
|
|
978
1190
|
/**
|
|
979
1191
|
* Sets the radio output power for desired phy interface at which a node is
|
|
980
1192
|
* operating. Ember radios have discrete power settings. For a list of available
|
|
@@ -985,15 +1197,14 @@ export declare class Ezsp extends EventEmitter {
|
|
|
985
1197
|
* can lead to disruption of existing routes and erratic network behavior.
|
|
986
1198
|
* @param phyIndex uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.
|
|
987
1199
|
* @param power int8_t Desired radio output power, in dBm.
|
|
988
|
-
* @returns An
|
|
989
|
-
* command.
|
|
1200
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
990
1201
|
*/
|
|
991
|
-
ezspMultiPhySetRadioPower(phyIndex: number, power: number): Promise<
|
|
1202
|
+
ezspMultiPhySetRadioPower(phyIndex: number, power: number): Promise<SLStatus>;
|
|
992
1203
|
/**
|
|
993
1204
|
* Send Link Power Delta Request from a child to its parent
|
|
994
|
-
* @returns An
|
|
1205
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
995
1206
|
*/
|
|
996
|
-
ezspSendLinkPowerDeltaRequest(): Promise<
|
|
1207
|
+
ezspSendLinkPowerDeltaRequest(): Promise<SLStatus>;
|
|
997
1208
|
/**
|
|
998
1209
|
* Sets the channel for desired phy interface to use for sending and receiving
|
|
999
1210
|
* messages. For a list of available radio pages and channels, see the technical
|
|
@@ -1003,33 +1214,33 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1003
1214
|
* @param phyIndex uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.
|
|
1004
1215
|
* @param page uint8_t Desired radio channel page.
|
|
1005
1216
|
* @param channel uint8_t Desired radio channel.
|
|
1006
|
-
* @returns An
|
|
1217
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
1007
1218
|
*/
|
|
1008
|
-
ezspMultiPhySetRadioChannel(phyIndex: number, page: number, channel: number): Promise<
|
|
1219
|
+
ezspMultiPhySetRadioChannel(phyIndex: number, page: number, channel: number): Promise<SLStatus>;
|
|
1009
1220
|
/**
|
|
1010
1221
|
* Obtains the current duty cycle state.
|
|
1011
|
-
* @returns An
|
|
1222
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
1012
1223
|
* @returns EmberDutyCycleState * The current duty cycle state in effect.
|
|
1013
1224
|
*/
|
|
1014
|
-
ezspGetDutyCycleState(): Promise<[
|
|
1225
|
+
ezspGetDutyCycleState(): Promise<[SLStatus, returnedState: EmberDutyCycleState]>;
|
|
1015
1226
|
/**
|
|
1016
1227
|
* Set the current duty cycle limits configuration. The Default limits set by
|
|
1017
1228
|
* stack if this call is not made.
|
|
1018
1229
|
* @param limits EmberDutyCycleLimits * The duty cycle limits configuration to utilize.
|
|
1019
|
-
* @returns
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1230
|
+
* @returns
|
|
1231
|
+
* - SLStatus.OK if the duty cycle limit configurations set successfully,
|
|
1232
|
+
* - SLStatus.INVALID_PARAMETER if set illegal value such as setting only one of the limits to default
|
|
1233
|
+
* or violates constraints Susp > Crit > Limi,
|
|
1234
|
+
* - SLStatus.INVALID_STATE if device is operating on 2.4Ghz
|
|
1023
1235
|
*/
|
|
1024
|
-
ezspSetDutyCycleLimitsInStack(limits: EmberDutyCycleLimits): Promise<
|
|
1236
|
+
ezspSetDutyCycleLimitsInStack(limits: EmberDutyCycleLimits): Promise<SLStatus>;
|
|
1025
1237
|
/**
|
|
1026
|
-
* Obtains the current duty cycle limits that were previously set by a call to
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
* @returns An EmberStatus value indicating the success or failure of the command.
|
|
1238
|
+
* Obtains the current duty cycle limits that were previously set by a call to emberSetDutyCycleLimitsInStack(),
|
|
1239
|
+
* or the defaults set by the stack if no set call was made.
|
|
1240
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
1030
1241
|
* @returns EmberDutyCycleLimits * Return current duty cycle limits if returnedLimits is not NULL
|
|
1031
1242
|
*/
|
|
1032
|
-
ezspGetDutyCycleLimits(): Promise<[
|
|
1243
|
+
ezspGetDutyCycleLimits(): Promise<[SLStatus, returnedLimits: EmberDutyCycleLimits]>;
|
|
1033
1244
|
/**
|
|
1034
1245
|
* Returns the duty cycle of the stack's connected children that are being
|
|
1035
1246
|
* monitored, up to maxDevices. It indicates the amount of overall duty cycle
|
|
@@ -1038,12 +1249,12 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1038
1249
|
* The passed pointer arrayOfDeviceDutyCycles MUST have space for maxDevices.
|
|
1039
1250
|
* @param maxDevices uint8_t Number of devices to retrieve consumed duty cycle.
|
|
1040
1251
|
* @returns
|
|
1041
|
-
* -
|
|
1042
|
-
* -
|
|
1252
|
+
* - SLStatus.OK if the duty cycles were read successfully,
|
|
1253
|
+
* - SLStatus.INVALID_PARAMETER maxDevices is greater than SL_ZIGBEE_MAX_END_DEVICE_CHILDREN + 1.
|
|
1043
1254
|
* @returns uint8_t * Consumed duty cycles up to maxDevices. When the number of children that are being monitored is less than maxDevices,
|
|
1044
|
-
* the
|
|
1255
|
+
* the NodeId element in the EmberPerDeviceDutyCycle will be 0xFFFF.
|
|
1045
1256
|
*/
|
|
1046
|
-
ezspGetCurrentDutyCycle(maxDevices: number): Promise<[
|
|
1257
|
+
ezspGetCurrentDutyCycle(maxDevices: number): Promise<[SLStatus, arrayOfDeviceDutyCycles: number[]]>;
|
|
1047
1258
|
/**
|
|
1048
1259
|
* Callback
|
|
1049
1260
|
* Callback fires when the duty cycle state has changed
|
|
@@ -1056,26 +1267,20 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1056
1267
|
*/
|
|
1057
1268
|
ezspDutyCycleHandler(channelPage: number, channel: number, state: EmberDutyCycleState, totalDevices: number, arrayOfDeviceDutyCycles: EmberPerDeviceDutyCycle[]): void;
|
|
1058
1269
|
/**
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1270
|
+
* Configure the number of beacons to store when issuing active scans for networks.
|
|
1271
|
+
* @param numBeacons uint8_t The number of beacons to cache when scanning.
|
|
1061
1272
|
* @returns
|
|
1062
|
-
* -
|
|
1063
|
-
* -
|
|
1064
|
-
* - EMBER_ERR_FATAL if no first beacon found.
|
|
1065
|
-
* @returns EmberBeaconIterator * The iterator to use when returning the first beacon. This argument must not be NULL.
|
|
1273
|
+
* - SLStatus.INVALID_PARAMETER if numBeacons is greater than SL_ZIGBEE_MAX_BEACONS_TO_STORE
|
|
1274
|
+
* - SLStatus.OK
|
|
1066
1275
|
*/
|
|
1067
|
-
|
|
1276
|
+
ezspSetNumBeaconToStore(numBeacons: number): Promise<SLStatus>;
|
|
1068
1277
|
/**
|
|
1069
|
-
*
|
|
1070
|
-
*
|
|
1071
|
-
* @returns
|
|
1072
|
-
*
|
|
1073
|
-
* - EMBER_BAD_ARGUMENT if input parameters are invalid,
|
|
1074
|
-
* - EMBER_ERR_FATAL if no next beacon found.
|
|
1075
|
-
* @returns EmberBeaconData * The next beacon retrieved. It is assumed that emberGetFirstBeacon has been called first.
|
|
1076
|
-
* This argument must not be NULL.
|
|
1278
|
+
* Fetches the specified beacon in the cache. Beacons are stored in cache after issuing an active scan.
|
|
1279
|
+
* @param beaconNumber uint8_t The beacon index to fetch. Valid values range from 0 to ezspGetNumStoredBeacons-1.
|
|
1280
|
+
* @returns An appropriate SLStatus status code.
|
|
1281
|
+
* @returns EmberBeaconData * The beacon to populate upon success.
|
|
1077
1282
|
*/
|
|
1078
|
-
|
|
1283
|
+
ezspGetStoredBeacon(beaconNumber: number): Promise<[SLStatus, beacon: EmberBeaconData]>;
|
|
1079
1284
|
/**
|
|
1080
1285
|
* Returns the number of cached beacons that have been collected from a scan.
|
|
1081
1286
|
* @returns uint8_t The number of cached beacons that have been collected from a scan.
|
|
@@ -1083,40 +1288,92 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1083
1288
|
ezspGetNumStoredBeacons(): Promise<number>;
|
|
1084
1289
|
/**
|
|
1085
1290
|
* Clears all cached beacons that have been collected from a scan.
|
|
1291
|
+
* @returns An SLStatus value indicating success or the reason for failure. Always `OK` in v13-.
|
|
1086
1292
|
*/
|
|
1087
|
-
ezspClearStoredBeacons(): Promise<
|
|
1293
|
+
ezspClearStoredBeacons(): Promise<SLStatus>;
|
|
1088
1294
|
/**
|
|
1089
1295
|
* This call sets the radio channel in the stack and propagates the information
|
|
1090
1296
|
* to the hardware.
|
|
1091
1297
|
* @param radioChannel uint8_t The radio channel to be set.
|
|
1092
|
-
* @returns An
|
|
1298
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1299
|
+
*/
|
|
1300
|
+
ezspSetLogicalAndRadioChannel(radioChannel: number): Promise<SLStatus>;
|
|
1301
|
+
/**
|
|
1302
|
+
* Form a new sleepy-to-sleepy network.
|
|
1303
|
+
* If the network is using security, the device must call sli_zigbee_stack_set_initial_security_state() first.
|
|
1304
|
+
* @param parameters Specification of the new network.
|
|
1305
|
+
* @param initiator Whether this device is initiating or joining the network.
|
|
1306
|
+
* @returns An SLStatus value indicating success or a reason for failure.
|
|
1307
|
+
*/
|
|
1308
|
+
ezspSleepyToSleepyNetworkStart(parameters: EmberNetworkParameters, initiator: boolean): Promise<SLStatus>;
|
|
1309
|
+
/**
|
|
1310
|
+
* Send a Zigbee NWK Leave command to the destination.
|
|
1311
|
+
* @param destination Node ID of the device being told to leave.
|
|
1312
|
+
* @param flags Bitmask indicating additional considerations for the leave request.
|
|
1313
|
+
* @returns Status indicating success or a reason for failure. Call is invalid if destination is on network or is the local node.
|
|
1314
|
+
*/
|
|
1315
|
+
ezspSendZigbeeLeave(destination: PanId, flags: Zdo.LeaveRequestFlags): Promise<SLStatus>;
|
|
1316
|
+
/**
|
|
1317
|
+
* Indicate the state of permit joining in MAC.
|
|
1318
|
+
* @returns Whether the current network permits joining.
|
|
1319
|
+
*/
|
|
1320
|
+
ezspGetPermitJoining(): Promise<boolean>;
|
|
1321
|
+
/**
|
|
1322
|
+
* Get the 8-byte extended PAN ID of this node.
|
|
1323
|
+
* @returns Extended PAN ID of this node. Valid only if it is currently on a network.
|
|
1324
|
+
*/
|
|
1325
|
+
ezspGetExtendedPanId(): Promise<ExtendedPanId>;
|
|
1326
|
+
/**
|
|
1327
|
+
* Get the current network.
|
|
1328
|
+
* @returns Return the current network index.
|
|
1093
1329
|
*/
|
|
1094
|
-
|
|
1330
|
+
ezspGetCurrentNetwork(): Promise<number>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Set initial outgoing link cost for neighbor.
|
|
1333
|
+
* @param cost The new default cost. Valid values are 0, 1, 3, 5, and 7.
|
|
1334
|
+
* @returns Whether or not initial cost was successfully set.
|
|
1335
|
+
*/
|
|
1336
|
+
ezspSetInitialNeighborOutgoingCost(cost: number): Promise<SLStatus>;
|
|
1337
|
+
/**
|
|
1338
|
+
* Get initial outgoing link cost for neighbor.
|
|
1339
|
+
* @returns The default cost associated with new neighbor's outgoing links.
|
|
1340
|
+
*/
|
|
1341
|
+
ezspGetInitialNeighborOutgoingCost(): Promise<number>;
|
|
1342
|
+
/**
|
|
1343
|
+
* Indicate whether a rejoining neighbor should have its incoming frame counter reset.
|
|
1344
|
+
* @param reset
|
|
1345
|
+
*/
|
|
1346
|
+
ezspResetRejoiningNeighborsFrameCounter(reset: boolean): Promise<void>;
|
|
1347
|
+
/**
|
|
1348
|
+
* Check whether a rejoining neighbor will have its incoming frame counter reset based on the currently set policy.
|
|
1349
|
+
* @returns Whether or not a rejoining neighbor's incoming FC gets reset (true or false).
|
|
1350
|
+
*/
|
|
1351
|
+
ezspIsResetRejoiningNeighborsFrameCounterEnabled(): Promise<boolean>;
|
|
1095
1352
|
/**
|
|
1096
1353
|
* Deletes all binding table entries.
|
|
1097
|
-
* @returns An
|
|
1354
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1098
1355
|
*/
|
|
1099
|
-
ezspClearBindingTable(): Promise<
|
|
1356
|
+
ezspClearBindingTable(): Promise<SLStatus>;
|
|
1100
1357
|
/**
|
|
1101
1358
|
* Sets an entry in the binding table.
|
|
1102
1359
|
* @param index uint8_t The index of a binding table entry.
|
|
1103
1360
|
* @param value EmberBindingTableEntry * The contents of the binding entry.
|
|
1104
|
-
* @returns An
|
|
1361
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1105
1362
|
*/
|
|
1106
|
-
ezspSetBinding(index: number, value: EmberBindingTableEntry): Promise<
|
|
1363
|
+
ezspSetBinding(index: number, value: EmberBindingTableEntry): Promise<SLStatus>;
|
|
1107
1364
|
/**
|
|
1108
1365
|
* Gets an entry from the binding table.
|
|
1109
1366
|
* @param index uint8_t The index of a binding table entry.
|
|
1110
|
-
* @returns An
|
|
1367
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1111
1368
|
* @returns EmberBindingTableEntry * The contents of the binding entry.
|
|
1112
1369
|
*/
|
|
1113
|
-
ezspGetBinding(index: number): Promise<[
|
|
1370
|
+
ezspGetBinding(index: number): Promise<[SLStatus, value: EmberBindingTableEntry]>;
|
|
1114
1371
|
/**
|
|
1115
1372
|
* Deletes a binding table entry.
|
|
1116
1373
|
* @param index uint8_t The index of a binding table entry.
|
|
1117
|
-
* @returns An
|
|
1374
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1118
1375
|
*/
|
|
1119
|
-
ezspDeleteBinding(index: number): Promise<
|
|
1376
|
+
ezspDeleteBinding(index: number): Promise<SLStatus>;
|
|
1120
1377
|
/**
|
|
1121
1378
|
* Indicates whether any messages are currently being sent using this binding
|
|
1122
1379
|
* table entry. Note that this command does not indicate whether a binding is
|
|
@@ -1138,14 +1395,14 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1138
1395
|
* @param index uint8_t The index of a binding table entry.
|
|
1139
1396
|
* @returns The short ID of the destination node or EMBER_NULL_NODE_ID if no destination is known.
|
|
1140
1397
|
*/
|
|
1141
|
-
ezspGetBindingRemoteNodeId(index: number): Promise<
|
|
1398
|
+
ezspGetBindingRemoteNodeId(index: number): Promise<NodeId>;
|
|
1142
1399
|
/**
|
|
1143
1400
|
* Set the node ID for the binding's destination. See getBindingRemoteNodeId for
|
|
1144
1401
|
* a description.
|
|
1145
1402
|
* @param index uint8_t The index of a binding table entry.
|
|
1146
1403
|
* @param The short ID of the destination node.
|
|
1147
1404
|
*/
|
|
1148
|
-
ezspSetBindingRemoteNodeId(index: number, nodeId:
|
|
1405
|
+
ezspSetBindingRemoteNodeId(index: number, nodeId: NodeId): Promise<void>;
|
|
1149
1406
|
/**
|
|
1150
1407
|
* Callback
|
|
1151
1408
|
* The NCP used the external binding modification policy to decide how to handle
|
|
@@ -1154,9 +1411,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1154
1411
|
* command.
|
|
1155
1412
|
* @param entry EmberBindingTableEntry * The requested binding.
|
|
1156
1413
|
* @param index uint8_t The index at which the binding was added.
|
|
1157
|
-
* @param policyDecision
|
|
1414
|
+
* @param policyDecision SLStatus.OK if the binding was added to the table and any other status if not.
|
|
1158
1415
|
*/
|
|
1159
|
-
ezspRemoteSetBindingHandler(entry: EmberBindingTableEntry, index: number, policyDecision:
|
|
1416
|
+
ezspRemoteSetBindingHandler(entry: EmberBindingTableEntry, index: number, policyDecision: SLStatus): void;
|
|
1160
1417
|
/**
|
|
1161
1418
|
* Callback
|
|
1162
1419
|
* The NCP used the external binding modification policy to decide how to handle
|
|
@@ -1164,116 +1421,88 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1164
1421
|
* but it can change the policy for future decisions using the setPolicy
|
|
1165
1422
|
* command.
|
|
1166
1423
|
* @param index uint8_t The index of the binding whose deletion was requested.
|
|
1167
|
-
* @param policyDecision
|
|
1424
|
+
* @param policyDecision SLStatus.OK if the binding was removed from the table and any other status if not.
|
|
1168
1425
|
*/
|
|
1169
|
-
ezspRemoteDeleteBindingHandler(index: number, policyDecision:
|
|
1426
|
+
ezspRemoteDeleteBindingHandler(index: number, policyDecision: SLStatus): void;
|
|
1170
1427
|
/**
|
|
1171
1428
|
* Returns the maximum size of the payload. The size depends on the security level in use.
|
|
1172
1429
|
* @returns uint8_t The maximum APS payload length.
|
|
1173
1430
|
*/
|
|
1174
1431
|
ezspMaximumPayloadLength(): Promise<number>;
|
|
1175
1432
|
/**
|
|
1176
|
-
* Sends a unicast message as per the ZigBee specification.
|
|
1177
|
-
* arrive at its destination only if there is a known route to the destination
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1180
|
-
*
|
|
1181
|
-
*
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1184
|
-
* will
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1190
|
-
*
|
|
1191
|
-
* EMBER_APS_OPTION_FRAGMENT is set and the low-order byte of the groupId field
|
|
1192
|
-
* in the APS frame is zero). For all subsequent fragments of the same message,
|
|
1193
|
-
* the application must set the sequence number field in the APS frame to the
|
|
1194
|
-
* sequence number assigned by the stack to the first fragment.
|
|
1433
|
+
* Sends a unicast message as per the ZigBee specification.
|
|
1434
|
+
* The message will arrive at its destination only if there is a known route to the destination node.
|
|
1435
|
+
* Setting the ENABLE_ROUTE_DISCOVERY option will cause a route to be discovered if none is known.
|
|
1436
|
+
* Setting the FORCE_ROUTE_DISCOVERY option will force route discovery.
|
|
1437
|
+
* Routes to end-device children of the local node are always known.
|
|
1438
|
+
* Setting the APS_RETRY option will cause the message to be retransmitted until either a matching acknowledgement is received
|
|
1439
|
+
* or three transmissions have been made.
|
|
1440
|
+
* Note: Using the FORCE_ROUTE_DISCOVERY option will cause the first transmission to be consumed by a route request as part of discovery,
|
|
1441
|
+
* so the application payload of this packet will not reach its destination on the first attempt. If you want the packet to reach its destination,
|
|
1442
|
+
* the APS_RETRY option must be set so that another attempt is made to transmit the message with its application payload
|
|
1443
|
+
* after the route has been constructed.
|
|
1444
|
+
* Note: When sending fragmented messages, the stack will only assign a new APS sequence number for the first fragment of the message
|
|
1445
|
+
* (i.e., SL_ZIGBEE_APS_OPTION_FRAGMENT is set and the low-order byte of the groupId field in the APS frame is zero).
|
|
1446
|
+
* For all subsequent fragments of the same message, the application must set the sequence number field in the APS frame
|
|
1447
|
+
* to the sequence number assigned by the stack to the first fragment.
|
|
1195
1448
|
* @param type Specifies the outgoing message type.
|
|
1196
1449
|
* Must be one of EMBER_OUTGOING_DIRECT, EMBER_OUTGOING_VIA_ADDRESS_TABLE, or EMBER_OUTGOING_VIA_BINDING.
|
|
1197
|
-
* @param indexOrDestination Depending on the type of addressing used, this is either the
|
|
1450
|
+
* @param indexOrDestination Depending on the type of addressing used, this is either the NodeId of the destination,
|
|
1198
1451
|
* an index into the address table, or an index into the binding table.
|
|
1199
1452
|
* @param apsFrame EmberApsFrame * The APS frame which is to be added to the message.
|
|
1200
|
-
* @param messageTag uint8_t A value chosen by the Host.
|
|
1453
|
+
* @param messageTag uint8_t (v14+: uint16_t) A value chosen by the Host.
|
|
1454
|
+
* This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1201
1455
|
* @param messageContents uint8_t * Content of the message.
|
|
1202
|
-
* @returns An
|
|
1456
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1203
1457
|
* @returns uint8_t * The sequence number that will be used when this message is transmitted.
|
|
1204
1458
|
*/
|
|
1205
|
-
ezspSendUnicast(type: EmberOutgoingMessageType, indexOrDestination:
|
|
1459
|
+
ezspSendUnicast(type: EmberOutgoingMessageType, indexOrDestination: NodeId, apsFrame: EmberApsFrame, messageTag: number, messageContents: Buffer): Promise<[SLStatus, apsSequence: number]>;
|
|
1206
1460
|
/**
|
|
1207
1461
|
* Sends a broadcast message as per the ZigBee specification.
|
|
1462
|
+
* @param alias uint16_t (unused in v13-) The aliased source from which we send the broadcast.
|
|
1463
|
+
* This must be SL_ZIGBEE_NULL_NODE_ID if we do not need an aliased source
|
|
1208
1464
|
* @param destination The destination to which to send the broadcast. This must be one of the three ZigBee broadcast addresses.
|
|
1465
|
+
* @param nwkSequence uint8_t (unused in v13-) The alias nwk sequence number. This won't be used if there is no aliased source.
|
|
1209
1466
|
* @param apsFrame EmberApsFrame * The APS frame for the message.
|
|
1210
1467
|
* @param radius uint8_t The message will be delivered to all nodes within radius hops of the sender.
|
|
1211
1468
|
* A radius of zero is converted to EMBER_MAX_HOPS.
|
|
1212
|
-
* @param uint8_t A value chosen by the Host.
|
|
1213
|
-
*
|
|
1214
|
-
* @
|
|
1469
|
+
* @param messageTag uint8_t (v14+: uint16_t) A value chosen by the Host.
|
|
1470
|
+
* This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1471
|
+
* @param messageContents uint8_t * The broadcast message.
|
|
1472
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1215
1473
|
* @returns uint8_t * The sequence number that will be used when this message is transmitted.
|
|
1216
1474
|
*/
|
|
1217
|
-
ezspSendBroadcast(destination:
|
|
1475
|
+
ezspSendBroadcast(alias: NodeId, destination: NodeId, nwkSequence: number, apsFrame: EmberApsFrame, radius: number, messageTag: number, messageContents: Buffer): Promise<[SLStatus, apsSequence: number]>;
|
|
1218
1476
|
/**
|
|
1219
|
-
* Sends
|
|
1220
|
-
*
|
|
1221
|
-
* @param
|
|
1222
|
-
* @
|
|
1223
|
-
* @param apsFrame EmberApsFrame * The APS frame for the message.
|
|
1224
|
-
* @param radius uint8_t The message will be delivered to all nodes within radius hops of the sender.
|
|
1225
|
-
* A radius of zero is converted to EMBER_MAX_HOPS.
|
|
1226
|
-
* @param messageTag uint8_t A value chosen by the Host. This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1227
|
-
* @param messageContents uint8_t * The broadcast message.
|
|
1228
|
-
* @returns An EmberStatus value indicating success or the reason for failure.
|
|
1229
|
-
* @returns uint8_t * The APS sequence number that will be used when this message is transmitted.
|
|
1477
|
+
* Sends proxied broadcast message for another node in conjunction with sl_zigbee_proxy_broadcast
|
|
1478
|
+
* where a long source is also specified in the NWK frame control.
|
|
1479
|
+
* @param euiSource The long source from which to send the broadcast
|
|
1480
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1230
1481
|
*/
|
|
1231
|
-
|
|
1482
|
+
ezspProxyNextBroadcastFromLong(euiSource: EUI64): Promise<SLStatus>;
|
|
1232
1483
|
/**
|
|
1233
|
-
* Sends a multicast message to all endpoints that share a specific multicast ID
|
|
1234
|
-
* and are within a specified number of hops of the sender.
|
|
1484
|
+
* Sends a multicast message to all endpoints that share a specific multicast ID and are within a specified number of hops of the sender.
|
|
1235
1485
|
* @param apsFrame EmberApsFrame * The APS frame for the message. The multicast will be sent to the groupId in this frame.
|
|
1236
1486
|
* @param hops uint8_t The message will be delivered to all nodes within this number of hops of the sender.
|
|
1237
1487
|
* A value of zero is converted to EMBER_MAX_HOPS.
|
|
1238
|
-
* @param
|
|
1488
|
+
* @param broadcastAddr uint16_t (unused in v13-) The number of hops that the message will be forwarded by devices
|
|
1489
|
+
* that are not members of the group.
|
|
1239
1490
|
* A value of 7 or greater is treated as infinite.
|
|
1240
|
-
* @param
|
|
1241
|
-
* @param
|
|
1491
|
+
* @param alias uint16_t (unused in v13-) The alias source address. This must be SL_ZIGBEE_NULL_NODE_ID if we do not need an aliased source
|
|
1492
|
+
* @param nwkSequence uint8_t (unused in v13-) The alias sequence number. This won't be used if there is no aliased source.
|
|
1493
|
+
* @param messageTag uint8_t (v14+: uint16_t) A value chosen by the Host.
|
|
1494
|
+
* This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1242
1495
|
* @param messageContents uint8_t * The multicast message.
|
|
1243
|
-
* @returns An
|
|
1244
|
-
* -
|
|
1245
|
-
* -
|
|
1246
|
-
* -
|
|
1247
|
-
* -
|
|
1248
|
-
* -
|
|
1249
|
-
* -
|
|
1496
|
+
* @returns An SLStatus value. For any result other than SLStatus.OK, the message will not be sent.
|
|
1497
|
+
* - SLStatus.OK - The message has been submitted for transmission.
|
|
1498
|
+
* - SLStatus.INVALID_INDEX - The bindingTableIndex refers to a non-multicast binding.
|
|
1499
|
+
* - SLStatus.NETWORK_DOWN - The node is not part of a network.
|
|
1500
|
+
* - SLStatus.MESSAGE_TOO_LONG - The message is too large to fit in a MAC layer frame.
|
|
1501
|
+
* - SLStatus.ALLOCATION_FAILED - The free packet buffer pool is empty.
|
|
1502
|
+
* - SLStatus.BUSY - Insufficient resources available in Network or MAC layers to send message.
|
|
1250
1503
|
* @returns uint8_t * The sequence number that will be used when this message is transmitted.
|
|
1251
1504
|
*/
|
|
1252
|
-
ezspSendMulticast(apsFrame: EmberApsFrame, hops: number,
|
|
1253
|
-
/**
|
|
1254
|
-
* Sends a multicast message to all endpoints that share a specific multicast ID
|
|
1255
|
-
* and are within a specified number of hops of the sender.
|
|
1256
|
-
* @param apsFrame EmberApsFrame * The APS frame for the message. The multicast will be sent to the groupId in this frame.
|
|
1257
|
-
* @param hops uint8_t The message will be delivered to all nodes within this number of hops of the sender.
|
|
1258
|
-
* A value of zero is converted to EMBER_MAX_HOPS.
|
|
1259
|
-
* @param nonmemberRadius uint8_t The number of hops that the message will be forwarded by devices that are not members of the group.
|
|
1260
|
-
* A value of 7 or greater is treated as infinite.
|
|
1261
|
-
* @param alias uint16_t The alias source address
|
|
1262
|
-
* @param nwkSequence uint8_t the alias sequence number
|
|
1263
|
-
* @param messageTag uint8_t A value chosen by the Host. This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1264
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
1265
|
-
* @param messageContents uint8_t * The multicast message.
|
|
1266
|
-
* @returns An EmberStatus value. For any result other than EMBER_SUCCESS, the
|
|
1267
|
-
* message will not be sent. EMBER_SUCCESS - The message has been submitted for
|
|
1268
|
-
* transmission. EMBER_INVALID_BINDING_INDEX - The bindingTableIndex refers to a
|
|
1269
|
-
* non-multicast binding. EMBER_NETWORK_DOWN - The node is not part of a
|
|
1270
|
-
* network. EMBER_MESSAGE_TOO_LONG - The message is too large to fit in a MAC
|
|
1271
|
-
* layer frame. EMBER_NO_BUFFERS - The free packet buffer pool is empty.
|
|
1272
|
-
* EMBER_NETWORK_BUSY - Insufficient resources available in Network or MAC
|
|
1273
|
-
* layers to send message.
|
|
1274
|
-
* @returns The sequence number that will be used when this message is transmitted.
|
|
1275
|
-
*/
|
|
1276
|
-
ezspSendMulticastWithAlias(apsFrame: EmberApsFrame, hops: number, nonmemberRadius: number, alias: number, nwkSequence: number, messageTag: number, messageContents: Buffer): Promise<[EmberStatus, apsSequence: number]>;
|
|
1505
|
+
ezspSendMulticast(apsFrame: EmberApsFrame, hops: number, broadcastAddr: number, alias: NodeId, nwkSequence: number, messageTag: number, messageContents: Buffer): Promise<[SLStatus, apsSequence: number]>;
|
|
1277
1506
|
/**
|
|
1278
1507
|
* Sends a reply to a received unicast message. The incomingMessageHandler
|
|
1279
1508
|
* callback for the unicast being replied to supplies the values for all the
|
|
@@ -1282,34 +1511,35 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1282
1511
|
* @param apsFrame EmberApsFrame * Value supplied by incoming unicast.
|
|
1283
1512
|
* @param uint8_t The length of the messageContents parameter in bytes.
|
|
1284
1513
|
* @param uint8_t * The reply message.
|
|
1285
|
-
* @returns
|
|
1286
|
-
* -
|
|
1514
|
+
* @returns
|
|
1515
|
+
* - SLStatus.INVALID_STATE - The SL_ZIGBEE_EZSP_UNICAST_REPLIES_POLICY is set to SL_ZIGBEE_EZSP_HOST_WILL_NOT_SUPPLY_REPLY.
|
|
1287
1516
|
* This means the NCP will automatically send an empty reply. The Host must change
|
|
1288
|
-
* the policy to
|
|
1517
|
+
* the policy to SL_ZIGBEE_EZSP_HOST_WILL_SUPPLY_REPLY before it can supply the reply.
|
|
1289
1518
|
* There is one exception to this rule: In the case of responses to message
|
|
1290
1519
|
* fragments, the host must call sendReply when a message fragment is received.
|
|
1291
1520
|
* In this case, the policy set on the NCP does not matter. The NCP expects a
|
|
1292
1521
|
* sendReply call from the Host for message fragments regardless of the current
|
|
1293
1522
|
* policy settings.
|
|
1294
|
-
* -
|
|
1295
|
-
* -
|
|
1296
|
-
* -
|
|
1523
|
+
* - SLStatus.ALLOCATION_FAILED - Not enough memory was available to send the reply.
|
|
1524
|
+
* - SLStatus.BUSY - Either no route or insufficient resources available.
|
|
1525
|
+
* - SLStatus.OK - The reply was successfully queued for transmission.
|
|
1297
1526
|
*/
|
|
1298
|
-
ezspSendReply(sender:
|
|
1527
|
+
ezspSendReply(sender: NodeId, apsFrame: EmberApsFrame, messageContents: Buffer): Promise<SLStatus>;
|
|
1299
1528
|
/**
|
|
1300
1529
|
* Callback
|
|
1301
1530
|
* A callback indicating the stack has completed sending a message.
|
|
1531
|
+
* @param status
|
|
1532
|
+
* - SL_STATUS_OK if an ACK was received from the destination
|
|
1533
|
+
* - SL_STATUS_ZIGBEE_DELIVERY_FAILED if no ACK was received.
|
|
1302
1534
|
* @param type The type of message sent.
|
|
1303
1535
|
* @param indexOrDestination uint16_t The destination to which the message was sent, for direct unicasts,
|
|
1304
1536
|
* or the address table or binding index for other unicasts. The value is unspecified for multicasts and broadcasts.
|
|
1305
1537
|
* @param apsFrame EmberApsFrame * The APS frame for the message.
|
|
1306
1538
|
* @param messageTag uint8_t The value supplied by the Host in the ezspSendUnicast, ezspSendBroadcast or ezspSendMulticast command.
|
|
1307
|
-
* @param status An EmberStatus value of EMBER_SUCCESS if an ACK was received from the destination
|
|
1308
|
-
* or EMBER_DELIVERY_FAILED if no ACK was received.
|
|
1309
1539
|
* @param messageContents uint8_t * The unicast message supplied by the Host. The message contents are only included here if the decision
|
|
1310
1540
|
* for the messageContentsInCallback policy is messageTagAndContentsInCallback.
|
|
1311
1541
|
*/
|
|
1312
|
-
ezspMessageSentHandler(type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, messageTag: number,
|
|
1542
|
+
ezspMessageSentHandler(status: SLStatus, type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, messageTag: number, messageContents?: Buffer): void;
|
|
1313
1543
|
/**
|
|
1314
1544
|
* Sends a route request packet that creates routes from every node in the
|
|
1315
1545
|
* network back to this node. This function should be called by an application
|
|
@@ -1343,10 +1573,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1343
1573
|
* The latter is used when the concentrator has insufficient RAM to store all outbound source routes.
|
|
1344
1574
|
* In that case, route records are sent to the concentrator prior to every inbound APS unicast.
|
|
1345
1575
|
* @param radius uint8_t The maximum number of hops the route request will be relayed. A radius of zero is converted to EMBER_MAX_HOPS
|
|
1346
|
-
* @returns
|
|
1347
|
-
* transmit queue,
|
|
1576
|
+
* @returns
|
|
1577
|
+
* - SLStatus.OK if the route request was successfully submitted to the transmit queue,
|
|
1578
|
+
* - SLStatus.FAIL otherwise.
|
|
1348
1579
|
*/
|
|
1349
|
-
ezspSendManyToOneRouteRequest(concentratorType: number, radius: number): Promise<
|
|
1580
|
+
ezspSendManyToOneRouteRequest(concentratorType: number, radius: number): Promise<SLStatus>;
|
|
1350
1581
|
/**
|
|
1351
1582
|
* Periodically request any pending data from our parent. Setting interval to 0
|
|
1352
1583
|
* or units to EMBER_EVENT_INACTIVE will generate a single poll.
|
|
@@ -1358,48 +1589,81 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1358
1589
|
* and EMBER_MAC_NO_DATA is counted as a failure.
|
|
1359
1590
|
* @returns The result of sending the first poll.
|
|
1360
1591
|
*/
|
|
1361
|
-
ezspPollForData(interval: number, units: EmberEventUnits, failureLimit: number): Promise<
|
|
1592
|
+
ezspPollForData(interval: number, units: EmberEventUnits, failureLimit: number): Promise<SLStatus>;
|
|
1362
1593
|
/**
|
|
1363
1594
|
* Callback
|
|
1364
1595
|
* Indicates the result of a data poll to the parent of the local node.
|
|
1365
|
-
* @param status An
|
|
1366
|
-
*
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1596
|
+
* @param status An SLStatus value:
|
|
1597
|
+
* - SLStatus.OK - Data was received in response to the poll.
|
|
1598
|
+
* - SLStatus.MAC_NO_DATA - No data was pending.
|
|
1599
|
+
* - SLStatus.ZIGBEE_DELIVERY_FAILED - The poll message could not be sent.
|
|
1600
|
+
* - SLStatus.MAC_NO_ACK_RECEIVED - The poll message was sent but not acknowledged by the parent.
|
|
1601
|
+
*/
|
|
1602
|
+
ezspPollCompleteHandler(status: SLStatus): void;
|
|
1603
|
+
/**
|
|
1604
|
+
* Set a flag to indicate that a message is pending for a child.
|
|
1605
|
+
* The next time that the child polls, it will be informed that it has a pending message.
|
|
1606
|
+
* The message is sent from emberPollHandler, which is called when the child requests data.
|
|
1607
|
+
* @param childId The ID of the child that just polled for data.
|
|
1608
|
+
* @returns
|
|
1609
|
+
* - SLStatus.OK - The next time that the child polls, it will be informed that it has pending data.
|
|
1610
|
+
* - SLStatus.NOT_JOINED - The child identified by childId is not our child.
|
|
1370
1611
|
*/
|
|
1371
|
-
|
|
1612
|
+
ezspSetMessageFlag(childId: NodeId): Promise<SLStatus>;
|
|
1613
|
+
/**
|
|
1614
|
+
* Clear a flag to indicate that there are no more messages for a child.
|
|
1615
|
+
* The next time the child polls, it will be informed that it does not have any pending messages.
|
|
1616
|
+
* @param childId The ID of the child that no longer has pending messages.
|
|
1617
|
+
* @returns
|
|
1618
|
+
* - SLStatus.OK - The next time that the child polls, it will be informed that it does not have any pending messages.
|
|
1619
|
+
* - SLStatus.NOT_JOINED - The child identified by childId is not our child.
|
|
1620
|
+
*/
|
|
1621
|
+
ezspClearMessageFlag(childId: NodeId): Promise<SLStatus>;
|
|
1372
1622
|
/**
|
|
1373
1623
|
* Callback
|
|
1374
1624
|
* Indicates that the local node received a data poll from a child.
|
|
1375
1625
|
* @param childId The node ID of the child that is requesting data.
|
|
1376
1626
|
* @param transmitExpected True if transmit is expected, false otherwise.
|
|
1377
1627
|
*/
|
|
1378
|
-
ezspPollHandler(childId:
|
|
1628
|
+
ezspPollHandler(childId: NodeId, transmitExpected: boolean): void;
|
|
1379
1629
|
/**
|
|
1380
|
-
*
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1383
|
-
*
|
|
1384
|
-
* of the
|
|
1385
|
-
* @param
|
|
1630
|
+
* Add a child to the child/neighbor table only on SoC, allowing direct manipulation of these tables by the application.
|
|
1631
|
+
* This can affect the network functionality, and needs to be used wisely.
|
|
1632
|
+
* If used appropriately, the application can maintain more than the maximum of children provided by the stack.
|
|
1633
|
+
* @param shortId The preferred short ID of the node.
|
|
1634
|
+
* @param longId The long ID of the node.
|
|
1635
|
+
* @param nodeType The nodetype e.g., SL_ZIGBEE_ROUTER defining, if this would be added to the child table or neighbor table.
|
|
1636
|
+
* @returns
|
|
1637
|
+
* - SLStatus.OK - This node has been successfully added.
|
|
1638
|
+
* - SLStatus.FAIL - The child was not added to the child/neighbor table.
|
|
1639
|
+
*/
|
|
1640
|
+
ezspAddChild(shortId: NodeId, longId: EUI64, nodeType: EmberNodeType): Promise<SLStatus>;
|
|
1641
|
+
/**
|
|
1642
|
+
* Remove a node from child/neighbor table only on SoC, allowing direct manipulation of these tables by the application.
|
|
1643
|
+
* This can affect the network functionality, and needs to be used wisely.
|
|
1644
|
+
* @param childEui64 The long ID of the node.
|
|
1645
|
+
* @returns
|
|
1646
|
+
* - SLStatus.OK - This node has been successfully removed.
|
|
1647
|
+
* - SLStatus.FAIL - The node was not found in either of the child or neighbor tables.
|
|
1648
|
+
*/
|
|
1649
|
+
ezspRemoveChild(childEui64: EUI64): Promise<SLStatus>;
|
|
1650
|
+
/**
|
|
1651
|
+
* Remove a neighbor from neighbor table only on SoC, allowing direct manipulation of neighbor table by the application.
|
|
1652
|
+
* This can affect the network functionality, and needs to be used wisely.
|
|
1653
|
+
* @param shortId The short ID of the neighbor.
|
|
1654
|
+
* @param longId The long ID of the neighbor.
|
|
1386
1655
|
*/
|
|
1387
|
-
|
|
1656
|
+
ezspRemoveNeighbor(shortId: NodeId, longId: EUI64): Promise<void>;
|
|
1388
1657
|
/**
|
|
1389
1658
|
* Callback
|
|
1390
1659
|
* A callback indicating a message has been received.
|
|
1391
1660
|
* @param type The type of the incoming message. One of the following: EMBER_INCOMING_UNICAST, EMBER_INCOMING_UNICAST_REPLY,
|
|
1392
1661
|
* EMBER_INCOMING_MULTICAST, EMBER_INCOMING_MULTICAST_LOOPBACK, EMBER_INCOMING_BROADCAST, EMBER_INCOMING_BROADCAST_LOOPBACK
|
|
1393
1662
|
* @param apsFrame EmberApsFrame * The APS frame from the incoming message.
|
|
1394
|
-
* @param
|
|
1395
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during the reception.
|
|
1396
|
-
* @param sender The sender of the message.
|
|
1397
|
-
* @param bindingIndex uint8_t The index of a binding that matches the message or 0xFF if there is no matching binding.
|
|
1398
|
-
* @param addressIndex uint8_t The index of the entry in the address table that matches the sender of the message
|
|
1399
|
-
* or 0xFF if there is no matching entry.
|
|
1663
|
+
* @param packetInfo Miscellanous message information.
|
|
1400
1664
|
* @param messageContents uint8_t * The incoming message.
|
|
1401
1665
|
*/
|
|
1402
|
-
ezspIncomingMessageHandler(type: EmberIncomingMessageType, apsFrame: EmberApsFrame,
|
|
1666
|
+
ezspIncomingMessageHandler(type: EmberIncomingMessageType, apsFrame: EmberApsFrame, packetInfo: EmberRxPacketInfo, messageContents: Buffer): void;
|
|
1403
1667
|
/**
|
|
1404
1668
|
* Sets source route discovery(MTORR) mode to on, off, reschedule
|
|
1405
1669
|
* @param mode uint8_t Source route discovery mode: off:0, on:1, reschedule:2
|
|
@@ -1409,12 +1673,12 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1409
1673
|
/**
|
|
1410
1674
|
* Callback
|
|
1411
1675
|
* A callback indicating that a many-to-one route to the concentrator with the given short and long id is available for use.
|
|
1412
|
-
* @param
|
|
1676
|
+
* @param NodeId The short id of the concentrator.
|
|
1413
1677
|
* @param longId The EUI64 of the concentrator.
|
|
1414
1678
|
* @param cost uint8_t The path cost to the concentrator. The cost may decrease as additional route request packets
|
|
1415
1679
|
* for this discovery arrive, but the callback is made only once.
|
|
1416
1680
|
*/
|
|
1417
|
-
ezspIncomingManyToOneRouteRequestHandler(source:
|
|
1681
|
+
ezspIncomingManyToOneRouteRequestHandler(source: NodeId, longId: EUI64, cost: number): void;
|
|
1418
1682
|
/**
|
|
1419
1683
|
* Callback
|
|
1420
1684
|
* A callback invoked when a route error message is received.
|
|
@@ -1440,7 +1704,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1440
1704
|
* @param status ::EMBER_SOURCE_ROUTE_FAILURE, ::EMBER_MANY_TO_ONE_ROUTE_FAILURE, ::EMBER_MAC_INDIRECT_TIMEOUT
|
|
1441
1705
|
* @param target The short id of the remote node.
|
|
1442
1706
|
*/
|
|
1443
|
-
ezspIncomingRouteErrorHandler(status:
|
|
1707
|
+
ezspIncomingRouteErrorHandler(status: SLStatus, target: NodeId): void;
|
|
1444
1708
|
/**
|
|
1445
1709
|
* Callback
|
|
1446
1710
|
* A callback invoked when a network status/route error message is received.
|
|
@@ -1454,35 +1718,27 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1454
1718
|
* @param errorCode uint8_t One byte over-the-air error code from network status message
|
|
1455
1719
|
* @param target The short ID of the remote node
|
|
1456
1720
|
*/
|
|
1457
|
-
ezspIncomingNetworkStatusHandler(errorCode: EmberStackError, target:
|
|
1721
|
+
ezspIncomingNetworkStatusHandler(errorCode: EmberStackError, target: NodeId): void;
|
|
1458
1722
|
/**
|
|
1459
1723
|
* Callback
|
|
1460
1724
|
* Reports the arrival of a route record command frame.
|
|
1461
|
-
* @param
|
|
1462
|
-
* @param
|
|
1725
|
+
* @param NodeId The source of the route record.
|
|
1726
|
+
* @param EUI64 The EUI64 of the source.
|
|
1463
1727
|
* @param lastHopLqi uint8_t The link quality from the node that last relayed the route record.
|
|
1464
1728
|
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during the reception.
|
|
1465
1729
|
* @param uint8_t The number of relays in relayList.
|
|
1466
1730
|
* @param relayList uint8_t * The route record. Each relay in the list is an uint16_t node ID.
|
|
1467
1731
|
* The list is passed as uint8_t * to avoid alignment problems.
|
|
1468
1732
|
*/
|
|
1469
|
-
ezspIncomingRouteRecordHandler(source:
|
|
1470
|
-
/**
|
|
1471
|
-
* Supply a source route for the next outgoing message.
|
|
1472
|
-
* @param destination The destination of the source route.
|
|
1473
|
-
* @param relayList uint16_t * The source route.
|
|
1474
|
-
* @returns EMBER_SUCCESS if the source route was successfully stored, and
|
|
1475
|
-
* EMBER_NO_BUFFERS otherwise.
|
|
1476
|
-
*/
|
|
1477
|
-
ezspSetSourceRoute(destination: EmberNodeId, relayList: number[]): Promise<EmberStatus>;
|
|
1733
|
+
ezspIncomingRouteRecordHandler(source: NodeId, sourceEui: EUI64, lastHopLqi: number, lastHopRssi: number, relayCount: number, relayList: number[]): void;
|
|
1478
1734
|
/**
|
|
1479
1735
|
* Send the network key to a destination.
|
|
1480
1736
|
* @param targetShort The destination node of the key.
|
|
1481
1737
|
* @param targetLong The long address of the destination node.
|
|
1482
1738
|
* @param parentShortId The parent node of the destination node.
|
|
1483
|
-
* @returns
|
|
1739
|
+
* @returns SLStatus.OK if send was successful
|
|
1484
1740
|
*/
|
|
1485
|
-
ezspUnicastCurrentNetworkKey(targetShort:
|
|
1741
|
+
ezspUnicastCurrentNetworkKey(targetShort: NodeId, targetLong: EUI64, parentShortId: NodeId): Promise<SLStatus>;
|
|
1486
1742
|
/**
|
|
1487
1743
|
* Indicates whether any messages are currently being sent using this address
|
|
1488
1744
|
* table entry. Note that this function does not indicate whether the address
|
|
@@ -1494,49 +1750,36 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1494
1750
|
*/
|
|
1495
1751
|
ezspAddressTableEntryIsActive(addressTableIndex: number): Promise<boolean>;
|
|
1496
1752
|
/**
|
|
1497
|
-
* Sets the EUI64 of an address table entry.
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1753
|
+
* Sets the EUI64 and short ID of an address table entry.
|
|
1754
|
+
* Usually the application will not need to set the short ID in the address table.
|
|
1755
|
+
* Once the remote EUI64 is set the stack is capable of figuring out the short ID on its own.
|
|
1756
|
+
* However, in cases where the application does set the short ID, the application must set the remote EUI64 prior to setting the short ID.
|
|
1757
|
+
* This function will also check other address table entries, the child table and the neighbor table to see
|
|
1758
|
+
* if the node ID for the given EUI64 is already known.
|
|
1759
|
+
* If known then this function will set node ID. If not known it will set the node ID to SL_ZIGBEE_UNKNOWN_NODE_ID.
|
|
1760
|
+
* @param addressTableIndex
|
|
1761
|
+
* @param eui64
|
|
1762
|
+
* @param id
|
|
1504
1763
|
* @returns
|
|
1505
|
-
* -
|
|
1506
|
-
* -
|
|
1507
|
-
*/
|
|
1508
|
-
|
|
1509
|
-
/**
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1514
|
-
* the remote EUI64
|
|
1515
|
-
*
|
|
1516
|
-
*
|
|
1517
|
-
*
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
* Gets the EUI64 of an address table entry.
|
|
1522
|
-
* @param addressTableIndex uint8_t The index of an address table entry.
|
|
1764
|
+
* - SLStatus.OK if the information was successfully set,
|
|
1765
|
+
* - SLStatus.ZIGBEE_ADDRESS_TABLE_ENTRY_IS_ACTIVE otherwise.
|
|
1766
|
+
*/
|
|
1767
|
+
ezspSetAddressTableInfo(addressTableIndex: number, eui64: EUI64, id: NodeId): Promise<SLStatus>;
|
|
1768
|
+
/**
|
|
1769
|
+
* Gets the EUI64 and short ID of an address table entry.
|
|
1770
|
+
* @param addressTableIndex
|
|
1771
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1772
|
+
* @returns One of the following:
|
|
1773
|
+
* - The short ID corresponding to the remote node whose EUI64 is stored in the address table at the given index.
|
|
1774
|
+
* - SL_ZIGBEE_UNKNOWN_NODE_ID:
|
|
1775
|
+
* Indicates that the EUI64 stored in the address table at the given index is valid but the short ID is currently unknown.
|
|
1776
|
+
* - SL_ZIGBEE_DISCOVERY_ACTIVE_NODE_ID:
|
|
1777
|
+
* Indicates that the EUI64 stored in the address table at the given location is valid and network address discovery is underway.
|
|
1778
|
+
* - SL_ZIGBEE_TABLE_ENTRY_UNUSED_NODE_ID:
|
|
1779
|
+
* Indicates that the entry stored in the address table at the given index is not in use.
|
|
1523
1780
|
* @returns The EUI64 of the address table entry is copied to this location.
|
|
1524
1781
|
*/
|
|
1525
|
-
|
|
1526
|
-
/**
|
|
1527
|
-
* Gets the short ID of an address table entry.
|
|
1528
|
-
* @param addressTableIndex uint8_t The index of an address table entry.
|
|
1529
|
-
* @returns One of the following: The short ID corresponding to the remote node
|
|
1530
|
-
* whose EUI64 is stored in the address table at the given index.
|
|
1531
|
-
* - EMBER_UNKNOWN_NODE_ID - Indicates that the EUI64 stored in the address table
|
|
1532
|
-
* at the given index is valid but the short ID is currently unknown.
|
|
1533
|
-
* - EMBER_DISCOVERY_ACTIVE_NODE_ID - Indicates that the EUI64 stored in the
|
|
1534
|
-
* address table at the given location is valid and network address discovery is
|
|
1535
|
-
* underway.
|
|
1536
|
-
* - EMBER_TABLE_ENTRY_UNUSED_NODE_ID - Indicates that the entry stored
|
|
1537
|
-
* in the address table at the given index is not in use.
|
|
1538
|
-
*/
|
|
1539
|
-
ezspGetAddressTableRemoteNodeId(addressTableIndex: number): Promise<EmberNodeId>;
|
|
1782
|
+
ezspGetAddressTableInfo(addressTableIndex: number): Promise<[SLStatus, nodeId: NodeId, eui64: EUI64]>;
|
|
1540
1783
|
/**
|
|
1541
1784
|
* Tells the stack whether or not the normal interval between retransmissions of a retried unicast message should
|
|
1542
1785
|
* be increased by EMBER_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
@@ -1550,17 +1793,19 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1550
1793
|
* @param remoteEui64 The address of the node for which the timeout is to be set.
|
|
1551
1794
|
* @param extendedTimeout true if the retry interval should be increased by EMBER_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
1552
1795
|
* false if the normal retry interval should be used.
|
|
1796
|
+
* @returns An SLStatus value indicating success or the reason for failure. Always `OK` in v13-.
|
|
1553
1797
|
*/
|
|
1554
|
-
ezspSetExtendedTimeout(remoteEui64:
|
|
1798
|
+
ezspSetExtendedTimeout(remoteEui64: EUI64, extendedTimeout: boolean): Promise<SLStatus>;
|
|
1555
1799
|
/**
|
|
1556
1800
|
* Indicates whether or not the stack will extend the normal interval between
|
|
1557
1801
|
* retransmissions of a retried unicast message by
|
|
1558
1802
|
* EMBER_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
1559
1803
|
* @param remoteEui64 The address of the node for which the timeout is to be returned.
|
|
1560
|
-
* @returns
|
|
1561
|
-
*
|
|
1804
|
+
* @returns
|
|
1805
|
+
* - SLStatus.OK if the retry interval will be increased by SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT
|
|
1806
|
+
* - SLStatus.FAIL if the normal retry interval will be used.
|
|
1562
1807
|
*/
|
|
1563
|
-
ezspGetExtendedTimeout(remoteEui64:
|
|
1808
|
+
ezspGetExtendedTimeout(remoteEui64: EUI64): Promise<SLStatus>;
|
|
1564
1809
|
/**
|
|
1565
1810
|
* Replaces the EUI64, short ID and extended timeout setting of an address table
|
|
1566
1811
|
* entry. The previous EUI64, short ID and extended timeout setting are
|
|
@@ -1568,52 +1813,52 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1568
1813
|
* @param addressTableIndex uint8_t The index of the address table entry that will be modified.
|
|
1569
1814
|
* @param newEui64 The EUI64 to be written to the address table entry.
|
|
1570
1815
|
* @param newId One of the following: The short ID corresponding to the new EUI64.
|
|
1571
|
-
*
|
|
1572
|
-
*
|
|
1573
|
-
* @param newExtendedTimeout true if the retry interval should be increased by
|
|
1816
|
+
* SL_ZIGBEE_UNKNOWN_NODE_ID if the new EUI64 is valid but the short ID is unknown and should be discovered by the stack.
|
|
1817
|
+
* SL_ZIGBEE_TABLE_ENTRY_UNUSED_NODE_ID if the address table entry is now unused.
|
|
1818
|
+
* @param newExtendedTimeout true if the retry interval should be increased by SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
1574
1819
|
* false if the normal retry interval should be used.
|
|
1575
|
-
* @returns
|
|
1576
|
-
* were successfully modified,
|
|
1577
|
-
* otherwise.
|
|
1820
|
+
* @returns
|
|
1821
|
+
* - SLStatus.OK if the EUI64, short ID and extended timeout setting were successfully modified,
|
|
1822
|
+
* - SLStatus.ZIGBEE_ADDRESS_TABLE_ENTRY_IS_ACTIVE otherwise.
|
|
1578
1823
|
* @returns oldEui64 The EUI64 of the address table entry before it was modified.
|
|
1579
|
-
* @returns oldId
|
|
1580
|
-
*
|
|
1581
|
-
*
|
|
1582
|
-
* @returns oldExtendedTimeouttrue bool * if the retry interval was being increased by
|
|
1824
|
+
* @returns oldId NodeId * One of the following: The short ID corresponding to the EUI64 before it was modified.
|
|
1825
|
+
* SL_ZIGBEE_UNKNOWN_NODE_ID if the short ID was unknown. SL_ZIGBEE_DISCOVERY_ACTIVE_NODE_ID if discovery of the short ID was underway.
|
|
1826
|
+
* SL_ZIGBEE_TABLE_ENTRY_UNUSED_NODE_ID if the address table entry was unused.
|
|
1827
|
+
* @returns oldExtendedTimeouttrue bool * if the retry interval was being increased by SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
1583
1828
|
* false if the normal retry interval was being used.
|
|
1584
1829
|
*/
|
|
1585
|
-
ezspReplaceAddressTableEntry(addressTableIndex: number, newEui64:
|
|
1830
|
+
ezspReplaceAddressTableEntry(addressTableIndex: number, newEui64: EUI64, newId: NodeId, newExtendedTimeout: boolean): Promise<[SLStatus, oldEui64: EUI64, oldId: NodeId, oldExtendedTimeout: boolean]>;
|
|
1586
1831
|
/**
|
|
1587
1832
|
* Returns the node ID that corresponds to the specified EUI64. The node ID is
|
|
1588
1833
|
* found by searching through all stack tables for the specified EUI64.
|
|
1589
1834
|
* @param eui64 The EUI64 of the node to look up.
|
|
1590
|
-
* @returns The short ID of the node or
|
|
1591
|
-
* known.
|
|
1835
|
+
* @returns The short ID of the node or SL_ZIGBEE_NULL_NODE_ID if the short ID is not known.
|
|
1592
1836
|
*/
|
|
1593
|
-
ezspLookupNodeIdByEui64(eui64:
|
|
1837
|
+
ezspLookupNodeIdByEui64(eui64: EUI64): Promise<NodeId>;
|
|
1594
1838
|
/**
|
|
1595
1839
|
* Returns the EUI64 that corresponds to the specified node ID. The EUI64 is
|
|
1596
1840
|
* found by searching through all stack tables for the specified node ID.
|
|
1597
1841
|
* @param nodeId The short ID of the node to look up.
|
|
1598
|
-
* @returns
|
|
1599
|
-
*
|
|
1842
|
+
* @returns
|
|
1843
|
+
* - SLStatus.OK if the EUI64 was found,
|
|
1844
|
+
* - SLStatus.FAIL if the EUI64 is not known.
|
|
1600
1845
|
* @returns eui64 The EUI64 of the node.
|
|
1601
1846
|
*/
|
|
1602
|
-
ezspLookupEui64ByNodeId(nodeId:
|
|
1847
|
+
ezspLookupEui64ByNodeId(nodeId: NodeId): Promise<[SLStatus, eui64: EUI64]>;
|
|
1603
1848
|
/**
|
|
1604
1849
|
* Gets an entry from the multicast table.
|
|
1605
1850
|
* @param uint8_t The index of a multicast table entry.
|
|
1606
|
-
* @returns An
|
|
1851
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1607
1852
|
* @returns EmberMulticastTableEntry * The contents of the multicast entry.
|
|
1608
1853
|
*/
|
|
1609
|
-
ezspGetMulticastTableEntry(index: number): Promise<[
|
|
1854
|
+
ezspGetMulticastTableEntry(index: number): Promise<[SLStatus, value: EmberMulticastTableEntry]>;
|
|
1610
1855
|
/**
|
|
1611
1856
|
* Sets an entry in the multicast table.
|
|
1612
1857
|
* @param index uint8_t The index of a multicast table entry
|
|
1613
1858
|
* @param EmberMulticastTableEntry * The contents of the multicast entry.
|
|
1614
|
-
* @returns An
|
|
1859
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1615
1860
|
*/
|
|
1616
|
-
ezspSetMulticastTableEntry(index: number, value: EmberMulticastTableEntry): Promise<
|
|
1861
|
+
ezspSetMulticastTableEntry(index: number, value: EmberMulticastTableEntry): Promise<SLStatus>;
|
|
1617
1862
|
/**
|
|
1618
1863
|
* Callback
|
|
1619
1864
|
* A callback invoked by the EmberZNet stack when an id conflict is discovered,
|
|
@@ -1623,80 +1868,94 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1623
1868
|
* application should discontinue any other use of the id.
|
|
1624
1869
|
* @param id The short id for which a conflict was detected
|
|
1625
1870
|
*/
|
|
1626
|
-
ezspIdConflictHandler(id:
|
|
1871
|
+
ezspIdConflictHandler(id: NodeId): void;
|
|
1627
1872
|
/**
|
|
1628
1873
|
* Write the current node Id, PAN ID, or Node type to the tokens
|
|
1629
1874
|
* @param erase Erase the node type or not
|
|
1630
|
-
* @returns An
|
|
1875
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1631
1876
|
*/
|
|
1632
|
-
ezspWriteNodeData(erase: boolean): Promise<
|
|
1633
|
-
/**
|
|
1634
|
-
* Transmits the given message without modification. The MAC header is assumed
|
|
1635
|
-
* to be configured in the message at the time this function is called.
|
|
1636
|
-
* @param messageContents uint8_t * The raw message.
|
|
1637
|
-
* @returns An EmberStatus value indicating success or the reason for failure.
|
|
1638
|
-
*/
|
|
1639
|
-
ezspSendRawMessage(messageContents: Buffer): Promise<EmberStatus>;
|
|
1877
|
+
ezspWriteNodeData(erase: boolean): Promise<SLStatus>;
|
|
1640
1878
|
/**
|
|
1641
1879
|
* Transmits the given message without modification. The MAC header is assumed
|
|
1642
1880
|
* to be configured in the message at the time this function is called.
|
|
1643
1881
|
* @param messageContents uint8_t * The raw message.
|
|
1644
1882
|
* @param priority uint8_t transmit priority.
|
|
1645
1883
|
* @param useCca Should we enable CCA or not.
|
|
1646
|
-
* @returns An
|
|
1884
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1647
1885
|
*/
|
|
1648
|
-
|
|
1886
|
+
ezspSendRawMessage(messageContents: Buffer, priority: EmberTransmitPriority, useCca: boolean): Promise<SLStatus>;
|
|
1649
1887
|
/**
|
|
1650
1888
|
* Callback
|
|
1651
1889
|
* A callback invoked by the EmberZNet stack when a MAC passthrough message is
|
|
1652
1890
|
* received.
|
|
1653
1891
|
* @param messageType The type of MAC passthrough message received.
|
|
1654
|
-
* @param
|
|
1655
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during reception.
|
|
1656
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
1892
|
+
* @param packetInfo Information about the incoming packet.
|
|
1657
1893
|
* @param messageContents uint8_t * The raw message that was received.
|
|
1658
1894
|
*/
|
|
1659
|
-
ezspMacPassthroughMessageHandler(messageType: EmberMacPassthroughType,
|
|
1895
|
+
ezspMacPassthroughMessageHandler(messageType: EmberMacPassthroughType, packetInfo: EmberRxPacketInfo, messageContents: Buffer): void;
|
|
1660
1896
|
/**
|
|
1661
1897
|
* Callback
|
|
1662
1898
|
* A callback invoked by the EmberZNet stack when a raw MAC message that has
|
|
1663
1899
|
* matched one of the application's configured MAC filters.
|
|
1664
1900
|
* @param filterIndexMatch uint8_t The index of the filter that was matched.
|
|
1665
1901
|
* @param legacyPassthroughType The type of MAC passthrough message received.
|
|
1666
|
-
* @param
|
|
1667
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during reception.
|
|
1668
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
1902
|
+
* @param packetInfo Information about the incoming packet.
|
|
1669
1903
|
* @param messageContents uint8_t * The raw message that was received.
|
|
1670
1904
|
*/
|
|
1671
|
-
ezspMacFilterMatchMessageHandler(filterIndexMatch: number, legacyPassthroughType: EmberMacPassthroughType,
|
|
1905
|
+
ezspMacFilterMatchMessageHandler(filterIndexMatch: number, legacyPassthroughType: EmberMacPassthroughType, packetInfo: EmberRxPacketInfo, messageContents: Buffer): void;
|
|
1672
1906
|
/**
|
|
1673
1907
|
* Callback
|
|
1674
1908
|
* A callback invoked by the EmberZNet stack when the MAC has finished
|
|
1675
1909
|
* transmitting a raw message.
|
|
1676
|
-
* @param
|
|
1910
|
+
* @param messageContents (v14+)
|
|
1911
|
+
* @param status
|
|
1912
|
+
* - SLStatus.OK if the transmission was successful,
|
|
1913
|
+
* - SLStatus.ZIGBEE_DELIVERY_FAILED if not
|
|
1677
1914
|
*/
|
|
1678
|
-
ezspRawTransmitCompleteHandler(status:
|
|
1915
|
+
ezspRawTransmitCompleteHandler(messageContents: Buffer, status: SLStatus): void;
|
|
1679
1916
|
/**
|
|
1680
|
-
* This function is useful to sleepy end devices.
|
|
1681
|
-
* retry interval (in milliseconds) for mac data poll.
|
|
1682
|
-
* in milliseconds the device waits before retrying a data poll when a MAC level
|
|
1917
|
+
* This function is useful to sleepy end devices.
|
|
1918
|
+
* This function will set the retry interval (in milliseconds) for mac data poll.
|
|
1919
|
+
* This interval is the time in milliseconds the device waits before retrying a data poll when a MAC level
|
|
1683
1920
|
* data poll fails for any reason.
|
|
1684
1921
|
* @param waitBeforeRetryIntervalMs uint32_t Time in milliseconds the device waits before retrying
|
|
1685
1922
|
* a data poll when a MAC level data poll fails for any reason.
|
|
1686
1923
|
*/
|
|
1687
1924
|
ezspSetMacPollFailureWaitTime(waitBeforeRetryIntervalMs: number): Promise<void>;
|
|
1925
|
+
/**
|
|
1926
|
+
* Returns the maximum number of no-ack retries that will be attempted
|
|
1927
|
+
* @returns Max MAC retries
|
|
1928
|
+
*/
|
|
1929
|
+
ezspGetMaxMacRetries(): Promise<number>;
|
|
1688
1930
|
/**
|
|
1689
1931
|
* Sets the priority masks and related variables for choosing the best beacon.
|
|
1690
1932
|
* @param param EmberBeaconClassificationParams * The beacon prioritization related variable
|
|
1691
|
-
* @returns The attempt to set the
|
|
1933
|
+
* @returns The attempt to set the parameters returns SLStatus.OK
|
|
1692
1934
|
*/
|
|
1693
|
-
ezspSetBeaconClassificationParams(param: EmberBeaconClassificationParams): Promise<
|
|
1935
|
+
ezspSetBeaconClassificationParams(param: EmberBeaconClassificationParams): Promise<SLStatus>;
|
|
1694
1936
|
/**
|
|
1695
1937
|
* Gets the priority masks and related variables for choosing the best beacon.
|
|
1696
|
-
* @returns The attempt to get the
|
|
1938
|
+
* @returns The attempt to get the parameters returns SLStatus.OK
|
|
1697
1939
|
* @returns EmberBeaconClassificationParams * Gets the beacon prioritization related variable
|
|
1698
1940
|
*/
|
|
1699
|
-
ezspGetBeaconClassificationParams(): Promise<[
|
|
1941
|
+
ezspGetBeaconClassificationParams(): Promise<[SLStatus, param: EmberBeaconClassificationParams]>;
|
|
1942
|
+
/**
|
|
1943
|
+
* Indicate whether there are pending messages in the APS retry queue.
|
|
1944
|
+
* @returns True if there is a pending message for this network in the APS retry queue, false if not.
|
|
1945
|
+
*/
|
|
1946
|
+
ezspPendingAckedMessages(): Promise<boolean>;
|
|
1947
|
+
/**
|
|
1948
|
+
* Reschedule sending link status message, with first one being sent immediately.
|
|
1949
|
+
* @returns
|
|
1950
|
+
*/
|
|
1951
|
+
ezspRescheduleLinkStatusMsg(): Promise<SLStatus>;
|
|
1952
|
+
/**
|
|
1953
|
+
* Set the network update ID to the desired value. Must be called before joining or forming the network.
|
|
1954
|
+
* @param nwkUpdateId uint8_t Desired value of the network update ID.
|
|
1955
|
+
* @param setWhenOnNetwork Set to true in case change should also apply when on network.
|
|
1956
|
+
* @returns Status of set operation for the network update ID.
|
|
1957
|
+
*/
|
|
1958
|
+
ezspSetNwkUpdateId(nwkUpdateId: number, setWhenOnNetwork: boolean): Promise<SLStatus>;
|
|
1700
1959
|
/**
|
|
1701
1960
|
* Sets the security state that will be used by the device when it forms or
|
|
1702
1961
|
* joins the network. This call should not be used when restoring saved network
|
|
@@ -1705,21 +1964,21 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1705
1964
|
* @param state EmberInitialSecurityState * The security configuration to be set.
|
|
1706
1965
|
* @returns The success or failure code of the operation.
|
|
1707
1966
|
*/
|
|
1708
|
-
ezspSetInitialSecurityState(state: EmberInitialSecurityState): Promise<
|
|
1967
|
+
ezspSetInitialSecurityState(state: EmberInitialSecurityState): Promise<SLStatus>;
|
|
1709
1968
|
/**
|
|
1710
1969
|
* Gets the current security state that is being used by a device that is joined
|
|
1711
1970
|
* in the network.
|
|
1712
1971
|
* @returns The success or failure code of the operation.
|
|
1713
1972
|
* @returns EmberCurrentSecurityState * The security configuration in use by the stack.
|
|
1714
1973
|
*/
|
|
1715
|
-
ezspGetCurrentSecurityState(): Promise<[
|
|
1974
|
+
ezspGetCurrentSecurityState(): Promise<[SLStatus, state: EmberCurrentSecurityState]>;
|
|
1716
1975
|
/**
|
|
1717
1976
|
* Exports a key from security manager based on passed context.
|
|
1718
1977
|
* @param context sl_zb_sec_man_context_t * Metadata to identify the requested key.
|
|
1719
1978
|
* @returns sl_zb_sec_man_key_t * Data to store the exported key in.
|
|
1720
|
-
* @returns
|
|
1979
|
+
* @returns SLStatus * The success or failure code of the operation.
|
|
1721
1980
|
*/
|
|
1722
|
-
ezspExportKey(context: SecManContext): Promise<[key: SecManKey
|
|
1981
|
+
ezspExportKey(context: SecManContext): Promise<[SLStatus, key: SecManKey]>;
|
|
1723
1982
|
/**
|
|
1724
1983
|
* Imports a key into security manager based on passed context.
|
|
1725
1984
|
* @param context sl_zb_sec_man_context_t * Metadata to identify where the imported key should be stored.
|
|
@@ -1741,33 +2000,31 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1741
2000
|
* @param address The address to search for. Alternatively, all zeros may be passed in to search for the first empty entry.
|
|
1742
2001
|
* @param linkKey This indicates whether to search for an entry that contains a link key or a master key.
|
|
1743
2002
|
* true means to search for an entry with a Link Key.
|
|
1744
|
-
* @returns uint8_t This indicates the index of the entry that matches the search
|
|
1745
|
-
*
|
|
2003
|
+
* @returns uint8_t This indicates the index of the entry that matches the search criteria.
|
|
2004
|
+
* A value of 0xFF is returned if not matching entry is found.
|
|
1746
2005
|
*/
|
|
1747
|
-
ezspFindKeyTableEntry(address:
|
|
2006
|
+
ezspFindKeyTableEntry(address: EUI64, linkKey: boolean): Promise<number>;
|
|
1748
2007
|
/**
|
|
1749
2008
|
* This function sends an APS TransportKey command containing the current trust
|
|
1750
2009
|
* center link key. The node to which the command is sent is specified via the
|
|
1751
2010
|
* short and long address arguments.
|
|
1752
2011
|
* @param destinationNodeId The short address of the node to which this command will be sent
|
|
1753
2012
|
* @param destinationEui64 The long address of the node to which this command will be sent
|
|
1754
|
-
* @returns An
|
|
2013
|
+
* @returns An SLStatus value indicating success of failure of the operation
|
|
1755
2014
|
*/
|
|
1756
|
-
ezspSendTrustCenterLinkKey(destinationNodeId:
|
|
2015
|
+
ezspSendTrustCenterLinkKey(destinationNodeId: NodeId, destinationEui64: EUI64): Promise<SLStatus>;
|
|
1757
2016
|
/**
|
|
1758
2017
|
* This function erases the data in the key table entry at the specified index.
|
|
1759
2018
|
* If the index is invalid, false is returned.
|
|
1760
2019
|
* @param index uint8_t This indicates the index of entry to erase.
|
|
1761
|
-
* @returns
|
|
1762
|
-
* ::EMBER_KEY_INVALID if the index is out of range for the size of the key table.
|
|
2020
|
+
* @returns The success or failure of the operation.
|
|
1763
2021
|
*/
|
|
1764
|
-
ezspEraseKeyTableEntry(index: number): Promise<
|
|
2022
|
+
ezspEraseKeyTableEntry(index: number): Promise<SLStatus>;
|
|
1765
2023
|
/**
|
|
1766
2024
|
* This function clears the key table of the current network.
|
|
1767
|
-
* @returns
|
|
1768
|
-
* ::EMBER_INVALID_CALL otherwise.
|
|
2025
|
+
* @returns The success or failure of the operation.
|
|
1769
2026
|
*/
|
|
1770
|
-
ezspClearKeyTable(): Promise<
|
|
2027
|
+
ezspClearKeyTable(): Promise<SLStatus>;
|
|
1771
2028
|
/**
|
|
1772
2029
|
* A function to request a Link Key from the Trust Center with another device on
|
|
1773
2030
|
* the Network (which could be the Trust Center). A Link Key with the Trust
|
|
@@ -1785,9 +2042,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1785
2042
|
* returned via ezspZigbeeKeyEstablishmentHandler(...)
|
|
1786
2043
|
* @param partner This is the IEEE address of the partner device that will share the link key.
|
|
1787
2044
|
* @returns The success or failure of sending the request.
|
|
1788
|
-
*
|
|
2045
|
+
* This is not the final result of the attempt. ezspZigbeeKeyEstablishmentHandler(...) will return that.
|
|
1789
2046
|
*/
|
|
1790
|
-
ezspRequestLinkKey(partner:
|
|
2047
|
+
ezspRequestLinkKey(partner: EUI64): Promise<SLStatus>;
|
|
1791
2048
|
/**
|
|
1792
2049
|
* Requests a new link key from the Trust Center. This function starts by
|
|
1793
2050
|
* sending a Node Descriptor request to the Trust Center to verify its R21+
|
|
@@ -1797,10 +2054,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1797
2054
|
* Request Key, and Verify Key Confirm messages. The number of attempts resets for each message type sent
|
|
1798
2055
|
* (e.g., if maxAttempts is 3, up to 3 Node Descriptors are sent, up to 3 Request Keys, and up to 3 Verify Key Confirm messages are sent).
|
|
1799
2056
|
* @returns The success or failure of sending the request.
|
|
1800
|
-
*
|
|
1801
|
-
*
|
|
2057
|
+
* If the Node Descriptor is successfully transmitted, ezspZigbeeKeyEstablishmentHandler(...)
|
|
2058
|
+
* will be called at a later time with a final status result.
|
|
1802
2059
|
*/
|
|
1803
|
-
ezspUpdateTcLinkKey(maxAttempts: number): Promise<
|
|
2060
|
+
ezspUpdateTcLinkKey(maxAttempts: number): Promise<SLStatus>;
|
|
1804
2061
|
/**
|
|
1805
2062
|
* Callback
|
|
1806
2063
|
* This is a callback that indicates the success or failure of an attempt to establish a key with a partner device.
|
|
@@ -1808,7 +2065,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1808
2065
|
* This value is all zeros on a failure.
|
|
1809
2066
|
* @param status This is the status indicating what was established or why the key establishment failed.
|
|
1810
2067
|
*/
|
|
1811
|
-
ezspZigbeeKeyEstablishmentHandler(partner:
|
|
2068
|
+
ezspZigbeeKeyEstablishmentHandler(partner: EUI64, status: EmberKeyStatus): void;
|
|
1812
2069
|
/**
|
|
1813
2070
|
* Clear all of the transient link keys from RAM.
|
|
1814
2071
|
*/
|
|
@@ -1821,12 +2078,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1821
2078
|
ezspGetNetworkKeyInfo(): Promise<[SLStatus, networkKeyInfo: SecManNetworkKeyInfo]>;
|
|
1822
2079
|
/**
|
|
1823
2080
|
* Retrieve metadata about an APS link key. Does not retrieve contents.
|
|
1824
|
-
* @param
|
|
1825
|
-
* @returns
|
|
2081
|
+
* @param context sl_zb_sec_man_context_t * Context used to input information about key.
|
|
2082
|
+
* @returns Status of metadata retrieval operation.
|
|
1826
2083
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the referenced key.
|
|
1827
|
-
* @returns sl_status_t * Status of metadata retrieval operation.
|
|
1828
2084
|
*/
|
|
1829
|
-
ezspGetApsKeyInfo(
|
|
2085
|
+
ezspGetApsKeyInfo(context: SecManContext): Promise<[status: SLStatus, keyData: SecManAPSKeyMetadata]>;
|
|
1830
2086
|
/**
|
|
1831
2087
|
* Import an application link key into the key table.
|
|
1832
2088
|
* @param index uint8_t Index where this key is to be imported to.
|
|
@@ -1834,25 +2090,25 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1834
2090
|
* @param plaintextKey sl_zb_sec_man_key_t * The key data to be imported.
|
|
1835
2091
|
* @returns Status of key import operation.
|
|
1836
2092
|
*/
|
|
1837
|
-
ezspImportLinkKey(index: number, address:
|
|
2093
|
+
ezspImportLinkKey(index: number, address: EUI64, plaintextKey: SecManKey): Promise<SLStatus>;
|
|
1838
2094
|
/**
|
|
1839
2095
|
* Export the link key at given index from the key table.
|
|
1840
2096
|
* @param uint8_t Index of key to export.
|
|
1841
|
-
* @returns
|
|
2097
|
+
* @returns Status of key export operation.
|
|
2098
|
+
* @returns sl_zigbee_sec_man_context_t * Context referencing the exported key. Contains information like the EUI64 address it is associated with.
|
|
1842
2099
|
* @returns sl_zb_sec_man_key_t * The exported key.
|
|
1843
2100
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the key.
|
|
1844
|
-
* @returns sl_status_t * Status of key export operation.
|
|
1845
2101
|
*/
|
|
1846
|
-
ezspExportLinkKeyByIndex(index: number): Promise<[
|
|
2102
|
+
ezspExportLinkKeyByIndex(index: number): Promise<[SLStatus, context: SecManContext, plaintextKey: SecManKey, keyData: SecManAPSKeyMetadata]>;
|
|
1847
2103
|
/**
|
|
1848
2104
|
* Export the link key associated with the given EUI from the key table.
|
|
1849
2105
|
* @param eui EUI64 associated with the key to export.
|
|
2106
|
+
* @returns Status of key export operation.
|
|
1850
2107
|
* @returns sl_zb_sec_man_key_t * The exported key.
|
|
1851
|
-
* @returns
|
|
2108
|
+
* @returns sl_zigbee_sec_man_context_t * Context referencing the exported key. Contains information like the EUI64 address it is associated with.
|
|
1852
2109
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the key.
|
|
1853
|
-
* @returns sl_status_t * Status of key export operation.
|
|
1854
2110
|
*/
|
|
1855
|
-
ezspExportLinkKeyByEui(eui:
|
|
2111
|
+
ezspExportLinkKeyByEui(eui: EUI64): Promise<[SLStatus, context: SecManContext, plaintextKey: SecManKey, keyData: SecManAPSKeyMetadata]>;
|
|
1856
2112
|
/**
|
|
1857
2113
|
* Check whether a key context can be used to load a valid key.
|
|
1858
2114
|
* @param context sl_zb_sec_man_context_t * Context struct to check the validity of.
|
|
@@ -1863,28 +2119,43 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1863
2119
|
* Import a transient link key.
|
|
1864
2120
|
* @param eui64 EUI64 associated with this transient key.
|
|
1865
2121
|
* @param plaintextKey sl_zb_sec_man_key_t * The key to import.
|
|
1866
|
-
* @param sl_zigbee_sec_man_flags_t Flags associated with this transient key.
|
|
2122
|
+
* @param flags sl_zigbee_sec_man_flags_t (unused in v14+) Flags associated with this transient key.
|
|
1867
2123
|
* @returns Status of key import operation.
|
|
1868
2124
|
*/
|
|
1869
|
-
ezspImportTransientKey(eui64:
|
|
2125
|
+
ezspImportTransientKey(eui64: EUI64, plaintextKey: SecManKey, flags?: SecManFlag): Promise<SLStatus>;
|
|
1870
2126
|
/**
|
|
1871
2127
|
* Export a transient link key from a given table index.
|
|
1872
2128
|
* @param uint8_t Index to export from.
|
|
2129
|
+
* @returns Status of key export operation.
|
|
1873
2130
|
* @returns sl_zb_sec_man_context_t * Context struct for export operation.
|
|
1874
2131
|
* @returns sl_zb_sec_man_key_t * The exported key.
|
|
1875
2132
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the key.
|
|
1876
|
-
* @returns sl_status_t * Status of key export operation.
|
|
1877
2133
|
*/
|
|
1878
|
-
ezspExportTransientKeyByIndex(index: number): Promise<[context: SecManContext, plaintextKey: SecManKey, key_data: SecManAPSKeyMetadata
|
|
2134
|
+
ezspExportTransientKeyByIndex(index: number): Promise<[SLStatus, context: SecManContext, plaintextKey: SecManKey, key_data: SecManAPSKeyMetadata]>;
|
|
1879
2135
|
/**
|
|
1880
2136
|
* Export a transient link key associated with a given EUI64
|
|
1881
2137
|
* @param eui Index to export from.
|
|
2138
|
+
* @returns Status of key export operation.
|
|
1882
2139
|
* @returns sl_zb_sec_man_context_t * Context struct for export operation.
|
|
1883
2140
|
* @returns sl_zb_sec_man_key_t * The exported key.
|
|
1884
2141
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the key.
|
|
1885
|
-
* @returns sl_status_t * Status of key export operation.
|
|
1886
2142
|
*/
|
|
1887
|
-
ezspExportTransientKeyByEui(eui:
|
|
2143
|
+
ezspExportTransientKeyByEui(eui: EUI64): Promise<[SLStatus, context: SecManContext, plaintextKey: SecManKey, key_data: SecManAPSKeyMetadata]>;
|
|
2144
|
+
/**
|
|
2145
|
+
* Set the incoming TC link key frame counter to desired value.
|
|
2146
|
+
* @param frameCounter Value to set the frame counter to.
|
|
2147
|
+
*/
|
|
2148
|
+
ezspSetIncomingTcLinkKeyFrameCounter(frameCounter: number): Promise<void>;
|
|
2149
|
+
/**
|
|
2150
|
+
* Encrypt/decrypt a message in-place using APS.
|
|
2151
|
+
* @param encrypt Encrypt (true) or decrypt (false) the message.
|
|
2152
|
+
* @param lengthCombinedArg uint8_t Length of the array containing message, needs to be long enough to include the auxiliary header and MIC.
|
|
2153
|
+
* @param message uint8_t * The message to be en/de-crypted.
|
|
2154
|
+
* @param apsHeaderEndIndex uint8_t Index just past the APS frame.
|
|
2155
|
+
* @param remoteEui64 IEEE address of the device this message is associated with.
|
|
2156
|
+
* @returns Status of the encryption/decryption call.
|
|
2157
|
+
*/
|
|
2158
|
+
ezspApsCryptMessage(encrypt: boolean, lengthCombinedArg: number, message: Buffer, apsHeaderEndIndex: number, remoteEui64: EUI64): Promise<[SLStatus, cryptedMessage: Buffer]>;
|
|
1888
2159
|
/**
|
|
1889
2160
|
* Callback
|
|
1890
2161
|
* The NCP used the trust center behavior policy to decide whether to allow a
|
|
@@ -1897,7 +2168,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1897
2168
|
* @param policyDecision An EmberJoinDecision reflecting the decision made.
|
|
1898
2169
|
* @param parentOfNewNodeId The parent of the node whose status has changed.
|
|
1899
2170
|
*/
|
|
1900
|
-
ezspTrustCenterJoinHandler(newNodeId:
|
|
2171
|
+
ezspTrustCenterJoinHandler(newNodeId: NodeId, newNodeEui64: EUI64, status: EmberDeviceUpdate, policyDecision: EmberJoinDecision, parentOfNewNodeId: NodeId): void;
|
|
1901
2172
|
/**
|
|
1902
2173
|
* This function broadcasts a new encryption key, but does not tell the nodes in
|
|
1903
2174
|
* the network to start using it. To tell nodes to switch to the new key, use
|
|
@@ -1906,16 +2177,15 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1906
2177
|
* send the Switch Key after sending the alternate encryption key.
|
|
1907
2178
|
* @param key EmberKeyData * An optional pointer to a 16-byte encryption key (EMBER_ENCRYPTION_KEY_SIZE).
|
|
1908
2179
|
* An all zero key may be passed in, which will cause the stack to randomly generate a new key.
|
|
1909
|
-
* @returns
|
|
2180
|
+
* @returns SLStatus value that indicates the success or failure of the command.
|
|
1910
2181
|
*/
|
|
1911
|
-
ezspBroadcastNextNetworkKey(key: EmberKeyData): Promise<
|
|
2182
|
+
ezspBroadcastNextNetworkKey(key: EmberKeyData): Promise<SLStatus>;
|
|
1912
2183
|
/**
|
|
1913
2184
|
* This function broadcasts a switch key message to tell all nodes to change to
|
|
1914
2185
|
* the sequence number of the previously sent Alternate Encryption Key.
|
|
1915
|
-
* @returns
|
|
1916
|
-
* command.
|
|
2186
|
+
* @returns SLStatus value that indicates the success or failure of the command.
|
|
1917
2187
|
*/
|
|
1918
|
-
ezspBroadcastNetworkKeySwitch(): Promise<
|
|
2188
|
+
ezspBroadcastNetworkKeySwitch(): Promise<SLStatus>;
|
|
1919
2189
|
/**
|
|
1920
2190
|
* This routine processes the passed chunk of data and updates the hash context
|
|
1921
2191
|
* based on it. If the 'finalize' parameter is not set, then the length of the
|
|
@@ -1928,7 +2198,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1928
2198
|
* @returns The result of the operation
|
|
1929
2199
|
* @returns EmberAesMmoHashContext * The updated hash context.
|
|
1930
2200
|
*/
|
|
1931
|
-
ezspAesMmoHash(context: EmberAesMmoHashContext, finalize: boolean, data: Buffer): Promise<[
|
|
2201
|
+
ezspAesMmoHash(context: EmberAesMmoHashContext, finalize: boolean, data: Buffer): Promise<[SLStatus, returnContext: EmberAesMmoHashContext]>;
|
|
1932
2202
|
/**
|
|
1933
2203
|
* This command sends an APS remove device using APS encryption to the
|
|
1934
2204
|
* destination indicating either to remove itself from the network, or one of
|
|
@@ -1936,9 +2206,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1936
2206
|
* @param destShort The node ID of the device that will receive the message
|
|
1937
2207
|
* @param destLong The long address (EUI64) of the device that will receive the message.
|
|
1938
2208
|
* @param targetLong The long address (EUI64) of the device to be removed.
|
|
1939
|
-
* @returns An
|
|
2209
|
+
* @returns An SLStatus value indicating success, or the reason for failure
|
|
1940
2210
|
*/
|
|
1941
|
-
ezspRemoveDevice(destShort:
|
|
2211
|
+
ezspRemoveDevice(destShort: NodeId, destLong: EUI64, targetLong: EUI64): Promise<SLStatus>;
|
|
1942
2212
|
/**
|
|
1943
2213
|
* This command will send a unicast transport key message with a new NWK key to
|
|
1944
2214
|
* the specified device. APS encryption using the device's existing link key
|
|
@@ -1946,15 +2216,15 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1946
2216
|
* @param destShort The node ID of the device that will receive the message
|
|
1947
2217
|
* @param destLong The long address (EUI64) of the device that will receive the message.
|
|
1948
2218
|
* @param key EmberKeyData * The NWK key to send to the new device.
|
|
1949
|
-
* @returns An
|
|
2219
|
+
* @returns An SLStatus value indicating success, or the reason for failure
|
|
1950
2220
|
*/
|
|
1951
|
-
ezspUnicastNwkKeyUpdate(destShort:
|
|
2221
|
+
ezspUnicastNwkKeyUpdate(destShort: NodeId, destLong: EUI64, key: EmberKeyData): Promise<SLStatus>;
|
|
1952
2222
|
/**
|
|
1953
2223
|
* This call starts the generation of the ECC Ephemeral Public/Private key pair.
|
|
1954
2224
|
* When complete it stores the private key. The results are returned via
|
|
1955
2225
|
* ezspGenerateCbkeKeysHandler().
|
|
1956
2226
|
*/
|
|
1957
|
-
ezspGenerateCbkeKeys(): Promise<
|
|
2227
|
+
ezspGenerateCbkeKeys(): Promise<SLStatus>;
|
|
1958
2228
|
/**
|
|
1959
2229
|
* Callback
|
|
1960
2230
|
* A callback by the Crypto Engine indicating that a new ephemeral
|
|
@@ -1964,7 +2234,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1964
2234
|
* @param status The result of the CBKE operation.
|
|
1965
2235
|
* @param ephemeralPublicKey EmberPublicKeyData * The generated ephemeral public key.
|
|
1966
2236
|
*/
|
|
1967
|
-
ezspGenerateCbkeKeysHandler(status:
|
|
2237
|
+
ezspGenerateCbkeKeysHandler(status: SLStatus, ephemeralPublicKey: EmberPublicKeyData): void;
|
|
1968
2238
|
/**
|
|
1969
2239
|
* Calculates the SMAC verification keys for both the initiator and responder
|
|
1970
2240
|
* roles of CBKE using the passed parameters and the stored public/private key
|
|
@@ -1975,7 +2245,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1975
2245
|
* @param partnerCertificate EmberCertificateData * The key establishment partner's implicit certificate.
|
|
1976
2246
|
* @param partnerEphemeralPublicKey EmberPublicKeyData * The key establishment partner's ephemeral public key
|
|
1977
2247
|
*/
|
|
1978
|
-
ezspCalculateSmacs(amInitiator: boolean, partnerCertificate: EmberCertificateData, partnerEphemeralPublicKey: EmberPublicKeyData): Promise<
|
|
2248
|
+
ezspCalculateSmacs(amInitiator: boolean, partnerCertificate: EmberCertificateData, partnerEphemeralPublicKey: EmberPublicKeyData): Promise<SLStatus>;
|
|
1979
2249
|
/**
|
|
1980
2250
|
* Callback
|
|
1981
2251
|
* A callback to indicate that the NCP has finished calculating the Secure
|
|
@@ -1986,13 +2256,13 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1986
2256
|
* @param initiatorSmac EmberSmacData * The calculated value of the initiator's SMAC
|
|
1987
2257
|
* @param responderSmac EmberSmacData * The calculated value of the responder's SMAC
|
|
1988
2258
|
*/
|
|
1989
|
-
ezspCalculateSmacsHandler(status:
|
|
2259
|
+
ezspCalculateSmacsHandler(status: SLStatus, initiatorSmac: EmberSmacData, responderSmac: EmberSmacData): void;
|
|
1990
2260
|
/**
|
|
1991
2261
|
* This call starts the generation of the ECC 283k1 curve Ephemeral
|
|
1992
2262
|
* Public/Private key pair. When complete it stores the private key. The results
|
|
1993
2263
|
* are returned via ezspGenerateCbkeKeysHandler283k1().
|
|
1994
2264
|
*/
|
|
1995
|
-
ezspGenerateCbkeKeys283k1(): Promise<
|
|
2265
|
+
ezspGenerateCbkeKeys283k1(): Promise<SLStatus>;
|
|
1996
2266
|
/**
|
|
1997
2267
|
* Callback
|
|
1998
2268
|
* A callback by the Crypto Engine indicating that a new 283k1 ephemeral
|
|
@@ -2002,7 +2272,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2002
2272
|
* @param status The result of the CBKE operation.
|
|
2003
2273
|
* @param ephemeralPublicKey EmberPublicKey283k1Data * The generated ephemeral public key.
|
|
2004
2274
|
*/
|
|
2005
|
-
ezspGenerateCbkeKeysHandler283k1(status:
|
|
2275
|
+
ezspGenerateCbkeKeysHandler283k1(status: SLStatus, ephemeralPublicKey: EmberPublicKey283k1Data): void;
|
|
2006
2276
|
/**
|
|
2007
2277
|
* Calculates the SMAC verification keys for both the initiator and responder
|
|
2008
2278
|
* roles of CBKE for the 283k1 ECC curve using the passed parameters and the
|
|
@@ -2013,7 +2283,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2013
2283
|
* @param partnerCertificate EmberCertificate283k1Data * The key establishment partner's implicit certificate.
|
|
2014
2284
|
* @param partnerEphemeralPublicKey EmberPublicKey283k1Data * The key establishment partner's ephemeral public key
|
|
2015
2285
|
*/
|
|
2016
|
-
ezspCalculateSmacs283k1(amInitiator: boolean, partnerCertificate: EmberCertificate283k1Data, partnerEphemeralPublicKey: EmberPublicKey283k1Data): Promise<
|
|
2286
|
+
ezspCalculateSmacs283k1(amInitiator: boolean, partnerCertificate: EmberCertificate283k1Data, partnerEphemeralPublicKey: EmberPublicKey283k1Data): Promise<SLStatus>;
|
|
2017
2287
|
/**
|
|
2018
2288
|
* Callback
|
|
2019
2289
|
* A callback to indicate that the NCP has finished calculating the Secure
|
|
@@ -2025,7 +2295,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2025
2295
|
* @param initiatorSmac EmberSmacData * The calculated value of the initiator's SMAC
|
|
2026
2296
|
* @param responderSmac EmberSmacData * The calculated value of the responder's SMAC
|
|
2027
2297
|
*/
|
|
2028
|
-
ezspCalculateSmacsHandler283k1(status:
|
|
2298
|
+
ezspCalculateSmacsHandler283k1(status: SLStatus, initiatorSmac: EmberSmacData, responderSmac: EmberSmacData): void;
|
|
2029
2299
|
/**
|
|
2030
2300
|
* Clears the temporary data associated with CBKE and the key establishment,
|
|
2031
2301
|
* most notably the ephemeral public/private key pair. If storeLinKey is true it
|
|
@@ -2034,7 +2304,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2034
2304
|
* @param storeLinkKey A bool indicating whether to store (true) or discard (false) the unverified link
|
|
2035
2305
|
* key derived when ezspCalculateSmacs() was previously called.
|
|
2036
2306
|
*/
|
|
2037
|
-
ezspClearTemporaryDataMaybeStoreLinkKey(storeLinkKey: boolean): Promise<
|
|
2307
|
+
ezspClearTemporaryDataMaybeStoreLinkKey(storeLinkKey: boolean): Promise<SLStatus>;
|
|
2038
2308
|
/**
|
|
2039
2309
|
* Clears the temporary data associated with CBKE and the key establishment,
|
|
2040
2310
|
* most notably the ephemeral public/private key pair. If storeLinKey is true it
|
|
@@ -2043,53 +2313,17 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2043
2313
|
* @param storeLinkKey A bool indicating whether to store (true) or discard (false) the unverified link
|
|
2044
2314
|
* key derived when ezspCalculateSmacs() was previously called.
|
|
2045
2315
|
*/
|
|
2046
|
-
ezspClearTemporaryDataMaybeStoreLinkKey283k1(storeLinkKey: boolean): Promise<
|
|
2316
|
+
ezspClearTemporaryDataMaybeStoreLinkKey283k1(storeLinkKey: boolean): Promise<SLStatus>;
|
|
2047
2317
|
/**
|
|
2048
2318
|
* Retrieves the certificate installed on the NCP.
|
|
2049
2319
|
* @returns EmberCertificateData * The locally installed certificate.
|
|
2050
2320
|
*/
|
|
2051
|
-
ezspGetCertificate(): Promise<[
|
|
2321
|
+
ezspGetCertificate(): Promise<[SLStatus, localCert: EmberCertificateData]>;
|
|
2052
2322
|
/**
|
|
2053
2323
|
* Retrieves the 283k certificate installed on the NCP.
|
|
2054
2324
|
* @returns EmberCertificate283k1Data * The locally installed certificate.
|
|
2055
2325
|
*/
|
|
2056
|
-
ezspGetCertificate283k1(): Promise<[
|
|
2057
|
-
/**
|
|
2058
|
-
* LEGACY FUNCTION: This functionality has been replaced by a single bit in the
|
|
2059
|
-
* EmberApsFrame, EMBER_APS_OPTION_DSA_SIGN. Devices wishing to send signed
|
|
2060
|
-
* messages should use that as it requires fewer function calls and message
|
|
2061
|
-
* buffering. The dsaSignHandler response is still called when
|
|
2062
|
-
* EMBER_APS_OPTION_DSA_SIGN is used. However, this function is still supported.
|
|
2063
|
-
* This function begins the process of signing the passed message contained
|
|
2064
|
-
* within the messageContents array. If no other ECC operation is going on, it
|
|
2065
|
-
* will immediately return with EMBER_OPERATION_IN_PROGRESS to indicate the
|
|
2066
|
-
* start of ECC operation. It will delay a period of time to let APS retries
|
|
2067
|
-
* take place, but then it will shut down the radio and consume the CPU
|
|
2068
|
-
* processing until the signing is complete. This may take up to 1 second. The
|
|
2069
|
-
* signed message will be returned in the dsaSignHandler response. Note that the
|
|
2070
|
-
* last byte of the messageContents passed to this function has special
|
|
2071
|
-
* significance. As the typical use case for DSA signing is to sign the ZCL
|
|
2072
|
-
* payload of a DRLC Report Event Status message in SE 1.0, there is often both
|
|
2073
|
-
* a signed portion (ZCL payload) and an unsigned portion (ZCL header). The last
|
|
2074
|
-
* byte in the content of messageToSign is therefore used as a special indicator
|
|
2075
|
-
* to signify how many bytes of leading data in the array should be excluded
|
|
2076
|
-
* from consideration during the signing process. If the signature needs to
|
|
2077
|
-
* cover the entire array (all bytes except last one), the caller should ensure
|
|
2078
|
-
* that the last byte of messageContents is 0x00. When the signature operation
|
|
2079
|
-
* is complete, this final byte will be replaced by the signature type indicator
|
|
2080
|
-
* (0x01 for ECDSA signatures), and the actual signature will be appended to the
|
|
2081
|
-
* original contents after this byte.
|
|
2082
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2083
|
-
* @param messageContents uint8_t * The message contents for which to create a signature.
|
|
2084
|
-
* Per above notes, this may include a leading portion of data not included in the signature,
|
|
2085
|
-
* in which case the last byte of this array should be set to the index of the first byte
|
|
2086
|
-
* to be considered for signing. Otherwise, the last byte of messageContents should be 0x00
|
|
2087
|
-
* to indicate that a signature should occur across the entire contents.
|
|
2088
|
-
* @returns EMBER_OPERATION_IN_PROGRESS if the stack has queued up the operation
|
|
2089
|
-
* for execution. EMBER_INVALID_CALL if the operation can't be performed in this
|
|
2090
|
-
* context, possibly because another ECC operation is pending.
|
|
2091
|
-
*/
|
|
2092
|
-
ezspDsaSign(messageContents: Buffer): Promise<EmberStatus>;
|
|
2326
|
+
ezspGetCertificate283k1(): Promise<[SLStatus, localCert: EmberCertificate283k1Data]>;
|
|
2093
2327
|
/**
|
|
2094
2328
|
* Callback
|
|
2095
2329
|
* The handler that returns the results of the signing operation. On success,
|
|
@@ -2100,7 +2334,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2100
2334
|
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2101
2335
|
* @param messageContents uint8_t *The message and attached which includes the original message and the appended signature.
|
|
2102
2336
|
*/
|
|
2103
|
-
ezspDsaSignHandler(status:
|
|
2337
|
+
ezspDsaSignHandler(status: SLStatus, messageContents: Buffer): void;
|
|
2104
2338
|
/**
|
|
2105
2339
|
* Verify that signature of the associated message digest was signed by the
|
|
2106
2340
|
* private key of the associated certificate.
|
|
@@ -2111,7 +2345,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2111
2345
|
* certificate must both be issued by the same Certificate Authority, so they should share the same CA Public Key.
|
|
2112
2346
|
* @param receivedSig EmberSignatureData * The signature of the signed data.
|
|
2113
2347
|
*/
|
|
2114
|
-
ezspDsaVerify(digest: EmberMessageDigest, signerCertificate: EmberCertificateData, receivedSig: EmberSignatureData): Promise<
|
|
2348
|
+
ezspDsaVerify(digest: EmberMessageDigest, signerCertificate: EmberCertificateData, receivedSig: EmberSignatureData): Promise<SLStatus>;
|
|
2115
2349
|
/**
|
|
2116
2350
|
* Callback
|
|
2117
2351
|
* This callback is executed by the stack when the DSA verification has
|
|
@@ -2121,7 +2355,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2121
2355
|
* failed and the validity is unknown.
|
|
2122
2356
|
* @param status The result of the DSA verification operation.
|
|
2123
2357
|
*/
|
|
2124
|
-
ezspDsaVerifyHandler(status:
|
|
2358
|
+
ezspDsaVerifyHandler(status: SLStatus): void;
|
|
2125
2359
|
/**
|
|
2126
2360
|
* Verify that signature of the associated message digest was signed by the
|
|
2127
2361
|
* private key of the associated certificate.
|
|
@@ -2132,7 +2366,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2132
2366
|
* certificate must both be issued by the same Certificate Authority, so they should share the same CA Public Key.
|
|
2133
2367
|
* @param receivedSig EmberSignature283k1Data * The signature of the signed data.
|
|
2134
2368
|
*/
|
|
2135
|
-
ezspDsaVerify283k1(digest: EmberMessageDigest, signerCertificate: EmberCertificate283k1Data, receivedSig: EmberSignature283k1Data): Promise<
|
|
2369
|
+
ezspDsaVerify283k1(digest: EmberMessageDigest, signerCertificate: EmberCertificate283k1Data, receivedSig: EmberSignature283k1Data): Promise<SLStatus>;
|
|
2136
2370
|
/**
|
|
2137
2371
|
* Sets the device's CA public key, local certificate, and static private key on
|
|
2138
2372
|
* the NCP associated with this node.
|
|
@@ -2140,55 +2374,55 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2140
2374
|
* @param myCert EmberCertificateData * The node's new certificate signed by the CA.
|
|
2141
2375
|
* @param myKey EmberPrivateKeyData *The node's new static private key.
|
|
2142
2376
|
*/
|
|
2143
|
-
ezspSetPreinstalledCbkeData(caPublic: EmberPublicKeyData, myCert: EmberCertificateData, myKey: EmberPrivateKeyData): Promise<
|
|
2377
|
+
ezspSetPreinstalledCbkeData(caPublic: EmberPublicKeyData, myCert: EmberCertificateData, myKey: EmberPrivateKeyData): Promise<SLStatus>;
|
|
2144
2378
|
/**
|
|
2145
2379
|
* Sets the device's 283k1 curve CA public key, local certificate, and static
|
|
2146
2380
|
* private key on the NCP associated with this node.
|
|
2147
2381
|
* @returns Status of operation
|
|
2148
2382
|
*/
|
|
2149
|
-
ezspSavePreinstalledCbkeData283k1(): Promise<
|
|
2383
|
+
ezspSavePreinstalledCbkeData283k1(): Promise<SLStatus>;
|
|
2150
2384
|
/**
|
|
2151
2385
|
* Activate use of mfglib test routines and enables the radio receiver to report
|
|
2152
2386
|
* packets it receives to the mfgLibRxHandler() callback. These packets will not
|
|
2153
2387
|
* be passed up with a CRC failure. All other mfglib functions will return an
|
|
2154
2388
|
* error until the mfglibStart() has been called
|
|
2155
2389
|
* @param rxCallback true to generate a mfglibRxHandler callback when a packet is received.
|
|
2156
|
-
* @returns An
|
|
2390
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2157
2391
|
*/
|
|
2158
|
-
|
|
2392
|
+
mfglibInternalStart(rxCallback: boolean): Promise<SLStatus>;
|
|
2159
2393
|
/**
|
|
2160
2394
|
* Deactivate use of mfglib test routines; restores the hardware to the state it
|
|
2161
2395
|
* was in prior to mfglibStart() and stops receiving packets started by
|
|
2162
2396
|
* mfglibStart() at the same time.
|
|
2163
|
-
* @returns An
|
|
2397
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2164
2398
|
*/
|
|
2165
|
-
|
|
2399
|
+
mfglibInternalEnd(): Promise<SLStatus>;
|
|
2166
2400
|
/**
|
|
2167
2401
|
* Starts transmitting an unmodulated tone on the currently set channel and
|
|
2168
2402
|
* power level. Upon successful return, the tone will be transmitting. To stop
|
|
2169
2403
|
* transmitting tone, application must call mfglibStopTone(), allowing it the
|
|
2170
2404
|
* flexibility to determine its own criteria for tone duration (time, event,
|
|
2171
2405
|
* etc.)
|
|
2172
|
-
* @returns An
|
|
2406
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2173
2407
|
*/
|
|
2174
|
-
|
|
2408
|
+
mfglibInternalStartTone(): Promise<SLStatus>;
|
|
2175
2409
|
/**
|
|
2176
2410
|
* Stops transmitting tone started by mfglibStartTone().
|
|
2177
|
-
* @returns An
|
|
2411
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2178
2412
|
*/
|
|
2179
|
-
|
|
2413
|
+
mfglibInternalStopTone(): Promise<SLStatus>;
|
|
2180
2414
|
/**
|
|
2181
2415
|
* Starts transmitting a random stream of characters. This is so that the radio
|
|
2182
2416
|
* modulation can be measured.
|
|
2183
|
-
* @returns An
|
|
2417
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2184
2418
|
*/
|
|
2185
|
-
|
|
2419
|
+
mfglibInternalStartStream(): Promise<SLStatus>;
|
|
2186
2420
|
/**
|
|
2187
2421
|
* Stops transmitting a random stream of characters started by
|
|
2188
2422
|
* mfglibStartStream().
|
|
2189
|
-
* @returns An
|
|
2423
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2190
2424
|
*/
|
|
2191
|
-
|
|
2425
|
+
mfglibInternalStopStream(): Promise<SLStatus>;
|
|
2192
2426
|
/**
|
|
2193
2427
|
* Sends a single packet consisting of the following bytes: packetLength,
|
|
2194
2428
|
* packetContents[0], ... , packetContents[packetLength - 3], CRC[0], CRC[1].
|
|
@@ -2196,21 +2430,21 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2196
2430
|
* last two bytes of packetContents[] with the 16-bit CRC for the packet.
|
|
2197
2431
|
* @param packetLength uint8_t The length of the packetContents parameter in bytes. Must be greater than 3 and less than 123.
|
|
2198
2432
|
* @param packetContents uint8_t * The packet to send. The last two bytes will be replaced with the 16-bit CRC.
|
|
2199
|
-
* @returns An
|
|
2433
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2200
2434
|
*/
|
|
2201
|
-
|
|
2435
|
+
mfglibInternalSendPacket(packetContents: Buffer): Promise<SLStatus>;
|
|
2202
2436
|
/**
|
|
2203
2437
|
* Sets the radio channel. Calibration occurs if this is the first time the
|
|
2204
2438
|
* channel has been used.
|
|
2205
2439
|
* @param channel uint8_t The channel to switch to. Valid values are 11 - 26.
|
|
2206
|
-
* @returns An
|
|
2440
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2207
2441
|
*/
|
|
2208
|
-
|
|
2442
|
+
mfglibInternalSetChannel(channel: number): Promise<SLStatus>;
|
|
2209
2443
|
/**
|
|
2210
2444
|
* Returns the current radio channel, as previously set via mfglibSetChannel().
|
|
2211
2445
|
* @returns uint8_t The current channel.
|
|
2212
2446
|
*/
|
|
2213
|
-
|
|
2447
|
+
mfglibInternalGetChannel(): Promise<number>;
|
|
2214
2448
|
/**
|
|
2215
2449
|
* First select the transmit power mode, and then include a method for selecting
|
|
2216
2450
|
* the radio transmit power. The valid power settings depend upon the specific
|
|
@@ -2219,14 +2453,14 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2219
2453
|
* available to the caller via mfglibGetPower().
|
|
2220
2454
|
* @param txPowerMode uint16_t Power mode. Refer to txPowerModes in stack/include/ember-types.h for possible values.
|
|
2221
2455
|
* @param power int8_t Power in units of dBm. Refer to radio data sheet for valid range.
|
|
2222
|
-
* @returns An
|
|
2456
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2223
2457
|
*/
|
|
2224
|
-
|
|
2458
|
+
mfglibInternalSetPower(txPowerMode: EmberTXPowerMode, power: number): Promise<SLStatus>;
|
|
2225
2459
|
/**
|
|
2226
2460
|
* Returns the current radio power setting, as previously set via mfglibSetPower().
|
|
2227
2461
|
* @returns int8_t Power in units of dBm. Refer to radio data sheet for valid range.
|
|
2228
2462
|
*/
|
|
2229
|
-
|
|
2463
|
+
mfglibInternalGetPower(): Promise<number>;
|
|
2230
2464
|
/**
|
|
2231
2465
|
* Callback
|
|
2232
2466
|
* A callback indicating a packet with a valid CRC has been received.
|
|
@@ -2245,9 +2479,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2245
2479
|
* channel with current power settings. STANDALONE_BOOTLOADER_RECOVERY_MODE: Will listen for an over-the-air image
|
|
2246
2480
|
* transfer on the default channel with default power settings. Both modes also allow an image transfer to begin
|
|
2247
2481
|
* with XMODEM over the serial protocol's Bootloader Frame.
|
|
2248
|
-
* @returns An
|
|
2482
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2249
2483
|
*/
|
|
2250
|
-
ezspLaunchStandaloneBootloader(mode: number): Promise<
|
|
2484
|
+
ezspLaunchStandaloneBootloader(mode: number): Promise<SLStatus>;
|
|
2251
2485
|
/**
|
|
2252
2486
|
* Transmits the given bootload message to a neighboring node using a specific
|
|
2253
2487
|
* 802.15.4 header that allows the EmberZNet stack as well as the bootloader to
|
|
@@ -2256,9 +2490,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2256
2490
|
* @param destEui64 The EUI64 of the target node. Ignored if the broadcast field is set to true.
|
|
2257
2491
|
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2258
2492
|
* @param messageContents uint8_t * The multicast message.
|
|
2259
|
-
* @returns An
|
|
2493
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2260
2494
|
*/
|
|
2261
|
-
ezspSendBootloadMessage(broadcast: boolean, destEui64:
|
|
2495
|
+
ezspSendBootloadMessage(broadcast: boolean, destEui64: EUI64, messageContents: Buffer): Promise<SLStatus>;
|
|
2262
2496
|
/**
|
|
2263
2497
|
* Detects if the standalone bootloader is installed, and if so returns the
|
|
2264
2498
|
* installed version. If not return 0xffff. A returned version of 0x1234 would
|
|
@@ -2270,28 +2504,26 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2270
2504
|
* @returns uint8_t * The value of MICRO on the node
|
|
2271
2505
|
* @returns uint8_t * The value of PHY on the node
|
|
2272
2506
|
*/
|
|
2273
|
-
ezspGetStandaloneBootloaderVersionPlatMicroPhy(): Promise<[number, nodePlat: number, nodeMicro: number, nodePhy: number]>;
|
|
2507
|
+
ezspGetStandaloneBootloaderVersionPlatMicroPhy(): Promise<[bootloaderVersion: number, nodePlat: number, nodeMicro: number, nodePhy: number]>;
|
|
2274
2508
|
/**
|
|
2275
2509
|
* Callback
|
|
2276
2510
|
* A callback invoked by the EmberZNet stack when a bootload message is
|
|
2277
2511
|
* received.
|
|
2278
2512
|
* @param longId The EUI64 of the sending node.
|
|
2279
|
-
* @param
|
|
2280
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during the reception.
|
|
2281
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2513
|
+
* @param packetInfo Information about the incoming packet.
|
|
2282
2514
|
* @param messageContents uint8_t *The bootload message that was sent.
|
|
2283
2515
|
*/
|
|
2284
|
-
ezspIncomingBootloadMessageHandler(longId:
|
|
2516
|
+
ezspIncomingBootloadMessageHandler(longId: EUI64, packetInfo: EmberRxPacketInfo, messageContents: Buffer): void;
|
|
2285
2517
|
/**
|
|
2286
2518
|
* Callback
|
|
2287
2519
|
* A callback invoked by the EmberZNet stack when the MAC has finished
|
|
2288
2520
|
* transmitting a bootload message.
|
|
2289
|
-
* @param status An EmberStatus value of
|
|
2290
|
-
* or
|
|
2521
|
+
* @param status An EmberStatus value of SLStatus.OK if an ACK was received from the destination
|
|
2522
|
+
* or SLStatus.ZIGBEE_DELIVERY_FAILED if no ACK was received.
|
|
2291
2523
|
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2292
2524
|
* @param messageContents uint8_t * The message that was sent.
|
|
2293
2525
|
*/
|
|
2294
|
-
ezspBootloadTransmitCompleteHandler(status:
|
|
2526
|
+
ezspBootloadTransmitCompleteHandler(status: SLStatus, messageContents: Buffer): void;
|
|
2295
2527
|
/**
|
|
2296
2528
|
* Perform AES encryption on plaintext using key.
|
|
2297
2529
|
* @param uint8_t * 16 bytes of plaintext.
|
|
@@ -2299,71 +2531,131 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2299
2531
|
* @returns uint8_t * 16 bytes of ciphertext.
|
|
2300
2532
|
*/
|
|
2301
2533
|
ezspAesEncrypt(plaintext: number[], key: number[]): Promise<number[]>;
|
|
2534
|
+
/**
|
|
2535
|
+
* Callback
|
|
2536
|
+
* A callback to be implemented on the Golden Node to process acknowledgements.
|
|
2537
|
+
* If you supply a custom version of this handler, you must define SL_ZIGBEE_APPLICATION_HAS_INCOMING_MFG_TEST_MESSAGE_HANDLER
|
|
2538
|
+
* in your application's CONFIGURATION_HEADER
|
|
2539
|
+
* @param messageType uint8_t The type of the incoming message. Currently, the only possibility is MFG_TEST_TYPE_ACK.
|
|
2540
|
+
* @param data uint8_t * A pointer to the data received in the current message.
|
|
2541
|
+
*/
|
|
2542
|
+
ezspIncomingMfgTestMessageHandler(messageType: number, messageContents: Buffer): void;
|
|
2543
|
+
/**
|
|
2544
|
+
* A function used on the Golden Node to switch between normal network operation (for testing) and manufacturing configuration.
|
|
2545
|
+
* Like emberSleep(), it may not be possible to execute this command due to pending network activity.
|
|
2546
|
+
* For the transition from normal network operation to manufacturing configuration, it is customary to loop,
|
|
2547
|
+
* calling this function alternately with emberTick() until the mode change succeeds.
|
|
2548
|
+
* @param beginConfiguration Determines the new mode of operation.
|
|
2549
|
+
* true causes the node to enter manufacturing configuration.
|
|
2550
|
+
* false causes the node to return to normal network operation.
|
|
2551
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2552
|
+
*/
|
|
2553
|
+
ezspMfgTestSetPacketMode(beginConfiguration: boolean): Promise<SLStatus>;
|
|
2554
|
+
/**
|
|
2555
|
+
* A function used during manufacturing configuration on the Golden Node to send the DUT a reboot command.
|
|
2556
|
+
* The usual practice is to execute this command at the end of manufacturing configuration,
|
|
2557
|
+
* to place the DUT into normal network operation for testing.
|
|
2558
|
+
* This function executes only during manufacturing configuration mode and returns an error otherwise.
|
|
2559
|
+
* If successful, the DUT acknowledges the reboot command within 20 milliseconds and then reboots.
|
|
2560
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2561
|
+
*/
|
|
2562
|
+
ezspMfgTestSendRebootCommand(): Promise<SLStatus>;
|
|
2563
|
+
/**
|
|
2564
|
+
* A function used during manufacturing configuration on the Golden Node to set the DUT's 8-byte EUI ID.
|
|
2565
|
+
* This function executes only during manufacturing configuration mode and returns an error otherwise.
|
|
2566
|
+
* If successful, the DUT acknowledges the new EUI ID within 150 milliseconds.
|
|
2567
|
+
* @param newId The 8-byte EUID for the DUT.
|
|
2568
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2569
|
+
*/
|
|
2570
|
+
ezspMfgTestSendEui64(newId: EUI64): Promise<SLStatus>;
|
|
2571
|
+
/**
|
|
2572
|
+
* A function used during manufacturing configuration on the Golden Node to set the DUT's 16-byte configuration string.
|
|
2573
|
+
* This function executes only during manufacturing configuration mode and will return an error otherwise.
|
|
2574
|
+
* If successful, the DUT will acknowledge the new string within 150 milliseconds.
|
|
2575
|
+
* @param newString The 16-byte manufacturing string.
|
|
2576
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2577
|
+
*/
|
|
2578
|
+
ezspMfgTestSendManufacturingString(newString: number[]): Promise<SLStatus>;
|
|
2579
|
+
/**
|
|
2580
|
+
* A function used during manufacturing configuration on the Golden Node to set the DUT's radio parameters.
|
|
2581
|
+
* This function executes only during manufacturing configuration mode and returns an error otherwise.
|
|
2582
|
+
* If successful, the DUT acknowledges the new parameters within 25 milliseconds.
|
|
2583
|
+
* @param supportedBands Sets the radio band for the DUT. See ember-common.h for possible values.
|
|
2584
|
+
* @param crystalOffset Sets the CC1020 crystal offset. This parameter has no effect on the EM2420, and it may safely be set to 0 for this RFIC.
|
|
2585
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2586
|
+
*/
|
|
2587
|
+
ezspMfgTestSendRadioParameters(supportedBands: number, crystalOffset: number): Promise<SLStatus>;
|
|
2588
|
+
/**
|
|
2589
|
+
* A function used in each of the manufacturing configuration API calls.
|
|
2590
|
+
* Most implementations will not need to call this function directly. See mfg-test.c for more detail.
|
|
2591
|
+
* This function executes only during manufacturing configuration mode and returns an error otherwise.
|
|
2592
|
+
* @param command A pointer to the outgoing command string.
|
|
2593
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2594
|
+
*/
|
|
2595
|
+
ezspMfgTestSendCommand(command: number): Promise<SLStatus>;
|
|
2302
2596
|
/**
|
|
2303
2597
|
* A consolidation of ZLL network operations with similar signatures;
|
|
2304
2598
|
* specifically, forming and joining networks or touch-linking.
|
|
2305
2599
|
* @param networkInfo EmberZllNetwork * Information about the network.
|
|
2306
2600
|
* @param op Operation indicator.
|
|
2307
2601
|
* @param radioTxPower int8_t Radio transmission power.
|
|
2308
|
-
* @returns An
|
|
2602
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2309
2603
|
*/
|
|
2310
|
-
ezspZllNetworkOps(networkInfo: EmberZllNetwork, op: EzspZllNetworkOperation, radioTxPower: number): Promise<
|
|
2604
|
+
ezspZllNetworkOps(networkInfo: EmberZllNetwork, op: EzspZllNetworkOperation, radioTxPower: number): Promise<SLStatus>;
|
|
2311
2605
|
/**
|
|
2312
2606
|
* This call will cause the device to setup the security information used in its
|
|
2313
2607
|
* network. It must be called prior to forming, starting, or joining a network.
|
|
2314
2608
|
* @param networkKey EmberKeyData * ZLL Network key.
|
|
2315
2609
|
* @param securityState EmberZllInitialSecurityState * Initial security state of the network.
|
|
2316
|
-
* @returns An
|
|
2610
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2317
2611
|
*/
|
|
2318
|
-
ezspZllSetInitialSecurityState(networkKey: EmberKeyData, securityState: EmberZllInitialSecurityState): Promise<
|
|
2612
|
+
ezspZllSetInitialSecurityState(networkKey: EmberKeyData, securityState: EmberZllInitialSecurityState): Promise<SLStatus>;
|
|
2319
2613
|
/**
|
|
2320
2614
|
* This call will update ZLL security token information. Unlike
|
|
2321
2615
|
* emberZllSetInitialSecurityState, this can be called while a network is
|
|
2322
2616
|
* already established.
|
|
2323
2617
|
* @param securityState EmberZllInitialSecurityState * Security state of the network.
|
|
2324
|
-
* @returns An
|
|
2618
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2325
2619
|
*/
|
|
2326
|
-
ezspZllSetSecurityStateWithoutKey(securityState: EmberZllInitialSecurityState): Promise<
|
|
2620
|
+
ezspZllSetSecurityStateWithoutKey(securityState: EmberZllInitialSecurityState): Promise<SLStatus>;
|
|
2327
2621
|
/**
|
|
2328
2622
|
* This call will initiate a ZLL network scan on all the specified channels.
|
|
2329
2623
|
* @param channelMask uint32_t The range of channels to scan.
|
|
2330
2624
|
* @param radioPowerForScan int8_t The radio output power used for the scan requests.
|
|
2331
2625
|
* @param nodeType The node type of the local device.
|
|
2332
|
-
* @returns An
|
|
2626
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2333
2627
|
*/
|
|
2334
|
-
ezspZllStartScan(channelMask: number, radioPowerForScan: number, nodeType: EmberNodeType): Promise<
|
|
2628
|
+
ezspZllStartScan(channelMask: number, radioPowerForScan: number, nodeType: EmberNodeType): Promise<SLStatus>;
|
|
2335
2629
|
/**
|
|
2336
2630
|
* This call will change the mode of the radio so that the receiver is on for a
|
|
2337
2631
|
* specified amount of time when the device is idle.
|
|
2338
2632
|
* @param durationMs uint32_t The duration in milliseconds to leave the radio on.
|
|
2339
|
-
* @returns An
|
|
2633
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2340
2634
|
*/
|
|
2341
|
-
ezspZllSetRxOnWhenIdle(durationMs: number): Promise<
|
|
2635
|
+
ezspZllSetRxOnWhenIdle(durationMs: number): Promise<SLStatus>;
|
|
2342
2636
|
/**
|
|
2343
2637
|
* Callback
|
|
2344
2638
|
* This call is fired when a ZLL network scan finds a ZLL network.
|
|
2345
2639
|
* @param networkInfo EmberZllNetwork * Information about the network.
|
|
2346
2640
|
* @param isDeviceInfoNull Used to interpret deviceInfo field.
|
|
2347
2641
|
* @param deviceInfo EmberZllDeviceInfoRecord * Device specific information.
|
|
2348
|
-
* @param
|
|
2349
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during reception.
|
|
2642
|
+
* @param packetInfo Information about the incoming packet received from this network.
|
|
2350
2643
|
*/
|
|
2351
|
-
ezspZllNetworkFoundHandler(networkInfo: EmberZllNetwork, isDeviceInfoNull: boolean, deviceInfo: EmberZllDeviceInfoRecord,
|
|
2644
|
+
ezspZllNetworkFoundHandler(networkInfo: EmberZllNetwork, isDeviceInfoNull: boolean, deviceInfo: EmberZllDeviceInfoRecord, packetInfo: EmberRxPacketInfo): void;
|
|
2352
2645
|
/**
|
|
2353
2646
|
* Callback
|
|
2354
2647
|
* This call is fired when a ZLL network scan is complete.
|
|
2355
2648
|
* @param status Status of the operation.
|
|
2356
2649
|
*/
|
|
2357
|
-
ezspZllScanCompleteHandler(status:
|
|
2650
|
+
ezspZllScanCompleteHandler(status: SLStatus): void;
|
|
2358
2651
|
/**
|
|
2359
2652
|
* Callback
|
|
2360
2653
|
* This call is fired when network and group addresses are assigned to a remote
|
|
2361
2654
|
* mode in a network start or network join request.
|
|
2362
2655
|
* @param addressInfo EmberZllAddressAssignment * Address assignment information.
|
|
2363
|
-
* @param
|
|
2364
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during reception.
|
|
2656
|
+
* @param packetInfo Information about the incoming packet received from this network.
|
|
2365
2657
|
*/
|
|
2366
|
-
ezspZllAddressAssignmentHandler(addressInfo: EmberZllAddressAssignment,
|
|
2658
|
+
ezspZllAddressAssignmentHandler(addressInfo: EmberZllAddressAssignment, packetInfo: EmberRxPacketInfo): void;
|
|
2367
2659
|
/**
|
|
2368
2660
|
* Callback
|
|
2369
2661
|
* This call is fired when the device is a target of a touch link.
|
|
@@ -2448,40 +2740,6 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2448
2740
|
* Clear ZLL stack tokens.
|
|
2449
2741
|
*/
|
|
2450
2742
|
ezspZllClearTokens(): Promise<void>;
|
|
2451
|
-
/**
|
|
2452
|
-
* Sets whether to use parent classification when processing beacons during a
|
|
2453
|
-
* join or rejoin. Parent classification considers whether a received beacon
|
|
2454
|
-
* indicates trust center connectivity and long uptime on the network
|
|
2455
|
-
* @param enabled Enable or disable parent classification
|
|
2456
|
-
*/
|
|
2457
|
-
ezspSetParentClassificationEnabled(enabled: boolean): Promise<void>;
|
|
2458
|
-
/**
|
|
2459
|
-
* Gets whether to use parent classification when processing beacons during a
|
|
2460
|
-
* join or rejoin. Parent classification considers whether a received beacon
|
|
2461
|
-
* indicates trust center connectivity and long uptime on the network
|
|
2462
|
-
* @returns Enable or disable parent classification
|
|
2463
|
-
*/
|
|
2464
|
-
ezspGetParentClassificationEnabled(): Promise<boolean>;
|
|
2465
|
-
/**
|
|
2466
|
-
* sets the device uptime to be long or short
|
|
2467
|
-
* @param hasLongUpTime if the uptime is long or not
|
|
2468
|
-
*/
|
|
2469
|
-
ezspSetLongUpTime(hasLongUpTime: boolean): Promise<void>;
|
|
2470
|
-
/**
|
|
2471
|
-
* sets the hub connectivity to be true or false
|
|
2472
|
-
* @param connected if the hub is connected or not
|
|
2473
|
-
*/
|
|
2474
|
-
ezspSetHubConnectivity(connected: boolean): Promise<void>;
|
|
2475
|
-
/**
|
|
2476
|
-
* checks if the device uptime is long or short
|
|
2477
|
-
* @returns if the uptime is long or not
|
|
2478
|
-
*/
|
|
2479
|
-
ezspIsUpTimeLong(): Promise<boolean>;
|
|
2480
|
-
/**
|
|
2481
|
-
* checks if the hub is connected or not
|
|
2482
|
-
* @returns if the hub is connected or not
|
|
2483
|
-
*/
|
|
2484
|
-
ezspIsHubConnected(): Promise<boolean>;
|
|
2485
2743
|
/**
|
|
2486
2744
|
* Update the GP Proxy table based on a GP pairing.
|
|
2487
2745
|
* @param options uint32_t The options field of the GP Pairing command.
|
|
@@ -2496,7 +2754,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2496
2754
|
* @param forwardingRadius uint8_t The forwarding radius.
|
|
2497
2755
|
* @returns Whether a GP Pairing has been created or not.
|
|
2498
2756
|
*/
|
|
2499
|
-
ezspGpProxyTableProcessGpPairing(options: number, addr: EmberGpAddress, commMode: number, sinkNetworkAddress: number, sinkGroupId: number, assignedAlias: number, sinkIeeeAddress:
|
|
2757
|
+
ezspGpProxyTableProcessGpPairing(options: number, addr: EmberGpAddress, commMode: number, sinkNetworkAddress: number, sinkGroupId: number, assignedAlias: number, sinkIeeeAddress: EUI64, gpdKey: EmberKeyData, gpdSecurityFrameCounter: number, forwardingRadius: number): Promise<boolean>;
|
|
2500
2758
|
/**
|
|
2501
2759
|
* Adds/removes an entry from the GP Tx Queue.
|
|
2502
2760
|
* @param action The action to perform on the GP TX queue (true to add, false to remove).
|
|
@@ -2506,17 +2764,17 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2506
2764
|
* @param gpdAsdu uint8_t * The GP command payload.
|
|
2507
2765
|
* @param gpepHandle uint8_t The handle to refer to the GPDF.
|
|
2508
2766
|
* @param gpTxQueueEntryLifetimeMs uint16_t How long to keep the GPDF in the TX Queue.
|
|
2509
|
-
* @returns An
|
|
2767
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2510
2768
|
*/
|
|
2511
|
-
ezspDGpSend(action: boolean, useCca: boolean, addr: EmberGpAddress, gpdCommandId: number, gpdAsdu: Buffer, gpepHandle: number, gpTxQueueEntryLifetimeMs: number): Promise<
|
|
2769
|
+
ezspDGpSend(action: boolean, useCca: boolean, addr: EmberGpAddress, gpdCommandId: number, gpdAsdu: Buffer, gpepHandle: number, gpTxQueueEntryLifetimeMs: number): Promise<SLStatus>;
|
|
2512
2770
|
/**
|
|
2513
2771
|
* Callback
|
|
2514
2772
|
* A callback to the GP endpoint to indicate the result of the GPDF
|
|
2515
2773
|
* transmission.
|
|
2516
|
-
* @param status An
|
|
2774
|
+
* @param status An SLStatus value indicating success or the reason for failure.
|
|
2517
2775
|
* @param gpepHandle uint8_t The handle of the GPDF.
|
|
2518
2776
|
*/
|
|
2519
|
-
ezspDGpSentHandler(status:
|
|
2777
|
+
ezspDGpSentHandler(status: SLStatus, gpepHandle: number): void;
|
|
2520
2778
|
/**
|
|
2521
2779
|
* Callback
|
|
2522
2780
|
* A callback invoked by the ZigBee GP stack when a GPDF is received.
|
|
@@ -2535,14 +2793,14 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2535
2793
|
* @param proxyTableIndex uint8_tThe proxy table index of the corresponding proxy table entry to the incoming GPDF.
|
|
2536
2794
|
* @param gpdCommandPayload uint8_t * The GPD command payload.
|
|
2537
2795
|
*/
|
|
2538
|
-
ezspGpepIncomingMessageHandler(status:
|
|
2796
|
+
ezspGpepIncomingMessageHandler(status: EmberGPStatus, gpdLink: number, sequenceNumber: number, addr: EmberGpAddress, gpdfSecurityLevel: EmberGpSecurityLevel, gpdfSecurityKeyType: EmberGpKeyType, autoCommissioning: boolean, bidirectionalInfo: number, gpdSecurityFrameCounter: number, gpdCommandId: number, mic: number, proxyTableIndex: number, gpdCommandPayload: Buffer): void;
|
|
2539
2797
|
/**
|
|
2540
2798
|
* Retrieves the proxy table entry stored at the passed index.
|
|
2541
2799
|
* @param proxyIndex uint8_t The index of the requested proxy table entry.
|
|
2542
|
-
* @returns An
|
|
2800
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2543
2801
|
* @returns EmberGpProxyTableEntry * An EmberGpProxyTableEntry struct containing a copy of the requested proxy entry.
|
|
2544
2802
|
*/
|
|
2545
|
-
ezspGpProxyTableGetEntry(proxyIndex: number): Promise<[
|
|
2803
|
+
ezspGpProxyTableGetEntry(proxyIndex: number): Promise<[SLStatus, entry: EmberGpProxyTableEntry]>;
|
|
2546
2804
|
/**
|
|
2547
2805
|
* Finds the index of the passed address in the gp table.
|
|
2548
2806
|
* @param addr EmberGpAddress * The address to search for
|
|
@@ -2552,10 +2810,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2552
2810
|
/**
|
|
2553
2811
|
* Retrieves the sink table entry stored at the passed index.
|
|
2554
2812
|
* @param sinkIndex uint8_t The index of the requested sink table entry.
|
|
2555
|
-
* @returns An
|
|
2813
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2556
2814
|
* @returns EmberGpSinkTableEntry * An EmberGpSinkTableEntry struct containing a copy of the requested sink entry.
|
|
2557
2815
|
*/
|
|
2558
|
-
ezspGpSinkTableGetEntry(sinkIndex: number): Promise<[
|
|
2816
|
+
ezspGpSinkTableGetEntry(sinkIndex: number): Promise<[SLStatus, entry: EmberGpSinkTableEntry]>;
|
|
2559
2817
|
/**
|
|
2560
2818
|
* Finds the index of the passed address in the gp table.
|
|
2561
2819
|
* @param addr EmberGpAddress *The address to search for.
|
|
@@ -2566,9 +2824,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2566
2824
|
* Retrieves the sink table entry stored at the passed index.
|
|
2567
2825
|
* @param sinkIndex uint8_t The index of the requested sink table entry.
|
|
2568
2826
|
* @param entry EmberGpSinkTableEntry * An EmberGpSinkTableEntry struct containing a copy of the sink entry to be updated.
|
|
2569
|
-
* @returns An
|
|
2827
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2570
2828
|
*/
|
|
2571
|
-
ezspGpSinkTableSetEntry(sinkIndex: number, entry: EmberGpSinkTableEntry): Promise<
|
|
2829
|
+
ezspGpSinkTableSetEntry(sinkIndex: number, entry: EmberGpSinkTableEntry): Promise<SLStatus>;
|
|
2572
2830
|
/**
|
|
2573
2831
|
* Removes the sink table entry stored at the passed index.
|
|
2574
2832
|
* @param uint8_t The index of the requested sink table entry.
|
|
@@ -2600,9 +2858,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2600
2858
|
* @param uint16_t gpm address for security.
|
|
2601
2859
|
* @param uint16_t gpm address for pairing.
|
|
2602
2860
|
* @param uint8_t sink endpoint.
|
|
2603
|
-
* @returns An
|
|
2861
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2604
2862
|
*/
|
|
2605
|
-
ezspGpSinkCommission(options: number, gpmAddrForSecurity: number, gpmAddrForPairing: number, sinkEndpoint: number): Promise<
|
|
2863
|
+
ezspGpSinkCommission(options: number, gpmAddrForSecurity: number, gpmAddrForPairing: number, sinkEndpoint: number): Promise<SLStatus>;
|
|
2606
2864
|
/**
|
|
2607
2865
|
* Clears all entries within the translation table.
|
|
2608
2866
|
*/
|
|
@@ -2620,35 +2878,35 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2620
2878
|
/**
|
|
2621
2879
|
* Gets the token information for a single token at provided index
|
|
2622
2880
|
* @param index uint8_t Index of the token in the token table for which information is needed.
|
|
2623
|
-
* @returns An
|
|
2881
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2624
2882
|
* @returns EmberTokenInfo * Token information.
|
|
2625
2883
|
*/
|
|
2626
|
-
ezspGetTokenInfo(index: number): Promise<[
|
|
2884
|
+
ezspGetTokenInfo(index: number): Promise<[SLStatus, tokenInfo: EmberTokenInfo]>;
|
|
2627
2885
|
/**
|
|
2628
2886
|
* Gets the token data for a single token with provided key
|
|
2629
2887
|
* @param token uint32_t Key of the token in the token table for which data is needed.
|
|
2630
2888
|
* @param index uint32_t Index in case of the indexed token.
|
|
2631
|
-
* @returns An
|
|
2889
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2632
2890
|
* @returns EmberTokenData * Token Data
|
|
2633
2891
|
*/
|
|
2634
|
-
ezspGetTokenData(token: number, index: number): Promise<[
|
|
2892
|
+
ezspGetTokenData(token: number, index: number): Promise<[SLStatus, tokenData: EmberTokenData]>;
|
|
2635
2893
|
/**
|
|
2636
2894
|
* Sets the token data for a single token with provided key
|
|
2637
2895
|
* @param token uint32_t Key of the token in the token table for which data is to be set.
|
|
2638
2896
|
* @param index uint32_t Index in case of the indexed token.
|
|
2639
2897
|
* @param EmberTokenData * Token Data
|
|
2640
|
-
* @returns An
|
|
2898
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2641
2899
|
*/
|
|
2642
|
-
ezspSetTokenData(token: number, index: number, tokenData: EmberTokenData): Promise<
|
|
2900
|
+
ezspSetTokenData(token: number, index: number, tokenData: EmberTokenData): Promise<SLStatus>;
|
|
2643
2901
|
/**
|
|
2644
2902
|
* Reset the node by calling halReboot.
|
|
2645
2903
|
*/
|
|
2646
2904
|
ezspResetNode(): Promise<void>;
|
|
2647
2905
|
/**
|
|
2648
2906
|
* Run GP security test vectors.
|
|
2649
|
-
* @returns An
|
|
2907
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2650
2908
|
*/
|
|
2651
|
-
ezspGpSecurityTestVectors(): Promise<
|
|
2909
|
+
ezspGpSecurityTestVectors(): Promise<SLStatus>;
|
|
2652
2910
|
/**
|
|
2653
2911
|
* Factory reset all configured zigbee tokens
|
|
2654
2912
|
* @param excludeOutgoingFC Exclude network and APS outgoing frame counter tokens.
|
|
@@ -2656,4 +2914,5 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2656
2914
|
*/
|
|
2657
2915
|
ezspTokenFactoryReset(excludeOutgoingFC: boolean, excludeBootCounter: boolean): Promise<void>;
|
|
2658
2916
|
}
|
|
2917
|
+
export {};
|
|
2659
2918
|
//# sourceMappingURL=ezsp.d.ts.map
|