summaryrefslogtreecommitdiff
path: root/service/coex-table-parser
diff options
context:
space:
mode:
author Quang Luong <qal@google.com> 2020-10-14 14:14:46 -0700
committer Quang Luong <qal@google.com> 2020-11-18 19:15:27 -0800
commit453e2ca79ca8fa76842eb118851fa0279a055339 (patch)
tree00448ca5a0b85da90997c15a430a90ca595cc9e9 /service/coex-table-parser
parent1b0dfc80085800a83c94d605bcb46c380d0bc58b (diff)
[WifiCoex] Define xsd_config module for parsing coex table
Define an xsd_config module for parsing the coex table XML defined by coex_table.xsd. Bug: 153651001 Test: build Change-Id: Ic61cabc0cc23ad313be88d23c8e4715f1bc0c06f
Diffstat (limited to 'service/coex-table-parser')
-rw-r--r--service/coex-table-parser/Android.bp20
-rw-r--r--service/coex-table-parser/api/current.txt128
-rw-r--r--service/coex-table-parser/api/last_current.txt0
-rw-r--r--service/coex-table-parser/api/last_removed.txt0
-rw-r--r--service/coex-table-parser/api/removed.txt1
-rw-r--r--service/coex-table-parser/coex_table.xsd141
6 files changed, 290 insertions, 0 deletions
diff --git a/service/coex-table-parser/Android.bp b/service/coex-table-parser/Android.bp
new file mode 100644
index 0000000000..2e4d6559fd
--- /dev/null
+++ b/service/coex-table-parser/Android.bp
@@ -0,0 +1,20 @@
+//
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+xsd_config {
+ name: "coex-table-parser",
+ srcs: ["coex_table.xsd"],
+ package_name: "com.android.server.wifi.coex.table",
+}
diff --git a/service/coex-table-parser/api/current.txt b/service/coex-table-parser/api/current.txt
new file mode 100644
index 0000000000..1226f290ec
--- /dev/null
+++ b/service/coex-table-parser/api/current.txt
@@ -0,0 +1,128 @@
+// Signature format: 2.0
+package com.android.server.wifi.coex.table {
+
+ public class DefaultChannels {
+ ctor public DefaultChannels();
+ method public int getDefault2g();
+ method public int getDefault5g();
+ method public void setDefault2g(int);
+ method public void setDefault5g(int);
+ }
+
+ public class Entry {
+ ctor public Entry();
+ method public int getBand();
+ method public com.android.server.wifi.coex.table.Override getOverride();
+ method public com.android.server.wifi.coex.table.Params getParams();
+ method public int getPowerCapDbm();
+ method public com.android.server.wifi.coex.table.RatType getRat();
+ method public void setBand(int);
+ method public void setOverride(com.android.server.wifi.coex.table.Override);
+ method public void setParams(com.android.server.wifi.coex.table.Params);
+ method public void setPowerCapDbm(int);
+ method public void setRat(com.android.server.wifi.coex.table.RatType);
+ }
+
+ public class HarmonicParams {
+ ctor public HarmonicParams();
+ method public int getN();
+ method public int getOverlap();
+ method public void setN(int);
+ method public void setOverlap(int);
+ }
+
+ public class IntermodParams {
+ ctor public IntermodParams();
+ method public int getM();
+ method public int getN();
+ method public int getOverlap();
+ method public void setM(int);
+ method public void setN(int);
+ method public void setOverlap(int);
+ }
+
+ public class NeighborThresholds {
+ ctor public NeighborThresholds();
+ method public int getCellVictimMhz();
+ method public int getWifiVictimMhz();
+ method public void setCellVictimMhz(int);
+ method public void setWifiVictimMhz(int);
+ }
+
+ public class Override {
+ ctor public Override();
+ method public com.android.server.wifi.coex.table.Override2g getOverride2g();
+ method public com.android.server.wifi.coex.table.Override5g getOverride5g();
+ method public void setOverride2g(com.android.server.wifi.coex.table.Override2g);
+ method public void setOverride5g(com.android.server.wifi.coex.table.Override5g);
+ }
+
+ public class Override2g {
+ ctor public Override2g();
+ method public java.util.List<com.android.server.wifi.coex.table.OverrideCategory2g> getCategory();
+ method public java.util.List<java.lang.Integer> getChannel();
+ }
+
+ public class Override5g {
+ ctor public Override5g();
+ method public java.util.List<com.android.server.wifi.coex.table.OverrideCategory5g> getCategory();
+ method public java.util.List<java.lang.Integer> getChannel();
+ }
+
+ public enum OverrideCategory2g {
+ method public String getRawName();
+ enum_constant public static final com.android.server.wifi.coex.table.OverrideCategory2g all;
+ }
+
+ public enum OverrideCategory5g {
+ method public String getRawName();
+ enum_constant public static final com.android.server.wifi.coex.table.OverrideCategory5g _160Mhz;
+ enum_constant public static final com.android.server.wifi.coex.table.OverrideCategory5g _20Mhz;
+ enum_constant public static final com.android.server.wifi.coex.table.OverrideCategory5g _40Mhz;
+ enum_constant public static final com.android.server.wifi.coex.table.OverrideCategory5g _80Mhz;
+ enum_constant public static final com.android.server.wifi.coex.table.OverrideCategory5g all;
+ }
+
+ public class Params {
+ ctor public Params();
+ method public com.android.server.wifi.coex.table.DefaultChannels getDefaultChannels();
+ method public com.android.server.wifi.coex.table.HarmonicParams getHarmonicParams2g();
+ method public com.android.server.wifi.coex.table.HarmonicParams getHarmonicParams5g();
+ method public com.android.server.wifi.coex.table.IntermodParams getIntermodParams2g();
+ method public com.android.server.wifi.coex.table.IntermodParams getIntermodParams5g();
+ method public com.android.server.wifi.coex.table.NeighborThresholds getNeighborThresholds();
+ method public void setDefaultChannels(com.android.server.wifi.coex.table.DefaultChannels);
+ method public void setHarmonicParams2g(com.android.server.wifi.coex.table.HarmonicParams);
+ method public void setHarmonicParams5g(com.android.server.wifi.coex.table.HarmonicParams);
+ method public void setIntermodParams2g(com.android.server.wifi.coex.table.IntermodParams);
+ method public void setIntermodParams5g(com.android.server.wifi.coex.table.IntermodParams);
+ method public void setNeighborThresholds(com.android.server.wifi.coex.table.NeighborThresholds);
+ }
+
+ public enum RatType {
+ method public String getRawName();
+ enum_constant public static final com.android.server.wifi.coex.table.RatType LTE;
+ enum_constant public static final com.android.server.wifi.coex.table.RatType NR;
+ }
+
+ public class Table {
+ ctor public Table();
+ method public java.util.List<com.android.server.wifi.coex.table.Entry> getEntry();
+ }
+
+ public class XmlParser {
+ ctor public XmlParser();
+ method public static com.android.server.wifi.coex.table.DefaultChannels readDefaultChannels(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static com.android.server.wifi.coex.table.Entry readEntry(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static com.android.server.wifi.coex.table.NeighborThresholds readNeighborThresholds(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static com.android.server.wifi.coex.table.Override readOverride(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static com.android.server.wifi.coex.table.Override2g readOverride2g(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static com.android.server.wifi.coex.table.Override5g readOverride5g(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static com.android.server.wifi.coex.table.Params readParams(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static com.android.server.wifi.coex.table.Table readTable(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static String readText(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static void skip(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ }
+
+}
+
diff --git a/service/coex-table-parser/api/last_current.txt b/service/coex-table-parser/api/last_current.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/service/coex-table-parser/api/last_current.txt
diff --git a/service/coex-table-parser/api/last_removed.txt b/service/coex-table-parser/api/last_removed.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/service/coex-table-parser/api/last_removed.txt
diff --git a/service/coex-table-parser/api/removed.txt b/service/coex-table-parser/api/removed.txt
new file mode 100644
index 0000000000..d802177e24
--- /dev/null
+++ b/service/coex-table-parser/api/removed.txt
@@ -0,0 +1 @@
+// Signature format: 2.0
diff --git a/service/coex-table-parser/coex_table.xsd b/service/coex-table-parser/coex_table.xsd
new file mode 100644
index 0000000000..8c3603d94c
--- /dev/null
+++ b/service/coex-table-parser/coex_table.xsd
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2020 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ version="1.0">
+
+ <xsd:element name="table">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="entry" minOccurs="1" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="entry">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="rat" type="ratType"/>
+ <xsd:element name="band" type="xsd:int"/>
+ <xsd:element name="powerCapDbm" type="xsd:int" minOccurs="0"/>
+ <xsd:choice>
+ <xsd:element ref="params"/>
+ <xsd:element ref="override"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="ratType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="LTE"/>
+ <xsd:enumeration value="NR"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- Define coex algorithm parameters -->
+
+ <xsd:element name="params">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="neighborThresholds" minOccurs="0"/>
+ <xsd:element name="harmonicParams2g" type="harmonicParams" minOccurs="0"/>
+ <xsd:element name="harmonicParams5g" type="harmonicParams" minOccurs="0"/>
+ <xsd:element name="intermodParams2g" type="intermodParams" minOccurs="0"/>
+ <xsd:element name="intermodParams5g" type="intermodParams" minOccurs="0"/>
+ <xsd:element ref="defaultChannels" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="neighborThresholds">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="wifiVictimMhz" type="xsd:int" minOccurs="0"/>
+ <xsd:element name="cellVictimMhz" type="xsd:int" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:complexType name="harmonicParams">
+ <xsd:sequence>
+ <xsd:element name="N" type="xsd:int"/>
+ <xsd:element name="overlap" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="intermodParams">
+ <xsd:sequence>
+ <xsd:element name="N" type="xsd:int"/>
+ <xsd:element name="M" type="xsd:int"/>
+ <xsd:element name="overlap" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="defaultChannels">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="default2g" type="xsd:int" minOccurs="0"/>
+ <xsd:element name="default5g" type="xsd:int" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Define algorithm override lists -->
+
+ <xsd:element name="override">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="override2g" minOccurs="0"/>
+ <xsd:element ref="override5g" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="override2g">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="category" type="overrideCategory2g" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="channel" type="xsd:int" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="override5g">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="category" type="overrideCategory5g" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="channel" type="xsd:int" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="overrideCategory2g">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="overrideCategory5g">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ <xsd:enumeration value="20Mhz"/>
+ <xsd:enumeration value="40Mhz"/>
+ <xsd:enumeration value="80Mhz"/>
+ <xsd:enumeration value="160Mhz"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+</xsd:schema>