BakeoutController-Basic  0.1
A Controller for the Omicron vacuum chamber
Public Member Functions | List of all members
unit.devices.DevicesTestCase.CommunicationMonitor Class Reference
Inheritance diagram for unit.devices.DevicesTestCase.CommunicationMonitor:
Inheritance graph
[legend]
Collaboration diagram for unit.devices.DevicesTestCase.CommunicationMonitor:
Collaboration graph
[legend]

Public Member Functions

InputStream getInputStream ()
 
OutputStream getOutputStream ()
 
void setInputStreamData (String dataForDeviceToRead)
 
String getOutputStreamData ()
 
void clear ()
 

Detailed Description

Definition at line 24 of file DevicesTestCase.java.

Member Function Documentation

void unit.devices.DevicesTestCase.CommunicationMonitor.clear ( )

Reset the streams to their initial configuration

Implements unit.devices.DeviceCommunicator.

Definition at line 55 of file DevicesTestCase.java.

55  {
56  this.inputStream = new ByteArrayInputStream(
57  PowerSupply.OK_RESPONSE.getBytes()
58  );
59  this.outputStream = new ByteArrayOutputStream();
60  }
InputStream unit.devices.DevicesTestCase.CommunicationMonitor.getInputStream ( )
Returns
A stream useful for reading from the port

Implements kernel.serial_ports.PortCommunicator.

Definition at line 35 of file DevicesTestCase.java.

35  {
36  return this.inputStream;
37  }
OutputStream unit.devices.DevicesTestCase.CommunicationMonitor.getOutputStream ( )
Returns
A stream useful for writing to the port

Implements kernel.serial_ports.PortCommunicator.

Definition at line 39 of file DevicesTestCase.java.

39  {
40  return this.outputStream;
41  }
String unit.devices.DevicesTestCase.CommunicationMonitor.getOutputStreamData ( )
Returns
The data that the device wrote to its output stream

Implements unit.devices.DeviceCommunicator.

Definition at line 49 of file DevicesTestCase.java.

49  {
50  String data = this.outputStream.toString();
51  this.outputStream = new ByteArrayOutputStream();
52  return data;
53  }
void unit.devices.DevicesTestCase.CommunicationMonitor.setInputStreamData ( String  dataForDeviceToRead)
Parameters
dataForDeviceToReadThe data that the input stream will read

Implements unit.devices.DeviceCommunicator.

Definition at line 43 of file DevicesTestCase.java.

43  {
44  this.inputStream = new ByteArrayInputStream(
45  dataForDeviceToRead.getBytes()
46  );
47  }

The documentation for this class was generated from the following file:
Git Repo