### Install Debugging Tools Source: https://github.com/wn-upf/komondor/blob/master/README.md Install standard debugging utilities on the system. ```bash $ apt-get install gdb valgrind ``` -------------------------------- ### Execute Komondor simulations via CLI Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Command-line examples for running the Komondor main executable with different input configurations for nodes, agents, and MAPC. ```bash cd Code/main ./komondor_main \ --nodes ../input/examples/basic_examples/input_nodes.csv \ --time 10.0 \ --seed 1 # With agents: ./komondor_main \ --nodes ../input/examples/basic_examples/input_nodes.csv \ --agents ../input/examples/basic_examples/agents.csv \ --time 10.0 --seed 1 # With MAPC: ./komondor_main \ --nodes ../input/examples/mapc_example/input_nodes_mapc_example.csv \ --mapc ../input/examples/mapc_example/mapc_cotdma_example.csv \ --time 10.0 --seed 1 ``` -------------------------------- ### Run External ML Model Integration Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Commands to start the Python inference server and execute the Komondor simulation binary. ```bash # Terminal 1 — start the server python3 Code/learning_modules/python_servers/ml_server_passthrough.py /tmp/komondor_ml.sock # Terminal 2 — run the simulation cd Code/main ./komondor_main \ --nodes ../input/examples/external_model_example/input_nodes.csv \ --agents ../input/examples/external_model_example/agents_external.csv \ --time 10.0 --seed 1 ``` -------------------------------- ### Example node CSV row for beamforming Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Shows the required format for appending beamforming configuration to an existing node CSV row. ```text ......;1;8;0.5;90 ``` -------------------------------- ### Define MAPC configuration in CSV Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Example of a MAPC configuration file defining group IDs, coordination methods, and associated BSS identifiers. ```CSV GroupID;Method;CoordinatedBSSIds;ExtraParams 1;CO_TDMA;A,B; 2;CO_SR;B,C;20.0 ``` -------------------------------- ### Minimal NPCA Node CSV Entry Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Example of a minimal CSV configuration line for a node with NPCA enabled and auto-secondary channel selection. ```text ......;0;;;;0;0;1;-1 ``` -------------------------------- ### Rebuild the Project Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Navigate to the main directory and execute the make command to apply configuration changes. ```bash cd Code/main && make ``` -------------------------------- ### Build CompC++ binary Source: https://github.com/wn-upf/komondor/blob/master/Code/compcpp/README.md Run this command in the project directory to build the cxx binary. ```bash $ make ``` -------------------------------- ### Run Bandwidth Adaptation Scenario Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Execute the main Komondor binary with the specified input CSV and simulation parameters. ```bash cd Code/main ./komondor_main \ --nodes ../input/examples/bandwidth_adaptation_example/input_nodes_bw_adapt.csv \ --time 10 --seed 1 --logs-node 1 --save-node 1 ``` -------------------------------- ### Create Client Keystore Source: https://github.com/wn-upf/komondor/blob/master/Apps/CentralNodePostProcessing/lib/mysql-connector-java-5.1.46/src/testsuite/ssl-test-certs/certs_howto.txt Convert the client certificate to PKCS12 and import it into a JKS keystore. ```bash $ openssl pkcs12 -export -in client-cert.pem -inkey client-key.pem -name "mysqlclient" -passout pass:password -out client-keystore.p12 ``` ```bash $ keytool -importkeystore -srckeystore client-keystore.p12 -srcstoretype pkcs12 -srcstorepass password -destkeystore client-keystore -deststoretype JKS -deststorepass password ``` ```bash $ rm client-keystore.p12 ``` ```bash $ keytool -list -keystore client-keystore -storepass password ``` -------------------------------- ### Generate Client Key and Certificate Source: https://github.com/wn-upf/komondor/blob/master/Apps/CentralNodePostProcessing/lib/mysql-connector-java-5.1.46/src/testsuite/ssl-test-certs/certs_howto.txt Create a client key, a certificate signing request, and sign it using the CA. ```bash $ openssl genrsa -out client-key.pem 2048 ``` ```bash $ openssl req -new -key client-key.pem -out client-csr.pem ``` ```bash $ openssl x509 -req -in client-csr.pem -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -days 3650 -sha256 -out client-cert.pem ``` ```bash $ rm client-csr.pem ``` ```bash $ openssl verify -CAfile ca-cert.pem client-cert.pem ``` -------------------------------- ### Run Basic Simulation Source: https://github.com/wn-upf/komondor/blob/master/README.md Execute a standard simulation using a node configuration file. ```bash ./komondor_main \ --nodes ../input/examples/basic_example/input_nodes.csv \ --time 10.0 --seed 1 ``` -------------------------------- ### Build Komondor Source: https://github.com/wn-upf/komondor/blob/master/README.md Build the project using either standard make or a local build script. ```bash $ make ``` ```bash $ ./build_local ``` -------------------------------- ### Generate Server Key and Certificate Source: https://github.com/wn-upf/komondor/blob/master/Apps/CentralNodePostProcessing/lib/mysql-connector-java-5.1.46/src/testsuite/ssl-test-certs/certs_howto.txt Create a server key, a certificate signing request, and sign it using the CA. ```bash $ openssl genrsa -out server-key.pem 2048 ``` ```bash $ openssl req -new -key server-key.pem -out server-csr.pem ``` ```bash $ openssl x509 -req -in server-csr.pem -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -days 3650 -sha256 -out server-cert.pem ``` ```bash $ rm server-csr.pem ``` ```bash $ openssl verify -CAfile ca-cert.pem server-cert.pem ``` -------------------------------- ### Build Komondor using Makefile Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Standard commands to clean and build the Komondor project from the main directory. ```bash cd Code/main make clean # remove komondor_main and komondor_main.cxx make # full build ``` -------------------------------- ### Prepare Directory Permissions Source: https://github.com/wn-upf/komondor/blob/master/README.md Set necessary permissions for the main execution directory. ```bash $ cd ./Code/main $ chmod -R 777 ``` -------------------------------- ### Execute Basic Simulation Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/User guide (OLD)/LaTeX files/komondor_user_guide.tex Run the simulation using system and node input files with specific duration and seed parameters. ```bash $ ./komondor_main ../input/input_example/system_input.csv ../input/input_example/nodes_input.csv 0 0 1 1 60 789 ``` -------------------------------- ### Compile Komondor Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/User guide (OLD)/LaTeX files/komondor_user_guide.tex Navigate to the main directory and execute the build script to compile the simulation code. ```bash $ cd Komondor/Code/main $ ./build_local ``` -------------------------------- ### Run DSO Scenario Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Command to execute the DSO simulation scenario using the komondor_main binary. ```bash cd Code/main ./komondor_main \ --nodes ../input/examples/dso_npca_example/input_nodes_dso.csv \ --time 10.0 --seed 1 --logs-sys 1 --save-node 1 ``` -------------------------------- ### Define Configuration and Action structures Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Defines the agent-driven configuration parameters and the resulting actions taken by the node. ```C struct Configuration { double timestamp; int selected_primary_channel; double selected_pd; // pW double selected_tx_power; // pW int selected_max_bandwidth; // num channels int spatial_reuse_enabled; double non_srg_obss_pd; // pW }; struct Action { int id, channel; double cca, tx_power; // pW int max_bandwidth; double instantaneous_reward, cumulative_reward; int times_played; }; ``` -------------------------------- ### Run MAPC Simulation Source: https://github.com/wn-upf/komondor/blob/master/README.md Execute a simulation with Multi-Access Point Coordination enabled. ```bash ./komondor_main \ --nodes ../input/examples/mapc_example/input_nodes_mapc_example.csv \ --mapc ../input/examples/mapc_example/mapc_cotdma_example.csv \ --time 10.0 --seed 1 ``` -------------------------------- ### Run Standard Simulation with Custom Parameters Source: https://github.com/wn-upf/komondor/blob/master/README.md Execute a simulation with specific duration, seed, and output path. ```bash ./komondor_main -n scenario.txt -t 30.0 -s 777 -o ../output/my_results.txt ``` -------------------------------- ### Create CA Truststore Source: https://github.com/wn-upf/komondor/blob/master/Apps/CentralNodePostProcessing/lib/mysql-connector-java-5.1.46/src/testsuite/ssl-test-certs/certs_howto.txt Import the CA certificate into a Java truststore. ```bash $ keytool -importcert -alias mysqlcacert -file ca-cert.pem -keystore ca-truststore -storepass password ``` ```bash $ keytool -list -keystore ca-truststore -storepass password ``` -------------------------------- ### Repository Directory Structure Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Visual representation of the Komondor project file hierarchy. ```latex Komondor/ Apps/ Post-processing & plotting utilities Code/ COST/ CompC++ simulation framework (Linux ELF) input/ Input scenarios (CSV files) learning_modules/ ML/RL components main/ Main files & components and Makefile methods/ Implementation logic headers channel/ Power, SINR, beamforming frames/ Notifications, aggregation logic mac/ Backoff, channel access, NAV, losses mapc/ Multi-AP Coordination methods node/ Node FSM helpers, packet, timeout, backoff utils/ Input loader, output writer phy/ Modulations, beamforming, channel bonding output/ Placeholder for simulation outputs scripts_multiple_executions Examples of scripts to run multiple scenarios structures/ Data structures (NodeParameters, Wlan...) config_models File with global models list_of_macros File with macros validate File that runs regression tests Documentation/ Docs & tutorials ``` -------------------------------- ### Execute Komondor with agents Source: https://github.com/wn-upf/komondor/blob/master/README_agents.md Run the Komondor main executable with specified node and agent input files, enabling per-agent logging and setting simulation parameters. ```bash cd Code/main ./komondor_main \ --nodes ../input/examples/mab_example/input_nodes.csv \ --agents ../input/examples/mab_example/agents_egreedy.csv \ --save-agent 1 \ --time 10.0 --seed 1 ``` -------------------------------- ### Configure MySQL Server for SSL Source: https://github.com/wn-upf/komondor/blob/master/Apps/CentralNodePostProcessing/lib/mysql-connector-java-5.1.46/src/testsuite/ssl-test-certs/certs_howto.txt Add the SSL certificate paths to the MySQL configuration file. ```ini [mysqld] ssl-key = "/path/server-key.pem" ssl-cert = "/path/server-cert.pem" ssl-ca = "/path/ca-cert.pem" ``` -------------------------------- ### Execute Komondor simulation Source: https://github.com/wn-upf/komondor/blob/master/CONTRIBUTING.md Command-line instruction for running the Komondor simulator with specific input and output files. ```bash ./komondor_main /input/input_system.csv /input/input_nodes.csv /output/logs_output.txt 1 1 1 1 50 222 ``` -------------------------------- ### Generate CA Key and Certificate Source: https://github.com/wn-upf/komondor/blob/master/Apps/CentralNodePostProcessing/lib/mysql-connector-java-5.1.46/src/testsuite/ssl-test-certs/certs_howto.txt Create the root CA key and a self-signed certificate for the CA. ```bash $ openssl genrsa -out ca-key.pem 2048 ``` ```bash $ openssl req -new -x509 -nodes -sha256 -days 3650 -key ca-key.pem -out ca-cert.pem ``` -------------------------------- ### Execute Simulation with Agents Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/User guide (OLD)/LaTeX files/komondor_user_guide.tex Run the simulation including an agents input file and additional configuration arguments for MAB-based strategies. ```bash $ ./komondor_main ../input/input_example/system_input.csv ../input/input_example/nodes_input.csv ../input/input_example/agents.csv 1 1 1 1 1 1 120 432 ``` -------------------------------- ### Build Komondor manually Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Manual execution of the COST preprocessor and C++ compiler for building the project. ```bash # Step 1: COST preprocessor transforms .cc -> .cxx ../COST/cxx komondor_main.cc # Step 2: Compile with g++ (C++98 strict) g++ -Wall -Werror -g -o komondor_main komondor_main.cxx ``` -------------------------------- ### Run Simulation with Agents Source: https://github.com/wn-upf/komondor/blob/master/README.md Execute a simulation incorporating agent-based features and logging. ```bash ./komondor_main \ --nodes ../input/examples/basic_example/input_nodes.csv \ --agents ../input/examples/mab_example/agents_egreedy.csv \ --save-agent 1 \ --time 10.0 --seed 1 ``` -------------------------------- ### Execute Preamble Puncturing Scenario Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Run the simulation using the provided input nodes CSV and specified parameters. ```bash cd Code/main ./komondor_main \ --nodes ../input/examples/preamble_puncturing_example/input_nodes_pp.csv \ --time 10 --seed 1 --logs-sys 1 --save-node 1 ``` -------------------------------- ### Run EDCA differentiation scenario Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Execute the simulation using the provided EDCA differentiation input file. ```bash cd Code/main ./komondor_main \ --nodes ../input/examples/edca_example/input_nodes_edca_2_ac_differentiation.csv \ --time 10 --seed 1 ``` -------------------------------- ### Run ACK Suppression Test Scenario Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Execute the main binary with specific input nodes and logging parameters to verify suppression behavior. ```bash ./komondor_main \ --nodes ../input/validation/basic_scenarios/input_nodes_scenario_1a_aggregation.csv \ --out /tmp/out_suppress.txt --code suppress_test \ --logs-sys 1 --logs-node 1 --save-node 1 \ --time 10.0 --seed 1 ``` -------------------------------- ### Execute NPCA Scenario Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Command to run the Komondor simulation with the specified NPCA input nodes. ```bash cd Code/main ./komondor_main \ --nodes ../input/examples/dso_npca_example/input_nodes_npca.csv \ --time 1.0 --seed 1 --logs-sys 1 --save-node 1 ``` -------------------------------- ### Dispatching Node Events in C++ Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex The InportSomeNodeStartTX method uses a switch statement to route notifications to the appropriate state-specific handler based on the current node_state. ```C void Node::InportSomeNodeStartTX(Notification ¬ification) { switch (node_state) { case STATE_SENSING: HandleStartTX_StateSensing(notification); break; case STATE_NAV: HandleStartTX_StateNav(notification); break; case STATE_TX_DATA: HandleStartTX_StateTxData(notification); break; case STATE_RX_DATA: HandleStartTX_StateRxData(notification); break; case STATE_WAIT_ACK: HandleStartTX_StateWaitAck(notification); break; case STATE_WAIT_CTS: HandleStartTX_StateWaitCts(notification); break; case STATE_WAIT_DATA: HandleStartTX_StateWaitData(notification); break; case STATE_WAIT_ICR: HandleStartTX_StateWaitIcr(notification); break; // ... MAPC/DSO/NPCA states } } ``` -------------------------------- ### Visualize Component Wiring in LaTeX Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex A TikZ-based diagram illustrating the connections between nodes, agents, and the central controller in a two-BSS scenario. ```latex }, thick}, every node/.style={font=\small} ] \node[box] (n1) {Node 0 (AP\_A)}; \node[box, right=2.5cm of n1] (n2) {Node 1 (STA\_A1)}; \node[box, right=2.5cm of n2] (n3) {Node 2 (AP\_B)}; \node[box, fill=green!8, below=2cm of n1] (a1) {Agent 0}; \node[box, fill=green!8, below=2cm of n3] (a2) {Agent 1}; \node[box, fill=orange!8, below=1.5cm of $(a1)!0.5!(a2)$] (cc) {Central Controller}; \draw[arr, <->] (n1) -- node[above]{\scriptsize StartTX/FinishTX} (n2); \draw[arr, <->] (n2) -- node[above]{\scriptsize StartTX/FinishTX} (n3); \draw[arr, <->, bend left=30] (n1) to node[above]{\scriptsize StartTX/FinishTX} (n3); \draw[arr, <->] (n1) -- node[left]{\scriptsize Perf/Config} (a1); \draw[arr, <->] (n3) -- node[right]{\scriptsize Perf/Config} (a2); \draw[arr, <->] (a1) -- node[below left]{\scriptsize Perf/Config} (cc); \draw[arr, <->] (a2) -- node[below right]{\scriptsize Perf/Config} (cc); ``` -------------------------------- ### Execute Co-TDMA Scenario Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Command to run a simulation with MAPC configuration. ```bash cd Code/main ./komondor_main \ --nodes ../input/examples/mapc_example/input_nodes_mapc_example.csv \ --mapc ../input/examples/mapc_example/mapc_cotdma_example.csv \ --time 10 --seed 1 --logs-sys 1 --save-node 1 ``` -------------------------------- ### ML Subsystem Architecture Diagram Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex A LaTeX TikZ representation of the interaction between Nodes, Agents, and the Central Controller. ```latex }, thick}, ] \node[box] (node) {Node}; \node[box=green!8, right=2cm of node] (agent) {Agent}; \node[box=orange!8, right=2cm of agent] (cc) {Central Controller}; \draw[arr, ->] (node) -- node[above, font=\scriptsize]{Performance} (agent); \draw[arr, <-] (node) -- node[below, font=\scriptsize]{Configuration} (agent); \draw[arr, ->] (agent) -- node[above, font=\scriptsize]{Performance} (cc); \draw[arr, <-] (agent) -- node[below, font=\scriptsize]{Configuration} (cc); ``` -------------------------------- ### Logging simulation events Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Use the LOGS macro to record per-node simulation events to log files when save_node_logs is enabled. ```C LOGS(save_node_logs, node_logger.file, "%.15f;N%d;%s;%s\n", SimTime(), node_params.node_id, "StartTX", "DATA"); ``` -------------------------------- ### MAPC Configuration CSV Format Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md The structure of the semicolon-delimited configuration file. ```text GroupID;Method;CoordinatedBSSIds;ExtraParams ``` ```text 1;CO_TDMA;B; ``` ```text 1;CO_SR;B;20.0 ``` ```text 1;CO_BF;B; ``` ```text 1;CO_TDMA;B; 2;CO_TDMA;C; ``` -------------------------------- ### Configure Preamble Puncturing in Node CSV Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Set the channel bonding model to 6 in the node CSV file to enable preamble puncturing. ```csv ......;6;... ``` -------------------------------- ### Define NodeParameters structure Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Represents per-node configuration loaded from the node CSV file. ```C struct NodeParameters { int node_id; int node_type; // NODE_TYPE_AP (0), NODE_TYPE_STA (1) char wlan_code[20]; double x, y, z; // Position (meters) int primary_channel; int min_channel_allowed, max_channel_allowed; int channel_bonding_model; double tx_power_default; // dBm double cca_default; // dBm int traffic_model; int ieee_protocol; }; ``` -------------------------------- ### CSV Column Alignment for NPCA Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Shows the required order of columns in the node configuration CSV file to ensure NPCA parameters are correctly parsed. ```text bf_enabled ; bf_N ; bf_d ; bf_az_deg ; traffic_type ; dso_enabled ; npca_enabled ; npca_primary_channel ; ... ``` -------------------------------- ### Verify Effective TX Range in Logs Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Use grep to filter node logs for the effective TX range applied before each TXOP. ```bash grep "Effective TX range" output/logs_nodes/N0*.txt ``` -------------------------------- ### Enable ACK Suppression via Macro Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Set the master switch in the macros header file to enable the feature. ```c #define ACK_SUPPRESS_ENABLED 1 ``` -------------------------------- ### Verify Suppression via Logs Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Use grep to inspect transmitter and receiver logs for evidence of suppressed ACKs. ```bash # Transmitter — frames counted as delivered without waiting for ACK: grep "ACK suppressed, assuming" output/logs_nodes/N0*.txt | head # Receiver — frames accepted without sending ACK: grep "ACK suppressed by TX" output/logs_nodes/N1*.txt | head ``` -------------------------------- ### Define Node Member Variables Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Key member variables for the Node component, including state, channel configuration, backoff parameters, and performance metrics. ```C int node_state; // Current FSM state NodeParameters node_params; // Identity from CSV Wlan wlan; // WLAN membership // Channel int primary_channel, current_left_channel, current_right_channel; double power_received_per_node[]; // Backoff (ChannelAccessState struct) int current_CW; double remaining_backoff; int num_bo_interruptions; // Transmission Notification current_notification, rts_notification, cts_notification; // MAPC int coordinator_ap_id, mapc_active_group_idx; int mapc_coordinator_group_rr; double mapc_txop_data_budget, mapc_txop_per_ap_data_duration; // Spatial Reuse (SpatialReuseState struct) struct { int spatial_reuse_enabled, txop_sr_identified, mapc_cosr_active; double current_tx_power_sr, non_srg_obss_pd; } sr_state; // Performance double throughput, data_packets_sent, data_packets_lost; ``` -------------------------------- ### Define TxInfo and Notification structures Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Defines the transmission metadata and the notification message passed between nodes during transmission events. ```C struct TxInfo { int packet_type, source_id, destination_id; int left_channel, right_channel; double tx_power, nav_time; double data_duration, ack_duration, rts_duration, cts_duration; int bits_ofdm_sym, modulation, num_packets_aggregated; // Beamforming int beamforming_active, beam_N_elements, beam_num_nulls, beam_use_zf; double beam_d_spacing, beam_az_main_rad; double beam_null_az_rad[MAX_BEAM_NULLS]; // MAPC int mapc_group_id; double mapc_allocated_data_duration, mapc_sr_peer_tx_power; // Spatial Reuse int srg_obss_pd; double non_srg_obss_pd; // Preamble puncturing int punctured_channels[MAX_CHANNELS]; }; struct Notification { TxInfo tx_info; double timestamp; }; ``` -------------------------------- ### Run Regression Test Source: https://github.com/wn-upf/komondor/blob/master/README.md Executes the automated regression test script from the Code directory to verify simulator integrity. ```bash cd Code bash validate.sh ``` -------------------------------- ### Define Performance structure Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Captures metrics reported from a node to the agent at the end of a measurement window. ```C struct Performance { double throughput, max_bound_throughput; double data_packets_sent, data_packets_lost; double rts_cts_sent, rts_cts_lost; double num_tx_init_not_possible; double average_delay, max_delay, min_delay; double average_utilization; double successful_channel_occupancy; double *rssi_list; // Per-WLAN RSSI (pW) }; ``` -------------------------------- ### Packet Exchange Sequences Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md The signaling sequences for different coordination modes. ```text ICF → ICR(s) → DATA/ACK (coordinator) → MU-RTS/TXS → DATA/ACK (coordinated AP) ``` ```text ICF → ICR(s) → TF → simultaneous DATA/ACK (coordinator + coordinated AP) ``` -------------------------------- ### Select MAPC Active Group Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Logic used within EndBackoff() to select the active group for coordinator APs using round-robin scheduling. ```C mapc_active_group_idx = mapc_coordinator_group_rr % wlan.num_mapc_groups; mapc_coordinator_group_rr++; ``` -------------------------------- ### Define Wlan structure Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Groups an Access Point and its associated stations with configuration for MAPC and beamforming. ```C struct Wlan { int wlan_id; char wlan_code[20]; int ap_id; int num_stas; int *list_sta_id; // MAPC (up to MAX_MAPC_GROUPS_PER_WLAN = 8) int mapc_enabled, num_mapc_groups; int mapc_group_ids[8], mapc_method_ids[8]; int *mapc_peer_ap_ids[8]; int FindMapcGroupIdx(int group_id); // Beamforming int bf_enabled, bf_N_elements; double bf_d_spacing, bf_az_deg; // DSO / NPCA / EDCA / SR ... }; ``` -------------------------------- ### Define MAPC Frame Exchange Sequence in LaTeX Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Visual representation of the MAPC Co-TDMA frame exchange sequence using TikZ nodes and arrows. ```latex }, thick}, lbl/.style={font=\scriptsize, midway, above}, ] \node[frame] (icf) at (0,0) {ICF}; \node[frame] (icr) at (2.3,0) {ICR}; \node[frame] (tf) at (4.6,0) {TF}; \node[frame=green!12] (mrts) at (7.0,0) {MU-RTS}; \node[frame=green!12] (cts) at (9.3,0) {CTS}; \node[frame=orange!12] (data) at (11.6,0) {DATA}; \node[frame=orange!12] (ack) at (13.9,0) {ACK}; \draw[arr] (icf) -- node[lbl]{SIFS} (icr); \draw[arr] (icr) -- node[lbl]{SIFS} (tf); \draw[arr] (tf) -- node[lbl]{SIFS} (mrts); \draw[arr] (mrts) -- node[lbl]{SIFS} (cts); \draw[arr] (cts) -- node[lbl]{SIFS} (data); \draw[arr] (data) -- node[lbl]{SIFS} (ack); \node[below=0.15cm of icf, font=\scriptsize\itshape] {Coord.}; \node[below=0.15cm of icr, font=\scriptsize\itshape] {Peer}; \node[below=0.15cm of tf, font=\scriptsize\itshape] {Coord.}; \node[below=0.15cm of mrts, font=\scriptsize\itshape] {Peer}; \node[below=0.15cm of data, font=\scriptsize\itshape] {Both}; \node[below=0.15cm of ack, font=\scriptsize\itshape] {STAs}; ``` -------------------------------- ### Configure AC_VO node in CSV Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md Set the traffic type for a node by appending the appropriate value to the CSV entry. ```text ......;3 ``` -------------------------------- ### Define Transmission Flow State Machine Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex A LaTeX TikZ representation of the four-way handshake state machine transitions. ```latex }, thick}, ] \node[state] (s0) {STATE\_SENSING}; \node[state, below=0.6cm of s0] (s1) {DIFS wait}; \node[state, below=0.6cm of s1] (s2) {Backoff countdown}; \node[state, below=0.6cm of s2] (s3) {STATE\_TX\_RTS}; \node[state, below=0.6cm of s3] (s4) {STATE\_WAIT\_CTS}; \node[state, below=0.6cm of s4] (s5) {STATE\_TX\_DATA}; \node[state, below=0.6cm of s5] (s6) {STATE\_WAIT\_ACK}; \node[state, below=0.6cm of s6] (s7) {STATE\_SENSING}; \draw[arr] (s0) -- node[right, act]{ScheduleBackoffAfterDIFS()} (s1); \draw[arr] (s1) -- node[right, act]{ResumeBackoff() $\to$ random backoff} (s2); \draw[arr] (s2) -- node[right, act]{EndBackoff() $\to$ PrepareNewTransmission()} (s3); \draw[arr] (s3) -- node[right, act]{MyTxFinished(), arm CTS timeout} (s4); \draw[arr] (s4) -- node[right, act]{CTS received $\to$ SendResponsePacket(DATA)} (s5); \draw[arr] (s5) -- node[right, act]{MyTxFinished(), arm ACK timeout} (s6); \draw[arr] (s6) -- node[right, act]{ACK received $\to$ RestartNode()} (s7); ``` -------------------------------- ### DSO Exchange Sequence Source: https://github.com/wn-upf/komondor/blob/master/release_notes.md The sequence of operations performed during a DSO exchange. ```text (Win TXOP on primary) → DSO_ICF → DSO_ICR → DATA → ACK ``` -------------------------------- ### Update Power Sensing for Data Frames Source: https://github.com/wn-upf/komondor/blob/master/Documentation/Tutorials/Developer guide/Komondor_DEV_guide/komondor_dev_guide.tex Applies beamforming gain to received power specifically for DATA packets while keeping control frames omnidirectional. ```C if (notification.packet_type == PACKET_TYPE_DATA) { double bf_gain = ComputeRxBeamGain(tx_info, tx_x, tx_y, rx_x, rx_y); pw_received *= bf_gain; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.