|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.go.aist.rtm.RTC.port.publisher.PublisherBase
jp.go.aist.rtm.RTC.port.publisher.PublisherPeriodic
public class PublisherPeriodic
一定時間おきにコンシューマの送出処理を呼び出すPublisherです。
入れ子のクラスの概要 | |
---|---|
protected static class |
PublisherPeriodic.Policy
|
フィールドの概要 | |
---|---|
protected Logbuf |
rtcout
|
コンストラクタの概要 | |
---|---|
PublisherPeriodic()
コンストラクタ |
メソッドの概要 | |
---|---|
ReturnCode |
activate()
activate |
protected ReturnCode |
convertReturn(ReturnCode status,
org.omg.CORBA.portable.OutputStream data)
convertReturn |
protected boolean |
createTask(Properties prop)
Setting Task |
PublisherBase |
creator_()
creator_ |
ReturnCode |
deactivate()
deactivate |
void |
destructor_(java.lang.Object obj)
destructor_ |
java.lang.String |
getName()
getName |
ReturnCode |
init(Properties prop)
初期化 {@.ja このクラスのオブジェクトを使用するのに先立ち、必ずこの関数を呼び 出す必要がある。 |
protected ReturnCode |
invokeListener(ReturnCode status,
org.omg.CORBA.portable.OutputStream data)
|
boolean |
isActive()
write |
protected void |
onBufferEmpty()
Connector listener functions |
protected void |
onBufferFull(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onBufferRead(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onBufferWrite(org.omg.CORBA.portable.OutputStream data)
Connector data listener functions |
protected void |
onBufferWriteTimeout(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onReceived(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onReceiverError(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onReceiverFull(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onReceiverTimeout(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onSend(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onSenderEmpty()
|
protected void |
onSenderError()
|
int |
open()
当該Publisherの駆動を開始します。 |
static void |
PublisherPeriodicInit()
PublisherPeriodicInit |
protected ReturnCode |
pushAll()
pushAll push all policy |
protected ReturnCode |
pushFifo()
pushFifo push "fifo" policy |
protected ReturnCode |
pushNew()
pushNew push "new" policy |
protected ReturnCode |
pushSkip()
pushSkip push "skip" policy |
void |
release()
駆動フラグがオフとなり、Publisherの駆動が停止します。 |
void |
run()
当該Publisherを駆動するスレッドコンテキストです。 |
ReturnCode |
setBuffer(BufferBase<org.omg.CORBA.portable.OutputStream> buffer)
setBuffer Setting buffer |
ReturnCode |
setConsumer(InPortConsumer consumer)
setConsumer Store InPort consumer |
ReturnCode |
setListener(ConnectorBase.ConnectorInfo info,
ConnectorListeners listeners)
Setting buffer pointer |
protected void |
setPushPolicy(Properties prop)
Setting PushPolicy |
int |
svc()
当該Publisherを駆動するスレッドコンテキストです。 |
void |
update()
本Publisher実装では、何も行いません。 |
ReturnCode |
write(org.omg.CORBA.portable.OutputStream data)
|
ReturnCode |
write(org.omg.CORBA.portable.OutputStream data,
int sec,
int usec)
データを書き込む {@.ja Publisher が保持するバッファに対してデータを書き込む。 |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected Logbuf rtcout
コンストラクタの詳細 |
---|
public PublisherPeriodic()
メソッドの詳細 |
---|
public void update()
本Publisher実装では、何も行いません。
public int svc()
当該Publisherを駆動するスレッドコンテキストです。コンシューマの送出処理が呼び出されます。
protected ReturnCode pushAll()
pushAll
push all policy
protected ReturnCode pushFifo()
pushFifo
push "fifo" policy
protected ReturnCode pushSkip()
pushSkip
push "skip" policy
protected ReturnCode pushNew()
pushNew
push "new" policy
public void run()
当該Publisherを駆動するスレッドコンテキストです。コンシューマの送出処理が呼び出されます。
java.lang.Runnable
内の run
public int open()
当該Publisherの駆動を開始します。
public void release()
駆動フラグがオフとなり、Publisherの駆動が停止します。
ただし、最大1回のみコンシューマの送出処理が呼び出されることがあります。
PublisherBase
内の release
public ReturnCode init(Properties prop)
このクラスのオブジェクトを使用するのに先立ち、必ずこの関数を呼び 出す必要がある。引数には、このオブジェクトの各種設定情報を含む Properties を与える。少なくとも、送出処理の呼び出し周期を単位 Hz の数値として Propertyオブジェクトの publisher.push_rate をキー とする要素に設定する必要がある。周期 5ms すなわち、200Hzの場合、 200.0 を設定する。 dataport.publisher.push_rate が未設定の場合、 false が返される。データをプッシュする際のポリシーとして publisher.push_policy をキーとする値に、all, fifo, skip, new の いずれかを与えることができる。 以下のオプションを与えることができる。
PublisherBase
内の init
prop
- 本Publisherの駆動制御情報を設定したPropertyオブジェクト
protected void setPushPolicy(Properties prop)
Setting PushPolicy
protected boolean createTask(Properties prop)
Setting Task
public ReturnCode setConsumer(InPortConsumer consumer)
setConsumer
Store InPort consumer
PublisherBase
内の setConsumer
consumer
-
public ReturnCode setBuffer(BufferBase<org.omg.CORBA.portable.OutputStream> buffer)
setBuffer
Setting buffer
PublisherBase
内の setBuffer
buffer
-
public ReturnCode setListener(ConnectorBase.ConnectorInfo info, ConnectorListeners listeners)
PublisherBase
内の setListener
public ReturnCode write(org.omg.CORBA.portable.OutputStream data, int sec, int usec)
Publisher が保持するバッファに対してデータを書き込む。コンシュー マ、バッファ、リスナ等が適切に設定されていない等、Publisher オブ ジェクトが正しく初期化されていない場合、この関数を呼び出すとエラー コード PRECONDITION_NOT_MET が返され、バッファへの書き込み等の操 作は一切行われない。 バッファへの書き込みと、InPortへのデータの送信は非同期的に行われ るため、この関数は、InPortへのデータ送信の結果を示す、 CONNECTION_LOST, BUFFER_FULL などのリターンコードを返すことがあ る。この場合、データのバッファへの書き込みは行われない。 バッファへの書き込みに対して、バッファがフル状態、バッファのエ ラー、バッファへの書き込みがタイムアウトした場合、バッファの事前 条件が満たされない場合にはそれぞれ、エラーコード BUFFER_FULL, BUFFER_ERROR, BUFFER_TIMEOUT, PRECONDITION_NOT_MET が返される。 これら以外のエラーの場合、PORT_ERROR が返される。
PublisherBase
内の write
data
- 書き込むデータ
sec
- タイムアウト時間
usec
- タイムアウト時間
public ReturnCode write(org.omg.CORBA.portable.OutputStream data)
PublisherBase
内の write
public boolean isActive()
write
PublisherBase
内の isActive
public ReturnCode activate()
activate
PublisherBase
内の activate
public ReturnCode deactivate()
deactivate
PublisherBase
内の deactivate
public PublisherBase creator_()
creator_
ObjectCreator<PublisherBase>
内の creator_
public void destructor_(java.lang.Object obj)
destructor_
ObjectDestructor
内の destructor_
obj
- The target instances for destructionprotected ReturnCode convertReturn(ReturnCode status, org.omg.CORBA.portable.OutputStream data)
convertReturn
protected ReturnCode invokeListener(ReturnCode status, org.omg.CORBA.portable.OutputStream data)
public static void PublisherPeriodicInit()
PublisherPeriodicInit
public java.lang.String getName()
getName
PublisherBase
内の getName
protected void onBufferWrite(org.omg.CORBA.portable.OutputStream data)
Connector data listener functions
protected void onBufferFull(org.omg.CORBA.portable.OutputStream data)
protected void onBufferWriteTimeout(org.omg.CORBA.portable.OutputStream data)
protected void onBufferRead(org.omg.CORBA.portable.OutputStream data)
protected void onSend(org.omg.CORBA.portable.OutputStream data)
protected void onReceived(org.omg.CORBA.portable.OutputStream data)
protected void onReceiverFull(org.omg.CORBA.portable.OutputStream data)
protected void onReceiverTimeout(org.omg.CORBA.portable.OutputStream data)
protected void onReceiverError(org.omg.CORBA.portable.OutputStream data)
protected void onBufferEmpty()
Connector listener functions
protected void onSenderEmpty()
protected void onSenderError()
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |