BPS C++ API  2.24.4
BpsEpcis Class Reference

EPCIS utilities. More...

#include <bpsepcis.h>

+ Inheritance diagram for BpsEpcis:

Public Types

enum  KeyType { Picks = 0 , Items = 1 }
 Type of the keys to process. More...
 

Public Member Functions

 BpsEpcis (BpsDatastore *aDatastore, QObject *aParent=nullptr)
 
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. More...
 
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. More...
 
int customPackLine () const
 
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_epcevents. More...
 
bool graiIsLocked (const QString &aGrai) const
 Check if the given GRAI is still locked or can be reused now. More...
 
int graiReuseLockTime () const
 
bool isEnabled () const
 
QString makeSSCC () const
 Create a SSCC from the prefix stored in the settings and sequence s_ssccval as serial number. More...
 
void setGraiUsed (const QString &aGrai)
 Sets the GRAI's last use time to now. More...
 
QString SSCC18toSSCC (const QString &aSscc18, int aGcpSize=0) const
 Convert a scanned SSCC18 to the format used in EPCIS. More...
 
QString SSCCtoSSCC18 (const QString &aSscc) const
 Convert a SSCC from EPCIS to scanner format (SSCC18). More...
 
- Public Member Functions inherited from QObject
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
 QObject (QObject *parent)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static QString graiFromGs1Scan (const QString &aScanData)
 Convert a GRAI scanned from a GS1-128 bar code into the format used in EPCIS. More...
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

EPCIS utilities.

Member Enumeration Documentation

◆ KeyType

Type of the keys to process.

Enumerator
Picks 

Keys of t_orderpicks.

Items 

Keys of t_orderitems.

Constructor & Destructor Documentation

◆ BpsEpcis()

BpsEpcis::BpsEpcis ( BpsDatastore aDatastore,
QObject aParent = nullptr 
)
Parameters
aDatastoreThe datastore object to use.
aParentPointer to an optional parent object.

Member Function Documentation

◆ createGraiEvents()

void BpsEpcis::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.

Parameters
aOrdertripKey of the order trip (t_ordertrips.c_key).
aGraiThe GRAI to create events for. Example: "7613264.00381.100000103035"

◆ createSsccEvents()

void BpsEpcis::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.

Parameters
aOrdertripKey of the order trip (t_ordertrips.c_key).
aSsccThe SSSCC in EPCIS format to create events for. Example: "7617007.3000999991"

◆ customPackLine()

int BpsEpcis::customPackLine ( ) const
Returns
Packing line number to be used for custom orders packing events. -1 = dont create packing events.

◆ deleteEvents()

void BpsEpcis::deleteEvents ( const QVariantList &  aKeys,
KeyType  aKeyType 
)

Create delete actions in the EPCIS queue table t_epcqueue for an EPCIS events existing in table t_epcevents.

The method does nothing where no record with the GRAI is found in t_epcevents.

Parameters
aKeysList of keys from order picks or items.
aKeyTypeType of the keys (t_orderpicks.c_key or t_orderitems.c_key).

◆ graiFromGs1Scan()

static QString BpsEpcis::graiFromGs1Scan ( const QString aScanData)
static

Convert a GRAI scanned from a GS1-128 bar code into the format used in EPCIS.

Parameters
aScanDataThe GRAI data as scanned. Example: "07613264003071100007072055".
Returns
The GRAI in EPCIS format. Example: "7613264.00307.100007072055".

◆ graiIsLocked()

bool BpsEpcis::graiIsLocked ( const QString aGrai) const

Check if the given GRAI is still locked or can be reused now.

May throw a BpsException if internal db query fails.

Parameters
aGraiThe GRAI to be checked. Example: "7613264.00381.100000103035"
Returns
True if the GRAI is still locked for reuse.

◆ graiReuseLockTime()

int BpsEpcis::graiReuseLockTime ( ) const
Returns
Number of hours after a GRAI can be reused. 0 = immediate.

◆ isEnabled()

bool BpsEpcis::isEnabled ( ) const
Returns
True if EPCIS interface is enabled.

◆ makeSSCC()

QString BpsEpcis::makeSSCC ( ) const

Create a SSCC from the prefix stored in the settings and sequence s_ssccval as serial number.

The prefix should be the GS1 Company Prefix (4 to 12 digits), followed by a dot and more optional fixed digits identifying this BPS system in case you have multiple systems creating SSCC's. The total size of the prefix should not exceed 13 characters, leaving at least 5 for the running number.

The prefix is stored in the value EPCIS/SsccPrefix in the Central System Settings.

Returns
The created SSCC in EPCIS format. Example: "7617007.3000999991"

◆ setGraiUsed()

void BpsEpcis::setGraiUsed ( const QString aGrai)

Sets the GRAI's last use time to now.

May throw a BpsException if internal db action fails.

Parameters
aGraiThe GRAI to be set as used by now. Example: "7613264.00381.100000103035"

◆ SSCC18toSSCC()

QString BpsEpcis::SSCC18toSSCC ( const QString aSscc18,
int  aGcpSize = 0 
) const

Convert a scanned SSCC18 to the format used in EPCIS.

The partitioning depends on the size of the GS1 Company Prefix. If the value given in aGcpSize is not in the valid range, it is taken from SSCC prefix in the Central System Settings in EPCIS/SsccPrefix.

Parameters
aSscc18The SSCC to convert. Example: "376170070009999913"
aGcpSizeSize of the GS1 Company Prefix. Valid range is 4 to 12.
Returns
The SSCC in EPCIS format. Example: "7617007.3000999991"

◆ SSCCtoSSCC18()

QString BpsEpcis::SSCCtoSSCC18 ( const QString aSscc) const

Convert a SSCC from EPCIS to scanner format (SSCC18).

Parameters
aSsccThe SSCC in EPCIS format to convert. Example: "7617007.3000999991"
Returns
The SSCC in scanner format. Example: "376170070009999913"

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