Skip to content

Commit

Permalink
Merge pull request usdot-jpo-ode#2 from usdot-jpo-ode/dev
Browse files Browse the repository at this point in the history
Dev Merge
  • Loading branch information
payneBrandon committed Jul 31, 2019
2 parents 6c520d8 + 0b906ec commit e177c7b
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 40 deletions.
7 changes: 3 additions & 4 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
## ODE Release Notes ##
-----------------------
### Release 1.0.9 (TBD)
- Integrated odevalidator v0.0.5
### Release 1.0.8 (May 24, 2019)
- Integrated odevalidator v0.0.6
- Updated test-harness (see [release notes](./qa/test-harness/README.md#release-history))
### Release 1.0.8 (May 17, 2019)
- Integrated odevalidator v0.0.4
- Changed SNMP deposit timestamp format from MM/DD/YYYY to YYYY/MM/DD
### Release 1.0.7 (Apr 15, 2019)
- Integrated odevalidator v0.0.3
### Release 1.0.6 (Apr 8, 2019)
Expand Down
2 changes: 1 addition & 1 deletion jpo-ode-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</parent>

<artifactId>jpo-ode-common</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions jpo-ode-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</parent>

<artifactId>jpo-ode-core</artifactId>
Expand All @@ -23,12 +23,12 @@
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode-common</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode-plugins</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ public void testGettersAndSetters() {
@Test
public void testSnmpTimestampFromIso() throws ParseException {
String snmpTS = SNMP.snmpTimestampFromIso("2017-05-04T21:55:00-05:00");
assertEquals("050414111537", snmpTS);
assertEquals("07E105041537", snmpTS);
}
}
4 changes: 2 additions & 2 deletions jpo-ode-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</parent>
<properties>
<!-- SonarQube Properties -->
Expand All @@ -27,7 +27,7 @@
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode-common</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</dependency>
<!-- TODO open-ode
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.time.ZonedDateTime;

import us.dot.its.jpo.ode.model.OdeObject;
import us.dot.its.jpo.ode.util.CodecUtils;
import us.dot.its.jpo.ode.util.DateTimeUtils;

public class SNMP extends OdeObject {
Expand Down Expand Up @@ -127,14 +126,15 @@ public void setStatus(int status) {

public static String snmpTimestampFromIso(String isoTimestamp) throws ParseException {
ZonedDateTime zdt = DateTimeUtils.isoDateTime(isoTimestamp);
byte[] bdt = new byte[6];
bdt[0] = (byte) zdt.getMonthValue();
bdt[1] = (byte) zdt.getDayOfMonth();
bdt[2] = (byte) (zdt.getYear() / 100);
bdt[3] = (byte) (zdt.getYear() % 100);
bdt[4] = (byte) zdt.getHour();
bdt[5] = (byte) zdt.getMinute();
return CodecUtils.toHex(bdt);

StringBuilder sb = new StringBuilder();

sb.append(String.format("%04X", zdt.getYear()));
sb.append(String.format("%02X", zdt.getMonthValue()));
sb.append(String.format("%02X", zdt.getDayOfMonth()));
sb.append(String.format("%02X", zdt.getHour()));
sb.append(String.format("%02X", zdt.getMinute()));
return sb.toString();
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions jpo-ode-svcs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</parent>
<artifactId>jpo-ode-svcs</artifactId>
<packaging>jar</packaging>
Expand Down Expand Up @@ -84,12 +84,12 @@
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode-core</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode-plugins</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public TimDepositController(OdeProperties odeProperties) {
* @param verb
* @return
*/
public ResponseEntity<String> depositTim(String jsonString, RequestVerb verb) {
public synchronized ResponseEntity<String> depositTim(String jsonString, RequestVerb verb) {

if (null == jsonString || jsonString.isEmpty()) {
String errMsg = "Empty request.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public void testResponseEventSNMPException(@Mocked Snmp mockSnmp,
@Test
public void shouldCreatePDU() throws ParseException {

String expectedResult = "[1.0.15628.4.1.4.1.2.3 = 11, 1.0.15628.4.1.4.1.3.3 = 2, 1.0.15628.4.1.4.1.4.3 = 3, 1.0.15628.4.1.4.1.5.3 = 4, 1.0.15628.4.1.4.1.6.3 = 5, 1.0.15628.4.1.4.1.7.3 = 0c:02:14:11:11:2f, 1.0.15628.4.1.4.1.8.3 = 0c:02:14:11:11:2f, 1.0.15628.4.1.4.1.9.3 = 88, 1.0.15628.4.1.4.1.10.3 = 9, 1.0.15628.4.1.4.1.11.3 = 10]";
String expectedResult2 = "[1.0.15628.4.1.4.1.2.3 = 11, 1.0.15628.4.1.4.1.3.3 = 2, 1.0.15628.4.1.4.1.4.3 = 3, 1.0.15628.4.1.4.1.5.3 = 4, 1.0.15628.4.1.4.1.6.3 = 5, 1.0.15628.4.1.4.1.7.3 = 0c:02:14:11:11:2f, 1.0.15628.4.1.4.1.8.3 = 0c:02:14:11:11:2f, 1.0.15628.4.1.4.1.9.3 = 88, 1.0.15628.4.1.4.1.10.3 = 9]";
String expectedResult = "[1.0.15628.4.1.4.1.2.3 = 11, 1.0.15628.4.1.4.1.3.3 = 2, 1.0.15628.4.1.4.1.4.3 = 3, 1.0.15628.4.1.4.1.5.3 = 4, 1.0.15628.4.1.4.1.6.3 = 5, 1.0.15628.4.1.4.1.7.3 = 07:e1:0c:02:11:2f, 1.0.15628.4.1.4.1.8.3 = 07:e1:0c:02:11:2f, 1.0.15628.4.1.4.1.9.3 = 88, 1.0.15628.4.1.4.1.10.3 = 9, 1.0.15628.4.1.4.1.11.3 = 10]";
String expectedResult2 = "[1.0.15628.4.1.4.1.2.3 = 11, 1.0.15628.4.1.4.1.3.3 = 2, 1.0.15628.4.1.4.1.4.3 = 3, 1.0.15628.4.1.4.1.5.3 = 4, 1.0.15628.4.1.4.1.6.3 = 5, 1.0.15628.4.1.4.1.7.3 = 07:e1:0c:02:11:2f, 1.0.15628.4.1.4.1.8.3 = 07:e1:0c:02:11:2f, 1.0.15628.4.1.4.1.9.3 = 88, 1.0.15628.4.1.4.1.10.3 = 9]";


String rsuSRMPsid = "11";
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<groupId>usdot.jpo.ode</groupId>
<artifactId>jpo-ode</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>jpo-ode-common</module>
Expand Down
24 changes: 12 additions & 12 deletions release.properties
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
#release configuration
#Tue Apr 09 15:07:25 EDT 2019
#Fri May 24 13:00:38 EDT 2019
project.scm.usdot.jpo.ode\:jpo-ode-svcs.empty=true
scm.commentPrefix=[maven-release-plugin]
project.rel.usdot.jpo.ode\:jpo-ode-core=1.0.7
project.rel.usdot.jpo.ode\:jpo-ode-core=0.0.8
pushChanges=true
project.scm.usdot.jpo.ode\:jpo-ode.developerConnection=scm\:git\:https\:https://github.com/usdot-jpo-ode/jpo-ode.git
project.dev.usdot.jpo.ode\:jpo-ode=1.0.8-SNAPSHOT
project.rel.usdot.jpo.ode\:jpo-ode-common=1.0.7
scm.tag=jpo-ode-1.0.7
project.dev.usdot.jpo.ode\:jpo-ode=0.0.9-SNAPSHOT
project.rel.usdot.jpo.ode\:jpo-ode-common=0.0.8
scm.tag=jpo-ode-0.0.8
remoteTagging=true
project.scm.usdot.jpo.ode\:jpo-ode-plugins.empty=true
projectVersionPolicyId=default
project.scm.usdot.jpo.ode\:jpo-ode-core.empty=true
scm.url=scm\:git\:https\:https://github.com/usdot-jpo-ode/jpo-ode.git
scm.tagNameFormat=@{project.artifactId}-@{project.version}
project.dev.usdot.jpo.ode\:jpo-ode-svcs=1.0.8-SNAPSHOT
project.dev.usdot.jpo.ode\:jpo-ode-svcs=0.0.9-SNAPSHOT
preparationGoals=clean verify
project.scm.usdot.jpo.ode\:jpo-ode.tag=HEAD
project.dev.usdot.jpo.ode\:jpo-ode-plugins=1.0.8-SNAPSHOT
project.dev.usdot.jpo.ode\:jpo-ode-core=1.0.8-SNAPSHOT
project.dev.usdot.jpo.ode\:jpo-ode-plugins=0.0.9-SNAPSHOT
project.dev.usdot.jpo.ode\:jpo-ode-core=0.0.9-SNAPSHOT
exec.snapshotReleasePluginAllowed=false
project.scm.usdot.jpo.ode\:jpo-ode-common.empty=true
project.dev.usdot.jpo.ode\:jpo-ode-common=1.0.8-SNAPSHOT
project.rel.usdot.jpo.ode\:jpo-ode=1.0.7
project.rel.usdot.jpo.ode\:jpo-ode-svcs=1.0.7
project.dev.usdot.jpo.ode\:jpo-ode-common=0.0.9-SNAPSHOT
project.rel.usdot.jpo.ode\:jpo-ode=0.0.8
project.rel.usdot.jpo.ode\:jpo-ode-svcs=0.0.8
completedPhase=end-release
project.rel.usdot.jpo.ode\:jpo-ode-plugins=1.0.7
project.rel.usdot.jpo.ode\:jpo-ode-plugins=0.0.8

0 comments on commit e177c7b

Please sign in to comment.