mirror of
				https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
				synced 2025-10-31 02:27:49 +00:00 
			
		
		
		
	Merged in NETEXP-3580 (pull request #30)
[NETEXP-3580] Opensync: support channel bandwidth in AP status API Approved-by: mike.hansen
This commit is contained in:
		 Thomas Leung
					Thomas Leung
				
			
				
					committed by
					
						 Thomas-Leung2021
						Thomas-Leung2021
					
				
			
			
				
	
			
			
			 Thomas-Leung2021
						Thomas-Leung2021
					
				
			
						parent
						
							753a4fdb89
						
					
				
				
					commit
					d3cffd570f
				
			| @@ -47,6 +47,7 @@ import com.telecominfraproject.wlan.client.session.models.ClientDhcpDetails; | |||||||
| import com.telecominfraproject.wlan.client.session.models.ClientSession; | import com.telecominfraproject.wlan.client.session.models.ClientSession; | ||||||
| import com.telecominfraproject.wlan.client.session.models.ClientSessionDetails; | import com.telecominfraproject.wlan.client.session.models.ClientSessionDetails; | ||||||
| import com.telecominfraproject.wlan.core.model.entity.CountryCode; | import com.telecominfraproject.wlan.core.model.entity.CountryCode; | ||||||
|  | import com.telecominfraproject.wlan.core.model.equipment.ChannelBandwidth; | ||||||
| import com.telecominfraproject.wlan.core.model.equipment.EquipmentType; | import com.telecominfraproject.wlan.core.model.equipment.EquipmentType; | ||||||
| import com.telecominfraproject.wlan.core.model.equipment.LedStatus; | import com.telecominfraproject.wlan.core.model.equipment.LedStatus; | ||||||
| import com.telecominfraproject.wlan.core.model.equipment.MacAddress; | import com.telecominfraproject.wlan.core.model.equipment.MacAddress; | ||||||
| @@ -1352,10 +1353,30 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra | |||||||
|             channelStatus.setDetails(channelStatusData); |             channelStatus.setDetails(channelStatusData); | ||||||
|         } |         } | ||||||
|         ((EquipmentChannelStatusData) channelStatus.getDetails()).getChannelNumberStatusDataMap().put(radioState.getFreqBand(), radioState.getChannel()); |         ((EquipmentChannelStatusData) channelStatus.getDetails()).getChannelNumberStatusDataMap().put(radioState.getFreqBand(), radioState.getChannel()); | ||||||
|  |         ChannelBandwidth channelBandwidth = convertHtModeToChannelBandwidth(radioState.getHtMode()); | ||||||
|  |         ((EquipmentChannelStatusData) channelStatus.getDetails()).getChannelBandwidthStatusDataMap().put(radioState.getFreqBand(), channelBandwidth); | ||||||
|         ((EquipmentChannelStatusData) channelStatus.getDetails()).getTxPowerDataMap().put(radioState.getFreqBand(), radioState.getTxPower()); |         ((EquipmentChannelStatusData) channelStatus.getDetails()).getTxPowerDataMap().put(radioState.getFreqBand(), radioState.getTxPower()); | ||||||
|         return channelStatus; |         return channelStatus; | ||||||
|     } |     } | ||||||
|  |      | ||||||
|  |     private ChannelBandwidth convertHtModeToChannelBandwidth(String htMode) { | ||||||
|  |         switch (htMode) { | ||||||
|  |             case "HT20": | ||||||
|  |                 return ChannelBandwidth.is20MHz; | ||||||
|  |             case "HT40": | ||||||
|  |             case "HT40-": | ||||||
|  |             case "HT40+": | ||||||
|  |                 return ChannelBandwidth.is40MHz; | ||||||
|  |             case "HT80": | ||||||
|  |                 return ChannelBandwidth.is80MHz; | ||||||
|  |             case "HT160": | ||||||
|  |                 return ChannelBandwidth.is160MHz; | ||||||
|  |             default: | ||||||
|  |                 LOG.warn("Unrecognized channel HtMode {}", htMode); | ||||||
|  |                 return ChannelBandwidth.UNSUPPORTED; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |      | ||||||
|     private boolean updateChannelPowerLevels(String apId, ApElementConfiguration apElementConfiguration, OpensyncAPRadioState radioState) { |     private boolean updateChannelPowerLevels(String apId, ApElementConfiguration apElementConfiguration, OpensyncAPRadioState radioState) { | ||||||
|  |  | ||||||
|         boolean configStateMismatch = false; |         boolean configStateMismatch = false; | ||||||
|   | |||||||
| @@ -42,7 +42,7 @@ public class OpensyncAPRadioState extends OpensyncAPBase { | |||||||
|     public Map<String, String> hwConfig; |     public Map<String, String> hwConfig; | ||||||
|     public int channel; |     public int channel; | ||||||
|     public int txPower; |     public int txPower; | ||||||
|     public String htMode; |     public String htMode; // used in channel bandwidth | ||||||
|     public int thermalDowngradeTemp; |     public int thermalDowngradeTemp; | ||||||
|     public String hwMode; |     public String hwMode; | ||||||
|     public boolean enabled; |     public boolean enabled; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user