123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #include "PCANBasic.h"
- #include "protocol.pb.h"
- #include "api/video/video_frame.h"
- #include "include/EgoInterface.h"
- #include "api.h"
- #include "../common/peer_connection.h"
- #include "control_sensor.h"
- #include "EgoWindow.h"
- #include "car_sim.h"
-
- #include "lidar_sim.h"
-
- #include "radar_sim.h"
- #include "EgoClient.h"
- #include "EgoController.h"
- CEgoController::CEgoController(IEgoNotify* noitfy)
- {
- _client = std::make_unique<CEgoClient>(noitfy);
- }
- void CEgoController::OnCarConnect(int32_t peer)
- {
- _client->OnCarConnect(peer);
- }
- void CEgoController::OnCarLeave()
- {
- _client->OnCarLeave();
- }
- void CEgoController::Login(std::string account, std::string pass)
- {
- _client->Login(account, pass);
- }
- void CEgoController::Start(std::array<IRender*, RenderPosition::ALL>& ar)
- {
- _client->Start(ar);
- }
- void CEgoController::SetReady(bool b)
- {
- _client->SetReady(b);
- }
- void CEgoController::ReqCarList()
- {
- _client->ReqCarList();
- }
- void CEgoController::OnMoveBegin(int32_t rid, WorkArea area, int32_t no)
- {
- _client->OnMoveBegin(rid, area, no);
- }
- /*
- void CEgoController::SwitchDriver(int32_t id)
- {
- _client->SwitchDriver(id);
- }
- */
- void CEgoController::ChangeState(UserState state)
- {
- _client->ChangeState(state);
- }
- std::string CEgoController::GetAccount()
- {
- return _client->GetAccount();
- }
- std::string CEgoController::GetPassword()
- {
- return _client->GetPassword();
- }
- std::string CEgoController::GetName()
- {
- return _client->GetName();
- }
- /*
- bool CEgoController::IsAutoClose()
- {
- return _client->IsAutoClose();
- }
- */
- ControlStatus CEgoController::CheckStatus()
- {
- return _client->CheckStatus();
- }
- /*
- void CEgoController::SetCurrentPage(PageProp prop)
- {
- _client->SetCurrentPage(prop);
- }
- */
|