Real-Time Protocol (RTP & RTCP)
Prerequisites
This node-type requires libre (>= 0.6.0).
Implementation
The source code of the node-type is available here: https://github.com/VILLASframework/node/blob/master/lib/nodes/rtp.cpp
Configuration
Format Object (object) or Format Name (string) (format_spec) | |
| rtcp | boolean Enable Real-time Control Protocol (RTCP) |
object | |
object (Output configuration (sent out by VILLASnode)) | |
object (Input configuration (received by VILLASnode)) | |
| vectorize | integer Default: 1 This setting allows to send multiple samples in a single message to the destination nodes. The value of this setting determines how many samples will be combined into one packet. |
Array of Hook Object (object) or Hook Name (string) (hook_list) | |
| builtin | boolean (Builtin hook functions) Default: true By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled. |
{- "format": "villas.human",
- "rtcp": true,
- "aimd": {
- "a": 10,
- "b": 0.5,
- "Kp": 1,
- "Ki": 0,
- "Kd": 0,
- "rate_min": 1,
- "rate_source": 2000,
- "rate_init": 0,
- "log": "string",
- "hook_type": "decimate"
}, - "out": {
- "netem": {
- "enabled": true,
- "delay": 0,
- "jitter": 0,
- "distribution": "uniform",
- "loss": 0,
- "duplicate": 0,
- "corrupt": 0
}, - "vectorize": 0,
- "hooks": [
- "print",
- {
- "type": "limit_rate",
- "rate": 1000
}
]
}, - "in": {
- "signals": [
- {
- "name": "tap_position",
- "type": "integer",
- "init": 0
}, - {
- "name": "voltage",
- "type": "float",
- "unit": "V",
- "init": 230
}
], - "vectorize": 1,
- "hooks": [
- "print",
- {
- "type": "limit_rate",
- "rate": 1000
}
]
}, - "vectorize": 1,
- "hooks": [
- "print",
- {
- "type": "limit_rate",
- "rate": 1000
}
], - "builtin": true
}Example
node/etc/examples/nodes/rtp.conf
nodes = {
rtp_node = {
type = "rtp"
format = {
type = "raw"
bits = 32
endianess = "big"
}
rtcp = false
aimd = {
a = 10
b = 0.5
Kp = 1.0
Ki = 0.0
Kd = 0
rate_min = 100
rate_init = 2000
rate_source = 10000
log = "aimd-rates-%Y_%m_%d_%s.log"
hook_type = "limit_rate"
}
in = {
address = "0.0.0.0:12000"
signals = {
count = 3
type = "float"
}
}
out = {
address = "127.0.0.1:12000"
# Network emulation settings
netem = {
enabled = false
# Additional latency in microseconds
delay = 100000
# Packet loss in percent
loss = 10
}
}
}
}