Google Cloud IoT Core V1 Client - Class SendCommandToDeviceRequest (1.5.12)

Reference documentation and code samples for the Google Cloud IoT Core V1 Client class SendCommandToDeviceRequest.

Request for SendCommandToDevice.

Generated from protobuf message google.cloud.iot.v1.SendCommandToDeviceRequest

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

↳ binary_data string

Required. The command data to send to the device.

↳ subfolder string

Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.

getName

Required. The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

Returns
TypeDescription
string

setName

Required. The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBinaryData

Required. The command data to send to the device.

Returns
TypeDescription
string

setBinaryData

Required. The command data to send to the device.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSubfolder

Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.

Returns
TypeDescription
string

setSubfolder

Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.

Parameter
NameDescription
var string
Returns
TypeDescription
$this