java.lang.Object
com.pi4j.crowpi.components.Component
- Direct Known Subclasses:
ButtonComponent
,ButtonMatrixComponent
,BuzzerComponent
,HT16K33
,HumiTempComponent
,IrReceiverComponent
,LcdDisplayComponent
,LightSensorComponent
,MAX7219
,MCP23008
,MFRC522
,PirMotionSensorComponent
,RelayComponent
,ServoMotorComponent
,SoundSensorComponent
,StepMotorComponent
,TiltSensorComponent
,TouchSensorComponent
,UltrasonicDistanceSensorComponent
,VibrationMotorComponent
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
sleep
(long milliseconds) Utility function to sleep for the specified amount of milliseconds.protected void
triggerSimpleEvent
(SimpleEventHandler handler) Utility function to trigger a simple event handler.
-
Field Details
-
logger
Logger instance
-
-
Constructor Details
-
Component
public Component()
-
-
Method Details
-
sleep
protected void sleep(long milliseconds) Utility function to sleep for the specified amount of milliseconds. AnInterruptedException
will be catched and ignored while setting the interrupt flag again.- Parameters:
milliseconds
- Time in milliseconds to sleep
-
triggerSimpleEvent
Utility function to trigger a simple event handler. If the handler is currently null it gets silently ignored.- Parameters:
handler
- Event handler to call or null
-