AGVC SDK  0.8.0
System(系统模块)

AGVC系统配置、控制权、软件升级、固件更新等系统级功能 更多...

函数

int agvc_interface::AgvcInterface::setSystemClock (const std::string &stamp)
 设置agv系统时间
AsyncInterfaceResultStatus agvc_interface::AgvcInterface::getAsyncInterfaceResultStatus ()
 查询异步接口的运行情况,不代表异步接口本身的运行结果
std::vector< std::string > agvc_interface::AgvcInterface::getWifiList ()
 获取当前扫描到的WiFi列表
int agvc_interface::AgvcInterface::connectWifi (const std::string &ssid, const std::string &password)
 连接到指定WiFi(自动切换到WiFi模式)
int agvc_interface::AgvcInterface::enableHotspot (const std::string &password)
 开启热点(自动切换到热点模式)
std::vector< IpAddressInfoagvc_interface::AgvcInterface::getIpAddressList ()
 获取本机所有IP地址
std::string agvc_interface::AgvcInterface::getAgvControllerParametersFile ()
 获取agv控制器的参数文件
int agvc_interface::AgvcInterface::setAgvControllerParametersFile (const std::string &agv_parameters)
 设置agv控制器的参数文件
int agvc_interface::AgvcInterface::refreshAgvControllerParametersFile ()
 修改agv控制器的参数文件后,让agv各节点刷新参数
int agvc_interface::AgvcInterface::resetAgvControllerParametersFile ()
 将agv控制器的参数文件恢复出厂设置
int agvc_interface::AgvcInterface::updateSoftware (const std::string &upgrade_pack_path)
 agv软件升级
std::vector< std::string > agvc_interface::AgvcInterface::getSoftwareVersionList ()
 获取agv软件版本列表
int agvc_interface::AgvcInterface::switchSoftwareVersion (const std::string &software_version)
 切换agv软件版本
int agvc_interface::AgvcInterface::uninstallSoftware (const std::string &software_version)
 卸载agv软件版本
int agvc_interface::AgvcInterface::updateFirmware (const FirmwareUpdateParam &update_firmware)
 agv固件更新
FirmwareUpdateProcessInfo agvc_interface::AgvcInterface::getUpdateFirmwareProcess ()
 获取固件更新过程信息
int agvc_interface::AgvcInterface::startCollectCalibrationData (const CalibrationType &type, const Header &command_header={ "99999", "99999", 1, "99999" })
 开始采集数据
int agvc_interface::AgvcInterface::cancelCollectCalibrationData (const CalibrationType &type, const Header &command_header={ "99999", "99999", 1, "99999" })
 取消采集数据
int agvc_interface::AgvcInterface::startCalibration (const CalibrationType &type, const Header &command_header={ "99999", "99999", 1, "99999" })
 开始标定
CalibrationProcessInfo agvc_interface::AgvcInterface::getCalibrationProcessInfo (const CalibrationType &type)
 获取标定信息
int agvc_interface::AgvcInterface::restartAgv ()
 重启agv
int agvc_interface::AgvcInterface::setAgvName (const std::string &agv_name)
 设置agv的名称
int agvc_interface::AgvcInterface::setPriority (const std::string &name, const std::string &ip="")
 控制权设置
int agvc_interface::AgvcInterface::releasePriority ()
 释放控制权
int agvc_interface::AgvcInterface::scriptPaused ()
 暂停脚本
int agvc_interface::AgvcInterface::scriptResume ()
 脚本恢复
int agvc_interface::AgvcInterface::scriptStop ()
 脚本停止权
int agvc_interface::AgvcInterface::setScriptStatus (ScriptRuntimeState status)
 设置脚本运行状态
int agvc_interface::AgvcInterface::autoAlignRailway (const Header &command_header={ "99999", "99999", 1, "99999" })
 自动对接轨道并上轨

详细描述

AGVC系统配置、控制权、软件升级、固件更新等系统级功能

函数说明

◆ autoAlignRailway()

int agvc_interface::AgvcInterface::autoAlignRailway ( const Header & command_header = { "99999", "99999", 1, "99999" })

自动对接轨道并上轨

注意
1.异步接口; 2.控制权限制
参数
[in]command_headerid字段代表下发本次命令的id;其他字段无特殊含义
返回
10100000:自动上轨成功 10100201:正在上轨中 10120202:无控制权 else:上轨失败

◆ cancelCollectCalibrationData()

