seqint seqhex
This commit is contained in:
parent
449a351629
commit
844c5ecafe
@ -90,7 +90,7 @@ public class ChargingPileBinaryHandler implements ClientBinaryHandler {
|
|||||||
String version = ChargingPileServer.getVersion(handler.getName());
|
String version = ChargingPileServer.getVersion(handler.getName());
|
||||||
Map<String, Object> req = analysis(data, serviceName, version);
|
Map<String, Object> req = analysis(data, serviceName, version);
|
||||||
int seq = HexUtils.toInteger(data, 2, 4);
|
int seq = HexUtils.toInteger(data, 2, 4);
|
||||||
req.put("seq", seq);
|
req.put("seqint", seq);
|
||||||
String pileNo = (String) req.get("pileNo");
|
String pileNo = (String) req.get("pileNo");
|
||||||
ServiceParameter sp = new ServiceParameter(serviceName, pileNo, req);
|
ServiceParameter sp = new ServiceParameter(serviceName, pileNo, req);
|
||||||
ServiceResult result = servicemainLogic.process(sp);
|
ServiceResult result = servicemainLogic.process(sp);
|
||||||
|
|||||||
@ -180,13 +180,17 @@ public class HexUtils {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
System.out.println(Integer.parseInt("FF00", 16));
|
// System.out.println(Integer.parseInt("FF00", 16));
|
||||||
System.out.println(reverseHexInt("FF00"));
|
// System.out.println(reverseHexInt("FF00"));
|
||||||
byte[] data1 = toBytes(reverseHex("FC080000"));
|
// byte[] data1 = toBytes(reverseHex("FC080000"));
|
||||||
System.out.println(toInteger(data1, 0, 4));
|
// System.out.println(toInteger(data1, 0, 4));
|
||||||
System.out.println(reverseHexInt("FC080000"));
|
// System.out.println(reverseHexInt("FC080000"));
|
||||||
// System.out.println(toHexInt(100000));
|
// System.out.println(toHexInt(100000));
|
||||||
System.out.println(toBits("1000"));
|
// System.out.println(toBits("1000"));
|
||||||
|
System.out.println(toHex(new byte[]{104, 48, 0, 119, 0, 37, 105, -123, 33, 69, -119, 101, 72, 2, 33, 9, 21, 22, 2, 40
|
||||||
|
, 1, 121, 105, -123, 33, 69, -119, 101, 72, 2, 17, 34, 51, 68, 85, 0, -48, 61, 46}));
|
||||||
|
System.out.println(toHex(new byte[]{104, 48, 0, -19, 0, 37, 105, -123, 33, 69, -119, 101, 72, 2, 33, 9, 21, 22, 2, 40
|
||||||
|
, 1, 121, 105, -123, 33, 69, -119, 101, 72, 2, 17, 34, 51, 68, 85, 0, -48, 14, 12}));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user