public class PWMOutputImpl extends java.lang.Object implements PWMOutput
HardwareDevice.Manufacturer
Modifier and Type | Field and Description |
---|---|
protected PWMOutputController |
controller |
protected int |
port |
Constructor and Description |
---|
PWMOutputImpl(PWMOutputController controller,
int port)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this device
|
java.lang.String |
getConnectionInfo()
Get connection information about this device in a human readable format
|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
HardwareDevice.Manufacturer |
getManufacturer()
Returns an indication of the manufacturer of this device.
|
int |
getPulseWidthOutputTime()
Get the pulse width output time for this port
|
int |
getPulseWidthPeriod()
Get the pulse width output
|
int |
getVersion()
Version
|
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
void |
setPulseWidthOutputTime(int time)
Set the pulse width output time for this port.
|
void |
setPulseWidthPeriod(int period)
Set the pulse width output period.
|
protected PWMOutputController controller
protected int port
public PWMOutputImpl(PWMOutputController controller, int port)
controller
- Digital port controller this port is attached toport
- port on the digital port controllerpublic void setPulseWidthOutputTime(int time)
setPulseWidthOutputTime
in interface PWMOutput
time
- pulse width for the port in microseconds.public int getPulseWidthOutputTime()
getPulseWidthOutputTime
in interface PWMOutput
public void setPulseWidthPeriod(int period)
setPulseWidthPeriod
in interface PWMOutput
period
- pulse repetition period in microseconds.public int getPulseWidthPeriod()
getPulseWidthPeriod
in interface PWMOutput
public HardwareDevice.Manufacturer getManufacturer()
HardwareDevice
getManufacturer
in interface HardwareDevice
public java.lang.String getDeviceName()
HardwareDevice
getDeviceName
in interface HardwareDevice
public java.lang.String getConnectionInfo()
HardwareDevice
getConnectionInfo
in interface HardwareDevice
public int getVersion()
HardwareDevice
getVersion
in interface HardwareDevice
public void resetDeviceConfigurationForOpMode()
HardwareDevice
resetDeviceConfigurationForOpMode
in interface HardwareDevice
public void close()
HardwareDevice
close
in interface HardwareDevice