ITS
FakeCANProvider Class Reference

#include <FakeCANProvider.h>

Inheritance diagram for FakeCANProvider:
[legend]
Collaboration diagram for FakeCANProvider:
[legend]

Signals

void canChanged ()
 canChanged Signal used when data changed. More...
 

Public Member Functions

 FakeCANProvider (QMutex *mutex=nullptr)
 FakeCANProvider FakeCANProvider constructor. More...
 
 ~FakeCANProvider ()
 ~FakeCANProvider FakeCANProvider destructor. More...
 
ParameterCANdata ()
 data CAN bus data getter. More...
 
void changeCurvature (qint16 curvature)
 changeCurvature Change the curvature. More...
 
void changeSpeed (qint16 speed)
 changeSpeed Change the speed. More...
 
void setAccelerationControl (quint8 accelerationControl)
 setAccelerationControl Set the acceleration control. More...
 
void setExteriorLights (quint8 exteriorLights)
 setExteriorLights Set the exterior lights status. More...
 
void setDriveDirection (quint8 driveDirection)
 setDriveDirection Set the drive direction. More...
 
void changeYawRate (qint16 yawRate)
 changeYawRate Change the yaw rate. More...
 
void setLightBarSirenInUse (quint8 lightBarSiren)
 setLightBarSirenInUse Set the light bar and siren status. More...
 
FakeCANProvideroperator= (const FakeCANProvider &other)
 operator= Affectation operator. More...
 

Protected Attributes

QMutex * m_mutex
 
ParameterCAN m_data
 

Detailed Description

Definition at line 13 of file FakeCANProvider.h.

Constructor & Destructor Documentation

◆ FakeCANProvider()

FakeCANProvider::FakeCANProvider ( QMutex *  mutex = nullptr)

FakeCANProvider FakeCANProvider constructor.

Parameters
mutexMutex used for the initialization.

Definition at line 3 of file FakeCANProvider.cpp.

References m_mutex.

◆ ~FakeCANProvider()

FakeCANProvider::~FakeCANProvider ( )

~FakeCANProvider FakeCANProvider destructor.

Definition at line 8 of file FakeCANProvider.cpp.

Member Function Documentation

◆ canChanged

void FakeCANProvider::canChanged ( )
signal

canChanged Signal used when data changed.

Referenced by changeCurvature(), changeYawRate(), setAccelerationControl(), setDriveDirection(), setExteriorLights(), and setLightBarSirenInUse().

Here is the caller graph for this function:

◆ changeCurvature()

void FakeCANProvider::changeCurvature ( qint16  curvature)

changeCurvature Change the curvature.

Parameters
curvatureThe curvature delta.

Definition at line 18 of file FakeCANProvider.cpp.

References canChanged(), Curvature::curvatureValue, CurvatureValue_reciprocalOf1MeterRadiusToLeft, CurvatureValue_reciprocalOf1MeterRadiusToRight, ParameterCAN::m_curvature, and m_data.

Referenced by UpperTester::utChangeCurvature().

Here is the caller graph for this function:

◆ changeSpeed()

void FakeCANProvider::changeSpeed ( qint16  speed)

changeSpeed Change the speed.

Parameters
speedThe speed delta.

◆ changeYawRate()

void FakeCANProvider::changeYawRate ( qint16  yawRate)

changeYawRate Change the yaw rate.

Parameters
yawRateThe yaw rate delta.

Definition at line 61 of file FakeCANProvider.cpp.

References canChanged(), m_data, ParameterCAN::m_yawRate, YawRate::yawRateValue, and YawRateValue_unavailable.

Referenced by UpperTester::utChangeYawRate().

Here is the caller graph for this function:

◆ data()

◆ operator=()

FakeCANProvider & FakeCANProvider::operator= ( const FakeCANProvider other)

operator= Affectation operator.

Parameters
otherThe FakeCANProvider to affect.
Returns
The affected FakeCANProvider.

Definition at line 12 of file FakeCANProvider.cpp.

References m_data.

◆ setAccelerationControl()

void FakeCANProvider::setAccelerationControl ( quint8  accelerationControl)

setAccelerationControl Set the acceleration control.

Parameters
accelerationControlThe new acceleration control.

Definition at line 29 of file FakeCANProvider.cpp.

References BIT_STRING_s::bits_unused, BIT_STRING_s::buf, canChanged(), ParameterCAN::m_accelerationControl, m_data, and BIT_STRING_s::size.

Referenced by UpperTester::utSetAccelerationControlStatus().

Here is the caller graph for this function:

◆ setDriveDirection()

void FakeCANProvider::setDriveDirection ( quint8  driveDirection)

setDriveDirection Set the drive direction.

Parameters
driveDirectionThe new drive direction.

Definition at line 54 of file FakeCANProvider.cpp.

References canChanged(), m_data, and ParameterCAN::m_driveDirection.

Referenced by UpperTester::utSetDriveDirection().

Here is the caller graph for this function:

◆ setExteriorLights()

void FakeCANProvider::setExteriorLights ( quint8  exteriorLights)

setExteriorLights Set the exterior lights status.

Parameters
exteriorLightsThe new exterior lights status.

Definition at line 47 of file FakeCANProvider.cpp.

References BIT_STRING_s::buf, canChanged(), m_data, and ParameterCAN::m_exteriorLights.

Referenced by UpperTester::utSetExteriorLightsStatus().

Here is the caller graph for this function:

◆ setLightBarSirenInUse()

void FakeCANProvider::setLightBarSirenInUse ( quint8  lightBarSiren)

setLightBarSirenInUse Set the light bar and siren status.

Parameters
lightBarSirenThe new light bar and siren status.

Definition at line 72 of file FakeCANProvider.cpp.

References BIT_STRING_s::buf, canChanged(), m_data, and ParameterCAN::m_lightBarSirenInUse.

Referenced by UpperTester::utSetLightBarSiren().

Here is the caller graph for this function:

Member Data Documentation

◆ m_data

ParameterCAN FakeCANProvider::m_data
protected

◆ m_mutex

QMutex* FakeCANProvider::m_mutex
protected

Mutex used for the initialization.

Definition at line 82 of file FakeCANProvider.h.

Referenced by FakeCANProvider().


The documentation for this class was generated from the following files: