Documents > BPS V2 C++ API
BpsRfid Class Reference

RFID interface. More...

#include <bpsrfid.h>

List of all members.

Signals

void dataReceived (const QString &aData)
 Signal emitted with data is received as response from the RFID system.
void dataSent (const QString &aData)
 Signal emitted when data is sent as request to the RFID system.
void writeItemResponse (bool aOk, const QString &aData)
 Signal emitted after receiving the answer to a item write request.

Public Member Functions

 BpsRfid (QObject *aParent=0)
QMap< QString, QString > config () const
void setConfig (const QMap< QString, QString > &aConfig)
 Set the RFID configuration.
virtual void writeItemRequest (const QVariant &aKey)=0
 Send item write request.
virtual ~BpsRfid ()
 Virtual default destructor.

Detailed Description

RFID interface.

RFID interfaces operate similar as a thread, where commands are given by request calls, and responses are returned as signals. Background operations are however implemented with QTimer, so the requesting thread must have an event queue. Overlapped requests are not supported, subsequent requests should be made only after the previous has been answered by a signal.


Constructor & Destructor Documentation

BpsRfid::BpsRfid ( QObject *  aParent = 0)
Parameters:
[in]aParentThe parent object.

Member Function Documentation

QMap<QString,QString> BpsRfid::config ( ) const
Returns:
The RFID configuration with lowercase keys, and trimmed keys and values.
See also:
Bps::lowerKeyStringMap().
void BpsRfid::dataReceived ( const QString &  aData) [signal]

Signal emitted with data is received as response from the RFID system.

Use this to create logs about the communication.

Parameters:
[in]aDataThe unprocessed data received from the RFID system.
void BpsRfid::dataSent ( const QString &  aData) [signal]

Signal emitted when data is sent as request to the RFID system.

Use this to create logs about the communication.

Parameters:
[in]aDataThe data sent to the RFID system.
void BpsRfid::setConfig ( const QMap< QString, QString > &  aConfig)

Set the RFID configuration.

This should be done before making requests.

Parameters:
[in]aConfigThe RFID configuration, usually the values in Central System Settings/Terminals/TERMINAL/Packlines/LINENO/RFID.
virtual void BpsRfid::writeItemRequest ( const QVariant &  aKey) [pure virtual]

Send item write request.

Parameters:
[in]aKeyKey of the order item (t_orderitems.c_key)
void BpsRfid::writeItemResponse ( bool  aOk,
const QString &  aData 
) [signal]

Signal emitted after receiving the answer to a item write request.

Parameters:
[in]aOkTrue on success, false on error.
[in]aDataThe unique ID of the tag on success. Error message from the RFID system on error.

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