[][src]Enum asi_core0::Action

pub enum Action {
    Terminate,
    Wait(f64),
    Output {
        actuator: ActuatorId,
        memory: MemoryId,
    },
    Input {
        sensor: SensorId,
        memory: MemoryId,
    },
    Alloc {
        slots: usize,
    },
    Free {
        memory: MemoryId,
    },
    Swap {
        memory_a: MemoryId,
        memory_b: MemoryId,
    },
}

Represents an action that the agent takes.

Variants

Terminate

Terminate the runtime.

Wait(f64)

Wait a number of seconds.

Output

Send an output signal to actuator from memory slot.

Fields of Output

actuator: ActuatorId

The actuator to write output to.

memory: MemoryId

The memory slot to write output from.

Input

Read an input signal from sensor and stores it memory slot.

Fields of Input

sensor: SensorId

The sensor to read input from.

memory: MemoryId

The memory slot to store input.

Alloc

Allocate new memory states. Creates N number of new states.

Fields of Alloc

slots: usize

The number of slots to be allocated.

Free

Free memory state (index). This will insert a default memory state in the middle and shrink memory at the end.

Fields of Free

memory: MemoryId

The memory slot to be freed.

Swap

Swap two memory states, likely in order to free memory at the end.

Fields of Swap

memory_a: MemoryId

The first memory slot.

memory_b: MemoryId

The second memory slot.

Trait Implementations

impl Clone for Action[src]

impl Copy for Action[src]

impl Debug for Action[src]

Auto Trait Implementations

impl RefUnwindSafe for Action

impl Send for Action

impl Sync for Action

impl Unpin for Action

impl UnwindSafe for Action

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.