Skip to content

Latest commit

 

History

History
64 lines (58 loc) · 1.67 KB

README.md

File metadata and controls

64 lines (58 loc) · 1.67 KB

core section

Our core server:

Dependencies

MongoDB and mongocxx drivers.

Configuration file

Create a configuration file config.json having the following format:

{
    "port": 12345,
    "boards": [
        {
            "mac": "2e:c5:44:b4:7a:08",
            "x": 0,
            "y": 0 
        },
        {
            "mac": "1a:dd:db:a7:b7:f5",
            "x": 20,
            "y": 0 
        }

    ],
    "room_coordinates":[
        {"x": 0, "y": 0},
        {"x": 0, "y": 90},
        {"x": 90, "y": 0},
        {"x": 90, "y": 90}
    ]
}

Launch the core server

  1. Start MongoDB:
    $ sudo service mongod start 
  2. Optionally, free the core server port (example with port 12345):
    lsof -i tcp:12345 | grep LISTEN | awk '{print $2}' | xargs kill
  3. Run the core server:
    $ chmod u+x start.sh
    $ ./start.sh
Using a dummy packet producer to generate input data
  1. Move to the dummy packet producer directory
    $ cd ../examples/dummy_packets
  2. Launch the dummy packet producer
    $ python3 dummy_packet_producer.py --batch_size 10 --batch_rate 10 --protobuf --out_file batch.txt 127.0.0.1 12345

References

  1. How to use MongoDB with C