📄 reconfig_sched_utils.cpp
字号:
}
tuple_iter.advance ();
}
return 0;
}
// Accessor for original RT_Info data.
TAO_RT_Info_Ex &
TAO_Reconfig_Scheduler_Entry::orig_rt_info_data ()
{
return orig_rt_info_data_;
}
// Mutator for stored original RT_Info data.
void
TAO_Reconfig_Scheduler_Entry::orig_rt_info_data (TAO_RT_Info_Ex &data)
{
// Only store the information that can be updated by the public interface at run-time.
this->orig_rt_info_data_.worst_case_execution_time = data.worst_case_execution_time;
this->orig_rt_info_data_.typical_execution_time = data.typical_execution_time;
this->orig_rt_info_data_.cached_execution_time = data.cached_execution_time;
this->orig_rt_info_data_.period = data.period;
this->orig_rt_info_data_.criticality = data.criticality;
this->orig_rt_info_data_.importance = data.importance;
this->orig_rt_info_data_.quantum = data.quantum;
this->orig_rt_info_data_.threads = data.threads;
this->orig_rt_info_data_.info_type = data.info_type;
this->orig_rt_info_data_.enabled = data.enabled;
}
// Accessor for actual RT_Info pointer.
TAO_RT_Info_Ex *
TAO_Reconfig_Scheduler_Entry::
actual_rt_info ()
{
return this->actual_rt_info_;
}
// Mutator for actual RT_Info pointer.
void
TAO_Reconfig_Scheduler_Entry::
actual_rt_info (TAO_RT_Info_Ex *rt_info)
{
this->actual_rt_info_ = rt_info;
}
// Accessor for when the node was discovered in forward DFS traversal.
long
TAO_Reconfig_Scheduler_Entry::
fwd_discovered () const
{
return this->fwd_discovered_;
}
// Mutator for when the node was discovered in forward DFS traversal.
void
TAO_Reconfig_Scheduler_Entry::
fwd_discovered (long l)
{
this->fwd_discovered_ = l;
}
// Accessor for when the node was discovered in reverse DFS traversal.
long
TAO_Reconfig_Scheduler_Entry::
rev_discovered () const
{
return this->rev_discovered_;
}
// Mutator for when the node was discovered in reverse DFS traversal.
void
TAO_Reconfig_Scheduler_Entry::
rev_discovered (long l)
{
this->rev_discovered_ = l;
}
// Accessor for when the node was finished in forward DFS traversal.
long
TAO_Reconfig_Scheduler_Entry::
fwd_finished () const
{
return this->fwd_finished_;
}
// Mutator for when the node was finished in forward DFS traversal.
void
TAO_Reconfig_Scheduler_Entry::
fwd_finished (long l)
{
this->fwd_finished_ = l;
}
// Accessor for when the node was finished in reverse DFS traversal.
long
TAO_Reconfig_Scheduler_Entry::
rev_finished () const
{
return this->rev_finished_;
}
// Mutator for when the node was finished in reverse DFS traversal.
void
TAO_Reconfig_Scheduler_Entry::
rev_finished (long l)
{
this->rev_finished_ = l;
}
// Accessor for forward DFS traversal status of the node.
TAO_Reconfig_Scheduler_Entry::DFS_Status
TAO_Reconfig_Scheduler_Entry::
fwd_dfs_status () const
{
return this->fwd_dfs_status_;
}
// Mutator for forward DFS traversal status of the node.
void
TAO_Reconfig_Scheduler_Entry::
fwd_dfs_status (TAO_Reconfig_Scheduler_Entry::DFS_Status ds)
{
this->fwd_dfs_status_ = ds;
}
// Accessor for DFS traversal status of the node.
TAO_Reconfig_Scheduler_Entry::DFS_Status
TAO_Reconfig_Scheduler_Entry::
rev_dfs_status () const
{
return this->rev_dfs_status_;
}
// Mutator for DFS traversal status of the node.
void
TAO_Reconfig_Scheduler_Entry::
rev_dfs_status (TAO_Reconfig_Scheduler_Entry::DFS_Status ds)
{
this->rev_dfs_status_ = ds;
}
// Accessor for flag indicating whether node is a thread
// delineator.
int
TAO_Reconfig_Scheduler_Entry::
is_thread_delineator () const
{
return this->is_thread_delineator_;
}
// Mutator for flag indicating whether node is a thread
// delineator.
void
TAO_Reconfig_Scheduler_Entry::
is_thread_delineator (int i)
{
this->is_thread_delineator_ = i;
}
// Accessor for flag indicating whether node has unresolved remote
// dependencies.
int
TAO_Reconfig_Scheduler_Entry::
has_unresolved_remote_dependencies () const
{
return this->has_unresolved_remote_dependencies_;
}
// Mutator for flag indicating whether node has unresolved remote
// dependencies.
void
TAO_Reconfig_Scheduler_Entry::
has_unresolved_remote_dependencies (int i)
{
this->has_unresolved_remote_dependencies_ = i;
}
// Accessor for flag indicating whether node has unresolved local
// dependencies.
int
TAO_Reconfig_Scheduler_Entry::
has_unresolved_local_dependencies () const
{
return this->has_unresolved_local_dependencies_;
}
// Mutator for flag indicating whether node has unresolved local
// dependencies.
void
TAO_Reconfig_Scheduler_Entry::
has_unresolved_local_dependencies (int i)
{
this->has_unresolved_local_dependencies_ = i;
}
/* WSOA merge - commented out
// Accessor for effective period of corresponding RT_Info.
RtecScheduler::Period_t
TAO_Reconfig_Scheduler_Entry::
effective_period ()
{
return this->effective_period_;
}
// Mutator for effective period of corresponding RT_Info.
void
TAO_Reconfig_Scheduler_Entry::
effective_period (RtecScheduler::Period_t p)
{
this->effective_period_ = p;
}
// Accessor for effective execution time of corresponding RT_Info.
CORBA::Long
TAO_Reconfig_Scheduler_Entry::
effective_exec_multiplier ()
{
return this->effective_exec_multiplier_;
}
// Mutator for effective execution time of corresponding RT_Info.
void
TAO_Reconfig_Scheduler_Entry::
effective_exec_multiplier (CORBA::Long l)
{
this->effective_exec_multiplier_ = l;
}
*/
///////////////////////////
// TAO_RSE_Reset_Visitor //
///////////////////////////
// Constructor.
TAO_RSE_Reset_Visitor::TAO_RSE_Reset_Visitor ()
{
}
// Resets the fields in the entry to pre-DFS traversal states.
// Returns 0 on success and -1 on error.
int
TAO_RSE_Reset_Visitor::visit (TAO_Reconfig_Scheduler_Entry &rse)
{
// Note that this value differs from what is set in the
// constructor for the entry. This is because the reset
// visitor is applied prior to a DFS traversal, in which callers
// *unset* the thread delineator status of any of their called
// operations that do not specify a period or threads.
if (rse.actual_rt_info ()->enabled != RtecScheduler::RT_INFO_NON_VOLATILE)
{
rse.is_thread_delineator (1);
// Only reset the period for entries that are not root nodes. Added by BRM.
if (rse.actual_rt_info ()->threads == 0)
{
rse.actual_rt_info ()->period = 0;
}
}
// Remove the propagated tuples in the entry.
rse.remove_tuples (TAO_Reconfig_Scheduler_Entry::PROPAGATED);
rse.fwd_dfs_status (TAO_Reconfig_Scheduler_Entry::NOT_VISITED);
rse.rev_dfs_status (TAO_Reconfig_Scheduler_Entry::NOT_VISITED);
rse.fwd_discovered (-1);
rse.rev_discovered (-1);
rse.fwd_finished (-1);
rse.rev_finished (-1);
rse.has_unresolved_remote_dependencies (0);
rse.has_unresolved_local_dependencies (0);
rse.aggregate_exec_time (rse.actual_rt_info ()->worst_case_execution_time);
rse.current_admitted_tuple (0);
//WSOA merge - commented out
// These settings are used for a conservative but
// efficient approach to estimating utilization:
// for an exact algorithm using frame merging,
// other initial settings might be needed.
//rse.effective_exec_multiplier (0);
//rse.effective_period (0);
return 0;
}
// Accessor for effective execution time of corresponding RT_Info.
RtecScheduler::Time
TAO_Reconfig_Scheduler_Entry::
aggregate_exec_time ()
{
return this->aggregate_exec_time_;
}
// Mutator for effective execution time of corresponding RT_Info.
void
TAO_Reconfig_Scheduler_Entry::
aggregate_exec_time (RtecScheduler::Time t)
{
this->aggregate_exec_time_ = t;
}
// Accessor for the sum of periods for tuples directly associated
// with the entry.
RtecScheduler::Period_t
TAO_Reconfig_Scheduler_Entry::
orig_tuple_period_sum ()
{
return orig_tuple_period_sum_;
}
// Mutator for the sum of periods for tuples directly associated
// with the entry.
void
TAO_Reconfig_Scheduler_Entry::
orig_tuple_period_sum (RtecScheduler::Period_t p)
{
orig_tuple_period_sum_ = p;
}
// Accessor for the sum of periods for tuples propagated via
// dependencies on other entries.
RtecScheduler::Period_t
TAO_Reconfig_Scheduler_Entry::
prop_tuple_period_sum ()
{
return prop_tuple_period_sum_;
}
// Mutator for the sum of periods for tuples propagated via
// dependencies on other entries.
void
TAO_Reconfig_Scheduler_Entry::
prop_tuple_period_sum (RtecScheduler::Period_t p)
{
prop_tuple_period_sum_ = p;
}
// Accessor for the number of tuples directly associated with the
// entry.
u_int
TAO_Reconfig_Scheduler_Entry::
orig_tuple_count ()
{
return orig_tuple_count_;
}
// Mutator for the number of tuples directly associated with the
// entry.
void
TAO_Reconfig_Scheduler_Entry::
orig_tuple_count (u_int c)
{
orig_tuple_count_ = c;
}
// Accessor for the number of tuples propagated via dependencies on
// other entries.
u_int
TAO_Reconfig_Scheduler_Entry::
prop_tuple_count ()
{
return prop_tuple_count_;
}
// Mutator for the number of tuples propagated via dependencies on
// other entries.
void
TAO_Reconfig_Scheduler_Entry::
prop_tuple_count (u_int c)
{
prop_tuple_count_ = c;
}
// Accessor for the set of tuples directly associated with the
// entry.
TUPLE_SET &
TAO_Reconfig_Scheduler_Entry::
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -