PluginTutorial

From SeSAm-Wiki

Jump to: navigation, search

Contents

Introduction

Within the SeSAm-IDE you are able to visually model agents, their behaviour and their environment. Behaviour modelling is grounded on basic primitives for sensing, acting and calculating. This language is also called SeSAm-Impl. The language itself is Touring-complete but there might be some reasons to extend the given set of behaviour primitives. This might be to speed up model execution or to create interfaces to external tools like databases or FIPA-Agents. This tutorial shows starting with simple examples, how extensions to SeSAm can be realized. This tutorial presumes that you are familiar with JAVA, the JAVA-IDE Eclipse and - certainly - SeSAm. Please read the SeSAm modelling tutorials in advance.

Accessing the Repository

If you like to develop SeSAm extensions don't hesitate to ask for a user login to acceess the repository. This usually works better than trying to get SeSAm run from the zipped sources the distribution.

Motivation check

Whenever you think about developing a plugin you should check, if it is really necessary. SeSAm already offers plenty of primitive functions and is very powerful. You can create user data types and user functions within the model declaration, so often it is not necessary to learn how to programm new functions because you can do it easier by modelling. Further advantage is that your model keeps independent of external plugins. But there are still cases where creating user features is not enough. Think of connecting SeSAm to a database or accessing an external scanner to scan an initial map representation (very crazy idea).

Examples

Following are some examples which show you how to programm additional plugins for SeSAm:

Type overview

When dealing with SeSAm FunctionDeclarations you need to define the input and output parameters. Here I have listed some of the basic types you will need to program your own functions.

align="left"| !Declaration align="left"| !Return type of AbstractFunction
IntegerType java.lang.Integer
StringType java.lang.String
BooleanType Boolean
VoidType Void
GenericSimObjectType.getGeneralSimObjectType() IObject
GenericListType.createSpecificListType(ISpecificType) java.util.List

Next to come:

These topics are to be treated next. You are as well welcome to improve this tutorial if you like.

  • FeatureInstanceDeclaration and Example (e.g Focus and similar things)
  • AgentCounter (accessing executeFunctionArgs) looks how many agents are in the runnig simulation
  • Database-Feature
Personal tools