Project

General

Profile

Actions

機能 #4650

open

CSPポートを実装する

Added by n-ando almost 6 years ago. Updated almost 6 years ago.

Status:
新規
Priority:
通常
Assignee:
-
Target version:
-
Start date:
01/08/2019
Due date:
% Done:

0%

Estimated time:

Description

CSPのチャネルを疑似的に実現するポートを実装する。


Files

CSPPort.idl (1.66 KB) CSPPort.idl n-ando, 01/08/2019 10:05 PM
CSP実装-20160830.pptx (778 KB) CSP実装-20160830.pptx n-ando, 01/08/2019 10:05 PM
CSP実装-20161107(OpenRTM).pptx (105 KB) CSP実装-20161107(OpenRTM).pptx n-ando, 01/08/2019 10:06 PM
Actions #1

Updated by n-ando almost 6 years ago

#ifndef CSPPORT_IDL
#define CSPPORT_IDL

#pragma prefix "openrtm.aist.go.jp" 
/*!
 * @brief CSP (Communicating Sequential Processes) channel port
 *
 * Communicating Sequential Processes (CSP) is a formal language for
 * describing patterns of interaction in concurrent systems. CSP uses
 * explicit channels for message passing, whereas actor systems
 * transmit messages to named destination actors. These approaches may
 * be considered duals of each other, in the sense that processes
 * receiving through a single channel effectively have an identity
 * corresponding to that channel, while the name-based coupling
 * between actors may be broken by constructing actors that behave as
 * channels.
 * (from https://en.wikipedia.org/wiki/Communicating_sequential_processes)
 *
 * http://arild.github.io/csp-presentation
 * https://qiita.com/ymgyt/items/420eaf2bcf7bee4ae152
 * 

 * This interface definition realizes CSP channel as an RTC port.
 *
 * CSPチャネル
 * - 同期型メッセージパッシング
 *   - 確実に伝達(受信側が受信できるまで待つ)
 * - 通信可能な相手を自動的に選択して通信可能
 *   - 受信可能なプロセスを選択して送信する(全てが受信不可のときは、ひと
 *     つが受信可能になるまで送信を延期)
 * - 通信可能なチャネルを自動的に選択(外部選択)して通信可能
 *   - 受信可能なプロセスが接続されているチャネルを選択して送信する
 *
 */
module CSP
{
  typedef sequence<octet> CdrData;

  interface InPortCsp
  {
    PortStatus put(in CdrData data);
    bool is_writable();
    void notify();
  };

  interface OutPortCsp
  {
    PortStatus get(out CdrData data);
    bool is_readable();
    void notify();
  };
};

#endif // CSPPORT_IDL
Actions

Also available in: Atom PDF