#include <Controller.h>
Inheritance diagram for CONTROLLER:
Definition at line 101 of file Controller.h.
CONTROLLER::CONTROLLER | ( | ) |
Definition at line 86 of file Controller.cpp.
References CRobotControlSimulatedRobots::getSimRobotDocument(), getSimulatedRobots(), CSimRobotDocument::GetSimulation(), and m_pSim.
virtual CONTROLLER::~CONTROLLER | ( | ) | [inline, virtual] |
Definition at line 105 of file Controller.h.
virtual void CONTROLLER::activateSwitch | ( | SensorData::sensors | sensor, | |
bool | activate = true | |||
) | [pure virtual] |
Activates or diactivates a certain switch on the robot.
sensor | The switch. Allowed values are: headBack, headFront, mouth, chin, and back. | |
activate | Decides whether to activate or deactivate the switch. |
Implemented in RoboCupCtrl.
Referenced by CSimRobotDocument::activateSwitch().
INTEGER CONTROLLER::ActorPortCount | ( | SIM3DOBJECT | obj | ) |
Definition at line 216 of file Controller.cpp.
References SIMULATION::ActorPortCount(), Check(), Clean(), and m_pSim.
STRING CONTROLLER::ActorPortName | ( | SIM3DOBJECT | obj, | |
INTEGER | n | |||
) |
Definition at line 228 of file Controller.cpp.
References SIMULATION::ActorPortName(), Check(), Clean(), and m_pSim.
SIM3DOBJECT CONTROLLER::AddMacroAs | ( | SIM3DOBJECT | obj, | |
const STRING & | asname | |||
) |
Definition at line 288 of file Controller.cpp.
References SIMULATION::AddMacroAs(), Check(), Clean(), and m_pSim.
SENSORPORT CONTROLLER::AddView | ( | VIEW * | pView | ) |
Definition at line 92 of file Controller.cpp.
References GetObject(), GetSensorPort(), and ObjectName().
MOVEMATRIX CONTROLLER::Check | ( | const MOVEMATRIX & | m | ) | [private] |
Definition at line 143 of file Controller.cpp.
References XCONTROLLER::InvalidObject, m_pSim, and SIMULATION::WasOk().
PSHORTREAL CONTROLLER::Check | ( | PSHORTREAL | p | ) | [private] |
Definition at line 136 of file Controller.cpp.
References XCONTROLLER::InvalidObject, m_pSim, and SIMULATION::WasOk().
SIM3DOBJECT CONTROLLER::Check | ( | SIM3DOBJECT | s | ) | [private] |
Definition at line 129 of file Controller.cpp.
References XCONTROLLER::InvalidObject, m_pSim, and SIMULATION::WasOk().
Definition at line 122 of file Controller.cpp.
References XCONTROLLER::InvalidObject, m_pSim, and SIMULATION::WasOk().
Definition at line 115 of file Controller.cpp.
References XCONTROLLER::InvalidObject, m_pSim, and SIMULATION::WasOk().
void CONTROLLER::Check | ( | ) | [private] |
Definition at line 109 of file Controller.cpp.
References XCONTROLLER::InvalidObject, m_pSim, and SIMULATION::WasOk().
Referenced by ActorPortCount(), ActorPortName(), AddMacroAs(), DeleteSensorBuffer(), GetLocation(), GetMacro(), GetObject(), GetSensorDim(), GetSensorDimSize(), GetSensorValue(), MacroCount(), NewSensorBuffer(), ObjectClass(), ObjectName(), ObjectRemark(), RemoveObject(), SensorPortCount(), SensorPortName(), SetActorValue(), SetLocation(), SubObject(), and SubObjectCount().
void CONTROLLER::Clean | ( | ) | [private] |
Definition at line 101 of file Controller.cpp.
References sim3DTakeLastError().
Referenced by ActorPortCount(), ActorPortName(), AddMacroAs(), DeleteSensorBuffer(), GetActorPort(), GetLocation(), GetMacro(), GetObject(), GetSensorDim(), GetSensorDimSize(), GetSensorPort(), GetSensorValue(), MacroCount(), NewSensorBuffer(), ObjectClass(), ObjectName(), ObjectRemark(), RemoveObject(), SensorPortCount(), SensorPortName(), SetActorValue(), SetLocation(), SubObject(), and SubObjectCount().
void CONTROLLER::DeleteSensorBuffer | ( | SENSORPORT | sp, | |
PSHORTREAL | buffer | |||
) |
Definition at line 203 of file Controller.cpp.
References Check(), Clean(), SIMULATION::DeleteSensorBuffer(), and m_pSim.
Definition at line 153 of file Controller.cpp.
References Clean(), SIMULATION::GetActorPort(), XCONTROLLER::InvalidActorPort, m_pSim, and SIMULATION::WasOk().
MOVEMATRIX CONTROLLER::GetLocation | ( | SIM3DOBJECT | obj | ) |
Definition at line 301 of file Controller.cpp.
References Check(), Clean(), SIMULATION::GetLocation(), and m_pSim.
SIM3DOBJECT CONTROLLER::GetMacro | ( | const STRING & | ) |
Definition at line 282 of file Controller.cpp.
References Check(), Clean(), SIMULATION::GetMacro(), and m_pSim.
SIM3DOBJECT CONTROLLER::GetMacro | ( | INTEGER | n | ) |
Definition at line 276 of file Controller.cpp.
References Check(), Clean(), SIMULATION::GetMacro(), and m_pSim.
SIM3DOBJECT CONTROLLER::GetObject | ( | const STRING & | name | ) |
Definition at line 234 of file Controller.cpp.
References Check(), Clean(), SIMULATION::GetObject(), and m_pSim.
Referenced by RoboCupCtrl::adaptColors(), AddView(), Oracle::getBallModel(), Oracle::getPlayerPoseCollection(), RoboCupCtrl::OnBeginDrag(), OVirtualRobotComm::OVirtualRobotComm(), RoboCupCtrl::RoboCupCtrl(), and RoboCupCtrl::setPose2D().
INTEGER CONTROLLER::GetSensorDim | ( | SENSORPORT | sp | ) |
Definition at line 171 of file Controller.cpp.
References Check(), Clean(), SIMULATION::GetSensorDim(), and m_pSim.
INTEGER CONTROLLER::GetSensorDimSize | ( | SENSORPORT | sp, | |
INTEGER | d | |||
) |
Definition at line 177 of file Controller.cpp.
References Check(), Clean(), SIMULATION::GetSensorDimSize(), and m_pSim.
SENSORPORT CONTROLLER::GetSensorPort | ( | const STRING & | portname | ) |
Definition at line 162 of file Controller.cpp.
References Clean(), SIMULATION::GetSensorPort(), XCONTROLLER::InvalidSensorPort, m_pSim, and SIMULATION::WasOk().
Referenced by AddView(), and OVirtualRobotComm::OVirtualRobotComm().
void CONTROLLER::GetSensorValue | ( | SENSORPORT | sp, | |
PSHORTREAL | value | |||
) |
Definition at line 183 of file Controller.cpp.
References Check(), Clean(), SIMULATION::GetSensorValue(), and m_pSim.
Referenced by OVirtualRobotComm::update().
virtual bool CONTROLLER::isSwitchActivated | ( | SensorData::sensors | sensor | ) | const [pure virtual] |
The function checks whether a certain switch is activated.
sensor | The switch to check. |
Implemented in RoboCupCtrl.
Referenced by CSimRobotDocument::isSwitchActivated().
INTEGER CONTROLLER::MacroCount | ( | ) |
Definition at line 270 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::MacroCount().
PSHORTREAL CONTROLLER::NewSensorBuffer | ( | SENSORPORT | sp | ) |
Definition at line 197 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::NewSensorBuffer().
Referenced by OVirtualRobotComm::OVirtualRobotComm().
STRING CONTROLLER::ObjectClass | ( | SIM3DOBJECT | obj | ) |
Definition at line 252 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::ObjectClass().
STRING CONTROLLER::ObjectName | ( | SIM3DOBJECT | obj | ) |
Definition at line 240 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::ObjectName().
Referenced by AddView().
STRING CONTROLLER::ObjectRemark | ( | SIM3DOBJECT | obj | ) |
Definition at line 246 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::ObjectRemark().
virtual void CONTROLLER::OnBeginDrag | ( | const CLICKINFO & | ) | [inline, virtual] |
Reimplemented in RoboCupCtrl.
Definition at line 110 of file Controller.h.
Referenced by CSimRobotDocument::OnBeginDrag().
virtual void CONTROLLER::OnDestroy | ( | ) | [inline, virtual] |
Definition at line 107 of file Controller.h.
Referenced by CSimRobotDocument::OnSimReset(), and CSimRobotDocument::~CSimRobotDocument().
virtual void CONTROLLER::OnDrag | ( | const CLICKINFO & | ) | [inline, virtual] |
Reimplemented in RoboCupCtrl.
Definition at line 111 of file Controller.h.
Referenced by CSimRobotDocument::OnDrag().
virtual void CONTROLLER::OnEndDrag | ( | const CLICKINFO & | ) | [inline, virtual] |
Reimplemented in RoboCupCtrl.
Definition at line 112 of file Controller.h.
Referenced by CSimRobotDocument::OnEndDrag().
virtual void CONTROLLER::OnKeyPressed | ( | int | ) | [inline, virtual] |
Definition at line 113 of file Controller.h.
virtual void CONTROLLER::OnMouseClick | ( | const CLICKINFO & | ) | [inline, virtual] |
virtual void CONTROLLER::OnMouseDoubleClick | ( | const CLICKINFO & | ) | [inline, virtual] |
void CONTROLLER::RemoveObject | ( | SIM3DOBJECT | obj | ) |
Definition at line 294 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::RemoveObject().
INTEGER CONTROLLER::SensorPortCount | ( | SIM3DOBJECT | obj | ) |
Definition at line 210 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::SensorPortCount().
STRING CONTROLLER::SensorPortName | ( | SIM3DOBJECT | obj, | |
INTEGER | n | |||
) |
Definition at line 222 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::SensorPortName().
Reimplemented in RoboCupCtrl.
Definition at line 106 of file Controller.h.
References TRUE.
Referenced by CSimRobotDocument::OnIdle().
Definition at line 190 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::SetActorValue().
void CONTROLLER::SetLocation | ( | SIM3DOBJECT | obj, | |
const MOVEMATRIX & | m | |||
) |
Definition at line 307 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::SetLocation().
SIM3DOBJECT CONTROLLER::SubObject | ( | SIM3DOBJECT | obj, | |
INTEGER | n | |||
) |
Definition at line 264 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::SubObject().
INTEGER CONTROLLER::SubObjectCount | ( | SIM3DOBJECT | obj | ) |
Definition at line 258 of file Controller.cpp.
References Check(), Clean(), m_pSim, and SIMULATION::SubObjectCount().
SIMULATION* CONTROLLER::m_pSim [private] |
Definition at line 157 of file Controller.h.
Referenced by ActorPortCount(), ActorPortName(), AddMacroAs(), Check(), CONTROLLER(), DeleteSensorBuffer(), GetActorPort(), GetLocation(), GetMacro(), GetObject(), GetSensorDim(), GetSensorDimSize(), GetSensorPort(), GetSensorValue(), MacroCount(), NewSensorBuffer(), ObjectClass(), ObjectName(), ObjectRemark(), RemoveObject(), SensorPortCount(), SensorPortName(), SetActorValue(), SetLocation(), SubObject(), and SubObjectCount().