Skip to content

Commit

Permalink
Merge pull request #28 from aljoshakoecher/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoshakoecher committed Apr 14, 2023
2 parents a71d501 + 76fd454 commit 2486bf0
Show file tree
Hide file tree
Showing 42 changed files with 381 additions and 278 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
release.properties
.flattened-pom.xml
6 changes: 4 additions & 2 deletions action-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.parent</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>skillup.action-generator</artifactId>
<packaging>bundle</packaging>
<name>Action Generator</name>

<dependencies>
<dependency>
<groupId>org.osgi</groupId>
Expand All @@ -19,7 +21,7 @@
<dependency>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.annotations</artifactId>
<version>${project.version}</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.github.aljoshakoecher</groupId>
Expand Down
4 changes: 2 additions & 2 deletions annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.parent</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>skillup.annotations</artifactId>

<packaging>bundle</packaging>
<name>SkillUp Annotations</name>
<description>Contains annotations that are needed to develop modules and skills using SkillUp</description>
Expand Down
6 changes: 5 additions & 1 deletion description-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.parent</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>skillup.description-generator</artifactId>
<packaging>bundle</packaging>
<name>Description Generator</name>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.26</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -30,6 +33,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.8</version>
<extensions>true</extensions>
<configuration>
<instructions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package descriptionGenerator;

import descriptionGenerator.DescriptionGenerator;

/**
* Class extends from {@link DescriptionGenerator} and has method that is equal
* for every skill independent of its type (e.g. REST)
Expand Down
4 changes: 3 additions & 1 deletion description-generator/src/main/resources/prefix.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@prefix Cap: <http://www.hsu-ifa.de/ontologies/capability-model#> .
@prefix CSS: <http://www.w3id.org/hsu-aut/css#> .
@prefix CaSk: <http://www.w3id.org/hsu-aut/cask#> .
@prefix CaSkMan: <http://www.w3id.org/hsu-aut/caskman#> .
@prefix DIN8580: <http://www.hsu-ifa.de/ontologies/DIN8580#> .
@prefix VDI3682: <http://www.hsu-ifa.de/ontologies/VDI3682#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
Expand Down
172 changes: 86 additions & 86 deletions description-generator/src/main/resources/stateMachine.ttl

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions examples/module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>skillup.examples.module</artifactId>
<packaging>bundle</packaging>
<name>Example Module</name>

<dependencies>
<dependency>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.annotations</artifactId>
<version>${project.version}</version>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
Expand Down
11 changes: 11 additions & 0 deletions examples/module/src/main/java/module/ExampleModule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package module;

import skillup.annotations.Module;

/**
* An module example which has to be provided with annotation @Module
*/
@Module(description = "A simple example module that acts as a container but does not provide any more information", moduleIri = "https://hsu-hh.de/modules#ExampleModule")
public class ExampleModule {

}
11 changes: 0 additions & 11 deletions examples/module/src/main/java/moduleA/ModuleA.java

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>
<artifactId>skillup.examples.opc-ua-skill</artifactId>

<artifactId>skillup.examples.opc-ua-add-skill</artifactId>
<packaging>bundle</packaging>
<name>OPC-UA-Skill</name>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -19,7 +21,7 @@
<dependency>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.annotations</artifactId>
<version>${project.version}</version>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
import skillup.annotations.Starting;

