class DeviceStatusQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {

    private Logger logger = LoggerFactory.getLogger(DeviceStatusQueryMessageHandler.class);
    private final String cmdType = "DeviceStatus";

    @Autowired
    private QueryMessageHandler queryMessageHandler;

    @Autowired
    private IVideoManagerStorage storager;

    @Autowired
    private SIPCommanderFroPlatform cmderFroPlatform;

    @Autowired
    private SipConfig config;

    @Autowired
    private EventPublisher publisher;

    @Override
    public void afterPropertiesSet() throws Exception {
        queryMessageHandler.addHandler(cmdType, this);
    }

    @Override
    public void handForDevice(RequestEvent evt, Device device, Element element) {

    }

    @Override
    public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {<FILL_FUNCTION_BODY>}
}


        logger.info("接收到DeviceStatus查询消息");
        FromHeader fromHeader = (FromHeader) evt.getRequest().getHeader(FromHeader.NAME);
        // 回复200 OK
        try {
            responseAck((SIPRequest) evt.getRequest(), Response.OK);
        } catch (SipException | InvalidArgumentException | ParseException e) {
            logger.error("[命令发送失败] 国标级联 DeviceStatus查询回复200OK: {}", e.getMessage());
        }
        String sn = rootElement.element("SN").getText();
        String channelId = getText(rootElement, "DeviceID");
        DeviceChannel deviceChannel = storager.queryChannelInParentPlatform(parentPlatform.getServerGBId(), channelId);
        if (deviceChannel ==null){
            logger.error("[平台没有该通道的使用权限]:platformId"+parentPlatform.getServerGBId()+"  deviceID:"+channelId);
            return;
        }
        try {
            cmderFroPlatform.deviceStatusResponse(parentPlatform,channelId, sn, fromHeader.getTag(),deviceChannel.isStatus());
        } catch (SipException | InvalidArgumentException | ParseException e) {
            logger.error("[命令发送失败] 国标级联 DeviceStatus查询回复: {}", e.getMessage());
        }
    
<methods>public non-sealed void <init>() ,public HeaderFactory getHeaderFactory() ,public MessageFactory getMessageFactory() ,public Element getRootElement(RequestEvent) throws DocumentException,public Element getRootElement(RequestEvent, java.lang.String) throws DocumentException,public SIPResponse responseAck(SIPRequest, int) throws SipException, InvalidArgumentException, java.text.ParseException,public SIPResponse responseAck(SIPRequest, int, java.lang.String) throws SipException, InvalidArgumentException, java.text.ParseException,public SIPResponse responseAck(SIPRequest, int, java.lang.String, com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent.ResponseAckExtraParam) throws SipException, InvalidArgumentException, java.text.ParseException,public SIPResponse responseSdpAck(SIPRequest, java.lang.String, com.genersoft.iot.vmp.gb28181.bean.ParentPlatform) throws SipException, InvalidArgumentException, java.text.ParseException,public SIPResponse responseXmlAck(SIPRequest, java.lang.String, com.genersoft.iot.vmp.gb28181.bean.ParentPlatform, java.lang.Integer) throws SipException, InvalidArgumentException, java.text.ParseException<variables>private static final Logger logger,private com.genersoft.iot.vmp.gb28181.transmit.SIPSender sipSender