Implement adding gws to multicast-group + Class-C scheduling config.

This makes it possible to add gateways to a multicast-group, which in
case configured will always be used for transmitting the multicast
downlinks.

This also moves the multicast class-c scheduling to the multicast-group
configuration. Options are delay between multiple gateways, or GPS time
synchronized transmission.
This commit is contained in:
Orne Brocaar
2023-02-09 15:11:06 +00:00
parent 8d34bb0d0c
commit f657c3e971
96 changed files with 3337 additions and 604 deletions

View File

@ -255,6 +255,9 @@ export class ListGatewaysRequest extends jspb.Message {
getTenantId(): string;
setTenantId(value: string): void;
getMulticastGroupId(): string;
setMulticastGroupId(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ListGatewaysRequest.AsObject;
static toObject(includeInstance: boolean, msg: ListGatewaysRequest): ListGatewaysRequest.AsObject;
@ -271,6 +274,7 @@ export namespace ListGatewaysRequest {
offset: number,
search: string,
tenantId: string,
multicastGroupId: string,
}
}

View File

@ -2062,7 +2062,8 @@ proto.api.ListGatewaysRequest.toObject = function(includeInstance, msg) {
limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
search: jspb.Message.getFieldWithDefault(msg, 3, ""),
tenantId: jspb.Message.getFieldWithDefault(msg, 4, "")
tenantId: jspb.Message.getFieldWithDefault(msg, 4, ""),
multicastGroupId: jspb.Message.getFieldWithDefault(msg, 5, "")
};
if (includeInstance) {
@ -2115,6 +2116,10 @@ proto.api.ListGatewaysRequest.deserializeBinaryFromReader = function(msg, reader
var value = /** @type {string} */ (reader.readString());
msg.setTenantId(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setMulticastGroupId(value);
break;
default:
reader.skipField();
break;
@ -2172,6 +2177,13 @@ proto.api.ListGatewaysRequest.serializeBinaryToWriter = function(message, writer
f
);
}
f = message.getMulticastGroupId();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
};
@ -2247,6 +2259,24 @@ proto.api.ListGatewaysRequest.prototype.setTenantId = function(value) {
};
/**
* optional string multicast_group_id = 5;
* @return {string}
*/
proto.api.ListGatewaysRequest.prototype.getMulticastGroupId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.api.ListGatewaysRequest} returns this
*/
proto.api.ListGatewaysRequest.prototype.setMulticastGroupId = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* List of repeated fields within this message type.

View File

@ -15,6 +15,8 @@ interface IMulticastGroupServiceService extends grpc.ServiceDefinition<grpc.Unty
list: grpc.MethodDefinition<api_multicast_group_pb.ListMulticastGroupsRequest, api_multicast_group_pb.ListMulticastGroupsResponse>;
addDevice: grpc.MethodDefinition<api_multicast_group_pb.AddDeviceToMulticastGroupRequest, google_protobuf_empty_pb.Empty>;
removeDevice: grpc.MethodDefinition<api_multicast_group_pb.RemoveDeviceFromMulticastGroupRequest, google_protobuf_empty_pb.Empty>;
addGateway: grpc.MethodDefinition<api_multicast_group_pb.AddGatewayToMulticastGroupRequest, google_protobuf_empty_pb.Empty>;
removeGateway: grpc.MethodDefinition<api_multicast_group_pb.RemoveGatewayFromMulticastGroupRequest, google_protobuf_empty_pb.Empty>;
enqueue: grpc.MethodDefinition<api_multicast_group_pb.EnqueueMulticastGroupQueueItemRequest, api_multicast_group_pb.EnqueueMulticastGroupQueueItemResponse>;
flushQueue: grpc.MethodDefinition<api_multicast_group_pb.FlushMulticastGroupQueueRequest, google_protobuf_empty_pb.Empty>;
listQueue: grpc.MethodDefinition<api_multicast_group_pb.ListMulticastGroupQueueRequest, api_multicast_group_pb.ListMulticastGroupQueueResponse>;
@ -30,6 +32,8 @@ export interface IMulticastGroupServiceServer extends grpc.UntypedServiceImpleme
list: grpc.handleUnaryCall<api_multicast_group_pb.ListMulticastGroupsRequest, api_multicast_group_pb.ListMulticastGroupsResponse>;
addDevice: grpc.handleUnaryCall<api_multicast_group_pb.AddDeviceToMulticastGroupRequest, google_protobuf_empty_pb.Empty>;
removeDevice: grpc.handleUnaryCall<api_multicast_group_pb.RemoveDeviceFromMulticastGroupRequest, google_protobuf_empty_pb.Empty>;
addGateway: grpc.handleUnaryCall<api_multicast_group_pb.AddGatewayToMulticastGroupRequest, google_protobuf_empty_pb.Empty>;
removeGateway: grpc.handleUnaryCall<api_multicast_group_pb.RemoveGatewayFromMulticastGroupRequest, google_protobuf_empty_pb.Empty>;
enqueue: grpc.handleUnaryCall<api_multicast_group_pb.EnqueueMulticastGroupQueueItemRequest, api_multicast_group_pb.EnqueueMulticastGroupQueueItemResponse>;
flushQueue: grpc.handleUnaryCall<api_multicast_group_pb.FlushMulticastGroupQueueRequest, google_protobuf_empty_pb.Empty>;
listQueue: grpc.handleUnaryCall<api_multicast_group_pb.ListMulticastGroupQueueRequest, api_multicast_group_pb.ListMulticastGroupQueueResponse>;
@ -58,6 +62,12 @@ export class MulticastGroupServiceClient extends grpc.Client {
removeDevice(argument: api_multicast_group_pb.RemoveDeviceFromMulticastGroupRequest, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
removeDevice(argument: api_multicast_group_pb.RemoveDeviceFromMulticastGroupRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
removeDevice(argument: api_multicast_group_pb.RemoveDeviceFromMulticastGroupRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
addGateway(argument: api_multicast_group_pb.AddGatewayToMulticastGroupRequest, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
addGateway(argument: api_multicast_group_pb.AddGatewayToMulticastGroupRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
addGateway(argument: api_multicast_group_pb.AddGatewayToMulticastGroupRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
removeGateway(argument: api_multicast_group_pb.RemoveGatewayFromMulticastGroupRequest, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
removeGateway(argument: api_multicast_group_pb.RemoveGatewayFromMulticastGroupRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
removeGateway(argument: api_multicast_group_pb.RemoveGatewayFromMulticastGroupRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<google_protobuf_empty_pb.Empty>): grpc.ClientUnaryCall;
enqueue(argument: api_multicast_group_pb.EnqueueMulticastGroupQueueItemRequest, callback: grpc.requestCallback<api_multicast_group_pb.EnqueueMulticastGroupQueueItemResponse>): grpc.ClientUnaryCall;
enqueue(argument: api_multicast_group_pb.EnqueueMulticastGroupQueueItemRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_multicast_group_pb.EnqueueMulticastGroupQueueItemResponse>): grpc.ClientUnaryCall;
enqueue(argument: api_multicast_group_pb.EnqueueMulticastGroupQueueItemRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_multicast_group_pb.EnqueueMulticastGroupQueueItemResponse>): grpc.ClientUnaryCall;

View File

@ -19,6 +19,17 @@ function deserialize_api_AddDeviceToMulticastGroupRequest(buffer_arg) {
return api_multicast_group_pb.AddDeviceToMulticastGroupRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_AddGatewayToMulticastGroupRequest(arg) {
if (!(arg instanceof api_multicast_group_pb.AddGatewayToMulticastGroupRequest)) {
throw new Error('Expected argument of type api.AddGatewayToMulticastGroupRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_AddGatewayToMulticastGroupRequest(buffer_arg) {
return api_multicast_group_pb.AddGatewayToMulticastGroupRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_CreateMulticastGroupRequest(arg) {
if (!(arg instanceof api_multicast_group_pb.CreateMulticastGroupRequest)) {
throw new Error('Expected argument of type api.CreateMulticastGroupRequest');
@ -162,6 +173,17 @@ function deserialize_api_RemoveDeviceFromMulticastGroupRequest(buffer_arg) {
return api_multicast_group_pb.RemoveDeviceFromMulticastGroupRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_RemoveGatewayFromMulticastGroupRequest(arg) {
if (!(arg instanceof api_multicast_group_pb.RemoveGatewayFromMulticastGroupRequest)) {
throw new Error('Expected argument of type api.RemoveGatewayFromMulticastGroupRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_RemoveGatewayFromMulticastGroupRequest(buffer_arg) {
return api_multicast_group_pb.RemoveGatewayFromMulticastGroupRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_UpdateMulticastGroupRequest(arg) {
if (!(arg instanceof api_multicast_group_pb.UpdateMulticastGroupRequest)) {
throw new Error('Expected argument of type api.UpdateMulticastGroupRequest');
@ -271,7 +293,31 @@ removeDevice: {
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
// Add the given item to the multcast group queue.
// Add a gateway to the multicast group.
addGateway: {
path: '/api.MulticastGroupService/AddGateway',
requestStream: false,
responseStream: false,
requestType: api_multicast_group_pb.AddGatewayToMulticastGroupRequest,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_api_AddGatewayToMulticastGroupRequest,
requestDeserialize: deserialize_api_AddGatewayToMulticastGroupRequest,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
// Remove a gateway from the multicast group.
removeGateway: {
path: '/api.MulticastGroupService/RemoveGateway',
requestStream: false,
responseStream: false,
requestType: api_multicast_group_pb.RemoveGatewayFromMulticastGroupRequest,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_api_RemoveGatewayFromMulticastGroupRequest,
requestDeserialize: deserialize_api_RemoveGatewayFromMulticastGroupRequest,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
// Add the given item to the multicast group queue.
enqueue: {
path: '/api.MulticastGroupService/Enqueue',
requestStream: false,

View File

@ -44,6 +44,9 @@ export class MulticastGroup extends jspb.Message {
getClassBPingSlotPeriod(): number;
setClassBPingSlotPeriod(value: number): void;
getClassCSchedulingType(): MulticastGroupSchedulingTypeMap[keyof MulticastGroupSchedulingTypeMap];
setClassCSchedulingType(value: MulticastGroupSchedulingTypeMap[keyof MulticastGroupSchedulingTypeMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MulticastGroup.AsObject;
static toObject(includeInstance: boolean, msg: MulticastGroup): MulticastGroup.AsObject;
@ -68,6 +71,7 @@ export namespace MulticastGroup {
dr: number,
frequency: number,
classBPingSlotPeriod: number,
classCSchedulingType: MulticastGroupSchedulingTypeMap[keyof MulticastGroupSchedulingTypeMap],
}
}
@ -359,6 +363,54 @@ export namespace RemoveDeviceFromMulticastGroupRequest {
}
}
export class AddGatewayToMulticastGroupRequest extends jspb.Message {
getMulticastGroupId(): string;
setMulticastGroupId(value: string): void;
getGatewayId(): string;
setGatewayId(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AddGatewayToMulticastGroupRequest.AsObject;
static toObject(includeInstance: boolean, msg: AddGatewayToMulticastGroupRequest): AddGatewayToMulticastGroupRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AddGatewayToMulticastGroupRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AddGatewayToMulticastGroupRequest;
static deserializeBinaryFromReader(message: AddGatewayToMulticastGroupRequest, reader: jspb.BinaryReader): AddGatewayToMulticastGroupRequest;
}
export namespace AddGatewayToMulticastGroupRequest {
export type AsObject = {
multicastGroupId: string,
gatewayId: string,
}
}
export class RemoveGatewayFromMulticastGroupRequest extends jspb.Message {
getMulticastGroupId(): string;
setMulticastGroupId(value: string): void;
getGatewayId(): string;
setGatewayId(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RemoveGatewayFromMulticastGroupRequest.AsObject;
static toObject(includeInstance: boolean, msg: RemoveGatewayFromMulticastGroupRequest): RemoveGatewayFromMulticastGroupRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: RemoveGatewayFromMulticastGroupRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): RemoveGatewayFromMulticastGroupRequest;
static deserializeBinaryFromReader(message: RemoveGatewayFromMulticastGroupRequest, reader: jspb.BinaryReader): RemoveGatewayFromMulticastGroupRequest;
}
export namespace RemoveGatewayFromMulticastGroupRequest {
export type AsObject = {
multicastGroupId: string,
gatewayId: string,
}
}
export class MulticastGroupQueueItem extends jspb.Message {
getMulticastGroupId(): string;
setMulticastGroupId(value: string): void;
@ -504,3 +556,10 @@ export interface MulticastGroupTypeMap {
export const MulticastGroupType: MulticastGroupTypeMap;
export interface MulticastGroupSchedulingTypeMap {
DELAY: 0;
GPS_TIME: 1;
}
export const MulticastGroupSchedulingType: MulticastGroupSchedulingTypeMap;

View File

@ -21,6 +21,7 @@ goog.object.extend(proto, google_protobuf_empty_pb);
var common_common_pb = require('../common/common_pb.js');
goog.object.extend(proto, common_common_pb);
goog.exportSymbol('proto.api.AddDeviceToMulticastGroupRequest', null, global);
goog.exportSymbol('proto.api.AddGatewayToMulticastGroupRequest', null, global);
goog.exportSymbol('proto.api.CreateMulticastGroupRequest', null, global);
goog.exportSymbol('proto.api.CreateMulticastGroupResponse', null, global);
goog.exportSymbol('proto.api.DeleteMulticastGroupRequest', null, global);
@ -36,8 +37,10 @@ goog.exportSymbol('proto.api.ListMulticastGroupsResponse', null, global);
goog.exportSymbol('proto.api.MulticastGroup', null, global);
goog.exportSymbol('proto.api.MulticastGroupListItem', null, global);
goog.exportSymbol('proto.api.MulticastGroupQueueItem', null, global);
goog.exportSymbol('proto.api.MulticastGroupSchedulingType', null, global);
goog.exportSymbol('proto.api.MulticastGroupType', null, global);
goog.exportSymbol('proto.api.RemoveDeviceFromMulticastGroupRequest', null, global);
goog.exportSymbol('proto.api.RemoveGatewayFromMulticastGroupRequest', null, global);
goog.exportSymbol('proto.api.UpdateMulticastGroupRequest', null, global);
/**
* Generated by JsPbCodeGenerator.
@ -291,6 +294,48 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.api.RemoveDeviceFromMulticastGroupRequest.displayName = 'proto.api.RemoveDeviceFromMulticastGroupRequest';
}
/**
* 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.api.AddGatewayToMulticastGroupRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.api.AddGatewayToMulticastGroupRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.api.AddGatewayToMulticastGroupRequest.displayName = 'proto.api.AddGatewayToMulticastGroupRequest';
}
/**
* 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.api.RemoveGatewayFromMulticastGroupRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.api.RemoveGatewayFromMulticastGroupRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.displayName = 'proto.api.RemoveGatewayFromMulticastGroupRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -460,7 +505,8 @@ proto.api.MulticastGroup.toObject = function(includeInstance, msg) {
groupType: jspb.Message.getFieldWithDefault(msg, 9, 0),
dr: jspb.Message.getFieldWithDefault(msg, 10, 0),
frequency: jspb.Message.getFieldWithDefault(msg, 11, 0),
classBPingSlotPeriod: jspb.Message.getFieldWithDefault(msg, 12, 0)
classBPingSlotPeriod: jspb.Message.getFieldWithDefault(msg, 12, 0),
classCSchedulingType: jspb.Message.getFieldWithDefault(msg, 13, 0)
};
if (includeInstance) {
@ -545,6 +591,10 @@ proto.api.MulticastGroup.deserializeBinaryFromReader = function(msg, reader) {
var value = /** @type {number} */ (reader.readUint32());
msg.setClassBPingSlotPeriod(value);
break;
case 13:
var value = /** @type {!proto.api.MulticastGroupSchedulingType} */ (reader.readEnum());
msg.setClassCSchedulingType(value);
break;
default:
reader.skipField();
break;
@ -658,6 +708,13 @@ proto.api.MulticastGroup.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getClassCSchedulingType();
if (f !== 0.0) {
writer.writeEnum(
13,
f
);
}
};
@ -877,6 +934,24 @@ proto.api.MulticastGroup.prototype.setClassBPingSlotPeriod = function(value) {
};
/**
* optional MulticastGroupSchedulingType class_c_scheduling_type = 13;
* @return {!proto.api.MulticastGroupSchedulingType}
*/
proto.api.MulticastGroup.prototype.getClassCSchedulingType = function() {
return /** @type {!proto.api.MulticastGroupSchedulingType} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
};
/**
* @param {!proto.api.MulticastGroupSchedulingType} value
* @return {!proto.api.MulticastGroup} returns this
*/
proto.api.MulticastGroup.prototype.setClassCSchedulingType = function(value) {
return jspb.Message.setProto3EnumField(this, 13, value);
};
@ -2877,6 +2952,326 @@ proto.api.RemoveDeviceFromMulticastGroupRequest.prototype.setDevEui = function(v
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.AddGatewayToMulticastGroupRequest.prototype.toObject = function(opt_includeInstance) {
return proto.api.AddGatewayToMulticastGroupRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.AddGatewayToMulticastGroupRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.AddGatewayToMulticastGroupRequest.toObject = function(includeInstance, msg) {
var f, obj = {
multicastGroupId: jspb.Message.getFieldWithDefault(msg, 1, ""),
gatewayId: jspb.Message.getFieldWithDefault(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.api.AddGatewayToMulticastGroupRequest}
*/
proto.api.AddGatewayToMulticastGroupRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.api.AddGatewayToMulticastGroupRequest;
return proto.api.AddGatewayToMulticastGroupRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.api.AddGatewayToMulticastGroupRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.api.AddGatewayToMulticastGroupRequest}
*/
proto.api.AddGatewayToMulticastGroupRequest.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.setMulticastGroupId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setGatewayId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.AddGatewayToMulticastGroupRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.api.AddGatewayToMulticastGroupRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.api.AddGatewayToMulticastGroupRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.AddGatewayToMulticastGroupRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMulticastGroupId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getGatewayId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string multicast_group_id = 1;
* @return {string}
*/
proto.api.AddGatewayToMulticastGroupRequest.prototype.getMulticastGroupId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.api.AddGatewayToMulticastGroupRequest} returns this
*/
proto.api.AddGatewayToMulticastGroupRequest.prototype.setMulticastGroupId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string gateway_id = 2;
* @return {string}
*/
proto.api.AddGatewayToMulticastGroupRequest.prototype.getGatewayId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.api.AddGatewayToMulticastGroupRequest} returns this
*/
proto.api.AddGatewayToMulticastGroupRequest.prototype.setGatewayId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.prototype.toObject = function(opt_includeInstance) {
return proto.api.RemoveGatewayFromMulticastGroupRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.RemoveGatewayFromMulticastGroupRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.toObject = function(includeInstance, msg) {
var f, obj = {
multicastGroupId: jspb.Message.getFieldWithDefault(msg, 1, ""),
gatewayId: jspb.Message.getFieldWithDefault(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.api.RemoveGatewayFromMulticastGroupRequest}
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.api.RemoveGatewayFromMulticastGroupRequest;
return proto.api.RemoveGatewayFromMulticastGroupRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.api.RemoveGatewayFromMulticastGroupRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.api.RemoveGatewayFromMulticastGroupRequest}
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.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.setMulticastGroupId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setGatewayId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.api.RemoveGatewayFromMulticastGroupRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.api.RemoveGatewayFromMulticastGroupRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMulticastGroupId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getGatewayId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string multicast_group_id = 1;
* @return {string}
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.prototype.getMulticastGroupId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.api.RemoveGatewayFromMulticastGroupRequest} returns this
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.prototype.setMulticastGroupId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string gateway_id = 2;
* @return {string}
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.prototype.getGatewayId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.api.RemoveGatewayFromMulticastGroupRequest} returns this
*/
proto.api.RemoveGatewayFromMulticastGroupRequest.prototype.setGatewayId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
@ -3827,4 +4222,12 @@ proto.api.MulticastGroupType = {
CLASS_B: 1
};
/**
* @enum {number}
*/
proto.api.MulticastGroupSchedulingType = {
DELAY: 0,
GPS_TIME: 1
};
goog.object.extend(exports, proto.api);