-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathDevice.java
More file actions
40 lines (34 loc) · 1.26 KB
/
Device.java
File metadata and controls
40 lines (34 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright (C) 2012-2013, 2020 Matthias Bolte <[email protected]>
* Copyright (C) 2011 Olaf Lüke <[email protected]>
*
* Redistribution and use in source and binary forms of this file,
* with or without modification, are permitted. See the Creative
* Commons Zero (CC0 1.0) License for more details.
*/
package com.tinkerforge;
import java.util.Arrays;
public abstract class Device extends DeviceBase {
public static class Identity {
public String uid;
public String connectedUid;
public char position;
public short[] hardwareVersion = new short[3];
public short[] firmwareVersion = new short[3];
public int deviceIdentifier;
public String toString() {
return "[" + "uid = " + uid + ", " + "connectedUid = " + connectedUid + ", " +
"position = " + position + ", " + "hardwareVersion = " + Arrays.toString(hardwareVersion) + ", " +
"firmwareVersion = " + Arrays.toString(firmwareVersion) + ", " +
"deviceIdentifier = " + deviceIdentifier + "]";
}
}
/**
* Creates the device object with the unique device ID \c uid and adds
* it to the IPConnection \c ipcon.
*/
public Device(String uid, IPConnection ipcon) {
super(uid, ipcon);
}
public abstract Identity getIdentity() throws TinkerforgeException;
}