Virgil IoT KIT
|
SNAP Sniffer as ListView data model. More...
#include <VSQSnapSnifferQml.h>
Public Types | |
enum | DeviceInfoRoles { MacDst, MacSrc, EthernetPacketType, TransactionId, ServiceId, ElementId, Flags, Content, ContentSize, Timestamp } |
Data roles. More... | |
Public Member Functions | |
VSQSnapSnifferQml (const VSQSnapSnifferQmlConfig &snifferConfig, VSQNetifBase *netif) | |
Constructor. More... | |
~VSQSnapSnifferQml ()=default | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
Rows count. More... | |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
Obtain data. More... | |
QHash< int, QByteArray > | roleNames () const override |
Role names. More... | |
SNAP Sniffer as ListView data model.
Data roles.
Enumerator | |
---|---|
MacDst | Destination's MAC address. VSQSnapPacket::m_dest field. Use it as "macDst" in QML |
MacSrc | Source's MAC address. VSQSnapPacket::m_src field. Use it as "macSrc" in QML |
EthernetPacketType | Hex string representation of Ethernet's packet type. VSQSnapPacket::m_ethernetPacketType field. Use it as "ethernetPacketType" in QML |
TransactionId | Transaction's ID. VSQSnapPacket::m_transactionId field. Use it as "transactionId" in QML |
ServiceId | Hex string representation of service's ID. VSQSnapPacket::m_serviceId field. Use it as "serviceId" in QML |
ElementId | Hex string representation of element's ID. VSQSnapPacket::m_elementId field. Use it as "elementId" in QML |
Flags | Hex string representation of packet's flags. VSQSnapPacket::m_flags field. Use it as "flags" in QML |
Content | Packet's content. VSQSnapPacket::m_content field. Use it as "content" in QML |
ContentSize | Packet's content size. VSQSnapPacket::m_content field data size. Use it as "contentSize" in QML |
Timestamp | Timestamp. VSQSnapPacket::m_timestamp field. Use it as "timestamp" in QML |
VSQSnapSnifferQml::VSQSnapSnifferQml | ( | const VSQSnapSnifferQmlConfig & | snifferConfig, |
VSQNetifBase * | netif | ||
) |
Constructor.
snifferConfig | Sniffer configuration |
netif | Network interface implementation |
|
default |
|
override |
Obtain data.
Returns the data stored under the given role for the item referred to by the index.
index | Data index |
role | DeviceInfoRoles data role |
|
override |
|
override |
Rows count.
Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.
parent | Parent |