|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.resources.Resource
com.sun.spot.sensorboard.io.OutputPin
public class OutputPin
Accessor object for output only GPIO pins.
| Constructor Summary | |
|---|---|
OutputPin(PinDescriptor idx,
IGPIOController cntrl)
Do not call: for internal use only. |
|
| Method Summary | |
|---|---|
SensorEvent |
createSensorEvent()
Create a SensorEvent of the appropriate type for this sensor. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this output pin. |
String |
getDescription()
This method returns a readable description of the sensor. |
PinDescriptor |
getIndex()
Return the PinDescriptor for this pin. |
double |
getMaxSamplingRate()
Return the maximum sampling rate per second for this sensor. |
boolean |
getState()
Return the current state of this pin. |
int |
hashCode()
Returns a hash code value for the object. |
void |
saveEventState(SensorEvent evt)
Save the current sensor state in the specified event. |
void |
setHigh()
Set the value of this pin to high. |
void |
setHigh(boolean high)
Set the value of this pin. |
void |
setLow()
Set the value of this pin to low. |
String |
toString()
Return the name of this pin |
| Methods inherited from class com.sun.spot.resources.Resource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sun.spot.resources.IResource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Constructor Detail |
|---|
public OutputPin(PinDescriptor idx,
IGPIOController cntrl)
EDemoBoard#getOutputPins()
to get an array of all available high current output pins: H0-H3.
Use EDemoBoard#getIOPins()
to get an array of all available bidirectional digital pins: D0-D4.
| Method Detail |
|---|
public String toString()
toString in class Objectpublic PinDescriptor getIndex()
getIndex in interface IBasicPinpublic void setHigh()
setHigh in interface IOutputPinpublic void setLow()
setLow in interface IOutputPinpublic void setHigh(boolean high)
setHigh in interface IOutputPinhigh - if true then pin is set to highpublic boolean getState()
getState in interface IOutputPinpublic boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare.
Boolean.hashCode(),
Hashtablepublic int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic String getDescription()
ITransducer
getDescription in interface ITransducerpublic double getMaxSamplingRate()
ITransducer
getMaxSamplingRate in interface ITransducerpublic SensorEvent createSensorEvent()
ITransducer
createSensorEvent in interface ITransducerpublic void saveEventState(SensorEvent evt)
ITransducer
saveEventState in interface ITransducerevt - the event to store the sensor state in
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||