Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleTable of Contents
Table of Contents
minLevel1
maxLevel4

...

Code Block
languagecpp
gumbandSetDescription(motor_speed_prop, "This property controls the speed of the motor.")

gumbandSetHidden()
Status
colour

...

Yellow
titleUNFINISHED

Set the property as hidden to prevent it from being displayed on the Gumband Cloud dashboard. This has no affect on the Exhibit server.

...

Code Block
languagecpp
gumbandSetHidden(motor_speed_prop); // Hide the motor speed property from the dashboard

gumbandClearHidden()
Status
colour

...

Yellow
titleUNFINISHED

Set the property as visible to allow it to be shown on the Gumband Cloud dashboard.

...

Code Block
languagecpp
// Create all peripherals and their properties
GumbandProp first_prop = gumbandCreate("My Peripheral", "First", gmbnd_byte);
GumbandProp second_prop = gumbandCreate("My Peripheral", "Second", gmbnd_byte);
...
// Register the peripherals and properties with the broker
gumbandSubscribe();

gumbandPublish()
Status
colour

...

Yellow
titleUNFINISHED

TBD on the implementation of this, but the intent is to be a type agnostic way to publish.

Syntax:

void gumbandPublish();

...

Code Block
languagecpp
GumbandProp my_prop = gumbandCreate("My Peripheral", "My Property", gmbnd_byte);
...
uint8_t data_val = 100;
gumbandPublishByte(my_prop, data_val); // Publish the value of 100 to "My Property"

gumbandPublishByteArray()
Status
colour

...

Yellow
titleUNFINISHED

Publish an array of bytes to a property of type gmbnd_byte and length >1.

...

Code Block
languagecpp
GumbandProp my_prop = gumbandCreate("My Peripheral", "My Integer", gmbnd_byte);
...
int32_t data_val = -1000;
gumbandPublishInt(my_prop, data_val); // Publish the value of -1000 to "My Integer"

gumbandPublishIntArray()
Status
colour

...

Yellow
titleUNFINISHED

Publish an array of uint32 to a property of type gmbnd_int32 and length > 1.

...

Functions to send informational messages to the Gumband Cloud dashboard.

...

Insert excerpt
Logging & Events
Logging & Events
nameLog limit
nopaneltrue

gumbandDebug()

https://deeplocal.atlassian.net/wiki/spaces/GS/pages/52822092/Logging+Events#Debug-Logs
Syntax:

void gumbandDebug(const char* text, ...);

...

Code Block
languagecpp
uint8_t test_data = 100;
gumbandDebug("Sending data value of %d...", test_data);

...

gumbandError()

Syntax:

void gumbandDebug(const char* text, ...);

Example Usage:
Code Block
// TBD

gumbandError()

https://deeplocal.atlassian.net/wiki/spaces/GS/pages/52822092/Logging+Events#Error-Logs
Syntax:

void gumbandError(const char* text, ...);

Parameters:

text

A text string of the Error message, up to 127 characters allowed.

A optional series of formatting variables

Example Usage:
Code Block
languagecpp
gumbandError("Hello Gumband! I am an error log message.");
Code Block
languagecpp
const char* error_string = "Example Error";
gumbandError("Warning! Encountered an error with message: %s", error_string);

gumbandNotify()

https://deeplocal.atlassian.net/wiki/spaces/GS/pages/52822092/Logging+Events#Notify

Send a notification message to the Cloud. Anyone who is subscribed to notification messages for this hardware will immediately receive an email notification with the message. <Link to details for how to subscribe to notifications>

Syntax:

void gumbandNotify(const char* text, ...);

Parameters:

text

A message associated with the notification, up to 127 characters allowed.

Example Usage:
Code Block
languagecpp
gumbandNotify("Hello Gumband! I am a notification in your e-mail that something happened.");

gumbandEvent()

https://deeplocal.atlassian.net/wiki/spaces/GS/pages/52822092/Logging+Events#Event-Logs

Send an “Event” to the Cloud. These Events are plotted on a graph and can be viewed in realtime real time on the dashboard. The data can be viewed either as frequency of named Events over time or Event values over time.

Syntax:

void gumbandEvent(const char* text, uint32_t val);

Parameters:

text

A text string name for the Event. Events are grouped by matching name.

val

An optional value for the event.

Example Usage:
Code Block
languagecpp
gumbandEvent("My Event");
Code Block
languagecpp
gumbandEvent("My Event", 100);

gumbandLog()
Status
colourRed
titleUndocumented

Syntax:

void gumbandDebug(const char* text, ...);

Example Usage:
Code Block
// TBD

...

Gumband Configuration API

...

Note

In most cases it is not recommended to use any of the following 4 functions to configure the hardware, these changes should be made via the configuration interface (link)

gumbandSetAuthToken()

Syntax:

...