|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.go.aist.rtm.RTC.port.publisher.PublisherBase
jp.go.aist.rtm.RTC.port.publisher.PublisherNew
public class PublisherNew
データ送出タイミングを待つコンシューマを、送出する側とは異なるスレッドで動作させる場合に使用します。
Publisherの駆動は、データ送出のタイミングになるまでブロックされ、送出タイミングの通知を受けると、 即座にコンシューマの送出処理を呼び出します。
入れ子のクラスの概要 | |
---|---|
protected static class |
PublisherNew.Policy
|
フィールドの概要 | |
---|---|
protected Logbuf |
rtcout
|
コンストラクタの概要 | |
---|---|
PublisherNew()
Constructor |
メソッドの概要 | |
---|---|
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)
init |
protected ReturnCode |
invokeListener(ReturnCode status,
org.omg.CORBA.portable.OutputStream data)
|
boolean |
isActive()
write |
protected void |
onBufferFull(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onBufferRead(org.omg.CORBA.portable.OutputStream data)
|
protected void |
onBufferWriteOverwrite(org.omg.CORBA.portable.OutputStream data)
|
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 |
onSenderError()
Connector listener functions |
int |
open(java.lang.Object[] args)
当該Publisherの駆動を開始します。 |
static void |
PublisherNewInit()
PublisherNewInit |
protected ReturnCode |
pushAll()
pushAll |
protected ReturnCode |
pushFifo()
pushFifo |
protected ReturnCode |
pushNew()
pushNew |
protected ReturnCode |
pushSkip()
pushSkip |
void |
release()
駆動フラグがオフとなり、Publisherの駆動が停止します。 |
void |
run()
当該Publisherオブジェクトのスレッドコンテキストです。 送出タイミングが通知されるまでブロックします。 |
ReturnCode |
setBuffer(BufferBase<org.omg.CORBA.portable.OutputStream> buffer)
setBuffer |
ReturnCode |
setConsumer(InPortConsumer consumer)
setConsumer |
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)
Write data |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected Logbuf rtcout
コンストラクタの詳細 |
---|
public PublisherNew()
メソッドの詳細 |
---|
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 int open(java.lang.Object[] args)
当該Publisherの駆動を開始します。
args
- (本Publisherでは使用されません。)public void release()
駆動フラグがオフとなり、Publisherの駆動が停止します。
ただし、すでに駆動スレッドがブロックされている場合には、 最大1回のみコンシューマの送出処理が呼び出されることがあります。
PublisherBase
内の release
public void run()
当該Publisherオブジェクトのスレッドコンテキストです。 送出タイミングが通知されるまでブロックします。
java.lang.Runnable
内の run
public ReturnCode init(Properties prop)
init
initialization
PublisherBase
内の init
prop
-
protected void setPushPolicy(Properties prop)
Setting PushPolicy
prop
- Propertiesprotected boolean createTask(Properties prop)
Setting Task
prop
- Properties
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)
Setting buffer pointer
PublisherBase
内の setListener
public ReturnCode write(org.omg.CORBA.portable.OutputStream data, int sec, int usec)
This function writes data into the buffer associated with this Publisher. If a Publisher object calls this function, without initializing correctly such as a consumer, a buffer, listeners, etc., error code PRECONDITION_NOT_MET will be returned and no operation of the writing to a buffer etc. will be performed. Since writing into the buffer and sending data to InPort are performed asynchronously, occasionally this function returns return-codes such as CONNECTION_LOST and BUFFER_FULL that indicate the result of sending data to InPort. In this case, writing data into buffer will not be performed. When publisher writes data to the buffer, if the buffer is filled, returns error, is returned with timeout and returns precondition error, error codes BUFFER_FULL, BUFFER_ERROR, BUFFER_TIMEOUT and PRECONDITION_NOT_MET will be returned respectively. In other cases, PROT_ERROR will be returned.
PublisherBase
内の write
data
-
Data to be wrote to the buffersec
-
Timeout time in unit secondsusec
-
Timeout time in unit micor-seconds
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 destructionpublic static void PublisherNewInit()
PublisherNewInit
protected ReturnCode convertReturn(ReturnCode status, org.omg.CORBA.portable.OutputStream data)
convertReturn
protected ReturnCode invokeListener(ReturnCode status, org.omg.CORBA.portable.OutputStream data)
public java.lang.String getName()
getName
PublisherBase
内の getName
protected void onBufferFull(org.omg.CORBA.portable.OutputStream data)
protected void onBufferWriteTimeout(org.omg.CORBA.portable.OutputStream data)
protected void onBufferWriteOverwrite(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 onSenderError()
Connector listener functions
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |