2026-06-24 f4bd1f3c89d906131495a0aca5aaf82966378510
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cn.iocoder.yudao.module.iot.gateway.protocol.coap.handler.downstream;
 
import cn.iocoder.yudao.module.iot.core.messagebus.core.IotMessageBus;
import cn.iocoder.yudao.module.iot.core.mq.message.IotDeviceMessage;
import cn.iocoder.yudao.module.iot.gateway.protocol.AbstractIotProtocolDownstreamSubscriber;
import cn.iocoder.yudao.module.iot.gateway.protocol.coap.IotCoapProtocol;
import lombok.extern.slf4j.Slf4j;
 
/**
 * IoT 网关 CoAP 订阅者:接收下行给设备的消息
 *
 * @author 芋道源码
 */
@Slf4j
public class IotCoapDownstreamSubscriber extends AbstractIotProtocolDownstreamSubscriber {
 
    public IotCoapDownstreamSubscriber(IotCoapProtocol protocol, IotMessageBus messageBus) {
        super(protocol, messageBus);
    }
 
    @Override
    protected void handleMessage(IotDeviceMessage message) {
        // 如需支持,可通过 CoAP Observe 模式实现(设备订阅资源,服务器推送变更)
        log.warn("[handleMessage][IoT 网关 CoAP 协议暂不支持下行消息,忽略消息:{}]", message);
    }
 
}