Example #1
0
 private void Send(Request request)
 {
     /*
      * byte[] encodeable = Encoding.ASCII.GetBytes(request.ToString());
      *
      * ActiveConnection.Send(Encoder.Encode(encodeable, encodeable.Length));
      */
     ActiveConnection.Send(Encoding.ASCII.GetBytes(request.ToString()));
 }
Example #2
0
 private void pollStatusReport()
 {
     if (statusQueryTimeout.Expired(statusQueryInterval) && pendingStatusQueryRequest == null)
     {
         GrblRequest request = GrblRequest.CreateStatusQueryRequest();
         if (ActiveConnection.Send(request))
         {
             statusQueryTimeout.Reset();
             pendingStatusQueryRequest = request;
         }
     }
 }
Example #3
0
 private T Send <T>(ScsiCommand cmd, byte[] buffer, int offset, int count, int expected)
     where T : ScsiResponse, new()
 {
     return(ActiveConnection.Send <T>(cmd, buffer, offset, count, expected));
 }
Example #4
0
 /// <summary>
 /// Sends an SCSI command (aka task) to a LUN via the connected target.
 /// </summary>
 /// <param name="cmd">The command to send.</param>
 /// <param name="outBuffer">The data to send with the command.</param>
 /// <param name="outBufferOffset">The offset of the first byte to send.</param>
 /// <param name="outBufferCount">The number of bytes to send, if any.</param>
 /// <param name="inBuffer">The buffer to fill with returned data.</param>
 /// <param name="inBufferOffset">The first byte to fill with returned data.</param>
 /// <param name="inBufferMax">The maximum amount of data to receive.</param>
 /// <returns>The number of bytes received.</returns>
 private int Send(ScsiCommand cmd, byte[] outBuffer, int outBufferOffset, int outBufferCount, byte[] inBuffer, int inBufferOffset, int inBufferMax)
 {
     return(ActiveConnection.Send(cmd, outBuffer, outBufferOffset, outBufferCount, inBuffer, inBufferOffset, inBufferMax));
 }