Example #1
0
        /// <summary>
        /// Sends and receives an Msex packet.
        /// Performs some basic asserts on the header.
        /// </summary>
        /// <param name="citpMessage">The citp message.</param>
        /// <returns>The read packet.</returns>
        public static CitpPacket SendAndReceiveCaExPacket(CaExHeader citpMessage)
        {
            CaExHeader received = SendAndReceivePacket(citpMessage) as CaExHeader;

            Assert.AreEqual(received.ContentCode, citpMessage.ContentCode);
            Assert.AreEqual(received.ContentType, citpMessage.ContentType);
            return(received);
        }
Example #2
0
        private static CitpPacket BuildCaEx(CitpReceiveData data)
        {
            CaExHeader header = new CaExHeader(0x0);

            header.ReadData(data.GetReader());

            CitpPacket packet = null;

            switch (header.ContentCode)
            {
            case CaExContentCodes.Nack:
                packet = new CaExNack();
                break;

            case CaExContentCodes.GetLiveViewStatus:
                packet = new CaExGetLiveViewStatus();
                break;

            case CaExContentCodes.LiveViewStatus:
                packet = new CaExLiveViewStatus();
                break;

            case CaExContentCodes.GetLiveViewImage:
                packet = new CaExGetLiveViewImage();
                break;

            case CaExContentCodes.LiveViewImage:
                packet = new CaExLiveViewImage();
                break;

            case CaExContentCodes.SetCueRecordingCapabilities:
                packet = new CaExSetCueRecordingCapabilities();
                break;

            case CaExContentCodes.RecordCue:
                packet = new CaExRecordCue();
                break;

            case CaExContentCodes.SetRecorderClearingCapabilities:
                packet = new CaExSetRecorderClearingCapabilities();
                break;

            case CaExContentCodes.ClearRecorder:
                packet = new CaExClearRecorder();
                break;

            default:
                return(null);
            }

            packet.ReadData(data.GetReader());
            return(packet);
        }
Example #3
0
        private static CitpPacket BuildCaEx(CitpRecieveData data)
        {
            CaExHeader header = new CaExHeader(0x0);

            header.ReadData(data.GetReader());

            CitpPacket packet = null;

            switch (header.ContentCode)
            {
            case CaExContentCodes.Nack:
                packet = new CaExNack();
                break;

            case CaExContentCodes.GetLiveViewStatus:
                packet = new CaExGetLiveViewStatus();
                break;

            case CaExContentCodes.LiveViewStatus:
                packet = new CaExLiveViewStatus();
                break;

            case CaExContentCodes.GetLiveViewImage:
                packet = new CaExGetLiveViewImage();
                break;

            case CaExContentCodes.LiveViewImage:
                packet = new CaExLiveViewImage();
                break;

            case CaExContentCodes.SetCueRecordingCapabilities:
                packet = new CaExSetCueRecordingCapabilities();
                break;

            case CaExContentCodes.RecordCue:
                packet = new CaExRecordCue();
                break;

            case CaExContentCodes.SetRecorderClearingCapabilities:
                packet = new CaExSetRecorderClearingCapabilities();
                break;

            case CaExContentCodes.ClearRecorder:
                packet = new CaExClearRecorder();
                break;

            case CaExContentCodes.EnterShow:
                packet = new CaExEnterShow();
                break;

            case CaExContentCodes.LeaveShow:
                packet = new CaExLeaveShow();
                break;

            case CaExContentCodes.FixtureConsoleStatus:
                packet = new CaExFixtureConsoleStatus();
                break;

            case CaExContentCodes.FixtureListRequest:
                packet = new CaExFixtureListRequest();
                break;

            case CaExContentCodes.FixtureList:
                packet = new CaExFixtureList();
                break;

            case CaExContentCodes.FixtureModify:
                packet = new CaExFixtureModify();
                break;

            case CaExContentCodes.FixtureRemove:
                packet = new CaExFixtureRemove();
                break;

            case CaExContentCodes.FixtureSelection:
                packet = new CaExFixtureSelection();
                break;

            case CaExContentCodes.FixtureIdentify:
                packet = new CaExFixtureIdentify();
                break;

            case CaExContentCodes.GetLaserFeedList:
                //Not implemented yet, left here as placeholder.
                return(null);

            default:
                return(null);
            }

            packet.ReadData(data.GetReader());
            return(packet);
        }