Search in sources :

Example 1 with NestedFridgeEvent

use of alma.FRIDGE.FridgeControlPackage.NestedFridgeEvent in project ACS by ACS-Community.

the class EventComponentTest method doSomeStuff.

/**
	 * Gets the supplier component to send out events 
	 */
public void doSomeStuff() throws AcsJCouldntPerformActionEx {
    try {
        // get the supplier component to create 10 default events.
        // The consumer will unsubscribe after having received 5 of these events.
        m_supplierComp.sendEvents((short) 10);
        // Now give the supplier component a bunch of event structs to publish on the fridge channel
        // Note that the event type is different from the above.
        int nNestedEvents = 5;
        NestedFridgeEvent[] nestedEvents = new NestedFridgeEvent[nNestedEvents];
        for (int i = 0; i < nNestedEvents; i++) {
            nestedEvents[i] = new NestedFridgeEvent();
            nestedEvents[i].status = TemperatureStatus.ATREF;
        }
        m_supplierComp.sendEventsSpecial(nestedEvents);
    } catch (CouldntPerformActionEx e) {
        throw AcsJCouldntPerformActionEx.fromCouldntPerformActionEx(e);
    }
}
Also used : AcsJCouldntPerformActionEx(alma.ACSErrTypeCommon.wrappers.AcsJCouldntPerformActionEx) CouldntPerformActionEx(alma.ACSErrTypeCommon.CouldntPerformActionEx) NestedFridgeEvent(alma.FRIDGE.FridgeControlPackage.NestedFridgeEvent)

Aggregations

CouldntPerformActionEx (alma.ACSErrTypeCommon.CouldntPerformActionEx)1 AcsJCouldntPerformActionEx (alma.ACSErrTypeCommon.wrappers.AcsJCouldntPerformActionEx)1 NestedFridgeEvent (alma.FRIDGE.FridgeControlPackage.NestedFridgeEvent)1