Port

From MARIE

Jump to: navigation, search

Contents

What's a Port?

Ports are communication abstraction classes used by the Component Framework. Using generic communication interfaces within components allows to write more reusable algorithms and functionalities.


http://marie.sf.net/images/design/ComponentFramework_Port.jpg


http://marie.sf.net/images/design/Port.jpg


Port are customizable depending on communication or application requirements. Communication Strategy and Cascading Functional Blocks are selected at configuration time.

CommBroker

Examples

Communication Interfaces

Each Port implements the following interfaces :

CommReceiverIF

bool recvData(const char* data, const unsigned int length)
bool recvData(const DataAbstract& data)
bool recvPullSignal()
bool recvPeekSignal()
CommSenderIF

bool sendData(const char* data, const unsigned int length)
bool sendData(const DataAbstract& data)
bool sendPullSignal()
bool sendPeekSignal()


Note: Interfaces will be enhanced in the future to support communication events such as connection, deconnection, buffer overflow, etc.


Configuring Port

Note : See Configuration Description Language for notation details.


# T port
   # KV type
   # KV name
   # KV connectionName
   # T  cs
   o Q  receiveCFBs
      * T cfb
   o Q  sendCFBs
      * T cfb
   o KV description
  • type can only takes 'Default' value for now.
  • name is a port identifier name that doesn't need to be unique.
  • connectionName is the name of the port interconnection (used by Application Manager).
  • cs is a Communication Strategy type. The configuration of this type depends on the CS to instanciate.
  • receiveCFBs is a list of CFB in port's receive data communication flow. CFBs will be instanciate in declaration order.
  • sendCFBs is a list of CFB in port's send communication data flow. CFBs will be instanciate in declaration order.
  • description port description.

See available Cascading Functional Blocks for cfb configuration details. See available Communication Stratgies for cs configuration details.

Personal tools
Resources on SourceForge