public class ExecutionContextProfile
extends java.lang.Object
Periodic Sampled Data Processing (for the execution cycles) ExecutionContext class
Modifier and Type | Field and Description |
---|---|
static double |
DEEFAULT_PERIOD |
Constructor and Description |
---|
ExecutionContextProfile() |
ExecutionContextProfile(ExecutionKind kind)
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
ReturnCode_t |
addComponent(LightweightRTObject comp)
Add an RT-component
|
RTObject[] |
getComponentList()
Getting participant RTC list
|
ExecutionKind |
getKind()
Get the ExecutionKind
|
java.lang.String |
getKindString() |
java.lang.String |
getKindString(ExecutionKind kind)
Converting ExecutionKind enum to string
|
ExecutionContextService |
getObjRef()
Get the reference to the CORBA object
|
RTObject |
getOwner()
Getting a reference of the owner component
|
TimeValue |
getPeriod() |
ExecutionContextProfile |
getProfile()
Getting Profile
|
Properties |
getProperties()
Setting Properties
|
double |
getRate()
Get execution rate(Hz) of ExecutionContext
|
void |
lock()
Getting a lock of RTC::ExecutionContextProfile
|
ReturnCode_t |
removeComponent(LightweightRTObject comp)
Remove the RT-Component from participant list
|
ReturnCode_t |
setKind(ExecutionKind kind)
Set the ExecutionKind
|
void |
setObjRef(ExecutionContextService ec_ptr)
Sets the reference to the CORBA object
|
ReturnCode_t |
setOwner(LightweightRTObject comp)
Setting owner component of the execution context
|
ReturnCode_t |
setPeriod(double period) |
ReturnCode_t |
setPeriod(TimeValue period) |
void |
setProperties(Properties props)
Setting Properties
|
ReturnCode_t |
setRate(double rate)
Set execution rate(Hz) of ExecutionContext
|
void |
unlock()
Release a lock of the RTC::ExecutionContextProfile
|
public static final double DEEFAULT_PERIOD
public ExecutionContextProfile(ExecutionKind kind)
Default Constructor Set the following items to profile. - kind : PERIODIC - rate : 0.0
public ExecutionContextProfile()
public void setObjRef(ExecutionContextService ec_ptr)
This operation sets a object reference to ExecutionContextService. After setting a new object reference, old reference is released. The object reference have to be valid reference.
ec_ptr
-
A CORBA object reference of ExecutionContextServicepublic ExecutionContextService getObjRef()
Get the reference to the CORBA object as ExecutioncontextService of this object.
public ReturnCode_t setRate(double rate)
This operation shall set the rate (in hertz) at which this context’s Active participating RTCs are being called. If the execution kind of the context is PERIODIC, a rate change shall result in the invocation of on_rate_changed on any RTCs realizing DataFlowComponentAction that are registered with any RTCs participating in the context.
rate
-
Execution cycle(Unit:Hz)public ReturnCode_t setPeriod(double period)
public ReturnCode_t setPeriod(TimeValue period)
public double getRate()
This operation shall return the rate (in hertz) at which its Active participating RTCs are being invoked.
public TimeValue getPeriod()
public final java.lang.String getKindString(ExecutionKind kind)
This function converts enumeration (PERIODIC, EVENT_DRIVEN, OTHER) defined in RTC::ExecutionKind to string.
kind
-
ExecutionKindpublic final java.lang.String getKindString()
public ReturnCode_t setKind(ExecutionKind kind)
This operation sets the kind of the execution context.
kind
-
ExecutionKindpublic ExecutionKind getKind()
This operation shall report the execution kind of the execution context.
public ReturnCode_t setOwner(LightweightRTObject comp)
This function sets an RT-Component to be owner of the execution context.
comp
-
an owner RT-Component of this execution contextpublic final RTObject getOwner()
This function returns a reference of the owner RT-Component of this execution context
public ReturnCode_t addComponent(LightweightRTObject comp)
The operation causes the given RTC to begin participating in the execution context. The newly added RTC will receive a call to LightweightRTComponent::attach_context and then enter the Inactive state. BAD_PARAMETER will be invoked, if the given RT-Component is null or if the given RT-Component is other than DataFlowComponent.
comp
-
The target RT-Component for addpublic ReturnCode_t removeComponent(LightweightRTObject comp)
This operation causes a participant RTC to stop participating in the execution context. The removed RTC will receive a call to LightweightRTComponent::detach_context. BAD_PARAMETER will be returned, if the given RT-Component is not participating in the participant list.
comp
-
The target RT-Component for deletepublic final RTObject[] getComponentList()
This function returns a list of participant RTC of the execution context. Since the function returns a reference to the member variable of component list, user have to lock by ExecutionContextProfile::lock() before using the list, and user also have to release the unlock by ExecutionContextProfile::unlock().
public void setProperties(Properties props)
This function sets ExecutionContextProfile::properties by Properties.
props
-
Properties to be set to ExecutionContextProfile::properties.public final Properties getProperties()
public ExecutionContextProfile getProfile()
This function gets RTC::ExecutionContextProfile. The ownership of the obtained ExecutionContextProfile is given to caller. The caller should release obtained object when it is unneccessary anymore.
public void lock()
This function locks RTC::ExecutionContextProfile in the object. The lock should be released when the lock is unneccessary.
public void unlock()
This function release the lock of RTC::ExecutionContextProfile in the object.