RFID interface. More...
#include <bpsrfid.h>
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. | |
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.
| BpsRfid::BpsRfid | ( | QObject * | aParent = 0 | ) |
| [in] | aParent | The parent object. |
| QMap<QString,QString> BpsRfid::config | ( | ) | const |
| 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.
| [in] | aData | The 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.
| [in] | aData | The 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.
| [in] | aConfig | The 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.
| [in] | aKey | Key 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.
| [in] | aOk | True on success, false on error. |
| [in] | aData | The unique ID of the tag on success. Error message from the RFID system on error. |