public class DeviceFunctions
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static javax.persistence.EntityManager |
em |
private static javax.persistence.EntityManagerFactory |
emFactory |
| Constructor and Description |
|---|
DeviceFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static Device |
getDeviceByName(java.lang.String name)
Get a device by it's unique name
|
static boolean |
registerDevice(java.lang.String name,
java.lang.String ipAddress)
Register a device with the network.
|
private static javax.persistence.EntityManagerFactory emFactory
private static javax.persistence.EntityManager em
public static boolean registerDevice(java.lang.String name,
java.lang.String ipAddress)
a - String of the name a Unique identifier for the devicea - String of the ipAddress the IP address for the devicepublic static Device getDeviceByName(java.lang.String name)
name - a String of the device's unique name