Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7

...

Functions to interact with Gumband properties. Gumband properties are end points which are used to control individual elements of the hardware system either from the debug dashboard or from exhibit software via the SDK.

gumbandCreate()

Creates Initialize a Gumband property endpointthat can be used to send and receive data to and from the online dashboard or an exhibit. Every property must be initialized using gubmandCreate() before calling any gumbandSet function that applies to that property.

Info

A property does not get created on the remote server until gumbandSubscribe() is called.

Syntax:

GumbandProp gumbandCreate(const char peripheral, const char property, gmbnd_type_t type)

...

gumbandSetReadCallback()

Attach a callback function to a Gumband property to . This function will be called when a read command request is received sent from a remote server (the exhibit or cloud serversExhibit or Cloud server).

Syntax:

int8_t gumbandSetReadCallback(GumbandProp handle, callback_func read_callback);

...

gumbandSetWriteCallback()

Attach a callback function to a Gumband property to . This function will be called when a write command is received from the exhibit or cloud serversdata is written to this property on the hardware from a remote server (the Exhibit or Cloud server).

Syntax:

int8_t gumbandSetWriteCallback(GumbandProp handle, callback_func write_callback);

...

Assign a text description to a Gumband property (visible on the Gumband cloud dashboard). Max text length is128 is 128 characters.

Syntax:

int8_t gumbandSetDescription(GumbandProp handle, const char* description);

...

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

Syntax:

int8_t gumbandSetHidden(GumbandProp handle);

...

Set the property as visible (note this change will only be written if we also resubscribe to the server using gumbandSubscribe)to allow it to be shown on the Gumband Cloud dashboard.

Syntax:

int8_t gumbandClearHidden(GumbandProp handle)

Example Usage:

gumbandSubscribe()

Complete the hardware registration with all remote servers (both Cloud and Exhibit if connected). The registration sends all of the information for the initialised properties and creates the properties on the remote server.

Info

gumbandSubscribe() must be called before publishing or sending log messages

Syntax:

void gumbandSubscribe();

Example Usage:

gumbandPublish()

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

Syntax:

void gumbandPublish();

Example Usage:

gumbandPublishByte()

Publish a single byte to a property of type gmbnd_byte.

Syntax:

void gumbandPublishByte(GumbandProp handle, uint8_t data);

...

gumbandPublishByteArray()

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

Syntax:

gumbandPublishByteArray(GumbandProp handle, uint8_t* data, uint8_t len);

Example Usage:

gumbandPublishInt()

Publish a single uint32 to a property of type gmbnd_int32.

Syntax:

void gumbandPublishInt(GumbandProp handle, uint32_t data);

Example Usage:

gumbandPublishIntArray()

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

Syntax:

void gumbandPublishIntArray(GumbandProp handle, uint32_t* data, uint8_t len);

Example Usage:

...

Gumband Logging API

Functions to send informational messages to the Gumband Cloud dashboard.

Info

Logs are limited to 10 messages per second and are currently not sent to Exhibits.

gumbandDebug()

Syntax:

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

...

void gumbandSetUserFirmwareVer(uint8_t fw);

Note

Notes: 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:

...