AERA
|
#include <mem.h>
Public Types | |
enum | State { NOT_STARTED = 0, RUNNING = 1, STOPPED = 2 } |
enum | STDGroupID { STDIN = 0, STDOUT = 1 } |
Public Member Functions | |
void | init (std::chrono::microseconds base_period, uint32 reduction_core_count, uint32 time_core_count, float32 mdl_inertia_sr_thr, uint32 mdl_inertia_cnt_thr, float32 tpx_dsr_thr, std::chrono::microseconds min_sim_time_horizon, std::chrono::microseconds max_sim_time_horizon, float32 sim_time_horizon_factor, std::chrono::microseconds tpx_time_horizon, std::chrono::microseconds perf_sampling_period, float32 float_tolerance, std::chrono::microseconds time_tolerance, std::chrono::microseconds primary_thz, std::chrono::microseconds secondary_thz, bool debug, uint32 ntf_mk_res, uint32 goal_pred_success_res, uint32 probe_level, uint32 traces, bool keep_invalidated_objects) |
State | get_state () const |
std::chrono::microseconds | get_sampling_period () const |
uint64 | get_probe_level () const |
uint32 | get_reduction_core_count () const |
uint32 | get_time_core_count () const |
float32 | get_mdl_inertia_sr_thr () const |
uint32 | get_mdl_inertia_cnt_thr () const |
float32 | get_tpx_dsr_thr () const |
std::chrono::microseconds | get_min_sim_time_horizon () const |
std::chrono::microseconds | get_max_sim_time_horizon () const |
std::chrono::microseconds | get_sim_time_horizon (std::chrono::microseconds horizon) const |
std::chrono::microseconds | get_tpx_time_horizon () const |
std::chrono::microseconds | get_primary_thz () const |
std::chrono::microseconds | get_secondary_thz () const |
bool | get_debug () const |
uint32 | get_ntf_mk_res () const |
uint32 | get_goal_pred_success_res (Group *host, Timestamp now, Timestamp::duration time_to_live) const |
r_code::Code * | get_root () const |
r_code::Code * | get_stdin () const |
r_code::Code * | get_stdout () const |
r_code::Code * | get_self () const |
State | check_state () |
void | start_core () |
void | shutdown_core () |
virtual bool | load (const std::vector< r_code::Code * > *objects, uint32 stdin_oid, uint32 stdout_oid, uint32 self_oid) |
Timestamp | start () |
void | run_in_diagnostic_time (std::chrono::milliseconds run_time) |
virtual void | on_diagnostic_time_tick () |
void | stop () |
P< _ReductionJob > | pop_reduction_job (bool waitForItem=true) |
void | push_reduction_job (_ReductionJob *j) |
P< TimeJob > | pop_time_job (bool waitForItem=true) |
void | push_time_job (TimeJob *j) |
void | inject_from_io_device (View *view) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, Atom val, Timestamp after, Timestamp before, View::SyncMode sync_mode, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, std::vector< Atom > val, Timestamp after, Timestamp before, View::SyncMode sync_mode, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, Atom val, Timestamp after, Timestamp before, View::SyncMode sync_mode) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, Atom val, Timestamp after, Timestamp before, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, Atom val, Timestamp after, Timestamp before) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, r_code::Code *val, Timestamp after, Timestamp before, View::SyncMode sync_mode, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, r_code::Code *val, Timestamp after, Timestamp before, View::SyncMode sync_mode) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, r_code::Code *val, Timestamp after, Timestamp before, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, r_code::Code *val, Timestamp after, Timestamp before) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, const std::string &val, Timestamp after, Timestamp before, View::SyncMode sync_mode, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, const std::string &val, Timestamp after, Timestamp before, View::SyncMode sync_mode) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, const std::string &val, Timestamp after, Timestamp before, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, const std::string &val, Timestamp after, Timestamp before) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, const std::vector< r_code::Code * > &val, Timestamp after, Timestamp before, View::SyncMode sync_mode, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, const std::vector< r_code::Code * > &val, Timestamp after, Timestamp before, View::SyncMode sync_mode) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, const std::vector< r_code::Code * > &val, Timestamp after, Timestamp before, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, const std::vector< r_code::Code * > &val, Timestamp after, Timestamp before) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, uint16 opcode, const std::vector< r_code::Atom > &vals, Timestamp after, Timestamp before, View::SyncMode sync_mode, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, uint16 opcode, const std::vector< r_code::Atom > &vals, Timestamp after, Timestamp before, View::SyncMode sync_mode) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, uint16 opcode, const std::vector< r_code::Atom > &vals, Timestamp after, Timestamp before, r_code::Code *group) |
View * | inject_marker_value_from_io_device (r_code::Code *obj, r_code::Code *prop, uint16 opcode, const std::vector< r_code::Atom > &vals, Timestamp after, Timestamp before) |
View * | inject_fact_from_io_device (r_code::Code *object, Timestamp after, Timestamp before, View::SyncMode sync_mode, r_code::Code *group) |
View * | inject_fact_from_io_device (r_code::Code *object, Timestamp after, Timestamp before, r_code::Code *group) |
void | inject (View *view, bool is_from_io_device=false) |
void | inject_async (View *view) |
void | inject_new_object (View *view) |
void | inject_existing_object (View *view, r_code::Code *object, Group *host) |
void | inject_null_program (Controller *c, Group *group, std::chrono::microseconds time_to_live, bool take_past_inputs) |
void | inject_hlps (std::vector< View * > views, Group *destination) |
void | inject_notification (View *view, bool lock) |
virtual r_code::Code * | check_existence (r_code::Code *object)=0 |
void | propagate_sln (r_code::Code *object, float32 change, float32 source_sln_thr) |
void | inject_copy (View *view, Group *destination) |
void | register_reduction_job_latency (std::chrono::microseconds latency) |
void | register_time_job_latency (std::chrono::microseconds latency) |
void | inject_perf_stats () |
virtual void | eject (View *view, uint16 node_id) |
virtual r_code::Code * | eject (r_code::Code *command) |
virtual r_code::Code * | _build_object (Atom head) const =0 |
virtual r_code::Code * | build_object (Atom head) const =0 |
void | pack_hlp (r_code::Code *hlp) const |
r_code::Code * | clone (r_code::Code *original) const |
virtual r_comp::Image * | get_objects (bool include_invalidated=false)=0 |
r_comp::Image * | get_models () |
bool | matches_axiom (r_code::Code *obj) |
void | set_default_runtime_output_stream (std::ostream *default_runtime_output_stream) |
![]() | |
virtual Code * | build_object (SysObject *source) const =0 |
virtual void | delete_object (Code *object)=0 |
Static Public Member Functions | |
static _Mem * | Get () |
static Timestamp | get_diagnostic_time_now () |
static void | unpack_hlp (r_code::Code *hlp) |
static r_code::Code * | unpack_fact (r_code::Code *hlp, uint16 fact_index) |
static r_code::Code * | unpack_fact_object (r_code::Code *hlp, uint16 fact_object_index) |
static void | pack_fact (r_code::Code *fact, r_code::Code *hlp, uint16 &write_index, std::vector< P< r_code::Code > > *references) |
static void | pack_fact_object (r_code::Code *fact_object, r_code::Code *hlp, uint16 &write_index, std::vector< P< r_code::Code > > *references) |
static r_code::Code * | find_object (const std::vector< r_code::Code * > *objects, const char *name) |
static void | init_timestamps (Timestamp time_reference, const r_code::list< P< r_code::Code >> &objects) |
static std::ostream & | Output (TraceLevel l) |
![]() | |
static Mem * | Get () |
Static Public Attributes | |
static Timestamp | diagnostic_time_now_ = Timestamp(microseconds(1)) |
Protected Member Functions | |
void | reset () |
void | store (r_code::Code *object) |
virtual void | set_last_oid (int32 oid)=0 |
virtual void | bind (View *view)=0 |
Static Protected Member Functions | |
static void | _unpack_code (r_code::Code *hlp, uint16 fact_object_index, r_code::Code *fact_object, uint16 read_index) |
Protected Attributes | |
std::chrono::microseconds | base_period_ |
uint32 | reduction_core_count_ |
uint32 | time_core_count_ |
float32 | mdl_inertia_sr_thr_ |
uint32 | mdl_inertia_cnt_thr_ |
float32 | tpx_dsr_thr_ |
std::chrono::microseconds | min_sim_time_horizon_ |
std::chrono::microseconds | max_sim_time_horizon_ |
float32 | sim_time_horizon_factor_ |
std::chrono::microseconds | tpx_time_horizon_ |
std::chrono::microseconds | perf_sampling_period_ |
float32 | float_tolerance_ |
std::chrono::microseconds | time_tolerance_ |
std::chrono::microseconds | primary_thz_ |
std::chrono::microseconds | secondary_thz_ |
bool | debug_ |
uint32 | ntf_mk_res_ |
uint32 | goal_pred_success_res_ |
bool | keep_invalidated_objects_ |
uint32 | probe_level_ |
PipeNN< P< _ReductionJob >, 1024 > * | reduction_job_queue_ |
PipeNN< P< TimeJob >, 1024 > * | time_job_queue_ |
ReductionCore ** | reduction_cores_ |
TimeCore ** | time_cores_ |
uint32 | reduction_job_count_ |
std::chrono::microseconds | reduction_job_avg_latency_ |
std::chrono::microseconds | _reduction_job_avg_latency_ |
uint32 | time_job_count_ |
std::chrono::microseconds | time_job_avg_latency_ |
std::chrono::microseconds | _time_job_avg_latency_ |
CriticalSection | time_jobCS_ |
CriticalSection | reduction_jobCS_ |
uint32 | core_count_ |
CriticalSection | core_countCS_ |
State | state_ |
CriticalSection | stateCS_ |
Semaphore * | stop_sem_ |
r_code::list< P< r_code::Code > > | objects_ |
P< Group > | root_ |
r_code::Code * | stdin_ |
r_code::Code * | stdout_ |
r_code::Code * | self_ |
std::vector< Group * > | initial_groups_ |
bool | deleted_ |
std::ostream * | runtime_output_streams_ [RUNTIME_OUTPUT_STREAM_COUNT] |
std::ostream * | default_runtime_output_stream_ |
std::vector< P< r_code::Code > > | axiom_values_ |
Static Protected Attributes | |
static const uint32 | RUNTIME_OUTPUT_STREAM_COUNT = 10 |
![]() | |
static Mem * | singleton_ = NULL |
The rMem. Maintains 2 pipes of jobs (injection, update, etc.). each job is processed asynchronously by instances of ReductionCore and TimeCore. Pipes and threads are created at starting time and deleted at stopping time. Groups and IPGMControllers are cleared up when only held by jobs;
|
virtual |
This is called by the program controller to eject a command from rMem to the I/O device. This method should be redefined by object transport-aware subclasses.
command | The command from the Replicode (cmd ...). |
|
static |
|
inline |
|
static |
This is called on starting the executive to adjust all user-defined objects by adding time_reference to any time stamp (fact timings as well as other time stamps). Therefore, if the object is defined with a time stamp of 100ms, it is changed to time_reference + 100ms.
time_reference | The value to add to the time stamps of all objects. |
objects | The list of objects to search for time stamps. |
void r_exec::_Mem::inject | ( | View * | view, |
bool | is_from_io_device = false |
||
) |
Call bind which assigns an OID to the view's object and inject the view. However, if the view's injection time is later than now, then create an InjectionJob which will call bind and inject the view at the injection time.
view | The View to inject. |
is_from_io_device | True if this is called from inject_from_io_device(). This is only needed to pass to the InjectionJob so that it will log the I/O device inject. |
|
inline |
Inject (fact object after before 1 1) [SYNC_PERIODIC after 1 1 group nil] This is called from the I/O device to call the normal inject(view), then log the injection event.
object | The fact's object, which you must allocated and construct. (For mk.val, use one of the methods for injectMarkerValue...) |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
group | The group of the view, such as get_stdin(). |
View * r_exec::_Mem::inject_fact_from_io_device | ( | r_code::Code * | object, |
Timestamp | after, | ||
Timestamp | before, | ||
View::SyncMode | sync_mode, | ||
r_code::Code * | group | ||
) |
Inject (fact object after before 1 1) [sync_mode after 1 1 group nil] This is called from the I/O device to call the normal inject(view), then log the injection event.
object | The fact's object, which you must allocated and construct. (For mk.val, use one of the methods for injectMarkerValue...) |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
group | The group of the view, such as get_stdin(). |
void r_exec::_Mem::inject_from_io_device | ( | View * | view | ) |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [SYNC_PERIODIC after 1 1 stdin nil] where val is a simple Atom. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The Atom value for the mk.val, such as Atom::Float(1). |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [SYNC_PERIODIC after 1 1 group nil] where val is a simple Atom. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The Atom value for the mk.val, such as Atom::Float(1). |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [sync_mode after 1 1 stdin nil] where val is a simple Atom. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The Atom value for the mk.val, such as Atom::Float(1). |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
View * r_exec::_Mem::inject_marker_value_from_io_device | ( | r_code::Code * | obj, |
r_code::Code * | prop, | ||
Atom | val, | ||
Timestamp | after, | ||
Timestamp | before, | ||
View::SyncMode | sync_mode, | ||
r_code::Code * | group | ||
) |
Inject (fact (mk.val obj prop val 1) after before 1 1) [sync_mode after 1 1 group nil] where val is a simple Atom. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The Atom value for the mk.val, such as Atom::Float(1). |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [SYNC_PERIODIC after 1 1 stdin nil] where val is a string object. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is a string object. This will add it to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [SYNC_PERIODIC after 1 1 group nil] where val is a string object. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is a string object. This will add it to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [sync_mode after 1 1 stdin nil] where val is a string object. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is a string object. This will add it to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
View * r_exec::_Mem::inject_marker_value_from_io_device | ( | r_code::Code * | obj, |
r_code::Code * | prop, | ||
const std::string & | val, | ||
Timestamp | after, | ||
Timestamp | before, | ||
View::SyncMode | sync_mode, | ||
r_code::Code * | group | ||
) |
Inject (fact (mk.val obj prop val 1) after before 1 1) [sync_mode after 1 1 group nil] where val is a string object. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is a string object. This will add it to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop [o1 o2] 1) after before 1 1) [SYNC_PERIODIC after 1 1 stdin nil] where val is a set of referenced Code objects. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is set of existing Code object, possibly empty. This will add the objects to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
|
inline |
Inject (fact (mk.val obj prop [o1 o2] 1) after before 1 1) [SYNC_PERIODIC after 1 1 group nil] where val is a set of referenced Code objects. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is set of existing Code object, possibly empty. This will add the objects to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop [o1 o2] 1) after before 1 1) [sync_mode after 1 1 stdin nil] where val is a set of referenced Code objects. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is set of existing Code object, possibly empty. This will add the objects to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
View* r_exec::_Mem::inject_marker_value_from_io_device | ( | r_code::Code * | obj, |
r_code::Code * | prop, | ||
const std::vector< r_code::Code * > & | val, | ||
Timestamp | after, | ||
Timestamp | before, | ||
View::SyncMode | sync_mode, | ||
r_code::Code * | group | ||
) |
Inject (fact (mk.val obj prop [o1 o2] 1) after before 1 1) [sync_mode after 1 1 group nil] where val is a set of referenced Code objects. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is set of existing Code object, possibly empty. This will add the objects to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [SYNC_PERIODIC after 1 1 stdin nil] where val is a referenced Code object. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is an existing Code object. This will add it to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [SYNC_PERIODIC after 1 1 group nil] where val is a referenced Code object. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is an existing Code object. This will add it to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop val 1) after before 1 1) [sync_mode after 1 1 stdin nil] where val is a referenced Code object. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is an existing Code object. This will add it to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
View * r_exec::_Mem::inject_marker_value_from_io_device | ( | r_code::Code * | obj, |
r_code::Code * | prop, | ||
r_code::Code * | val, | ||
Timestamp | after, | ||
Timestamp | before, | ||
View::SyncMode | sync_mode, | ||
r_code::Code * | group | ||
) |
Inject (fact (mk.val obj prop val 1) after before 1 1) [sync_mode after 1 1 group nil] where val is a referenced Code object. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The value for the mk.val, which is an existing Code object. This will add it to the references of the mkval. |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
group | The group of the view, such as get_stdin(). |
View * r_exec::_Mem::inject_marker_value_from_io_device | ( | r_code::Code * | obj, |
r_code::Code * | prop, | ||
std::vector< Atom > | val, | ||
Timestamp | after, | ||
Timestamp | before, | ||
View::SyncMode | sync_mode, | ||
r_code::Code * | group | ||
) |
Inject (fact (mk.val obj prop val 1) after before 1 1) [sync_mode after 1 1 group nil] where val is a set of Atoms. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
val | The Atom value for the mk.val, such as Atom::Float(1). |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop (opcode val1 val2 ...) 1) after before 1 1) [SYNC_PERIODIC after 1 1 stdin nil] where val1 val2 ... come from the vals Atom list. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
opcode | The opcode for the value structure. |
vals | The list of Atom for val1 val2 .... |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
|
inline |
Inject (fact (mk.val obj prop (opcode val1 val2 ...) 1) after before 1 1) [SYNC_PERIODIC after 1 1 group nil] where val1 val2 ... come from the vals Atom list. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
opcode | The opcode for the value structure. |
vals | The list of Atom for val1 val2 .... |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
group | The group of the view, such as get_stdin(). |
|
inline |
Inject (fact (mk.val obj prop (opcode val1 val2 ...) 1) after before 1 1) [sync_mode after 1 1 stdin nil] where val1 val2 ... come from the vals Atom list. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
opcode | The opcode for the value structure. |
vals | The list of Atom for val1 val2 .... |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
View* r_exec::_Mem::inject_marker_value_from_io_device | ( | r_code::Code * | obj, |
r_code::Code * | prop, | ||
uint16 | opcode, | ||
const std::vector< r_code::Atom > & | vals, | ||
Timestamp | after, | ||
Timestamp | before, | ||
View::SyncMode | sync_mode, | ||
r_code::Code * | group | ||
) |
Inject (fact (mk.val obj prop (opcode val1 val2 ...) 1) after before 1 1) [sync_mode after 1 1 group nil] where val1 val2 ... come from the vals Atom list. This is called from the I/O device to call the normal inject(view), then log the injection event.
obj | The object for the mk.val. |
prop | The property for the mk.val. |
opcode | The opcode for the value structure. |
vals | The list of Atom for val1 val2 .... |
after | The start of the fact time interval. |
before | The end of the fact time interval. |
sync_mode | The view sync mode, such as View::SYNC_PERIODIC. |
group | The group of the view, such as get_stdin(). |
bool r_exec::_Mem::matches_axiom | ( | r_code::Code * | obj | ) |
|
static |
Get the output stream for the trace level based on (Mem::Get()->runtime_output_streams[l]. If (Mem::Get()->runtime_output_streams[l] is NULL, use default_runtime_output_stream_.
l | The TraceLevel. |
void r_exec::_Mem::run_in_diagnostic_time | ( | std::chrono::milliseconds | run_time | ) |
When reduction and core count == 0, start() does not start any core threads, so call this instead of Thread::Sleep(run_time) to run in the current thread using "diagnostic time".As opposed to real time which uses Time::Get, diagnostic time uses get_diagnostic_time_now() which simply returns diagnostic_time_now_. (The main() function should call r_exec::Init where time_base is get_diagnostic_time_now.) So, run_in_diagnostic_time updates diagnostic_time_now_ based on the next time job(which always runs on time). This way, the return value of Now() does not move with real time, but moves step-by-step when diagnostic_time_now_ is updated, making it possible to set break points and diagnose the program.
run_time | The number of milliseconds (in diagnostic time) to run for. |
|
inline |