trikRuntime
trikHal::stub::StubMspI2C Class Reference

Empty implementation of I2C bus communicator. Only logs operations, returns 0 on all "read" calls. More...

#include <stubMspI2c.h>

Inheritance diagram for trikHal::stub::StubMspI2C:
Collaboration diagram for trikHal::stub::StubMspI2C:

Public Member Functions

void send (const QByteArray &data) override
 Send data to a device. More...
 
int read (const QByteArray &data) override
 Reads data by given I2C command number and returns the result. More...
 
bool connect (const QString &devicePath, int deviceId) override
 Establish connection with MSP over I2C bus. More...
 
void disconnect () override
 Disconnect from MSP. More...
 
- Public Member Functions inherited from trikHal::MspI2cInterface
 MspI2cInterface ()=default
 
virtual ~MspI2cInterface ()=default
 

Detailed Description

Empty implementation of I2C bus communicator. Only logs operations, returns 0 on all "read" calls.

Member Function Documentation

bool StubMspI2C::connect ( const QString &  devicePath,
int  deviceId 
)
overridevirtual

Establish connection with MSP over I2C bus.

Implements trikHal::MspI2cInterface.

void StubMspI2C::disconnect ( )
overridevirtual

Disconnect from MSP.

Implements trikHal::MspI2cInterface.

int StubMspI2C::read ( const QByteArray &  data)
overridevirtual

Reads data by given I2C command number and returns the result.

Implements trikHal::MspI2cInterface.

void StubMspI2C::send ( const QByteArray &  data)
overridevirtual

Send data to a device.

Implements trikHal::MspI2cInterface.


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