/** * @fileoverview * @enhanceable * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var common_common_pb = require('../common/common_pb.js'); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); goog.exportSymbol('proto.gw.CRCStatus', null, global); goog.exportSymbol('proto.gw.ChannelConfiguration', null, global); goog.exportSymbol('proto.gw.CodeRate', null, global); goog.exportSymbol('proto.gw.ConnState', null, global); goog.exportSymbol('proto.gw.ConnState.State', null, global); goog.exportSymbol('proto.gw.DelayTimingInfo', null, global); goog.exportSymbol('proto.gw.DownlinkFrame', null, global); goog.exportSymbol('proto.gw.DownlinkFrameItem', null, global); goog.exportSymbol('proto.gw.DownlinkTiming', null, global); goog.exportSymbol('proto.gw.DownlinkTxAck', null, global); goog.exportSymbol('proto.gw.DownlinkTxAckItem', null, global); goog.exportSymbol('proto.gw.DownlinkTxInfo', null, global); goog.exportSymbol('proto.gw.DownlinkTxInfoLegacy', null, global); goog.exportSymbol('proto.gw.EncryptedFineTimestamp', null, global); goog.exportSymbol('proto.gw.FineTimestampType', null, global); goog.exportSymbol('proto.gw.FskModulationConfig', null, global); goog.exportSymbol('proto.gw.FskModulationInfo', null, global); goog.exportSymbol('proto.gw.GPSEpochTimingInfo', null, global); goog.exportSymbol('proto.gw.GatewayCommandExecRequest', null, global); goog.exportSymbol('proto.gw.GatewayCommandExecResponse', null, global); goog.exportSymbol('proto.gw.GatewayConfiguration', null, global); goog.exportSymbol('proto.gw.GatewayStats', null, global); goog.exportSymbol('proto.gw.ImmediatelyTimingInfo', null, global); goog.exportSymbol('proto.gw.LoraModulationConfig', null, global); goog.exportSymbol('proto.gw.LoraModulationInfo', null, global); goog.exportSymbol('proto.gw.LrFhssModulationInfo', null, global); goog.exportSymbol('proto.gw.Modulation', null, global); goog.exportSymbol('proto.gw.PerModulationCount', null, global); goog.exportSymbol('proto.gw.PlainFineTimestamp', null, global); goog.exportSymbol('proto.gw.RawPacketForwarderCommand', null, global); goog.exportSymbol('proto.gw.RawPacketForwarderEvent', null, global); goog.exportSymbol('proto.gw.Timing', null, global); goog.exportSymbol('proto.gw.TxAckStatus', null, global); goog.exportSymbol('proto.gw.UplinkFrame', null, global); goog.exportSymbol('proto.gw.UplinkFrameSet', null, global); goog.exportSymbol('proto.gw.UplinkRxInfo', null, global); goog.exportSymbol('proto.gw.UplinkRxInfoLegacy', null, global); goog.exportSymbol('proto.gw.UplinkTxInfo', null, global); goog.exportSymbol('proto.gw.UplinkTxInfoLegacy', 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.gw.Modulation = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gw.Modulation.oneofGroups_); }; goog.inherits(proto.gw.Modulation, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.Modulation.displayName = 'proto.gw.Modulation'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.gw.Modulation.oneofGroups_ = [[3,4,5]]; /** * @enum {number} */ proto.gw.Modulation.ParametersCase = { PARAMETERS_NOT_SET: 0, LORA: 3, FSK: 4, LR_FHSS: 5 }; /** * @return {proto.gw.Modulation.ParametersCase} */ proto.gw.Modulation.prototype.getParametersCase = function() { return /** @type {proto.gw.Modulation.ParametersCase} */(jspb.Message.computeOneofCase(this, proto.gw.Modulation.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.Modulation.prototype.toObject = function(opt_includeInstance) { return proto.gw.Modulation.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.Modulation} msg The msg instance to transform. * @return {!Object} */ proto.gw.Modulation.toObject = function(includeInstance, msg) { var f, obj = { lora: (f = msg.getLora()) && proto.gw.LoraModulationInfo.toObject(includeInstance, f), fsk: (f = msg.getFsk()) && proto.gw.FskModulationInfo.toObject(includeInstance, f), lrFhss: (f = msg.getLrFhss()) && proto.gw.LrFhssModulationInfo.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.Modulation} */ proto.gw.Modulation.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.Modulation; return proto.gw.Modulation.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.Modulation} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.Modulation} */ proto.gw.Modulation.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 3: var value = new proto.gw.LoraModulationInfo; reader.readMessage(value,proto.gw.LoraModulationInfo.deserializeBinaryFromReader); msg.setLora(value); break; case 4: var value = new proto.gw.FskModulationInfo; reader.readMessage(value,proto.gw.FskModulationInfo.deserializeBinaryFromReader); msg.setFsk(value); break; case 5: var value = new proto.gw.LrFhssModulationInfo; reader.readMessage(value,proto.gw.LrFhssModulationInfo.deserializeBinaryFromReader); msg.setLrFhss(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.Modulation} message * @param {!jspb.BinaryWriter} writer */ proto.gw.Modulation.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.Modulation.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.Modulation.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getLora(); if (f != null) { writer.writeMessage( 3, f, proto.gw.LoraModulationInfo.serializeBinaryToWriter ); } f = this.getFsk(); if (f != null) { writer.writeMessage( 4, f, proto.gw.FskModulationInfo.serializeBinaryToWriter ); } f = this.getLrFhss(); if (f != null) { writer.writeMessage( 5, f, proto.gw.LrFhssModulationInfo.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.Modulation} The clone. */ proto.gw.Modulation.prototype.cloneMessage = function() { return /** @type {!proto.gw.Modulation} */ (jspb.Message.cloneMessage(this)); }; /** * optional LoraModulationInfo lora = 3; * @return {proto.gw.LoraModulationInfo} */ proto.gw.Modulation.prototype.getLora = function() { return /** @type{proto.gw.LoraModulationInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.LoraModulationInfo, 3)); }; /** @param {proto.gw.LoraModulationInfo|undefined} value */ proto.gw.Modulation.prototype.setLora = function(value) { jspb.Message.setOneofWrapperField(this, 3, proto.gw.Modulation.oneofGroups_[0], value); }; proto.gw.Modulation.prototype.clearLora = function() { this.setLora(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.Modulation.prototype.hasLora = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional FskModulationInfo fsk = 4; * @return {proto.gw.FskModulationInfo} */ proto.gw.Modulation.prototype.getFsk = function() { return /** @type{proto.gw.FskModulationInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.FskModulationInfo, 4)); }; /** @param {proto.gw.FskModulationInfo|undefined} value */ proto.gw.Modulation.prototype.setFsk = function(value) { jspb.Message.setOneofWrapperField(this, 4, proto.gw.Modulation.oneofGroups_[0], value); }; proto.gw.Modulation.prototype.clearFsk = function() { this.setFsk(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.Modulation.prototype.hasFsk = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional LrFhssModulationInfo lr_fhss = 5; * @return {proto.gw.LrFhssModulationInfo} */ proto.gw.Modulation.prototype.getLrFhss = function() { return /** @type{proto.gw.LrFhssModulationInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.LrFhssModulationInfo, 5)); }; /** @param {proto.gw.LrFhssModulationInfo|undefined} value */ proto.gw.Modulation.prototype.setLrFhss = function(value) { jspb.Message.setOneofWrapperField(this, 5, proto.gw.Modulation.oneofGroups_[0], value); }; proto.gw.Modulation.prototype.clearLrFhss = function() { this.setLrFhss(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.Modulation.prototype.hasLrFhss = function() { return jspb.Message.getField(this, 5) != null; }; /** * 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.gw.UplinkTxInfoLegacy = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gw.UplinkTxInfoLegacy.oneofGroups_); }; goog.inherits(proto.gw.UplinkTxInfoLegacy, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.UplinkTxInfoLegacy.displayName = 'proto.gw.UplinkTxInfoLegacy'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.gw.UplinkTxInfoLegacy.oneofGroups_ = [[3,4,5]]; /** * @enum {number} */ proto.gw.UplinkTxInfoLegacy.ModulationInfoCase = { MODULATION_INFO_NOT_SET: 0, LORA_MODULATION_INFO: 3, FSK_MODULATION_INFO: 4, LR_FHSS_MODULATION_INFO: 5 }; /** * @return {proto.gw.UplinkTxInfoLegacy.ModulationInfoCase} */ proto.gw.UplinkTxInfoLegacy.prototype.getModulationInfoCase = function() { return /** @type {proto.gw.UplinkTxInfoLegacy.ModulationInfoCase} */(jspb.Message.computeOneofCase(this, proto.gw.UplinkTxInfoLegacy.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.UplinkTxInfoLegacy.prototype.toObject = function(opt_includeInstance) { return proto.gw.UplinkTxInfoLegacy.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.UplinkTxInfoLegacy} msg The msg instance to transform. * @return {!Object} */ proto.gw.UplinkTxInfoLegacy.toObject = function(includeInstance, msg) { var f, obj = { frequency: msg.getFrequency(), modulation: msg.getModulation(), loraModulationInfo: (f = msg.getLoraModulationInfo()) && proto.gw.LoraModulationInfo.toObject(includeInstance, f), fskModulationInfo: (f = msg.getFskModulationInfo()) && proto.gw.FskModulationInfo.toObject(includeInstance, f), lrFhssModulationInfo: (f = msg.getLrFhssModulationInfo()) && proto.gw.LrFhssModulationInfo.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.UplinkTxInfoLegacy} */ proto.gw.UplinkTxInfoLegacy.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.UplinkTxInfoLegacy; return proto.gw.UplinkTxInfoLegacy.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.UplinkTxInfoLegacy} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.UplinkTxInfoLegacy} */ proto.gw.UplinkTxInfoLegacy.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setFrequency(value); break; case 2: var value = /** @type {!proto.common.Modulation} */ (reader.readEnum()); msg.setModulation(value); break; case 3: var value = new proto.gw.LoraModulationInfo; reader.readMessage(value,proto.gw.LoraModulationInfo.deserializeBinaryFromReader); msg.setLoraModulationInfo(value); break; case 4: var value = new proto.gw.FskModulationInfo; reader.readMessage(value,proto.gw.FskModulationInfo.deserializeBinaryFromReader); msg.setFskModulationInfo(value); break; case 5: var value = new proto.gw.LrFhssModulationInfo; reader.readMessage(value,proto.gw.LrFhssModulationInfo.deserializeBinaryFromReader); msg.setLrFhssModulationInfo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.UplinkTxInfoLegacy} message * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkTxInfoLegacy.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.UplinkTxInfoLegacy.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkTxInfoLegacy.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getFrequency(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getModulation(); if (f !== 0.0) { writer.writeEnum( 2, f ); } f = this.getLoraModulationInfo(); if (f != null) { writer.writeMessage( 3, f, proto.gw.LoraModulationInfo.serializeBinaryToWriter ); } f = this.getFskModulationInfo(); if (f != null) { writer.writeMessage( 4, f, proto.gw.FskModulationInfo.serializeBinaryToWriter ); } f = this.getLrFhssModulationInfo(); if (f != null) { writer.writeMessage( 5, f, proto.gw.LrFhssModulationInfo.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.UplinkTxInfoLegacy} The clone. */ proto.gw.UplinkTxInfoLegacy.prototype.cloneMessage = function() { return /** @type {!proto.gw.UplinkTxInfoLegacy} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 frequency = 1; * @return {number} */ proto.gw.UplinkTxInfoLegacy.prototype.getFrequency = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.UplinkTxInfoLegacy.prototype.setFrequency = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional common.Modulation modulation = 2; * @return {!proto.common.Modulation} */ proto.gw.UplinkTxInfoLegacy.prototype.getModulation = function() { return /** @type {!proto.common.Modulation} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {!proto.common.Modulation} value */ proto.gw.UplinkTxInfoLegacy.prototype.setModulation = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional LoraModulationInfo lora_modulation_info = 3; * @return {proto.gw.LoraModulationInfo} */ proto.gw.UplinkTxInfoLegacy.prototype.getLoraModulationInfo = function() { return /** @type{proto.gw.LoraModulationInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.LoraModulationInfo, 3)); }; /** @param {proto.gw.LoraModulationInfo|undefined} value */ proto.gw.UplinkTxInfoLegacy.prototype.setLoraModulationInfo = function(value) { jspb.Message.setOneofWrapperField(this, 3, proto.gw.UplinkTxInfoLegacy.oneofGroups_[0], value); }; proto.gw.UplinkTxInfoLegacy.prototype.clearLoraModulationInfo = function() { this.setLoraModulationInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkTxInfoLegacy.prototype.hasLoraModulationInfo = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional FskModulationInfo fsk_modulation_info = 4; * @return {proto.gw.FskModulationInfo} */ proto.gw.UplinkTxInfoLegacy.prototype.getFskModulationInfo = function() { return /** @type{proto.gw.FskModulationInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.FskModulationInfo, 4)); }; /** @param {proto.gw.FskModulationInfo|undefined} value */ proto.gw.UplinkTxInfoLegacy.prototype.setFskModulationInfo = function(value) { jspb.Message.setOneofWrapperField(this, 4, proto.gw.UplinkTxInfoLegacy.oneofGroups_[0], value); }; proto.gw.UplinkTxInfoLegacy.prototype.clearFskModulationInfo = function() { this.setFskModulationInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkTxInfoLegacy.prototype.hasFskModulationInfo = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional LrFhssModulationInfo lr_fhss_modulation_info = 5; * @return {proto.gw.LrFhssModulationInfo} */ proto.gw.UplinkTxInfoLegacy.prototype.getLrFhssModulationInfo = function() { return /** @type{proto.gw.LrFhssModulationInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.LrFhssModulationInfo, 5)); }; /** @param {proto.gw.LrFhssModulationInfo|undefined} value */ proto.gw.UplinkTxInfoLegacy.prototype.setLrFhssModulationInfo = function(value) { jspb.Message.setOneofWrapperField(this, 5, proto.gw.UplinkTxInfoLegacy.oneofGroups_[0], value); }; proto.gw.UplinkTxInfoLegacy.prototype.clearLrFhssModulationInfo = function() { this.setLrFhssModulationInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkTxInfoLegacy.prototype.hasLrFhssModulationInfo = function() { return jspb.Message.getField(this, 5) != null; }; /** * 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.gw.UplinkTxInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.UplinkTxInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.UplinkTxInfo.displayName = 'proto.gw.UplinkTxInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.UplinkTxInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.UplinkTxInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.UplinkTxInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.UplinkTxInfo.toObject = function(includeInstance, msg) { var f, obj = { frequency: msg.getFrequency(), modulation: (f = msg.getModulation()) && proto.gw.Modulation.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.UplinkTxInfo} */ proto.gw.UplinkTxInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.UplinkTxInfo; return proto.gw.UplinkTxInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.UplinkTxInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.UplinkTxInfo} */ proto.gw.UplinkTxInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setFrequency(value); break; case 2: var value = new proto.gw.Modulation; reader.readMessage(value,proto.gw.Modulation.deserializeBinaryFromReader); msg.setModulation(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.UplinkTxInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkTxInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.UplinkTxInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkTxInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getFrequency(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getModulation(); if (f != null) { writer.writeMessage( 2, f, proto.gw.Modulation.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.UplinkTxInfo} The clone. */ proto.gw.UplinkTxInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.UplinkTxInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 frequency = 1; * @return {number} */ proto.gw.UplinkTxInfo.prototype.getFrequency = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.UplinkTxInfo.prototype.setFrequency = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional Modulation modulation = 2; * @return {proto.gw.Modulation} */ proto.gw.UplinkTxInfo.prototype.getModulation = function() { return /** @type{proto.gw.Modulation} */ ( jspb.Message.getWrapperField(this, proto.gw.Modulation, 2)); }; /** @param {proto.gw.Modulation|undefined} value */ proto.gw.UplinkTxInfo.prototype.setModulation = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.gw.UplinkTxInfo.prototype.clearModulation = function() { this.setModulation(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkTxInfo.prototype.hasModulation = function() { return jspb.Message.getField(this, 2) != null; }; /** * 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.gw.LoraModulationInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.LoraModulationInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.LoraModulationInfo.displayName = 'proto.gw.LoraModulationInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.LoraModulationInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.LoraModulationInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.LoraModulationInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.LoraModulationInfo.toObject = function(includeInstance, msg) { var f, obj = { bandwidth: msg.getBandwidth(), spreadingFactor: msg.getSpreadingFactor(), codeRateLegacy: msg.getCodeRateLegacy(), codeRate: msg.getCodeRate(), polarizationInversion: msg.getPolarizationInversion() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.LoraModulationInfo} */ proto.gw.LoraModulationInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.LoraModulationInfo; return proto.gw.LoraModulationInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.LoraModulationInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.LoraModulationInfo} */ proto.gw.LoraModulationInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setBandwidth(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setSpreadingFactor(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setCodeRateLegacy(value); break; case 5: var value = /** @type {!proto.gw.CodeRate} */ (reader.readEnum()); msg.setCodeRate(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setPolarizationInversion(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.LoraModulationInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.LoraModulationInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.LoraModulationInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.LoraModulationInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getBandwidth(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getSpreadingFactor(); if (f !== 0) { writer.writeUint32( 2, f ); } f = this.getCodeRateLegacy(); if (f.length > 0) { writer.writeString( 3, f ); } f = this.getCodeRate(); if (f !== 0.0) { writer.writeEnum( 5, f ); } f = this.getPolarizationInversion(); if (f) { writer.writeBool( 4, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.LoraModulationInfo} The clone. */ proto.gw.LoraModulationInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.LoraModulationInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 bandwidth = 1; * @return {number} */ proto.gw.LoraModulationInfo.prototype.getBandwidth = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.LoraModulationInfo.prototype.setBandwidth = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional uint32 spreading_factor = 2; * @return {number} */ proto.gw.LoraModulationInfo.prototype.getSpreadingFactor = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.gw.LoraModulationInfo.prototype.setSpreadingFactor = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional string code_rate_legacy = 3; * @return {string} */ proto.gw.LoraModulationInfo.prototype.getCodeRateLegacy = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** @param {string} value */ proto.gw.LoraModulationInfo.prototype.setCodeRateLegacy = function(value) { jspb.Message.setField(this, 3, value); }; /** * optional CodeRate code_rate = 5; * @return {!proto.gw.CodeRate} */ proto.gw.LoraModulationInfo.prototype.getCodeRate = function() { return /** @type {!proto.gw.CodeRate} */ (jspb.Message.getFieldProto3(this, 5, 0)); }; /** @param {!proto.gw.CodeRate} value */ proto.gw.LoraModulationInfo.prototype.setCodeRate = function(value) { jspb.Message.setField(this, 5, value); }; /** * optional bool polarization_inversion = 4; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.gw.LoraModulationInfo.prototype.getPolarizationInversion = function() { return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 4, false)); }; /** @param {boolean} value */ proto.gw.LoraModulationInfo.prototype.setPolarizationInversion = function(value) { jspb.Message.setField(this, 4, value); }; /** * 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.gw.FskModulationInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.FskModulationInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.FskModulationInfo.displayName = 'proto.gw.FskModulationInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.FskModulationInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.FskModulationInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.FskModulationInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.FskModulationInfo.toObject = function(includeInstance, msg) { var f, obj = { frequencyDeviation: msg.getFrequencyDeviation(), datarate: msg.getDatarate() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.FskModulationInfo} */ proto.gw.FskModulationInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.FskModulationInfo; return proto.gw.FskModulationInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.FskModulationInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.FskModulationInfo} */ proto.gw.FskModulationInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setFrequencyDeviation(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setDatarate(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.FskModulationInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.FskModulationInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.FskModulationInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.FskModulationInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getFrequencyDeviation(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getDatarate(); if (f !== 0) { writer.writeUint32( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.FskModulationInfo} The clone. */ proto.gw.FskModulationInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.FskModulationInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 frequency_deviation = 1; * @return {number} */ proto.gw.FskModulationInfo.prototype.getFrequencyDeviation = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.FskModulationInfo.prototype.setFrequencyDeviation = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional uint32 datarate = 2; * @return {number} */ proto.gw.FskModulationInfo.prototype.getDatarate = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.gw.FskModulationInfo.prototype.setDatarate = function(value) { jspb.Message.setField(this, 2, value); }; /** * 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.gw.LrFhssModulationInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.LrFhssModulationInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.LrFhssModulationInfo.displayName = 'proto.gw.LrFhssModulationInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.LrFhssModulationInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.LrFhssModulationInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.LrFhssModulationInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.LrFhssModulationInfo.toObject = function(includeInstance, msg) { var f, obj = { operatingChannelWidth: msg.getOperatingChannelWidth(), codeRateLegacy: msg.getCodeRateLegacy(), codeRate: msg.getCodeRate(), gridSteps: msg.getGridSteps() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.LrFhssModulationInfo} */ proto.gw.LrFhssModulationInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.LrFhssModulationInfo; return proto.gw.LrFhssModulationInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.LrFhssModulationInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.LrFhssModulationInfo} */ proto.gw.LrFhssModulationInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setOperatingChannelWidth(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setCodeRateLegacy(value); break; case 4: var value = /** @type {!proto.gw.CodeRate} */ (reader.readEnum()); msg.setCodeRate(value); break; case 3: var value = /** @type {number} */ (reader.readUint32()); msg.setGridSteps(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.LrFhssModulationInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.LrFhssModulationInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.LrFhssModulationInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.LrFhssModulationInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getOperatingChannelWidth(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getCodeRateLegacy(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getCodeRate(); if (f !== 0.0) { writer.writeEnum( 4, f ); } f = this.getGridSteps(); if (f !== 0) { writer.writeUint32( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.LrFhssModulationInfo} The clone. */ proto.gw.LrFhssModulationInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.LrFhssModulationInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 operating_channel_width = 1; * @return {number} */ proto.gw.LrFhssModulationInfo.prototype.getOperatingChannelWidth = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.LrFhssModulationInfo.prototype.setOperatingChannelWidth = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string code_rate_legacy = 2; * @return {string} */ proto.gw.LrFhssModulationInfo.prototype.getCodeRateLegacy = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.gw.LrFhssModulationInfo.prototype.setCodeRateLegacy = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional CodeRate code_rate = 4; * @return {!proto.gw.CodeRate} */ proto.gw.LrFhssModulationInfo.prototype.getCodeRate = function() { return /** @type {!proto.gw.CodeRate} */ (jspb.Message.getFieldProto3(this, 4, 0)); }; /** @param {!proto.gw.CodeRate} value */ proto.gw.LrFhssModulationInfo.prototype.setCodeRate = function(value) { jspb.Message.setField(this, 4, value); }; /** * optional uint32 grid_steps = 3; * @return {number} */ proto.gw.LrFhssModulationInfo.prototype.getGridSteps = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); }; /** @param {number} value */ proto.gw.LrFhssModulationInfo.prototype.setGridSteps = function(value) { jspb.Message.setField(this, 3, value); }; /** * 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.gw.EncryptedFineTimestamp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.EncryptedFineTimestamp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.EncryptedFineTimestamp.displayName = 'proto.gw.EncryptedFineTimestamp'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.EncryptedFineTimestamp.prototype.toObject = function(opt_includeInstance) { return proto.gw.EncryptedFineTimestamp.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.EncryptedFineTimestamp} msg The msg instance to transform. * @return {!Object} */ proto.gw.EncryptedFineTimestamp.toObject = function(includeInstance, msg) { var f, obj = { aesKeyIndex: msg.getAesKeyIndex(), encryptedNs: msg.getEncryptedNs_asB64(), fpgaId: msg.getFpgaId_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.EncryptedFineTimestamp} */ proto.gw.EncryptedFineTimestamp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.EncryptedFineTimestamp; return proto.gw.EncryptedFineTimestamp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.EncryptedFineTimestamp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.EncryptedFineTimestamp} */ proto.gw.EncryptedFineTimestamp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setAesKeyIndex(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setEncryptedNs(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setFpgaId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.EncryptedFineTimestamp} message * @param {!jspb.BinaryWriter} writer */ proto.gw.EncryptedFineTimestamp.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.EncryptedFineTimestamp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.EncryptedFineTimestamp.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getAesKeyIndex(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getEncryptedNs_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = this.getFpgaId_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.EncryptedFineTimestamp} The clone. */ proto.gw.EncryptedFineTimestamp.prototype.cloneMessage = function() { return /** @type {!proto.gw.EncryptedFineTimestamp} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 aes_key_index = 1; * @return {number} */ proto.gw.EncryptedFineTimestamp.prototype.getAesKeyIndex = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.EncryptedFineTimestamp.prototype.setAesKeyIndex = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional bytes encrypted_ns = 2; * @return {!(string|Uint8Array)} */ proto.gw.EncryptedFineTimestamp.prototype.getEncryptedNs = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** * optional bytes encrypted_ns = 2; * This is a type-conversion wrapper around `getEncryptedNs()` * @return {string} */ proto.gw.EncryptedFineTimestamp.prototype.getEncryptedNs_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getEncryptedNs())); }; /** * optional bytes encrypted_ns = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getEncryptedNs()` * @return {!Uint8Array} */ proto.gw.EncryptedFineTimestamp.prototype.getEncryptedNs_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getEncryptedNs())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.EncryptedFineTimestamp.prototype.setEncryptedNs = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional bytes fpga_id = 3; * @return {!(string|Uint8Array)} */ proto.gw.EncryptedFineTimestamp.prototype.getFpgaId = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** * optional bytes fpga_id = 3; * This is a type-conversion wrapper around `getFpgaId()` * @return {string} */ proto.gw.EncryptedFineTimestamp.prototype.getFpgaId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getFpgaId())); }; /** * optional bytes fpga_id = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getFpgaId()` * @return {!Uint8Array} */ proto.gw.EncryptedFineTimestamp.prototype.getFpgaId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getFpgaId())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.EncryptedFineTimestamp.prototype.setFpgaId = function(value) { jspb.Message.setField(this, 3, value); }; /** * 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.gw.PlainFineTimestamp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.PlainFineTimestamp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.PlainFineTimestamp.displayName = 'proto.gw.PlainFineTimestamp'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.PlainFineTimestamp.prototype.toObject = function(opt_includeInstance) { return proto.gw.PlainFineTimestamp.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.PlainFineTimestamp} msg The msg instance to transform. * @return {!Object} */ proto.gw.PlainFineTimestamp.toObject = function(includeInstance, msg) { var f, obj = { time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.PlainFineTimestamp} */ proto.gw.PlainFineTimestamp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.PlainFineTimestamp; return proto.gw.PlainFineTimestamp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.PlainFineTimestamp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.PlainFineTimestamp} */ proto.gw.PlainFineTimestamp.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; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.PlainFineTimestamp} message * @param {!jspb.BinaryWriter} writer */ proto.gw.PlainFineTimestamp.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.PlainFineTimestamp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.PlainFineTimestamp.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getTime(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.PlainFineTimestamp} The clone. */ proto.gw.PlainFineTimestamp.prototype.cloneMessage = function() { return /** @type {!proto.gw.PlainFineTimestamp} */ (jspb.Message.cloneMessage(this)); }; /** * optional google.protobuf.Timestamp time = 1; * @return {proto.google.protobuf.Timestamp} */ proto.gw.PlainFineTimestamp.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 */ proto.gw.PlainFineTimestamp.prototype.setTime = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.gw.PlainFineTimestamp.prototype.clearTime = function() { this.setTime(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.PlainFineTimestamp.prototype.hasTime = function() { return jspb.Message.getField(this, 1) != null; }; /** * 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.gw.GatewayStats = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.gw.GatewayStats.repeatedFields_, null); }; goog.inherits(proto.gw.GatewayStats, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.GatewayStats.displayName = 'proto.gw.GatewayStats'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.gw.GatewayStats.repeatedFields_ = [14,15]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.GatewayStats.prototype.toObject = function(opt_includeInstance) { return proto.gw.GatewayStats.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.GatewayStats} msg The msg instance to transform. * @return {!Object} */ proto.gw.GatewayStats.toObject = function(includeInstance, msg) { var f, obj = { gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId(), time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), location: (f = msg.getLocation()) && common_common_pb.Location.toObject(includeInstance, f), configVersion: msg.getConfigVersion(), rxPacketsReceived: msg.getRxPacketsReceived(), rxPacketsReceivedOk: msg.getRxPacketsReceivedOk(), txPacketsReceived: msg.getTxPacketsReceived(), txPacketsEmitted: msg.getTxPacketsEmitted(), metaDataMap: (f = msg.getMetaDataMap(true)) ? f.toArray() : [], txPacketsPerFrequencyMap: (f = msg.getTxPacketsPerFrequencyMap(true)) ? f.toArray() : [], rxPacketsPerFrequencyMap: (f = msg.getRxPacketsPerFrequencyMap(true)) ? f.toArray() : [], txPacketsPerModulationList: jspb.Message.toObjectList(msg.getTxPacketsPerModulationList(), proto.gw.PerModulationCount.toObject, includeInstance), rxPacketsPerModulationList: jspb.Message.toObjectList(msg.getRxPacketsPerModulationList(), proto.gw.PerModulationCount.toObject, includeInstance), txPacketsPerStatusMap: (f = msg.getTxPacketsPerStatusMap(true)) ? f.toArray() : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.GatewayStats} */ proto.gw.GatewayStats.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.GatewayStats; return proto.gw.GatewayStats.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.GatewayStats} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.GatewayStats} */ proto.gw.GatewayStats.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.setGatewayIdLegacy(value); break; case 17: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setTime(value); break; case 3: var value = new common_common_pb.Location; reader.readMessage(value,common_common_pb.Location.deserializeBinaryFromReader); msg.setLocation(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setConfigVersion(value); break; case 5: var value = /** @type {number} */ (reader.readUint32()); msg.setRxPacketsReceived(value); break; case 6: var value = /** @type {number} */ (reader.readUint32()); msg.setRxPacketsReceivedOk(value); break; case 7: var value = /** @type {number} */ (reader.readUint32()); msg.setTxPacketsReceived(value); break; case 8: var value = /** @type {number} */ (reader.readUint32()); msg.setTxPacketsEmitted(value); break; case 10: var value = msg.getMetaDataMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString); }); break; case 12: var value = msg.getTxPacketsPerFrequencyMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readUint32); }); break; case 13: var value = msg.getRxPacketsPerFrequencyMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readUint32); }); break; case 14: var value = new proto.gw.PerModulationCount; reader.readMessage(value,proto.gw.PerModulationCount.deserializeBinaryFromReader); msg.getTxPacketsPerModulationList().push(value); msg.setTxPacketsPerModulationList(msg.getTxPacketsPerModulationList()); break; case 15: var value = new proto.gw.PerModulationCount; reader.readMessage(value,proto.gw.PerModulationCount.deserializeBinaryFromReader); msg.getRxPacketsPerModulationList().push(value); msg.setRxPacketsPerModulationList(msg.getRxPacketsPerModulationList()); break; case 16: var value = msg.getTxPacketsPerStatusMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readUint32); }); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.GatewayStats} message * @param {!jspb.BinaryWriter} writer */ proto.gw.GatewayStats.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.GatewayStats.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.GatewayStats.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 17, f ); } f = this.getTime(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = this.getLocation(); if (f != null) { writer.writeMessage( 3, f, common_common_pb.Location.serializeBinaryToWriter ); } f = this.getConfigVersion(); if (f.length > 0) { writer.writeString( 4, f ); } f = this.getRxPacketsReceived(); if (f !== 0) { writer.writeUint32( 5, f ); } f = this.getRxPacketsReceivedOk(); if (f !== 0) { writer.writeUint32( 6, f ); } f = this.getTxPacketsReceived(); if (f !== 0) { writer.writeUint32( 7, f ); } f = this.getTxPacketsEmitted(); if (f !== 0) { writer.writeUint32( 8, f ); } f = this.getMetaDataMap(true); if (f && f.getLength() > 0) { f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = this.getTxPacketsPerFrequencyMap(true); if (f && f.getLength() > 0) { f.serializeBinary(12, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeUint32); } f = this.getRxPacketsPerFrequencyMap(true); if (f && f.getLength() > 0) { f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeUint32); } f = this.getTxPacketsPerModulationList(); if (f.length > 0) { writer.writeRepeatedMessage( 14, f, proto.gw.PerModulationCount.serializeBinaryToWriter ); } f = this.getRxPacketsPerModulationList(); if (f.length > 0) { writer.writeRepeatedMessage( 15, f, proto.gw.PerModulationCount.serializeBinaryToWriter ); } f = this.getTxPacketsPerStatusMap(true); if (f && f.getLength() > 0) { f.serializeBinary(16, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeUint32); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.GatewayStats} The clone. */ proto.gw.GatewayStats.prototype.cloneMessage = function() { return /** @type {!proto.gw.GatewayStats} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id_legacy = 1; * @return {!(string|Uint8Array)} */ proto.gw.GatewayStats.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id_legacy = 1; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.GatewayStats.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.GatewayStats.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayStats.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string gateway_id = 17; * @return {string} */ proto.gw.GatewayStats.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 17, "")); }; /** @param {string} value */ proto.gw.GatewayStats.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 17, value); }; /** * optional google.protobuf.Timestamp time = 2; * @return {proto.google.protobuf.Timestamp} */ proto.gw.GatewayStats.prototype.getTime = function() { return /** @type{proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); }; /** @param {proto.google.protobuf.Timestamp|undefined} value */ proto.gw.GatewayStats.prototype.setTime = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.gw.GatewayStats.prototype.clearTime = function() { this.setTime(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.GatewayStats.prototype.hasTime = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional common.Location location = 3; * @return {proto.common.Location} */ proto.gw.GatewayStats.prototype.getLocation = function() { return /** @type{proto.common.Location} */ ( jspb.Message.getWrapperField(this, common_common_pb.Location, 3)); }; /** @param {proto.common.Location|undefined} value */ proto.gw.GatewayStats.prototype.setLocation = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.gw.GatewayStats.prototype.clearLocation = function() { this.setLocation(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.GatewayStats.prototype.hasLocation = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional string config_version = 4; * @return {string} */ proto.gw.GatewayStats.prototype.getConfigVersion = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** @param {string} value */ proto.gw.GatewayStats.prototype.setConfigVersion = function(value) { jspb.Message.setField(this, 4, value); }; /** * optional uint32 rx_packets_received = 5; * @return {number} */ proto.gw.GatewayStats.prototype.getRxPacketsReceived = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0)); }; /** @param {number} value */ proto.gw.GatewayStats.prototype.setRxPacketsReceived = function(value) { jspb.Message.setField(this, 5, value); }; /** * optional uint32 rx_packets_received_ok = 6; * @return {number} */ proto.gw.GatewayStats.prototype.getRxPacketsReceivedOk = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0)); }; /** @param {number} value */ proto.gw.GatewayStats.prototype.setRxPacketsReceivedOk = function(value) { jspb.Message.setField(this, 6, value); }; /** * optional uint32 tx_packets_received = 7; * @return {number} */ proto.gw.GatewayStats.prototype.getTxPacketsReceived = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0)); }; /** @param {number} value */ proto.gw.GatewayStats.prototype.setTxPacketsReceived = function(value) { jspb.Message.setField(this, 7, value); }; /** * optional uint32 tx_packets_emitted = 8; * @return {number} */ proto.gw.GatewayStats.prototype.getTxPacketsEmitted = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0)); }; /** @param {number} value */ proto.gw.GatewayStats.prototype.setTxPacketsEmitted = function(value) { jspb.Message.setField(this, 8, value); }; /** * map meta_data = 10; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.gw.GatewayStats.prototype.getMetaDataMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 10, opt_noLazyCreate, null)); }; /** * map tx_packets_per_frequency = 12; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.gw.GatewayStats.prototype.getTxPacketsPerFrequencyMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 12, opt_noLazyCreate, null)); }; /** * map rx_packets_per_frequency = 13; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.gw.GatewayStats.prototype.getRxPacketsPerFrequencyMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 13, opt_noLazyCreate, null)); }; /** * repeated PerModulationCount tx_packets_per_modulation = 14; * 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.GatewayStats.prototype.getTxPacketsPerModulationList = function() { return /** @type{!Array.} */ ( jspb.Message.getRepeatedWrapperField(this, proto.gw.PerModulationCount, 14)); }; /** @param {Array.} value */ proto.gw.GatewayStats.prototype.setTxPacketsPerModulationList = function(value) { jspb.Message.setRepeatedWrapperField(this, 14, value); }; proto.gw.GatewayStats.prototype.clearTxPacketsPerModulationList = function() { this.setTxPacketsPerModulationList([]); }; /** * repeated PerModulationCount rx_packets_per_modulation = 15; * 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.GatewayStats.prototype.getRxPacketsPerModulationList = function() { return /** @type{!Array.} */ ( jspb.Message.getRepeatedWrapperField(this, proto.gw.PerModulationCount, 15)); }; /** @param {Array.} value */ proto.gw.GatewayStats.prototype.setRxPacketsPerModulationList = function(value) { jspb.Message.setRepeatedWrapperField(this, 15, value); }; proto.gw.GatewayStats.prototype.clearRxPacketsPerModulationList = function() { this.setRxPacketsPerModulationList([]); }; /** * map tx_packets_per_status = 16; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.gw.GatewayStats.prototype.getTxPacketsPerStatusMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 16, opt_noLazyCreate, null)); }; /** * 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.gw.PerModulationCount = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.PerModulationCount, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.PerModulationCount.displayName = 'proto.gw.PerModulationCount'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.PerModulationCount.prototype.toObject = function(opt_includeInstance) { return proto.gw.PerModulationCount.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.PerModulationCount} msg The msg instance to transform. * @return {!Object} */ proto.gw.PerModulationCount.toObject = function(includeInstance, msg) { var f, obj = { modulation: (f = msg.getModulation()) && proto.gw.Modulation.toObject(includeInstance, f), count: msg.getCount() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.PerModulationCount} */ proto.gw.PerModulationCount.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.PerModulationCount; return proto.gw.PerModulationCount.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.PerModulationCount} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.PerModulationCount} */ proto.gw.PerModulationCount.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.gw.Modulation; reader.readMessage(value,proto.gw.Modulation.deserializeBinaryFromReader); msg.setModulation(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setCount(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.PerModulationCount} message * @param {!jspb.BinaryWriter} writer */ proto.gw.PerModulationCount.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.PerModulationCount.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.PerModulationCount.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getModulation(); if (f != null) { writer.writeMessage( 1, f, proto.gw.Modulation.serializeBinaryToWriter ); } f = this.getCount(); if (f !== 0) { writer.writeUint32( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.PerModulationCount} The clone. */ proto.gw.PerModulationCount.prototype.cloneMessage = function() { return /** @type {!proto.gw.PerModulationCount} */ (jspb.Message.cloneMessage(this)); }; /** * optional Modulation modulation = 1; * @return {proto.gw.Modulation} */ proto.gw.PerModulationCount.prototype.getModulation = function() { return /** @type{proto.gw.Modulation} */ ( jspb.Message.getWrapperField(this, proto.gw.Modulation, 1)); }; /** @param {proto.gw.Modulation|undefined} value */ proto.gw.PerModulationCount.prototype.setModulation = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.gw.PerModulationCount.prototype.clearModulation = function() { this.setModulation(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.PerModulationCount.prototype.hasModulation = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional uint32 count = 2; * @return {number} */ proto.gw.PerModulationCount.prototype.getCount = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.gw.PerModulationCount.prototype.setCount = function(value) { jspb.Message.setField(this, 2, value); }; /** * 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.gw.UplinkRxInfoLegacy = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gw.UplinkRxInfoLegacy.oneofGroups_); }; goog.inherits(proto.gw.UplinkRxInfoLegacy, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.UplinkRxInfoLegacy.displayName = 'proto.gw.UplinkRxInfoLegacy'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.gw.UplinkRxInfoLegacy.oneofGroups_ = [[13,14]]; /** * @enum {number} */ proto.gw.UplinkRxInfoLegacy.FineTimestampCase = { FINE_TIMESTAMP_NOT_SET: 0, ENCRYPTED_FINE_TIMESTAMP: 13, PLAIN_FINE_TIMESTAMP: 14 }; /** * @return {proto.gw.UplinkRxInfoLegacy.FineTimestampCase} */ proto.gw.UplinkRxInfoLegacy.prototype.getFineTimestampCase = function() { return /** @type {proto.gw.UplinkRxInfoLegacy.FineTimestampCase} */(jspb.Message.computeOneofCase(this, proto.gw.UplinkRxInfoLegacy.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.UplinkRxInfoLegacy.prototype.toObject = function(opt_includeInstance) { return proto.gw.UplinkRxInfoLegacy.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.UplinkRxInfoLegacy} msg The msg instance to transform. * @return {!Object} */ proto.gw.UplinkRxInfoLegacy.toObject = function(includeInstance, msg) { var f, obj = { gatewayId: msg.getGatewayId_asB64(), time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), timeSinceGpsEpoch: (f = msg.getTimeSinceGpsEpoch()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), rssi: msg.getRssi(), loraSnr: msg.getLoraSnr(), channel: msg.getChannel(), rfChain: msg.getRfChain(), board: msg.getBoard(), antenna: msg.getAntenna(), location: (f = msg.getLocation()) && common_common_pb.Location.toObject(includeInstance, f), fineTimestampType: msg.getFineTimestampType(), encryptedFineTimestamp: (f = msg.getEncryptedFineTimestamp()) && proto.gw.EncryptedFineTimestamp.toObject(includeInstance, f), plainFineTimestamp: (f = msg.getPlainFineTimestamp()) && proto.gw.PlainFineTimestamp.toObject(includeInstance, f), context: msg.getContext_asB64(), uplinkId: msg.getUplinkId_asB64(), crcStatus: msg.getCrcStatus(), metadataMap: (f = msg.getMetadataMap(true)) ? f.toArray() : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.UplinkRxInfoLegacy} */ proto.gw.UplinkRxInfoLegacy.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.UplinkRxInfoLegacy; return proto.gw.UplinkRxInfoLegacy.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.UplinkRxInfoLegacy} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.UplinkRxInfoLegacy} */ proto.gw.UplinkRxInfoLegacy.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.setGatewayId(value); break; case 2: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setTime(value); break; case 3: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setTimeSinceGpsEpoch(value); break; case 5: var value = /** @type {number} */ (reader.readInt32()); msg.setRssi(value); break; case 6: var value = /** @type {number} */ (reader.readDouble()); msg.setLoraSnr(value); break; case 7: var value = /** @type {number} */ (reader.readUint32()); msg.setChannel(value); break; case 8: var value = /** @type {number} */ (reader.readUint32()); msg.setRfChain(value); break; case 9: var value = /** @type {number} */ (reader.readUint32()); msg.setBoard(value); break; case 10: var value = /** @type {number} */ (reader.readUint32()); msg.setAntenna(value); break; case 11: var value = new common_common_pb.Location; reader.readMessage(value,common_common_pb.Location.deserializeBinaryFromReader); msg.setLocation(value); break; case 12: var value = /** @type {!proto.gw.FineTimestampType} */ (reader.readEnum()); msg.setFineTimestampType(value); break; case 13: var value = new proto.gw.EncryptedFineTimestamp; reader.readMessage(value,proto.gw.EncryptedFineTimestamp.deserializeBinaryFromReader); msg.setEncryptedFineTimestamp(value); break; case 14: var value = new proto.gw.PlainFineTimestamp; reader.readMessage(value,proto.gw.PlainFineTimestamp.deserializeBinaryFromReader); msg.setPlainFineTimestamp(value); break; case 15: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setContext(value); break; case 16: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setUplinkId(value); break; case 17: var value = /** @type {!proto.gw.CRCStatus} */ (reader.readEnum()); msg.setCrcStatus(value); break; case 18: var value = msg.getMetadataMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString); }); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.UplinkRxInfoLegacy} message * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkRxInfoLegacy.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.UplinkRxInfoLegacy.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkRxInfoLegacy.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getTime(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = this.getTimeSinceGpsEpoch(); if (f != null) { writer.writeMessage( 3, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } f = this.getRssi(); if (f !== 0) { writer.writeInt32( 5, f ); } f = this.getLoraSnr(); if (f !== 0.0) { writer.writeDouble( 6, f ); } f = this.getChannel(); if (f !== 0) { writer.writeUint32( 7, f ); } f = this.getRfChain(); if (f !== 0) { writer.writeUint32( 8, f ); } f = this.getBoard(); if (f !== 0) { writer.writeUint32( 9, f ); } f = this.getAntenna(); if (f !== 0) { writer.writeUint32( 10, f ); } f = this.getLocation(); if (f != null) { writer.writeMessage( 11, f, common_common_pb.Location.serializeBinaryToWriter ); } f = this.getFineTimestampType(); if (f !== 0.0) { writer.writeEnum( 12, f ); } f = this.getEncryptedFineTimestamp(); if (f != null) { writer.writeMessage( 13, f, proto.gw.EncryptedFineTimestamp.serializeBinaryToWriter ); } f = this.getPlainFineTimestamp(); if (f != null) { writer.writeMessage( 14, f, proto.gw.PlainFineTimestamp.serializeBinaryToWriter ); } f = this.getContext_asU8(); if (f.length > 0) { writer.writeBytes( 15, f ); } f = this.getUplinkId_asU8(); if (f.length > 0) { writer.writeBytes( 16, f ); } f = this.getCrcStatus(); if (f !== 0.0) { writer.writeEnum( 17, f ); } f = this.getMetadataMap(true); if (f && f.getLength() > 0) { f.serializeBinary(18, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.UplinkRxInfoLegacy} The clone. */ proto.gw.UplinkRxInfoLegacy.prototype.cloneMessage = function() { return /** @type {!proto.gw.UplinkRxInfoLegacy} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id = 1; * @return {!(string|Uint8Array)} */ proto.gw.UplinkRxInfoLegacy.prototype.getGatewayId = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id = 1; * This is a type-conversion wrapper around `getGatewayId()` * @return {string} */ proto.gw.UplinkRxInfoLegacy.prototype.getGatewayId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayId())); }; /** * optional bytes gateway_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayId()` * @return {!Uint8Array} */ proto.gw.UplinkRxInfoLegacy.prototype.getGatewayId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayId())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.UplinkRxInfoLegacy.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional google.protobuf.Timestamp time = 2; * @return {proto.google.protobuf.Timestamp} */ proto.gw.UplinkRxInfoLegacy.prototype.getTime = function() { return /** @type{proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); }; /** @param {proto.google.protobuf.Timestamp|undefined} value */ proto.gw.UplinkRxInfoLegacy.prototype.setTime = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.gw.UplinkRxInfoLegacy.prototype.clearTime = function() { this.setTime(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfoLegacy.prototype.hasTime = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional google.protobuf.Duration time_since_gps_epoch = 3; * @return {proto.google.protobuf.Duration} */ proto.gw.UplinkRxInfoLegacy.prototype.getTimeSinceGpsEpoch = function() { return /** @type{proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3)); }; /** @param {proto.google.protobuf.Duration|undefined} value */ proto.gw.UplinkRxInfoLegacy.prototype.setTimeSinceGpsEpoch = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.gw.UplinkRxInfoLegacy.prototype.clearTimeSinceGpsEpoch = function() { this.setTimeSinceGpsEpoch(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfoLegacy.prototype.hasTimeSinceGpsEpoch = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional int32 rssi = 5; * @return {number} */ proto.gw.UplinkRxInfoLegacy.prototype.getRssi = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfoLegacy.prototype.setRssi = function(value) { jspb.Message.setField(this, 5, value); }; /** * optional double lora_snr = 6; * @return {number} */ proto.gw.UplinkRxInfoLegacy.prototype.getLoraSnr = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfoLegacy.prototype.setLoraSnr = function(value) { jspb.Message.setField(this, 6, value); }; /** * optional uint32 channel = 7; * @return {number} */ proto.gw.UplinkRxInfoLegacy.prototype.getChannel = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfoLegacy.prototype.setChannel = function(value) { jspb.Message.setField(this, 7, value); }; /** * optional uint32 rf_chain = 8; * @return {number} */ proto.gw.UplinkRxInfoLegacy.prototype.getRfChain = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfoLegacy.prototype.setRfChain = function(value) { jspb.Message.setField(this, 8, value); }; /** * optional uint32 board = 9; * @return {number} */ proto.gw.UplinkRxInfoLegacy.prototype.getBoard = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 9, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfoLegacy.prototype.setBoard = function(value) { jspb.Message.setField(this, 9, value); }; /** * optional uint32 antenna = 10; * @return {number} */ proto.gw.UplinkRxInfoLegacy.prototype.getAntenna = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 10, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfoLegacy.prototype.setAntenna = function(value) { jspb.Message.setField(this, 10, value); }; /** * optional common.Location location = 11; * @return {proto.common.Location} */ proto.gw.UplinkRxInfoLegacy.prototype.getLocation = function() { return /** @type{proto.common.Location} */ ( jspb.Message.getWrapperField(this, common_common_pb.Location, 11)); }; /** @param {proto.common.Location|undefined} value */ proto.gw.UplinkRxInfoLegacy.prototype.setLocation = function(value) { jspb.Message.setWrapperField(this, 11, value); }; proto.gw.UplinkRxInfoLegacy.prototype.clearLocation = function() { this.setLocation(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfoLegacy.prototype.hasLocation = function() { return jspb.Message.getField(this, 11) != null; }; /** * optional FineTimestampType fine_timestamp_type = 12; * @return {!proto.gw.FineTimestampType} */ proto.gw.UplinkRxInfoLegacy.prototype.getFineTimestampType = function() { return /** @type {!proto.gw.FineTimestampType} */ (jspb.Message.getFieldProto3(this, 12, 0)); }; /** @param {!proto.gw.FineTimestampType} value */ proto.gw.UplinkRxInfoLegacy.prototype.setFineTimestampType = function(value) { jspb.Message.setField(this, 12, value); }; /** * optional EncryptedFineTimestamp encrypted_fine_timestamp = 13; * @return {proto.gw.EncryptedFineTimestamp} */ proto.gw.UplinkRxInfoLegacy.prototype.getEncryptedFineTimestamp = function() { return /** @type{proto.gw.EncryptedFineTimestamp} */ ( jspb.Message.getWrapperField(this, proto.gw.EncryptedFineTimestamp, 13)); }; /** @param {proto.gw.EncryptedFineTimestamp|undefined} value */ proto.gw.UplinkRxInfoLegacy.prototype.setEncryptedFineTimestamp = function(value) { jspb.Message.setOneofWrapperField(this, 13, proto.gw.UplinkRxInfoLegacy.oneofGroups_[0], value); }; proto.gw.UplinkRxInfoLegacy.prototype.clearEncryptedFineTimestamp = function() { this.setEncryptedFineTimestamp(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfoLegacy.prototype.hasEncryptedFineTimestamp = function() { return jspb.Message.getField(this, 13) != null; }; /** * optional PlainFineTimestamp plain_fine_timestamp = 14; * @return {proto.gw.PlainFineTimestamp} */ proto.gw.UplinkRxInfoLegacy.prototype.getPlainFineTimestamp = function() { return /** @type{proto.gw.PlainFineTimestamp} */ ( jspb.Message.getWrapperField(this, proto.gw.PlainFineTimestamp, 14)); }; /** @param {proto.gw.PlainFineTimestamp|undefined} value */ proto.gw.UplinkRxInfoLegacy.prototype.setPlainFineTimestamp = function(value) { jspb.Message.setOneofWrapperField(this, 14, proto.gw.UplinkRxInfoLegacy.oneofGroups_[0], value); }; proto.gw.UplinkRxInfoLegacy.prototype.clearPlainFineTimestamp = function() { this.setPlainFineTimestamp(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfoLegacy.prototype.hasPlainFineTimestamp = function() { return jspb.Message.getField(this, 14) != null; }; /** * optional bytes context = 15; * @return {!(string|Uint8Array)} */ proto.gw.UplinkRxInfoLegacy.prototype.getContext = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 15, "")); }; /** * optional bytes context = 15; * This is a type-conversion wrapper around `getContext()` * @return {string} */ proto.gw.UplinkRxInfoLegacy.prototype.getContext_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getContext())); }; /** * optional bytes context = 15; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getContext()` * @return {!Uint8Array} */ proto.gw.UplinkRxInfoLegacy.prototype.getContext_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getContext())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.UplinkRxInfoLegacy.prototype.setContext = function(value) { jspb.Message.setField(this, 15, value); }; /** * optional bytes uplink_id = 16; * @return {!(string|Uint8Array)} */ proto.gw.UplinkRxInfoLegacy.prototype.getUplinkId = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 16, "")); }; /** * optional bytes uplink_id = 16; * This is a type-conversion wrapper around `getUplinkId()` * @return {string} */ proto.gw.UplinkRxInfoLegacy.prototype.getUplinkId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getUplinkId())); }; /** * optional bytes uplink_id = 16; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getUplinkId()` * @return {!Uint8Array} */ proto.gw.UplinkRxInfoLegacy.prototype.getUplinkId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getUplinkId())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.UplinkRxInfoLegacy.prototype.setUplinkId = function(value) { jspb.Message.setField(this, 16, value); }; /** * optional CRCStatus crc_status = 17; * @return {!proto.gw.CRCStatus} */ proto.gw.UplinkRxInfoLegacy.prototype.getCrcStatus = function() { return /** @type {!proto.gw.CRCStatus} */ (jspb.Message.getFieldProto3(this, 17, 0)); }; /** @param {!proto.gw.CRCStatus} value */ proto.gw.UplinkRxInfoLegacy.prototype.setCrcStatus = function(value) { jspb.Message.setField(this, 17, value); }; /** * map metadata = 18; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.gw.UplinkRxInfoLegacy.prototype.getMetadataMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 18, opt_noLazyCreate, null)); }; /** * 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.gw.UplinkRxInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.UplinkRxInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.UplinkRxInfo.displayName = 'proto.gw.UplinkRxInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.UplinkRxInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.UplinkRxInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.UplinkRxInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.UplinkRxInfo.toObject = function(includeInstance, msg) { var f, obj = { gatewayId: msg.getGatewayId(), uplinkId: msg.getUplinkId(), time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), timeSinceGpsEpoch: (f = msg.getTimeSinceGpsEpoch()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), fineTimeSinceGpsEpoch: (f = msg.getFineTimeSinceGpsEpoch()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), rssi: msg.getRssi(), snr: msg.getSnr(), board: msg.getBoard(), antenna: msg.getAntenna(), location: (f = msg.getLocation()) && common_common_pb.Location.toObject(includeInstance, f), context: msg.getContext_asB64(), metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.UplinkRxInfo} */ proto.gw.UplinkRxInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.UplinkRxInfo; return proto.gw.UplinkRxInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.UplinkRxInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.UplinkRxInfo} */ proto.gw.UplinkRxInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setUplinkId(value); break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setTime(value); break; case 4: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setTimeSinceGpsEpoch(value); break; case 5: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setFineTimeSinceGpsEpoch(value); break; case 6: var value = /** @type {number} */ (reader.readInt32()); msg.setRssi(value); break; case 7: var value = /** @type {number} */ (reader.readFloat()); msg.setSnr(value); break; case 8: var value = /** @type {number} */ (reader.readUint32()); msg.setBoard(value); break; case 9: var value = /** @type {number} */ (reader.readUint32()); msg.setAntenna(value); break; case 10: var value = new common_common_pb.Location; reader.readMessage(value,common_common_pb.Location.deserializeBinaryFromReader); msg.setLocation(value); break; case 11: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setContext(value); break; case 12: var value = new google_protobuf_struct_pb.Struct; reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); msg.setMetadata(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.UplinkRxInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkRxInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.UplinkRxInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkRxInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 1, f ); } f = this.getUplinkId(); if (f !== 0) { writer.writeUint32( 2, f ); } f = this.getTime(); if (f != null) { writer.writeMessage( 3, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = this.getTimeSinceGpsEpoch(); if (f != null) { writer.writeMessage( 4, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } f = this.getFineTimeSinceGpsEpoch(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } f = this.getRssi(); if (f !== 0) { writer.writeInt32( 6, f ); } f = this.getSnr(); if (f !== 0.0) { writer.writeFloat( 7, f ); } f = this.getBoard(); if (f !== 0) { writer.writeUint32( 8, f ); } f = this.getAntenna(); if (f !== 0) { writer.writeUint32( 9, f ); } f = this.getLocation(); if (f != null) { writer.writeMessage( 10, f, common_common_pb.Location.serializeBinaryToWriter ); } f = this.getContext_asU8(); if (f.length > 0) { writer.writeBytes( 11, f ); } f = this.getMetadata(); if (f != null) { writer.writeMessage( 12, f, google_protobuf_struct_pb.Struct.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.UplinkRxInfo} The clone. */ proto.gw.UplinkRxInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.UplinkRxInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional string gateway_id = 1; * @return {string} */ proto.gw.UplinkRxInfo.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** @param {string} value */ proto.gw.UplinkRxInfo.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional uint32 uplink_id = 2; * @return {number} */ proto.gw.UplinkRxInfo.prototype.getUplinkId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfo.prototype.setUplinkId = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional google.protobuf.Timestamp time = 3; * @return {proto.google.protobuf.Timestamp} */ proto.gw.UplinkRxInfo.prototype.getTime = function() { return /** @type{proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** @param {proto.google.protobuf.Timestamp|undefined} value */ proto.gw.UplinkRxInfo.prototype.setTime = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.gw.UplinkRxInfo.prototype.clearTime = function() { this.setTime(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfo.prototype.hasTime = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional google.protobuf.Duration time_since_gps_epoch = 4; * @return {proto.google.protobuf.Duration} */ proto.gw.UplinkRxInfo.prototype.getTimeSinceGpsEpoch = function() { return /** @type{proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 4)); }; /** @param {proto.google.protobuf.Duration|undefined} value */ proto.gw.UplinkRxInfo.prototype.setTimeSinceGpsEpoch = function(value) { jspb.Message.setWrapperField(this, 4, value); }; proto.gw.UplinkRxInfo.prototype.clearTimeSinceGpsEpoch = function() { this.setTimeSinceGpsEpoch(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfo.prototype.hasTimeSinceGpsEpoch = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional google.protobuf.Duration fine_time_since_gps_epoch = 5; * @return {proto.google.protobuf.Duration} */ proto.gw.UplinkRxInfo.prototype.getFineTimeSinceGpsEpoch = function() { return /** @type{proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 5)); }; /** @param {proto.google.protobuf.Duration|undefined} value */ proto.gw.UplinkRxInfo.prototype.setFineTimeSinceGpsEpoch = function(value) { jspb.Message.setWrapperField(this, 5, value); }; proto.gw.UplinkRxInfo.prototype.clearFineTimeSinceGpsEpoch = function() { this.setFineTimeSinceGpsEpoch(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfo.prototype.hasFineTimeSinceGpsEpoch = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional int32 rssi = 6; * @return {number} */ proto.gw.UplinkRxInfo.prototype.getRssi = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfo.prototype.setRssi = function(value) { jspb.Message.setField(this, 6, value); }; /** * optional float snr = 7; * @return {number} */ proto.gw.UplinkRxInfo.prototype.getSnr = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfo.prototype.setSnr = function(value) { jspb.Message.setField(this, 7, value); }; /** * optional uint32 board = 8; * @return {number} */ proto.gw.UplinkRxInfo.prototype.getBoard = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfo.prototype.setBoard = function(value) { jspb.Message.setField(this, 8, value); }; /** * optional uint32 antenna = 9; * @return {number} */ proto.gw.UplinkRxInfo.prototype.getAntenna = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 9, 0)); }; /** @param {number} value */ proto.gw.UplinkRxInfo.prototype.setAntenna = function(value) { jspb.Message.setField(this, 9, value); }; /** * optional common.Location location = 10; * @return {proto.common.Location} */ proto.gw.UplinkRxInfo.prototype.getLocation = function() { return /** @type{proto.common.Location} */ ( jspb.Message.getWrapperField(this, common_common_pb.Location, 10)); }; /** @param {proto.common.Location|undefined} value */ proto.gw.UplinkRxInfo.prototype.setLocation = function(value) { jspb.Message.setWrapperField(this, 10, value); }; proto.gw.UplinkRxInfo.prototype.clearLocation = function() { this.setLocation(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfo.prototype.hasLocation = function() { return jspb.Message.getField(this, 10) != null; }; /** * optional bytes context = 11; * @return {!(string|Uint8Array)} */ proto.gw.UplinkRxInfo.prototype.getContext = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 11, "")); }; /** * optional bytes context = 11; * This is a type-conversion wrapper around `getContext()` * @return {string} */ proto.gw.UplinkRxInfo.prototype.getContext_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getContext())); }; /** * optional bytes context = 11; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getContext()` * @return {!Uint8Array} */ proto.gw.UplinkRxInfo.prototype.getContext_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getContext())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.UplinkRxInfo.prototype.setContext = function(value) { jspb.Message.setField(this, 11, value); }; /** * optional google.protobuf.Struct metadata = 12; * @return {proto.google.protobuf.Struct} */ proto.gw.UplinkRxInfo.prototype.getMetadata = function() { return /** @type{proto.google.protobuf.Struct} */ ( jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 12)); }; /** @param {proto.google.protobuf.Struct|undefined} value */ proto.gw.UplinkRxInfo.prototype.setMetadata = function(value) { jspb.Message.setWrapperField(this, 12, value); }; proto.gw.UplinkRxInfo.prototype.clearMetadata = function() { this.setMetadata(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkRxInfo.prototype.hasMetadata = function() { return jspb.Message.getField(this, 12) != null; }; /** * 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.gw.DownlinkTxInfoLegacy = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gw.DownlinkTxInfoLegacy.oneofGroups_); }; goog.inherits(proto.gw.DownlinkTxInfoLegacy, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.DownlinkTxInfoLegacy.displayName = 'proto.gw.DownlinkTxInfoLegacy'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.gw.DownlinkTxInfoLegacy.oneofGroups_ = [[8,9],[13,14,15]]; /** * @enum {number} */ proto.gw.DownlinkTxInfoLegacy.ModulationInfoCase = { MODULATION_INFO_NOT_SET: 0, LORA_MODULATION_INFO: 8, FSK_MODULATION_INFO: 9 }; /** * @return {proto.gw.DownlinkTxInfoLegacy.ModulationInfoCase} */ proto.gw.DownlinkTxInfoLegacy.prototype.getModulationInfoCase = function() { return /** @type {proto.gw.DownlinkTxInfoLegacy.ModulationInfoCase} */(jspb.Message.computeOneofCase(this, proto.gw.DownlinkTxInfoLegacy.oneofGroups_[0])); }; /** * @enum {number} */ proto.gw.DownlinkTxInfoLegacy.TimingInfoCase = { TIMING_INFO_NOT_SET: 0, IMMEDIATELY_TIMING_INFO: 13, DELAY_TIMING_INFO: 14, GPS_EPOCH_TIMING_INFO: 15 }; /** * @return {proto.gw.DownlinkTxInfoLegacy.TimingInfoCase} */ proto.gw.DownlinkTxInfoLegacy.prototype.getTimingInfoCase = function() { return /** @type {proto.gw.DownlinkTxInfoLegacy.TimingInfoCase} */(jspb.Message.computeOneofCase(this, proto.gw.DownlinkTxInfoLegacy.oneofGroups_[1])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.DownlinkTxInfoLegacy.prototype.toObject = function(opt_includeInstance) { return proto.gw.DownlinkTxInfoLegacy.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.DownlinkTxInfoLegacy} msg The msg instance to transform. * @return {!Object} */ proto.gw.DownlinkTxInfoLegacy.toObject = function(includeInstance, msg) { var f, obj = { gatewayId: msg.getGatewayId_asB64(), frequency: msg.getFrequency(), power: msg.getPower(), modulation: msg.getModulation(), loraModulationInfo: (f = msg.getLoraModulationInfo()) && proto.gw.LoraModulationInfo.toObject(includeInstance, f), fskModulationInfo: (f = msg.getFskModulationInfo()) && proto.gw.FskModulationInfo.toObject(includeInstance, f), board: msg.getBoard(), antenna: msg.getAntenna(), timing: msg.getTiming(), immediatelyTimingInfo: (f = msg.getImmediatelyTimingInfo()) && proto.gw.ImmediatelyTimingInfo.toObject(includeInstance, f), delayTimingInfo: (f = msg.getDelayTimingInfo()) && proto.gw.DelayTimingInfo.toObject(includeInstance, f), gpsEpochTimingInfo: (f = msg.getGpsEpochTimingInfo()) && proto.gw.GPSEpochTimingInfo.toObject(includeInstance, f), context: msg.getContext_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.DownlinkTxInfoLegacy} */ proto.gw.DownlinkTxInfoLegacy.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.DownlinkTxInfoLegacy; return proto.gw.DownlinkTxInfoLegacy.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.DownlinkTxInfoLegacy} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.DownlinkTxInfoLegacy} */ proto.gw.DownlinkTxInfoLegacy.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.setGatewayId(value); break; case 5: var value = /** @type {number} */ (reader.readUint32()); msg.setFrequency(value); break; case 6: var value = /** @type {number} */ (reader.readInt32()); msg.setPower(value); break; case 7: var value = /** @type {!proto.common.Modulation} */ (reader.readEnum()); msg.setModulation(value); break; case 8: var value = new proto.gw.LoraModulationInfo; reader.readMessage(value,proto.gw.LoraModulationInfo.deserializeBinaryFromReader); msg.setLoraModulationInfo(value); break; case 9: var value = new proto.gw.FskModulationInfo; reader.readMessage(value,proto.gw.FskModulationInfo.deserializeBinaryFromReader); msg.setFskModulationInfo(value); break; case 10: var value = /** @type {number} */ (reader.readUint32()); msg.setBoard(value); break; case 11: var value = /** @type {number} */ (reader.readUint32()); msg.setAntenna(value); break; case 12: var value = /** @type {!proto.gw.DownlinkTiming} */ (reader.readEnum()); msg.setTiming(value); break; case 13: var value = new proto.gw.ImmediatelyTimingInfo; reader.readMessage(value,proto.gw.ImmediatelyTimingInfo.deserializeBinaryFromReader); msg.setImmediatelyTimingInfo(value); break; case 14: var value = new proto.gw.DelayTimingInfo; reader.readMessage(value,proto.gw.DelayTimingInfo.deserializeBinaryFromReader); msg.setDelayTimingInfo(value); break; case 15: var value = new proto.gw.GPSEpochTimingInfo; reader.readMessage(value,proto.gw.GPSEpochTimingInfo.deserializeBinaryFromReader); msg.setGpsEpochTimingInfo(value); break; case 16: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setContext(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.DownlinkTxInfoLegacy} message * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkTxInfoLegacy.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.DownlinkTxInfoLegacy.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkTxInfoLegacy.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getFrequency(); if (f !== 0) { writer.writeUint32( 5, f ); } f = this.getPower(); if (f !== 0) { writer.writeInt32( 6, f ); } f = this.getModulation(); if (f !== 0.0) { writer.writeEnum( 7, f ); } f = this.getLoraModulationInfo(); if (f != null) { writer.writeMessage( 8, f, proto.gw.LoraModulationInfo.serializeBinaryToWriter ); } f = this.getFskModulationInfo(); if (f != null) { writer.writeMessage( 9, f, proto.gw.FskModulationInfo.serializeBinaryToWriter ); } f = this.getBoard(); if (f !== 0) { writer.writeUint32( 10, f ); } f = this.getAntenna(); if (f !== 0) { writer.writeUint32( 11, f ); } f = this.getTiming(); if (f !== 0.0) { writer.writeEnum( 12, f ); } f = this.getImmediatelyTimingInfo(); if (f != null) { writer.writeMessage( 13, f, proto.gw.ImmediatelyTimingInfo.serializeBinaryToWriter ); } f = this.getDelayTimingInfo(); if (f != null) { writer.writeMessage( 14, f, proto.gw.DelayTimingInfo.serializeBinaryToWriter ); } f = this.getGpsEpochTimingInfo(); if (f != null) { writer.writeMessage( 15, f, proto.gw.GPSEpochTimingInfo.serializeBinaryToWriter ); } f = this.getContext_asU8(); if (f.length > 0) { writer.writeBytes( 16, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.DownlinkTxInfoLegacy} The clone. */ proto.gw.DownlinkTxInfoLegacy.prototype.cloneMessage = function() { return /** @type {!proto.gw.DownlinkTxInfoLegacy} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id = 1; * @return {!(string|Uint8Array)} */ proto.gw.DownlinkTxInfoLegacy.prototype.getGatewayId = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id = 1; * This is a type-conversion wrapper around `getGatewayId()` * @return {string} */ proto.gw.DownlinkTxInfoLegacy.prototype.getGatewayId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayId())); }; /** * optional bytes gateway_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayId()` * @return {!Uint8Array} */ proto.gw.DownlinkTxInfoLegacy.prototype.getGatewayId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayId())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional uint32 frequency = 5; * @return {number} */ proto.gw.DownlinkTxInfoLegacy.prototype.getFrequency = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setFrequency = function(value) { jspb.Message.setField(this, 5, value); }; /** * optional int32 power = 6; * @return {number} */ proto.gw.DownlinkTxInfoLegacy.prototype.getPower = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setPower = function(value) { jspb.Message.setField(this, 6, value); }; /** * optional common.Modulation modulation = 7; * @return {!proto.common.Modulation} */ proto.gw.DownlinkTxInfoLegacy.prototype.getModulation = function() { return /** @type {!proto.common.Modulation} */ (jspb.Message.getFieldProto3(this, 7, 0)); }; /** @param {!proto.common.Modulation} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setModulation = function(value) { jspb.Message.setField(this, 7, value); }; /** * optional LoraModulationInfo lora_modulation_info = 8; * @return {proto.gw.LoraModulationInfo} */ proto.gw.DownlinkTxInfoLegacy.prototype.getLoraModulationInfo = function() { return /** @type{proto.gw.LoraModulationInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.LoraModulationInfo, 8)); }; /** @param {proto.gw.LoraModulationInfo|undefined} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setLoraModulationInfo = function(value) { jspb.Message.setOneofWrapperField(this, 8, proto.gw.DownlinkTxInfoLegacy.oneofGroups_[0], value); }; proto.gw.DownlinkTxInfoLegacy.prototype.clearLoraModulationInfo = function() { this.setLoraModulationInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkTxInfoLegacy.prototype.hasLoraModulationInfo = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional FskModulationInfo fsk_modulation_info = 9; * @return {proto.gw.FskModulationInfo} */ proto.gw.DownlinkTxInfoLegacy.prototype.getFskModulationInfo = function() { return /** @type{proto.gw.FskModulationInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.FskModulationInfo, 9)); }; /** @param {proto.gw.FskModulationInfo|undefined} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setFskModulationInfo = function(value) { jspb.Message.setOneofWrapperField(this, 9, proto.gw.DownlinkTxInfoLegacy.oneofGroups_[0], value); }; proto.gw.DownlinkTxInfoLegacy.prototype.clearFskModulationInfo = function() { this.setFskModulationInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkTxInfoLegacy.prototype.hasFskModulationInfo = function() { return jspb.Message.getField(this, 9) != null; }; /** * optional uint32 board = 10; * @return {number} */ proto.gw.DownlinkTxInfoLegacy.prototype.getBoard = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 10, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setBoard = function(value) { jspb.Message.setField(this, 10, value); }; /** * optional uint32 antenna = 11; * @return {number} */ proto.gw.DownlinkTxInfoLegacy.prototype.getAntenna = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 11, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setAntenna = function(value) { jspb.Message.setField(this, 11, value); }; /** * optional DownlinkTiming timing = 12; * @return {!proto.gw.DownlinkTiming} */ proto.gw.DownlinkTxInfoLegacy.prototype.getTiming = function() { return /** @type {!proto.gw.DownlinkTiming} */ (jspb.Message.getFieldProto3(this, 12, 0)); }; /** @param {!proto.gw.DownlinkTiming} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setTiming = function(value) { jspb.Message.setField(this, 12, value); }; /** * optional ImmediatelyTimingInfo immediately_timing_info = 13; * @return {proto.gw.ImmediatelyTimingInfo} */ proto.gw.DownlinkTxInfoLegacy.prototype.getImmediatelyTimingInfo = function() { return /** @type{proto.gw.ImmediatelyTimingInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.ImmediatelyTimingInfo, 13)); }; /** @param {proto.gw.ImmediatelyTimingInfo|undefined} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setImmediatelyTimingInfo = function(value) { jspb.Message.setOneofWrapperField(this, 13, proto.gw.DownlinkTxInfoLegacy.oneofGroups_[1], value); }; proto.gw.DownlinkTxInfoLegacy.prototype.clearImmediatelyTimingInfo = function() { this.setImmediatelyTimingInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkTxInfoLegacy.prototype.hasImmediatelyTimingInfo = function() { return jspb.Message.getField(this, 13) != null; }; /** * optional DelayTimingInfo delay_timing_info = 14; * @return {proto.gw.DelayTimingInfo} */ proto.gw.DownlinkTxInfoLegacy.prototype.getDelayTimingInfo = function() { return /** @type{proto.gw.DelayTimingInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.DelayTimingInfo, 14)); }; /** @param {proto.gw.DelayTimingInfo|undefined} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setDelayTimingInfo = function(value) { jspb.Message.setOneofWrapperField(this, 14, proto.gw.DownlinkTxInfoLegacy.oneofGroups_[1], value); }; proto.gw.DownlinkTxInfoLegacy.prototype.clearDelayTimingInfo = function() { this.setDelayTimingInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkTxInfoLegacy.prototype.hasDelayTimingInfo = function() { return jspb.Message.getField(this, 14) != null; }; /** * optional GPSEpochTimingInfo gps_epoch_timing_info = 15; * @return {proto.gw.GPSEpochTimingInfo} */ proto.gw.DownlinkTxInfoLegacy.prototype.getGpsEpochTimingInfo = function() { return /** @type{proto.gw.GPSEpochTimingInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.GPSEpochTimingInfo, 15)); }; /** @param {proto.gw.GPSEpochTimingInfo|undefined} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setGpsEpochTimingInfo = function(value) { jspb.Message.setOneofWrapperField(this, 15, proto.gw.DownlinkTxInfoLegacy.oneofGroups_[1], value); }; proto.gw.DownlinkTxInfoLegacy.prototype.clearGpsEpochTimingInfo = function() { this.setGpsEpochTimingInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkTxInfoLegacy.prototype.hasGpsEpochTimingInfo = function() { return jspb.Message.getField(this, 15) != null; }; /** * optional bytes context = 16; * @return {!(string|Uint8Array)} */ proto.gw.DownlinkTxInfoLegacy.prototype.getContext = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 16, "")); }; /** * optional bytes context = 16; * This is a type-conversion wrapper around `getContext()` * @return {string} */ proto.gw.DownlinkTxInfoLegacy.prototype.getContext_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getContext())); }; /** * optional bytes context = 16; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getContext()` * @return {!Uint8Array} */ proto.gw.DownlinkTxInfoLegacy.prototype.getContext_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getContext())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.DownlinkTxInfoLegacy.prototype.setContext = function(value) { jspb.Message.setField(this, 16, value); }; /** * 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.gw.DownlinkTxInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.DownlinkTxInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.DownlinkTxInfo.displayName = 'proto.gw.DownlinkTxInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.DownlinkTxInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.DownlinkTxInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.DownlinkTxInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.DownlinkTxInfo.toObject = function(includeInstance, msg) { var f, obj = { frequency: msg.getFrequency(), power: msg.getPower(), modulation: (f = msg.getModulation()) && proto.gw.Modulation.toObject(includeInstance, f), board: msg.getBoard(), antenna: msg.getAntenna(), timing: (f = msg.getTiming()) && proto.gw.Timing.toObject(includeInstance, f), context: msg.getContext_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.DownlinkTxInfo} */ proto.gw.DownlinkTxInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.DownlinkTxInfo; return proto.gw.DownlinkTxInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.DownlinkTxInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.DownlinkTxInfo} */ proto.gw.DownlinkTxInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setFrequency(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setPower(value); break; case 3: var value = new proto.gw.Modulation; reader.readMessage(value,proto.gw.Modulation.deserializeBinaryFromReader); msg.setModulation(value); break; case 4: var value = /** @type {number} */ (reader.readUint32()); msg.setBoard(value); break; case 5: var value = /** @type {number} */ (reader.readUint32()); msg.setAntenna(value); break; case 6: var value = new proto.gw.Timing; reader.readMessage(value,proto.gw.Timing.deserializeBinaryFromReader); msg.setTiming(value); break; case 7: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setContext(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.DownlinkTxInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkTxInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.DownlinkTxInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkTxInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getFrequency(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getPower(); if (f !== 0) { writer.writeInt32( 2, f ); } f = this.getModulation(); if (f != null) { writer.writeMessage( 3, f, proto.gw.Modulation.serializeBinaryToWriter ); } f = this.getBoard(); if (f !== 0) { writer.writeUint32( 4, f ); } f = this.getAntenna(); if (f !== 0) { writer.writeUint32( 5, f ); } f = this.getTiming(); if (f != null) { writer.writeMessage( 6, f, proto.gw.Timing.serializeBinaryToWriter ); } f = this.getContext_asU8(); if (f.length > 0) { writer.writeBytes( 7, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.DownlinkTxInfo} The clone. */ proto.gw.DownlinkTxInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.DownlinkTxInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 frequency = 1; * @return {number} */ proto.gw.DownlinkTxInfo.prototype.getFrequency = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxInfo.prototype.setFrequency = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional int32 power = 2; * @return {number} */ proto.gw.DownlinkTxInfo.prototype.getPower = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxInfo.prototype.setPower = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional Modulation modulation = 3; * @return {proto.gw.Modulation} */ proto.gw.DownlinkTxInfo.prototype.getModulation = function() { return /** @type{proto.gw.Modulation} */ ( jspb.Message.getWrapperField(this, proto.gw.Modulation, 3)); }; /** @param {proto.gw.Modulation|undefined} value */ proto.gw.DownlinkTxInfo.prototype.setModulation = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.gw.DownlinkTxInfo.prototype.clearModulation = function() { this.setModulation(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkTxInfo.prototype.hasModulation = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional uint32 board = 4; * @return {number} */ proto.gw.DownlinkTxInfo.prototype.getBoard = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxInfo.prototype.setBoard = function(value) { jspb.Message.setField(this, 4, value); }; /** * optional uint32 antenna = 5; * @return {number} */ proto.gw.DownlinkTxInfo.prototype.getAntenna = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxInfo.prototype.setAntenna = function(value) { jspb.Message.setField(this, 5, value); }; /** * optional Timing timing = 6; * @return {proto.gw.Timing} */ proto.gw.DownlinkTxInfo.prototype.getTiming = function() { return /** @type{proto.gw.Timing} */ ( jspb.Message.getWrapperField(this, proto.gw.Timing, 6)); }; /** @param {proto.gw.Timing|undefined} value */ proto.gw.DownlinkTxInfo.prototype.setTiming = function(value) { jspb.Message.setWrapperField(this, 6, value); }; proto.gw.DownlinkTxInfo.prototype.clearTiming = function() { this.setTiming(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkTxInfo.prototype.hasTiming = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional bytes context = 7; * @return {!(string|Uint8Array)} */ proto.gw.DownlinkTxInfo.prototype.getContext = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 7, "")); }; /** * optional bytes context = 7; * This is a type-conversion wrapper around `getContext()` * @return {string} */ proto.gw.DownlinkTxInfo.prototype.getContext_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getContext())); }; /** * optional bytes context = 7; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getContext()` * @return {!Uint8Array} */ proto.gw.DownlinkTxInfo.prototype.getContext_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getContext())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.DownlinkTxInfo.prototype.setContext = function(value) { jspb.Message.setField(this, 7, value); }; /** * 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.gw.Timing = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gw.Timing.oneofGroups_); }; goog.inherits(proto.gw.Timing, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.Timing.displayName = 'proto.gw.Timing'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.gw.Timing.oneofGroups_ = [[1,2,3]]; /** * @enum {number} */ proto.gw.Timing.ParametersCase = { PARAMETERS_NOT_SET: 0, IMMEDIATELY: 1, DELAY: 2, GPS_EPOCH: 3 }; /** * @return {proto.gw.Timing.ParametersCase} */ proto.gw.Timing.prototype.getParametersCase = function() { return /** @type {proto.gw.Timing.ParametersCase} */(jspb.Message.computeOneofCase(this, proto.gw.Timing.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.Timing.prototype.toObject = function(opt_includeInstance) { return proto.gw.Timing.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.Timing} msg The msg instance to transform. * @return {!Object} */ proto.gw.Timing.toObject = function(includeInstance, msg) { var f, obj = { immediately: (f = msg.getImmediately()) && proto.gw.ImmediatelyTimingInfo.toObject(includeInstance, f), delay: (f = msg.getDelay()) && proto.gw.DelayTimingInfo.toObject(includeInstance, f), gpsEpoch: (f = msg.getGpsEpoch()) && proto.gw.GPSEpochTimingInfo.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.Timing} */ proto.gw.Timing.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.Timing; return proto.gw.Timing.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.Timing} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.Timing} */ proto.gw.Timing.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.gw.ImmediatelyTimingInfo; reader.readMessage(value,proto.gw.ImmediatelyTimingInfo.deserializeBinaryFromReader); msg.setImmediately(value); break; case 2: var value = new proto.gw.DelayTimingInfo; reader.readMessage(value,proto.gw.DelayTimingInfo.deserializeBinaryFromReader); msg.setDelay(value); break; case 3: var value = new proto.gw.GPSEpochTimingInfo; reader.readMessage(value,proto.gw.GPSEpochTimingInfo.deserializeBinaryFromReader); msg.setGpsEpoch(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.Timing} message * @param {!jspb.BinaryWriter} writer */ proto.gw.Timing.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.Timing.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.Timing.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getImmediately(); if (f != null) { writer.writeMessage( 1, f, proto.gw.ImmediatelyTimingInfo.serializeBinaryToWriter ); } f = this.getDelay(); if (f != null) { writer.writeMessage( 2, f, proto.gw.DelayTimingInfo.serializeBinaryToWriter ); } f = this.getGpsEpoch(); if (f != null) { writer.writeMessage( 3, f, proto.gw.GPSEpochTimingInfo.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.Timing} The clone. */ proto.gw.Timing.prototype.cloneMessage = function() { return /** @type {!proto.gw.Timing} */ (jspb.Message.cloneMessage(this)); }; /** * optional ImmediatelyTimingInfo immediately = 1; * @return {proto.gw.ImmediatelyTimingInfo} */ proto.gw.Timing.prototype.getImmediately = function() { return /** @type{proto.gw.ImmediatelyTimingInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.ImmediatelyTimingInfo, 1)); }; /** @param {proto.gw.ImmediatelyTimingInfo|undefined} value */ proto.gw.Timing.prototype.setImmediately = function(value) { jspb.Message.setOneofWrapperField(this, 1, proto.gw.Timing.oneofGroups_[0], value); }; proto.gw.Timing.prototype.clearImmediately = function() { this.setImmediately(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.Timing.prototype.hasImmediately = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional DelayTimingInfo delay = 2; * @return {proto.gw.DelayTimingInfo} */ proto.gw.Timing.prototype.getDelay = function() { return /** @type{proto.gw.DelayTimingInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.DelayTimingInfo, 2)); }; /** @param {proto.gw.DelayTimingInfo|undefined} value */ proto.gw.Timing.prototype.setDelay = function(value) { jspb.Message.setOneofWrapperField(this, 2, proto.gw.Timing.oneofGroups_[0], value); }; proto.gw.Timing.prototype.clearDelay = function() { this.setDelay(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.Timing.prototype.hasDelay = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional GPSEpochTimingInfo gps_epoch = 3; * @return {proto.gw.GPSEpochTimingInfo} */ proto.gw.Timing.prototype.getGpsEpoch = function() { return /** @type{proto.gw.GPSEpochTimingInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.GPSEpochTimingInfo, 3)); }; /** @param {proto.gw.GPSEpochTimingInfo|undefined} value */ proto.gw.Timing.prototype.setGpsEpoch = function(value) { jspb.Message.setOneofWrapperField(this, 3, proto.gw.Timing.oneofGroups_[0], value); }; proto.gw.Timing.prototype.clearGpsEpoch = function() { this.setGpsEpoch(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.Timing.prototype.hasGpsEpoch = function() { return jspb.Message.getField(this, 3) != null; }; /** * 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.gw.ImmediatelyTimingInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.ImmediatelyTimingInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.ImmediatelyTimingInfo.displayName = 'proto.gw.ImmediatelyTimingInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.ImmediatelyTimingInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.ImmediatelyTimingInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.ImmediatelyTimingInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.ImmediatelyTimingInfo.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.ImmediatelyTimingInfo} */ proto.gw.ImmediatelyTimingInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.ImmediatelyTimingInfo; return proto.gw.ImmediatelyTimingInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.ImmediatelyTimingInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.ImmediatelyTimingInfo} */ proto.gw.ImmediatelyTimingInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.ImmediatelyTimingInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.ImmediatelyTimingInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.ImmediatelyTimingInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.ImmediatelyTimingInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.ImmediatelyTimingInfo} The clone. */ proto.gw.ImmediatelyTimingInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.ImmediatelyTimingInfo} */ (jspb.Message.cloneMessage(this)); }; /** * 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.gw.DelayTimingInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.DelayTimingInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.DelayTimingInfo.displayName = 'proto.gw.DelayTimingInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.DelayTimingInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.DelayTimingInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.DelayTimingInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.DelayTimingInfo.toObject = function(includeInstance, msg) { var f, obj = { delay: (f = msg.getDelay()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.DelayTimingInfo} */ proto.gw.DelayTimingInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.DelayTimingInfo; return proto.gw.DelayTimingInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.DelayTimingInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.DelayTimingInfo} */ proto.gw.DelayTimingInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setDelay(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.DelayTimingInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.DelayTimingInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.DelayTimingInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.DelayTimingInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getDelay(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.DelayTimingInfo} The clone. */ proto.gw.DelayTimingInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.DelayTimingInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional google.protobuf.Duration delay = 1; * @return {proto.google.protobuf.Duration} */ proto.gw.DelayTimingInfo.prototype.getDelay = function() { return /** @type{proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1)); }; /** @param {proto.google.protobuf.Duration|undefined} value */ proto.gw.DelayTimingInfo.prototype.setDelay = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.gw.DelayTimingInfo.prototype.clearDelay = function() { this.setDelay(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DelayTimingInfo.prototype.hasDelay = function() { return jspb.Message.getField(this, 1) != null; }; /** * 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.gw.GPSEpochTimingInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.GPSEpochTimingInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.GPSEpochTimingInfo.displayName = 'proto.gw.GPSEpochTimingInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.GPSEpochTimingInfo.prototype.toObject = function(opt_includeInstance) { return proto.gw.GPSEpochTimingInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.GPSEpochTimingInfo} msg The msg instance to transform. * @return {!Object} */ proto.gw.GPSEpochTimingInfo.toObject = function(includeInstance, msg) { var f, obj = { timeSinceGpsEpoch: (f = msg.getTimeSinceGpsEpoch()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.GPSEpochTimingInfo} */ proto.gw.GPSEpochTimingInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.GPSEpochTimingInfo; return proto.gw.GPSEpochTimingInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.GPSEpochTimingInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.GPSEpochTimingInfo} */ proto.gw.GPSEpochTimingInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setTimeSinceGpsEpoch(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.GPSEpochTimingInfo} message * @param {!jspb.BinaryWriter} writer */ proto.gw.GPSEpochTimingInfo.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.GPSEpochTimingInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.GPSEpochTimingInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getTimeSinceGpsEpoch(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.GPSEpochTimingInfo} The clone. */ proto.gw.GPSEpochTimingInfo.prototype.cloneMessage = function() { return /** @type {!proto.gw.GPSEpochTimingInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional google.protobuf.Duration time_since_gps_epoch = 1; * @return {proto.google.protobuf.Duration} */ proto.gw.GPSEpochTimingInfo.prototype.getTimeSinceGpsEpoch = function() { return /** @type{proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1)); }; /** @param {proto.google.protobuf.Duration|undefined} value */ proto.gw.GPSEpochTimingInfo.prototype.setTimeSinceGpsEpoch = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.gw.GPSEpochTimingInfo.prototype.clearTimeSinceGpsEpoch = function() { this.setTimeSinceGpsEpoch(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.GPSEpochTimingInfo.prototype.hasTimeSinceGpsEpoch = function() { return jspb.Message.getField(this, 1) != null; }; /** * 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.gw.UplinkFrame = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.UplinkFrame, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.UplinkFrame.displayName = 'proto.gw.UplinkFrame'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.UplinkFrame.prototype.toObject = function(opt_includeInstance) { return proto.gw.UplinkFrame.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.UplinkFrame} msg The msg instance to transform. * @return {!Object} */ proto.gw.UplinkFrame.toObject = function(includeInstance, msg) { var f, obj = { phyPayload: msg.getPhyPayload_asB64(), txInfoLegacy: (f = msg.getTxInfoLegacy()) && proto.gw.UplinkTxInfoLegacy.toObject(includeInstance, f), rxInfoLegacy: (f = msg.getRxInfoLegacy()) && proto.gw.UplinkRxInfoLegacy.toObject(includeInstance, f), txInfo: (f = msg.getTxInfo()) && proto.gw.UplinkTxInfo.toObject(includeInstance, f), rxInfo: (f = msg.getRxInfo()) && proto.gw.UplinkRxInfo.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.UplinkFrame} */ proto.gw.UplinkFrame.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.UplinkFrame; return proto.gw.UplinkFrame.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.UplinkFrame} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.UplinkFrame} */ proto.gw.UplinkFrame.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 proto.gw.UplinkTxInfoLegacy; reader.readMessage(value,proto.gw.UplinkTxInfoLegacy.deserializeBinaryFromReader); msg.setTxInfoLegacy(value); break; case 3: var value = new proto.gw.UplinkRxInfoLegacy; reader.readMessage(value,proto.gw.UplinkRxInfoLegacy.deserializeBinaryFromReader); msg.setRxInfoLegacy(value); break; case 4: var value = new proto.gw.UplinkTxInfo; reader.readMessage(value,proto.gw.UplinkTxInfo.deserializeBinaryFromReader); msg.setTxInfo(value); break; case 5: var value = new proto.gw.UplinkRxInfo; reader.readMessage(value,proto.gw.UplinkRxInfo.deserializeBinaryFromReader); msg.setRxInfo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.UplinkFrame} message * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkFrame.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.UplinkFrame.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkFrame.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getPhyPayload_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getTxInfoLegacy(); if (f != null) { writer.writeMessage( 2, f, proto.gw.UplinkTxInfoLegacy.serializeBinaryToWriter ); } f = this.getRxInfoLegacy(); if (f != null) { writer.writeMessage( 3, f, proto.gw.UplinkRxInfoLegacy.serializeBinaryToWriter ); } f = this.getTxInfo(); if (f != null) { writer.writeMessage( 4, f, proto.gw.UplinkTxInfo.serializeBinaryToWriter ); } f = this.getRxInfo(); if (f != null) { writer.writeMessage( 5, f, proto.gw.UplinkRxInfo.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.UplinkFrame} The clone. */ proto.gw.UplinkFrame.prototype.cloneMessage = function() { return /** @type {!proto.gw.UplinkFrame} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes phy_payload = 1; * @return {!(string|Uint8Array)} */ proto.gw.UplinkFrame.prototype.getPhyPayload = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes phy_payload = 1; * This is a type-conversion wrapper around `getPhyPayload()` * @return {string} */ proto.gw.UplinkFrame.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.gw.UplinkFrame.prototype.getPhyPayload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPhyPayload())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.UplinkFrame.prototype.setPhyPayload = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional UplinkTxInfoLegacy tx_info_legacy = 2; * @return {proto.gw.UplinkTxInfoLegacy} */ proto.gw.UplinkFrame.prototype.getTxInfoLegacy = function() { return /** @type{proto.gw.UplinkTxInfoLegacy} */ ( jspb.Message.getWrapperField(this, proto.gw.UplinkTxInfoLegacy, 2)); }; /** @param {proto.gw.UplinkTxInfoLegacy|undefined} value */ proto.gw.UplinkFrame.prototype.setTxInfoLegacy = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.gw.UplinkFrame.prototype.clearTxInfoLegacy = function() { this.setTxInfoLegacy(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkFrame.prototype.hasTxInfoLegacy = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional UplinkRxInfoLegacy rx_info_legacy = 3; * @return {proto.gw.UplinkRxInfoLegacy} */ proto.gw.UplinkFrame.prototype.getRxInfoLegacy = function() { return /** @type{proto.gw.UplinkRxInfoLegacy} */ ( jspb.Message.getWrapperField(this, proto.gw.UplinkRxInfoLegacy, 3)); }; /** @param {proto.gw.UplinkRxInfoLegacy|undefined} value */ proto.gw.UplinkFrame.prototype.setRxInfoLegacy = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.gw.UplinkFrame.prototype.clearRxInfoLegacy = function() { this.setRxInfoLegacy(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkFrame.prototype.hasRxInfoLegacy = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional UplinkTxInfo tx_info = 4; * @return {proto.gw.UplinkTxInfo} */ proto.gw.UplinkFrame.prototype.getTxInfo = function() { return /** @type{proto.gw.UplinkTxInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.UplinkTxInfo, 4)); }; /** @param {proto.gw.UplinkTxInfo|undefined} value */ proto.gw.UplinkFrame.prototype.setTxInfo = function(value) { jspb.Message.setWrapperField(this, 4, value); }; proto.gw.UplinkFrame.prototype.clearTxInfo = function() { this.setTxInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkFrame.prototype.hasTxInfo = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional UplinkRxInfo rx_info = 5; * @return {proto.gw.UplinkRxInfo} */ proto.gw.UplinkFrame.prototype.getRxInfo = function() { return /** @type{proto.gw.UplinkRxInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.UplinkRxInfo, 5)); }; /** @param {proto.gw.UplinkRxInfo|undefined} value */ proto.gw.UplinkFrame.prototype.setRxInfo = function(value) { jspb.Message.setWrapperField(this, 5, value); }; proto.gw.UplinkFrame.prototype.clearRxInfo = function() { this.setRxInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkFrame.prototype.hasRxInfo = function() { return jspb.Message.getField(this, 5) != null; }; /** * 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.gw.UplinkFrameSet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.gw.UplinkFrameSet.repeatedFields_, null); }; goog.inherits(proto.gw.UplinkFrameSet, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.UplinkFrameSet.displayName = 'proto.gw.UplinkFrameSet'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.gw.UplinkFrameSet.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.UplinkFrameSet.prototype.toObject = function(opt_includeInstance) { return proto.gw.UplinkFrameSet.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.UplinkFrameSet} msg The msg instance to transform. * @return {!Object} */ proto.gw.UplinkFrameSet.toObject = function(includeInstance, msg) { var f, obj = { phyPayload: msg.getPhyPayload_asB64(), txInfo: (f = msg.getTxInfo()) && proto.gw.UplinkTxInfo.toObject(includeInstance, f), rxInfoList: jspb.Message.toObjectList(msg.getRxInfoList(), proto.gw.UplinkRxInfo.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.UplinkFrameSet} */ proto.gw.UplinkFrameSet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.UplinkFrameSet; return proto.gw.UplinkFrameSet.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.UplinkFrameSet} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.UplinkFrameSet} */ proto.gw.UplinkFrameSet.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 proto.gw.UplinkTxInfo; reader.readMessage(value,proto.gw.UplinkTxInfo.deserializeBinaryFromReader); msg.setTxInfo(value); break; case 3: var value = new proto.gw.UplinkRxInfo; reader.readMessage(value,proto.gw.UplinkRxInfo.deserializeBinaryFromReader); msg.getRxInfoList().push(value); msg.setRxInfoList(msg.getRxInfoList()); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.UplinkFrameSet} message * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkFrameSet.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.UplinkFrameSet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.UplinkFrameSet.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getPhyPayload_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getTxInfo(); if (f != null) { writer.writeMessage( 2, f, proto.gw.UplinkTxInfo.serializeBinaryToWriter ); } f = this.getRxInfoList(); if (f.length > 0) { writer.writeRepeatedMessage( 3, f, proto.gw.UplinkRxInfo.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.UplinkFrameSet} The clone. */ proto.gw.UplinkFrameSet.prototype.cloneMessage = function() { return /** @type {!proto.gw.UplinkFrameSet} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes phy_payload = 1; * @return {!(string|Uint8Array)} */ proto.gw.UplinkFrameSet.prototype.getPhyPayload = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes phy_payload = 1; * This is a type-conversion wrapper around `getPhyPayload()` * @return {string} */ proto.gw.UplinkFrameSet.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.gw.UplinkFrameSet.prototype.getPhyPayload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPhyPayload())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.UplinkFrameSet.prototype.setPhyPayload = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional UplinkTxInfo tx_info = 2; * @return {proto.gw.UplinkTxInfo} */ proto.gw.UplinkFrameSet.prototype.getTxInfo = function() { return /** @type{proto.gw.UplinkTxInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.UplinkTxInfo, 2)); }; /** @param {proto.gw.UplinkTxInfo|undefined} value */ proto.gw.UplinkFrameSet.prototype.setTxInfo = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.gw.UplinkFrameSet.prototype.clearTxInfo = function() { this.setTxInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.UplinkFrameSet.prototype.hasTxInfo = function() { return jspb.Message.getField(this, 2) != null; }; /** * repeated 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.UplinkFrameSet.prototype.getRxInfoList = function() { return /** @type{!Array.} */ ( jspb.Message.getRepeatedWrapperField(this, proto.gw.UplinkRxInfo, 3)); }; /** @param {Array.} value */ proto.gw.UplinkFrameSet.prototype.setRxInfoList = function(value) { jspb.Message.setRepeatedWrapperField(this, 3, value); }; proto.gw.UplinkFrameSet.prototype.clearRxInfoList = function() { this.setRxInfoList([]); }; /** * 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.gw.DownlinkFrame = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.gw.DownlinkFrame.repeatedFields_, null); }; goog.inherits(proto.gw.DownlinkFrame, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.DownlinkFrame.displayName = 'proto.gw.DownlinkFrame'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.gw.DownlinkFrame.repeatedFields_ = [5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.DownlinkFrame.prototype.toObject = function(opt_includeInstance) { return proto.gw.DownlinkFrame.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.DownlinkFrame} msg The msg instance to transform. * @return {!Object} */ proto.gw.DownlinkFrame.toObject = function(includeInstance, msg) { var f, obj = { downlinkId: msg.getDownlinkId(), downlinkIdLegacy: msg.getDownlinkIdLegacy_asB64(), itemsList: jspb.Message.toObjectList(msg.getItemsList(), proto.gw.DownlinkFrameItem.toObject, includeInstance), gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.DownlinkFrame} */ proto.gw.DownlinkFrame.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.DownlinkFrame; return proto.gw.DownlinkFrame.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.DownlinkFrame} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.DownlinkFrame} */ proto.gw.DownlinkFrame.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 3: var value = /** @type {number} */ (reader.readUint32()); msg.setDownlinkId(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setDownlinkIdLegacy(value); break; case 5: var value = new proto.gw.DownlinkFrameItem; reader.readMessage(value,proto.gw.DownlinkFrameItem.deserializeBinaryFromReader); msg.getItemsList().push(value); msg.setItemsList(msg.getItemsList()); break; case 6: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setGatewayIdLegacy(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.DownlinkFrame} message * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkFrame.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.DownlinkFrame.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkFrame.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getDownlinkId(); if (f !== 0) { writer.writeUint32( 3, f ); } f = this.getDownlinkIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 4, f ); } f = this.getItemsList(); if (f.length > 0) { writer.writeRepeatedMessage( 5, f, proto.gw.DownlinkFrameItem.serializeBinaryToWriter ); } f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 6, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 7, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.DownlinkFrame} The clone. */ proto.gw.DownlinkFrame.prototype.cloneMessage = function() { return /** @type {!proto.gw.DownlinkFrame} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 downlink_id = 3; * @return {number} */ proto.gw.DownlinkFrame.prototype.getDownlinkId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); }; /** @param {number} value */ proto.gw.DownlinkFrame.prototype.setDownlinkId = function(value) { jspb.Message.setField(this, 3, value); }; /** * optional bytes downlink_id_legacy = 4; * @return {!(string|Uint8Array)} */ proto.gw.DownlinkFrame.prototype.getDownlinkIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** * optional bytes downlink_id_legacy = 4; * This is a type-conversion wrapper around `getDownlinkIdLegacy()` * @return {string} */ proto.gw.DownlinkFrame.prototype.getDownlinkIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getDownlinkIdLegacy())); }; /** * optional bytes downlink_id_legacy = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getDownlinkIdLegacy()` * @return {!Uint8Array} */ proto.gw.DownlinkFrame.prototype.getDownlinkIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getDownlinkIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.DownlinkFrame.prototype.setDownlinkIdLegacy = function(value) { jspb.Message.setField(this, 4, value); }; /** * repeated DownlinkFrameItem items = 5; * 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.DownlinkFrame.prototype.getItemsList = function() { return /** @type{!Array.} */ ( jspb.Message.getRepeatedWrapperField(this, proto.gw.DownlinkFrameItem, 5)); }; /** @param {Array.} value */ proto.gw.DownlinkFrame.prototype.setItemsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 5, value); }; proto.gw.DownlinkFrame.prototype.clearItemsList = function() { this.setItemsList([]); }; /** * optional bytes gateway_id_legacy = 6; * @return {!(string|Uint8Array)} */ proto.gw.DownlinkFrame.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 6, "")); }; /** * optional bytes gateway_id_legacy = 6; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.DownlinkFrame.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 6; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.DownlinkFrame.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.DownlinkFrame.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 6, value); }; /** * optional string gateway_id = 7; * @return {string} */ proto.gw.DownlinkFrame.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, "")); }; /** @param {string} value */ proto.gw.DownlinkFrame.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 7, value); }; /** * 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.gw.DownlinkFrameItem = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.DownlinkFrameItem, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.DownlinkFrameItem.displayName = 'proto.gw.DownlinkFrameItem'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.DownlinkFrameItem.prototype.toObject = function(opt_includeInstance) { return proto.gw.DownlinkFrameItem.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.DownlinkFrameItem} msg The msg instance to transform. * @return {!Object} */ proto.gw.DownlinkFrameItem.toObject = function(includeInstance, msg) { var f, obj = { phyPayload: msg.getPhyPayload_asB64(), txInfoLegacy: (f = msg.getTxInfoLegacy()) && proto.gw.DownlinkTxInfoLegacy.toObject(includeInstance, f), txInfo: (f = msg.getTxInfo()) && proto.gw.DownlinkTxInfo.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.DownlinkFrameItem} */ proto.gw.DownlinkFrameItem.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.DownlinkFrameItem; return proto.gw.DownlinkFrameItem.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.DownlinkFrameItem} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.DownlinkFrameItem} */ proto.gw.DownlinkFrameItem.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 proto.gw.DownlinkTxInfoLegacy; reader.readMessage(value,proto.gw.DownlinkTxInfoLegacy.deserializeBinaryFromReader); msg.setTxInfoLegacy(value); break; case 3: var value = new proto.gw.DownlinkTxInfo; reader.readMessage(value,proto.gw.DownlinkTxInfo.deserializeBinaryFromReader); msg.setTxInfo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.DownlinkFrameItem} message * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkFrameItem.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.DownlinkFrameItem.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkFrameItem.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getPhyPayload_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getTxInfoLegacy(); if (f != null) { writer.writeMessage( 2, f, proto.gw.DownlinkTxInfoLegacy.serializeBinaryToWriter ); } f = this.getTxInfo(); if (f != null) { writer.writeMessage( 3, f, proto.gw.DownlinkTxInfo.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.DownlinkFrameItem} The clone. */ proto.gw.DownlinkFrameItem.prototype.cloneMessage = function() { return /** @type {!proto.gw.DownlinkFrameItem} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes phy_payload = 1; * @return {!(string|Uint8Array)} */ proto.gw.DownlinkFrameItem.prototype.getPhyPayload = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes phy_payload = 1; * This is a type-conversion wrapper around `getPhyPayload()` * @return {string} */ proto.gw.DownlinkFrameItem.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.gw.DownlinkFrameItem.prototype.getPhyPayload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPhyPayload())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.DownlinkFrameItem.prototype.setPhyPayload = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional DownlinkTxInfoLegacy tx_info_legacy = 2; * @return {proto.gw.DownlinkTxInfoLegacy} */ proto.gw.DownlinkFrameItem.prototype.getTxInfoLegacy = function() { return /** @type{proto.gw.DownlinkTxInfoLegacy} */ ( jspb.Message.getWrapperField(this, proto.gw.DownlinkTxInfoLegacy, 2)); }; /** @param {proto.gw.DownlinkTxInfoLegacy|undefined} value */ proto.gw.DownlinkFrameItem.prototype.setTxInfoLegacy = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.gw.DownlinkFrameItem.prototype.clearTxInfoLegacy = function() { this.setTxInfoLegacy(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkFrameItem.prototype.hasTxInfoLegacy = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional DownlinkTxInfo tx_info = 3; * @return {proto.gw.DownlinkTxInfo} */ proto.gw.DownlinkFrameItem.prototype.getTxInfo = function() { return /** @type{proto.gw.DownlinkTxInfo} */ ( jspb.Message.getWrapperField(this, proto.gw.DownlinkTxInfo, 3)); }; /** @param {proto.gw.DownlinkTxInfo|undefined} value */ proto.gw.DownlinkFrameItem.prototype.setTxInfo = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.gw.DownlinkFrameItem.prototype.clearTxInfo = function() { this.setTxInfo(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.DownlinkFrameItem.prototype.hasTxInfo = function() { return jspb.Message.getField(this, 3) != null; }; /** * 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.gw.DownlinkTxAck = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.gw.DownlinkTxAck.repeatedFields_, null); }; goog.inherits(proto.gw.DownlinkTxAck, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.DownlinkTxAck.displayName = 'proto.gw.DownlinkTxAck'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.gw.DownlinkTxAck.repeatedFields_ = [5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.DownlinkTxAck.prototype.toObject = function(opt_includeInstance) { return proto.gw.DownlinkTxAck.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.DownlinkTxAck} msg The msg instance to transform. * @return {!Object} */ proto.gw.DownlinkTxAck.toObject = function(includeInstance, msg) { var f, obj = { gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId(), downlinkId: msg.getDownlinkId(), downlinkIdLegacy: msg.getDownlinkIdLegacy_asB64(), itemsList: jspb.Message.toObjectList(msg.getItemsList(), proto.gw.DownlinkTxAckItem.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.DownlinkTxAck} */ proto.gw.DownlinkTxAck.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.DownlinkTxAck; return proto.gw.DownlinkTxAck.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.DownlinkTxAck} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.DownlinkTxAck} */ proto.gw.DownlinkTxAck.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.setGatewayIdLegacy(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setDownlinkId(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setDownlinkIdLegacy(value); break; case 5: var value = new proto.gw.DownlinkTxAckItem; reader.readMessage(value,proto.gw.DownlinkTxAckItem.deserializeBinaryFromReader); msg.getItemsList().push(value); msg.setItemsList(msg.getItemsList()); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.DownlinkTxAck} message * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkTxAck.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.DownlinkTxAck.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkTxAck.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 6, f ); } f = this.getDownlinkId(); if (f !== 0) { writer.writeUint32( 2, f ); } f = this.getDownlinkIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 4, f ); } f = this.getItemsList(); if (f.length > 0) { writer.writeRepeatedMessage( 5, f, proto.gw.DownlinkTxAckItem.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.DownlinkTxAck} The clone. */ proto.gw.DownlinkTxAck.prototype.cloneMessage = function() { return /** @type {!proto.gw.DownlinkTxAck} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id_legacy = 1; * @return {!(string|Uint8Array)} */ proto.gw.DownlinkTxAck.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id_legacy = 1; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.DownlinkTxAck.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.DownlinkTxAck.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.DownlinkTxAck.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string gateway_id = 6; * @return {string} */ proto.gw.DownlinkTxAck.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, "")); }; /** @param {string} value */ proto.gw.DownlinkTxAck.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 6, value); }; /** * optional uint32 downlink_id = 2; * @return {number} */ proto.gw.DownlinkTxAck.prototype.getDownlinkId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.gw.DownlinkTxAck.prototype.setDownlinkId = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional bytes downlink_id_legacy = 4; * @return {!(string|Uint8Array)} */ proto.gw.DownlinkTxAck.prototype.getDownlinkIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** * optional bytes downlink_id_legacy = 4; * This is a type-conversion wrapper around `getDownlinkIdLegacy()` * @return {string} */ proto.gw.DownlinkTxAck.prototype.getDownlinkIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getDownlinkIdLegacy())); }; /** * optional bytes downlink_id_legacy = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getDownlinkIdLegacy()` * @return {!Uint8Array} */ proto.gw.DownlinkTxAck.prototype.getDownlinkIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getDownlinkIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.DownlinkTxAck.prototype.setDownlinkIdLegacy = function(value) { jspb.Message.setField(this, 4, value); }; /** * repeated DownlinkTxAckItem items = 5; * 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.DownlinkTxAck.prototype.getItemsList = function() { return /** @type{!Array.} */ ( jspb.Message.getRepeatedWrapperField(this, proto.gw.DownlinkTxAckItem, 5)); }; /** @param {Array.} value */ proto.gw.DownlinkTxAck.prototype.setItemsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 5, value); }; proto.gw.DownlinkTxAck.prototype.clearItemsList = function() { this.setItemsList([]); }; /** * 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.gw.DownlinkTxAckItem = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.DownlinkTxAckItem, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.DownlinkTxAckItem.displayName = 'proto.gw.DownlinkTxAckItem'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.DownlinkTxAckItem.prototype.toObject = function(opt_includeInstance) { return proto.gw.DownlinkTxAckItem.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.DownlinkTxAckItem} msg The msg instance to transform. * @return {!Object} */ proto.gw.DownlinkTxAckItem.toObject = function(includeInstance, msg) { var f, obj = { status: msg.getStatus() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.DownlinkTxAckItem} */ proto.gw.DownlinkTxAckItem.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.DownlinkTxAckItem; return proto.gw.DownlinkTxAckItem.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.DownlinkTxAckItem} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.DownlinkTxAckItem} */ proto.gw.DownlinkTxAckItem.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.gw.TxAckStatus} */ (reader.readEnum()); msg.setStatus(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.DownlinkTxAckItem} message * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkTxAckItem.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.DownlinkTxAckItem.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.DownlinkTxAckItem.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getStatus(); if (f !== 0.0) { writer.writeEnum( 1, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.DownlinkTxAckItem} The clone. */ proto.gw.DownlinkTxAckItem.prototype.cloneMessage = function() { return /** @type {!proto.gw.DownlinkTxAckItem} */ (jspb.Message.cloneMessage(this)); }; /** * optional TxAckStatus status = 1; * @return {!proto.gw.TxAckStatus} */ proto.gw.DownlinkTxAckItem.prototype.getStatus = function() { return /** @type {!proto.gw.TxAckStatus} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {!proto.gw.TxAckStatus} value */ proto.gw.DownlinkTxAckItem.prototype.setStatus = function(value) { jspb.Message.setField(this, 1, value); }; /** * 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.gw.GatewayConfiguration = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.gw.GatewayConfiguration.repeatedFields_, null); }; goog.inherits(proto.gw.GatewayConfiguration, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.GatewayConfiguration.displayName = 'proto.gw.GatewayConfiguration'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.gw.GatewayConfiguration.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.GatewayConfiguration.prototype.toObject = function(opt_includeInstance) { return proto.gw.GatewayConfiguration.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.GatewayConfiguration} msg The msg instance to transform. * @return {!Object} */ proto.gw.GatewayConfiguration.toObject = function(includeInstance, msg) { var f, obj = { gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId(), version: msg.getVersion(), channelsList: jspb.Message.toObjectList(msg.getChannelsList(), proto.gw.ChannelConfiguration.toObject, includeInstance), statsInterval: (f = msg.getStatsInterval()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.GatewayConfiguration} */ proto.gw.GatewayConfiguration.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.GatewayConfiguration; return proto.gw.GatewayConfiguration.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.GatewayConfiguration} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.GatewayConfiguration} */ proto.gw.GatewayConfiguration.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.setGatewayIdLegacy(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setVersion(value); break; case 3: var value = new proto.gw.ChannelConfiguration; reader.readMessage(value,proto.gw.ChannelConfiguration.deserializeBinaryFromReader); msg.getChannelsList().push(value); msg.setChannelsList(msg.getChannelsList()); break; case 4: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setStatsInterval(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.GatewayConfiguration} message * @param {!jspb.BinaryWriter} writer */ proto.gw.GatewayConfiguration.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.GatewayConfiguration.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.GatewayConfiguration.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 5, f ); } f = this.getVersion(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getChannelsList(); if (f.length > 0) { writer.writeRepeatedMessage( 3, f, proto.gw.ChannelConfiguration.serializeBinaryToWriter ); } f = this.getStatsInterval(); if (f != null) { writer.writeMessage( 4, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.GatewayConfiguration} The clone. */ proto.gw.GatewayConfiguration.prototype.cloneMessage = function() { return /** @type {!proto.gw.GatewayConfiguration} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id_legacy = 1; * @return {!(string|Uint8Array)} */ proto.gw.GatewayConfiguration.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id_legacy = 1; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.GatewayConfiguration.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.GatewayConfiguration.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayConfiguration.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string gateway_id = 5; * @return {string} */ proto.gw.GatewayConfiguration.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, "")); }; /** @param {string} value */ proto.gw.GatewayConfiguration.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 5, value); }; /** * optional string version = 2; * @return {string} */ proto.gw.GatewayConfiguration.prototype.getVersion = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.gw.GatewayConfiguration.prototype.setVersion = function(value) { jspb.Message.setField(this, 2, value); }; /** * repeated ChannelConfiguration channels = 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.GatewayConfiguration.prototype.getChannelsList = function() { return /** @type{!Array.} */ ( jspb.Message.getRepeatedWrapperField(this, proto.gw.ChannelConfiguration, 3)); }; /** @param {Array.} value */ proto.gw.GatewayConfiguration.prototype.setChannelsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 3, value); }; proto.gw.GatewayConfiguration.prototype.clearChannelsList = function() { this.setChannelsList([]); }; /** * optional google.protobuf.Duration stats_interval = 4; * @return {proto.google.protobuf.Duration} */ proto.gw.GatewayConfiguration.prototype.getStatsInterval = function() { return /** @type{proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 4)); }; /** @param {proto.google.protobuf.Duration|undefined} value */ proto.gw.GatewayConfiguration.prototype.setStatsInterval = function(value) { jspb.Message.setWrapperField(this, 4, value); }; proto.gw.GatewayConfiguration.prototype.clearStatsInterval = function() { this.setStatsInterval(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.GatewayConfiguration.prototype.hasStatsInterval = function() { return jspb.Message.getField(this, 4) != null; }; /** * 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.gw.ChannelConfiguration = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gw.ChannelConfiguration.oneofGroups_); }; goog.inherits(proto.gw.ChannelConfiguration, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.ChannelConfiguration.displayName = 'proto.gw.ChannelConfiguration'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.gw.ChannelConfiguration.oneofGroups_ = [[3,4]]; /** * @enum {number} */ proto.gw.ChannelConfiguration.ModulationConfigCase = { MODULATION_CONFIG_NOT_SET: 0, LORA_MODULATION_CONFIG: 3, FSK_MODULATION_CONFIG: 4 }; /** * @return {proto.gw.ChannelConfiguration.ModulationConfigCase} */ proto.gw.ChannelConfiguration.prototype.getModulationConfigCase = function() { return /** @type {proto.gw.ChannelConfiguration.ModulationConfigCase} */(jspb.Message.computeOneofCase(this, proto.gw.ChannelConfiguration.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.ChannelConfiguration.prototype.toObject = function(opt_includeInstance) { return proto.gw.ChannelConfiguration.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.ChannelConfiguration} msg The msg instance to transform. * @return {!Object} */ proto.gw.ChannelConfiguration.toObject = function(includeInstance, msg) { var f, obj = { frequency: msg.getFrequency(), modulationLegacy: msg.getModulationLegacy(), loraModulationConfig: (f = msg.getLoraModulationConfig()) && proto.gw.LoraModulationConfig.toObject(includeInstance, f), fskModulationConfig: (f = msg.getFskModulationConfig()) && proto.gw.FskModulationConfig.toObject(includeInstance, f), board: msg.getBoard(), demodulator: msg.getDemodulator() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.ChannelConfiguration} */ proto.gw.ChannelConfiguration.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.ChannelConfiguration; return proto.gw.ChannelConfiguration.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.ChannelConfiguration} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.ChannelConfiguration} */ proto.gw.ChannelConfiguration.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setFrequency(value); break; case 2: var value = /** @type {!proto.common.Modulation} */ (reader.readEnum()); msg.setModulationLegacy(value); break; case 3: var value = new proto.gw.LoraModulationConfig; reader.readMessage(value,proto.gw.LoraModulationConfig.deserializeBinaryFromReader); msg.setLoraModulationConfig(value); break; case 4: var value = new proto.gw.FskModulationConfig; reader.readMessage(value,proto.gw.FskModulationConfig.deserializeBinaryFromReader); msg.setFskModulationConfig(value); break; case 5: var value = /** @type {number} */ (reader.readUint32()); msg.setBoard(value); break; case 6: var value = /** @type {number} */ (reader.readUint32()); msg.setDemodulator(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.ChannelConfiguration} message * @param {!jspb.BinaryWriter} writer */ proto.gw.ChannelConfiguration.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.ChannelConfiguration.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.ChannelConfiguration.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getFrequency(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getModulationLegacy(); if (f !== 0.0) { writer.writeEnum( 2, f ); } f = this.getLoraModulationConfig(); if (f != null) { writer.writeMessage( 3, f, proto.gw.LoraModulationConfig.serializeBinaryToWriter ); } f = this.getFskModulationConfig(); if (f != null) { writer.writeMessage( 4, f, proto.gw.FskModulationConfig.serializeBinaryToWriter ); } f = this.getBoard(); if (f !== 0) { writer.writeUint32( 5, f ); } f = this.getDemodulator(); if (f !== 0) { writer.writeUint32( 6, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.ChannelConfiguration} The clone. */ proto.gw.ChannelConfiguration.prototype.cloneMessage = function() { return /** @type {!proto.gw.ChannelConfiguration} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 frequency = 1; * @return {number} */ proto.gw.ChannelConfiguration.prototype.getFrequency = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.ChannelConfiguration.prototype.setFrequency = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional common.Modulation modulation_legacy = 2; * @return {!proto.common.Modulation} */ proto.gw.ChannelConfiguration.prototype.getModulationLegacy = function() { return /** @type {!proto.common.Modulation} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {!proto.common.Modulation} value */ proto.gw.ChannelConfiguration.prototype.setModulationLegacy = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional LoraModulationConfig lora_modulation_config = 3; * @return {proto.gw.LoraModulationConfig} */ proto.gw.ChannelConfiguration.prototype.getLoraModulationConfig = function() { return /** @type{proto.gw.LoraModulationConfig} */ ( jspb.Message.getWrapperField(this, proto.gw.LoraModulationConfig, 3)); }; /** @param {proto.gw.LoraModulationConfig|undefined} value */ proto.gw.ChannelConfiguration.prototype.setLoraModulationConfig = function(value) { jspb.Message.setOneofWrapperField(this, 3, proto.gw.ChannelConfiguration.oneofGroups_[0], value); }; proto.gw.ChannelConfiguration.prototype.clearLoraModulationConfig = function() { this.setLoraModulationConfig(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.ChannelConfiguration.prototype.hasLoraModulationConfig = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional FskModulationConfig fsk_modulation_config = 4; * @return {proto.gw.FskModulationConfig} */ proto.gw.ChannelConfiguration.prototype.getFskModulationConfig = function() { return /** @type{proto.gw.FskModulationConfig} */ ( jspb.Message.getWrapperField(this, proto.gw.FskModulationConfig, 4)); }; /** @param {proto.gw.FskModulationConfig|undefined} value */ proto.gw.ChannelConfiguration.prototype.setFskModulationConfig = function(value) { jspb.Message.setOneofWrapperField(this, 4, proto.gw.ChannelConfiguration.oneofGroups_[0], value); }; proto.gw.ChannelConfiguration.prototype.clearFskModulationConfig = function() { this.setFskModulationConfig(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.gw.ChannelConfiguration.prototype.hasFskModulationConfig = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional uint32 board = 5; * @return {number} */ proto.gw.ChannelConfiguration.prototype.getBoard = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0)); }; /** @param {number} value */ proto.gw.ChannelConfiguration.prototype.setBoard = function(value) { jspb.Message.setField(this, 5, value); }; /** * optional uint32 demodulator = 6; * @return {number} */ proto.gw.ChannelConfiguration.prototype.getDemodulator = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0)); }; /** @param {number} value */ proto.gw.ChannelConfiguration.prototype.setDemodulator = function(value) { jspb.Message.setField(this, 6, value); }; /** * 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.gw.LoraModulationConfig = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.gw.LoraModulationConfig.repeatedFields_, null); }; goog.inherits(proto.gw.LoraModulationConfig, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.LoraModulationConfig.displayName = 'proto.gw.LoraModulationConfig'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.gw.LoraModulationConfig.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.LoraModulationConfig.prototype.toObject = function(opt_includeInstance) { return proto.gw.LoraModulationConfig.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.LoraModulationConfig} msg The msg instance to transform. * @return {!Object} */ proto.gw.LoraModulationConfig.toObject = function(includeInstance, msg) { var f, obj = { bandwidthLegacy: msg.getBandwidthLegacy(), bandwidth: msg.getBandwidth(), spreadingFactorsList: jspb.Message.getField(msg, 2) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.LoraModulationConfig} */ proto.gw.LoraModulationConfig.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.LoraModulationConfig; return proto.gw.LoraModulationConfig.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.LoraModulationConfig} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.LoraModulationConfig} */ proto.gw.LoraModulationConfig.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setBandwidthLegacy(value); break; case 3: var value = /** @type {number} */ (reader.readUint32()); msg.setBandwidth(value); break; case 2: var value = /** @type {!Array.} */ (reader.readPackedUint32()); msg.setSpreadingFactorsList(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.LoraModulationConfig} message * @param {!jspb.BinaryWriter} writer */ proto.gw.LoraModulationConfig.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.LoraModulationConfig.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.LoraModulationConfig.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getBandwidthLegacy(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getBandwidth(); if (f !== 0) { writer.writeUint32( 3, f ); } f = this.getSpreadingFactorsList(); if (f.length > 0) { writer.writePackedUint32( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.LoraModulationConfig} The clone. */ proto.gw.LoraModulationConfig.prototype.cloneMessage = function() { return /** @type {!proto.gw.LoraModulationConfig} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 bandwidth_legacy = 1; * @return {number} */ proto.gw.LoraModulationConfig.prototype.getBandwidthLegacy = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.LoraModulationConfig.prototype.setBandwidthLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional uint32 bandwidth = 3; * @return {number} */ proto.gw.LoraModulationConfig.prototype.getBandwidth = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); }; /** @param {number} value */ proto.gw.LoraModulationConfig.prototype.setBandwidth = function(value) { jspb.Message.setField(this, 3, value); }; /** * repeated uint32 spreading_factors = 2; * 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.LoraModulationConfig.prototype.getSpreadingFactorsList = function() { return /** @type {!Array.} */ (jspb.Message.getField(this, 2)); }; /** @param {Array.} value */ proto.gw.LoraModulationConfig.prototype.setSpreadingFactorsList = function(value) { jspb.Message.setField(this, 2, value || []); }; proto.gw.LoraModulationConfig.prototype.clearSpreadingFactorsList = function() { jspb.Message.setField(this, 2, []); }; /** * 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.gw.FskModulationConfig = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.FskModulationConfig, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.FskModulationConfig.displayName = 'proto.gw.FskModulationConfig'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.FskModulationConfig.prototype.toObject = function(opt_includeInstance) { return proto.gw.FskModulationConfig.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.FskModulationConfig} msg The msg instance to transform. * @return {!Object} */ proto.gw.FskModulationConfig.toObject = function(includeInstance, msg) { var f, obj = { bandwidthLegacy: msg.getBandwidthLegacy(), bandwidth: msg.getBandwidth(), bitrate: msg.getBitrate() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.FskModulationConfig} */ proto.gw.FskModulationConfig.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.FskModulationConfig; return proto.gw.FskModulationConfig.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.FskModulationConfig} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.FskModulationConfig} */ proto.gw.FskModulationConfig.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setBandwidthLegacy(value); break; case 3: var value = /** @type {number} */ (reader.readUint32()); msg.setBandwidth(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setBitrate(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.FskModulationConfig} message * @param {!jspb.BinaryWriter} writer */ proto.gw.FskModulationConfig.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.FskModulationConfig.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.FskModulationConfig.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getBandwidthLegacy(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getBandwidth(); if (f !== 0) { writer.writeUint32( 3, f ); } f = this.getBitrate(); if (f !== 0) { writer.writeUint32( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.FskModulationConfig} The clone. */ proto.gw.FskModulationConfig.prototype.cloneMessage = function() { return /** @type {!proto.gw.FskModulationConfig} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 bandwidth_legacy = 1; * @return {number} */ proto.gw.FskModulationConfig.prototype.getBandwidthLegacy = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.gw.FskModulationConfig.prototype.setBandwidthLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional uint32 bandwidth = 3; * @return {number} */ proto.gw.FskModulationConfig.prototype.getBandwidth = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); }; /** @param {number} value */ proto.gw.FskModulationConfig.prototype.setBandwidth = function(value) { jspb.Message.setField(this, 3, value); }; /** * optional uint32 bitrate = 2; * @return {number} */ proto.gw.FskModulationConfig.prototype.getBitrate = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.gw.FskModulationConfig.prototype.setBitrate = function(value) { jspb.Message.setField(this, 2, value); }; /** * 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.gw.GatewayCommandExecRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.GatewayCommandExecRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.GatewayCommandExecRequest.displayName = 'proto.gw.GatewayCommandExecRequest'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.GatewayCommandExecRequest.prototype.toObject = function(opt_includeInstance) { return proto.gw.GatewayCommandExecRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.GatewayCommandExecRequest} msg The msg instance to transform. * @return {!Object} */ proto.gw.GatewayCommandExecRequest.toObject = function(includeInstance, msg) { var f, obj = { gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId(), command: msg.getCommand(), execid: msg.getExecid_asB64(), stdin: msg.getStdin_asB64(), environmentMap: (f = msg.getEnvironmentMap(true)) ? f.toArray() : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.GatewayCommandExecRequest} */ proto.gw.GatewayCommandExecRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.GatewayCommandExecRequest; return proto.gw.GatewayCommandExecRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.GatewayCommandExecRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.GatewayCommandExecRequest} */ proto.gw.GatewayCommandExecRequest.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.setGatewayIdLegacy(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setCommand(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setExecid(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setStdin(value); break; case 5: var value = msg.getEnvironmentMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString); }); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.GatewayCommandExecRequest} message * @param {!jspb.BinaryWriter} writer */ proto.gw.GatewayCommandExecRequest.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.GatewayCommandExecRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.GatewayCommandExecRequest.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 6, f ); } f = this.getCommand(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getExecid_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } f = this.getStdin_asU8(); if (f.length > 0) { writer.writeBytes( 4, f ); } f = this.getEnvironmentMap(true); if (f && f.getLength() > 0) { f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.GatewayCommandExecRequest} The clone. */ proto.gw.GatewayCommandExecRequest.prototype.cloneMessage = function() { return /** @type {!proto.gw.GatewayCommandExecRequest} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id_legacy = 1; * @return {!(string|Uint8Array)} */ proto.gw.GatewayCommandExecRequest.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id_legacy = 1; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.GatewayCommandExecRequest.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.GatewayCommandExecRequest.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayCommandExecRequest.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string gateway_id = 6; * @return {string} */ proto.gw.GatewayCommandExecRequest.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, "")); }; /** @param {string} value */ proto.gw.GatewayCommandExecRequest.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 6, value); }; /** * optional string command = 2; * @return {string} */ proto.gw.GatewayCommandExecRequest.prototype.getCommand = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.gw.GatewayCommandExecRequest.prototype.setCommand = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional bytes ExecId = 3; * @return {!(string|Uint8Array)} */ proto.gw.GatewayCommandExecRequest.prototype.getExecid = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** * optional bytes ExecId = 3; * This is a type-conversion wrapper around `getExecid()` * @return {string} */ proto.gw.GatewayCommandExecRequest.prototype.getExecid_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getExecid())); }; /** * optional bytes ExecId = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getExecid()` * @return {!Uint8Array} */ proto.gw.GatewayCommandExecRequest.prototype.getExecid_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getExecid())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayCommandExecRequest.prototype.setExecid = function(value) { jspb.Message.setField(this, 3, value); }; /** * optional bytes stdin = 4; * @return {!(string|Uint8Array)} */ proto.gw.GatewayCommandExecRequest.prototype.getStdin = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** * optional bytes stdin = 4; * This is a type-conversion wrapper around `getStdin()` * @return {string} */ proto.gw.GatewayCommandExecRequest.prototype.getStdin_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getStdin())); }; /** * optional bytes stdin = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getStdin()` * @return {!Uint8Array} */ proto.gw.GatewayCommandExecRequest.prototype.getStdin_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getStdin())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayCommandExecRequest.prototype.setStdin = function(value) { jspb.Message.setField(this, 4, value); }; /** * map environment = 5; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.gw.GatewayCommandExecRequest.prototype.getEnvironmentMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 5, opt_noLazyCreate, null)); }; /** * 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.gw.GatewayCommandExecResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.GatewayCommandExecResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.GatewayCommandExecResponse.displayName = 'proto.gw.GatewayCommandExecResponse'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.GatewayCommandExecResponse.prototype.toObject = function(opt_includeInstance) { return proto.gw.GatewayCommandExecResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.GatewayCommandExecResponse} msg The msg instance to transform. * @return {!Object} */ proto.gw.GatewayCommandExecResponse.toObject = function(includeInstance, msg) { var f, obj = { gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId(), execId: msg.getExecId_asB64(), stdout: msg.getStdout_asB64(), stderr: msg.getStderr_asB64(), error: msg.getError() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.GatewayCommandExecResponse} */ proto.gw.GatewayCommandExecResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.GatewayCommandExecResponse; return proto.gw.GatewayCommandExecResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.GatewayCommandExecResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.GatewayCommandExecResponse} */ proto.gw.GatewayCommandExecResponse.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.setGatewayIdLegacy(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setExecId(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setStdout(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setStderr(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setError(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.GatewayCommandExecResponse} message * @param {!jspb.BinaryWriter} writer */ proto.gw.GatewayCommandExecResponse.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.GatewayCommandExecResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.GatewayCommandExecResponse.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 6, f ); } f = this.getExecId_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = this.getStdout_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } f = this.getStderr_asU8(); if (f.length > 0) { writer.writeBytes( 4, f ); } f = this.getError(); if (f.length > 0) { writer.writeString( 5, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.GatewayCommandExecResponse} The clone. */ proto.gw.GatewayCommandExecResponse.prototype.cloneMessage = function() { return /** @type {!proto.gw.GatewayCommandExecResponse} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id_legacy = 1; * @return {!(string|Uint8Array)} */ proto.gw.GatewayCommandExecResponse.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id_legacy = 1; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.GatewayCommandExecResponse.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.GatewayCommandExecResponse.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayCommandExecResponse.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string gateway_id = 6; * @return {string} */ proto.gw.GatewayCommandExecResponse.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, "")); }; /** @param {string} value */ proto.gw.GatewayCommandExecResponse.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 6, value); }; /** * optional bytes exec_id = 2; * @return {!(string|Uint8Array)} */ proto.gw.GatewayCommandExecResponse.prototype.getExecId = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** * optional bytes exec_id = 2; * This is a type-conversion wrapper around `getExecId()` * @return {string} */ proto.gw.GatewayCommandExecResponse.prototype.getExecId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getExecId())); }; /** * optional bytes exec_id = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getExecId()` * @return {!Uint8Array} */ proto.gw.GatewayCommandExecResponse.prototype.getExecId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getExecId())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayCommandExecResponse.prototype.setExecId = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional bytes stdout = 3; * @return {!(string|Uint8Array)} */ proto.gw.GatewayCommandExecResponse.prototype.getStdout = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** * optional bytes stdout = 3; * This is a type-conversion wrapper around `getStdout()` * @return {string} */ proto.gw.GatewayCommandExecResponse.prototype.getStdout_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getStdout())); }; /** * optional bytes stdout = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getStdout()` * @return {!Uint8Array} */ proto.gw.GatewayCommandExecResponse.prototype.getStdout_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getStdout())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayCommandExecResponse.prototype.setStdout = function(value) { jspb.Message.setField(this, 3, value); }; /** * optional bytes stderr = 4; * @return {!(string|Uint8Array)} */ proto.gw.GatewayCommandExecResponse.prototype.getStderr = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** * optional bytes stderr = 4; * This is a type-conversion wrapper around `getStderr()` * @return {string} */ proto.gw.GatewayCommandExecResponse.prototype.getStderr_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getStderr())); }; /** * optional bytes stderr = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getStderr()` * @return {!Uint8Array} */ proto.gw.GatewayCommandExecResponse.prototype.getStderr_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getStderr())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.GatewayCommandExecResponse.prototype.setStderr = function(value) { jspb.Message.setField(this, 4, value); }; /** * optional string error = 5; * @return {string} */ proto.gw.GatewayCommandExecResponse.prototype.getError = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, "")); }; /** @param {string} value */ proto.gw.GatewayCommandExecResponse.prototype.setError = function(value) { jspb.Message.setField(this, 5, value); }; /** * 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.gw.RawPacketForwarderEvent = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.RawPacketForwarderEvent, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.RawPacketForwarderEvent.displayName = 'proto.gw.RawPacketForwarderEvent'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.RawPacketForwarderEvent.prototype.toObject = function(opt_includeInstance) { return proto.gw.RawPacketForwarderEvent.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.RawPacketForwarderEvent} msg The msg instance to transform. * @return {!Object} */ proto.gw.RawPacketForwarderEvent.toObject = function(includeInstance, msg) { var f, obj = { gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId(), rawId: msg.getRawId_asB64(), payload: msg.getPayload_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.RawPacketForwarderEvent} */ proto.gw.RawPacketForwarderEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.RawPacketForwarderEvent; return proto.gw.RawPacketForwarderEvent.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.RawPacketForwarderEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.RawPacketForwarderEvent} */ proto.gw.RawPacketForwarderEvent.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.setGatewayIdLegacy(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setRawId(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setPayload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.RawPacketForwarderEvent} message * @param {!jspb.BinaryWriter} writer */ proto.gw.RawPacketForwarderEvent.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.RawPacketForwarderEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.RawPacketForwarderEvent.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 4, f ); } f = this.getRawId_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = this.getPayload_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.RawPacketForwarderEvent} The clone. */ proto.gw.RawPacketForwarderEvent.prototype.cloneMessage = function() { return /** @type {!proto.gw.RawPacketForwarderEvent} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id_legacy = 1; * @return {!(string|Uint8Array)} */ proto.gw.RawPacketForwarderEvent.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id_legacy = 1; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.RawPacketForwarderEvent.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.RawPacketForwarderEvent.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.RawPacketForwarderEvent.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string gateway_id = 4; * @return {string} */ proto.gw.RawPacketForwarderEvent.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** @param {string} value */ proto.gw.RawPacketForwarderEvent.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 4, value); }; /** * optional bytes raw_id = 2; * @return {!(string|Uint8Array)} */ proto.gw.RawPacketForwarderEvent.prototype.getRawId = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** * optional bytes raw_id = 2; * This is a type-conversion wrapper around `getRawId()` * @return {string} */ proto.gw.RawPacketForwarderEvent.prototype.getRawId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getRawId())); }; /** * optional bytes raw_id = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getRawId()` * @return {!Uint8Array} */ proto.gw.RawPacketForwarderEvent.prototype.getRawId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getRawId())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.RawPacketForwarderEvent.prototype.setRawId = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional bytes payload = 3; * @return {!(string|Uint8Array)} */ proto.gw.RawPacketForwarderEvent.prototype.getPayload = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** * optional bytes payload = 3; * This is a type-conversion wrapper around `getPayload()` * @return {string} */ proto.gw.RawPacketForwarderEvent.prototype.getPayload_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPayload())); }; /** * optional bytes payload = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getPayload()` * @return {!Uint8Array} */ proto.gw.RawPacketForwarderEvent.prototype.getPayload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPayload())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.RawPacketForwarderEvent.prototype.setPayload = function(value) { jspb.Message.setField(this, 3, value); }; /** * 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.gw.RawPacketForwarderCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.RawPacketForwarderCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.RawPacketForwarderCommand.displayName = 'proto.gw.RawPacketForwarderCommand'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.RawPacketForwarderCommand.prototype.toObject = function(opt_includeInstance) { return proto.gw.RawPacketForwarderCommand.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.RawPacketForwarderCommand} msg The msg instance to transform. * @return {!Object} */ proto.gw.RawPacketForwarderCommand.toObject = function(includeInstance, msg) { var f, obj = { gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId(), rawId: msg.getRawId_asB64(), payload: msg.getPayload_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.RawPacketForwarderCommand} */ proto.gw.RawPacketForwarderCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.RawPacketForwarderCommand; return proto.gw.RawPacketForwarderCommand.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.RawPacketForwarderCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.RawPacketForwarderCommand} */ proto.gw.RawPacketForwarderCommand.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.setGatewayIdLegacy(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setRawId(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setPayload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.RawPacketForwarderCommand} message * @param {!jspb.BinaryWriter} writer */ proto.gw.RawPacketForwarderCommand.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.RawPacketForwarderCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.RawPacketForwarderCommand.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 4, f ); } f = this.getRawId_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = this.getPayload_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.RawPacketForwarderCommand} The clone. */ proto.gw.RawPacketForwarderCommand.prototype.cloneMessage = function() { return /** @type {!proto.gw.RawPacketForwarderCommand} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id_legacy = 1; * @return {!(string|Uint8Array)} */ proto.gw.RawPacketForwarderCommand.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id_legacy = 1; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.RawPacketForwarderCommand.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.RawPacketForwarderCommand.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.RawPacketForwarderCommand.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string gateway_id = 4; * @return {string} */ proto.gw.RawPacketForwarderCommand.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** @param {string} value */ proto.gw.RawPacketForwarderCommand.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 4, value); }; /** * optional bytes raw_id = 2; * @return {!(string|Uint8Array)} */ proto.gw.RawPacketForwarderCommand.prototype.getRawId = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** * optional bytes raw_id = 2; * This is a type-conversion wrapper around `getRawId()` * @return {string} */ proto.gw.RawPacketForwarderCommand.prototype.getRawId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getRawId())); }; /** * optional bytes raw_id = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getRawId()` * @return {!Uint8Array} */ proto.gw.RawPacketForwarderCommand.prototype.getRawId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getRawId())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.RawPacketForwarderCommand.prototype.setRawId = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional bytes payload = 3; * @return {!(string|Uint8Array)} */ proto.gw.RawPacketForwarderCommand.prototype.getPayload = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** * optional bytes payload = 3; * This is a type-conversion wrapper around `getPayload()` * @return {string} */ proto.gw.RawPacketForwarderCommand.prototype.getPayload_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPayload())); }; /** * optional bytes payload = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getPayload()` * @return {!Uint8Array} */ proto.gw.RawPacketForwarderCommand.prototype.getPayload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPayload())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.RawPacketForwarderCommand.prototype.setPayload = function(value) { jspb.Message.setField(this, 3, value); }; /** * 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.gw.ConnState = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.gw.ConnState, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.gw.ConnState.displayName = 'proto.gw.ConnState'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.gw.ConnState.prototype.toObject = function(opt_includeInstance) { return proto.gw.ConnState.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.gw.ConnState} msg The msg instance to transform. * @return {!Object} */ proto.gw.ConnState.toObject = function(includeInstance, msg) { var f, obj = { gatewayIdLegacy: msg.getGatewayIdLegacy_asB64(), gatewayId: msg.getGatewayId(), state: msg.getState() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.gw.ConnState} */ proto.gw.ConnState.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.gw.ConnState; return proto.gw.ConnState.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.gw.ConnState} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.gw.ConnState} */ proto.gw.ConnState.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.setGatewayIdLegacy(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setGatewayId(value); break; case 2: var value = /** @type {!proto.gw.ConnState.State} */ (reader.readEnum()); msg.setState(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.gw.ConnState} message * @param {!jspb.BinaryWriter} writer */ proto.gw.ConnState.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.gw.ConnState.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.gw.ConnState.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getGatewayIdLegacy_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getGatewayId(); if (f.length > 0) { writer.writeString( 3, f ); } f = this.getState(); if (f !== 0.0) { writer.writeEnum( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.gw.ConnState} The clone. */ proto.gw.ConnState.prototype.cloneMessage = function() { return /** @type {!proto.gw.ConnState} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes gateway_id_legacy = 1; * @return {!(string|Uint8Array)} */ proto.gw.ConnState.prototype.getGatewayIdLegacy = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes gateway_id_legacy = 1; * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {string} */ proto.gw.ConnState.prototype.getGatewayIdLegacy_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getGatewayIdLegacy())); }; /** * optional bytes gateway_id_legacy = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getGatewayIdLegacy()` * @return {!Uint8Array} */ proto.gw.ConnState.prototype.getGatewayIdLegacy_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getGatewayIdLegacy())); }; /** @param {!(string|Uint8Array)} value */ proto.gw.ConnState.prototype.setGatewayIdLegacy = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string gateway_id = 3; * @return {string} */ proto.gw.ConnState.prototype.getGatewayId = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** @param {string} value */ proto.gw.ConnState.prototype.setGatewayId = function(value) { jspb.Message.setField(this, 3, value); }; /** * optional State state = 2; * @return {!proto.gw.ConnState.State} */ proto.gw.ConnState.prototype.getState = function() { return /** @type {!proto.gw.ConnState.State} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {!proto.gw.ConnState.State} value */ proto.gw.ConnState.prototype.setState = function(value) { jspb.Message.setField(this, 2, value); }; /** * @enum {number} */ proto.gw.ConnState.State = { OFFLINE: 0, ONLINE: 1 }; /** * @enum {number} */ proto.gw.CodeRate = { CR_UNDEFINED: 0, CR_4_5: 1, CR_4_6: 2, CR_4_7: 3, CR_4_8: 4, CR_3_8: 5, CR_2_6: 6, CR_1_4: 7, CR_1_6: 8, CR_5_6: 9 }; /** * @enum {number} */ proto.gw.DownlinkTiming = { IMMEDIATELY: 0, DELAY: 1, GPS_EPOCH: 2 }; /** * @enum {number} */ proto.gw.FineTimestampType = { NONE: 0, ENCRYPTED: 1, PLAIN: 2 }; /** * @enum {number} */ proto.gw.CRCStatus = { NO_CRC: 0, BAD_CRC: 1, CRC_OK: 2 }; /** * @enum {number} */ proto.gw.TxAckStatus = { IGNORED: 0, OK: 1, TOO_LATE: 2, TOO_EARLY: 3, COLLISION_PACKET: 4, COLLISION_BEACON: 5, TX_FREQ: 6, TX_POWER: 7, GPS_UNLOCKED: 8, QUEUE_FULL: 9, INTERNAL_ERROR: 10 }; goog.object.extend(exports, proto.gw);