api: Refactor api/frame_log.proto into streams/frames.proto.

This commit is contained in:
Orne Brocaar
2023-10-31 11:21:43 +00:00
parent ec0ecf2044
commit a4da4ab784
45 changed files with 1341 additions and 1911 deletions

1
api/js/streams/frames_grpc_pb.d.ts vendored Normal file
View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

130
api/js/streams/frames_pb.d.ts vendored Normal file
View File

@ -0,0 +1,130 @@
// package: streams
// file: streams/frames.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
import * as common_common_pb from "../common/common_pb";
import * as gw_gw_pb from "../gw/gw_pb";
export class UplinkFrameLog extends jspb.Message {
getPhyPayload(): Uint8Array | string;
getPhyPayload_asU8(): Uint8Array;
getPhyPayload_asB64(): string;
setPhyPayload(value: Uint8Array | string): void;
hasTxInfo(): boolean;
clearTxInfo(): 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;
getMType(): common_common_pb.MTypeMap[keyof common_common_pb.MTypeMap];
setMType(value: common_common_pb.MTypeMap[keyof common_common_pb.MTypeMap]): void;
getDevAddr(): string;
setDevAddr(value: string): void;
getDevEui(): string;
setDevEui(value: string): void;
hasTime(): boolean;
clearTime(): void;
getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
setTime(value?: google_protobuf_timestamp_pb.Timestamp): void;
getPlaintextFOpts(): boolean;
setPlaintextFOpts(value: boolean): void;
getPlaintextFrmPayload(): boolean;
setPlaintextFrmPayload(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UplinkFrameLog.AsObject;
static toObject(includeInstance: boolean, msg: UplinkFrameLog): UplinkFrameLog.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: UplinkFrameLog, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UplinkFrameLog;
static deserializeBinaryFromReader(message: UplinkFrameLog, reader: jspb.BinaryReader): UplinkFrameLog;
}
export namespace UplinkFrameLog {
export type AsObject = {
phyPayload: Uint8Array | string,
txInfo?: gw_gw_pb.UplinkTxInfo.AsObject,
rxInfoList: Array<gw_gw_pb.UplinkRxInfo.AsObject>,
mType: common_common_pb.MTypeMap[keyof common_common_pb.MTypeMap],
devAddr: string,
devEui: string,
time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
plaintextFOpts: boolean,
plaintextFrmPayload: boolean,
}
}
export class DownlinkFrameLog extends jspb.Message {
hasTime(): boolean;
clearTime(): void;
getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
setTime(value?: google_protobuf_timestamp_pb.Timestamp): void;
getPhyPayload(): Uint8Array | string;
getPhyPayload_asU8(): Uint8Array;
getPhyPayload_asB64(): string;
setPhyPayload(value: Uint8Array | string): void;
hasTxInfo(): boolean;
clearTxInfo(): void;
getTxInfo(): gw_gw_pb.DownlinkTxInfo | undefined;
setTxInfo(value?: gw_gw_pb.DownlinkTxInfo): void;
getDownlinkId(): number;
setDownlinkId(value: number): void;
getGatewayId(): string;
setGatewayId(value: string): void;
getMType(): common_common_pb.MTypeMap[keyof common_common_pb.MTypeMap];
setMType(value: common_common_pb.MTypeMap[keyof common_common_pb.MTypeMap]): void;
getDevAddr(): string;
setDevAddr(value: string): void;
getDevEui(): string;
setDevEui(value: string): void;
getPlaintextFOpts(): boolean;
setPlaintextFOpts(value: boolean): void;
getPlaintextFrmPayload(): boolean;
setPlaintextFrmPayload(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DownlinkFrameLog.AsObject;
static toObject(includeInstance: boolean, msg: DownlinkFrameLog): DownlinkFrameLog.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: DownlinkFrameLog, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DownlinkFrameLog;
static deserializeBinaryFromReader(message: DownlinkFrameLog, reader: jspb.BinaryReader): DownlinkFrameLog;
}
export namespace DownlinkFrameLog {
export type AsObject = {
time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
phyPayload: Uint8Array | string,
txInfo?: gw_gw_pb.DownlinkTxInfo.AsObject,
downlinkId: number,
gatewayId: string,
mType: common_common_pb.MTypeMap[keyof common_common_pb.MTypeMap],
devAddr: string,
devEui: string,
plaintextFOpts: boolean,
plaintextFrmPayload: boolean,
}
}

997
api/js/streams/frames_pb.js vendored Normal file
View File

@ -0,0 +1,997 @@
// source: streams/frames.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var common_common_pb = require('../common/common_pb.js');
goog.object.extend(proto, common_common_pb);
var gw_gw_pb = require('../gw/gw_pb.js');
goog.object.extend(proto, gw_gw_pb);
goog.exportSymbol('proto.streams.DownlinkFrameLog', null, global);
goog.exportSymbol('proto.streams.UplinkFrameLog', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.streams.UplinkFrameLog = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.streams.UplinkFrameLog.repeatedFields_, null);
};
goog.inherits(proto.streams.UplinkFrameLog, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.streams.UplinkFrameLog.displayName = 'proto.streams.UplinkFrameLog';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.streams.DownlinkFrameLog = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.streams.DownlinkFrameLog, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.streams.DownlinkFrameLog.displayName = 'proto.streams.DownlinkFrameLog';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.streams.UplinkFrameLog.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.streams.UplinkFrameLog.prototype.toObject = function(opt_includeInstance) {
return proto.streams.UplinkFrameLog.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.streams.UplinkFrameLog} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.streams.UplinkFrameLog.toObject = function(includeInstance, msg) {
var f, obj = {
phyPayload: msg.getPhyPayload_asB64(),
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTxInfo.toObject(includeInstance, f),
rxInfoList: jspb.Message.toObjectList(msg.getRxInfoList(),
gw_gw_pb.UplinkRxInfo.toObject, includeInstance),
mType: jspb.Message.getFieldWithDefault(msg, 4, 0),
devAddr: jspb.Message.getFieldWithDefault(msg, 5, ""),
devEui: jspb.Message.getFieldWithDefault(msg, 6, ""),
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
plaintextFOpts: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
plaintextFrmPayload: jspb.Message.getBooleanFieldWithDefault(msg, 9, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.streams.UplinkFrameLog}
*/
proto.streams.UplinkFrameLog.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.streams.UplinkFrameLog;
return proto.streams.UplinkFrameLog.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.streams.UplinkFrameLog} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.streams.UplinkFrameLog}
*/
proto.streams.UplinkFrameLog.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPhyPayload(value);
break;
case 2:
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);
msg.addRxInfo(value);
break;
case 4:
var value = /** @type {!proto.common.MType} */ (reader.readEnum());
msg.setMType(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDevAddr(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setDevEui(value);
break;
case 7:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setTime(value);
break;
case 8:
var value = /** @type {boolean} */ (reader.readBool());
msg.setPlaintextFOpts(value);
break;
case 9:
var value = /** @type {boolean} */ (reader.readBool());
msg.setPlaintextFrmPayload(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.streams.UplinkFrameLog.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.streams.UplinkFrameLog.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.streams.UplinkFrameLog} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.streams.UplinkFrameLog.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPhyPayload_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getTxInfo();
if (f != null) {
writer.writeMessage(
2,
f,
gw_gw_pb.UplinkTxInfo.serializeBinaryToWriter
);
}
f = message.getRxInfoList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
gw_gw_pb.UplinkRxInfo.serializeBinaryToWriter
);
}
f = message.getMType();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = message.getDevAddr();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getDevEui();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getTime();
if (f != null) {
writer.writeMessage(
7,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getPlaintextFOpts();
if (f) {
writer.writeBool(
8,
f
);
}
f = message.getPlaintextFrmPayload();
if (f) {
writer.writeBool(
9,
f
);
}
};
/**
* optional bytes phy_payload = 1;
* @return {!(string|Uint8Array)}
*/
proto.streams.UplinkFrameLog.prototype.getPhyPayload = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes phy_payload = 1;
* This is a type-conversion wrapper around `getPhyPayload()`
* @return {string}
*/
proto.streams.UplinkFrameLog.prototype.getPhyPayload_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPhyPayload()));
};
/**
* optional bytes phy_payload = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPhyPayload()`
* @return {!Uint8Array}
*/
proto.streams.UplinkFrameLog.prototype.getPhyPayload_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPhyPayload()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setPhyPayload = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional gw.UplinkTxInfo tx_info = 2;
* @return {?proto.gw.UplinkTxInfo}
*/
proto.streams.UplinkFrameLog.prototype.getTxInfo = function() {
return /** @type{?proto.gw.UplinkTxInfo} */ (
jspb.Message.getWrapperField(this, gw_gw_pb.UplinkTxInfo, 2));
};
/**
* @param {?proto.gw.UplinkTxInfo|undefined} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setTxInfo = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.clearTxInfo = function() {
return this.setTxInfo(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.streams.UplinkFrameLog.prototype.hasTxInfo = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* repeated gw.UplinkRxInfo rx_info = 3;
* @return {!Array<!proto.gw.UplinkRxInfo>}
*/
proto.streams.UplinkFrameLog.prototype.getRxInfoList = function() {
return /** @type{!Array<!proto.gw.UplinkRxInfo>} */ (
jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRxInfo, 3));
};
/**
* @param {!Array<!proto.gw.UplinkRxInfo>} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setRxInfoList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.gw.UplinkRxInfo=} opt_value
* @param {number=} opt_index
* @return {!proto.gw.UplinkRxInfo}
*/
proto.streams.UplinkFrameLog.prototype.addRxInfo = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.gw.UplinkRxInfo, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.clearRxInfoList = function() {
return this.setRxInfoList([]);
};
/**
* optional common.MType m_type = 4;
* @return {!proto.common.MType}
*/
proto.streams.UplinkFrameLog.prototype.getMType = function() {
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {!proto.common.MType} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setMType = function(value) {
return jspb.Message.setProto3EnumField(this, 4, value);
};
/**
* optional string dev_addr = 5;
* @return {string}
*/
proto.streams.UplinkFrameLog.prototype.getDevAddr = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setDevAddr = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string dev_eui = 6;
* @return {string}
*/
proto.streams.UplinkFrameLog.prototype.getDevEui = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setDevEui = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional google.protobuf.Timestamp time = 7;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.streams.UplinkFrameLog.prototype.getTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setTime = function(value) {
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.clearTime = function() {
return this.setTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.streams.UplinkFrameLog.prototype.hasTime = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional bool plaintext_f_opts = 8;
* @return {boolean}
*/
proto.streams.UplinkFrameLog.prototype.getPlaintextFOpts = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
};
/**
* @param {boolean} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setPlaintextFOpts = function(value) {
return jspb.Message.setProto3BooleanField(this, 8, value);
};
/**
* optional bool plaintext_frm_payload = 9;
* @return {boolean}
*/
proto.streams.UplinkFrameLog.prototype.getPlaintextFrmPayload = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
};
/**
* @param {boolean} value
* @return {!proto.streams.UplinkFrameLog} returns this
*/
proto.streams.UplinkFrameLog.prototype.setPlaintextFrmPayload = function(value) {
return jspb.Message.setProto3BooleanField(this, 9, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.streams.DownlinkFrameLog.prototype.toObject = function(opt_includeInstance) {
return proto.streams.DownlinkFrameLog.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.streams.DownlinkFrameLog} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.streams.DownlinkFrameLog.toObject = function(includeInstance, msg) {
var f, obj = {
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
phyPayload: msg.getPhyPayload_asB64(),
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.DownlinkTxInfo.toObject(includeInstance, f),
downlinkId: jspb.Message.getFieldWithDefault(msg, 4, 0),
gatewayId: jspb.Message.getFieldWithDefault(msg, 5, ""),
mType: jspb.Message.getFieldWithDefault(msg, 6, 0),
devAddr: jspb.Message.getFieldWithDefault(msg, 7, ""),
devEui: jspb.Message.getFieldWithDefault(msg, 8, ""),
plaintextFOpts: jspb.Message.getBooleanFieldWithDefault(msg, 9, false),
plaintextFrmPayload: jspb.Message.getBooleanFieldWithDefault(msg, 10, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.streams.DownlinkFrameLog}
*/
proto.streams.DownlinkFrameLog.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.streams.DownlinkFrameLog;
return proto.streams.DownlinkFrameLog.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.streams.DownlinkFrameLog} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.streams.DownlinkFrameLog}
*/
proto.streams.DownlinkFrameLog.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setTime(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPhyPayload(value);
break;
case 3:
var value = new gw_gw_pb.DownlinkTxInfo;
reader.readMessage(value,gw_gw_pb.DownlinkTxInfo.deserializeBinaryFromReader);
msg.setTxInfo(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint32());
msg.setDownlinkId(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setGatewayId(value);
break;
case 6:
var value = /** @type {!proto.common.MType} */ (reader.readEnum());
msg.setMType(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setDevAddr(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setDevEui(value);
break;
case 9:
var value = /** @type {boolean} */ (reader.readBool());
msg.setPlaintextFOpts(value);
break;
case 10:
var value = /** @type {boolean} */ (reader.readBool());
msg.setPlaintextFrmPayload(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.streams.DownlinkFrameLog.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.streams.DownlinkFrameLog.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.streams.DownlinkFrameLog} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.streams.DownlinkFrameLog.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTime();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getPhyPayload_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getTxInfo();
if (f != null) {
writer.writeMessage(
3,
f,
gw_gw_pb.DownlinkTxInfo.serializeBinaryToWriter
);
}
f = message.getDownlinkId();
if (f !== 0) {
writer.writeUint32(
4,
f
);
}
f = message.getGatewayId();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getMType();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
f = message.getDevAddr();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getDevEui();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = message.getPlaintextFOpts();
if (f) {
writer.writeBool(
9,
f
);
}
f = message.getPlaintextFrmPayload();
if (f) {
writer.writeBool(
10,
f
);
}
};
/**
* optional google.protobuf.Timestamp time = 1;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.streams.DownlinkFrameLog.prototype.getTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setTime = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.clearTime = function() {
return this.setTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.streams.DownlinkFrameLog.prototype.hasTime = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional bytes phy_payload = 2;
* @return {!(string|Uint8Array)}
*/
proto.streams.DownlinkFrameLog.prototype.getPhyPayload = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes phy_payload = 2;
* This is a type-conversion wrapper around `getPhyPayload()`
* @return {string}
*/
proto.streams.DownlinkFrameLog.prototype.getPhyPayload_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPhyPayload()));
};
/**
* optional bytes phy_payload = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPhyPayload()`
* @return {!Uint8Array}
*/
proto.streams.DownlinkFrameLog.prototype.getPhyPayload_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPhyPayload()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setPhyPayload = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional gw.DownlinkTxInfo tx_info = 3;
* @return {?proto.gw.DownlinkTxInfo}
*/
proto.streams.DownlinkFrameLog.prototype.getTxInfo = function() {
return /** @type{?proto.gw.DownlinkTxInfo} */ (
jspb.Message.getWrapperField(this, gw_gw_pb.DownlinkTxInfo, 3));
};
/**
* @param {?proto.gw.DownlinkTxInfo|undefined} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setTxInfo = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.clearTxInfo = function() {
return this.setTxInfo(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.streams.DownlinkFrameLog.prototype.hasTxInfo = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional uint32 downlink_id = 4;
* @return {number}
*/
proto.streams.DownlinkFrameLog.prototype.getDownlinkId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setDownlinkId = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional string gateway_id = 5;
* @return {string}
*/
proto.streams.DownlinkFrameLog.prototype.getGatewayId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setGatewayId = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional common.MType m_type = 6;
* @return {!proto.common.MType}
*/
proto.streams.DownlinkFrameLog.prototype.getMType = function() {
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {!proto.common.MType} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setMType = function(value) {
return jspb.Message.setProto3EnumField(this, 6, value);
};
/**
* optional string dev_addr = 7;
* @return {string}
*/
proto.streams.DownlinkFrameLog.prototype.getDevAddr = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setDevAddr = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string dev_eui = 8;
* @return {string}
*/
proto.streams.DownlinkFrameLog.prototype.getDevEui = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setDevEui = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
/**
* optional bool plaintext_f_opts = 9;
* @return {boolean}
*/
proto.streams.DownlinkFrameLog.prototype.getPlaintextFOpts = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
};
/**
* @param {boolean} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setPlaintextFOpts = function(value) {
return jspb.Message.setProto3BooleanField(this, 9, value);
};
/**
* optional bool plaintext_frm_payload = 10;
* @return {boolean}
*/
proto.streams.DownlinkFrameLog.prototype.getPlaintextFrmPayload = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
};
/**
* @param {boolean} value
* @return {!proto.streams.DownlinkFrameLog} returns this
*/
proto.streams.DownlinkFrameLog.prototype.setPlaintextFrmPayload = function(value) {
return jspb.Message.setProto3BooleanField(this, 10, value);
};
goog.object.extend(exports, proto.streams);

View File

@ -1,4 +1,4 @@
// package: meta
// package: streams
// file: streams/meta.proto
import * as jspb from "google-protobuf";

View File

@ -16,8 +16,8 @@ var common_common_pb = require('../common/common_pb.js');
goog.object.extend(proto, common_common_pb);
var gw_gw_pb = require('../gw/gw_pb.js');
goog.object.extend(proto, gw_gw_pb);
goog.exportSymbol('proto.meta.DownlinkMeta', null, global);
goog.exportSymbol('proto.meta.UplinkMeta', null, global);
goog.exportSymbol('proto.streams.DownlinkMeta', null, global);
goog.exportSymbol('proto.streams.UplinkMeta', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -28,16 +28,16 @@ goog.exportSymbol('proto.meta.UplinkMeta', null, global);
* @extends {jspb.Message}
* @constructor
*/
proto.meta.UplinkMeta = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.meta.UplinkMeta.repeatedFields_, null);
proto.streams.UplinkMeta = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.streams.UplinkMeta.repeatedFields_, null);
};
goog.inherits(proto.meta.UplinkMeta, jspb.Message);
goog.inherits(proto.streams.UplinkMeta, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.meta.UplinkMeta.displayName = 'proto.meta.UplinkMeta';
proto.streams.UplinkMeta.displayName = 'proto.streams.UplinkMeta';
}
/**
* Generated by JsPbCodeGenerator.
@ -49,16 +49,16 @@ if (goog.DEBUG && !COMPILED) {
* @extends {jspb.Message}
* @constructor
*/
proto.meta.DownlinkMeta = function(opt_data) {
proto.streams.DownlinkMeta = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.meta.DownlinkMeta, jspb.Message);
goog.inherits(proto.streams.DownlinkMeta, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.meta.DownlinkMeta.displayName = 'proto.meta.DownlinkMeta';
proto.streams.DownlinkMeta.displayName = 'proto.streams.DownlinkMeta';
}
/**
@ -66,7 +66,7 @@ if (goog.DEBUG && !COMPILED) {
* @private {!Array<number>}
* @const
*/
proto.meta.UplinkMeta.repeatedFields_ = [3];
proto.streams.UplinkMeta.repeatedFields_ = [3];
@ -83,8 +83,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.meta.UplinkMeta.prototype.toObject = function(opt_includeInstance) {
return proto.meta.UplinkMeta.toObject(opt_includeInstance, this);
proto.streams.UplinkMeta.prototype.toObject = function(opt_includeInstance) {
return proto.streams.UplinkMeta.toObject(opt_includeInstance, this);
};
@ -93,11 +93,11 @@ proto.meta.UplinkMeta.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.meta.UplinkMeta} msg The msg instance to transform.
* @param {!proto.streams.UplinkMeta} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.meta.UplinkMeta.toObject = function(includeInstance, msg) {
proto.streams.UplinkMeta.toObject = function(includeInstance, msg) {
var f, obj = {
devEui: jspb.Message.getFieldWithDefault(msg, 1, ""),
txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTxInfo.toObject(includeInstance, f),
@ -120,23 +120,23 @@ proto.meta.UplinkMeta.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.meta.UplinkMeta}
* @return {!proto.streams.UplinkMeta}
*/
proto.meta.UplinkMeta.deserializeBinary = function(bytes) {
proto.streams.UplinkMeta.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.meta.UplinkMeta;
return proto.meta.UplinkMeta.deserializeBinaryFromReader(msg, reader);
var msg = new proto.streams.UplinkMeta;
return proto.streams.UplinkMeta.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.meta.UplinkMeta} msg The message object to deserialize into.
* @param {!proto.streams.UplinkMeta} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.meta.UplinkMeta}
* @return {!proto.streams.UplinkMeta}
*/
proto.meta.UplinkMeta.deserializeBinaryFromReader = function(msg, reader) {
proto.streams.UplinkMeta.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@ -186,9 +186,9 @@ proto.meta.UplinkMeta.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.meta.UplinkMeta.prototype.serializeBinary = function() {
proto.streams.UplinkMeta.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.meta.UplinkMeta.serializeBinaryToWriter(this, writer);
proto.streams.UplinkMeta.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@ -196,11 +196,11 @@ proto.meta.UplinkMeta.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.meta.UplinkMeta} message
* @param {!proto.streams.UplinkMeta} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.meta.UplinkMeta.serializeBinaryToWriter = function(message, writer) {
proto.streams.UplinkMeta.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDevEui();
if (f.length > 0) {
@ -260,16 +260,16 @@ proto.meta.UplinkMeta.serializeBinaryToWriter = function(message, writer) {
* optional string dev_eui = 1;
* @return {string}
*/
proto.meta.UplinkMeta.prototype.getDevEui = function() {
proto.streams.UplinkMeta.prototype.getDevEui = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setDevEui = function(value) {
proto.streams.UplinkMeta.prototype.setDevEui = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -278,7 +278,7 @@ proto.meta.UplinkMeta.prototype.setDevEui = function(value) {
* optional gw.UplinkTxInfo tx_info = 2;
* @return {?proto.gw.UplinkTxInfo}
*/
proto.meta.UplinkMeta.prototype.getTxInfo = function() {
proto.streams.UplinkMeta.prototype.getTxInfo = function() {
return /** @type{?proto.gw.UplinkTxInfo} */ (
jspb.Message.getWrapperField(this, gw_gw_pb.UplinkTxInfo, 2));
};
@ -286,18 +286,18 @@ proto.meta.UplinkMeta.prototype.getTxInfo = function() {
/**
* @param {?proto.gw.UplinkTxInfo|undefined} value
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setTxInfo = function(value) {
proto.streams.UplinkMeta.prototype.setTxInfo = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.clearTxInfo = function() {
proto.streams.UplinkMeta.prototype.clearTxInfo = function() {
return this.setTxInfo(undefined);
};
@ -306,7 +306,7 @@ proto.meta.UplinkMeta.prototype.clearTxInfo = function() {
* Returns whether this field is set.
* @return {boolean}
*/
proto.meta.UplinkMeta.prototype.hasTxInfo = function() {
proto.streams.UplinkMeta.prototype.hasTxInfo = function() {
return jspb.Message.getField(this, 2) != null;
};
@ -315,7 +315,7 @@ proto.meta.UplinkMeta.prototype.hasTxInfo = function() {
* repeated gw.UplinkRxInfo rx_info = 3;
* @return {!Array<!proto.gw.UplinkRxInfo>}
*/
proto.meta.UplinkMeta.prototype.getRxInfoList = function() {
proto.streams.UplinkMeta.prototype.getRxInfoList = function() {
return /** @type{!Array<!proto.gw.UplinkRxInfo>} */ (
jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRxInfo, 3));
};
@ -323,9 +323,9 @@ proto.meta.UplinkMeta.prototype.getRxInfoList = function() {
/**
* @param {!Array<!proto.gw.UplinkRxInfo>} value
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setRxInfoList = function(value) {
proto.streams.UplinkMeta.prototype.setRxInfoList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
@ -335,16 +335,16 @@ proto.meta.UplinkMeta.prototype.setRxInfoList = function(value) {
* @param {number=} opt_index
* @return {!proto.gw.UplinkRxInfo}
*/
proto.meta.UplinkMeta.prototype.addRxInfo = function(opt_value, opt_index) {
proto.streams.UplinkMeta.prototype.addRxInfo = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.gw.UplinkRxInfo, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.clearRxInfoList = function() {
proto.streams.UplinkMeta.prototype.clearRxInfoList = function() {
return this.setRxInfoList([]);
};
@ -353,16 +353,16 @@ proto.meta.UplinkMeta.prototype.clearRxInfoList = function() {
* optional uint32 phy_payload_byte_count = 4;
* @return {number}
*/
proto.meta.UplinkMeta.prototype.getPhyPayloadByteCount = function() {
proto.streams.UplinkMeta.prototype.getPhyPayloadByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setPhyPayloadByteCount = function(value) {
proto.streams.UplinkMeta.prototype.setPhyPayloadByteCount = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
@ -371,16 +371,16 @@ proto.meta.UplinkMeta.prototype.setPhyPayloadByteCount = function(value) {
* optional uint32 mac_command_byte_count = 5;
* @return {number}
*/
proto.meta.UplinkMeta.prototype.getMacCommandByteCount = function() {
proto.streams.UplinkMeta.prototype.getMacCommandByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setMacCommandByteCount = function(value) {
proto.streams.UplinkMeta.prototype.setMacCommandByteCount = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
@ -389,16 +389,16 @@ proto.meta.UplinkMeta.prototype.setMacCommandByteCount = function(value) {
* optional uint32 application_payload_byte_count = 6;
* @return {number}
*/
proto.meta.UplinkMeta.prototype.getApplicationPayloadByteCount = function() {
proto.streams.UplinkMeta.prototype.getApplicationPayloadByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {number} value
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setApplicationPayloadByteCount = function(value) {
proto.streams.UplinkMeta.prototype.setApplicationPayloadByteCount = function(value) {
return jspb.Message.setProto3IntField(this, 6, value);
};
@ -407,16 +407,16 @@ proto.meta.UplinkMeta.prototype.setApplicationPayloadByteCount = function(value)
* optional common.MType message_type = 7;
* @return {!proto.common.MType}
*/
proto.meta.UplinkMeta.prototype.getMessageType = function() {
proto.streams.UplinkMeta.prototype.getMessageType = function() {
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {!proto.common.MType} value
* @return {!proto.meta.UplinkMeta} returns this
* @return {!proto.streams.UplinkMeta} returns this
*/
proto.meta.UplinkMeta.prototype.setMessageType = function(value) {
proto.streams.UplinkMeta.prototype.setMessageType = function(value) {
return jspb.Message.setProto3EnumField(this, 7, value);
};
@ -437,8 +437,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.meta.DownlinkMeta.prototype.toObject = function(opt_includeInstance) {
return proto.meta.DownlinkMeta.toObject(opt_includeInstance, this);
proto.streams.DownlinkMeta.prototype.toObject = function(opt_includeInstance) {
return proto.streams.DownlinkMeta.toObject(opt_includeInstance, this);
};
@ -447,11 +447,11 @@ proto.meta.DownlinkMeta.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.meta.DownlinkMeta} msg The msg instance to transform.
* @param {!proto.streams.DownlinkMeta} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.meta.DownlinkMeta.toObject = function(includeInstance, msg) {
proto.streams.DownlinkMeta.toObject = function(includeInstance, msg) {
var f, obj = {
devEui: jspb.Message.getFieldWithDefault(msg, 1, ""),
multicastGroupId: jspb.Message.getFieldWithDefault(msg, 2, ""),
@ -474,23 +474,23 @@ proto.meta.DownlinkMeta.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.meta.DownlinkMeta}
* @return {!proto.streams.DownlinkMeta}
*/
proto.meta.DownlinkMeta.deserializeBinary = function(bytes) {
proto.streams.DownlinkMeta.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.meta.DownlinkMeta;
return proto.meta.DownlinkMeta.deserializeBinaryFromReader(msg, reader);
var msg = new proto.streams.DownlinkMeta;
return proto.streams.DownlinkMeta.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.meta.DownlinkMeta} msg The message object to deserialize into.
* @param {!proto.streams.DownlinkMeta} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.meta.DownlinkMeta}
* @return {!proto.streams.DownlinkMeta}
*/
proto.meta.DownlinkMeta.deserializeBinaryFromReader = function(msg, reader) {
proto.streams.DownlinkMeta.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@ -543,9 +543,9 @@ proto.meta.DownlinkMeta.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.meta.DownlinkMeta.prototype.serializeBinary = function() {
proto.streams.DownlinkMeta.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.meta.DownlinkMeta.serializeBinaryToWriter(this, writer);
proto.streams.DownlinkMeta.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@ -553,11 +553,11 @@ proto.meta.DownlinkMeta.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.meta.DownlinkMeta} message
* @param {!proto.streams.DownlinkMeta} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.meta.DownlinkMeta.serializeBinaryToWriter = function(message, writer) {
proto.streams.DownlinkMeta.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDevEui();
if (f.length > 0) {
@ -623,16 +623,16 @@ proto.meta.DownlinkMeta.serializeBinaryToWriter = function(message, writer) {
* optional string dev_eui = 1;
* @return {string}
*/
proto.meta.DownlinkMeta.prototype.getDevEui = function() {
proto.streams.DownlinkMeta.prototype.getDevEui = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setDevEui = function(value) {
proto.streams.DownlinkMeta.prototype.setDevEui = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
@ -641,16 +641,16 @@ proto.meta.DownlinkMeta.prototype.setDevEui = function(value) {
* optional string multicast_group_id = 2;
* @return {string}
*/
proto.meta.DownlinkMeta.prototype.getMulticastGroupId = function() {
proto.streams.DownlinkMeta.prototype.getMulticastGroupId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setMulticastGroupId = function(value) {
proto.streams.DownlinkMeta.prototype.setMulticastGroupId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
@ -659,7 +659,7 @@ proto.meta.DownlinkMeta.prototype.setMulticastGroupId = function(value) {
* optional gw.DownlinkTxInfo tx_info = 3;
* @return {?proto.gw.DownlinkTxInfo}
*/
proto.meta.DownlinkMeta.prototype.getTxInfo = function() {
proto.streams.DownlinkMeta.prototype.getTxInfo = function() {
return /** @type{?proto.gw.DownlinkTxInfo} */ (
jspb.Message.getWrapperField(this, gw_gw_pb.DownlinkTxInfo, 3));
};
@ -667,18 +667,18 @@ proto.meta.DownlinkMeta.prototype.getTxInfo = function() {
/**
* @param {?proto.gw.DownlinkTxInfo|undefined} value
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setTxInfo = function(value) {
proto.streams.DownlinkMeta.prototype.setTxInfo = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.clearTxInfo = function() {
proto.streams.DownlinkMeta.prototype.clearTxInfo = function() {
return this.setTxInfo(undefined);
};
@ -687,7 +687,7 @@ proto.meta.DownlinkMeta.prototype.clearTxInfo = function() {
* Returns whether this field is set.
* @return {boolean}
*/
proto.meta.DownlinkMeta.prototype.hasTxInfo = function() {
proto.streams.DownlinkMeta.prototype.hasTxInfo = function() {
return jspb.Message.getField(this, 3) != null;
};
@ -696,16 +696,16 @@ proto.meta.DownlinkMeta.prototype.hasTxInfo = function() {
* optional uint32 phy_payload_byte_count = 4;
* @return {number}
*/
proto.meta.DownlinkMeta.prototype.getPhyPayloadByteCount = function() {
proto.streams.DownlinkMeta.prototype.getPhyPayloadByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setPhyPayloadByteCount = function(value) {
proto.streams.DownlinkMeta.prototype.setPhyPayloadByteCount = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
@ -714,16 +714,16 @@ proto.meta.DownlinkMeta.prototype.setPhyPayloadByteCount = function(value) {
* optional uint32 mac_command_byte_count = 5;
* @return {number}
*/
proto.meta.DownlinkMeta.prototype.getMacCommandByteCount = function() {
proto.streams.DownlinkMeta.prototype.getMacCommandByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setMacCommandByteCount = function(value) {
proto.streams.DownlinkMeta.prototype.setMacCommandByteCount = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
@ -732,16 +732,16 @@ proto.meta.DownlinkMeta.prototype.setMacCommandByteCount = function(value) {
* optional uint32 application_payload_byte_count = 6;
* @return {number}
*/
proto.meta.DownlinkMeta.prototype.getApplicationPayloadByteCount = function() {
proto.streams.DownlinkMeta.prototype.getApplicationPayloadByteCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {number} value
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setApplicationPayloadByteCount = function(value) {
proto.streams.DownlinkMeta.prototype.setApplicationPayloadByteCount = function(value) {
return jspb.Message.setProto3IntField(this, 6, value);
};
@ -750,16 +750,16 @@ proto.meta.DownlinkMeta.prototype.setApplicationPayloadByteCount = function(valu
* optional common.MType message_type = 7;
* @return {!proto.common.MType}
*/
proto.meta.DownlinkMeta.prototype.getMessageType = function() {
proto.streams.DownlinkMeta.prototype.getMessageType = function() {
return /** @type {!proto.common.MType} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {!proto.common.MType} value
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setMessageType = function(value) {
proto.streams.DownlinkMeta.prototype.setMessageType = function(value) {
return jspb.Message.setProto3EnumField(this, 7, value);
};
@ -768,18 +768,18 @@ proto.meta.DownlinkMeta.prototype.setMessageType = function(value) {
* optional string gateway_id = 8;
* @return {string}
*/
proto.meta.DownlinkMeta.prototype.getGatewayId = function() {
proto.streams.DownlinkMeta.prototype.getGatewayId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.meta.DownlinkMeta} returns this
* @return {!proto.streams.DownlinkMeta} returns this
*/
proto.meta.DownlinkMeta.prototype.setGatewayId = function(value) {
proto.streams.DownlinkMeta.prototype.setGatewayId = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
goog.object.extend(exports, proto.meta);
goog.object.extend(exports, proto.streams);