Skip to content

Commit

Permalink
adding the russian banana activity
Browse files Browse the repository at this point in the history
  • Loading branch information
amgreer99 committed Jan 22, 2024
1 parent 1fe944b commit 0577c0a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package gov.nasa.jpl.aerie.banananation.activities;

import gov.nasa.jpl.aerie.banananation.Mission;
import gov.nasa.jpl.aerie.merlin.framework.annotations.ActivityType;
import gov.nasa.jpl.aerie.merlin.framework.annotations.Export;
import gov.nasa.jpl.aerie.merlin.protocol.types.Duration;

import java.util.List;

import static gov.nasa.jpl.aerie.banananation.generated.ActivityActions.call;
import static gov.nasa.jpl.aerie.merlin.framework.ModelActions.delay;

/**
* Russian Banana Encloses Banana
*
* This activity causes a piece of banana to be bitten off and consumed.
*
* @subsystem fruit
* @contact John Doe
*/
@ActivityType("RussianBanana")
public final class RussianBanana {

@Export.Parameter
public List<Integer> testints;

@Export.Parameter
public List<BiteBananaActivity> biteBananaActivity;

@Export.Parameter
public PeelBananaActivity peelBananaActivity;


@ActivityType.EffectModel
public void run(final Mission mission) {
for (final var bite : biteBananaActivity) {
call(mission, bite);
delay(Duration.of(30, Duration.MINUTE));
}
call(mission, peelBananaActivity);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@WithActivityType(ControllableDurationActivity.class)
@WithActivityType(RipenBananaActivity.class)
@WithActivityType(ExceptionActivity.class)

@WithActivityType(RussianBanana.class)
package gov.nasa.jpl.aerie.banananation;

import gov.nasa.jpl.aerie.banananation.activities.BakeBananaBreadActivity;
Expand All @@ -46,6 +46,7 @@
import gov.nasa.jpl.aerie.banananation.activities.PeelBananaActivity;
import gov.nasa.jpl.aerie.banananation.activities.PickBananaActivity;
import gov.nasa.jpl.aerie.banananation.activities.RipenBananaActivity;
import gov.nasa.jpl.aerie.banananation.activities.RussianBanana;
import gov.nasa.jpl.aerie.banananation.activities.ThrowBananaActivity;
import gov.nasa.jpl.aerie.contrib.serialization.rulesets.BasicValueMappers;
import gov.nasa.jpl.aerie.merlin.framework.annotations.MissionModel;
Expand Down

0 comments on commit 0577c0a

Please sign in to comment.