@@ -7122,124 +7122,124 @@ public String toString() {
7122
7122
return output.toString();
7123
7123
}
7124
7124
}
7125
- public static class CommodityPriceClusterPriceStruct {
7126
- public Long amount ;
7127
- public ChipStructs.CommodityPriceClusterCurrencyStruct currency ;
7128
- private static final long AMOUNT_ID = 0L;
7129
- private static final long CURRENCY_ID = 1L;
7125
+ public static class CommodityPriceClusterCurrencyStruct {
7126
+ public Integer currency ;
7127
+ public Integer decimalPoints ;
7128
+ private static final long CURRENCY_ID = 0L;
7129
+ private static final long DECIMAL_POINTS_ID = 1L;
7130
7130
7131
- public CommodityPriceClusterPriceStruct (
7132
- Long amount ,
7133
- ChipStructs.CommodityPriceClusterCurrencyStruct currency
7131
+ public CommodityPriceClusterCurrencyStruct (
7132
+ Integer currency ,
7133
+ Integer decimalPoints
7134
7134
) {
7135
- this.amount = amount;
7136
7135
this.currency = currency;
7136
+ this.decimalPoints = decimalPoints;
7137
7137
}
7138
7138
7139
7139
public StructType encodeTlv() {
7140
7140
ArrayList<StructElement> values = new ArrayList<>();
7141
- values.add(new StructElement(AMOUNT_ID , new IntType(amount )));
7142
- values.add(new StructElement(CURRENCY_ID, currency.encodeTlv( )));
7141
+ values.add(new StructElement(CURRENCY_ID , new UIntType(currency )));
7142
+ values.add(new StructElement(DECIMAL_POINTS_ID, new UIntType(decimalPoints )));
7143
7143
7144
7144
return new StructType(values);
7145
7145
}
7146
7146
7147
- public static CommodityPriceClusterPriceStruct decodeTlv(BaseTLVType tlvValue) {
7147
+ public static CommodityPriceClusterCurrencyStruct decodeTlv(BaseTLVType tlvValue) {
7148
7148
if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
7149
7149
return null;
7150
7150
}
7151
- Long amount = null;
7152
- ChipStructs.CommodityPriceClusterCurrencyStruct currency = null;
7151
+ Integer currency = null;
7152
+ Integer decimalPoints = null;
7153
7153
for (StructElement element: ((StructType)tlvValue).value()) {
7154
- if (element.contextTagNum() == AMOUNT_ID ) {
7155
- if (element.value(BaseTLVType.class).type() == TLVType.Int ) {
7156
- IntType castingValue = element.value(IntType .class);
7157
- amount = castingValue.value(Long .class);
7154
+ if (element.contextTagNum() == CURRENCY_ID ) {
7155
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt ) {
7156
+ UIntType castingValue = element.value(UIntType .class);
7157
+ currency = castingValue.value(Integer .class);
7158
7158
}
7159
- } else if (element.contextTagNum() == CURRENCY_ID ) {
7160
- if (element.value(BaseTLVType.class).type() == TLVType.Struct ) {
7161
- StructType castingValue = element.value(StructType .class);
7162
- currency = ChipStructs.CommodityPriceClusterCurrencyStruct.decodeTlv(castingValue );
7159
+ } else if (element.contextTagNum() == DECIMAL_POINTS_ID ) {
7160
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt ) {
7161
+ UIntType castingValue = element.value(UIntType .class);
7162
+ decimalPoints = castingValue.value(Integer.class );
7163
7163
}
7164
7164
}
7165
7165
}
7166
- return new CommodityPriceClusterPriceStruct (
7167
- amount ,
7168
- currency
7166
+ return new CommodityPriceClusterCurrencyStruct (
7167
+ currency ,
7168
+ decimalPoints
7169
7169
);
7170
7170
}
7171
7171
7172
7172
@Override
7173
7173
public String toString() {
7174
7174
StringBuilder output = new StringBuilder();
7175
- output.append("CommodityPriceClusterPriceStruct {\n");
7176
- output.append("\tamount: ");
7177
- output.append(amount);
7178
- output.append("\n");
7175
+ output.append("CommodityPriceClusterCurrencyStruct {\n");
7179
7176
output.append("\tcurrency: ");
7180
7177
output.append(currency);
7181
7178
output.append("\n");
7179
+ output.append("\tdecimalPoints: ");
7180
+ output.append(decimalPoints);
7181
+ output.append("\n");
7182
7182
output.append("}\n");
7183
7183
return output.toString();
7184
7184
}
7185
7185
}
7186
- public static class CommodityPriceClusterCurrencyStruct {
7187
- public Integer currency ;
7188
- public Integer decimalPoints ;
7189
- private static final long CURRENCY_ID = 0L;
7190
- private static final long DECIMAL_POINTS_ID = 1L;
7186
+ public static class CommodityPriceClusterPriceStruct {
7187
+ public Long amount ;
7188
+ public ChipStructs.CommodityPriceClusterCurrencyStruct currency ;
7189
+ private static final long AMOUNT_ID = 0L;
7190
+ private static final long CURRENCY_ID = 1L;
7191
7191
7192
- public CommodityPriceClusterCurrencyStruct (
7193
- Integer currency ,
7194
- Integer decimalPoints
7192
+ public CommodityPriceClusterPriceStruct (
7193
+ Long amount ,
7194
+ ChipStructs.CommodityPriceClusterCurrencyStruct currency
7195
7195
) {
7196
+ this.amount = amount;
7196
7197
this.currency = currency;
7197
- this.decimalPoints = decimalPoints;
7198
7198
}
7199
7199
7200
7200
public StructType encodeTlv() {
7201
7201
ArrayList<StructElement> values = new ArrayList<>();
7202
- values.add(new StructElement(CURRENCY_ID , new UIntType(currency )));
7203
- values.add(new StructElement(DECIMAL_POINTS_ID, new UIntType(decimalPoints )));
7202
+ values.add(new StructElement(AMOUNT_ID , new IntType(amount )));
7203
+ values.add(new StructElement(CURRENCY_ID, currency.encodeTlv( )));
7204
7204
7205
7205
return new StructType(values);
7206
7206
}
7207
7207
7208
- public static CommodityPriceClusterCurrencyStruct decodeTlv(BaseTLVType tlvValue) {
7208
+ public static CommodityPriceClusterPriceStruct decodeTlv(BaseTLVType tlvValue) {
7209
7209
if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
7210
7210
return null;
7211
7211
}
7212
- Integer currency = null;
7213
- Integer decimalPoints = null;
7212
+ Long amount = null;
7213
+ ChipStructs.CommodityPriceClusterCurrencyStruct currency = null;
7214
7214
for (StructElement element: ((StructType)tlvValue).value()) {
7215
- if (element.contextTagNum() == CURRENCY_ID ) {
7216
- if (element.value(BaseTLVType.class).type() == TLVType.UInt ) {
7217
- UIntType castingValue = element.value(UIntType .class);
7218
- currency = castingValue.value(Integer .class);
7215
+ if (element.contextTagNum() == AMOUNT_ID ) {
7216
+ if (element.value(BaseTLVType.class).type() == TLVType.Int ) {
7217
+ IntType castingValue = element.value(IntType .class);
7218
+ amount = castingValue.value(Long .class);
7219
7219
}
7220
- } else if (element.contextTagNum() == DECIMAL_POINTS_ID ) {
7221
- if (element.value(BaseTLVType.class).type() == TLVType.UInt ) {
7222
- UIntType castingValue = element.value(UIntType .class);
7223
- decimalPoints = castingValue.value(Integer.class );
7220
+ } else if (element.contextTagNum() == CURRENCY_ID ) {
7221
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct ) {
7222
+ StructType castingValue = element.value(StructType .class);
7223
+ currency = ChipStructs.CommodityPriceClusterCurrencyStruct.decodeTlv(castingValue );
7224
7224
}
7225
7225
}
7226
7226
}
7227
- return new CommodityPriceClusterCurrencyStruct (
7228
- currency ,
7229
- decimalPoints
7227
+ return new CommodityPriceClusterPriceStruct (
7228
+ amount ,
7229
+ currency
7230
7230
);
7231
7231
}
7232
7232
7233
7233
@Override
7234
7234
public String toString() {
7235
7235
StringBuilder output = new StringBuilder();
7236
- output.append("CommodityPriceClusterCurrencyStruct {\n");
7236
+ output.append("CommodityPriceClusterPriceStruct {\n");
7237
+ output.append("\tamount: ");
7238
+ output.append(amount);
7239
+ output.append("\n");
7237
7240
output.append("\tcurrency: ");
7238
7241
output.append(currency);
7239
7242
output.append("\n");
7240
- output.append("\tdecimalPoints: ");
7241
- output.append(decimalPoints);
7242
- output.append("\n");
7243
7243
output.append("}\n");
7244
7244
return output.toString();
7245
7245
}
0 commit comments