using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EMDServer.Common;
using System.Diagnostics;

namespace EMDGui
{
    public class RemotingClient : MarshalByRefObject, IRemotingClient
    {
        #region Public Properties
        // ----------------------------------------
        public ICommandReceiver CommandReceiver { get; set; }
        // ----------------------------------------
        #endregion

        #region IRemotingClient Members
        // ----------------------------------------
        public void Send(Command cmd)
        {
            //Debug.WriteLine("REMOTINGCLIENT - Display Value received: "+ (Constants.EMD_COMMAND)cmd.Cmd +" \t");

            //foreach (var item in cmd.Val)
            //{
            //    Debug.Write((int)item);
            //}
            //Debug.WriteLine("");


            if (this.CommandReceiver != null)
            {
                this.CommandReceiver.SendCommand(cmd);
            }
        }
        // ----------------------------------------
        #endregion
    }
}
