Commit 44481cf5a20d8ffdf4920700e1b62c5911e908cb

Authored by Peter M. Groen
1 parent 976553af

Updated the documentation

Showing 1 changed file with 10 additions and 3 deletions
README.md
... ... @@ -30,9 +30,15 @@ Just check your package manager for the correct package-name.
30 30 $ cmake ../
31 31 $ gmake ( or make, depending on your platform )
32 32 ```
33   -And you're all set. In build/bin there are two examples, test_mqtt_pu and test_mqtt_sub. Have a broker running,
34   -like mosquitto or flashmq capable of accepting anonymous connections. Start the "sub" part and couple of moments
35   -later the "pub" part. If all went well, you should see two screens in sync running.
  33 +
  34 +## Building the examples and tests
  35 +### Tests
  36 +Normally only the library is being build. By adding `-DENABLE_TESTING` to the cmake step, the unittests are being build also. Make sure a broker is running on localhost and type `test/mqtt_test` to run the tests.
  37 +
  38 +### Examples
  39 +By adding the flag `-DENABLE_EXAMPLES` to the cmake step, the examples are being build together with the library.
  40 +
  41 +In build/bin there are two examples, test_mqtt_pu and test_mqtt_sub. Have a broker running, like mosquitto or flashmq capable of accepting anonymous connections. Start the "sub" part and couple of moments later the "pub" part. If all went well, you should see two screens in sync running.
36 42  
37 43 ```
38 44 Open terminal 1
... ... @@ -41,6 +47,7 @@ later the "pub" part. If all went well, you should see two screens in sync runni
41 47 Open terminal 2
42 48 $ bin/test_mqtt_pub
43 49 ```
  50 +
44 51 Screen 2 is sending, Screen 1 is receiving.
45 52  
46 53 # Using the library.
... ...