LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
logicalaccess::FeliCaCommands Class Referenceabstract

The FeliCa commands class. More...

#include <felicacommands.hpp>

Inheritance diagram for logicalaccess::FeliCaCommands:
logicalaccess::Commands logicalaccess::ICommands logicalaccess::FeliCaSCMCommands logicalaccess::FeliCaSpringCardCommands

Public Member Functions

 FeliCaCommands ()
 
 FeliCaCommands (std::string ct)
 
virtual std::vector< unsigned short > getSystemCodes ()=0
 Get system codes.
 
virtual unsigned short requestService (unsigned short code)
 
virtual std::vector< unsigned short > requestServices (const std::vector< unsigned short > &codes)=0
 Request Services / Area versions.
 
virtual unsigned char requestResponse ()=0
 Request Response, current FeliCa mode.
 
virtual ByteVector read (unsigned short code, unsigned short block)
 
virtual ByteVector read (unsigned short code, const std::vector< unsigned short > &blocks)
 
virtual ByteVector read (const std::vector< unsigned short > &codes, const std::vector< unsigned short > &blocks)=0
 Read data from the chip.
 
virtual void write (unsigned short code, const std::vector< unsigned short > &blocks, const ByteVector &data)
 
virtual void write (unsigned short code, unsigned short block, const ByteVector &data)
 
virtual void write (const std::vector< unsigned short > &codes, const std::vector< unsigned short > &blocks, const ByteVector &data)=0
 Write data to the chip.
 
- Public Member Functions inherited from logicalaccess::Commands
 Commands ()=delete
 Constructor.
 
virtual ~Commands ()
 
std::shared_ptr< ChipgetChip () const override
 Get the chip.
 
virtual void setChip (std::shared_ptr< Chip > chip)
 Set the chip.
 
std::shared_ptr< ReaderCardAdaptergetReaderCardAdapter () const override
 Get the reader/card adapter.
 
virtual void setReaderCardAdapter (std::shared_ptr< ReaderCardAdapter > adapter)
 Set the reader/card adapter.
 
virtual const std::string & getCmdType () const
 Get the cmd name.
 
virtual void setCmdType (const std::string &command_type)
 Set the cmd name.
 
- Public Member Functions inherited from logicalaccess::ICommands
virtual ~ICommands ()=default
 
virtual std::shared_ptr< ChipgetChip () const =0
 Get the chip.
 
virtual std::shared_ptr< ReaderCardAdaptergetReaderCardAdapter () const =0
 Get the reader/card adapter.
 

Additional Inherited Members

- Protected Member Functions inherited from logicalaccess::Commands
 Commands (std::string commandtype)
 Constructor.
 
- Protected Attributes inherited from logicalaccess::Commands
std::shared_ptr< ReaderCardAdapterd_readerCardAdapter
 The reader/card adapter.
 
std::weak_ptr< Chipd_chip
 The chip.
 
std::string d_commandtype
 The command type.
 

Detailed Description

The FeliCa commands class.

Constructor & Destructor Documentation

◆ FeliCaCommands() [1/2]

logicalaccess::FeliCaCommands::FeliCaCommands ( )
inline

◆ FeliCaCommands() [2/2]

logicalaccess::FeliCaCommands::FeliCaCommands ( std::string  ct)
inlineexplicit

Member Function Documentation

◆ getSystemCodes()

virtual std::vector< unsigned short > logicalaccess::FeliCaCommands::getSystemCodes ( )
pure virtual

Get system codes.

Returns
System codes list.

Implemented in logicalaccess::FeliCaSCMCommands, and logicalaccess::FeliCaSpringCardCommands.

◆ read() [1/3]

virtual ByteVector logicalaccess::FeliCaCommands::read ( const std::vector< unsigned short > &  codes,
const std::vector< unsigned short > &  blocks 
)
pure virtual

Read data from the chip.

Parameters
codesService / Area codes list.
blocksBlocks list.
Returns
Data read.

Implemented in logicalaccess::FeliCaSCMCommands, and logicalaccess::FeliCaSpringCardCommands.

◆ read() [2/3]

ByteVector logicalaccess::FeliCaCommands::read ( unsigned short  code,
const std::vector< unsigned short > &  blocks 
)
virtual

◆ read() [3/3]

ByteVector logicalaccess::FeliCaCommands::read ( unsigned short  code,
unsigned short  block 
)
virtual

◆ requestResponse()

virtual unsigned char logicalaccess::FeliCaCommands::requestResponse ( )
pure virtual

Request Response, current FeliCa mode.

Returns
FeliCa mode (0/1/2).

Implemented in logicalaccess::FeliCaSCMCommands, and logicalaccess::FeliCaSpringCardCommands.

◆ requestService()

unsigned short logicalaccess::FeliCaCommands::requestService ( unsigned short  code)
virtual

◆ requestServices()

virtual std::vector< unsigned short > logicalaccess::FeliCaCommands::requestServices ( const std::vector< unsigned short > &  codes)
pure virtual

Request Services / Area versions.

Parameters
codesService / Area codes list.
Returns
Service / Area versions.

Implemented in logicalaccess::FeliCaSCMCommands, and logicalaccess::FeliCaSpringCardCommands.

◆ write() [1/3]

virtual void logicalaccess::FeliCaCommands::write ( const std::vector< unsigned short > &  codes,
const std::vector< unsigned short > &  blocks,
const ByteVector data 
)
pure virtual

Write data to the chip.

Parameters
codesService / Area codes list.
blocksBlocks list.
dataData to write.

Implemented in logicalaccess::FeliCaSCMCommands, and logicalaccess::FeliCaSpringCardCommands.

◆ write() [2/3]

void logicalaccess::FeliCaCommands::write ( unsigned short  code,
const std::vector< unsigned short > &  blocks,
const ByteVector data 
)
virtual

◆ write() [3/3]

void logicalaccess::FeliCaCommands::write ( unsigned short  code,
unsigned short  block,
const ByteVector data 
)
virtual

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