ist.palcom.device
Interface IDeviceIO

All Known Implementing Classes:
DeviceIO

public interface IDeviceIO

Interface specifying the I/O interface between the (simulated) hardware and the palcom device/service code. The interface specifies operations to allow both event-based and polling I/O, in both directions.


Method Summary
 void addOutEventListener(OutEventListener l)
          Register a listener for events from the palcom side.
 void close()
          close and do cleanup.
 Event getInEvent()
          non-blocking polling of input events
 Event getOutEvent()
          non-blocking polling of input events
 void putInEvent(Event e)
          send an event from the hardware to the palcom side code
 void putOutEvent(Event e)
          Send an event to the hardware from the palcom side code.
 void removeInEventReceiver()
          unregister the receiver for events from the hardware side.
 void removeOutEventListener(OutEventListener l)
          unregister a listener for events from the palcom side.
 void setInEventReceiver(PalcomThread t)
          register the receiver for events from the hardware side.
 Event waitInEvent()
          blocking polling of input events
 Event waitOutEvent()
          blocking polling of input events
 

Method Detail

putOutEvent

void putOutEvent(Event e)
Send an event to the hardware from the palcom side code. If listeners have been registered using addOutEventListener, the hardware-side event handler call-back may run in the context of the palcom thread that calls putOutEvent.


getInEvent

Event getInEvent()
non-blocking polling of input events


waitInEvent

Event waitInEvent()
blocking polling of input events


setInEventReceiver

void setInEventReceiver(PalcomThread t)
register the receiver for events from the hardware side. N.B.! There can be at most one receiver thread on the PalcomThread side.


removeInEventReceiver

void removeInEventReceiver()
unregister the receiver for events from the hardware side.


close

void close()
close and do cleanup.


putInEvent

void putInEvent(Event e)
send an event from the hardware to the palcom side code


addOutEventListener

void addOutEventListener(OutEventListener l)
Register a listener for events from the palcom side. On the hardware side, a set of listeners is allowed.


removeOutEventListener

void removeOutEventListener(OutEventListener l)
unregister a listener for events from the palcom side.


getOutEvent

Event getOutEvent()
non-blocking polling of input events


waitOutEvent

Event waitOutEvent()
blocking polling of input events