AForge.Robotics.Surveyor.SRV1.Send C# (CSharp) Method

Send() public method

Enqueue communication request.

The method puts specified command into communication queue and leaves immediately. Once internal communication thread becomes free from sending/receiving previous commands/replies, it will send the queued command.

The method is useful for those SRV-1 commands, which does not assume any response data in the command's reply.

Since the method only queues a communication request, it does not provide any status of request's delivery and it does not generate any exceptions on failure.

public Send ( byte request ) : void
request byte Array of bytes (command) to send to SRV-1 Blackfin robot/camera.
return void
        public void Send( byte[] request )
        {
            lock ( communicationQueue )
            {
                communicationQueue.Enqueue( new CommunicationRequest( request ) );
            }
            if ( requestIsAvailable != null )
            {
                requestIsAvailable.Set( );
            }
        }