package com.its.vms.xnettcp.vms.process.response;

import com.its.app.utils.NettyUtils;
import com.its.vms.config.CommunicationConfig;
import com.its.vms.entity.TbVmsCtlr;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class InitiateResponse implements VmsResponse {
    private TbVmsCtlr obj;
    private ChannelHandlerContext ctx;

    @Override
    public boolean response(CommunicationConfig communicationConfig) {
        // 처리내용 없음
        String ipAddress = NettyUtils.getRemoteIpAddress(this.ctx.channel());
        log.info("InitiateResponse.response: {}", ipAddress);

//        PDUs pdus = this.c2c.getPdu();
//        Initiate initiate = pdus.getDatexInitiateNull();
//        if (initiate != null) {
//            /**
//             * Login 요청에 대한 응답을 처리함
//             */
//            return LoginDeviceService.getInstance().requestLogin(obj, this.ctx.channel(), runningConfig);
//        }

        return true;
    }

}
