AMICO Protocol

Protocol introduction

AMICO can carrying some types of data:

AMICO uses some low level transport classes:

AMICO is a connection oriented protocol. Every module can create connections (link) with others modules. Every connections can:

Protocol initialization

When AMICO_link class is instantiated you have to define a string for unique name. When you have to connect to the other module, the alias is used to connect with remote module (process). The alias is specific for low level transport (IP:port for network socket, string (filename) unix socket).


 To other module                  .--------------.
       <------.     .------------>|              |-----------------.
              |     |             |   MODULE A   |                 |
              |     |   .---------|              |-----------.     |
              |     |   |         '--------------'           |     |
              |     |   |            /|\     |               |     |
              |     |   |             |      |               |     |
              |     |   |             |      |               |     |
              |     |  \|/            |     \|/             \|/   \|/
           .--------------.       .--------------.       .--------------.
           |              |       |              |       |              |
           |   MODULE B   |       |   MODULE C   |       |   MODULE D   |
           |              |       |              |       |              |
           '--------------'       '--------------'       '--------------'


Asynchronous data

Every link between two modules has a single asynchronous channel using the class AMICO_link. This class use STL queue (APQueueBase) to manage the type of message in AMICO_packet:


         MODULE A           Asynchronous link sub-channel          MODULE B


      ALARM queue <---|
                      |
      EVENT queue <---|-------------------------------------------- SEND  data
                      |
       INFO queue <---|                                       |---> ALARM queue
                                                              |
        SEND data --------------------------------------------|---> EVENT queue
                                                              |
                                                              |---> INFO queue


Primitive remote call AMICO_primitivecall

Using link handle you can call a primitive on remote module. A primitive has a prototype as:

APBool Primitive(APUint32 size_in, APPointer in, APUint32& size_out, APPointer output)

In the remote module the input pointer point to the data field of incoming packet. AMICO protocoll call the primitive and response with a packet with data field fill with memory copy from output pointer. The primitive must be pulished from remote module.


          MODULE A                                            MODULE B

                                     Input data           .--------------.
       PRIMITIVE call ----------------------------------->|              |
                                     Output data          |   PRIMITIVE  |---> ACTIONS
      PRIMITIVE reply <-----------------------------------|              |
                                                          '--------------'

Todo:
  • class AMICO_most (MOST wrapper, Media Oriented System Transport - http://www.mostcooperation.com )
  • class AMICO_canbus (class for CAN bus drivers)
  • class AMICO_router (routing between NET/UNIX)

Generated on Fri Mar 5 16:50:45 2010 for CarLinO by  doxygen 1.5.8