NETSIM  1.0.1
Hardware-in-the-loopacousticnetworksimulator
core_config.proto
Go to the documentation of this file.
1 import "goby/protobuf/option_extensions.proto";
2 import "goby/middleware/protobuf/app_config.proto";
3 import "goby/zeromq/protobuf/interprocess_config.proto";
4 
5 package netsim.protobuf;
6 
7 message JackConfig
8 {
9  optional string capture_port_prefix = 1 [default = "system:capture_", (goby.field).description="String for JACK port for capturing transmitted data from the modems, which will be appended by the port index. Use 'jack_lsp' to list your ports"];
10  optional string playback_port_prefix = 2 [default = "system:playback_", (goby.field).description="String for JACK port for playing back audio to the modems"];
11  optional int32 port_name_starting_index = 3 [default = 1, (goby.field).description="Starting value for the port index to be appended to 'capture_port_prefix' and 'playback_port_prefix'"];
12  optional int32 max_buffer_size = 4 [default = 100, (goby.field).description="Maximum size of the buffer for captured data (before being published via Goby)"];
13  optional int32 min_playback_buffer_size = 5 [default = 10, (goby.field).description="Minimum size of the playback buffer, i.e. minimum number of frames required to have received from the ProcessorThreads before commencing playback. Increase this value to avoid buffer underruns, decreasing this value will decrease the minimum end-to-end latency of the system (useful for accurately simulating short range propagations)"];
14  optional string server_name = 6 [(goby.field).description="Jack server name (or default if not set"];
15 
16 
17  // end to end delay, subtracted from playback start for discrete mode
18  optional double calibration_seconds = 10 [default = 0, (goby.field).description="Value to subtract from playback start to compensate for the end-to-end latency of the netsim system. This is highly hardware and configuration dependent, so you will need to measure this for your own system to get accurate time-of-flights. The easiest way to do this is to use set your processor to return packets with zero artificial latency (buffer_start_time == captured buffer time) and measure the two way time of flight using the modem hardware ($CCMPC for the WHOI Micro-Modem)"];
19 }
20 
21 message DetectorConfig
22 {
23  optional float detection_threshold = 1 [default = 0.1, (goby.field).description="Absolute JACK float sample value to exceed to be considered a \"detection\""];
24  optional float packet_end_silent_seconds = 3 [default = 0.2, (goby.field).description="How many seconds without a sample above the `detection_threshold` to consider the packet to be over"];
25  optional float packet_begin_prebuffer_seconds = 4 [default = 0.2, (goby.field).description="How many seconds before the detection to include in the packet published to the processor threads"];
26 }
27 
28 message LoggerConfig
29 {
30  optional bool run_logger = 1 [default = true, (goby.field).description="If true, run the logger thread, if false, don't"];
31  optional string log_directory = 2 [default = ".", (goby.field).description="Directory to write logged audio data"];
32 }
33 
34 message BridgeConfig
35 {
36  required int32 first_modem_index = 1 [default = 0, (goby.field).description="index of the first modem handled by this instance of netsim_core (use when running multiple instances of netsim_core)."];
37  required int32 local_number_of_modems = 2 [(goby.field).description="number of modems handled by this instance of netsim_core (use when running multiple instances of netsim_core)."];
38 }
39 
40 
41 message NetSimCoreConfig
42 {
43  optional goby.middleware.protobuf.AppConfig app = 1;
44  optional goby.zeromq.protobuf.InterProcessPortalConfig interprocess = 2;
45 
46  required int32 number_of_modems = 10 [(goby.field).description="how many modems are connected, up to a compile-time maximum set in the CMake variable NETSIM_MAX_MODEMS (default 16)"];
47 
48  optional int32 sampling_freq = 11 [default = 96000, (goby.field).description="Hertz"];
49 
50 
51  optional JackConfig jack = 20;
52  optional DetectorConfig detector = 30;
53 
54  optional LoggerConfig logger = 40;
55 
56  optional BridgeConfig bridge = 50;
57 
58 
59  optional bool continuous = 60 [default = false, (goby.field).description="Process audio data continuously rather than on a packet basis. Not currently supported by the LAMSS virtual ocean processor plugin."];
60 
61 
62 
63  // 1000 = LAMSS Virtual Ocean plugin
64  // 1001 = ProcessorEcho plugin
65  extensions 1000 to max;
66 }