init
This commit is contained in:
29
unitree_SDK/include/unitree/robot/go2/vui/vui_api.hpp
Normal file
29
unitree_SDK/include/unitree/robot/go2/vui/vui_api.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef __UT_ROBOT_GO2_VUI_API_HPP__
|
||||
#define __UT_ROBOT_GO2_VUI_API_HPP__
|
||||
|
||||
#include <unitree/common/json/jsonize.hpp>
|
||||
|
||||
namespace unitree
|
||||
{
|
||||
namespace robot
|
||||
{
|
||||
namespace go2
|
||||
{
|
||||
/*service name*/
|
||||
const std::string ROBOT_VUI_SERVICE_NAME = "vui";
|
||||
|
||||
/*api version*/
|
||||
const std::string ROBOT_VUI_API_VERSION = "1.0.0.0";
|
||||
|
||||
/*api id*/
|
||||
const int32_t ROBOT_VUI_API_ID_SETSWITCH = 1001;
|
||||
const int32_t ROBOT_VUI_API_ID_GETSWITCH = 1002;
|
||||
const int32_t ROBOT_VUI_API_ID_SETVOLUME = 1003;
|
||||
const int32_t ROBOT_VUI_API_ID_GETVOLUME = 1004;
|
||||
const int32_t ROBOT_VUI_API_ID_SETBRIGHTNESS = 1005;
|
||||
const int32_t ROBOT_VUI_API_ID_GETBRIGHTNESS = 1006;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif //__UT_ROBOT_GO2_VUI_API_HPP__
|
64
unitree_SDK/include/unitree/robot/go2/vui/vui_client.hpp
Normal file
64
unitree_SDK/include/unitree/robot/go2/vui/vui_client.hpp
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef __UT_ROBOT_GO2_VUI_CLIENT_HPP__
|
||||
#define __UT_ROBOT_GO2_VUI_CLIENT_HPP__
|
||||
|
||||
#include <unitree/robot/client/client.hpp>
|
||||
|
||||
namespace unitree
|
||||
{
|
||||
namespace robot
|
||||
{
|
||||
namespace go2
|
||||
{
|
||||
/*
|
||||
* VuiClient
|
||||
*/
|
||||
class VuiClient : public Client
|
||||
{
|
||||
public:
|
||||
explicit VuiClient();
|
||||
~VuiClient();
|
||||
|
||||
void Init();
|
||||
|
||||
/*
|
||||
* @brief SetSwitch
|
||||
* @api: 1001
|
||||
*/
|
||||
int32_t SetSwitch(int enable);
|
||||
|
||||
/*
|
||||
* @brief GetSwitch
|
||||
* @api: 1002
|
||||
*/
|
||||
int32_t GetSwitch(int&);
|
||||
|
||||
/*
|
||||
* @brief SetVolume
|
||||
* @api: 1003
|
||||
*/
|
||||
int32_t SetVolume(int level);
|
||||
|
||||
/*
|
||||
* @brief GetVolume
|
||||
* @api: 1004
|
||||
*/
|
||||
int32_t GetVolume(int&);
|
||||
|
||||
/*
|
||||
* @brief SetBrightness
|
||||
* @api: 1005
|
||||
*/
|
||||
int32_t SetBrightness(int level);
|
||||
|
||||
/*
|
||||
* @brief GetBrightness
|
||||
* @api: 1006
|
||||
*/
|
||||
int32_t GetBrightness(int&);
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif//__UT_ROBOT_GO2_VUI_CLIENT_HPP__
|
17
unitree_SDK/include/unitree/robot/go2/vui/vui_error.hpp
Normal file
17
unitree_SDK/include/unitree/robot/go2/vui/vui_error.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef __UT_ROBOT_GO2_VUI_ERROR_HPP__
|
||||
#define __UT_ROBOT_GO2_VUI_ERROR_HPP__
|
||||
|
||||
#include <unitree/common/decl.hpp>
|
||||
|
||||
namespace unitree
|
||||
{
|
||||
namespace robot
|
||||
{
|
||||
namespace go2
|
||||
{
|
||||
UT_DECL_ERR(UT_ROBOT_VUI_ERR_COMM, 100, "Invalid parameter")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif//__UT_ROBOT_GO2_VUI_ERROR_HPP__
|
Reference in New Issue
Block a user