diff --git a/Agora_doxygen.conf b/Agora_doxygen.conf index e7c028892..bd8e54395 100755 --- a/Agora_doxygen.conf +++ b/Agora_doxygen.conf @@ -790,7 +790,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = +INPUT = ./ ./README.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -820,11 +820,6 @@ FILE_PATTERNS = *.c \ *.cxx \ *.cpp \ *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ *.inl \ *.idl \ *.ddl \ @@ -834,31 +829,16 @@ FILE_PATTERNS = *.c \ *.hxx \ *.hpp \ *.h++ \ - *.cs \ - *.d \ - *.php \ - *.php4 \ - *.php5 \ - *.phtml \ *.inc \ *.m \ *.markdown \ - *.md \ *.mm \ *.dox \ *.py \ *.pyw \ - *.f90 \ - *.f95 \ - *.f03 \ - *.f08 \ - *.f \ - *.for \ - *.tcl \ *.vhd \ *.vhdl \ - *.ucf \ - *.qsf + CONTRIBUTING.md \ # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. @@ -873,7 +853,10 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = +EXCLUDE = src/third_party \ + python/ \ + matlab/ \ + idl/ # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -982,7 +965,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = README.md #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1461,7 +1444,7 @@ ECLIPSE_DOC_ID = org.doxygen.Project # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -DISABLE_INDEX = YES +DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag diff --git a/CMakeLists.txt b/CMakeLists.txt index a2714418c..338aaccb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,16 @@ cmake_minimum_required(VERSION 2.8.8) include(CheckCSourceRuns) cmake_policy(SET CMP0054 NEW) -project(Agora) +#Allow project version +cmake_policy(SET CMP0048 NEW) +project(Agora VERSION 1.0.0) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) set(GCC_COVERAGE_COMPILE_FLAGS "-faligned-new") endif() set(SOURCE_DIR ".") +configure_file(${CMAKE_SOURCE_DIR}/src/common/version_config.h.in ${CMAKE_SOURCE_DIR}/src/common/version_config.h) option(FORCE_BUILD_PATH "Hardcode the build directory path to be 'Agora/build/'" ON) if(FORCE_BUILD_PATH) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 181f00da6..bcb4969e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ * Format the source code using `clang-format`. Running `clang-format -i *.cc *.h` will format source and header files in the current directory to match Agora's code style. There are also editor plugins for `clang-format` - ([example](https://github.com/google/vim_codefmt)). We recommend using clang-format version 11 or above. + ([example](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format)). We recommend using clang-format version 11 or above. ## Code style @@ -34,43 +34,43 @@ For example, macros are acceptable to disable compilation of files that depend on proprietary libraries. So instead of: - ``` +
#ifdef USE_LDPC std::string raw_data_filename = x; #else std::string raw_data_filename = y; #endif - ``` +prefer: - ``` +
std::string raw_data_filename = kUseLDPC ? x : y; - ``` +* Avoid magic numbers. Instead of: - ``` +
n_rows = (ldpc_config.bg == 1) ? 46 : 42; - ``` +prefer: - ``` +
n_rows = (ldpc_config.bg == 1) ? kBg1RowTotal : kBg2RowTotal; - ``` +* Avoid variable copies. Instead of `size_t fft_thread_num = cfg->fft_thread_num;`, prefer using `cfg->fft_thread_num` directly. * Use enum classes instead of enums or macros. So instead of: - ``` +
#define PRINT_RX_PILOTS 0 #define PRINT_RX 1 - ``` +prefer: - ``` - enum class PrintType {kRXPilots, kRX}; - ``` +
+ enum class PrintType {kRXPilots, kRX}; +* Add newlines between distinct blocks of code. See the vertical whitespace [section](https://google.github.io/styleguide/cppguide.html#Vertical_Whitespace). @@ -91,14 +91,14 @@ C-style casts. * Use auto type deduction when the type is clear. So instead of: - ``` +
struct Packet *pkt = new struct Packet[kNumPackets]; - ``` +prefer: - ``` +
auto *pkt = new Packet[kNumPackets]; - ``` +## Documentation requirements * Each file must have a comment at the top explaining what the file's purpose. diff --git a/README.md b/README.md index 3a354f0a6..0f2d80285 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Agora is a complete software realization of real-time massive MIMO baseband proc Some highlights: * Agora currently supports 64x16 MU-MIMO (64 RRU antennas and 16 UEs) with 20 MHz bandwidth and 64QAM modulation, on a 36-core server with AVX512 support. -* Agora is configurable in terms of numbers of RRU antennas and UEs, bandwidth, moduation orders, LDPC code rates. +* Agora is configurable in terms of numbers of RRU antennas and UEs, bandwidth, modulation orders, LDPC code rates. * Agora supports an emulated RRU and UEs with a high-performance packet generator. * Agora has been tested with real RRUs with up to 64 antennas and up to 8 UEs. The RRU and UE devices are available from [Skylark Wireless](https://skylarkwireless.com). @@ -26,10 +26,13 @@ Some highlights: Agora currently only builds and runs on Linux, and has been tested on Ubuntu 16.04, 18.04, and 20.04. Agora requires CMake 2.8+ and works with both GNU and Intel compilers with C++17 support. ## Setting up the build environment - * Setup CI: run `./config_ci.sh` - * Note for developers: You must run this command before checking out your new feature brach. Do not use `_` in your branch name. Use `-` instead. + * Setup CI: run +
+ $ ./config_ci.sh ++ * Note for developers: You must run this command before checking out your new feature branch. Do not use `_` in your branch name. Use `-` instead. - * See `scripts/ubuntu.sh` for required packages, including Linux packages, gtest, Armadillo, nlohmann json-dev and SoapySDR, and the corresponding versions. Run `./scripts/ubuntu.sh` to install these packages. + * See `scripts/ubuntu.sh` for required packages, including Linux packages, gtest, Armadillo, and SoapySDR, and the corresponding versions. Run `./scripts/ubuntu.sh` to install these packages. * Download and install Intel libraries: * Install Intel FlexRAN's FEC SDK for LDPC encoding and decoding * Download [Intel FlexRAN's FEC @@ -45,22 +48,22 @@ Some highlights: For example, if Intel compiler is in `/opt`, run `source $(find 2>/dev/null /opt -name compilervars.sh) intel64`. After running this command, ensure that `icc --version` reports 19.0.4. - * After instaling `icc 19.04`, compile FlexRAN as follows: - ``` - sudo chmod -R a+rwX FlexRAN-FEC-SDK-19-04/ # Allow all users read-write access - cd /opt/FlexRAN-FEC-SDK-19-04/sdk/ - sed -i '/add_compile_options("-Wall")/a \ \ add_compile_options("-ffreestanding")' cmake/intel-compile-options.cmake - ./create-makefiles-linux.sh - cd build-avx512-icc # or build-avx2-icc - make -j - ``` + * After installing `icc 19.04`, compile FlexRAN as follows: +
+ $ sudo chmod -R a+rwX FlexRAN-FEC-SDK-19-04/ # Allow all users read-write access + $ cd /opt/FlexRAN-FEC-SDK-19-04/sdk/ + $ sed -i '/add_compile_options("-Wall")/a \ \ add_compile_options("-ffreestanding")' cmake/intel-compile-options.cmake + $ ./create-makefiles-linux.sh + $ cd build-avx512-icc # or build-avx2-icc + $ make -j +* Install Intel MKL - See [instructions](https://software.intel.com/content/www/us/en/develop/articles/installing-intel-free-libs-and-python-apt-repo.html). * MKL can also be installed from Intel Parallel Studio XE. Agora has been tested with 2019 and 2020 versions. * **NOTE**: To enable JIT acceleration applied for matrix multiplication in the code, MKL version after 2019 update 3 is required. * Optional: DPDK - * [DPDK](http://core.dpdk.org/download/) verison 20.02.1 is tested with + * [DPDK](http://core.dpdk.org/download/) version 20.02.1 is tested with Intel 40 GbE and Mellanox 100 GbE NICs in Agora. * To install it, run `sudo make install T=x86_64-native-linuxapp-gcc DESTDIR=/usr -j` @@ -68,72 +71,119 @@ Some highlights: ## Building and running with emulated RRU We provide a high performance [packet generator](simulator) to emulate the RRU. This generator allows Agora to run and be tested without actual RRU hardware. The following are steps to set up both Agora and the packet generator. - * Build Agora. This step also builds the sender, a data generator that generates random input data files, an end-to-end test that checks correctness of end results for both uplink and downlink, and several unit tests for testing either performance or correctness of invididual functions. - ``` - cd Agora - mkdir build - cd build - cmake .. - make -j - ``` + * Build Agora. This step also builds the sender, a data generator that generates random input data files, an end-to-end test that checks correctness of end results for both uplink and downlink, and several unit tests for testing either performance or correctness of individual functions. +
+ $ cd Agora + $ mkdir build + $ cd build + $ cmake .. + $ make -j +* Run end-to-end test to check correctness (uplink, downlink and combined tests should all pass if everything is set up correctly). - ``` - ./test/test_agora/test_agora.sh 10 out % Runs test for 10 iterations - ``` +
+ $ ./test/test_agora/test_agora.sh 10 out # Runs test for 10 iterations +* Run Agora with emulated RRU traffic * **NOTE**: We recommend running Agora and the emulated RRU on two different machines. If you are running them on the same machine, make sure Agora and the emulated RRU are using different set of cores, otherwise there will be performance slow down. * First, return to the base directory (`cd ..`), then run - `./build/data_generator --conf_file data/tddconfig-sim-ul.json` to generate data - files. - * In one terminal, run `./build/agora --conf_file data/tddconfig-sim-ul.json` to - start Agora with uplink configuration. - * In another terminal, run `./build/sender --num_threads=2 --core_offset=1 --frame_duration=5000 --enable_slow_start=1 --conf_file=data/tddconfig-sim-ul.json` to start the emulated RRU - with uplink configuration. +
+ $ ./build/data_generator --conf_file data/tddconfig-sim-ul.json ++ to generate data files. + * In one terminal, run +
+ $ ./build/agora --conf_file data/tddconfig-sim-ul.json ++ to start Agora with uplink configuration. + * In another terminal, run +
+ $ ./build/sender --num_threads=2 --core_offset=1 --frame_duration=5000 --enable_slow_start=1 --conf_file=data/tddconfig-sim-ul.json ++ to start the emulated RRU with uplink configuration. * The above steps use Linux networking stack for packet I/O. Agora also supports using DPDK - to bypass the kernel for packet I/O. To enable DPDK, run `cmake -DUSE_DPDK=1 ..; make -j` to - rebuild code for Mellanox NICs; for Intel NICs, run `cmake -DUSE_DPDK=1 -DUSE_MLX_NIC=0 ..; make -j` + to bypass the kernel for packet I/O. To enable DPDK, run +
+ $ cmake -DUSE_DPDK=1 ..; make -j ++ to rebuild code for Mellanox NICs; for Intel NICs, run +
+ $ cmake -DUSE_DPDK=1 -DUSE_MLX_NIC=0 ..; make -j +to exclude Mellanox libraries in the build. - When running the emulated RRU with DPDK, it is required to set the MAC address - of the NIC used by Agora. To do this, pass `--server_mac_addr=` to `sender`. + When running the emulated RRU with DPDK, it is required to set the MAC address of the NIC used by Agora. To do this, pass `--server_mac_addr=` to `sender`. * To test the real-time performance of Agora, see the [Running performance test](#running-performance-test) section below. * Run Agora with channel simulator and clients * First, return to the base directory (`cd ..`), then run - `./build/data_generator --conf_file data/bs-sim.json` to generate data files. - * In one terminal, run `./build/user --conf_file data/ue-sim.json` to start clients with +
+ $ ./build/data_generator --conf_file data/bs-sim.json ++ to generate data files. + * In one terminal, run +
+ $ ./build/user --conf_file data/ue-sim.json ++ to start clients with combined uplink & downlink configuration. - * In another terminal, run `./build/chsim --bs_threads 1 --ue_threads 1 --worker_threads 2 --core_offset 24 --bs_conf_file data/bs-sim.json --ue_conf_file data/ue-sim.json` - * In another terminal, run `./build/agora data/bs-sim.json` to start Agora with the combined configuration. + * In another terminal, run +
+ $ ./build/chsim --bs_threads 1 --ue_threads 1 --worker_threads 2 --core_offset 24 --bs_conf_file data/bs-sim.json --ue_conf_file data/ue-sim.json ++ * In another terminal, run +
+ $ ./build/agora data/bs-sim.json ++ to start Agora with the combined configuration. * Note: make sure Agora and sender are using different set of cores, otherwise there will be performance slow down. * Run Agora with channel simulator, clients, and mac enabled. - * Compile the code with `cmake .. -DENABLE_MAC=true` + * Compile the code with +
+ $ cmake .. -DENABLE_MAC=true +* Uplink Testing (`--conf_file ue-mac-ul-sim.json / bs-mac-ul-sim.json`) * Downlink Testing (`--conf_file ue-mac-dl-sim.json / bs-mac-dl-sim.json`) * Combined Testing (`--conf_file ue-mac-sim.json / bs-mac-sim.json`) * Terminal 1: - `./build/data_generator --conf_file data/ue-mac-sim.json` to generate data files. - `./build/user -conf_file data/ue-mac-sim.json` to start users. +
+ $./build/data_generator --conf_file data/ue-mac-sim.json ++ to generate data files. +
+ $./build/user --conf_file data/ue-mac-sim.json ++ to start users. * Terminal 2: - `./build/chsim --bs_threads 1 --ue_threads 1 --worker_threads 2 --core_offset 28 --bs_conf_file data/bs-mac-sim.json --ue_conf_file data/ue-mac-sim.json` to run the channel simulator +
+ $ ./build/chsim --bs_threads 1 --ue_threads 1 --worker_threads 2 --core_offset 28 --bs_conf_file data/bs-mac-sim.json --ue_conf_file data/ue-mac-sim.json ++ to run the channel simulator * Terminal 3: - `./build/macuser --enable_slow_start 1 --conf_file data/ue-mac-sim.json` to run to user mac app. Specify --data_file "" to generate patterned data and --conf_file options as necessary. +
+ $ ./build/macuser --enable_slow_start 1 --conf_file data/ue-mac-sim.json ++ to run to user mac app. Specify `--data_file ""` to generate patterned data and `--conf_file` options as necessary. * Terminal 4: - `./build/agora --conf_file data/bs-mac-sim.json` run agora before running macbs. Run macuser -> agora -> macbs in quick succession. +
+ $ ./build/agora --conf_file data/bs-mac-sim.json ++ run agora before running macbs. Run macuser -> agora -> macbs in quick succession. * Terminal 5: - `./build/macbs --enable_slow_start 1 --conf_file data/bs-mac-sim.json ` to run to base station mac app. pecify --data_file "" to generate patterned data and --conf_file options as necessary. - * Note: make sure agora / user / chsim / macuser / macbs are using different set of cores,otherwise there will be performance slow down. +
+ $ ./build/macbs --enable_slow_start 1 --conf_file data/bs-mac-sim.json ++ to run to base station mac app. specify `--data_file ""` to generate patterned data and `--conf_file` options as necessary. + * Note: make sure agora / user / chsim / macuser / macbs are using different set of cores, otherwise there will be performance slow down. * To run with real wireless traffic from Faros/Iris hardware UEs, see the [Agora with real RRU](#agora-with-real-rru) section below. ## Building and running with real RRU -Agora suports a 64-antenna -Faros base station as RRU and Iris UE devices. Both are commercially available from +Agora supports a 64-antenna Faros base station as RRU and Iris UE devices. Both are commercially available from [Skylark Wireless](https://skylarkwireless.com) and are used in the [POWER-RENEW PAWR testbed](https://powderwireless.net/). Both Faros and Iris have their roots in the [Argos massive MIMO base station](https://www.yecl.org/argos/), especially [ArgosV3](https://www.yecl.org/argos/pubs/Shepard-MobiCom17-Demo.pdf). Agora also supports USRP-based RRU and UEs. @@ -184,11 +234,17 @@ to get enough throughput for the traffic of 64 antennas. To reduce performance variations, we did the following configurations for the server that runs Agora: * **NOTE**: These steps are not strictly required if you just wanted to try out Agora and do not care about performance variations. * Disable Turbo Boost to reduce performance variation by running - `echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost` +
+ $ echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost +* Set CPU scaling to performance by running - `sudo cpupower frequency-set -g performance`, +
+ $ sudo cpupower frequency-set -g performance +where cpupower can be installed through - `sudo apt-get install -y linux-tools-$(uname -r)` +
+ $ sudo apt-get install -y linux-tools-$(uname -r) +* Turn off hyper-threading. We provide an example bash script (scripts/tune_hyperthread.sh), where the core indices are machine dependent. * Set IRQ affinity to direct OS interrupts away from Agora's cores. @@ -202,14 +258,26 @@ The steps to collect and analyze timestamp traces are as follows: * We use data/tddconfig-sim-ul.json for uplink experiments and data/tddconfig-sim-dl.json for downlink experiments. In our [paper](#documentation), we change “antenna_num”, “ue_num” and “symbol_num_perframe” to different values to collect different data points in the figures. - * Gerenrate source data files by running - `./build/data_generator --conf_file data/tddconfig-sim-ul.json`. - * Run Agora as a real-time process (to prevent OS from doing context swithes) using - `sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} chrt -rr 99 ./build/agora --conf_file data/tddconfig-sim-ul.json`. + * Generate source data files by running +
+ $ ./build/data_generator --conf_file data/tddconfig-sim-ul.json`. ++ * Run Agora as a real-time process (to prevent OS from doing context switches) using +
+ $ sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} chrt -rr 99 ./build/agora --conf_file data/tddconfig-sim-ul.json ++ (**NOTE**: Using a process priority 99 is dangerous. Before running it, - make sure you have directed OS interrupts away from cores used by Agora. If you have not done so, - run `sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./build/agora --conf_file data/tddconfig-sim-ul.json` instead to run Agora as a normal process.) - * Run the emulated RRU using `sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./build/sender --server_mac_addr=00:00:00:00:00:00 --num_threads=2 --core_offset=0 --conf_file=data/tddconfig-sim-ul.json --delay=1000 --enable_slow_start=$2`. + make sure you have directed OS interrupts away from cores used by Agora. If you have not done so, run +
+ $ sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./build/agora --conf_file data/tddconfig-sim-ul.json ++ instead to run Agora as a normal process.) + * Run the emulated RRU using +
+ $ sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./build/sender --server_mac_addr=00:00:00:00:00:00 --num_threads=2 --core_offset=0 \ + --conf_file=data/tddconfig-sim-ul.json --delay=1000 --enable_slow_start=$2 +* The timestamps will be saved in data/timeresult.txt after Agora finishes processing. We can then use a [MATLAB script](matlab/parsedata_ul.m) to process the timestamp trace. * We also provide MATLAB scripts for [uplink](matlab/parse_multi_file_ul) and [downlink](matlab/parse_multi_file_dl) that are able to process multiple timestamp files and generate figures reported in our [paper](#documentation). @@ -224,6 +292,12 @@ Check out [Agora Wiki](https://github.com/jianding17/Agora/wiki) for Agora's design overview and flow diagram that maps massive MIMO baseband processing to the actual code structure. Technical details and performance results can be found in * Jian Ding, Rahman Doost-Mohammady, Anuj Kalia, and Lin Zhong, "Agora: Real-time massive MIMO baseband processing in software," in Proc. of ACM CoNEXT, December 2020 ([PDF](https://www.yecl.org/publications/ding2020conext.pdf), [video](https://dl.acm.org/doi/abs/10.1145/3386367.3431296)). - + +Doxygen documentation generation for Agora can be initiated by running the following command from the repository root directory: +`doxygen Agora_doxygen.conf` +The latest hosted output is located at [Agora Doxygen](https://renew-wireless.org/agora-doxy/html/index.html) + +Other community resources can be found at the [RENEW Wireless Wiki](https://wiki.renew-wireless.org/) + ## Contact Jian Ding (jian.ding@yale.edu) diff --git a/python/bs_app.py b/python/bs_app.py deleted file mode 100755 index 9652b9db4..000000000 --- a/python/bs_app.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/python3 - -# BS-side application that receives data packets from Agora MAC -# packet_size argument should correspond to the number of bits per -# PHY layer frame in Agora -# Running example: ./python/bs_app.py --packet-size 66 --stream-num 1 - -import socket -import sys -import time -from optparse import OptionParser -import signal - - -def bs_datarecv_app(size, streams, base_port): - # Create a UDP socket - sock = [socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - for i in range(streams)] - server_address = [('localhost', base_port + i) for i in range(streams)] - for i in range(streams): - sock[i].bind(server_address[i]) - - signal.signal(signal.SIGINT, signal_handler) - while(True): - for i in range(streams): - message, server = sock[i].recvfrom(size) - print("Stream %d: " % i + "{}".format(list(message))) - - -def signal_handler(signal, frame): - sys.exit(0) - - -def main(): - parser = OptionParser() - parser.add_option("--stream-num", type="int", dest="stream_num", - help="number of user spatial streams", default=1) - parser.add_option("--packet-size", type="int", dest="packet_size", - help="size of packets in bytes", default=66) - parser.add_option("--base-port", type="int", dest="base_port", - help="server base listening port number to transmit data", default=8080) - (options, args) = parser.parse_args() - - bs_datarecv_app(options.packet_size, options.stream_num, options.base_port) - - -if __name__ == '__main__': - main() diff --git a/python/client_app.py b/python/client_app.py deleted file mode 100755 index 18ca741bc..000000000 --- a/python/client_app.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/python3 - -# Client-side application that generates random bit data packets -# and sends through a socket to Agora client MAC for transmission -# through PHY layer. packet_size argument should correspond to the -# number of bits per PHY layer frame in Agora. delay argument -# specifies the delay between transmission of two consecutive packets. -# Running example: ./python/client_app.py --delay 0.00242 --packet-size 66 - -import socket -import sys -import time -import random -from optparse import OptionParser -import signal - - -def client_datagen_app(dly, size, streams, base_port): - # Create a UDP socket - sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - server_address = ('localhost', base_port) - - signal.signal(signal.SIGINT, signal_handler) - while(True): - for u in range(streams): - message = bytearray(random.getrandbits(8) for _ in range(size)) - print("Stream %d: " % u + "{}".format(list(message))) - sock.sendto(message, server_address) - time.sleep(dly) - - -def signal_handler(signal, frame): - sys.exit(0) - - -def main(): - parser = OptionParser() - parser.add_option("--delay", type="float", dest="delay", - help="", default=0.00242) - parser.add_option("--packet-size", type="int", dest="packet_size", - help="size of packets in bytes", default=66) - parser.add_option("--stream-num", type="int", dest="stream_num", - help="number of user spatial streams", default=1) - parser.add_option("--base-port", type="int", dest="base_port", - help="server base listening port number to transmit data", default=9070) - (options, args) = parser.parse_args() - - client_datagen_app(options.delay, options.packet_size, - options.stream_num, options.base_port) - - -if __name__ == '__main__': - main() diff --git a/simulator/chsim_main.cc b/simulator/chsim_main.cc index 66d2f1f49..5699be89f 100644 --- a/simulator/chsim_main.cc +++ b/simulator/chsim_main.cc @@ -5,6 +5,7 @@ #include