Search in sources :

Example 1 with SomeOtherEventType

use of alma.benchmark.SomeOtherEventType in project ACS by ACS-Community.

the class CorbaNotifySupplierImpl method createTestEvent.

/**
	 * Factory method for event data that will be sent to the NCs.
	 * @param eventName
	 * @param antennaName  Only used for eventName == MountStatusData or LightweightMountStatusData
	 * @return 
	 * @throws IllegalArgumentException 
	 */
protected IDLEntity createTestEvent(String eventName, String antennaName) {
    IDLEntity ret = null;
    String antennaNameToSet = (antennaName != null && !antennaName.isEmpty() ? antennaName : "unknown");
    if (eventName.equals("MountStatusData")) {
        MountStatusData data = new MountStatusData();
        data.antennaName = antennaNameToSet;
        // @TODO set some of the boolean / double fields
        ret = data;
    } else if (eventName.equals("LightweightMountStatusData")) {
        LightweightMountStatusData data = new LightweightMountStatusData();
        data.antennaName = antennaNameToSet;
        ret = data;
    } else if (eventName.equals("SomeOtherEventType")) {
        SomeOtherEventType data = new SomeOtherEventType();
        ret = data;
    } else // @TODO Add support for more event types as needed
    {
        throw new IllegalArgumentException("Unsupported event type '" + eventName + "'.");
    }
    return ret;
}
Also used : LightweightMountStatusData(alma.benchmark.LightweightMountStatusData) MountStatusData(alma.benchmark.MountStatusData) SomeOtherEventType(alma.benchmark.SomeOtherEventType) IDLEntity(org.omg.CORBA.portable.IDLEntity) LightweightMountStatusData(alma.benchmark.LightweightMountStatusData)

Aggregations

LightweightMountStatusData (alma.benchmark.LightweightMountStatusData)1 MountStatusData (alma.benchmark.MountStatusData)1 SomeOtherEventType (alma.benchmark.SomeOtherEventType)1 IDLEntity (org.omg.CORBA.portable.IDLEntity)1