This repository has been archived by the owner on Oct 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Marian Pohling edited this page May 10, 2017
·
19 revisions
<dependency>
<groupId>org.openbase.bco</groupId>
<artifactId>dal.remote</artifactId>
<version>[1.3,1.4-SNAPSHOT)</version>
</dependency>
For running any java examples you only need to include the dal remote dependency in your maven or gradle project description (see above).
### How to activate a scene
* [Complete Code Example](https://github.com/openbase/bco.dal/blob/master/example/src/main/java/org/openbase/bco/dal/example/HowToActivateASceneViaDAL.java)
Request the unit
```java
LOGGER.info("request the scene with the label \"WatchingTV\"");
testScene = Units.getUnitByLabel("WatchingTV", true, Units.SCENE);
Control the unit
LOGGER.info("activate the scene");
testScene.setActivationState(ActivationState.State.ACTIVE);
Request the unit
LOGGER.info("request the light unit with the label \"TestUnit_0\"");
testLight = Units.getUnitByLabel("TestUnit_0", true, Units.LIGHT_COLORABLE);
Control the unit
LOGGER.info("switch the light on");
testLight.setPowerState(PowerState.State.ON);
LOGGER.info("switch light color to blue");
testLight.setColor(Color.BLUE);