trikRuntime
trikControl::MspCommunicatorInterface Class Referenceabstract

Abstract interface for communication with MSP, may be implemented by I2C or USB buses, depending on current MSP configuration. More...

#include <mspCommunicatorInterface.h>

Inheritance diagram for trikControl::MspCommunicatorInterface:
Collaboration diagram for trikControl::MspCommunicatorInterface:

Public Member Functions

virtual void send (const QByteArray &data)=0
 Send data to current device, if it is connected. More...
 
virtual int read (const QByteArray &data)=0
 Reads data by given I2C command number and returns the result. More...
 
- Public Member Functions inherited from trikControl::DeviceInterface
 DeviceInterface ()=default
 
virtual ~DeviceInterface ()=default
 
virtual Status status () const =0
 Returns current status of the device. More...
 

Additional Inherited Members

- Public Types inherited from trikControl::DeviceInterface
enum  Status {
  Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting,
  Status::ready, Status::stopping
}
 Device status. More...
 
- Static Public Member Functions inherited from trikControl::DeviceInterface
static Status combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent)
 Helper method to return status of a device relying on other device to work. More...
 

Detailed Description

Abstract interface for communication with MSP, may be implemented by I2C or USB buses, depending on current MSP configuration.

Member Function Documentation

virtual int trikControl::MspCommunicatorInterface::read ( const QByteArray &  data)
pure virtual

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

Implemented in trikControl::MspI2cCommunicator, and trikControl::MspUsbCommunicator.

virtual void trikControl::MspCommunicatorInterface::send ( const QByteArray &  data)
pure virtual

Send data to current device, if it is connected.

Implemented in trikControl::MspI2cCommunicator, and trikControl::MspUsbCommunicator.


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