Keyple C++
0.9.0
Keyple, an Open Source SDK for Ticketing
|
#include <SamResourceManager.h>
Inherits keyple::core::selection::SeResource< CalypsoSam >.
Public Types | |
enum | SamResourceStatus { SamResourceStatus::FREE, SamResourceStatus::BUSY } |
Public Member Functions | |
ManagedSamResource (std::shared_ptr< SeReader > seReader, std::shared_ptr< CalypsoSam > calypsoSam) | |
bool | isSamResourceFree () const |
void | setSamIdentifier (std::shared_ptr< SamIdentifier > samIdentifier) |
bool | isSamMatching (const std::shared_ptr< SamIdentifier > samIdentifier) const |
void | setSamResourceStatus (const SamResourceStatus &samResourceStatus) |
![]() | |
SeResource (std::shared_ptr< SeReader > seReader, std::shared_ptr< CalypsoSam > matchingSe) | |
virtual | ~SeResource () |
virtual const std::shared_ptr< SeReader > | getSeReader () const |
virtual const std::shared_ptr< CalypsoSam > | getMatchingSe () const |
(package-private)
Inner class to handle specific attributes associated with an
in the SamResourceManager context.
keyple::calypso::transaction::ManagedSamResource::ManagedSamResource | ( | std::shared_ptr< SeReader > | seReader, |
std::shared_ptr< CalypsoSam > | calypsoSam | ||
) |
Constructor
seReader | the keyple::core::seproxy::SeReader with which the SE is communicating |
calypsoSam | the keyple::calypso::transaction::CalypsoSam information structure |
bool keyple::calypso::transaction::ManagedSamResource::isSamMatching | ( | const std::shared_ptr< SamIdentifier > | samIdentifier | ) | const |
Indicates whether the ManagedSamResource matches the provided SAM identifier.
The test includes the keyple::calypso::command::sam::SamRevision, serial number and group reference provided by the keyple::calypso::transaction::SamIdentifier.
The SAM serial number can be null or empty, in this case all serial numbers are accepted. It can also be a regular expression target one or more specific serial numbers.
The groupe reference can be null or empty to let all group references match but not empty the group reference must match the keyple::calypso::transaction::SamIdentifier to have the method returning true.
samIdentifier | the SAM identifier |
bool keyple::calypso::transaction::ManagedSamResource::isSamResourceFree | ( | ) | const |
Indicates whether the ManagedSamResource is FREE or BUSY
void keyple::calypso::transaction::ManagedSamResource::setSamIdentifier | ( | std::shared_ptr< SamIdentifier > | samIdentifier | ) |
Defines the keyple::calypso::transaction::SamIdentifier of the current keyple::calypso::transaction::SamResourceManager::ManagedSamResource
samIdentifier | the SAM identifier |
void keyple::calypso::transaction::ManagedSamResource::setSamResourceStatus | ( | const SamResourceStatus & | samResourceStatus | ) |
Sets the free/busy status of the ManagedSamResource
samResourceStatus | FREE/BUSY enum value |