CAN programming interface environment
Version 3.10
Loading...
Searching...
No Matches
QCanPlugin Class Referenceabstract

Detailed Description

The QCanPlugin class is the base class for CAN interface plug-ins, which can be used to add any kind of CAN interface cards to the CANpie FD Server.

For an example of the QCanPlugin class refer to the QCanPluginTemplate class located inside the source/applications/plugins/qcan_template directory.

#include <qcan_plugin.hpp>

Inherits QObject.

Public Slots

virtual void appendMessage (const QString &clLogMessageV, const QCan::LogLevel_e teLogLevelV=QCan::eLOG_LEVEL_INFO)
 

Public Member Functions

virtual QCanInterfacegetInterface (uint8_t ubInterfaceV=0)=0
 
virtual QIcon icon (void)=0
 
virtual uint8_t interfaceCount (void)=0
 
virtual QString name (void)=0
 
bool setFileName (const QString clFileNameV)
 
void setLogLevel (QCan::LogLevel_e teLogLevelV)
 

Member Function Documentation

◆ appendMessage

virtual void QCanPlugin::appendMessage ( const QString & clLogMessageV,
const QCan::LogLevel_e teLogLevelV = QCan::eLOG_LEVEL_INFO )
virtualslot
Parameters
[in]clLogMessageVLog message
[in]teLogLevelVLog level

The function function appends a log message to the log file. The message will be prepended with a time-stamp. The parameter teLogLevelV defines the log level of the message. Only messages with a log level smaller or equal to the actual defined log level will be appended (see setLogLevel()).

◆ getInterface()

virtual QCanInterface * QCanPlugin::getInterface ( uint8_t ubInterfaceV = 0)
pure virtual
Parameters
[in]ubInterfaceVNumber of CAN interface
Returns
CAN interface class

The function returns a pointer to a QCanInterface class defined by the parameter ubInterfaceV. The first interface starts at index 0. If the number of available interfaces is exceeded the function returns NULL.

◆ icon()

virtual QIcon QCanPlugin::icon ( void )
pure virtual
Returns
Icon of plug-in

The function returns the icon of the plug-in.

◆ interfaceCount()

virtual uint8_t QCanPlugin::interfaceCount ( void )
pure virtual
Returns
Number of CAN interfaces

The function returns the number of CAN interfaces that are available.

◆ name()

virtual QString QCanPlugin::name ( void )
pure virtual
Returns
Name of plug-in

The function returns the name of the plug-in.

◆ setFileName()

bool QCanPlugin::setFileName ( const QString clFileNameV)
Parameters
[in]clFileNameVLog file name
Returns
true if file could be opened, otherwise false

The function changes the default file path and file name for the log attached to the CAN channel defined by the parameter teChannelV.

◆ setLogLevel()

void QCanPlugin::setLogLevel ( QCan::LogLevel_e teLogLevelV)
inline
Parameters
[in]teLogLevelVLog level
See also
logLevel()

The function changes the default log level for the plugin.