forked from usnistgov/ndn-dpdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen-config.ts
65 lines (63 loc) · 1.15 KB
/
gen-config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import type { TgConfig } from "@usnistgov/ndn-dpdk";
import stdout from "stdout-stream";
const cfg: TgConfig = {
face: {
scheme: "ether",
local: "02:00:00:00:00:01",
remote: "01:00:5e:00:17:aa",
mtu: 8800,
},
producer: {
patterns: [
{
prefix: "/P/0",
replies: [
{
payloadLen: 8000,
},
],
},
{
prefix: "/P/1",
replies: [
{
weight: 5,
suffix: "/S100",
freshnessPeriod: "100ms",
payloadLen: 100,
},
{
weight: 5,
suffix: "/S200",
freshnessPeriod: "200ms",
payloadLen: 200,
},
{
weight: 2,
nack: 100,
},
{
weight: 1,
timeout: true,
},
],
},
],
},
consumer: {
patterns: [
{
weight: 10,
prefix: "/Q/0",
},
{
weight: 1,
prefix: "/Q/1",
canBePrefix: true,
mustBeFresh: true,
},
],
interval: "1ms",
},
};
stdout.write(JSON.stringify(cfg));