Initial check-in
This commit is contained in:
63
Source/Interfaces/ICommDevice/ICommDevice.cs
Normal file
63
Source/Interfaces/ICommDevice/ICommDevice.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
// UNCLASSIFIED
|
||||
/*-------------------------------------------------------------------------
|
||||
RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION
|
||||
PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS
|
||||
AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT. DISCLOSURE TO
|
||||
UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO
|
||||
RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS
|
||||
CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS
|
||||
OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON
|
||||
COMPANY.
|
||||
|
||||
THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S.
|
||||
GOVERNMENT.
|
||||
|
||||
UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
|
||||
-------------------------------------------------------------------------*/
|
||||
using Raytheon.Communication;
|
||||
|
||||
namespace Raytheon.Instruments
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface to any device that you can write and read to/from
|
||||
/// </summary>
|
||||
public interface ICommDevice : IInstrument
|
||||
{
|
||||
/// <summary>
|
||||
/// Close the communication interface
|
||||
/// </summary>
|
||||
[UmsCommand("ICommDevice.Close")]
|
||||
void Close();
|
||||
|
||||
/// <summary>
|
||||
/// Open the communication interface
|
||||
/// </summary>
|
||||
[UmsCommand("ICommDevice.Open")]
|
||||
void Open();
|
||||
|
||||
/// <summary>
|
||||
/// Reads data from a communication device
|
||||
/// </summary>
|
||||
/// <param name="dataRead"></param>
|
||||
/// <returns>number of bytes read</returns>
|
||||
[UmsCommand("ICommDevice.Read")]
|
||||
uint Read(ref byte[] dataRead);
|
||||
|
||||
/// <summary>
|
||||
/// Set the timeout on a read
|
||||
/// </summary>
|
||||
/// <param name="timeout"></param>
|
||||
[UmsCommand("ICommDevice.SetReadTimeout")]
|
||||
void SetReadTimeout(uint timeout);
|
||||
|
||||
/// <summary>
|
||||
/// Writes data to a communication device
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <param name="numBytesToWrite"></param>
|
||||
/// <returns>the number of bytes written</returns>
|
||||
[UmsCommand("ICommDevice.Write")]
|
||||
uint Write(byte[] data, uint numBytesToWrite);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user