Skip to content

Commit

Permalink
Finish Ingress V2 interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dominic-miglar committed May 7, 2022
2 parents 9039d8a + c991034 commit 961046d
Show file tree
Hide file tree
Showing 56 changed files with 1,647 additions and 872 deletions.
9 changes: 6 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.2</version>
<version>2.6.7</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand All @@ -26,7 +26,6 @@
</properties>

<dependencies>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
Expand All @@ -48,6 +47,11 @@
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
Expand Down Expand Up @@ -80,7 +84,6 @@
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>

</dependencies>

<build>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.logreposit.ta.cmireaderservice.configuration;

import com.logreposit.ta.cmireaderservice.dtos.logreposit.tacmi.enums.DeviceType;
import com.logreposit.ta.cmireaderservice.dtos.common.DeviceType;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.logreposit.ta.cmireaderservice.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.retry.annotation.EnableRetry;

@Configuration
@EnableRetry
public class RetryConfiguration {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import com.logreposit.ta.cmireaderservice.dtos.cmi.io.CmiApiInput;
import com.logreposit.ta.cmireaderservice.dtos.cmi.io.CmiApiLoggingAnalog;
import com.logreposit.ta.cmireaderservice.dtos.cmi.io.CmiApiLoggingDigital;
import com.logreposit.ta.cmireaderservice.dtos.cmi.io.CmiApiNetworkAnalog;
import com.logreposit.ta.cmireaderservice.dtos.cmi.io.CmiApiNetworkDigital;
import com.logreposit.ta.cmireaderservice.dtos.cmi.io.CmiApiOutput;
import lombok.Getter;
import lombok.Setter;
Expand All @@ -29,6 +31,12 @@ public class CmiApiResponseData
@JsonProperty(value = "Logging Digital")
private List<CmiApiLoggingDigital> digitalLoggingValues;

@JsonProperty(value = "Network Analog")
private List<CmiApiNetworkAnalog> analogNetworkValues;

@JsonProperty(value = "Network Digital")
private List<CmiApiNetworkDigital> digitalNetworkValues;

@JsonProperty(value = "DL-Bus")
private List<Object> dlBusValues;

Expand All @@ -38,6 +46,8 @@ public CmiApiResponseData()
this.outputs = new ArrayList<>();
this.analogLoggingValues = new ArrayList<>();
this.digitalLoggingValues = new ArrayList<>();
this.analogNetworkValues = new ArrayList<>();
this.digitalNetworkValues = new ArrayList<>();
this.dlBusValues = new ArrayList<>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.logreposit.ta.cmireaderservice.dtos.cmi.io;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class CmiApiNetworkAnalog extends CmiApiIO
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.logreposit.ta.cmireaderservice.dtos.cmi.io;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class CmiApiNetworkDigital extends CmiApiIO
{
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.logreposit.ta.cmireaderservice.dtos.logreposit.tacmi.enums;
package com.logreposit.ta.cmireaderservice.dtos.common;

public enum DeviceType
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.logreposit.ta.cmireaderservice.dtos.common;

import java.util.Arrays;

public enum RasState
{
TIME_AUTO("0"),
STANDARD("1"),
SETBACK("2"),
STANDBY_FROST_PROTECTION("3"),
UNKNOWN("UNKNOWN");

private final String taValue;

RasState(String taValue) {
this.taValue = taValue;
}

public static RasState of(String taValue) {
return Arrays.stream(RasState.values()).filter(s -> s.taValue.equals(taValue)).findFirst().orElse(UNKNOWN);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.logreposit.ta.cmireaderservice.dtos.common;

import java.util.Arrays;

public enum SignalType
{
ANALOG("A"),
DIGITAL("D"),
UNKNOWN("UNKNOWN");

private final String taValue;

SignalType(String taValue) {
this.taValue = taValue;
}

public static SignalType of(String taValue) {
return Arrays.stream(SignalType.values()).filter(s -> s.taValue.equals(taValue)).findFirst().orElse(UNKNOWN);
}
}
Loading

0 comments on commit 961046d

Please sign in to comment.