api.DeviceProfileTemplate
*/
class DeviceProfileTemplate extends \Google\Protobuf\Internal\Message
{
/**
* Device-profile template ID.
*
* Generated from protobuf field string id = 1;
*/
protected $id = '';
/**
* Name.
*
* Generated from protobuf field string name = 2;
*/
protected $name = '';
/**
* Description.
*
* Generated from protobuf field string description = 3;
*/
protected $description = '';
/**
* Vendor.
*
* Generated from protobuf field string vendor = 4;
*/
protected $vendor = '';
/**
* Firmware.
*
* Generated from protobuf field string firmware = 5;
*/
protected $firmware = '';
/**
* Region.
*
* Generated from protobuf field .common.Region region = 6;
*/
protected $region = 0;
/**
* LoRaWAN mac-version.
*
* Generated from protobuf field .common.MacVersion mac_version = 7;
*/
protected $mac_version = 0;
/**
* Regional parameters revision.
*
* Generated from protobuf field .common.RegParamsRevision reg_params_revision = 8;
*/
protected $reg_params_revision = 0;
/**
* ADR algorithm ID.
*
* Generated from protobuf field string adr_algorithm_id = 9;
*/
protected $adr_algorithm_id = '';
/**
* Payload codec runtime.
*
* Generated from protobuf field .api.CodecRuntime payload_codec_runtime = 10;
*/
protected $payload_codec_runtime = 0;
/**
* Payload codec script.
*
* Generated from protobuf field string payload_codec_script = 11;
*/
protected $payload_codec_script = '';
/**
* Flush queue on device activation.
*
* Generated from protobuf field bool flush_queue_on_activate = 12;
*/
protected $flush_queue_on_activate = false;
/**
* Uplink interval (seconds).
* This defines the expected uplink interval which the device uses for
* communication. When the uplink interval has expired and no uplink has
* been received, the device is considered inactive.
*
* Generated from protobuf field uint32 uplink_interval = 13;
*/
protected $uplink_interval = 0;
/**
* Device-status request interval (times / day).
* This defines the times per day that ChirpStack will request the device-status
* from the device.
*
* Generated from protobuf field uint32 device_status_req_interval = 14;
*/
protected $device_status_req_interval = 0;
/**
* Supports OTAA.
*
* Generated from protobuf field bool supports_otaa = 15;
*/
protected $supports_otaa = false;
/**
* Supports Class B.
*
* Generated from protobuf field bool supports_class_b = 16;
*/
protected $supports_class_b = false;
/**
* Supports Class-C.
*
* Generated from protobuf field bool supports_class_c = 17;
*/
protected $supports_class_c = false;
/**
* Class-B timeout (seconds).
* This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
*
* Generated from protobuf field uint32 class_b_timeout = 18;
*/
protected $class_b_timeout = 0;
/**
* Class-B ping-slots per beacon period.
* Valid options are: 0 - 7.
* The actual number of ping-slots per beacon period equals to 2^k.
*
* Generated from protobuf field uint32 class_b_ping_slot_nb_k = 19;
*/
protected $class_b_ping_slot_nb_k = 0;
/**
* Class-B ping-slot DR.
*
* Generated from protobuf field uint32 class_b_ping_slot_dr = 20;
*/
protected $class_b_ping_slot_dr = 0;
/**
* Class-B ping-slot freq (Hz).
*
* Generated from protobuf field uint32 class_b_ping_slot_freq = 21;
*/
protected $class_b_ping_slot_freq = 0;
/**
* Class-C timeout (seconds).
* This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
*
* Generated from protobuf field uint32 class_c_timeout = 22;
*/
protected $class_c_timeout = 0;
/**
* RX1 delay (for ABP).
*
* Generated from protobuf field uint32 abp_rx1_delay = 23;
*/
protected $abp_rx1_delay = 0;
/**
* RX1 DR offset (for ABP).
*
* Generated from protobuf field uint32 abp_rx1_dr_offset = 24;
*/
protected $abp_rx1_dr_offset = 0;
/**
* RX2 DR (for ABP).
*
* Generated from protobuf field uint32 abp_rx2_dr = 25;
*/
protected $abp_rx2_dr = 0;
/**
* RX2 frequency (for ABP, Hz).
*
* Generated from protobuf field uint32 abp_rx2_freq = 26;
*/
protected $abp_rx2_freq = 0;
/**
* User defined tags.
*
* Generated from protobuf field map tags = 27;
*/
private $tags;
/**
* Measurements.
* If defined, ChirpStack will visualize these metrics in the web-interface.
*
* Generated from protobuf field map measurements = 28;
*/
private $measurements;
/**
* Auto-detect measurements.
* If set to true, measurements will be automatically added based on the
* keys of the decoded payload. In cases where the decoded payload contains
* random keys in the data, you want to set this to false.
*
* Generated from protobuf field bool auto_detect_measurements = 29;
*/
protected $auto_detect_measurements = false;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $id
* Device-profile template ID.
* @type string $name
* Name.
* @type string $description
* Description.
* @type string $vendor
* Vendor.
* @type string $firmware
* Firmware.
* @type int $region
* Region.
* @type int $mac_version
* LoRaWAN mac-version.
* @type int $reg_params_revision
* Regional parameters revision.
* @type string $adr_algorithm_id
* ADR algorithm ID.
* @type int $payload_codec_runtime
* Payload codec runtime.
* @type string $payload_codec_script
* Payload codec script.
* @type bool $flush_queue_on_activate
* Flush queue on device activation.
* @type int $uplink_interval
* Uplink interval (seconds).
* This defines the expected uplink interval which the device uses for
* communication. When the uplink interval has expired and no uplink has
* been received, the device is considered inactive.
* @type int $device_status_req_interval
* Device-status request interval (times / day).
* This defines the times per day that ChirpStack will request the device-status
* from the device.
* @type bool $supports_otaa
* Supports OTAA.
* @type bool $supports_class_b
* Supports Class B.
* @type bool $supports_class_c
* Supports Class-C.
* @type int $class_b_timeout
* Class-B timeout (seconds).
* This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
* @type int $class_b_ping_slot_nb_k
* Class-B ping-slots per beacon period.
* Valid options are: 0 - 7.
* The actual number of ping-slots per beacon period equals to 2^k.
* @type int $class_b_ping_slot_dr
* Class-B ping-slot DR.
* @type int $class_b_ping_slot_freq
* Class-B ping-slot freq (Hz).
* @type int $class_c_timeout
* Class-C timeout (seconds).
* This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
* @type int $abp_rx1_delay
* RX1 delay (for ABP).
* @type int $abp_rx1_dr_offset
* RX1 DR offset (for ABP).
* @type int $abp_rx2_dr
* RX2 DR (for ABP).
* @type int $abp_rx2_freq
* RX2 frequency (for ABP, Hz).
* @type array|\Google\Protobuf\Internal\MapField $tags
* User defined tags.
* @type array|\Google\Protobuf\Internal\MapField $measurements
* Measurements.
* If defined, ChirpStack will visualize these metrics in the web-interface.
* @type bool $auto_detect_measurements
* Auto-detect measurements.
* If set to true, measurements will be automatically added based on the
* keys of the decoded payload. In cases where the decoded payload contains
* random keys in the data, you want to set this to false.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Chirpstack\Api\DeviceProfileTemplate::initOnce();
parent::__construct($data);
}
/**
* Device-profile template ID.
*
* Generated from protobuf field string id = 1;
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* Device-profile template ID.
*
* Generated from protobuf field string id = 1;
* @param string $var
* @return $this
*/
public function setId($var)
{
GPBUtil::checkString($var, True);
$this->id = $var;
return $this;
}
/**
* Name.
*
* Generated from protobuf field string name = 2;
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Name.
*
* Generated from protobuf field string name = 2;
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Description.
*
* Generated from protobuf field string description = 3;
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Description.
*
* Generated from protobuf field string description = 3;
* @param string $var
* @return $this
*/
public function setDescription($var)
{
GPBUtil::checkString($var, True);
$this->description = $var;
return $this;
}
/**
* Vendor.
*
* Generated from protobuf field string vendor = 4;
* @return string
*/
public function getVendor()
{
return $this->vendor;
}
/**
* Vendor.
*
* Generated from protobuf field string vendor = 4;
* @param string $var
* @return $this
*/
public function setVendor($var)
{
GPBUtil::checkString($var, True);
$this->vendor = $var;
return $this;
}
/**
* Firmware.
*
* Generated from protobuf field string firmware = 5;
* @return string
*/
public function getFirmware()
{
return $this->firmware;
}
/**
* Firmware.
*
* Generated from protobuf field string firmware = 5;
* @param string $var
* @return $this
*/
public function setFirmware($var)
{
GPBUtil::checkString($var, True);
$this->firmware = $var;
return $this;
}
/**
* Region.
*
* Generated from protobuf field .common.Region region = 6;
* @return int
*/
public function getRegion()
{
return $this->region;
}
/**
* Region.
*
* Generated from protobuf field .common.Region region = 6;
* @param int $var
* @return $this
*/
public function setRegion($var)
{
GPBUtil::checkEnum($var, \Chirpstack\Common\Region::class);
$this->region = $var;
return $this;
}
/**
* LoRaWAN mac-version.
*
* Generated from protobuf field .common.MacVersion mac_version = 7;
* @return int
*/
public function getMacVersion()
{
return $this->mac_version;
}
/**
* LoRaWAN mac-version.
*
* Generated from protobuf field .common.MacVersion mac_version = 7;
* @param int $var
* @return $this
*/
public function setMacVersion($var)
{
GPBUtil::checkEnum($var, \Chirpstack\Common\MacVersion::class);
$this->mac_version = $var;
return $this;
}
/**
* Regional parameters revision.
*
* Generated from protobuf field .common.RegParamsRevision reg_params_revision = 8;
* @return int
*/
public function getRegParamsRevision()
{
return $this->reg_params_revision;
}
/**
* Regional parameters revision.
*
* Generated from protobuf field .common.RegParamsRevision reg_params_revision = 8;
* @param int $var
* @return $this
*/
public function setRegParamsRevision($var)
{
GPBUtil::checkEnum($var, \Chirpstack\Common\RegParamsRevision::class);
$this->reg_params_revision = $var;
return $this;
}
/**
* ADR algorithm ID.
*
* Generated from protobuf field string adr_algorithm_id = 9;
* @return string
*/
public function getAdrAlgorithmId()
{
return $this->adr_algorithm_id;
}
/**
* ADR algorithm ID.
*
* Generated from protobuf field string adr_algorithm_id = 9;
* @param string $var
* @return $this
*/
public function setAdrAlgorithmId($var)
{
GPBUtil::checkString($var, True);
$this->adr_algorithm_id = $var;
return $this;
}
/**
* Payload codec runtime.
*
* Generated from protobuf field .api.CodecRuntime payload_codec_runtime = 10;
* @return int
*/
public function getPayloadCodecRuntime()
{
return $this->payload_codec_runtime;
}
/**
* Payload codec runtime.
*
* Generated from protobuf field .api.CodecRuntime payload_codec_runtime = 10;
* @param int $var
* @return $this
*/
public function setPayloadCodecRuntime($var)
{
GPBUtil::checkEnum($var, \Chirpstack\Api\CodecRuntime::class);
$this->payload_codec_runtime = $var;
return $this;
}
/**
* Payload codec script.
*
* Generated from protobuf field string payload_codec_script = 11;
* @return string
*/
public function getPayloadCodecScript()
{
return $this->payload_codec_script;
}
/**
* Payload codec script.
*
* Generated from protobuf field string payload_codec_script = 11;
* @param string $var
* @return $this
*/
public function setPayloadCodecScript($var)
{
GPBUtil::checkString($var, True);
$this->payload_codec_script = $var;
return $this;
}
/**
* Flush queue on device activation.
*
* Generated from protobuf field bool flush_queue_on_activate = 12;
* @return bool
*/
public function getFlushQueueOnActivate()
{
return $this->flush_queue_on_activate;
}
/**
* Flush queue on device activation.
*
* Generated from protobuf field bool flush_queue_on_activate = 12;
* @param bool $var
* @return $this
*/
public function setFlushQueueOnActivate($var)
{
GPBUtil::checkBool($var);
$this->flush_queue_on_activate = $var;
return $this;
}
/**
* Uplink interval (seconds).
* This defines the expected uplink interval which the device uses for
* communication. When the uplink interval has expired and no uplink has
* been received, the device is considered inactive.
*
* Generated from protobuf field uint32 uplink_interval = 13;
* @return int
*/
public function getUplinkInterval()
{
return $this->uplink_interval;
}
/**
* Uplink interval (seconds).
* This defines the expected uplink interval which the device uses for
* communication. When the uplink interval has expired and no uplink has
* been received, the device is considered inactive.
*
* Generated from protobuf field uint32 uplink_interval = 13;
* @param int $var
* @return $this
*/
public function setUplinkInterval($var)
{
GPBUtil::checkUint32($var);
$this->uplink_interval = $var;
return $this;
}
/**
* Device-status request interval (times / day).
* This defines the times per day that ChirpStack will request the device-status
* from the device.
*
* Generated from protobuf field uint32 device_status_req_interval = 14;
* @return int
*/
public function getDeviceStatusReqInterval()
{
return $this->device_status_req_interval;
}
/**
* Device-status request interval (times / day).
* This defines the times per day that ChirpStack will request the device-status
* from the device.
*
* Generated from protobuf field uint32 device_status_req_interval = 14;
* @param int $var
* @return $this
*/
public function setDeviceStatusReqInterval($var)
{
GPBUtil::checkUint32($var);
$this->device_status_req_interval = $var;
return $this;
}
/**
* Supports OTAA.
*
* Generated from protobuf field bool supports_otaa = 15;
* @return bool
*/
public function getSupportsOtaa()
{
return $this->supports_otaa;
}
/**
* Supports OTAA.
*
* Generated from protobuf field bool supports_otaa = 15;
* @param bool $var
* @return $this
*/
public function setSupportsOtaa($var)
{
GPBUtil::checkBool($var);
$this->supports_otaa = $var;
return $this;
}
/**
* Supports Class B.
*
* Generated from protobuf field bool supports_class_b = 16;
* @return bool
*/
public function getSupportsClassB()
{
return $this->supports_class_b;
}
/**
* Supports Class B.
*
* Generated from protobuf field bool supports_class_b = 16;
* @param bool $var
* @return $this
*/
public function setSupportsClassB($var)
{
GPBUtil::checkBool($var);
$this->supports_class_b = $var;
return $this;
}
/**
* Supports Class-C.
*
* Generated from protobuf field bool supports_class_c = 17;
* @return bool
*/
public function getSupportsClassC()
{
return $this->supports_class_c;
}
/**
* Supports Class-C.
*
* Generated from protobuf field bool supports_class_c = 17;
* @param bool $var
* @return $this
*/
public function setSupportsClassC($var)
{
GPBUtil::checkBool($var);
$this->supports_class_c = $var;
return $this;
}
/**
* Class-B timeout (seconds).
* This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
*
* Generated from protobuf field uint32 class_b_timeout = 18;
* @return int
*/
public function getClassBTimeout()
{
return $this->class_b_timeout;
}
/**
* Class-B timeout (seconds).
* This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
*
* Generated from protobuf field uint32 class_b_timeout = 18;
* @param int $var
* @return $this
*/
public function setClassBTimeout($var)
{
GPBUtil::checkUint32($var);
$this->class_b_timeout = $var;
return $this;
}
/**
* Class-B ping-slots per beacon period.
* Valid options are: 0 - 7.
* The actual number of ping-slots per beacon period equals to 2^k.
*
* Generated from protobuf field uint32 class_b_ping_slot_nb_k = 19;
* @return int
*/
public function getClassBPingSlotNbK()
{
return $this->class_b_ping_slot_nb_k;
}
/**
* Class-B ping-slots per beacon period.
* Valid options are: 0 - 7.
* The actual number of ping-slots per beacon period equals to 2^k.
*
* Generated from protobuf field uint32 class_b_ping_slot_nb_k = 19;
* @param int $var
* @return $this
*/
public function setClassBPingSlotNbK($var)
{
GPBUtil::checkUint32($var);
$this->class_b_ping_slot_nb_k = $var;
return $this;
}
/**
* Class-B ping-slot DR.
*
* Generated from protobuf field uint32 class_b_ping_slot_dr = 20;
* @return int
*/
public function getClassBPingSlotDr()
{
return $this->class_b_ping_slot_dr;
}
/**
* Class-B ping-slot DR.
*
* Generated from protobuf field uint32 class_b_ping_slot_dr = 20;
* @param int $var
* @return $this
*/
public function setClassBPingSlotDr($var)
{
GPBUtil::checkUint32($var);
$this->class_b_ping_slot_dr = $var;
return $this;
}
/**
* Class-B ping-slot freq (Hz).
*
* Generated from protobuf field uint32 class_b_ping_slot_freq = 21;
* @return int
*/
public function getClassBPingSlotFreq()
{
return $this->class_b_ping_slot_freq;
}
/**
* Class-B ping-slot freq (Hz).
*
* Generated from protobuf field uint32 class_b_ping_slot_freq = 21;
* @param int $var
* @return $this
*/
public function setClassBPingSlotFreq($var)
{
GPBUtil::checkUint32($var);
$this->class_b_ping_slot_freq = $var;
return $this;
}
/**
* Class-C timeout (seconds).
* This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
*
* Generated from protobuf field uint32 class_c_timeout = 22;
* @return int
*/
public function getClassCTimeout()
{
return $this->class_c_timeout;
}
/**
* Class-C timeout (seconds).
* This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
*
* Generated from protobuf field uint32 class_c_timeout = 22;
* @param int $var
* @return $this
*/
public function setClassCTimeout($var)
{
GPBUtil::checkUint32($var);
$this->class_c_timeout = $var;
return $this;
}
/**
* RX1 delay (for ABP).
*
* Generated from protobuf field uint32 abp_rx1_delay = 23;
* @return int
*/
public function getAbpRx1Delay()
{
return $this->abp_rx1_delay;
}
/**
* RX1 delay (for ABP).
*
* Generated from protobuf field uint32 abp_rx1_delay = 23;
* @param int $var
* @return $this
*/
public function setAbpRx1Delay($var)
{
GPBUtil::checkUint32($var);
$this->abp_rx1_delay = $var;
return $this;
}
/**
* RX1 DR offset (for ABP).
*
* Generated from protobuf field uint32 abp_rx1_dr_offset = 24;
* @return int
*/
public function getAbpRx1DrOffset()
{
return $this->abp_rx1_dr_offset;
}
/**
* RX1 DR offset (for ABP).
*
* Generated from protobuf field uint32 abp_rx1_dr_offset = 24;
* @param int $var
* @return $this
*/
public function setAbpRx1DrOffset($var)
{
GPBUtil::checkUint32($var);
$this->abp_rx1_dr_offset = $var;
return $this;
}
/**
* RX2 DR (for ABP).
*
* Generated from protobuf field uint32 abp_rx2_dr = 25;
* @return int
*/
public function getAbpRx2Dr()
{
return $this->abp_rx2_dr;
}
/**
* RX2 DR (for ABP).
*
* Generated from protobuf field uint32 abp_rx2_dr = 25;
* @param int $var
* @return $this
*/
public function setAbpRx2Dr($var)
{
GPBUtil::checkUint32($var);
$this->abp_rx2_dr = $var;
return $this;
}
/**
* RX2 frequency (for ABP, Hz).
*
* Generated from protobuf field uint32 abp_rx2_freq = 26;
* @return int
*/
public function getAbpRx2Freq()
{
return $this->abp_rx2_freq;
}
/**
* RX2 frequency (for ABP, Hz).
*
* Generated from protobuf field uint32 abp_rx2_freq = 26;
* @param int $var
* @return $this
*/
public function setAbpRx2Freq($var)
{
GPBUtil::checkUint32($var);
$this->abp_rx2_freq = $var;
return $this;
}
/**
* User defined tags.
*
* Generated from protobuf field map tags = 27;
* @return \Google\Protobuf\Internal\MapField
*/
public function getTags()
{
return $this->tags;
}
/**
* User defined tags.
*
* Generated from protobuf field map tags = 27;
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setTags($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->tags = $arr;
return $this;
}
/**
* Measurements.
* If defined, ChirpStack will visualize these metrics in the web-interface.
*
* Generated from protobuf field map measurements = 28;
* @return \Google\Protobuf\Internal\MapField
*/
public function getMeasurements()
{
return $this->measurements;
}
/**
* Measurements.
* If defined, ChirpStack will visualize these metrics in the web-interface.
*
* Generated from protobuf field map measurements = 28;
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setMeasurements($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Chirpstack\Api\Measurement::class);
$this->measurements = $arr;
return $this;
}
/**
* Auto-detect measurements.
* If set to true, measurements will be automatically added based on the
* keys of the decoded payload. In cases where the decoded payload contains
* random keys in the data, you want to set this to false.
*
* Generated from protobuf field bool auto_detect_measurements = 29;
* @return bool
*/
public function getAutoDetectMeasurements()
{
return $this->auto_detect_measurements;
}
/**
* Auto-detect measurements.
* If set to true, measurements will be automatically added based on the
* keys of the decoded payload. In cases where the decoded payload contains
* random keys in the data, you want to set this to false.
*
* Generated from protobuf field bool auto_detect_measurements = 29;
* @param bool $var
* @return $this
*/
public function setAutoDetectMeasurements($var)
{
GPBUtil::checkBool($var);
$this->auto_detect_measurements = $var;
return $this;
}
}