Skip to content
Snippets Groups Projects
Commit 42b7b376 authored by Franz Bethke's avatar Franz Bethke
Browse files

Remove C2CBase

parent 38453e16
No related merge requests found
#ifndef C2CBASE_H
#define C2CBASE_H
#include "PlatoonProtocolLib/Vehicle.h"
#include "PlatoonProtocolLib/LeaderVehicle.h"
#include "PlatoonProtocolLib/FollowerVehicle.h"
#include "PlatoonProtocolLib/Protocol.h"
#include "PlatoonState.h"
namespace car
{
class C2CBase
{
friend class PlatoonController; // only the PlatoonControler should be able to use the swap functions below!
public:
C2CBase();
private:
PlatoonState curState = PlatoonState::ACC;
networking::Networking c2cNetLeader; // thread + event queue
networking::Networking c2cNetFollower; // thread + event queue
platoonProtocol::LeaderVehicle::Ptr c2cLeader;
platoonProtocol::FollowerVehicle::Ptr c2cFollower;
void swap2LV();
void swap2FV();
void swap2ACC();
bool isPlatoonRunning();
platoonProtocol::PlatoonConfig getPlatoonConfig();
};
}
#endif // C2CBASE_H
#include "../../include/mainNode/C2CBase.h"
namespace car {
C2CBase::C2CBase(){}
void C2CBase::swap2LV()
{
curState = PlatoonState::CACC_LV;
}
void C2CBase::swap2FV()
{
curState = PlatoonState::CACC_FV;
}
void C2CBase::swap2ACC()
{
curState = PlatoonState::ACC;
}
bool C2CBase::isPlatoonRunning()
{
std::cout << "C2CBase::isRunning" << std::endl;
}
platoonProtocol::PlatoonConfig C2CBase::getPlatoonConfig()
{
std::cout << "C2CBase::getPlatoonConfig" << std::endl;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment