|
|
@@ -306,9 +306,17 @@ namespace VehicleControlSystem.ControlLayer.MQ
|
|
|
case "4012":
|
|
|
|
|
|
if ( v[1].Equals( "3" ) )
|
|
|
+
|
|
|
+ {
|
|
|
IsDriveMoving = true;
|
|
|
+ this.SetRequest( "setm" , "0" );
|
|
|
+ }
|
|
|
else
|
|
|
+ {
|
|
|
IsDriveMoving = false;
|
|
|
+ this.SetRequest( "setm" , "1" );
|
|
|
+
|
|
|
+ }
|
|
|
break;
|
|
|
|
|
|
case "3009":
|
|
|
@@ -327,7 +335,7 @@ namespace VehicleControlSystem.ControlLayer.MQ
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( ret[0].Equals( "getm" ) )
|
|
|
+ else if ( ret[0].Equals( "getm" ) )
|
|
|
{
|
|
|
var v = ret[1].Split( '/' );
|
|
|
switch ( v[0] )
|
|
|
@@ -355,6 +363,8 @@ namespace VehicleControlSystem.ControlLayer.MQ
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ else
|
|
|
+ rep.SendMoreFrame( ret[0] ).SendFrame( $"ok/{ret[1]}" );
|
|
|
|
|
|
}
|
|
|
catch ( Exception exception )
|
|
|
@@ -499,13 +509,6 @@ namespace VehicleControlSystem.ControlLayer.MQ
|
|
|
//if ( this.req.HasOut )
|
|
|
this.req.SendMoreFrame( "setm" ).SendFrame( index + "/" + value );
|
|
|
|
|
|
- var LL = new Msg();
|
|
|
- this.req.TrySendFrameEmpty( TimeSpan.FromMilliseconds(1000) , true ).;
|
|
|
- if(this.req.TrySend(ref new Msg(), TimeSpan.FromMilliseconds(1000), true))
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
if ( !this.req.TryReceiveMultipartStrings( TimeSpan.FromSeconds( 5 ), ref repll ) )
|
|
|
return false;
|
|
|
}
|