/// <summary>
/// Host로부터 S1F1을 수신하였을때(S1F1수신 후 S1F2 송신)
/// HOST에서 장비가 살아있는지 확인용임.
/// </summary>
/// <remarks>2006/11/01 [Ver 00]</remarks>
private void PSecsDrv_AreYouThere()
{
try
{
this.m_Info.Set_ReceiveHostSF("S1F1");
}
catch (Exception ex)
{
this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", ex.ToString());
}
}
private void S1F1()
{
string sControlState = string.Empty;
try
{
s_ReplyTrue(); //Reply가 들어왔음을 저장
if (this.m_Info.All.HostConnect == false) return;
if (funACTSECSAort_Send(this.PSecsDrv.AreYouThere.Header) == true) return;
this.PSecsDrv.S1F2OnLineData.MDLN = this.m_Info.All.MDLN;
switch (this.m_Info.All.ControlState)
{
case Structure.classStructure.ControlState.ONLINELOCAL:
sControlState = "LOCAL";
break;
case Structure.classStructure.ControlState.ONLINEREMOTE:
sControlState = "REMOTE";
break;
default:
sControlState = "OFF";
break;
}
//HOST로 S1F2 송신
this.PSecsDrv.S1F2OnLineData.ONLINEMODE = sControlState;
this.PSecsDrv.S1F2OnLineData.Reply(this.PSecsDrv.AreYouThere.Header);
}
catch (Exception ex)
{
this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", ex.ToString());
}
}
/// <summary>
/// Host로부터 On line 확인 Stream Function을 수신시
/// On line Data를 송신 한다.(S1F1송신 후 S1F2 수신)
/// </summary>
/// <remarks>2006/11/01 [Ver 00]</remarks>
private void PSecsDrv_S1F2IAmHere()
{
try
{
this.m_Info.Set_ReceiveHostSF("S1F2");
}
catch (Exception ex)
{
this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", ex.ToString());
}
}
private void S1F2()
{
try
{
s_ReplyTrue(); //Reply가 들어왔음을 저장
if (this.m_Info.All.HostConnect == false) return;
this.m_Info.All.ONLINEModeChange = false;
this.m_Info.All.ControlStateOLD = this.m_Info.All.ControlState; //현재의 ControlState를 백업
this.m_Info.All.ControlState = this.m_Info.All.WantControlState;
this.m_Info.Set_OPCallMessage(Structure.classStructure.OPCallMessage.ModeChangeFormClose, 0, "", ""); //Mode Change Form을 닫는다
if (this.m_Info.All.ControlState == Structure.classStructure.ControlState.ONLINELOCAL)
{
//HOST로 Online 변경 보고를 한다.(S6F11, CEID=72(Remote) 보고)
this.m_Info.Set_SendSF(Structure.classStructure.SFName.S6F11EQPEventRequest, 72, 0, 0); //뒤에 0은 전체장비를 의미
this.m_Info.Set_SendSF(Structure.classStructure.SFName.S2F17DateTimeRequest);
}
else if (this.m_Info.All.ControlState == Structure.classStructure.ControlState.ONLINEREMOTE)
{
//HOST로 Online 변경 보고를 한다.(S6F11, CEID=73(Remote) 보고)
this.m_Info.Set_SendSF(Structure.classStructure.SFName.S6F11EQPEventRequest, 73, 0, 0); //뒤에 0은 전체장비를 의미
this.m_Info.Set_SendSF(Structure.classStructure.SFName.S2F17DateTimeRequest);
}
this.m_Info.Set_PLCCommand(Structure.classStructure.PLCCommand.ControlState, (int)this.m_Info.All.ControlState); //PLC로 현재 ControlState 를 써준다.
this.m_Info.All.WantControlState = Structure.classStructure.ControlState.UNKNOWN; //S6F11 보고 후 초기화
}
catch (Exception ex)
{
this.m_Info.Set_Log(Common.EnuCommon.LogType.CIM, "", ex.ToString());
}
}