Datavenue Live Objects basic sample using liveobjects-iotsoftbox-mqtt library.
Dependencies: MQTTPacket
liveobjects_dev_params.h.txt@0:92f8cff1cf35, 2016-11-25 (annotated)
- Committer:
- jhamel
- Date:
- Fri Nov 25 16:12:09 2016 +0100
- Revision:
- 0:92f8cff1cf35
- Child:
- 4:919c25da5ec8
Initial release
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jhamel | 0:92f8cff1cf35 | 1 | /* |
jhamel | 0:92f8cff1cf35 | 2 | * Copyright (C) 2016 Orange |
jhamel | 0:92f8cff1cf35 | 3 | * |
jhamel | 0:92f8cff1cf35 | 4 | * This software is distributed under the terms and conditions of the 'BSD-3-Clause' |
jhamel | 0:92f8cff1cf35 | 5 | * license which can be found in the file 'LICENSE.txt' in this package distribution |
jhamel | 0:92f8cff1cf35 | 6 | * or at 'https://opensource.org/licenses/BSD-3-Clause'. |
jhamel | 0:92f8cff1cf35 | 7 | * |
jhamel | 0:92f8cff1cf35 | 8 | * This file is a part of LiveObjects iotsoftbox-mqtt library. |
jhamel | 0:92f8cff1cf35 | 9 | */ |
jhamel | 0:92f8cff1cf35 | 10 | |
jhamel | 0:92f8cff1cf35 | 11 | /** |
jhamel | 0:92f8cff1cf35 | 12 | * @file liveobjects_dev_params.h |
jhamel | 0:92f8cff1cf35 | 13 | * @brief Default user parameters used to configure this device as a Live Objects Device |
jhamel | 0:92f8cff1cf35 | 14 | */ |
jhamel | 0:92f8cff1cf35 | 15 | |
jhamel | 0:92f8cff1cf35 | 16 | |
jhamel | 0:92f8cff1cf35 | 17 | #ifndef __liveobjects_dev_params_H_ |
jhamel | 0:92f8cff1cf35 | 18 | #define __liveobjects_dev_params_H_ |
jhamel | 0:92f8cff1cf35 | 19 | |
jhamel | 0:92f8cff1cf35 | 20 | // Set to 1 to enable TLS feature |
jhamel | 0:92f8cff1cf35 | 21 | // (warning: check that LOC_SERV_PORT is the correct port in this case) |
jhamel | 0:92f8cff1cf35 | 22 | #define SECURITY_ENABLED 1 |
jhamel | 0:92f8cff1cf35 | 23 | |
jhamel | 0:92f8cff1cf35 | 24 | // Only used to overwrite the LiveOjects Server settings : |
jhamel | 0:92f8cff1cf35 | 25 | // IP address, TCP port, Connection timeout in milliseconds. |
jhamel | 0:92f8cff1cf35 | 26 | //#define LOC_SERV_IP_ADDRESS "XXXX" |
jhamel | 0:92f8cff1cf35 | 27 | //#define LOC_SERV_PORT XXXX |
jhamel | 0:92f8cff1cf35 | 28 | //#define LOC_SERV_TIMEOUT XXXX |
jhamel | 0:92f8cff1cf35 | 29 | |
jhamel | 0:92f8cff1cf35 | 30 | // When set to 1, use the MAC address as LiveObject device identifier |
jhamel | 0:92f8cff1cf35 | 31 | // otherwise use LOC_CLIENT_DEV_ID |
jhamel | 0:92f8cff1cf35 | 32 | #define LOC_CLIENT_USE_MAC_ADDR 0 |
jhamel | 0:92f8cff1cf35 | 33 | |
jhamel | 0:92f8cff1cf35 | 34 | // Default LiveObjects device settings : name space and device identifier |
jhamel | 0:92f8cff1cf35 | 35 | #define LOC_CLIENT_DEV_NAME_SPACE "LiveObjectsSample" |
jhamel | 0:92f8cff1cf35 | 36 | #if !LOC_CLIENT_USE_MAC_ADDR |
jhamel | 0:92f8cff1cf35 | 37 | #define LOC_CLIENT_DEV_ID "LO_sample_dev01" |
jhamel | 0:92f8cff1cf35 | 38 | #endif |
jhamel | 0:92f8cff1cf35 | 39 | |
jhamel | 0:92f8cff1cf35 | 40 | // Here, set your LiveObject Apikey. It is mandatory to run the application |
jhamel | 0:92f8cff1cf35 | 41 | #define LOC_CLIENT_DEV_API_KEY "XXXX" |
jhamel | 0:92f8cff1cf35 | 42 | |
jhamel | 0:92f8cff1cf35 | 43 | |
jhamel | 0:92f8cff1cf35 | 44 | #if SECURITY_ENABLED |
jhamel | 0:92f8cff1cf35 | 45 | // If security is enabled to establish connection to the LiveObjects platform, |
jhamel | 0:92f8cff1cf35 | 46 | // include certificates file |
jhamel | 0:92f8cff1cf35 | 47 | #include "liveobjects_dev_security.h" |
jhamel | 0:92f8cff1cf35 | 48 | #endif |
jhamel | 0:92f8cff1cf35 | 49 | |
jhamel | 0:92f8cff1cf35 | 50 | #endif //__liveobjects_dev_params_H_ |