|
|
Here, I'll walk you through the implementation of the [Light Animator](What-am-I-looking-at-here#light-animator). Additional startup procedures are explained in the documentation for the `start_component.sh` and the `run_demo.sh` scripts.
|
|
|
Here, I'll walk you through the implementation of the [Light Animator](What-am-I-looking-at-here#light-animator). Additional startup procedures are explained in the documentation for the [`start_component.sh`](implementation/start_component.sh) and the [`run_demo.sh`](implementation/run_demo.sh) scripts.
|
|
|
|
|
|
We'll skip the license headers, imports and comments, as they are either pretty much self explanatory or not the product of conscious development effort.
|
|
|
|
|
|
# ILightAnimator
|
|
|
The discussed file can be found [here](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/6d65d24412bda2e555e70a4f9581eb142096bd49/basyx.lichterkette/src/main/java/de/olipar/basyx/lichterkette/ILightAnimator.java).
|
|
|
The discussed file can be found [here](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/64e67bdaae14ef6945ab3e73b5a9c70c9c1ced67/basyx.lichterkette/src/main/java/de/olipar/basyx/lichterkette/ILightAnimator.java).
|
|
|
|
|
|
This interface defines what methods a light animator has to provide:
|
|
|
| Method | Purpose |
|
... | ... | @@ -17,7 +17,7 @@ This interface defines what methods a light animator has to provide: |
|
|
|
|
|
# LightAnimator
|
|
|
|
|
|
The discussed file can be found [here](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/6d65d24412bda2e555e70a4f9581eb142096bd49/basyx.lichterkette/src/main/java/de/olipar/basyx/lichterkette/LightAnimator.java).
|
|
|
The discussed file can be found [here](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/64e67bdaae14ef6945ab3e73b5a9c70c9c1ced67/basyx.lichterkette/src/main/java/de/olipar/basyx/lichterkette/LightAnimator.java).
|
|
|
|
|
|
```java
|
|
|
public class LightAnimator implements ILightAnimator {
|
... | ... | @@ -154,7 +154,7 @@ lightControllers.add(submodel); |
|
|
```
|
|
|
Now that we have found a compatible the AAS with a submodel we want, we use the manager to add it to our list.
|
|
|
|
|
|
This, too, could probably be done more elegantly by looking for implementations of Types of AAS and Submodels, but that is left to a possible [future project](TODO).
|
|
|
This, too, could probably be done more elegantly by looking for implementations of Types of AAS and Submodels, but that is left to a possible [future project](home#future-projects).
|
|
|
|
|
|
```java
|
|
|
public void animation1() {
|
... | ... | @@ -175,4 +175,4 @@ Only thing of note here, is that upon deactivation, the light animator orchestra |
|
|
|
|
|
Please read the walkthrough of the [lightControllerSubmodelProvider](Light-Controller-walkthrough#lightcontrollersubmodelprovider). It only differs by assigned ids and in the number of Properties and Operations defined. It is also quite extensively commented, so this section would only be a repetition.
|
|
|
|
|
|
You can find the file [here](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/6d65d24412bda2e555e70a4f9581eb142096bd49/basyx.lichterkette/src/main/java/de/olipar/basyx/lichterkette/LightAnimatorSubmodelProvider.java). |
|
|
\ No newline at end of file |
|
|
You can find the file [here](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/64e67bdaae14ef6945ab3e73b5a9c70c9c1ced67/basyx.lichterkette/src/main/java/de/olipar/basyx/lichterkette/LightAnimatorSubmodelProvider.java). |
|
|
\ No newline at end of file |