jiangping
2025-02-28 d7aaa1eae5335b38ba1e8e9a465ef9099bc334c5
server/jtt808_parent/jtt808-server/src/test/java/org/yzh/client/ClientTest.java
@@ -1,6 +1,7 @@
package org.yzh.client;
import io.github.yezhihao.netmc.session.Session;
import io.swagger.models.auth.In;
import org.yzh.client.netty.ClientConfig;
import org.yzh.client.netty.HandlerMapping;
import org.yzh.client.netty.TCPClient;
@@ -25,10 +26,11 @@
    public static final JTMessageAdapter messageAdapter = new JTMessageAdapter("org.yzh.protocol");
    // tcp://server.demo.natool.cn:19392
//    dmtest.ahapp.net:7611
    public static final ClientConfig jtConfig = new ClientConfig.Builder()
//            .setIp("server.demo.natool.cn")
//            .setPort(31146)
            .setIp("127.0.0.1")
            .setIp("dmtest.ahapp.net")
            .setPort(7611)
            .setMaxFrameLength(2 + 21 + 1023 * 2 + 1 + 2)
            .setDelimiters(new byte[]{0x7e})
@@ -212,11 +214,11 @@
            alarmBSD.setFileTotal(4);
            alarmBSD.setReserved(4);
            Map<Long, Object> attributes = new TreeMap<>();
            attributes.put(Long.valueOf(AlarmADAS.key), alarmADAS);
            attributes.put(Long.valueOf(AlarmDSM.key), alarmDSM);
            attributes.put(Long.valueOf(AlarmTPMS.key), alarmTPMS);
            attributes.put(Long.valueOf(AlarmBSD.key), alarmBSD);
            Map<Integer, Object> attributes = new TreeMap<>();
            attributes.put(Integer.valueOf(AlarmADAS.key), alarmADAS);
            attributes.put(Integer.valueOf(AlarmDSM.key), alarmDSM);
            attributes.put(Integer.valueOf(AlarmTPMS.key), alarmTPMS);
            attributes.put(Integer.valueOf(AlarmBSD.key), alarmBSD);
            message.setAttributes(attributes);
        }