BPS C++ API  2.24.4
bpsepcis.h
Go to the documentation of this file.
1 
4 #ifndef BPSEPCIS_H
5 #define BPSEPCIS_H
6 
7 #include "bpscore_global.h"
8 #include <QVariant>
9 
10 class BpsDatastore;
11 class BpsDecimal;
12 
17 {
18  Q_OBJECT
20 
21 public:
25  enum KeyType {
26  Picks = 0,
27  Items = 1
28  };
29 
34  BpsEpcis(BpsDatastore* aDatastore, QObject* aParent = nullptr);
35 
37  virtual ~BpsEpcis();
39 
43  bool isEnabled() const;
44 
51  bool graiIsLocked(const QString& aGrai) const;
52 
56  int graiReuseLockTime() const;
57 
61  int customPackLine() const;
62 
68  static QString graiFromGs1Scan(const QString& aScanData);
69 
75  void setGraiUsed(const QString& aGrai);
76 
88  QString makeSSCC() const;
89 
101  QString SSCC18toSSCC(const QString& aSscc18, int aGcpSize = 0) const;
102 
109  QString SSCCtoSSCC18(const QString& aSscc) const;
110 
116  void createGraiEvents(const QVariant& aOrdertrip, const QString& aGrai);
117 
123  void createSsccEvents(const QVariant& aOrdertrip, const QString& aSscc);
124 
131  void deleteEvents(const QVariantList& aKeys, KeyType aKeyType);
132 };
133 
134 #endif // BPSEPCIS_H
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
BPS datastore class.
Definition: bpsdatastore.h:61
A class for decimal arithmetics.
Definition: bpsdecimal.h:87
EPCIS utilities.
Definition: bpsepcis.h:17
BpsEpcis(BpsDatastore *aDatastore, QObject *aParent=nullptr)
static QString graiFromGs1Scan(const QString &aScanData)
Convert a GRAI scanned from a GS1-128 bar code into the format used in EPCIS.
void deleteEvents(const QVariantList &aKeys, KeyType aKeyType)
Create delete actions in the EPCIS queue table t_epcqueue for an EPCIS events existing in table t_epc...
QString SSCCtoSSCC18(const QString &aSscc) const
Convert a SSCC from EPCIS to scanner format (SSCC18).
int customPackLine() const
QString SSCC18toSSCC(const QString &aSscc18, int aGcpSize=0) const
Convert a scanned SSCC18 to the format used in EPCIS.
void createSsccEvents(const QVariant &aOrdertrip, const QString &aSscc)
Create new EPCIS events in table t_epcs and add actions in the EPCIS queue table t_epcqueue.
void setGraiUsed(const QString &aGrai)
Sets the GRAI's last use time to now.
void createGraiEvents(const QVariant &aOrdertrip, const QString &aGrai)
Create new EPCIS events in table t_epcs and add actions in the EPCIS queue table t_epcqueue.
bool graiIsLocked(const QString &aGrai) const
Check if the given GRAI is still locked or can be reused now.
QString makeSSCC() const
Create a SSCC from the prefix stored in the settings and sequence s_ssccval as serial number.
bool isEnabled() const
KeyType
Type of the keys to process.
Definition: bpsepcis.h:25
int graiReuseLockTime() const