public class BeckhoffSwitch extends AbstractSwitch implements DriverDepending, Reloadable
PollingBeckhoffServer, the
PLC variable for this sensor must be includedDriverDepending
interface.KEY_INITOFF key.
#turnOnTimeout method switches on, but switches
off again after the stated period.PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private PollingBeckhoffServer |
ads
The ADS server to send variable read/writes to.
|
private static boolean |
DEFINITOFF
The initial state of the switch.
|
static String |
KEY_ADSDRIVER
The name of the server to use.
|
static String |
KEY_INITOFF
The key defining initial off.
|
static String |
KEY_PLCSWITCH
The name of the PLC variable that allows switching.
|
KEY_INITBOOLEANKEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
BeckhoffSwitch(Map<String,String> prop)
Constructs a new light switch trigger.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
off()
Turn the light off.
|
protected boolean |
on()
Turns the switch on.
|
boolean |
registerDriver(Driver rs485)
Registers the driver.
|
double |
rescanned(String key,
String old,
String newval)
As any parameter depending instance we fail if the parameter we depend
on is now a different one.
|
turnOff, turnOngetLastToggleTime, getTrigger, init, setTriggerget, getElapsedToggleTime, isTrue, set, toggleTriggercreateParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, setName, toStringclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitreloaddefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiesinitgetElapsedToggleTime, getLastToggleTime, getTrigger, isTrue, setTrigger, toggleTriggerpublic static final String KEY_ADSDRIVER
public static final String KEY_PLCSWITCH
public static final String KEY_INITOFF
private static final boolean DEFINITOFF
private transient PollingBeckhoffServer ads
public double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class SimpleTriggerpublic boolean registerDriver(Driver rs485)
PollingRS485Server. If so, it's name is check to match the
#KEY_SERIAL name. If this, too, is fulfilled, the server is
passed to the super-method, which does the necessary cache change
registration. Additionally an instance of this server is stored locally
to allow sending of commands to the serial server.registerDriver in interface DriverDependingprotected boolean on()
on in class AbstractSwitchprotected boolean off()
off in class AbstractSwitch