changed indent to space and removed created by comment
This commit is contained in:
parent
8526e5157d
commit
6a15640aea
44 changed files with 721 additions and 814 deletions
|
|
@ -30,9 +30,6 @@ import zutil.io.file.FileUtil;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-05-07.
|
||||
*/
|
||||
public class AliceBot implements HalBot{
|
||||
private Chat chatSession;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,6 @@
|
|||
|
||||
package se.hal.intf;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-05-07.
|
||||
*/
|
||||
public interface HalBot {
|
||||
|
||||
void initialize();
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@ package se.hal.intf;
|
|||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-03.
|
||||
*/
|
||||
public interface HalDaemon extends Runnable{
|
||||
|
||||
void initiate(ScheduledExecutorService executor);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package se.hal.intf;
|
|||
|
||||
/**
|
||||
* Interface representing one report from an event
|
||||
*
|
||||
* Created by Ziver on 2016-08-17.
|
||||
*/
|
||||
public abstract class HalDeviceData {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package se.hal.intf;
|
|||
|
||||
/**
|
||||
* Interface representing event type specific configuration data.
|
||||
*
|
||||
* Created by Ziver on 2015-12-23.
|
||||
*/
|
||||
public interface HalEventConfig {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
package se.hal.intf;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-15.
|
||||
*/
|
||||
public interface HalEventController {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package se.hal.intf;
|
|||
|
||||
/**
|
||||
* Interface representing one report from an event
|
||||
*
|
||||
* Created by Ziver on 2016-08-17.
|
||||
*/
|
||||
public abstract class HalEventData extends HalDeviceData{
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@ import java.io.IOException;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-10.
|
||||
*/
|
||||
public abstract class HalHttpPage implements HttpPage{
|
||||
private static final String TEMPLATE = "resource/web/main_index.tmpl";
|
||||
private static Navigation rootNav = Navigation.createRootNav();
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package se.hal.intf;
|
|||
|
||||
/**
|
||||
* Interface representing sensor type specific configuration data.
|
||||
*
|
||||
* Created by Ziver on 2015-12-23.
|
||||
*/
|
||||
public interface HalSensorConfig {
|
||||
enum AggregationMethod{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
package se.hal.intf;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-15.
|
||||
*/
|
||||
public interface HalSensorController {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package se.hal.intf;
|
|||
|
||||
/**
|
||||
* Interface representing one data report from a sensor.
|
||||
*
|
||||
* Created by Ziver on 2016-08-17.
|
||||
*/
|
||||
public abstract class HalSensorData extends HalDeviceData{
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,6 @@ import java.util.*;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Created by ezivkoc on 2016-01-20.
|
||||
*/
|
||||
public class HalAlertManager implements HttpPage {
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
private static final String TMPL_PATH = "resource/web/main_alerts.tmpl";
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@ import java.io.IOException;
|
|||
import java.sql.SQLException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2016-06-23.
|
||||
*/
|
||||
public class MapHttpPage extends HalHttpPage {
|
||||
private static final String TEMPLATE = "resource/web/map.tmpl";
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* TODO: This json endpoint might not be needed as we have SensorJsonPage?
|
||||
*
|
||||
* Created by Ziver on 2016-06-23.
|
||||
*/
|
||||
public class MapJsonPage extends HalJsonPage {
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import java.util.logging.Logger;
|
|||
* type: sensor data type name
|
||||
*
|
||||
* Data filtering parameters:
|
||||
* aggr: Aggrigation periods, needs to be provided to retrieve data. Possible values: minute,hour,day,week
|
||||
* aggr: Aggregation periods, needs to be provided to retrieve data. Possible values: minute,hour,day,week
|
||||
* </pre>
|
||||
*/
|
||||
public class SensorJsonPage extends HalJsonPage {
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2016-09-30.
|
||||
*/
|
||||
public class NetScanController implements HalEventController, HalAutoScannableController, InetScanListener, Runnable{
|
||||
public static Logger logger = LogUtil.getLogger();
|
||||
private static final int NETWORK_SYNC_INTERVAL = 3 * 60 * 60 * 1000; // 3 hours
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ import se.hal.intf.HalEventData;
|
|||
import se.hal.struct.devicedata.SwitchEventData;
|
||||
import zutil.ui.Configurator;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2016-10-02.
|
||||
*/
|
||||
public class NetworkDevice implements HalEventConfig {
|
||||
|
||||
@Configurator.Configurable("IP Address")
|
||||
|
|
|
|||
|
|
@ -15,9 +15,6 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2016-05-25.
|
||||
*/
|
||||
public class NutUpsController implements HalSensorController, HalAutoScannableController, Runnable{
|
||||
public static Logger logger = LogUtil.getLogger();
|
||||
private static final int SYNC_INTERVAL = 60 * 1000;
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ import se.hal.struct.devicedata.PowerConsumptionSensorData;
|
|||
import zutil.osal.linux.app.NutUPSClient;
|
||||
import zutil.ui.Configurator;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2016-05-25.
|
||||
*/
|
||||
public class NutUpsDevice implements HalSensorConfig{
|
||||
|
||||
@Configurator.Configurable("UPS id")
|
||||
|
|
|
|||
|
|
@ -20,9 +20,6 @@ import java.util.List;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-15.
|
||||
*/
|
||||
@DBBean.DBTable(value="event", superBean=true)
|
||||
public class Event extends AbstractDevice<Event, HalEventConfig,HalEventData>{
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ import java.sql.PreparedStatement;
|
|||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-03.
|
||||
*/
|
||||
@DBBean.DBTable("user")
|
||||
public class User extends DBBean{
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@ package se.hal.struct.devicedata;
|
|||
|
||||
import se.hal.intf.HalEventData;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-05-07.
|
||||
*/
|
||||
public class DimmerEventData extends HalEventData {
|
||||
|
||||
private double dimmValue;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@ package se.hal.struct.devicedata;
|
|||
|
||||
import se.hal.intf.HalSensorData;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-03.
|
||||
*/
|
||||
public class HumiditySensorData extends HalSensorData {
|
||||
|
||||
private double humidity;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@ package se.hal.struct.devicedata;
|
|||
|
||||
import se.hal.intf.HalSensorData;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-03.
|
||||
*/
|
||||
public class LightSensorData extends HalSensorData {
|
||||
|
||||
private double lux;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@ package se.hal.struct.devicedata;
|
|||
|
||||
import se.hal.intf.HalSensorData;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-03.
|
||||
*/
|
||||
public class PowerConsumptionSensorData extends HalSensorData {
|
||||
|
||||
private double wattHours;
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@ package se.hal.struct.devicedata;
|
|||
|
||||
import se.hal.intf.HalEventData;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-05-07.
|
||||
*/
|
||||
public class SwitchEventData extends HalEventData {
|
||||
|
||||
private boolean enabled;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@ package se.hal.struct.devicedata;
|
|||
|
||||
import se.hal.intf.HalSensorData;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-12-03.
|
||||
*/
|
||||
public class TemperatureSensorData extends HalSensorData {
|
||||
|
||||
private double temperature;
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@ import se.hal.intf.HalSpeechToText;
|
|||
import java.io.IOException;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-05-08.
|
||||
*/
|
||||
public class Sphinx4STTClient implements HalSpeechToText {
|
||||
private LiveSpeechRecognizer recognizer;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ import zutil.ui.Configurator.PreConfigurationActionListener;
|
|||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class DateTimeTrigger implements HalTrigger,Configurator.PostConfigurationActionListener {
|
||||
|
||||
@Configurator.Configurable("Minute (Cron format)")
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@ import java.sql.SQLException;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class EventTrigger extends DeviceTrigger{
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ import java.sql.SQLException;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class SensorTrigger extends DeviceTrigger{
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@ import se.hal.intf.HalTrigger;
|
|||
import zutil.Timer;
|
||||
import zutil.ui.Configurator;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class TimerTrigger implements HalTrigger {
|
||||
|
||||
@Configurator.Configurable("Countdown time (in seconds)")
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ import se.hal.intf.HalTextToSpeech;
|
|||
import javax.sound.sampled.AudioInputStream;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class MaryTTSLocalClient implements HalTextToSpeech {
|
||||
private MaryInterface marytts;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@ import java.sql.ResultSet;
|
|||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2016-08-22.
|
||||
*/
|
||||
public class DeviceDataSqlResult implements SQLResultHandler<HalDeviceData> {
|
||||
|
||||
private Class<? extends HalDeviceData> clazz;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue