-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: stefanermens <[email protected]>
- Loading branch information
1 parent
1c9d731
commit fa52e98
Showing
10 changed files
with
170 additions
and
98 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...-adapter-dlms/osgp-dlms/src/main/java/org/opensmartgridplatform/dlms/enums/DayOfWeek.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-FileCopyrightText: Copyright Contributors to the GXF project | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.opensmartgridplatform.dlms.enums; | ||
|
||
import lombok.Getter; | ||
|
||
public enum DayOfWeek { | ||
MONDAY(1, "Monday"), | ||
TUESDAY(2, "Tuesday"), | ||
WEDNESDAY(3, "Wednesday"), | ||
THURSDAY(4, "Thursday"), | ||
FRIDAY(5, "Friday"), | ||
SATURDAY(6, "Saturday"), | ||
SUNDAY(7, "Sunday"), | ||
NOT_SPECIFIED(255, "Day of week not specified"); | ||
|
||
private final int value; | ||
|
||
@Getter private final String description; | ||
|
||
DayOfWeek(final int value, final String description) { | ||
this.value = value; | ||
this.description = description; | ||
} | ||
|
||
public static DayOfWeek getByValue(final int value) { | ||
for (final DayOfWeek method : DayOfWeek.values()) { | ||
if (method.value == value) { | ||
return method; | ||
} | ||
} | ||
|
||
return null; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...adapter-dlms/osgp-dlms/src/main/java/org/opensmartgridplatform/dlms/enums/SortMethod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-FileCopyrightText: Copyright Contributors to the GXF project | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.opensmartgridplatform.dlms.enums; | ||
|
||
public enum SortMethod { | ||
FIFO(1), | ||
LIFO(2), | ||
LARGEST(3), | ||
SMALLEST(4), | ||
NEAREST_TO_ZERO(5), | ||
FURTHEST_FROM_ZERO(6), | ||
UNKNOWN_SORT_METHOD(255); | ||
|
||
private final int value; | ||
|
||
SortMethod(final int value) { | ||
this.value = value; | ||
} | ||
|
||
public static SortMethod getByValue(final int value) { | ||
for (final SortMethod method : SortMethod.values()) { | ||
if (method.value == value) { | ||
return method; | ||
} | ||
} | ||
|
||
return UNKNOWN_SORT_METHOD; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...g/opensmartgridplatform/adapter/protocol/dlms/domain/datadecoder/AttributeAccessItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.