@science-corporation/synapse 0.12.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/api/api.d.ts +124 -6
- package/dist/api/api.js +293 -20
- package/dist/api/api.js.map +1 -1
- package/dist/api/proto.json +25 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -1
- package/dist/demo.js +21 -9
- package/dist/demo.js.map +1 -1
- package/dist/nodes/disk_writer.d.ts +11 -0
- package/dist/nodes/disk_writer.d.ts.map +1 -0
- package/dist/nodes/disk_writer.js +28 -0
- package/dist/nodes/disk_writer.js.map +1 -0
- package/dist/nodes/index.d.ts +1 -0
- package/dist/nodes/index.d.ts.map +1 -1
- package/dist/nodes/index.js +3 -1
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/stream_out.d.ts +12 -5
- package/dist/nodes/stream_out.d.ts.map +1 -1
- package/dist/nodes/stream_out.js +58 -40
- package/dist/nodes/stream_out.js.map +1 -1
- package/dist/utils/ip.d.ts +2 -0
- package/dist/utils/ip.d.ts.map +1 -0
- package/dist/utils/ip.js +52 -0
- package/dist/utils/ip.js.map +1 -0
- package/package.json +6 -5
- package/scripts/postinstall.sh +50 -10
- package/src/api/api.d.ts +124 -6
- package/src/api/api.js +311 -20
- package/src/api/proto.json +25 -2
- package/src/config.ts +2 -0
- package/src/demo.ts +21 -9
- package/src/nodes/disk_writer.ts +30 -0
- package/src/nodes/index.ts +1 -0
- package/src/nodes/stream_out.ts +67 -50
- package/src/utils/ip.ts +35 -0
- package/synapse-api/README.md +1 -1
- package/synapse-api/api/nodes/stream_out.proto +31 -1
- package/dist/api-science-device/api.d.ts +0 -3
- package/dist/api-science-device/api.d.ts.map +0 -1
- package/dist/api-science-device/api.js +0 -3822
- package/dist/api-science-device/api.js.map +0 -1
- package/dist/api-science-device/proto.json +0 -258
- package/dist/nodejs.d.ts +0 -8
- package/dist/nodejs.d.ts.map +0 -1
- package/dist/nodejs.js +0 -32
- package/dist/nodejs.js.map +0 -1
- package/dist/science-device-api/api.d.ts +0 -3
- package/dist/science-device-api/api.d.ts.map +0 -1
- package/dist/science-device-api/api.js +0 -3822
- package/dist/science-device-api/api.js.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -19
- package/dist/types/index.js.map +0 -1
- package/dist/types.d.ts +0 -5
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -19
- package/dist/types.js.map +0 -1
- package/dist/utils/device-management.d.ts +0 -37
- package/dist/utils/device-management.d.ts.map +0 -1
- package/dist/utils/device-management.js +0 -126
- package/dist/utils/device-management.js.map +0 -1
package/README.md
CHANGED
|
@@ -43,7 +43,9 @@ console.log("Device info: ", info);
|
|
|
43
43
|
|
|
44
44
|
const streamOut = new StreamOut(
|
|
45
45
|
{
|
|
46
|
-
|
|
46
|
+
udpUnicast: {
|
|
47
|
+
destinationPort: 50038,
|
|
48
|
+
},
|
|
47
49
|
},
|
|
48
50
|
(msg: Buffer) => {
|
|
49
51
|
console.log("StreamOut | recv: ", msg);
|
|
@@ -51,7 +53,7 @@ const streamOut = new StreamOut(
|
|
|
51
53
|
);
|
|
52
54
|
|
|
53
55
|
const broadband = new BroadbandSource({
|
|
54
|
-
peripheralId:
|
|
56
|
+
peripheralId: 100,
|
|
55
57
|
sampleRateHz: 30000,
|
|
56
58
|
bitWidth: 12,
|
|
57
59
|
gain: 20.0,
|
package/dist/api/api.d.ts
CHANGED
|
@@ -1325,17 +1325,123 @@ export namespace synapse {
|
|
|
1325
1325
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
1326
1326
|
}
|
|
1327
1327
|
|
|
1328
|
+
/** Properties of a UDPUnicastConfig. */
|
|
1329
|
+
interface IUDPUnicastConfig {
|
|
1330
|
+
|
|
1331
|
+
/** UDPUnicastConfig destinationAddress */
|
|
1332
|
+
destinationAddress?: (string|null);
|
|
1333
|
+
|
|
1334
|
+
/** UDPUnicastConfig destinationPort */
|
|
1335
|
+
destinationPort?: (number|null);
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
/** UDPUnicastConfig defines the configuration parameters for UDP unicast transport. */
|
|
1339
|
+
class UDPUnicastConfig implements IUDPUnicastConfig {
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Constructs a new UDPUnicastConfig.
|
|
1343
|
+
* @param [properties] Properties to set
|
|
1344
|
+
*/
|
|
1345
|
+
constructor(properties?: synapse.IUDPUnicastConfig);
|
|
1346
|
+
|
|
1347
|
+
/** UDPUnicastConfig destinationAddress. */
|
|
1348
|
+
public destinationAddress: string;
|
|
1349
|
+
|
|
1350
|
+
/** UDPUnicastConfig destinationPort. */
|
|
1351
|
+
public destinationPort: number;
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* Creates a new UDPUnicastConfig instance using the specified properties.
|
|
1355
|
+
* @param [properties] Properties to set
|
|
1356
|
+
* @returns UDPUnicastConfig instance
|
|
1357
|
+
*/
|
|
1358
|
+
public static create(properties?: synapse.IUDPUnicastConfig): synapse.UDPUnicastConfig;
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* Encodes the specified UDPUnicastConfig message. Does not implicitly {@link synapse.UDPUnicastConfig.verify|verify} messages.
|
|
1362
|
+
* @param message UDPUnicastConfig message or plain object to encode
|
|
1363
|
+
* @param [writer] Writer to encode to
|
|
1364
|
+
* @returns Writer
|
|
1365
|
+
*/
|
|
1366
|
+
public static encode(message: synapse.IUDPUnicastConfig, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* Encodes the specified UDPUnicastConfig message, length delimited. Does not implicitly {@link synapse.UDPUnicastConfig.verify|verify} messages.
|
|
1370
|
+
* @param message UDPUnicastConfig message or plain object to encode
|
|
1371
|
+
* @param [writer] Writer to encode to
|
|
1372
|
+
* @returns Writer
|
|
1373
|
+
*/
|
|
1374
|
+
public static encodeDelimited(message: synapse.IUDPUnicastConfig, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* Decodes a UDPUnicastConfig message from the specified reader or buffer.
|
|
1378
|
+
* @param reader Reader or buffer to decode from
|
|
1379
|
+
* @param [length] Message length if known beforehand
|
|
1380
|
+
* @returns UDPUnicastConfig
|
|
1381
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1382
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1383
|
+
*/
|
|
1384
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): synapse.UDPUnicastConfig;
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* Decodes a UDPUnicastConfig message from the specified reader or buffer, length delimited.
|
|
1388
|
+
* @param reader Reader or buffer to decode from
|
|
1389
|
+
* @returns UDPUnicastConfig
|
|
1390
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1391
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1392
|
+
*/
|
|
1393
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): synapse.UDPUnicastConfig;
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Verifies a UDPUnicastConfig message.
|
|
1397
|
+
* @param message Plain object to verify
|
|
1398
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
1399
|
+
*/
|
|
1400
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* Creates a UDPUnicastConfig message from a plain object. Also converts values to their respective internal types.
|
|
1404
|
+
* @param object Plain object
|
|
1405
|
+
* @returns UDPUnicastConfig
|
|
1406
|
+
*/
|
|
1407
|
+
public static fromObject(object: { [k: string]: any }): synapse.UDPUnicastConfig;
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* Creates a plain object from a UDPUnicastConfig message. Also converts values to other types if specified.
|
|
1411
|
+
* @param message UDPUnicastConfig
|
|
1412
|
+
* @param [options] Conversion options
|
|
1413
|
+
* @returns Plain object
|
|
1414
|
+
*/
|
|
1415
|
+
public static toObject(message: synapse.UDPUnicastConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* Converts this UDPUnicastConfig to JSON.
|
|
1419
|
+
* @returns JSON object
|
|
1420
|
+
*/
|
|
1421
|
+
public toJSON(): { [k: string]: any };
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* Gets the default type url for UDPUnicastConfig
|
|
1425
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1426
|
+
* @returns The default type url
|
|
1427
|
+
*/
|
|
1428
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1328
1431
|
/** Properties of a StreamOutConfig. */
|
|
1329
1432
|
interface IStreamOutConfig {
|
|
1330
1433
|
|
|
1331
1434
|
/** StreamOutConfig label */
|
|
1332
1435
|
label?: (string|null);
|
|
1333
1436
|
|
|
1334
|
-
/** StreamOutConfig
|
|
1335
|
-
|
|
1437
|
+
/** StreamOutConfig udpUnicast */
|
|
1438
|
+
udpUnicast?: (synapse.IUDPUnicastConfig|null);
|
|
1336
1439
|
}
|
|
1337
1440
|
|
|
1338
|
-
/**
|
|
1441
|
+
/**
|
|
1442
|
+
* StreamOutConfig defines the configuration for an outbound data stream.
|
|
1443
|
+
* Clients can request to create a new outbound stream by providing a transport
|
|
1444
|
+
*/
|
|
1339
1445
|
class StreamOutConfig implements IStreamOutConfig {
|
|
1340
1446
|
|
|
1341
1447
|
/**
|
|
@@ -1347,8 +1453,11 @@ export namespace synapse {
|
|
|
1347
1453
|
/** StreamOutConfig label. */
|
|
1348
1454
|
public label: string;
|
|
1349
1455
|
|
|
1350
|
-
/** StreamOutConfig
|
|
1351
|
-
public
|
|
1456
|
+
/** StreamOutConfig udpUnicast. */
|
|
1457
|
+
public udpUnicast?: (synapse.IUDPUnicastConfig|null);
|
|
1458
|
+
|
|
1459
|
+
/** StreamOutConfig transport. */
|
|
1460
|
+
public transport?: "udpUnicast";
|
|
1352
1461
|
|
|
1353
1462
|
/**
|
|
1354
1463
|
* Creates a new StreamOutConfig instance using the specified properties.
|
|
@@ -1433,9 +1542,15 @@ export namespace synapse {
|
|
|
1433
1542
|
|
|
1434
1543
|
/** StreamOutStatus throughputMbps */
|
|
1435
1544
|
throughputMbps?: (number|null);
|
|
1545
|
+
|
|
1546
|
+
/** StreamOutStatus failedSendCount */
|
|
1547
|
+
failedSendCount?: (Long|null);
|
|
1436
1548
|
}
|
|
1437
1549
|
|
|
1438
|
-
/**
|
|
1550
|
+
/**
|
|
1551
|
+
* StreamOutStatus provides status information for an outbound stream.
|
|
1552
|
+
* It contains data about the instantaneous performance of the stream
|
|
1553
|
+
*/
|
|
1439
1554
|
class StreamOutStatus implements IStreamOutStatus {
|
|
1440
1555
|
|
|
1441
1556
|
/**
|
|
@@ -1447,6 +1562,9 @@ export namespace synapse {
|
|
|
1447
1562
|
/** StreamOutStatus throughputMbps. */
|
|
1448
1563
|
public throughputMbps: number;
|
|
1449
1564
|
|
|
1565
|
+
/** StreamOutStatus failedSendCount. */
|
|
1566
|
+
public failedSendCount: Long;
|
|
1567
|
+
|
|
1450
1568
|
/**
|
|
1451
1569
|
* Creates a new StreamOutStatus instance using the specified properties.
|
|
1452
1570
|
* @param [properties] Properties to set
|
package/dist/api/api.js
CHANGED
|
@@ -3053,18 +3053,230 @@
|
|
|
3053
3053
|
};
|
|
3054
3054
|
return DiskWriterConfig;
|
|
3055
3055
|
})();
|
|
3056
|
+
synapse.UDPUnicastConfig = (function () {
|
|
3057
|
+
/**
|
|
3058
|
+
* Properties of a UDPUnicastConfig.
|
|
3059
|
+
* @memberof synapse
|
|
3060
|
+
* @interface IUDPUnicastConfig
|
|
3061
|
+
* @property {string|null} [destinationAddress] UDPUnicastConfig destinationAddress
|
|
3062
|
+
* @property {number|null} [destinationPort] UDPUnicastConfig destinationPort
|
|
3063
|
+
*/
|
|
3064
|
+
/**
|
|
3065
|
+
* Constructs a new UDPUnicastConfig.
|
|
3066
|
+
* @memberof synapse
|
|
3067
|
+
* @classdesc UDPUnicastConfig defines the configuration parameters for UDP unicast transport.
|
|
3068
|
+
* @implements IUDPUnicastConfig
|
|
3069
|
+
* @constructor
|
|
3070
|
+
* @param {synapse.IUDPUnicastConfig=} [properties] Properties to set
|
|
3071
|
+
*/
|
|
3072
|
+
function UDPUnicastConfig(properties) {
|
|
3073
|
+
if (properties)
|
|
3074
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3075
|
+
if (properties[keys[i]] != null)
|
|
3076
|
+
this[keys[i]] = properties[keys[i]];
|
|
3077
|
+
}
|
|
3078
|
+
/**
|
|
3079
|
+
* UDPUnicastConfig destinationAddress.
|
|
3080
|
+
* @member {string} destinationAddress
|
|
3081
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3082
|
+
* @instance
|
|
3083
|
+
*/
|
|
3084
|
+
UDPUnicastConfig.prototype.destinationAddress = "";
|
|
3085
|
+
/**
|
|
3086
|
+
* UDPUnicastConfig destinationPort.
|
|
3087
|
+
* @member {number} destinationPort
|
|
3088
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3089
|
+
* @instance
|
|
3090
|
+
*/
|
|
3091
|
+
UDPUnicastConfig.prototype.destinationPort = 0;
|
|
3092
|
+
/**
|
|
3093
|
+
* Creates a new UDPUnicastConfig instance using the specified properties.
|
|
3094
|
+
* @function create
|
|
3095
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3096
|
+
* @static
|
|
3097
|
+
* @param {synapse.IUDPUnicastConfig=} [properties] Properties to set
|
|
3098
|
+
* @returns {synapse.UDPUnicastConfig} UDPUnicastConfig instance
|
|
3099
|
+
*/
|
|
3100
|
+
UDPUnicastConfig.create = function create(properties) {
|
|
3101
|
+
return new UDPUnicastConfig(properties);
|
|
3102
|
+
};
|
|
3103
|
+
/**
|
|
3104
|
+
* Encodes the specified UDPUnicastConfig message. Does not implicitly {@link synapse.UDPUnicastConfig.verify|verify} messages.
|
|
3105
|
+
* @function encode
|
|
3106
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3107
|
+
* @static
|
|
3108
|
+
* @param {synapse.IUDPUnicastConfig} message UDPUnicastConfig message or plain object to encode
|
|
3109
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3110
|
+
* @returns {$protobuf.Writer} Writer
|
|
3111
|
+
*/
|
|
3112
|
+
UDPUnicastConfig.encode = function encode(message, writer) {
|
|
3113
|
+
if (!writer)
|
|
3114
|
+
writer = $Writer.create();
|
|
3115
|
+
if (message.destinationAddress != null && Object.hasOwnProperty.call(message, "destinationAddress"))
|
|
3116
|
+
writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.destinationAddress);
|
|
3117
|
+
if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort"))
|
|
3118
|
+
writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.destinationPort);
|
|
3119
|
+
return writer;
|
|
3120
|
+
};
|
|
3121
|
+
/**
|
|
3122
|
+
* Encodes the specified UDPUnicastConfig message, length delimited. Does not implicitly {@link synapse.UDPUnicastConfig.verify|verify} messages.
|
|
3123
|
+
* @function encodeDelimited
|
|
3124
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3125
|
+
* @static
|
|
3126
|
+
* @param {synapse.IUDPUnicastConfig} message UDPUnicastConfig message or plain object to encode
|
|
3127
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3128
|
+
* @returns {$protobuf.Writer} Writer
|
|
3129
|
+
*/
|
|
3130
|
+
UDPUnicastConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3131
|
+
return this.encode(message, writer).ldelim();
|
|
3132
|
+
};
|
|
3133
|
+
/**
|
|
3134
|
+
* Decodes a UDPUnicastConfig message from the specified reader or buffer.
|
|
3135
|
+
* @function decode
|
|
3136
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3137
|
+
* @static
|
|
3138
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3139
|
+
* @param {number} [length] Message length if known beforehand
|
|
3140
|
+
* @returns {synapse.UDPUnicastConfig} UDPUnicastConfig
|
|
3141
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3142
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3143
|
+
*/
|
|
3144
|
+
UDPUnicastConfig.decode = function decode(reader, length) {
|
|
3145
|
+
if (!(reader instanceof $Reader))
|
|
3146
|
+
reader = $Reader.create(reader);
|
|
3147
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.synapse.UDPUnicastConfig();
|
|
3148
|
+
while (reader.pos < end) {
|
|
3149
|
+
var tag = reader.uint32();
|
|
3150
|
+
switch (tag >>> 3) {
|
|
3151
|
+
case 1: {
|
|
3152
|
+
message.destinationAddress = reader.string();
|
|
3153
|
+
break;
|
|
3154
|
+
}
|
|
3155
|
+
case 2: {
|
|
3156
|
+
message.destinationPort = reader.uint32();
|
|
3157
|
+
break;
|
|
3158
|
+
}
|
|
3159
|
+
default:
|
|
3160
|
+
reader.skipType(tag & 7);
|
|
3161
|
+
break;
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
return message;
|
|
3165
|
+
};
|
|
3166
|
+
/**
|
|
3167
|
+
* Decodes a UDPUnicastConfig message from the specified reader or buffer, length delimited.
|
|
3168
|
+
* @function decodeDelimited
|
|
3169
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3170
|
+
* @static
|
|
3171
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3172
|
+
* @returns {synapse.UDPUnicastConfig} UDPUnicastConfig
|
|
3173
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3174
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3175
|
+
*/
|
|
3176
|
+
UDPUnicastConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
3177
|
+
if (!(reader instanceof $Reader))
|
|
3178
|
+
reader = new $Reader(reader);
|
|
3179
|
+
return this.decode(reader, reader.uint32());
|
|
3180
|
+
};
|
|
3181
|
+
/**
|
|
3182
|
+
* Verifies a UDPUnicastConfig message.
|
|
3183
|
+
* @function verify
|
|
3184
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3185
|
+
* @static
|
|
3186
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3187
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3188
|
+
*/
|
|
3189
|
+
UDPUnicastConfig.verify = function verify(message) {
|
|
3190
|
+
if (typeof message !== "object" || message === null)
|
|
3191
|
+
return "object expected";
|
|
3192
|
+
if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress"))
|
|
3193
|
+
if (!$util.isString(message.destinationAddress))
|
|
3194
|
+
return "destinationAddress: string expected";
|
|
3195
|
+
if (message.destinationPort != null && message.hasOwnProperty("destinationPort"))
|
|
3196
|
+
if (!$util.isInteger(message.destinationPort))
|
|
3197
|
+
return "destinationPort: integer expected";
|
|
3198
|
+
return null;
|
|
3199
|
+
};
|
|
3200
|
+
/**
|
|
3201
|
+
* Creates a UDPUnicastConfig message from a plain object. Also converts values to their respective internal types.
|
|
3202
|
+
* @function fromObject
|
|
3203
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3204
|
+
* @static
|
|
3205
|
+
* @param {Object.<string,*>} object Plain object
|
|
3206
|
+
* @returns {synapse.UDPUnicastConfig} UDPUnicastConfig
|
|
3207
|
+
*/
|
|
3208
|
+
UDPUnicastConfig.fromObject = function fromObject(object) {
|
|
3209
|
+
if (object instanceof $root.synapse.UDPUnicastConfig)
|
|
3210
|
+
return object;
|
|
3211
|
+
var message = new $root.synapse.UDPUnicastConfig();
|
|
3212
|
+
if (object.destinationAddress != null)
|
|
3213
|
+
message.destinationAddress = String(object.destinationAddress);
|
|
3214
|
+
if (object.destinationPort != null)
|
|
3215
|
+
message.destinationPort = object.destinationPort >>> 0;
|
|
3216
|
+
return message;
|
|
3217
|
+
};
|
|
3218
|
+
/**
|
|
3219
|
+
* Creates a plain object from a UDPUnicastConfig message. Also converts values to other types if specified.
|
|
3220
|
+
* @function toObject
|
|
3221
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3222
|
+
* @static
|
|
3223
|
+
* @param {synapse.UDPUnicastConfig} message UDPUnicastConfig
|
|
3224
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3225
|
+
* @returns {Object.<string,*>} Plain object
|
|
3226
|
+
*/
|
|
3227
|
+
UDPUnicastConfig.toObject = function toObject(message, options) {
|
|
3228
|
+
if (!options)
|
|
3229
|
+
options = {};
|
|
3230
|
+
var object = {};
|
|
3231
|
+
if (options.defaults) {
|
|
3232
|
+
object.destinationAddress = "";
|
|
3233
|
+
object.destinationPort = 0;
|
|
3234
|
+
}
|
|
3235
|
+
if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress"))
|
|
3236
|
+
object.destinationAddress = message.destinationAddress;
|
|
3237
|
+
if (message.destinationPort != null && message.hasOwnProperty("destinationPort"))
|
|
3238
|
+
object.destinationPort = message.destinationPort;
|
|
3239
|
+
return object;
|
|
3240
|
+
};
|
|
3241
|
+
/**
|
|
3242
|
+
* Converts this UDPUnicastConfig to JSON.
|
|
3243
|
+
* @function toJSON
|
|
3244
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3245
|
+
* @instance
|
|
3246
|
+
* @returns {Object.<string,*>} JSON object
|
|
3247
|
+
*/
|
|
3248
|
+
UDPUnicastConfig.prototype.toJSON = function toJSON() {
|
|
3249
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3250
|
+
};
|
|
3251
|
+
/**
|
|
3252
|
+
* Gets the default type url for UDPUnicastConfig
|
|
3253
|
+
* @function getTypeUrl
|
|
3254
|
+
* @memberof synapse.UDPUnicastConfig
|
|
3255
|
+
* @static
|
|
3256
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3257
|
+
* @returns {string} The default type url
|
|
3258
|
+
*/
|
|
3259
|
+
UDPUnicastConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3260
|
+
if (typeUrlPrefix === undefined) {
|
|
3261
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3262
|
+
}
|
|
3263
|
+
return typeUrlPrefix + "/synapse.UDPUnicastConfig";
|
|
3264
|
+
};
|
|
3265
|
+
return UDPUnicastConfig;
|
|
3266
|
+
})();
|
|
3056
3267
|
synapse.StreamOutConfig = (function () {
|
|
3057
3268
|
/**
|
|
3058
3269
|
* Properties of a StreamOutConfig.
|
|
3059
3270
|
* @memberof synapse
|
|
3060
3271
|
* @interface IStreamOutConfig
|
|
3061
3272
|
* @property {string|null} [label] StreamOutConfig label
|
|
3062
|
-
* @property {
|
|
3273
|
+
* @property {synapse.IUDPUnicastConfig|null} [udpUnicast] StreamOutConfig udpUnicast
|
|
3063
3274
|
*/
|
|
3064
3275
|
/**
|
|
3065
3276
|
* Constructs a new StreamOutConfig.
|
|
3066
3277
|
* @memberof synapse
|
|
3067
|
-
* @classdesc
|
|
3278
|
+
* @classdesc StreamOutConfig defines the configuration for an outbound data stream.
|
|
3279
|
+
* Clients can request to create a new outbound stream by providing a transport
|
|
3068
3280
|
* @implements IStreamOutConfig
|
|
3069
3281
|
* @constructor
|
|
3070
3282
|
* @param {synapse.IStreamOutConfig=} [properties] Properties to set
|
|
@@ -3083,12 +3295,24 @@
|
|
|
3083
3295
|
*/
|
|
3084
3296
|
StreamOutConfig.prototype.label = "";
|
|
3085
3297
|
/**
|
|
3086
|
-
* StreamOutConfig
|
|
3087
|
-
* @member {
|
|
3298
|
+
* StreamOutConfig udpUnicast.
|
|
3299
|
+
* @member {synapse.IUDPUnicastConfig|null|undefined} udpUnicast
|
|
3300
|
+
* @memberof synapse.StreamOutConfig
|
|
3301
|
+
* @instance
|
|
3302
|
+
*/
|
|
3303
|
+
StreamOutConfig.prototype.udpUnicast = null;
|
|
3304
|
+
// OneOf field names bound to virtual getters and setters
|
|
3305
|
+
var $oneOfFields;
|
|
3306
|
+
/**
|
|
3307
|
+
* StreamOutConfig transport.
|
|
3308
|
+
* @member {"udpUnicast"|undefined} transport
|
|
3088
3309
|
* @memberof synapse.StreamOutConfig
|
|
3089
3310
|
* @instance
|
|
3090
3311
|
*/
|
|
3091
|
-
StreamOutConfig.prototype
|
|
3312
|
+
Object.defineProperty(StreamOutConfig.prototype, "transport", {
|
|
3313
|
+
get: $util.oneOfGetter($oneOfFields = ["udpUnicast"]),
|
|
3314
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3315
|
+
});
|
|
3092
3316
|
/**
|
|
3093
3317
|
* Creates a new StreamOutConfig instance using the specified properties.
|
|
3094
3318
|
* @function create
|
|
@@ -3114,8 +3338,8 @@
|
|
|
3114
3338
|
writer = $Writer.create();
|
|
3115
3339
|
if (message.label != null && Object.hasOwnProperty.call(message, "label"))
|
|
3116
3340
|
writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.label);
|
|
3117
|
-
if (message.
|
|
3118
|
-
writer.uint32(/* id 2, wireType 2 =*/ 18).
|
|
3341
|
+
if (message.udpUnicast != null && Object.hasOwnProperty.call(message, "udpUnicast"))
|
|
3342
|
+
$root.synapse.UDPUnicastConfig.encode(message.udpUnicast, writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim();
|
|
3119
3343
|
return writer;
|
|
3120
3344
|
};
|
|
3121
3345
|
/**
|
|
@@ -3153,7 +3377,7 @@
|
|
|
3153
3377
|
break;
|
|
3154
3378
|
}
|
|
3155
3379
|
case 2: {
|
|
3156
|
-
message.
|
|
3380
|
+
message.udpUnicast = $root.synapse.UDPUnicastConfig.decode(reader, reader.uint32());
|
|
3157
3381
|
break;
|
|
3158
3382
|
}
|
|
3159
3383
|
default:
|
|
@@ -3189,12 +3413,18 @@
|
|
|
3189
3413
|
StreamOutConfig.verify = function verify(message) {
|
|
3190
3414
|
if (typeof message !== "object" || message === null)
|
|
3191
3415
|
return "object expected";
|
|
3416
|
+
var properties = {};
|
|
3192
3417
|
if (message.label != null && message.hasOwnProperty("label"))
|
|
3193
3418
|
if (!$util.isString(message.label))
|
|
3194
3419
|
return "label: string expected";
|
|
3195
|
-
if (message.
|
|
3196
|
-
|
|
3197
|
-
|
|
3420
|
+
if (message.udpUnicast != null && message.hasOwnProperty("udpUnicast")) {
|
|
3421
|
+
properties.transport = 1;
|
|
3422
|
+
{
|
|
3423
|
+
var error = $root.synapse.UDPUnicastConfig.verify(message.udpUnicast);
|
|
3424
|
+
if (error)
|
|
3425
|
+
return "udpUnicast." + error;
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3198
3428
|
return null;
|
|
3199
3429
|
};
|
|
3200
3430
|
/**
|
|
@@ -3211,8 +3441,11 @@
|
|
|
3211
3441
|
var message = new $root.synapse.StreamOutConfig();
|
|
3212
3442
|
if (object.label != null)
|
|
3213
3443
|
message.label = String(object.label);
|
|
3214
|
-
if (object.
|
|
3215
|
-
|
|
3444
|
+
if (object.udpUnicast != null) {
|
|
3445
|
+
if (typeof object.udpUnicast !== "object")
|
|
3446
|
+
throw TypeError(".synapse.StreamOutConfig.udpUnicast: object expected");
|
|
3447
|
+
message.udpUnicast = $root.synapse.UDPUnicastConfig.fromObject(object.udpUnicast);
|
|
3448
|
+
}
|
|
3216
3449
|
return message;
|
|
3217
3450
|
};
|
|
3218
3451
|
/**
|
|
@@ -3228,14 +3461,15 @@
|
|
|
3228
3461
|
if (!options)
|
|
3229
3462
|
options = {};
|
|
3230
3463
|
var object = {};
|
|
3231
|
-
if (options.defaults)
|
|
3464
|
+
if (options.defaults)
|
|
3232
3465
|
object.label = "";
|
|
3233
|
-
object.multicastGroup = "";
|
|
3234
|
-
}
|
|
3235
3466
|
if (message.label != null && message.hasOwnProperty("label"))
|
|
3236
3467
|
object.label = message.label;
|
|
3237
|
-
if (message.
|
|
3238
|
-
object.
|
|
3468
|
+
if (message.udpUnicast != null && message.hasOwnProperty("udpUnicast")) {
|
|
3469
|
+
object.udpUnicast = $root.synapse.UDPUnicastConfig.toObject(message.udpUnicast, options);
|
|
3470
|
+
if (options.oneofs)
|
|
3471
|
+
object.transport = "udpUnicast";
|
|
3472
|
+
}
|
|
3239
3473
|
return object;
|
|
3240
3474
|
};
|
|
3241
3475
|
/**
|
|
@@ -3270,11 +3504,13 @@
|
|
|
3270
3504
|
* @memberof synapse
|
|
3271
3505
|
* @interface IStreamOutStatus
|
|
3272
3506
|
* @property {number|null} [throughputMbps] StreamOutStatus throughputMbps
|
|
3507
|
+
* @property {Long|null} [failedSendCount] StreamOutStatus failedSendCount
|
|
3273
3508
|
*/
|
|
3274
3509
|
/**
|
|
3275
3510
|
* Constructs a new StreamOutStatus.
|
|
3276
3511
|
* @memberof synapse
|
|
3277
|
-
* @classdesc
|
|
3512
|
+
* @classdesc StreamOutStatus provides status information for an outbound stream.
|
|
3513
|
+
* It contains data about the instantaneous performance of the stream
|
|
3278
3514
|
* @implements IStreamOutStatus
|
|
3279
3515
|
* @constructor
|
|
3280
3516
|
* @param {synapse.IStreamOutStatus=} [properties] Properties to set
|
|
@@ -3292,6 +3528,13 @@
|
|
|
3292
3528
|
* @instance
|
|
3293
3529
|
*/
|
|
3294
3530
|
StreamOutStatus.prototype.throughputMbps = 0;
|
|
3531
|
+
/**
|
|
3532
|
+
* StreamOutStatus failedSendCount.
|
|
3533
|
+
* @member {Long} failedSendCount
|
|
3534
|
+
* @memberof synapse.StreamOutStatus
|
|
3535
|
+
* @instance
|
|
3536
|
+
*/
|
|
3537
|
+
StreamOutStatus.prototype.failedSendCount = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
|
|
3295
3538
|
/**
|
|
3296
3539
|
* Creates a new StreamOutStatus instance using the specified properties.
|
|
3297
3540
|
* @function create
|
|
@@ -3317,6 +3560,8 @@
|
|
|
3317
3560
|
writer = $Writer.create();
|
|
3318
3561
|
if (message.throughputMbps != null && Object.hasOwnProperty.call(message, "throughputMbps"))
|
|
3319
3562
|
writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.throughputMbps);
|
|
3563
|
+
if (message.failedSendCount != null && Object.hasOwnProperty.call(message, "failedSendCount"))
|
|
3564
|
+
writer.uint32(/* id 2, wireType 0 =*/ 16).uint64(message.failedSendCount);
|
|
3320
3565
|
return writer;
|
|
3321
3566
|
};
|
|
3322
3567
|
/**
|
|
@@ -3353,6 +3598,10 @@
|
|
|
3353
3598
|
message.throughputMbps = reader.float();
|
|
3354
3599
|
break;
|
|
3355
3600
|
}
|
|
3601
|
+
case 2: {
|
|
3602
|
+
message.failedSendCount = reader.uint64();
|
|
3603
|
+
break;
|
|
3604
|
+
}
|
|
3356
3605
|
default:
|
|
3357
3606
|
reader.skipType(tag & 7);
|
|
3358
3607
|
break;
|
|
@@ -3389,6 +3638,9 @@
|
|
|
3389
3638
|
if (message.throughputMbps != null && message.hasOwnProperty("throughputMbps"))
|
|
3390
3639
|
if (typeof message.throughputMbps !== "number")
|
|
3391
3640
|
return "throughputMbps: number expected";
|
|
3641
|
+
if (message.failedSendCount != null && message.hasOwnProperty("failedSendCount"))
|
|
3642
|
+
if (!$util.isInteger(message.failedSendCount) && !(message.failedSendCount && $util.isInteger(message.failedSendCount.low) && $util.isInteger(message.failedSendCount.high)))
|
|
3643
|
+
return "failedSendCount: integer|Long expected";
|
|
3392
3644
|
return null;
|
|
3393
3645
|
};
|
|
3394
3646
|
/**
|
|
@@ -3405,6 +3657,15 @@
|
|
|
3405
3657
|
var message = new $root.synapse.StreamOutStatus();
|
|
3406
3658
|
if (object.throughputMbps != null)
|
|
3407
3659
|
message.throughputMbps = Number(object.throughputMbps);
|
|
3660
|
+
if (object.failedSendCount != null)
|
|
3661
|
+
if ($util.Long)
|
|
3662
|
+
(message.failedSendCount = $util.Long.fromValue(object.failedSendCount)).unsigned = true;
|
|
3663
|
+
else if (typeof object.failedSendCount === "string")
|
|
3664
|
+
message.failedSendCount = parseInt(object.failedSendCount, 10);
|
|
3665
|
+
else if (typeof object.failedSendCount === "number")
|
|
3666
|
+
message.failedSendCount = object.failedSendCount;
|
|
3667
|
+
else if (typeof object.failedSendCount === "object")
|
|
3668
|
+
message.failedSendCount = new $util.LongBits(object.failedSendCount.low >>> 0, object.failedSendCount.high >>> 0).toNumber(true);
|
|
3408
3669
|
return message;
|
|
3409
3670
|
};
|
|
3410
3671
|
/**
|
|
@@ -3420,10 +3681,22 @@
|
|
|
3420
3681
|
if (!options)
|
|
3421
3682
|
options = {};
|
|
3422
3683
|
var object = {};
|
|
3423
|
-
if (options.defaults)
|
|
3684
|
+
if (options.defaults) {
|
|
3424
3685
|
object.throughputMbps = 0;
|
|
3686
|
+
if ($util.Long) {
|
|
3687
|
+
var long = new $util.Long(0, 0, true);
|
|
3688
|
+
object.failedSendCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
3689
|
+
}
|
|
3690
|
+
else
|
|
3691
|
+
object.failedSendCount = options.longs === String ? "0" : 0;
|
|
3692
|
+
}
|
|
3425
3693
|
if (message.throughputMbps != null && message.hasOwnProperty("throughputMbps"))
|
|
3426
3694
|
object.throughputMbps = options.json && !isFinite(message.throughputMbps) ? String(message.throughputMbps) : message.throughputMbps;
|
|
3695
|
+
if (message.failedSendCount != null && message.hasOwnProperty("failedSendCount"))
|
|
3696
|
+
if (typeof message.failedSendCount === "number")
|
|
3697
|
+
object.failedSendCount = options.longs === String ? String(message.failedSendCount) : message.failedSendCount;
|
|
3698
|
+
else
|
|
3699
|
+
object.failedSendCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedSendCount) : options.longs === Number ? new $util.LongBits(message.failedSendCount.low >>> 0, message.failedSendCount.high >>> 0).toNumber(true) : message.failedSendCount;
|
|
3427
3700
|
return object;
|
|
3428
3701
|
};
|
|
3429
3702
|
/**
|