linx-simulator2/README.md

32 lines
1.1 KiB
Markdown
Raw Normal View History

2020-04-09 14:21:57 +00:00
## Has been <u>tested</u> and <u>developed</u> using:
> ubuntu 16.04.6<br/>
> openssl: 1.0.2g<br/>
2020-04-09 14:19:31 +00:00
> node: 8.16.0
2019-09-18 08:11:16 +00:00
2020-04-09 14:21:57 +00:00
## Requirements:
2020-04-09 14:16:37 +00:00
> curl -sL [https://deb.nodesource.com/setup_8.x](https://deb.nodesource.com/setup_8.x) | sudo -E bash -<br/>
> sudo apt-get install -y nodejs<br/>
> sudo apt-get install -y build-essential<br/>
> install python 2.7<br/>
> rm package-lock.json && rm -rf node_modules && rm -rf ~/.node-gyp only **(if package-lock.json/node_modules or node was installed)**<br/>
> sudo apt-get install libasound2-dev<br/>
> sudo npm i -g node-gyp<br/>
2020-04-09 14:21:57 +00:00
> sudo npm install --unsafe-perm
2020-04-09 14:21:57 +00:00
## Configuration:
2020-04-09 14:16:37 +00:00
**For the simulation to simulate in a period**, we must put the **testing_period setting in settings** (the value is in milliseconds) <br/>
Example in **config**:<br/>
> [settings]<br/>
> max_fails = 3<br/>
> send_voice = true<br/>
> send_gps = true<br/>
> gps_report_interval = 10000<br/>
> gps_lng_start_point = 24.776126<br/>
2020-04-09 14:21:57 +00:00
> testing_period = 7000 **# we will simulate all the units in a period of 7 seconds**
2020-04-09 14:15:31 +00:00
## Start
2020-04-09 14:21:57 +00:00
> node index.js --path="./config/stage" node ./index.js --path="./config/testing"