Skip to content

Commit

Permalink
add - doc - Added more USB ID classes
Browse files Browse the repository at this point in the history
---

We've added more functions that let you get more info about USB classes and interfaces, such as terminals, country codes, HID usage, and more.

---

Type: add
Breaking: False
Doc Required: True
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Oct 17, 2024
1 parent 9f488bd commit 0b31036
Show file tree
Hide file tree
Showing 12 changed files with 1,324 additions and 40 deletions.
48 changes: 48 additions & 0 deletions SpecProbe/Usb/Elements/UsbAudioTerminalInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// SpecProbe Copyright (C) 2023-2024 Aptivi
//
// This file is part of SpecProbe
//
// SpecProbe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SpecProbe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY, without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

namespace SpecProbe.Usb.Elements
{
/// <summary>
/// USB audio terminal information
/// </summary>
public class UsbAudioTerminalInfo
{
internal string audioTerminalName;
internal int audioTerminalId;

/// <summary>
/// Audio Terminal name
/// </summary>
public string Name =>
audioTerminalName;

/// <summary>
/// Audio Terminal ID
/// </summary>
public int Id =>
audioTerminalId;

internal UsbAudioTerminalInfo(string audioTerminalName, int audioTerminalId)
{
this.audioTerminalName = audioTerminalName;
this.audioTerminalId = audioTerminalId;
}
}
}
48 changes: 48 additions & 0 deletions SpecProbe/Usb/Elements/UsbCountryCodeInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// SpecProbe Copyright (C) 2023-2024 Aptivi
//
// This file is part of SpecProbe
//
// SpecProbe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SpecProbe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY, without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

namespace SpecProbe.Usb.Elements
{
/// <summary>
/// USB country code information
/// </summary>
public class UsbCountryCodeInfo
{
internal string countryCodeName;
internal int countryCodeId;

/// <summary>
/// Audio Terminal name
/// </summary>
public string Name =>
countryCodeName;

/// <summary>
/// Audio Terminal ID
/// </summary>
public int Id =>
countryCodeId;

internal UsbCountryCodeInfo(string countryCodeName, int countryCodeId)
{
this.countryCodeName = countryCodeName;
this.countryCodeId = countryCodeId;
}
}
}
48 changes: 48 additions & 0 deletions SpecProbe/Usb/Elements/UsbHidInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// SpecProbe Copyright (C) 2023-2024 Aptivi
//
// This file is part of SpecProbe
//
// SpecProbe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SpecProbe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY, without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

namespace SpecProbe.Usb.Elements
{
/// <summary>
/// USB human interface device information
/// </summary>
public class UsbHidInfo
{
internal string hidName;
internal int hidId;

/// <summary>
/// Audio Terminal name
/// </summary>
public string Name =>
hidName;

/// <summary>
/// Audio Terminal ID
/// </summary>
public int Id =>
hidId;

internal UsbHidInfo(string hidName, int hidId)
{
this.hidName = hidName;
this.hidId = hidId;
}
}
}
48 changes: 48 additions & 0 deletions SpecProbe/Usb/Elements/UsbHidItemInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// SpecProbe Copyright (C) 2023-2024 Aptivi
//
// This file is part of SpecProbe
//
// SpecProbe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SpecProbe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY, without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

namespace SpecProbe.Usb.Elements
{
/// <summary>
/// USB human interface device information
/// </summary>
public class UsbHidItemInfo
{
internal string hidItemName;
internal int hidItemId;

/// <summary>
/// Audio Terminal name
/// </summary>
public string Name =>
hidItemName;

/// <summary>
/// Audio Terminal ID
/// </summary>
public int Id =>
hidItemId;

internal UsbHidItemInfo(string hidItemName, int hidItemId)
{
this.hidItemName = hidItemName;
this.hidItemId = hidItemId;
}
}
}
48 changes: 48 additions & 0 deletions SpecProbe/Usb/Elements/UsbHidUsageInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// SpecProbe Copyright (C) 2023-2024 Aptivi
//
// This file is part of SpecProbe
//
// SpecProbe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SpecProbe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY, without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

namespace SpecProbe.Usb.Elements
{
/// <summary>
/// USB HID usage information
/// </summary>
public class UsbHidUsageInfo
{
internal string usageName;
internal int usageId;

/// <summary>
/// Usage name
/// </summary>
public string Name =>
usageName;

/// <summary>
/// Usage ID
/// </summary>
public int Id =>
usageId;

internal UsbHidUsageInfo(string usageName, int usageId)
{
this.usageName = usageName;
this.usageId = usageId;
}
}
}
55 changes: 55 additions & 0 deletions SpecProbe/Usb/Elements/UsbHidUsagePageInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
//
// SpecProbe Copyright (C) 2023-2024 Aptivi
//
// This file is part of SpecProbe
//
// SpecProbe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SpecProbe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY, without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

namespace SpecProbe.Usb.Elements
{
/// <summary>
/// USB HID usage page information
/// </summary>
public class UsbHidUsagePageInfo
{
internal string pageName;
internal int pageId;
internal UsbHidUsageInfo[] usages = [];

/// <summary>
/// Page name
/// </summary>
public string Name =>
pageName;

/// <summary>
/// Page ID
/// </summary>
public int Id =>
pageId;

/// <summary>
/// List of HID usages that this page provides
/// </summary>
public UsbHidUsageInfo[] Usages =>
usages;

internal UsbHidUsagePageInfo(string pageName, int pageId)
{
this.pageName = pageName;
this.pageId = pageId;
}
}
}
48 changes: 48 additions & 0 deletions SpecProbe/Usb/Elements/UsbLanguageDialectInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// SpecProbe Copyright (C) 2023-2024 Aptivi
//
// This file is part of SpecProbe
//
// SpecProbe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SpecProbe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY, without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

namespace SpecProbe.Usb.Elements
{
/// <summary>
/// USB language dialect information
/// </summary>
public class UsbLanguageDialectInfo
{
internal string dialectName;
internal int dialectId;

/// <summary>
/// Dialect name
/// </summary>
public string Name =>
dialectName;

/// <summary>
/// Dialect ID
/// </summary>
public int Id =>
dialectId;

internal UsbLanguageDialectInfo(string dialectName, int dialectId)
{
this.dialectName = dialectName;
this.dialectId = dialectId;
}
}
}
Loading

0 comments on commit 0b31036

Please sign in to comment.