MARIE 0.5 sharedmap

From MARIEWiki

Jump to: navigation, search

Contents

Version

0.5


Description

This adapter is used to share data, in the key-value form, between multiple sources. Keys and values are stored in string format. GroupA can only write data in SM and groupB can only read data from SM.

MARIE's DataMap class is used to communicate with SM. To write in SM, DataMap object must be filled with key-values to add. If a key is already defined, it will be replaced by the new value. To read from SM, a pull signal must be send in groupB port. A DataMap object with be returned containing all the key-values contained in the SM.

Default values can also be defined.

sharedmap.jpg


Requirements

Pull serialized message need to be represented like this : <pull>


Configuration

Note : see Configuration Description Language for syntax details.

# C sharedmap
   # Q groupA
      1-N T port
   
   # Q groupB
      1-N T port
      
   o Q element
      * KV element
     
  • element : Preloaded element key name assigned with the corresponding value

Notes :

  • Input ports expects DataMap data
  • Output ports sends DataMap data

See available Ports for port configuration details.

Usage

usage :  sharedmap -n component_name [-t component_type] [-d director_port_number] [-c configurator_port_number]

      -n     #Specify component's name
              
      -t     #Specify component's control type :
             #  DEFAULT - use when controlled by appman Application Manager (default)
             #  MPI     - use when controlled by ammpi Application Manager
              
      -d     #Specify director server socket port number (mandatory in DEFAULT component's control type)
      -c     #Specify configurator server socket port number (mandatory in DEFAULT component's control type)


Executing aacarmen in project

This section shows how to use sharedmap in a Project..

In .setup file, add the following processes :

# T process
   # KV name
   # KV type = MARIE:MPI
   # KV executableName = sharedmap
   
   # KV configFile
  • name : Specify a reference name for the process
  • type : Specify component's control type
  • executableName : Specify the executable name
  • configFile : Specify path to aafd configuration file (see Configuration)

Executing aacarmen with appman [deprecated]

This section shows how to use sharedmap with appman Application Manager from a terminal script.

Start component

sharedmap -n component_name -t MARIE -d director_port_number -c configurator_port_number
sleep 4    # Sleep time (plateform specific)

appman -p configurator_port_number -c sxml:PathToConfigFile
sleep 1    # Sleep time (plateform specific) 

appman -p director_port_number -c init
sleep 1    # Sleep time (plateform specific)

appman -p director_port_number -c start

Component can take couple of seconds to boot, configure and initialize before being ready to receive requests on director and configurator ports. Delays are required and must be adjusted depending on the running platform.

Stop component

appman -p director_port_number -c stop
sleep 1    # Sleep time (plateform specific)

Component can take couple of seconds to stop before being ready to receive requests on director and configurator ports. Delay is required and must be adjusted depending on the running platform.

Quit component

appman -p director_port_number -c quit


Authors

  • Carle Cote


Contributors

  • Clement Raievsky


License

MARIE - Mobile and Autonomous Robotics Integration Environment Copyright (C) 2004-2006 Carle Cote

This library and its documentation are free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library and documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You can contact MARIE development team at http://marie.sourceforge.net.


Personal tools