...
Code Block |
---|
|
gumbandSetDescription(motor_speed_prop, "This property controls the speed of the motor.") |
gumbandSetHidden()
...
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 |
---|
|
gumbandSetHidden(motor_speed_prop); // Hide the motor speed property from the dashboard |
gumbandClearHidden()
...
Set the property as visible to allow it to be shown on the Gumband Cloud dashboard.
...
Code Block |
---|
|
// 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()
...
TBD on the implementation of this, but the intent is to be a type agnostic way to publish.
Syntax:
void gumbandPublish();
...
Code Block |
---|
|
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()
...
Publish an array of bytes to a property of type gmbnd_byte and length >1.
...
Code Block |
---|
|
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()
...
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 |
---|
name | Log limit |
---|
nopanel | true |
---|
|
gumbandDebug()
Syntax:
void gumbandDebug(const char* text, ...);
...
Code Block |
---|
|
uint8_t test_data = 100;
gumbandDebug("Sending data value of %d...", test_data); |
...
gumbandError()
Syntax:
void gumbandDebug(const char* text, ...);
Example Usage:
gumbandError()
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 |
---|
|
gumbandError("Hello Gumband! I am an error log message."); |
Code Block |
---|
|
const char* error_string = "Example Error";
gumbandError("Warning! Encountered an error with message: %s", error_string); |
gumbandNotify()
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 |
---|
|
gumbandNotify("Hello Gumband! I am a notification in your e-mail that something happened."); |
gumbandEvent()
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 |
---|
|
gumbandEvent("My Event"); |
Code Block |
---|
|
gumbandEvent("My Event", 100); |
gumbandLog()
Status |
---|
colour | Red |
---|
title | Undocumented |
---|
|
Syntax:
void gumbandDebug(const char* text, ...);
Example Usage:
...
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:
...