int agvc_interface::AgvcInterface::cancelCollectCalibrationData ( const CalibrationType & type,
const Header & command_header = { "99999", "99999", 1, "99999" } )

取消采集数据

参数
[in]type标定类型
[in]command_headerid字段代表下发本次命令的id;其他字段无特殊含义
返回
10100000:接口调用成功 10120202:无控制权 else:接口调用失败

◆ connectWifi()

int agvc_interface::AgvcInterface::connectWifi ( const std::string & ssid,
const std::string & password )

连接到指定WiFi(自动切换到WiFi模式)

注解
必须在有线连接时调用,且执行时间较长
参数
[in]ssidWiFi名称
[in]passwordWiFi密码
返回
10100000:连接WiFi成功 else:连接WiFi失败

◆ enableHotspot()

int agvc_interface::AgvcInterface::enableHotspot ( const std::string & password)

开启热点(自动切换到热点模式)

注解
必须在有线连接时调用,且执行时间较长
参数
[in]password热点密码, 如果为空使用"administrator"为默认密码;ssid默认为SN码
返回
10100000:启用热点成功 else:启用热点失败

◆ getAgvControllerParametersFile()

std::string agvc_interface::AgvcInterface::getAgvControllerParametersFile ( )

获取agv控制器的参数文件

返回
std::string 当前agv控制器中的参数信息

◆ getAsyncInterfaceResultStatus()

AsyncInterfaceResultStatus agvc_interface::AgvcInterface::getAsyncInterfaceResultStatus ( )

查询异步接口的运行情况,不代表异步接口本身的运行结果

注解
异步接口:saveMap, switchMap, changeRunningMode, relocation, sendBase64PngMapToAgv
异步接口:getGridMapAllInfo, setGridMapAllInfo, sendGridMapToAgv, getGridMapFromAgv
异步接口:getPngMapAllInfo, setPngMapAllInfo, getBase64PngMapFromAgv, previewPngMapFromAgv
异步接口:autoAlignRailway
客户端与agv断联后,调用该接口获取异步接口运行情况
返回值的每个字段中均有header,其中header.id表示下发异步任务时的id号
返回
NONE: 异步接口未运行 RUNNING:异步接口运行中 FINISH: 异步接口运行结束

◆ getCalibrationProcessInfo()

CalibrationProcessInfo agvc_interface::AgvcInterface::getCalibrationProcessInfo ( const CalibrationType & type)

获取标定信息

参数
[in]type标定类型
返回
标定信息

◆ getIpAddressList()

std::vector< IpAddressInfo > agvc_interface::AgvcInterface::getIpAddressList ( )

获取本机所有IP地址

返回
本机所有IP地址

◆ getSoftwareVersionList()

std::vector< std::string > agvc_interface::AgvcInterface::getSoftwareVersionList ( )

获取agv软件版本列表

返回
软件版本列表集合 {0.3.2+3b807d1-Linux_x86_64,0.6.3-patch.3+b8c6aa4-Linux_x86_64}

◆ getUpdateFirmwareProcess()

FirmwareUpdateProcessInfo agvc_interface::AgvcInterface::getUpdateFirmwareProcess ( )

获取固件更新过程信息

返回
固件更新步骤信息(步骤信息为failed代表更新失败),更新进度(进度信息为1.0代表更新成功)

◆ getWifiList()

std::vector< std::string > agvc_interface::AgvcInterface::getWifiList ( )

获取当前扫描到的WiFi列表

注意
异步接口
返回
{RUNNING} 异步接口运行中 {} 为空-未扫描到WIFI {SSID} 不为空-扫描到的WIFI名称列表

◆ refreshAgvControllerParametersFile()

int agvc_interface::AgvcInterface::refreshAgvControllerParametersFile ( )

修改agv控制器的参数文件后,让agv各节点刷新参数

注意
控制权限制
注解
不要高频调用,调用频率低于1Hz
返回
10100000:接口执行成功 else:接口执行失败

◆ releasePriority()

int agvc_interface::AgvcInterface::releasePriority ( )

释放控制权

返回
10100000:释放控制权成功 else:释放控制权失败

◆ resetAgvControllerParametersFile()

int agvc_interface::AgvcInterface::resetAgvControllerParametersFile ( )

将agv控制器的参数文件恢复出厂设置

注意
控制权限制
注解
不要高频调用,调用频率低于1Hz
返回
10100000:接口执行成功 else:接口执行失败

◆ restartAgv()

int agvc_interface::AgvcInterface::restartAgv ( )

