package com.its.pis.xnettcp.vds.process;

import com.its.pis.entity.TbVdsCtlr;
import com.its.pis.xnettcp.vds.protocol.VdsResFramePacket;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RequiredArgsConstructor
public class Job_NAK implements JobProtocol {

	private final VdsResFramePacket packet;

	@Override
	public int parse() {
		if (this.packet == null || this.packet.getVdsObj() == null) {
			log.error("Job_NAK, packet or object data null");
			return 0;
		}

		TbVdsCtlr obj = this.packet.getVdsObj();
		log.error("[{}]. Job_NAK: Received.", obj.getVDS_CTLR_ID());
		return 1;
	}

}
