package kr.co.icontrols.ilp300_700.imap;

import android.util.Log;

import kr.co.icontrols.ilp300_700.ethernet.SendMSG;
import kr.co.icontrols.ilp300_700.global.Configure.ConfigValue;

public class Notices {
    static final String TAG = "Notices";

    public static boolean send_Heartbeat() {
        try {
            SendMSG sendMessage = new SendMSG(MakeiMAPMSG.makeNotice_Heartbeat(), ConfigValue.strMainServerIPAddress, ConfigValue.nMainServerPortNum);
            sendMessage.start();
            return true;
        } catch (Exception e) {
            Log.e(TAG, "[Exception] send_Heartbeat()");
            return false;
        }
    }

    public static boolean send_FTPUploadResult(String strUploadResult, String strFilePath, String strUploadPath, String strMessage, String strTargetIP) {
        try {
            SendMSG sendMessage = new SendMSG(MakeiMAPMSG.makeNotice_FTPUploadResult(strUploadResult, strFilePath, strUploadPath, strMessage), strTargetIP, ConfigValue.nMainServerPortNum);
            sendMessage.start();
            return true;
        } catch (Exception e) {
            Log.e(TAG, "[Exception] send_FTPUploadResult(String strUploadResult, String strFilePath, String strUploadPath, String strMessage, String strTargetIP)");
            return false;
        }
    }

}