package com.tsi.comm.server.service;

import com.tsi.comm.server.protocol.TsiCpuPacket;
import com.tsi.comm.server.repository.TsiAlarmManager;
import com.tsi.comm.server.repository.TsiNodeAddManager;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@RequiredArgsConstructor
@Component
public class TsiCommPacketInitializer {

    private final TsiNodeAddManager nodeAddManager;
    private final TsiAlarmManager alarmAddManager;

    @PostConstruct
    public void init() {
        TsiCpuPacket.setNodeAddManager(this.nodeAddManager, this.alarmAddManager);
    }

}
