public class BrickletMotionDetector extends Device
Modifier and Type | Class and Description |
---|---|
static interface |
BrickletMotionDetector.DetectionCycleEndedListener
This listener is called when the detection cycle ended.
|
static interface |
BrickletMotionDetector.MotionDetectedListener
This listener is called after a motion was detected.
|
Device.Identity
Modifier and Type | Field and Description |
---|---|
static String |
DEVICE_DISPLAY_NAME |
static int |
DEVICE_IDENTIFIER |
static byte |
FUNCTION_GET_IDENTITY |
static byte |
FUNCTION_GET_MOTION_DETECTED |
static byte |
FUNCTION_GET_STATUS_LED_CONFIG |
static byte |
FUNCTION_SET_STATUS_LED_CONFIG |
static short |
MOTION_DETECTED |
static short |
MOTION_NOT_DETECTED |
static short |
STATUS_LED_CONFIG_OFF |
static short |
STATUS_LED_CONFIG_ON |
static short |
STATUS_LED_CONFIG_SHOW_STATUS |
Constructor and Description |
---|
BrickletMotionDetector(String uid,
IPConnection ipcon)
Creates an object with the unique device ID \c uid.
|
Modifier and Type | Method and Description |
---|---|
void |
addDetectionCycleEndedListener(BrickletMotionDetector.DetectionCycleEndedListener listener)
Adds a DetectionCycleEnded listener.
|
void |
addMotionDetectedListener(BrickletMotionDetector.MotionDetectedListener listener)
Adds a MotionDetected listener.
|
Device.Identity |
getIdentity()
Returns the UID, the UID where the Bricklet is connected to,
the position, the hardware and firmware version as well as the
device identifier.
|
short |
getMotionDetected()
Returns 1 if a motion was detected.
|
short |
getStatusLEDConfig()
Returns the configuration as set by
setStatusLEDConfig(short) . |
void |
removeDetectionCycleEndedListener(BrickletMotionDetector.DetectionCycleEndedListener listener)
Removes a DetectionCycleEnded listener.
|
void |
removeMotionDetectedListener(BrickletMotionDetector.MotionDetectedListener listener)
Removes a MotionDetected listener.
|
void |
setStatusLEDConfig(short config)
Sets the status led configuration.
|
getAPIVersion, getResponseExpected, setResponseExpected, setResponseExpectedAll
public static final int DEVICE_IDENTIFIER
public static final String DEVICE_DISPLAY_NAME
public static final byte FUNCTION_GET_MOTION_DETECTED
public static final byte FUNCTION_SET_STATUS_LED_CONFIG
public static final byte FUNCTION_GET_STATUS_LED_CONFIG
public static final byte FUNCTION_GET_IDENTITY
public static final short MOTION_NOT_DETECTED
public static final short MOTION_DETECTED
public static final short STATUS_LED_CONFIG_OFF
public static final short STATUS_LED_CONFIG_ON
public static final short STATUS_LED_CONFIG_SHOW_STATUS
public BrickletMotionDetector(String uid, IPConnection ipcon)
public short getMotionDetected() throws TinkerforgeException
TinkerforgeException
public void setStatusLEDConfig(short config) throws TinkerforgeException
TinkerforgeException
public short getStatusLEDConfig() throws TinkerforgeException
setStatusLEDConfig(short)
.
.. versionadded:: 2.0.1$nbsp;(Plugin)TinkerforgeException
public Device.Identity getIdentity() throws TinkerforgeException
getIdentity
in class Device
TinkerforgeException
public void addMotionDetectedListener(BrickletMotionDetector.MotionDetectedListener listener)
public void removeMotionDetectedListener(BrickletMotionDetector.MotionDetectedListener listener)
public void addDetectionCycleEndedListener(BrickletMotionDetector.DetectionCycleEndedListener listener)
public void removeDetectionCycleEndedListener(BrickletMotionDetector.DetectionCycleEndedListener listener)
Copyright © 2022 Tinkerforge GmbH. All rights reserved.