mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-18 23:38:20 +00:00
Add Class-B ping-slot parameters back to device-profile UI.
The device might not always send its periodicity to the network-server (using mac-commands). As well there is some ambiguity about the default ping-slot data-rates. While the Regional Parameters Specification defines the default beacon data-rates, it only defines the default ping-slot frequency for Class-B. This also changes the API field from class_b_ping_slot_period to class_b_ping_slot_nb_k, where ..._k must be between 0 - 7 as defined by the LoRaWAN Specification. This removes some ambiguity as 'period' could mean different things in different contexts.
This commit is contained in:
6
api/js/api/device_profile_pb.d.ts
vendored
6
api/js/api/device_profile_pb.d.ts
vendored
@ -59,8 +59,8 @@ export class DeviceProfile extends jspb.Message {
|
||||
getClassBTimeout(): number;
|
||||
setClassBTimeout(value: number): void;
|
||||
|
||||
getClassBPingSlotPeriod(): number;
|
||||
setClassBPingSlotPeriod(value: number): void;
|
||||
getClassBPingSlotNbK(): number;
|
||||
setClassBPingSlotNbK(value: number): void;
|
||||
|
||||
getClassBPingSlotDr(): number;
|
||||
setClassBPingSlotDr(value: number): void;
|
||||
@ -122,7 +122,7 @@ export namespace DeviceProfile {
|
||||
supportsClassB: boolean,
|
||||
supportsClassC: boolean,
|
||||
classBTimeout: number,
|
||||
classBPingSlotPeriod: number,
|
||||
classBPingSlotNbK: number,
|
||||
classBPingSlotDr: number,
|
||||
classBPingSlotFreq: number,
|
||||
classCTimeout: number,
|
||||
|
12
api/js/api/device_profile_pb.js
vendored
12
api/js/api/device_profile_pb.js
vendored
@ -357,7 +357,7 @@ proto.api.DeviceProfile.toObject = function(includeInstance, msg) {
|
||||
supportsClassB: jspb.Message.getBooleanFieldWithDefault(msg, 14, false),
|
||||
supportsClassC: jspb.Message.getBooleanFieldWithDefault(msg, 15, false),
|
||||
classBTimeout: jspb.Message.getFieldWithDefault(msg, 16, 0),
|
||||
classBPingSlotPeriod: jspb.Message.getFieldWithDefault(msg, 17, 0),
|
||||
classBPingSlotNbK: jspb.Message.getFieldWithDefault(msg, 17, 0),
|
||||
classBPingSlotDr: jspb.Message.getFieldWithDefault(msg, 18, 0),
|
||||
classBPingSlotFreq: jspb.Message.getFieldWithDefault(msg, 19, 0),
|
||||
classCTimeout: jspb.Message.getFieldWithDefault(msg, 20, 0),
|
||||
@ -475,7 +475,7 @@ proto.api.DeviceProfile.deserializeBinaryFromReader = function(msg, reader) {
|
||||
break;
|
||||
case 17:
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
msg.setClassBPingSlotPeriod(value);
|
||||
msg.setClassBPingSlotNbK(value);
|
||||
break;
|
||||
case 18:
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
@ -673,7 +673,7 @@ proto.api.DeviceProfile.serializeBinaryToWriter = function(message, writer) {
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getClassBPingSlotPeriod();
|
||||
f = message.getClassBPingSlotNbK();
|
||||
if (f !== 0) {
|
||||
writer.writeUint32(
|
||||
17,
|
||||
@ -1061,10 +1061,10 @@ proto.api.DeviceProfile.prototype.setClassBTimeout = function(value) {
|
||||
|
||||
|
||||
/**
|
||||
* optional uint32 class_b_ping_slot_period = 17;
|
||||
* optional uint32 class_b_ping_slot_nb_k = 17;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.api.DeviceProfile.prototype.getClassBPingSlotPeriod = function() {
|
||||
proto.api.DeviceProfile.prototype.getClassBPingSlotNbK = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
|
||||
};
|
||||
|
||||
@ -1073,7 +1073,7 @@ proto.api.DeviceProfile.prototype.getClassBPingSlotPeriod = function() {
|
||||
* @param {number} value
|
||||
* @return {!proto.api.DeviceProfile} returns this
|
||||
*/
|
||||
proto.api.DeviceProfile.prototype.setClassBPingSlotPeriod = function(value) {
|
||||
proto.api.DeviceProfile.prototype.setClassBPingSlotNbK = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 17, value);
|
||||
};
|
||||
|
||||
|
6
api/js/api/device_profile_template_pb.d.ts
vendored
6
api/js/api/device_profile_template_pb.d.ts
vendored
@ -63,8 +63,8 @@ export class DeviceProfileTemplate extends jspb.Message {
|
||||
getClassBTimeout(): number;
|
||||
setClassBTimeout(value: number): void;
|
||||
|
||||
getClassBPingSlotPeriod(): number;
|
||||
setClassBPingSlotPeriod(value: number): void;
|
||||
getClassBPingSlotNbK(): number;
|
||||
setClassBPingSlotNbK(value: number): void;
|
||||
|
||||
getClassBPingSlotDr(): number;
|
||||
setClassBPingSlotDr(value: number): void;
|
||||
@ -124,7 +124,7 @@ export namespace DeviceProfileTemplate {
|
||||
supportsClassB: boolean,
|
||||
supportsClassC: boolean,
|
||||
classBTimeout: number,
|
||||
classBPingSlotPeriod: number,
|
||||
classBPingSlotNbK: number,
|
||||
classBPingSlotDr: number,
|
||||
classBPingSlotFreq: number,
|
||||
classCTimeout: number,
|
||||
|
12
api/js/api/device_profile_template_pb.js
vendored
12
api/js/api/device_profile_template_pb.js
vendored
@ -270,7 +270,7 @@ proto.api.DeviceProfileTemplate.toObject = function(includeInstance, msg) {
|
||||
supportsClassB: jspb.Message.getBooleanFieldWithDefault(msg, 16, false),
|
||||
supportsClassC: jspb.Message.getBooleanFieldWithDefault(msg, 17, false),
|
||||
classBTimeout: jspb.Message.getFieldWithDefault(msg, 18, 0),
|
||||
classBPingSlotPeriod: jspb.Message.getFieldWithDefault(msg, 19, 0),
|
||||
classBPingSlotNbK: jspb.Message.getFieldWithDefault(msg, 19, 0),
|
||||
classBPingSlotDr: jspb.Message.getFieldWithDefault(msg, 20, 0),
|
||||
classBPingSlotFreq: jspb.Message.getFieldWithDefault(msg, 21, 0),
|
||||
classCTimeout: jspb.Message.getFieldWithDefault(msg, 22, 0),
|
||||
@ -391,7 +391,7 @@ proto.api.DeviceProfileTemplate.deserializeBinaryFromReader = function(msg, read
|
||||
break;
|
||||
case 19:
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
msg.setClassBPingSlotPeriod(value);
|
||||
msg.setClassBPingSlotNbK(value);
|
||||
break;
|
||||
case 20:
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
@ -592,7 +592,7 @@ proto.api.DeviceProfileTemplate.serializeBinaryToWriter = function(message, writ
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getClassBPingSlotPeriod();
|
||||
f = message.getClassBPingSlotNbK();
|
||||
if (f !== 0) {
|
||||
writer.writeUint32(
|
||||
19,
|
||||
@ -991,10 +991,10 @@ proto.api.DeviceProfileTemplate.prototype.setClassBTimeout = function(value) {
|
||||
|
||||
|
||||
/**
|
||||
* optional uint32 class_b_ping_slot_period = 19;
|
||||
* optional uint32 class_b_ping_slot_nb_k = 19;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.api.DeviceProfileTemplate.prototype.getClassBPingSlotPeriod = function() {
|
||||
proto.api.DeviceProfileTemplate.prototype.getClassBPingSlotNbK = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0));
|
||||
};
|
||||
|
||||
@ -1003,7 +1003,7 @@ proto.api.DeviceProfileTemplate.prototype.getClassBPingSlotPeriod = function() {
|
||||
* @param {number} value
|
||||
* @return {!proto.api.DeviceProfileTemplate} returns this
|
||||
*/
|
||||
proto.api.DeviceProfileTemplate.prototype.setClassBPingSlotPeriod = function(value) {
|
||||
proto.api.DeviceProfileTemplate.prototype.setClassBPingSlotNbK = function(value) {
|
||||
return jspb.Message.setProto3IntField(this, 19, value);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user