|
@@ -640,7 +640,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( args );
|
|
this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( args );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void Init(HostManager host)
|
|
|
|
|
|
|
+ public void Init( HostManager host )
|
|
|
{
|
|
{
|
|
|
ThreadStart();
|
|
ThreadStart();
|
|
|
|
|
|
|
@@ -654,7 +654,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
|
|
|
|
|
sql.VehicleInfoDAL.Update( v );
|
|
sql.VehicleInfoDAL.Update( v );
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
public int InitializationVehicle()
|
|
public int InitializationVehicle()
|
|
|
{
|
|
{
|
|
|
#if SIMULATION
|
|
#if SIMULATION
|
|
@@ -890,9 +890,6 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
case eSubCommandType.Move:
|
|
case eSubCommandType.Move:
|
|
|
this.CurrentSubCommand = subCmd;
|
|
this.CurrentSubCommand = subCmd;
|
|
|
this.Move( subCmd );
|
|
this.Move( subCmd );
|
|
|
-
|
|
|
|
|
- //if ( !refObjects.HostManager.IsConnected )
|
|
|
|
|
- // OccurVehicleAlarm( 43 );
|
|
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
case eSubCommandType.Load:
|
|
case eSubCommandType.Load:
|
|
@@ -986,6 +983,8 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
this.taskMoveCancel.Cancel();
|
|
this.taskMoveCancel.Cancel();
|
|
|
this.taskMoveCancel.WaitAll();
|
|
this.taskMoveCancel.WaitAll();
|
|
|
|
|
|
|
|
|
|
+ this.CheckOCSConnectionState();
|
|
|
|
|
+
|
|
|
logger.I( $"[SubCommand Complete] - Target : {sub.TargetID} / Type : {sub.Type}" );
|
|
logger.I( $"[SubCommand Complete] - Target : {sub.TargetID} / Type : {sub.Type}" );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1859,6 +1858,36 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region Help Method
|
|
#region Help Method
|
|
|
|
|
+ Task taskHostConnection = null;
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Move 이후 OCS 연결을 확인 후 Disconnected 상태이면 5분 상태 확인 후 Alarm 발생.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ void CheckOCSConnectionState()
|
|
|
|
|
+ {
|
|
|
|
|
+ if ( this.taskHostConnection != null )
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
|
|
+ if ( refObjects.HostManager.IsConnected )
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
|
|
+ this.taskHostConnection = new Task( () =>
|
|
|
|
|
+ {
|
|
|
|
|
+ long sTime = SwUtils.CurrentTimeMillis;
|
|
|
|
|
+ while ( !refObjects.HostManager.IsConnected )
|
|
|
|
|
+ {
|
|
|
|
|
+ LockUtils.Wait( 100 );
|
|
|
|
|
+
|
|
|
|
|
+ if ( SwUtils.Gt( sTime, 30 * ConstUtils.ONE_SECOND ) )
|
|
|
|
|
+ {
|
|
|
|
|
+ OccurVehicleAlarm( 43 );
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } );
|
|
|
|
|
+
|
|
|
|
|
+ this.taskHostConnection = null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
void BatteryChargeStateLED( double percent )
|
|
void BatteryChargeStateLED( double percent )
|
|
|
{
|
|
{
|
|
|
if ( percent > 60 )
|
|
if ( percent > 60 )
|