java.lang.Object | |
↳ | com.datalogic.itemtracking.ItemTrackingManager.Session |
The item tracking session created by the manager. It is used to control the execution of the item tracking algorithm. The session operates in the following states:
STOPPED
: This is the initial state where the algorithm is stopped
and all internal variables are reset. In this state, registered event listeners
will not be triggered. This state is suitable for starting a new session or resetting the algorithm.
Transition to STARTED
is possible by calling start()
.
STARTED
: In this state the algorithm is actively running and
registered event listeners are notified whenever a new item tracking event occurs.
Transition to STOPPED
is possible by calling stop()
and
transition to PAUSED
is possible by calling pause()
.
PAUSED
: In this state the algorithm is temporarily paused. Internal
variables are preserved, but registered event listeners are not triggered since
the algorithm is not running. Transition to STOPPED
is possible by
calling stop()
and transition to STARTED
is possible by
calling start()
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ItemTrackingManager.Session.State | Represents the state of the item tracking session, indicating the current execution status of the item tracking algorithm. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the current state of the item tracking session.
| |||||||||||
Pauses the item tracking algorithm without clearing its internal state.
| |||||||||||
Releases the current item tracking session, making it unavailable for further use.
| |||||||||||
Starts the item tracking algorithm.
| |||||||||||
Stops the item tracking algorithm and clears its internal state.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Retrieves the current state of the item tracking session.
The state indicates the current execution status of the item tracking algorithm
and can be one of the following:
ItemTrackingManager.Session.State
enum value.
Pauses the item tracking algorithm without clearing its internal state.
This method transitions the algorithm from the STARTED
state to the PAUSED
state.
In the PAUSED
state:
STARTED
state.PAUSED
state.SUCCESS
if the operation is successful, or an error code
corresponding to one of the ItemTrackingException
constants in case of failure.ItemTrackingException | if an error occurs and exceptions are enabled through the
ErrorManager singleton. The exception will contain details about the error.
|
---|
Releases the current item tracking session, making it unavailable for further use.
After calling this method:
start()
, stop()
, and pause()
) will fail.ItemTrackingManager manager = new ItemTrackingManager(); ItemTrackingManager.Session session = manager.createSession(); if (session != null) { session.start(); // Perform item tracking operations... session.release(); // Ensure the session is released when done. }
Starts the item tracking algorithm.
This method transitions the algorithm from the STOPPED
or PAUSED
state
to the STARTED
state, enabling real-time item tracking.
Preconditions:
STARTED
state, and registered event
listeners will begin receiving notifications for item tracking events.SUCCESS
if the operation is successful, or an error code
corresponding to one of the ItemTrackingException
constants in case of failure.ItemTrackingException | if an error occurs and exceptions are enabled through the
ErrorManager singleton. The exception will contain details about the error.
|
---|
Stops the item tracking algorithm and clears its internal state.
This method transitions the algorithm from the STARTED
or PAUSED
state
to the STOPPED
state, resetting all internal variables.
Preconditions:
STOPPED
state, and all internal variables
will be reset to their initial state.SUCCESS
if the operation is successful, or an error code
corresponding to one of the ItemTrackingException
constants in case of failure.ItemTrackingException | if an error occurs and exceptions are enabled through the
ErrorManager singleton. The exception will contain details about the error.
|
---|