CreatorCreator
Home
Getting Started
  • 中文简体
  • English
Home
Getting Started
  • 中文简体
  • English
  • Creator

    • Getting Started
  • Stream Dock

    • Plugin SDK
    • Icon Pack

      • Overview
      • Terminology
      • Creating an Icon Pack
      • Icon Specifications
    • Scene Configuration

      • What is a Scenario Configuration?
      • Exporting
      • Use Cases
  • mPanel

    • Plugin SDK
  • Linux StreamDock SDK

    • Cpp SDK

      • Overview
      • Dependency
      • Device Manager
      • StreamDock Base Class
      • StreamDock293
      • Communication transmission
      • Example
      • Source code
    • Python SDK

      • Overview
      • Dependency
      • DeviceManager
      • StreamDock Base Class
      • StreamDock293
      • Example
      • Source Code
  • Windows StreamDock SDK

    • WebSocket SDK

      • Overview
      • Getting Started
      • Events to Send
      • Received Events
    • Cpp SDK

      • Overview
      • Dependency
      • Device manager
      • StreamDock Base Class
      • StreamDock293
      • Transport
      • Example
      • Source Code
  • Support

    • Help and Bug Reporting

StreamDock Base Class

The control classes of all specific device models need to inherit the StreamDock base class. The StreamDock base class provides the following methods:

Get the firmware version of the device

/*
@note: Get the firmware version of the device
@param lenth: The length of the firmware version
@return Returns the first address of the array where the firmware version number is stored. If an error occurs, return null
*/
virtual unsigned char *getFirmVersion(int lenth );

Open the device

/*
@note: Open the device
*/
int open();

Close the device

int disconnected();

Set the brightness of the device screen

/*
@note: Set the brightness of the device screen. If the value passed in is less than 0, the value will be pulled back to 0, and if it is greater than 1, it will be pulled back to 100
@param percent: Brightness value 1-100
@return Success returns 0, if an error returns -1
*/
virtual int setBrightness(int percent);

Set the background image of the device screen

/*
@note: Set the background image of the device screen
@param path: The path of the image
@return Success returns 1, if an error returns -1
*/
virtual int setBackgroundImg(std::string path);

Receive information sent by the device

/*
@note: Receive information sent by the device
@return Success returns the first address of the array obtained, if an error returns NULL
*/
virtual unsigned char * read();

Set the icon of the device button

/*
@note: Set the icon of the device button
@param path: The path of the image
@return Success returns 1, if an error returns -1
*/
virtual int setKeyImg(std::string path, int key);

Clear a key icon

/*
@note: Clear the key icon
@param index: The label of the key
@return: Success returns 1, failure returns -1
*/
virtual int clearIcon(int index);

Clear all key icons

/*
@note: Clear all key icons
@return: Success returns 1, failure returns -1
*/
virtual int clearAllIcon();

Refresh the display after data transmission is completed

/*
@note: Refresh the display after data transmission is completed
@return: Return 1 if successful, -1 if failed
*/
virtual int wakeScreen();

Refresh the display after data transmission is completed

/*
@note: Refresh the display after data transmission is completed
*/
int refresh();
Last Updated:
Contributors: Heart
Prev
Device Manager
Next
StreamDock293