Package ej.event
Class EventQueueMock
- java.lang.Object
-
- ej.event.EventQueueMock
-
public class EventQueueMock extends java.lang.ObjectEventQueueMockAPI mocks the C API of the Generic Event Foundation Library.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intofferEvent(int type, int data)Inserts an event to the FIFO.static intofferExtendedEvent(int type, byte[] data, int dataLength)Inserts an extended event to the FIFO.
-
-
-
Method Detail
-
offerEvent
public static int offerEvent(int type, int data)Inserts an event to the FIFO.The type must not be lower than 0 or higher than 127. The data must not exceeds 24 bits. Otherwise use
offerExtendedEvent(int, byte[], int).- Parameters:
type- the type of the event.data- the data of the event.- Returns:
- 0 = success, -1 = failed: illegal arguments, -2 = failed: the FIFO is full
-
offerExtendedEvent
public static int offerExtendedEvent(int type, byte[] data, int dataLength)Inserts an extended event to the FIFO.The type must not be lower than 0 or higher than 127. The data_length must not exceed 24-bit.
- Parameters:
type- the type of the events.data- the data of the events.dataLength- the length of data array (in bytes).- Returns:
- 0 = success, -1 = failed: illegal arguments, -2 = failed: the FIFO is full
-
-