DeviceMethodRequest class

Represents the data passed in from the service to the device when a device method is called from the cloud. An instance of this class is passed to the callback registered via onDeviceMethod(string, (request: DeviceMethodRequest, response: DeviceMethodResponse) => void).

Constructors

DeviceMethodRequest(string, string, any)

Properties

methodName

The name of the method to be called.

payload

A Node Buffer representing the payload of the method call request.

requestId

The request identifier supplied by the service for this device method call.

Constructor Details

DeviceMethodRequest(string, string, any)

new DeviceMethodRequest(requestId: string, methodName: string, body?: any)

Parameters

requestId

string

methodName

string

body

any

Property Details

methodName

The name of the method to be called.

methodName: string

Property Value

string

payload

A Node Buffer representing the payload of the method call request.

payload: any

Property Value

any

requestId

The request identifier supplied by the service for this device method call.

requestId: string

Property Value

string