mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-15 22:08:23 +00:00
Refactor uplink / downlink GW <> NS messages.
This includes: * Changing the modulation parameters to its own type. * Changing the timing parameters to its own type. * Change the gateway_id to string. As the json encoding for bytes fields is base64, this was confusing some users. * Change the uplink / downlink id to uint32 from uuid. A string representation of the UUID field (for the same reason as the gateway id) would consome quite some additional bytes. An uint32 provides sufficient uniqueness for the purpose of uplink / downlink.
This commit is contained in:
20
api/js/meta/meta_pb.d.ts
vendored
20
api/js/meta/meta_pb.d.ts
vendored
@ -11,13 +11,13 @@ export class UplinkMeta extends jspb.Message {
|
||||
|
||||
hasTxInfo(): boolean;
|
||||
clearTxInfo(): void;
|
||||
getTxInfo(): gw_gw_pb.UplinkTXInfo | undefined;
|
||||
setTxInfo(value?: gw_gw_pb.UplinkTXInfo): void;
|
||||
getTxInfo(): gw_gw_pb.UplinkTxInfo | undefined;
|
||||
setTxInfo(value?: gw_gw_pb.UplinkTxInfo): void;
|
||||
|
||||
clearRxInfoList(): void;
|
||||
getRxInfoList(): Array<gw_gw_pb.UplinkRXInfo>;
|
||||
setRxInfoList(value: Array<gw_gw_pb.UplinkRXInfo>): void;
|
||||
addRxInfo(value?: gw_gw_pb.UplinkRXInfo, index?: number): gw_gw_pb.UplinkRXInfo;
|
||||
getRxInfoList(): Array<gw_gw_pb.UplinkRxInfo>;
|
||||
setRxInfoList(value: Array<gw_gw_pb.UplinkRxInfo>): void;
|
||||
addRxInfo(value?: gw_gw_pb.UplinkRxInfo, index?: number): gw_gw_pb.UplinkRxInfo;
|
||||
|
||||
getPhyPayloadByteCount(): number;
|
||||
setPhyPayloadByteCount(value: number): void;
|
||||
@ -44,8 +44,8 @@ export class UplinkMeta extends jspb.Message {
|
||||
export namespace UplinkMeta {
|
||||
export type AsObject = {
|
||||
devEui: string,
|
||||
txInfo?: gw_gw_pb.UplinkTXInfo.AsObject,
|
||||
rxInfoList: Array<gw_gw_pb.UplinkRXInfo.AsObject>,
|
||||
txInfo?: gw_gw_pb.UplinkTxInfo.AsObject,
|
||||
rxInfoList: Array<gw_gw_pb.UplinkRxInfo.AsObject>,
|
||||
phyPayloadByteCount: number,
|
||||
macCommandByteCount: number,
|
||||
applicationPayloadByteCount: number,
|
||||
@ -62,8 +62,8 @@ export class DownlinkMeta extends jspb.Message {
|
||||
|
||||
hasTxInfo(): boolean;
|
||||
clearTxInfo(): void;
|
||||
getTxInfo(): gw_gw_pb.DownlinkTXInfo | undefined;
|
||||
setTxInfo(value?: gw_gw_pb.DownlinkTXInfo): void;
|
||||
getTxInfo(): gw_gw_pb.DownlinkTxInfo | undefined;
|
||||
setTxInfo(value?: gw_gw_pb.DownlinkTxInfo): void;
|
||||
|
||||
getPhyPayloadByteCount(): number;
|
||||
setPhyPayloadByteCount(value: number): void;
|
||||
@ -94,7 +94,7 @@ export namespace DownlinkMeta {
|
||||
export type AsObject = {
|
||||
devEui: string,
|
||||
multicastGroupId: string,
|
||||
txInfo?: gw_gw_pb.DownlinkTXInfo.AsObject,
|
||||
txInfo?: gw_gw_pb.DownlinkTxInfo.AsObject,
|
||||
phyPayloadByteCount: number,
|
||||
macCommandByteCount: number,
|
||||
applicationPayloadByteCount: number,
|
||||
|
54
api/js/meta/meta_pb.js
vendored
54
api/js/meta/meta_pb.js
vendored
@ -67,9 +67,9 @@ proto.meta.UplinkMeta.prototype.toObject = function(opt_includeInstance) {
|
||||
proto.meta.UplinkMeta.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
devEui: msg.getDevEui(),
|
||||
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTXInfo.toObject(includeInstance, f),
|
||||
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTxInfo.toObject(includeInstance, f),
|
||||
rxInfoList: jspb.Message.toObjectList(msg.getRxInfoList(),
|
||||
gw_gw_pb.UplinkRXInfo.toObject, includeInstance),
|
||||
gw_gw_pb.UplinkRxInfo.toObject, includeInstance),
|
||||
phyPayloadByteCount: msg.getPhyPayloadByteCount(),
|
||||
macCommandByteCount: msg.getMacCommandByteCount(),
|
||||
applicationPayloadByteCount: msg.getApplicationPayloadByteCount(),
|
||||
@ -115,13 +115,13 @@ proto.meta.UplinkMeta.deserializeBinaryFromReader = function(msg, reader) {
|
||||
msg.setDevEui(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = new gw_gw_pb.UplinkTXInfo;
|
||||
reader.readMessage(value,gw_gw_pb.UplinkTXInfo.deserializeBinaryFromReader);
|
||||
var value = new gw_gw_pb.UplinkTxInfo;
|
||||
reader.readMessage(value,gw_gw_pb.UplinkTxInfo.deserializeBinaryFromReader);
|
||||
msg.setTxInfo(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = new gw_gw_pb.UplinkRXInfo;
|
||||
reader.readMessage(value,gw_gw_pb.UplinkRXInfo.deserializeBinaryFromReader);
|
||||
var value = new gw_gw_pb.UplinkRxInfo;
|
||||
reader.readMessage(value,gw_gw_pb.UplinkRxInfo.deserializeBinaryFromReader);
|
||||
msg.getRxInfoList().push(value);
|
||||
msg.setRxInfoList(msg.getRxInfoList());
|
||||
break;
|
||||
@ -191,7 +191,7 @@ proto.meta.UplinkMeta.prototype.serializeBinaryToWriter = function (writer) {
|
||||
writer.writeMessage(
|
||||
2,
|
||||
f,
|
||||
gw_gw_pb.UplinkTXInfo.serializeBinaryToWriter
|
||||
gw_gw_pb.UplinkTxInfo.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getRxInfoList();
|
||||
@ -199,7 +199,7 @@ proto.meta.UplinkMeta.prototype.serializeBinaryToWriter = function (writer) {
|
||||
writer.writeRepeatedMessage(
|
||||
3,
|
||||
f,
|
||||
gw_gw_pb.UplinkRXInfo.serializeBinaryToWriter
|
||||
gw_gw_pb.UplinkRxInfo.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getPhyPayloadByteCount();
|
||||
@ -258,16 +258,16 @@ proto.meta.UplinkMeta.prototype.setDevEui = function(value) {
|
||||
|
||||
|
||||
/**
|
||||
* optional gw.UplinkTXInfo tx_info = 2;
|
||||
* @return {proto.gw.UplinkTXInfo}
|
||||
* optional gw.UplinkTxInfo tx_info = 2;
|
||||
* @return {proto.gw.UplinkTxInfo}
|
||||
*/
|
||||
proto.meta.UplinkMeta.prototype.getTxInfo = function() {
|
||||
return /** @type{proto.gw.UplinkTXInfo} */ (
|
||||
jspb.Message.getWrapperField(this, gw_gw_pb.UplinkTXInfo, 2));
|
||||
return /** @type{proto.gw.UplinkTxInfo} */ (
|
||||
jspb.Message.getWrapperField(this, gw_gw_pb.UplinkTxInfo, 2));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.gw.UplinkTXInfo|undefined} value */
|
||||
/** @param {proto.gw.UplinkTxInfo|undefined} value */
|
||||
proto.meta.UplinkMeta.prototype.setTxInfo = function(value) {
|
||||
jspb.Message.setWrapperField(this, 2, value);
|
||||
};
|
||||
@ -288,18 +288,18 @@ proto.meta.UplinkMeta.prototype.hasTxInfo = function() {
|
||||
|
||||
|
||||
/**
|
||||
* repeated gw.UplinkRXInfo rx_info = 3;
|
||||
* repeated gw.UplinkRxInfo rx_info = 3;
|
||||
* If you change this array by adding, removing or replacing elements, or if you
|
||||
* replace the array itself, then you must call the setter to update it.
|
||||
* @return {!Array.<!proto.gw.UplinkRXInfo>}
|
||||
* @return {!Array.<!proto.gw.UplinkRxInfo>}
|
||||
*/
|
||||
proto.meta.UplinkMeta.prototype.getRxInfoList = function() {
|
||||
return /** @type{!Array.<!proto.gw.UplinkRXInfo>} */ (
|
||||
jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRXInfo, 3));
|
||||
return /** @type{!Array.<!proto.gw.UplinkRxInfo>} */ (
|
||||
jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRxInfo, 3));
|
||||
};
|
||||
|
||||
|
||||
/** @param {Array.<!proto.gw.UplinkRXInfo>} value */
|
||||
/** @param {Array.<!proto.gw.UplinkRxInfo>} value */
|
||||
proto.meta.UplinkMeta.prototype.setRxInfoList = function(value) {
|
||||
jspb.Message.setRepeatedWrapperField(this, 3, value);
|
||||
};
|
||||
@ -418,7 +418,7 @@ proto.meta.DownlinkMeta.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
devEui: msg.getDevEui(),
|
||||
multicastGroupId: msg.getMulticastGroupId(),
|
||||
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.DownlinkTXInfo.toObject(includeInstance, f),
|
||||
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.DownlinkTxInfo.toObject(includeInstance, f),
|
||||
phyPayloadByteCount: msg.getPhyPayloadByteCount(),
|
||||
macCommandByteCount: msg.getMacCommandByteCount(),
|
||||
applicationPayloadByteCount: msg.getApplicationPayloadByteCount(),
|
||||
@ -469,8 +469,8 @@ proto.meta.DownlinkMeta.deserializeBinaryFromReader = function(msg, reader) {
|
||||
msg.setMulticastGroupId(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = new gw_gw_pb.DownlinkTXInfo;
|
||||
reader.readMessage(value,gw_gw_pb.DownlinkTXInfo.deserializeBinaryFromReader);
|
||||
var value = new gw_gw_pb.DownlinkTxInfo;
|
||||
reader.readMessage(value,gw_gw_pb.DownlinkTxInfo.deserializeBinaryFromReader);
|
||||
msg.setTxInfo(value);
|
||||
break;
|
||||
case 4:
|
||||
@ -550,7 +550,7 @@ proto.meta.DownlinkMeta.prototype.serializeBinaryToWriter = function (writer) {
|
||||
writer.writeMessage(
|
||||
3,
|
||||
f,
|
||||
gw_gw_pb.DownlinkTXInfo.serializeBinaryToWriter
|
||||
gw_gw_pb.DownlinkTxInfo.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getPhyPayloadByteCount();
|
||||
@ -631,16 +631,16 @@ proto.meta.DownlinkMeta.prototype.setMulticastGroupId = function(value) {
|
||||
|
||||
|
||||
/**
|
||||
* optional gw.DownlinkTXInfo tx_info = 3;
|
||||
* @return {proto.gw.DownlinkTXInfo}
|
||||
* optional gw.DownlinkTxInfo tx_info = 3;
|
||||
* @return {proto.gw.DownlinkTxInfo}
|
||||
*/
|
||||
proto.meta.DownlinkMeta.prototype.getTxInfo = function() {
|
||||
return /** @type{proto.gw.DownlinkTXInfo} */ (
|
||||
jspb.Message.getWrapperField(this, gw_gw_pb.DownlinkTXInfo, 3));
|
||||
return /** @type{proto.gw.DownlinkTxInfo} */ (
|
||||
jspb.Message.getWrapperField(this, gw_gw_pb.DownlinkTxInfo, 3));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.gw.DownlinkTXInfo|undefined} value */
|
||||
/** @param {proto.gw.DownlinkTxInfo|undefined} value */
|
||||
proto.meta.DownlinkMeta.prototype.setTxInfo = function(value) {
|
||||
jspb.Message.setWrapperField(this, 3, value);
|
||||
};
|
||||
|
Reference in New Issue
Block a user