mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-20 17:11:20 -08:00
Implement devices in the protocol (#205)
This commit is contained in:
1 parent
078b140966
commit
c22b5ce421
20 files changed
+328
-100
No files matched your search
@@ -0,0 +1,60 @@
|
||||
package dev.slimevr.vr;
|
||||
|
||||
import dev.slimevr.vr.trackers.Tracker;
|
||||
import io.eiren.util.collections.FastList;
|
||||
|
||||
|
||||
public class Device implements IDevice {
|
||||
|
||||
private final int id;
|
||||
private String customName;
|
||||
private String firmwareVersion;
|
||||
private String manufacturer;
|
||||
|
||||
private final FastList<Tracker> trackers = new FastList<>();
|
||||
|
||||
public Device() {
|
||||
this.id = nextLocalDeviceId.incrementAndGet();
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setCustomName(String customName) {
|
||||
this.customName = customName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getManufacturer() {
|
||||
return this.manufacturer;
|
||||
}
|
||||
|
||||
public void setManufacturer(String manufacturer) {
|
||||
this.manufacturer = manufacturer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFirmwareVersion() {
|
||||
return this.firmwareVersion;
|
||||
}
|
||||
|
||||
public void setFirmwareVersion(String firmwareVersion) {
|
||||
this.firmwareVersion = firmwareVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCustomName() {
|
||||
return this.customName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FastList<Tracker> getTrackers() {
|
||||
return trackers;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user