Exemplo n.º 1
0
 //------------------------------------------------------------------------------------------------------------------------
 public void Stop()
 {
     lock (this)
     {
         IsActive = false;
         var msg = new SharpPy()
         {
             operation = CMD.Stop
         };
         this.sharppytransport.Send2python(msg);
     }
 }
Exemplo n.º 2
0
 //------------------------------------------------------------------------------------------------------------------------
 public void Stop()
 {
     lock (this)
     {
         IsActive = false;
         var msg = new SharpPy()
         {
             operation = CMD.Stop
         };
         this.sharppytransport.Send2python(msg);
     }
 }
Exemplo n.º 3
0
        //------------------------------------------------------------------------------------------------------------------------
        #endregion

        #region Functions
        //------------------------------------------------------------------------------------------------------------------------
        public void Start()
        {
            lock (this)
            {
                IsActive = true;
                var message = new SharpPy()
                {
                    operation = CMD.Start
                };
                DebugEx.TraceLog("Send to python Start Capture");
                this.sharppytransport.Send2python(message);
            }
        }
Exemplo n.º 4
0
        //------------------------------------------------------------------------------------------------------------------------
        #endregion

        #region Functions
        //------------------------------------------------------------------------------------------------------------------------
        public void Start()
        {
            lock (this)
            {
                IsActive = true;
                var message = new SharpPy()
                {
                    operation = CMD.Start
                };
                DebugEx.TraceLog("Send to python Start Capture");
                this.sharppytransport.Send2python(message);
            }
        }
Exemplo n.º 5
0
 private void RegisterHandlers()
 {
     node.PortEventHandlers[Helper.CameraThing.Ports[1]] = data =>
     {
         var msg = new SharpPy()
         {
             operation = CMD.Filter,
             payload   = data,
         };
         DebugEx.TraceLog("===============>Change Filter");
         this.pysharp.Send2python(msg);
     };
 }
Exemplo n.º 6
0
        //------------------------------------------------------------------------------------------------------------------------

        //send mesg for processing to python
        public void Send2python(SharpPy data)
        {
            lock (this)
            {
                if (data.payload == null)
                {
                    data.payload = String.Empty;
                }
                var    csharp2pythonmessage = JsonConvert.SerializeObject(data);
                string timestamp            = DateTime.Now.ToString();
                DebugEx.TraceLog("Send to python " + timestamp);
                sw.WriteLine(csharp2pythonmessage);
                sw.WriteLine("\n");
            }
        }
Exemplo n.º 7
0
 private void RegisterHandlers()
 {
     node.PortEventHandlers[Helper.CameraThing.Ports[1]] = data =>
     {
         var msg = new SharpPy()
         {
             operation = CMD.Filter,
             payload = data,
         };
         DebugEx.TraceLog("===============>Change Filter");
         this.pysharp.Send2python(msg);
     };
 }
Exemplo n.º 8
0
        //------------------------------------------------------------------------------------------------------------------------

        //send mesg for processing to python
        public void Send2python(SharpPy data)
        {
            lock (this)
            {
                if (data.payload == null)
                    data.payload = String.Empty;
                var csharp2pythonmessage = JsonConvert.SerializeObject(data);
                string timestamp = DateTime.Now.ToString();
                DebugEx.TraceLog("Send to python " + timestamp);
                sw.WriteLine(csharp2pythonmessage);
                sw.WriteLine("\n");
            }
        }