Add back crc_status to UplinkRxInfo.

This is needed for implementing
https://github.com/chirpstack/chirpstack-concentratord/issues/29.
This commit is contained in:
Orne Brocaar
2023-01-11 11:13:47 +00:00
parent 1ebf5e7179
commit e57748087c
9 changed files with 460 additions and 401 deletions

View File

@ -537,6 +537,9 @@ export class UplinkRxInfo extends jspb.Message {
getMetadataMap(): jspb.Map<string, string>;
clearMetadataMap(): void;
getCrcStatus(): CRCStatusMap[keyof CRCStatusMap];
setCrcStatus(value: CRCStatusMap[keyof CRCStatusMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UplinkRxInfo.AsObject;
static toObject(includeInstance: boolean, msg: UplinkRxInfo): UplinkRxInfo.AsObject;
@ -563,6 +566,7 @@ export namespace UplinkRxInfo {
location?: common_common_pb.Location.AsObject,
context: Uint8Array | string,
metadataMap: Array<[string, string]>,
crcStatus: CRCStatusMap[keyof CRCStatusMap],
}
}

32
api/js/gw/gw_pb.js vendored
View File

@ -4302,7 +4302,8 @@ proto.gw.UplinkRxInfo.toObject = function(includeInstance, msg) {
antenna: jspb.Message.getFieldWithDefault(msg, 11, 0),
location: (f = msg.getLocation()) && common_common_pb.Location.toObject(includeInstance, f),
context: msg.getContext_asB64(),
metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : []
metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [],
crcStatus: jspb.Message.getFieldWithDefault(msg, 16, 0)
};
if (includeInstance) {
@ -4401,6 +4402,10 @@ proto.gw.UplinkRxInfo.deserializeBinaryFromReader = function(msg, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
case 16:
var value = /** @type {!proto.gw.CRCStatus} */ (reader.readEnum());
msg.setCrcStatus(value);
break;
default:
reader.skipField();
break;
@ -4529,6 +4534,13 @@ proto.gw.UplinkRxInfo.serializeBinaryToWriter = function(message, writer) {
if (f && f.getLength() > 0) {
f.serializeBinary(15, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
f = message.getCrcStatus();
if (f !== 0.0) {
writer.writeEnum(
16,
f
);
}
};
@ -4888,6 +4900,24 @@ proto.gw.UplinkRxInfo.prototype.clearMetadataMap = function() {
return this;};
/**
* optional CRCStatus crc_status = 16;
* @return {!proto.gw.CRCStatus}
*/
proto.gw.UplinkRxInfo.prototype.getCrcStatus = function() {
return /** @type {!proto.gw.CRCStatus} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
};
/**
* @param {!proto.gw.CRCStatus} value
* @return {!proto.gw.UplinkRxInfo} returns this
*/
proto.gw.UplinkRxInfo.prototype.setCrcStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 16, value);
};
/**
* Oneof group definitions for this message. Each group defines the field