智能带宽

## 智能带宽 设置带宽网关。 >w 中继模式不能带宽设置。 #### 一、 智能带宽设置接口 导入头文件`#import <H3CMagicKit/H3CGatewayObject+BandwidthSet.h` #### 1.1 获取当前智能带宽状态 获取当前智能带宽开关状态、以及WAN1、WAN2带宽状态。 ``` [H3CGatewayObject getSmartBandwidthConfigWithSuccess:^(H3CSmartBandwidthModel * _Nonnull smartBandwidthMode) { } failure:^(H3CError *error) { }]; ``` >w 接口需要能力集14位支持 #### 1.2 获取智能带宽运营商选择列表 获取智能带宽运营商选择列表后,`接口1.1`可以跟`operType`匹配对应运营商带宽套餐。 ``` [H3CGatewayObject getSmartBandwidthChioceWithSuccess:^(NSArray<H3CBandwidthOperModel *> * _Nonnull smartBandwidthOperModes) { } failure:^(H3CError *error) { }]; ``` 若网关不支持接口能力集54位,则使用默认运营商列表`[H3CGatewayObject defaultSmartBandwidthChioce];`。 >w 接口需要能力集54位支持 #### 1.3 设置智能带宽 ``` H3CSmartBandwidthModel *smartBandwidthModel = [[H3CSmartBandwidthModel alloc] init]; smartBandwidthModel.power = bandwidthStatus; smartBandwidthModel.wanBandWidth = wanBandWidthArr; [H3CGatewayObject setSmartBandwidthConfigWitSmartBandwidthModel:smartBandwidthModel success:^(id obj) { } failure:^(H3CError *error) { }]; ``` #### 二、 游戏加速带宽设置接口 导入头文件`#import <H3CMagicKit/H3CGatewayObject+BandwidthSet.h` #### 2.1 获取游戏加速当前带宽状态 获取游戏加速WAN1、WAN2带宽状态。 ``` [H3CGatewayObject getGameBoostBandwidthConfigWithSuccess:^(NSArray<H3CBandwidthModel *> * _Nonnull bandwidthModeList) { } failure:^(H3CError *error) { }]; ``` >w 接口需要能力集54位支持 #### 2.2 获取游戏加速智能带宽运营商选择列表 与接口`1.2`一致。 #### 2.3 设置游戏加速带宽 ``` [H3CGatewayObject setGameBoostBandwidthConfigWitSmartBandwidthModel:wanBandWidthArr success:^(id obj) { } failure:^(H3CError *error) { }]; ``` #### 三、 能力集 | 能力集序号|能力集属性|描述| |-|-|-| |22| isSupportSmartBroadband | 是否智能带宽功能| |54| isSupportRequireBandWidthOpers | 是否支持智能带宽运营商列表的接口获取|