Example #1
0
//############################################################################//
//
// Function:  Missile()
//                                
// Purpose:   Constructor
//            Set default values of input variables.
//                                
//############################################################################//
Missile::Missile() :
MdlBase()
{
  //
  // Default initialization of input variables
  //
  frameTimeStep = 999.0e9;
  initFrameTime = 999.0e9;

//  initVxb = 270.0;
//  launchTime = 3.0;

  initVxb = 1.0e3;
  launchTime = 30.0;

  //
  // Register states for integration
  //
  RegisterState( pxf, vxf);
  RegisterState( pyf, vyf);

  RegisterState( vxf, axf);
  RegisterState( vyf, ayf);

}  // end Missile()
Example #2
0
void PlayerFSM::InitDefaultState()
{
    FState* state = new FIdleState(mpOwner);
    RegisterState("Idle", state);
    state = new FJumpState(mpOwner);
    RegisterState("Jump", state);
    state = new FRunState(mpOwner);
    RegisterState("Run", state);
    
    ChangeToState("Idle");
}
ASIM_COMMON_SYSTEM_CLASS::ASIM_COMMON_SYSTEM_CLASS(
    const char *name,
    string reference_domain,
    UINT32 feederThreads
    ) 
    : ASIM_SYSTEM_CLASS(name, TOTAL_NUM_CPUS, NULL, feederThreads),
      myContextScheduler(this, "CONTEXT_SCHEDULER"),
      myWarmupManager(this, "WARMUP_MANAGER"),
      myChip(this, "CHIP"),
      referenceDomain(reference_domain),
      statClocks(0)
{
    HeadDumpStripCharts();

    RegisterState(&statClocks, "Clocks", "Number of calls to clockserver's Clock");

    // connect all buffers together
    ConfigPort::ConnectAll();

    config = new ASIM_CONFIG_CLASS(this);
    config->RegisterSimulatorConfiguration();

    // We obtain the system wide clock server and set the clocking random seed
    clock = ASIM_CLOCKABLE_CLASS::GetClockServer();
    clock -> SetRandomClockingSeed(RANDOM_CLOCKING_SEED);
    clock -> SetDumpProfile(DUMP_CLOCKING_PROFILE);
    clock -> SetThreadedClocking(THREADED_CLOCKING == 1);

    // Initialize single instance of thermal model
    myThermalModel = THERMAL_MODEL_CLASS::Instance();
    
}
ASIM_COMMON_SYSTEM_CLASS::ASIM_COMMON_SYSTEM_CLASS(
    const char *name,
    UINT32 feederThreads
    ) 
    : ASIM_SYSTEM_CLASS(name, TOTAL_NUM_CPUS, NULL, feederThreads),
      myContextScheduler(this, "CONTEXT_SCHEDULER"),
      myWarmupManager(this, "WARMUP_MANAGER"),
      myChip(this, "CHIP"),
      statCycles(0)
{
    HeadDumpStripCharts();

    RegisterState(&statCycles, "Cycles", "Simulation cycles completed");

    // connect all buffers together
    ConfigPort::ConnectAll();

    config = new ASIM_CONFIG_CLASS(this);
    config->RegisterSimulatorConfiguration();
    
    // Initialize single instance of thermal model
    myThermalModel = THERMAL_MODEL_CLASS::Instance();
}
Example #5
0
void CQHState::Init()
{
	UnregisterState();
	m_Name = m_NewName;
	RegisterState();
}
Example #6
0
/// Set the parent name for this object
/// \param inName = CHashString name for parent
void CQHState::SetParentName(IHashString *inName)
{
	UnregisterState();
	CObjectTemplate<IAttributeObject>::SetParentName( inName );
	RegisterState();
}