mangOH Red Getting Started page 44

Wpx5xx + linux dev machine + cli
Hide thumbs Also See for Red:
Table of Contents

Advertisement

mangOH Red Getting Started
Rev 2 8/23/17
2. Configure the window for development—enter the following command (that you
previously set up in
opment on page
42):
$ cfglegato
3. Go to the folder containing the application's source code:
$ cd $MANGOH_ROOT/apps/RedSensorToCloud
4. The source code components for this application are in two sub-folders—
avPublisherComponent and sensorsComponent. The code that controls the
publishing frequency is in avPublisherComponent—go to that folder:
$ cd avPublisherComponent
5. Open and edit the source code (avPublisher.c) with your preferred editor—two
values must be updated to adjust the reporting frequency:
a. Search for the variable declaration for MaxIntervalBetweenPublish.
static const int MaxIntervalBetweenPublish (120)
b. Change the interval value to 30—This increases the reporting frequency to at
least once every 30 seconds from once every 120 seconds.
c. Search for the variable declaration for TimeToStale.
static const int TimeToStale (60)
d. Change the stale value to 30—This decreases the length of time a sensor
reading is considered to be 'current' before a new sensor reading must be
taken.
e. Save your changes and exit the editor.
At this point, you have modified the redSensorToCloud application's source code.
Now you have to build (compile) it.
This application was created as part of the mangOH Red platform; to rebuild the
application, you will rebuild the whole system (Legato Platform and mangOH Red
platform). This method is suggested when applications may interact with each other. If
only one application is rebuilt, it may not work properly with other applications that it
depends on (or that depend on it).
To rebuild the Legato Platform and mangOH Red platform, including
redSensorToCloud with your changes, and install it onto your mangOH Red:
6. Build and install the mangOH Red platform:
$ cd $MANGOH_ROOT
$ make red_wp85
44
Configure the Dev Machine's Terminal Windows for Devel-
41110481

Advertisement

Table of Contents
loading

Table of Contents