Virgil IoT KIT
Signals | Public Member Functions | Protected Member Functions
VSQNetifBase Class Referenceabstract

SNAP network interface base class. More...

#include <VSQNetifBase.h>

Inheritance diagram for VSQNetifBase:
Inheritance graph
[legend]
Collaboration diagram for VSQNetifBase:
Collaboration graph
[legend]

Signals

void fireStateChanged (QAbstractSocket::SocketState connectionState)
 Signal "State has been changed". More...
 
void fireNewPacket (VSQSnapPacket packet)
 Signal "New packet has been received". More...
 

Public Member Functions

 VSQNetifBase ()
 Default constructor. More...
 
 VSQNetifBase (VSQNetifBase const &)=delete
 
VSQNetifBaseoperator= (VSQNetifBase const &)=delete
 
virtual ~VSQNetifBase ()=default
 
virtual QAbstractSocket::SocketState connectionState () const =0
 Get current connection status. More...
 
VirgilIoTKit::vs_netif_t * lowLevelNetif ()
 Get network interface. More...
 

Protected Member Functions

virtual bool init ()=0
 Initialize network interface. More...
 
virtual bool deinit ()=0
 Destruct network interface. More...
 
virtual bool tx (const QByteArray &data)=0
 Send binary data. More...
 
virtual QString macAddr () const =0
 Get current MAC address. More...
 
bool processData (const QByteArray &data)
 Process packet data. More...
 

Detailed Description

SNAP network interface base class.

Constructor & Destructor Documentation

◆ VSQNetifBase() [1/2]

VSQNetifBase::VSQNetifBase ( )

Default constructor.

◆ VSQNetifBase() [2/2]

VSQNetifBase::VSQNetifBase ( VSQNetifBase const &  )
delete

◆ ~VSQNetifBase()

virtual VSQNetifBase::~VSQNetifBase ( )
virtualdefault

Member Function Documentation

◆ connectionState()

virtual QAbstractSocket::SocketState VSQNetifBase::connectionState ( ) const
pure virtual

Get current connection status.

Warning
You have to implement this function in a child class
Returns
Current connection status

Implemented in VSQUdpBroadcast.

◆ deinit()

virtual bool VSQNetifBase::deinit ( )
protectedpure virtual

Destruct network interface.

Warning
You have to implement this function in a child class
Returns
true in case of success

Implemented in VSQUdpBroadcast.

◆ fireNewPacket

void VSQNetifBase::fireNewPacket ( VSQSnapPacket  packet)
signal

Signal "New packet has been received".

Parameters
packetNew packet

◆ fireStateChanged

void VSQNetifBase::fireStateChanged ( QAbstractSocket::SocketState  connectionState)
signal

Signal "State has been changed".

Parameters
connectionStateCurrent connection state

◆ init()

virtual bool VSQNetifBase::init ( )
protectedpure virtual

Initialize network interface.

Warning
You have to implement this function in a child class
Returns
true in case of success

Implemented in VSQUdpBroadcast.

◆ lowLevelNetif()

VirgilIoTKit::vs_netif_t* VSQNetifBase::lowLevelNetif ( )
inline

Get network interface.

Returns
vs_netif_t network interface

◆ macAddr()

virtual QString VSQNetifBase::macAddr ( ) const
protectedpure virtual

Get current MAC address.

Warning
You have to implement this function in a child class
Returns
Current MAC address

Implemented in VSQUdpBroadcast.

◆ operator=()

VSQNetifBase& VSQNetifBase::operator= ( VSQNetifBase const &  )
delete

◆ processData()

bool VSQNetifBase::processData ( const QByteArray &  data)
protected

Process packet data.

Parameters
dataIncoming data
Returns
true if data was processed successfully

◆ tx()

virtual bool VSQNetifBase::tx ( const QByteArray &  data)
protectedpure virtual

Send binary data.

Warning
You have to implement this function in a child class
Parameters
dataData to send
Returns
true in case of success

Implemented in VSQUdpBroadcast.


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