AERA
|
#include <test_mem.h>
Classes | |
class | _Thread |
Public Member Functions | |
bool | load (const std::vector< r_code::Code * > *objects, uint32 stdin_oid, uint32 stdout_oid, uint32 self_oid) override |
r_code::Code * | eject (r_code::Code *command) override |
void | on_diagnostic_time_tick () override |
![]() | |
r_code::Code * | build_object (r_code::SysObject *source) const override |
r_code::Code * | _build_object (Atom head) const override |
r_code::Code * | build_object (Atom head) const override |
r_code::Code * | check_existence (r_code::Code *object) override |
void | inject (O *object, View *view) |
Protected Member Functions | |
void | on_time_tick () |
void | startTimeTickThread () |
Static Protected Member Functions | |
static thread_ret thread_function_call | timeTickRun (void *args) |
Protected Attributes | |
std::ofstream | ofs |
Thread * | timeTickThread_ |
Timestamp | lastInjectTime_ |
float | velocity_y_ |
float | position_y_ |
float | force_y_ |
float | next_velocity_y_ |
float | next_position_y_ |
float | next_theta_y_ |
float | next_omega_y_ |
r_code::Code * | position_y_obj_ |
r_code::Code * | cart_position_y_obj_ |
r_code::Code * | position_property_ |
r_code::Code * | position_y_property_ |
r_code::Code * | velocity_y_property_ |
r_code::Code * | force_y_property_ |
r_code::Code * | theta_y_property_ |
r_code::Code * | omega_y_property_ |
r_code::Code * | primary_group_ |
uint16 | ready_opcode_ |
uint16 | set_velocity_y_opcode_ |
uint16 | set_force_y_opcode_ |
uint16 | move_y_plus_opcode_ |
uint16 | move_y_minus_opcode_ |
Timestamp | lastCommandTime_ |
r_code::Code * | yEnt_ [10] |
r_code::Code * | discretePositionObj_ |
r_code::Code * | discretePosition_ |
r_code::Code * | nextDiscretePosition_ |
int | babbleState_ |
TestMem extends Mem so that we can override load and eject, and to implement the behavior of the external environment for pong.2.goal.replicode, etc. If a program does not call a(cmd ...) for the implemented external environment, then it does nothing. (If this external environment is not needed, then main() can just create the parent class r_exec::Mem .)
Definition at line 98 of file test_mem.h.
|
override |
Override eject to check for (cmd set_velocity_y ...) and other implemented commands.
command | The command from the Replicode (cmd ...). |
Definition at line 165 of file test_mem.cpp.
|
override |
Call the parent class load(), then set up the objects for the external environment.
Definition at line 135 of file test_mem.cpp.
|
inlineoverride |
This is called when run_in_diagnostic_time() updates the tickTime. Just call on_time_tick(), because there is no real - time timer thread to call it.
Definition at line 124 of file test_mem.h.
|
protected |
If not running in diagnostic time, start the timeTickThread_. If it is already started, do nothing.
Definition at line 547 of file test_mem.cpp.
|
staticprotected |
This runs in the timeTickThread_ to periodicaly call on_time_tick(). (Only used if not running in diagnostic time.)
args |
Definition at line 561 of file test_mem.cpp.