Constructors
constructor
- new Request<Type = any>(
func: (frame: ZclFrame) => Promise<Type>,
frame: ZclFrame,
timeout: number,
sendPolicy?: SendPolicy,
lastError?: Error,
resolve?: (value: Type) => void,
reject?: (error: Error) => void,
): Request<Type> Parameters
- func: (frame: ZclFrame) => Promise<Type>
- frame: ZclFrame
- timeout: number
Optional
sendPolicy: SendPolicyOptional
lastError: ErrorOptional
resolve: (value: Type) => voidOptional
reject: (error: Error) => void
Properties
Static
defaultSendPolicy
defaultSendPolicy: { [key: number]: SendPolicy } = ... Methods
addCallbacks
- addCallbacks(
resolve: (value: Type) => void,
reject: (error: Error) => void,
): void Parameters
- resolve: (value: Type) => void
- reject: (error: Error) => void
Returns void
reject
- reject(error?: Error): void
Returns void
resolve
- resolve(value: Type): void
Returns void
send
- send(): Promise<Type>
Returns Promise<Type>