重启agv

返回
10100000:重启指令执行成功 else:重启指令执行失败

◆ scriptPaused()

int agvc_interface::AgvcInterface::scriptPaused ( )

暂停脚本

返回
10100000:脚本暂停成功 else:脚本暂停失败

◆ scriptResume()

int agvc_interface::AgvcInterface::scriptResume ( )

脚本恢复

返回
10100000:脚本恢复成功 else:脚本恢复失败

◆ scriptStop()

int agvc_interface::AgvcInterface::scriptStop ( )

脚本停止权

返回
10100000:脚本停止成功 else:脚本停止失败

◆ setAgvControllerParametersFile()

int agvc_interface::AgvcInterface::setAgvControllerParametersFile ( const std::string & agv_parameters)

设置agv控制器的参数文件

注意
控制权限制
注解
不要高频调用,调用频率低于1Hz;此接口会默认执行刷新参数功能
参数
[in]agv_parametersagv控制器的参数信息
返回
10100000:设置参数成功 else:设置参数失败

◆ setAgvName()

int agvc_interface::AgvcInterface::setAgvName ( const std::string & agv_name)

设置agv的名称

参数
[in]agv_name设置的agv名称
返回
10100000:设置名称成功 else:设置名称失败

◆ setPriority()

int agvc_interface::AgvcInterface::setPriority ( const std::string & name,
const std::string & ip = "" )

控制权设置

注解
1.该接口设置成功后才能正常使用控制权相关接口 2.控制权设置前需要先释放他人的控制权:releasePriority 3.web端抢占优先权: name="web"
参数
[in]name登陆RPC注册时的用户名
[in]ipIP地址
返回
10100000:设置控制权成功 else:设置控制权失败

◆ setScriptStatus()

int agvc_interface::AgvcInterface::setScriptStatus ( ScriptRuntimeState status)

设置脚本运行状态

返回
10100000:设置脚本运行状态成功 else:设置脚本运行状态失败

◆ setSystemClock()

int agvc_interface::AgvcInterface::setSystemClock ( const std::string & stamp)

设置agv系统时间

参数
[in]stamp时间戳,YYYY-MM-DDTHH:mm:ss.ssZ (e.g.“2017-04-15T11:40:03.12Z”)

◆ startCalibration()

int agvc_interface::AgvcInterface::startCalibration ( const CalibrationType & type,
const Header & command_header = { "99999", "99999", 1, "99999" } )

开始标定

参数
[in]type标定类型
[in]command_headerid字段代表下发本次命令的id;其他字段无特殊含义
返回
10100000:接口调用成功 10120202:无控制权 else:接口调用失败

◆ startCollectCalibrationData()

int agvc_interface::AgvcInterface::startCollectCalibrationData ( const CalibrationType & type,
const Header & command_header = { "99999", "99999", 1, "99999" } )

开始采集数据

注解
LASER_ODOM标定采集数据量要求大于1000组,具体数据量可以在配置文件中修改
参数
[in]type标定类型
[in]command_headerid字段代表下发本次命令的id;其他字段无特殊含义
返回
10100000:接口调用成功 10120202:无控制权 else:接口调用失败

◆ switchSoftwareVersion()

int agvc_interface::AgvcInterface::switchSoftwareVersion ( const std::string & software_version)

切换agv软件版本

参数
[in]software_version软件版本 "0.3.2+3b807d1-Linux_x86_64"
返回
10100000:软件版本切换成功 else:软件版本切换失败

◆ uninstallSoftware()

int agvc_interface::AgvcInterface::uninstallSoftware ( const std::string & software_version)

卸载agv软件版本

参数
[in]software_version软件版本 "0.3.2+3b807d1-Linux_x86_64"
返回
10100000:软件版本卸载成功 else:软件版本卸载失败

◆ updateFirmware()

int agvc_interface::AgvcInterface::updateFirmware ( const FirmwareUpdateParam & update_firmware)

agv固件更新

参数
[in]update_firmware配置要更新固件的模块、固件存储路径
返回
10100000:下发固件更新信息成功 else:固件正在更新中

◆ updateSoftware()

int agvc_interface::AgvcInterface::updateSoftware ( const std::string & upgrade_pack_path)

agv软件升级

参数
[in]upgrade_pack_path升级包路径,例如"/root/agvc_release-0.1.1+398d1f7-Linux_x86_64.tar.gz"
返回
10100000:目标版本升级成功 10100201:正在升级中 else:升级失败