Gumband Properties API
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()
Initialize a Gumband property that 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.
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)
Example Usage:
GumbandProp motor_start = gumbandCreate("Motor", "Spin", gmbnd_bool); GumbandProp motor_speed = gumbandCreate("Motor", "Speed", gmbnd_int32);
gumbandSetReadCallback()
Attach a callback function to a Gumband property. This function will be called when a read request is sent from a remote server (the Exhibit or Cloud server).
Syntax:
int8_t gumbandSetReadCallback(GumbandProp handle, callback_func read_callback);
Example Usage:
gumbandSetWriteCallback()
Attach a callback function to a Gumband property. This function will be called when data 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);
Example Usage:
gumbandSetDescription()
Assign a text description to a Gumband property (visible on the Gumband cloud dashboard). Max text length is 128 characters.
Syntax:
int8_t gumbandSetDescription(GumbandProp handle, const char* description);
Example Usage:
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.
Syntax:
int8_t gumbandSetHidden(GumbandProp handle);
Example Usage:
gumbandClearHidden()
Set the property as visible 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.
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);
Example Usage:
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.
Logs are limited to 10 messages per second and are currently not sent to Exhibits.
gumbandDebug()
Syntax:
void gumbandDebug(const char* text, ...);
Example Usage:
gumbandLog()
Syntax:
void gumbandDebug(const char* text, ...);
Example Usage:
gumbandError()
Syntax:
void gumbandError(const char* text, ...);
Example Usage
gumbandNotify()
Syntax:
void gumbandEvent(const char* text, uint32_t val);
Example Usage:
gumbandEvent()
Syntax:
void gumbandEvent(const char* text, uint32_t val);
Example Usage:
Gumband Configuration API
Functions to configure the Gumband hardware connections to the the Gumband hardware 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.
gumbandSetUserFirmwareVer()
Syntax:
void gumbandSetUserFirmwareVer(uint8_t fw);
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:
void gumbandSetAuthToken(const char* text);
gumbandSetHardwareID()
Syntax:
void gumbandSetHardwareID(const char* text);
gumbandSetCloudServer()
Syntax:
void gumbandSetCloudServer(const char* addr);
gumbandSetExhibitServer()
Syntax:
void gumbandSetExhibitServer(const char* addr, uint8_t static_flag);
Gumband Status API
Functions to monitor the status of the Gumband hardware external connections.
gumbandConnected()
Syntax:
uint8_t gumbandConnected();
gumbandCloudConnected()
Syntax:
uint8_t gumbandCloudConnected();
gumbandExhibitConnected()
Syntax:
uint8_t gumbandExhibitConnected();
gumbandUSBConnected()
Syntax:uint8_t gumbandUSBConnected();
Gumband Hardware API
Functions to control specific aspects of the physical Gumband hardware, support for these functions may vary depending on platform.
gumbandWriteUserData()
void gumbandWriteUserData(uint8_t index, uint8_t data);
gumbandReadUserData()
uint8_t gumbandReadUserData(uint8_t index);
gumbandLedSetBrightness()
void gumbandLedSetBrightness(uint8_t pwm);
gumbandLedOn()
void gumbandLedOn(void);
gumbandLedOff()
void gumbandLedOff(void);
gumbandLedToggle()
void gumbandLedToggle(void);
gumbandLedOut()
void gumbandLedOut(uint8_t state);
gumbandLedPWM()
void gumbandLedPWM(uint8_t pwm);
gumbandButtonPressed()
uint8_t gumbandButtonPressed();