21 lines
530 B
Java
21 lines
530 B
Java
package com.iot.modbus_rtcp;
|
|
|
|
import com.iot.modbus_rtcp.utils.HexUtil;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
/**
|
|
* @author <a href="mailto:shilong.wang@alpha-ess.com">王仕龙</a>
|
|
* 2024/11/28 18:52
|
|
*/
|
|
public class GatewayTest {
|
|
|
|
@Test
|
|
public void testConverterHeartbeat() {
|
|
String s1 = "4B454E454E4731343030303030333538";
|
|
String s2 = "KENENG1400000358";
|
|
System.out.println(new String(HexUtil.hexStringToBytes(s1)));
|
|
System.out.println(HexUtil.bytesToHexString(s2.getBytes()));
|
|
}
|
|
|
|
}
|