/**
* Skill to add two values (every Skill has to be provided with
* annotation @Skill)
* Skill to add two values with an OPC UA skill interface
*/
@Skill(skillIri = "https://hsu-hh.de/skills#OpcUaSkill", capabilityIri = "https://hsu-hh.de/capabilites#bestCapability", moduleIri = "https://hsu-hh.de/modules#ModuleA", type = OpcUaSkillType.class)
public class SimpleSkill {
@Skill(skillIri = "https://hsu-hh.de/skills/examples#OpcUaAdditionSkill", capabilityIri = "https://hsu-hh.de/capabilities/examples#AdditionCapability", moduleIri = "https://hsu-hh.de/modules#ExampleModule", type = OpcUaSkillType.class)
public class OpcUaAdditionSkill {

private final Logger logger = LoggerFactory.getLogger(SimpleSkill.class);
private final Logger logger = LoggerFactory.getLogger(OpcUaAdditionSkill.class);

/**
* first value, which has optional values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>skillup.examples.led-skill</artifactId>
<packaging>bundle</packaging>
<name>LED Skill</name>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -19,7 +21,7 @@
<dependency>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.annotations</artifactId>
<version>${project.version}</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
import skillup.annotations.SkillParameter;

/**
* LED Skill (every Skill has to be provided with annotation @Skill)
* Simple LED Skill with an OPC UA skill interface. Switches on LED on execute and switches it off on abort
*/
@Skill(skillIri = "https://hsu-hh.de/skills#SwitchOnLED", capabilityIri = "https://hsu-hh.de/capabilites#LEDCapability", moduleIri = "https://hsu-hh.de/modules#ModuleA", type = OpcUaSkillType.class)
public class LEDSkill {
@Skill(skillIri = "https://hsu-hh.de/skill/exampless#LedSkill", capabilityIri = "https://hsu-hh.de/capabilities/examples#LedCapability", moduleIri = "https://hsu-hh.de/modules#ExampleModule", type = OpcUaSkillType.class)
public class OpcUaLEDSkill {

private final Logger logger = LoggerFactory.getLogger(LEDSkill.class);
private final Logger logger = LoggerFactory.getLogger(OpcUaLEDSkill.class);

// controller to have access to pins of raspberry pi
private final GpioController gpio = GpioFactory.getInstance();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>skillup.examples.random-generator</artifactId>
<packaging>bundle</packaging>
<name>Random-Generator</name>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -19,7 +21,7 @@
<dependency>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.annotations</artifactId>
<version>${project.version}</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.github.aljoshakoecher</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import statemachine.Isa88StateMachine;

/**
* Skill to generate a random value (every Skill has to be provided with
* annotation @Skill)
* A Skill with an OPC UA skill interface that generates a random value. If this value is less than .25, the skill stops itself. If the random value
* is between .25 and .5, it aborts. Otherwise, it just completes normally
*/
@Skill(skillIri = "https://www.hsu-hh.de/aut/skills#RandomGenerator", capabilityIri = "https://www.hsu-hh.de/aut/skills#RandomGeneration", moduleIri = "https://hsu-hh.de/modules#ModuleA", type = OpcUaSkillType.class)
public class SimpleSkill {
@Skill(skillIri = "https://www.hsu-hh.de/aut/skills/examples#RandomAborter", capabilityIri = "https://www.hsu-hh.de/aut/capabilities/examples#RandomAborter", moduleIri = "https://hsu-hh.de/modules#ExampleModule", type = OpcUaSkillType.class)
public class OpcUaRandomAborter {

/**
* stateMachine to prevent forbidden situations
Expand All @@ -27,8 +27,7 @@ public class SimpleSkill {
private double random;

/**
* When transition start is executed and skill got in state execute a random
* value is generated
* When transition start is executed and skill got in state execute a random value is generated
*/
@Execute
public void execute() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>skillup.examples.opc-ua-skill2</artifactId>
<packaging>bundle</packaging>
<name>OPC-UA-Skill2</name>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -19,7 +21,7 @@
<dependency>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.annotations</artifactId>
<version>${project.version}</version>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package skill2;
package skill;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -12,13 +12,12 @@
import skillup.annotations.Starting;

/**
* Skill to subtract two values (every Skill has to be provided with
* annotation @Skill)
* Simple skill to subtract two values with an OPC UA skill interface
*/
@Skill(skillIri = "https://hsu-hh.de/skills#OpcUaSkill2", capabilityIri = "https://hsu-hh.de/capabilites#CrazyCapability", moduleIri = "https://hsu-hh.de/modules#ModuleA", type = OpcUaSkillType.class)
public class SimpleSkill2 {
@Skill(skillIri = "https://hsu-hh.de/skills/examples#SubtractSkill", capabilityIri = "https://hsu-hh.de/capabilities/examples#SubtractCapability", moduleIri = "https://hsu-hh.de/modules#ExampleModule", type = OpcUaSkillType.class)
public class OpcUaSubtractSkill {

private final Logger logger = LoggerFactory.getLogger(SimpleSkill2.class);
private final Logger logger = LoggerFactory.getLogger(OpcUaSubtractSkill.class);

/**
* first value
Expand Down
18 changes: 10 additions & 8 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.parent</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>examples</artifactId>
<packaging>pom</packaging>

<modules>
<module>module</module>
<module>opc-ua-skill</module>
<module>opc-ua-skill2</module>
<module>rest-simple-skill</module>
<module>rest-simple-concat</module>
<module>rest-simple-multiplier</module>
<module>led-skill</module>
<module>random-generator</module>
<module>opcua-add-skill</module>
<module>opcua-led-skill</module>
<module>opcua-random-generator</module>
<module>opcua-subtract-skill</module>
<module>rest-concat</module>
<module>rest-doubler</module>
<module>rest-multiplier</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<parent>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
<version>${revision}</version>
</parent>

<artifactId>skillup.examples.rest-simple-concat</artifactId>
<packaging>bundle</packaging>
<name>REST-Simple-Concat</name>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -19,7 +21,7 @@
<dependency>
<groupId>io.github.aljoshakoecher.skillup</groupId>
<artifactId>skillup.annotations</artifactId>
<version>${project.version}</version>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
import skillup.annotations.SkillParameter;
import skillup.annotations.Starting;

@Skill(skillIri = "https://www.hsu-hh.de/aut/skills#RestConcat", capabilityIri = "https://www.hsu-hh.de/aut/skills#RandomGeneration", moduleIri = "https://hsu-hh.de/modules#ModuleA", type = RestSkillType.class)
/**
* A skill that concatenates two strings into one. Accessible through a RESTful skill interface
*/
@Skill(skillIri = "https://www.hsu-hh.de/aut/skills/examples#RestConcat", capabilityIri = "https://www.hsu-hh.de/aut/capabilities/examples#StringConcatination", moduleIri = "https://hsu-hh.de/modules#ExampleModule", type = RestSkillType.class)
public class Concat {

private final Logger logger = LoggerFactory.getLogger(Concat.class);
Expand Down
File renamed without changes.
Loading

0 comments on commit 2486bf0

Please sign in to comment.