Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jason.infra.saci
Class SaciAgArch

    java.lang.Object
      saci.Agent
          jason.infra.saci.SaciAgArch

All Implemented Interfaces:
  AgArchInfraTier, java.io.Serializable, java.lang.Runnable, saci.launcher.LaunchableAg, saci.launcher.MovableAg

    public class SaciAgArch

extends saci.Agent
implements AgArchInfraTier

This class provides an agent architecture when using SACI Infrastructure to run the MAS.

Execution sequence: initAg, run (perceive, checkMail, act), stopAg.

See Also:
  Serialized Form

Field Summary
`protected AgArch` | `userAgArch` the user implementation of the architecture

Fields inherited from class saci.Agent
`controlAg, mbox, mboxes, properties, running`

Constructor Summary
`SaciAgArch()`

Method Summary
`void` | `act(ActionExec action, java.util.List<ActionExec> feedback)` Executes the action action and, when finished, add it back in feedback actions.
`void` | `broadcast(Message m)` Broadcasts a Jason message in a specific infrastructure
`boolean` | `canSleep()` Returns true whether the agent can sleep according to the arch
`void` | `checkMail()` Reads the agent's mailbox and adds messages into the agent's circumstance
`java.lang.String` | `getAgName()` Gets the agent's name
`RuntimeServicesInfraTier` | `getRuntimeServices()` Gets an object with infrastructure runtime services
`void` | `informCycleFinished(boolean breakpoint, int cycle)` Informs the infrastructure tier controller that the agent has finished its reasoning cycle (used in sync mode).
`void` | `initAg(java.lang.String[] args)` Method used by SACI to initialise the agent: args[0] is the agent architecture class, args[1] is the user Agent class, args[2] is the user BB class, args[3] is the AgentSpeak source file, args[4] "options", args[5] options.
`java.util.List` | `perceive()` Gets the agent's perception as a list of Literals
`void` | `run()`
`void` | `sendMsg(Message m)` the saci implementation of the sendMsg interface
`void` | `sleep()` Put the agent in "sleep" mode
`void` | `stopAg()` Stops the agent
`void` | `wake()` Removes the agent from the "sleep" mode

Methods inherited from class saci.Agent
`destroy, enterSoc, enterSoc, enterSoc, enterSociety, getControlAg, getLauncher, getMBox, getMBox, getName, getProperty, getSociety, isRunning, leaveAllSocs, leaveSoc, leaveSoc, move, moveMBoxesToLocalHost, onMoved, onMoving, setControlAg, setProperty, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface jason.architecture.AgArchInfraTier
`isRunning`

Field Detail

### userAgArch

    protected AgArch userAgArch

  the user implementation of the architecture

Constructor Detail

### SaciAgArch

    public SaciAgArch()

Method Detail

### initAg

    public void initAg(java.lang.String[] args)
                throws JasonException

  Method used by SACI to initialise the agent: args[0] is the agent architecture class, args[1] is the user Agent class, args[2] is the user BB class, args[3] is the AgentSpeak source file, args[4] "options", args[5] options.

  Specified by:
    `initAg` in interface `saci.launcher.LaunchableAg`
  Overrides:
    `initAg` in class `saci.Agent`
  Throws:
    `JasonException`

### getAgName

    public java.lang.String getAgName()

  Description copied from interface: `AgArchInfraTier`
  Gets the agent's name

  Specified by:
    `getAgName` in interface `AgArchInfraTier`

### stopAg

    public void stopAg()

  Description copied from interface: `AgArchInfraTier`
  Stops the agent

  Specified by:
    `stopAg` in interface `AgArchInfraTier`
  Specified by:
    `stopAg` in interface `saci.launcher.LaunchableAg`
  Overrides:
    `stopAg` in class `saci.Agent`

### sleep

    public void sleep()

  Description copied from interface: `AgArchInfraTier`
  Put the agent in "sleep" mode

  Specified by:
    `sleep` in interface `AgArchInfraTier`

### wake

    public void wake()

  Description copied from interface: `AgArchInfraTier`
  Removes the agent from the "sleep" mode

  Specified by:
    `wake` in interface `AgArchInfraTier`

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`
  Overrides:
    `run` in class `saci.Agent`

### perceive

    public java.util.List perceive()

  Description copied from interface: `AgArchInfraTier`
  Gets the agent's perception as a list of Literals

  Specified by:
    `perceive` in interface `AgArchInfraTier`

### sendMsg

    public void sendMsg(Message m)
                 throws java.lang.Exception

  the saci implementation of the sendMsg interface

  Specified by:
    `sendMsg` in interface `AgArchInfraTier`
  Throws:
    `java.lang.Exception`

### broadcast

    public void broadcast(Message m)
                   throws java.lang.Exception

  Description copied from interface: `AgArchInfraTier`
  Broadcasts a Jason message in a specific infrastructure

  Specified by:
    `broadcast` in interface `AgArchInfraTier`
  Throws:
    `java.lang.Exception`

### checkMail

    public void checkMail()

  Description copied from interface: `AgArchInfraTier`
  Reads the agent's mailbox and adds messages into the agent's circumstance

  Specified by:
    `checkMail` in interface `AgArchInfraTier`

### act

    public void act(ActionExec action,
                    java.util.List<ActionExec> feedback)

  Description copied from interface: `AgArchInfraTier`
  Executes the action action and, when finished, add it back in feedback actions.

  Specified by:
    `act` in interface `AgArchInfraTier`

### canSleep

    public boolean canSleep()

  Description copied from interface: `AgArchInfraTier`
  Returns true whether the agent can sleep according to the arch

  Specified by:
    `canSleep` in interface `AgArchInfraTier`

### informCycleFinished

    public void informCycleFinished(boolean breakpoint,
                                    int cycle)

  Informs the infrastructure tier controller that the agent has finished its reasoning cycle (used in sync mode).

  breakpoint is true in case the agent selected one plan with the "breakpoint" annotation.

### getRuntimeServices

    public RuntimeServicesInfraTier getRuntimeServices()

  Description copied from interface: `AgArchInfraTier`
  Gets an object with infrastructure runtime services

  Specified by:
    `getRuntimeServices` in interface `AgArchInfraTier`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD