コード例 #1
0
ファイル: MachineCommunication.cs プロジェクト: MGajd/DP
        internal Response ProcessRequest(Request request)
        {
            CoverLine actualCoverLine = WorldToCover.World.GetCoverLineByID(ActualCoverLineID);

            Response response = null; //new Response();

            switch (request.RequestType)
            {
                case Communication.Enum.RequestType.CoverLineFinishStatus:
                    response = AssumedCoverLineFinishResponse(actualCoverLine);
                    break;
                case Communication.Enum.RequestType.StatusRequest:
                 //   break;
                case Communication.Enum.RequestType.ReplaceRequest:
                 //   break;
                case Communication.Enum.RequestType.MeetingRequest:
                 //   break;
                case Communication.Enum.RequestType.CommonRideRequest:
                 //   break;
                case Communication.Enum.RequestType.StopRequest:
                 //   break;
                default:
                    response = new Response();
                    break;
            }

            response.CommunicationRequestID = request.CommunicationRequestID;
            response.ReceiverMachineID = request.SenderMachineID;
            response.SenderMachineID = MachineID;

            return response;
        }
コード例 #2
0
ファイル: MachineCommunication.cs プロジェクト: MGajd/DP
        private Response AssumedCoverLineFinishResponse(CoverLine actualCoverLine)
        {
            Response response = new Response();

            response.CoverLineFinish = new CoverLineFinishObject();
            response.CoverLineFinish.SetMachineActualCoverDirection(actualCoverLine);
            response.CoverLineFinish.CoverLineFinishTime = EndsAt;

            return response;
        }