7#ifndef LOGICALACCESS_CHIP_HPP
8#define LOGICALACCESS_CHIP_HPP
14#include <logicalaccess/lla_core_api.hpp>
19#define CHIP_UNKNOWN "UNKNOWN"
20#define CHIP_GENERICTAG "GenericTag"
36class LLA_CORE_API
Chip :
public IChip,
public std::enable_shared_from_this<Chip>
48 explicit Chip(std::string cardtype);
61 const std::string &getCardType()
const override;
67 std::string getGenericCardType()
const override;
73 virtual std::shared_ptr<LocationNode> getRootLocationNode();
90 d_commands = commands;
99 return d_chipIdentifier;
108 d_chipIdentifier = identifier;
117 return d_powerStatus;
126 d_powerStatus = powerStatus;
135 return d_receptionLevel;
144 d_receptionLevel = receptionLevel;
151 virtual std::shared_ptr<AccessInfo> createAccessInfo()
const;
157 virtual std::shared_ptr<Location> createLocation()
const;
164 std::shared_ptr<CardService> getService(
CardServiceType serviceType)
override;
168 return std::dynamic_pointer_cast<T>(getService(T::service_type_));
The base chip class for all chip. Each chip have is own object and providers according to himself and...
Definition: chip.hpp:37
virtual void setChipIdentifier(ByteVector identifier)
Set the chip identifier.
Definition: chip.hpp:106
bool operator<(const Chip &chip) const
Definition: chip.hpp:171
void setReceptionLevel(unsigned char receptionLevel)
Set the chip reception level.
Definition: chip.hpp:142
virtual ~Chip()
Destructor.
Definition: chip.hpp:53
ByteVector d_chipIdentifier
The chip identifier.
Definition: chip.hpp:185
ChipPowerStatus getPowerStatus() const
Get the chip power status.
Definition: chip.hpp:115
std::shared_ptr< T > getService()
Definition: chip.hpp:167
ChipPowerStatus d_powerStatus
The chip power status. Most chip doesn't have his own power supply.
Definition: chip.hpp:190
void setCommands(std::shared_ptr< Commands > commands)
Set commands.
Definition: chip.hpp:88
std::shared_ptr< Commands > d_commands
Commands object.
Definition: chip.hpp:195
std::string d_cardtype
The card type of the profile.
Definition: chip.hpp:180
unsigned char getReceptionLevel() const
Get the chip reception level.
Definition: chip.hpp:133
void setPowerStatus(ChipPowerStatus powerStatus)
Set the chip power status.
Definition: chip.hpp:124
std::shared_ptr< Commands > getCommands() const override
Get the commands.
Definition: chip.hpp:79
ByteVector getChipIdentifier() const override
Get the chip identifier.
Definition: chip.hpp:97
unsigned char d_receptionLevel
The chip reception level.
Definition: chip.hpp:200
The base abstract chip class for all chip.
Definition: ichip.hpp:22
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
ChipPowerStatus
The power status.
Definition: chip.hpp:25
@ CPS_POWER_LOW
Definition: chip.hpp:28
@ CPS_UNKNOWN
Definition: chip.hpp:27
@ CPS_NO_POWER
Definition: chip.hpp:26
@ CPS_POWER_HIGH
Definition: chip.hpp:29
CardServiceType
The card services.
Definition: cardservice.hpp:35