Skip to content

Commit

Permalink
refactor(plc4j): fixed some Q/A issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed May 4, 2023
1 parent 0feee55 commit ab9026f
Show file tree
Hide file tree
Showing 64 changed files with 128 additions and 127 deletions.
Expand Up @@ -102,7 +102,7 @@ public enum ${type.name} {
</#if>
<#if type.constantNames?has_content>
<#list type.constantNames as constantName>
private ${helper.getLanguageTypeNameForTypeReference(type.getConstantType(constantName), true)} ${constantName};
private final ${helper.getLanguageTypeNameForTypeReference(type.getConstantType(constantName), true)} ${constantName};
</#list>
</#if>

Expand Down
Expand Up @@ -76,8 +76,8 @@ public enum AdsDataType {
}

private final byte value;
private int numBytes;
private PlcValueType plcValueType;
private final int numBytes;
private final PlcValueType plcValueType;

AdsDataType(byte value, int numBytes, PlcValueType plcValueType) {
this.value = value;
Expand Down
Expand Up @@ -1642,8 +1642,8 @@ public enum BACnetVendorId {
}

private final int value;
private int vendorId;
private String vendorName;
private final int vendorId;
private final String vendorName;

BACnetVendorId(int value, int vendorId, String vendorName) {
this.value = value;
Expand Down
Expand Up @@ -52,7 +52,7 @@ public enum MaxApduLengthAccepted {
}

private final byte value;
private int numberOfOctets;
private final int numberOfOctets;

MaxApduLengthAccepted(byte value, int numberOfOctets) {
this.value = value;
Expand Down
Expand Up @@ -44,7 +44,7 @@ public enum MaxSegmentsAccepted {
}

private final byte value;
private short maxSegments;
private final short maxSegments;

MaxSegmentsAccepted(byte value, short maxSegments) {
this.value = value;
Expand Down
Expand Up @@ -44,7 +44,7 @@ public enum AccessControlCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

AccessControlCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -386,9 +386,9 @@ public enum AccessControlCommandTypeContainer {
}

private final short value;
private short numBytes;
private AccessControlCommandType commandType;
private AccessControlCategory category;
private final short numBytes;
private final AccessControlCommandType commandType;
private final AccessControlCategory category;

AccessControlCommandTypeContainer(
short value,
Expand Down
Expand Up @@ -55,7 +55,7 @@ public enum AirConditioningCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

AirConditioningCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -73,8 +73,8 @@ public enum AirConditioningCommandTypeContainer {
}

private final short value;
private short numBytes;
private AirConditioningCommandType commandType;
private final short numBytes;
private final AirConditioningCommandType commandType;

AirConditioningCommandTypeContainer(
short value, short numBytes, AirConditioningCommandType commandType) {
Expand Down
Expand Up @@ -300,8 +300,8 @@ public enum ApplicationIdContainer {
}

private final short value;
private LightingCompatible lightingCompatible;
private ApplicationId applicationId;
private final LightingCompatible lightingCompatible;
private final ApplicationId applicationId;

ApplicationIdContainer(
short value, LightingCompatible lightingCompatible, ApplicationId applicationId) {
Expand Down
Expand Up @@ -54,7 +54,7 @@ public enum Attribute {
}

private final short value;
private short bytesReturned;
private final short bytesReturned;

Attribute(short value, short bytesReturned) {
this.value = value;
Expand Down
Expand Up @@ -153,8 +153,8 @@ public enum CALCommandTypeContainer {
}

private final short value;
private short numBytes;
private CALCommandType commandType;
private final short numBytes;
private final CALCommandType commandType;

CALCommandTypeContainer(short value, short numBytes, CALCommandType commandType) {
this.value = value;
Expand Down
Expand Up @@ -38,7 +38,7 @@ public enum ClockAndTimekeepingCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

ClockAndTimekeepingCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -55,8 +55,8 @@ public enum ClockAndTimekeepingCommandTypeContainer {
}

private final short value;
private short numBytes;
private ClockAndTimekeepingCommandType commandType;
private final short numBytes;
private final ClockAndTimekeepingCommandType commandType;

ClockAndTimekeepingCommandTypeContainer(
short value, short numBytes, ClockAndTimekeepingCommandType commandType) {
Expand Down
Expand Up @@ -37,7 +37,7 @@ public enum EnableControlCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

EnableControlCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -68,8 +68,8 @@ public enum EnableControlCommandTypeContainer {
}

private final short value;
private short numBytes;
private EnableControlCommandType commandType;
private final short numBytes;
private final EnableControlCommandType commandType;

EnableControlCommandTypeContainer(
short value, short numBytes, EnableControlCommandType commandType) {
Expand Down
Expand Up @@ -40,7 +40,7 @@ public enum ErrorReportingCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

ErrorReportingCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -41,8 +41,8 @@ public enum ErrorReportingCommandTypeContainer {
}

private final short value;
private short numBytes;
private ErrorReportingCommandType commandType;
private final short numBytes;
private final ErrorReportingCommandType commandType;

ErrorReportingCommandTypeContainer(
short value, short numBytes, ErrorReportingCommandType commandType) {
Expand Down
Expand Up @@ -52,7 +52,7 @@ public enum LevelInformationNibblePair {
}

private final short value;
private byte nibbleValue;
private final byte nibbleValue;

LevelInformationNibblePair(short value, byte nibbleValue) {
this.value = value;
Expand Down
Expand Up @@ -41,7 +41,7 @@ public enum LightingCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

LightingCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -88,8 +88,8 @@ public enum LightingCommandTypeContainer {
}

private final short value;
private short numBytes;
private LightingCommandType commandType;
private final short numBytes;
private final LightingCommandType commandType;

LightingCommandTypeContainer(short value, short numBytes, LightingCommandType commandType) {
this.value = value;
Expand Down
Expand Up @@ -37,7 +37,7 @@ public enum MeasurementCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

MeasurementCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -38,8 +38,8 @@ public enum MeasurementCommandTypeContainer {
}

private final short value;
private short numBytes;
private MeasurementCommandType commandType;
private final short numBytes;
private final MeasurementCommandType commandType;

MeasurementCommandTypeContainer(short value, short numBytes, MeasurementCommandType commandType) {
this.value = value;
Expand Down
Expand Up @@ -57,7 +57,7 @@ public enum MediaTransportControlCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

MediaTransportControlCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -265,8 +265,8 @@ public enum MediaTransportControlCommandTypeContainer {
}

private final short value;
private short numBytes;
private MediaTransportControlCommandType commandType;
private final short numBytes;
private final MediaTransportControlCommandType commandType;

MediaTransportControlCommandTypeContainer(
short value, short numBytes, MediaTransportControlCommandType commandType) {
Expand Down
Expand Up @@ -37,7 +37,7 @@ public enum MeteringCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

MeteringCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -44,8 +44,8 @@ public enum MeteringCommandTypeContainer {
}

private final short value;
private short numBytes;
private MeteringCommandType commandType;
private final short numBytes;
private final MeteringCommandType commandType;

MeteringCommandTypeContainer(short value, short numBytes, MeteringCommandType commandType) {
this.value = value;
Expand Down
Expand Up @@ -2084,12 +2084,12 @@ public enum Parameter {
}

private final short value;
private ParameterType parameterType;
private String form;
private boolean isVolatile;
private String parameterDescription;
private ProtectionLevel protectionLevel;
private String group;
private final ParameterType parameterType;
private final String form;
private final boolean isVolatile;
private final String parameterDescription;
private final ProtectionLevel protectionLevel;
private final String group;

Parameter(
short value,
Expand Down
Expand Up @@ -40,7 +40,7 @@ public enum ProtectionLevel {
}

private final byte value;
private String description;
private final String description;

ProtectionLevel(byte value, String description) {
this.value = value;
Expand Down
Expand Up @@ -43,7 +43,7 @@ public enum RequestType {
}

private final short value;
private short controlChar;
private final short controlChar;

RequestType(short value, short controlChar) {
this.value = value;
Expand Down
Expand Up @@ -39,7 +39,7 @@ public enum SecurityCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

SecurityCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -156,8 +156,8 @@ public enum SecurityCommandTypeContainer {
}

private final short value;
private short numBytes;
private SecurityCommandType commandType;
private final short numBytes;
private final SecurityCommandType commandType;

SecurityCommandTypeContainer(short value, short numBytes, SecurityCommandType commandType) {
this.value = value;
Expand Down
Expand Up @@ -37,7 +37,7 @@ public enum TelephonyCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

TelephonyCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -69,8 +69,8 @@ public enum TelephonyCommandTypeContainer {
}

private final short value;
private short numBytes;
private TelephonyCommandType commandType;
private final short numBytes;
private final TelephonyCommandType commandType;

TelephonyCommandTypeContainer(short value, short numBytes, TelephonyCommandType commandType) {
this.value = value;
Expand Down
Expand Up @@ -37,7 +37,7 @@ public enum TemperatureBroadcastCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

TemperatureBroadcastCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -69,8 +69,8 @@ public enum TemperatureBroadcastCommandTypeContainer {
}

private final short value;
private short numBytes;
private TemperatureBroadcastCommandType commandType;
private final short numBytes;
private final TemperatureBroadcastCommandType commandType;

TemperatureBroadcastCommandTypeContainer(
short value, short numBytes, TemperatureBroadcastCommandType commandType) {
Expand Down
Expand Up @@ -41,7 +41,7 @@ public enum TriggerControlCommandType {
}

private final byte value;
private short numberOfArguments;
private final short numberOfArguments;

TriggerControlCommandType(byte value, short numberOfArguments) {
this.value = value;
Expand Down
Expand Up @@ -106,8 +106,8 @@ public enum TriggerControlCommandTypeContainer {
}

private final short value;
private short numBytes;
private TriggerControlCommandType commandType;
private final short numBytes;
private final TriggerControlCommandType commandType;

TriggerControlCommandTypeContainer(
short value, short numBytes, TriggerControlCommandType commandType) {
Expand Down
Expand Up @@ -56,8 +56,8 @@ public enum GenericCANDataType {
}

private final long value;
private String plcValueName;
private short numBits;
private final String plcValueName;
private final short numBits;

GenericCANDataType(long value, String plcValueName, short numBits) {
this.value = value;
Expand Down

0 comments on commit ab9026f

Please sign in to comment.