Developer Application Interface (ARC API) v4.5.9
ARC, Inc. GenIV Application Interface
arc::gen4::CArcBoardMap Class Reference

#include <CArcBoardMap.h>

Inheritance diagram for arc::gen4::CArcBoardMap:
arc::gen4::CArcBase

Public Types

typedef std::map< std::uint32_t, std::shared_ptr< std::vector< std::uint32_t > > >::iterator iterator
 
typedef std::map< std::uint32_t, std::shared_ptr< std::vector< std::uint32_t > > >::const_iterator const_iterator
 

Public Member Functions

 CArcBoardMap (const uint32_t *pMapData, const std::int32_t iLength)
 
 CArcBoardMap (void)=delete
 
 CArcBoardMap (const CArcBoardMap &tBoardMap)
 
CArcBoardMapoperator= (const CArcBoardMap &tBoardMap)
 
 CArcBoardMap (CArcBoardMap &&tBoardMap) noexcept
 
CArcBoardMapoperator= (CArcBoardMap &&tBoardMap) noexcept
 
 ~CArcBoardMap (void)=default
 
std::weak_ptr< std::vector< std::uint32_t > > findBoard (const std::uint32_t uiBoard) const
 
std::unique_ptr< std::vector< std::uint32_t > > boardNumbers (void) const
 
iterator begin (void) noexcept
 
const_iterator cbegin (void) noexcept
 
iterator end (void) noexcept
 
const_iterator cend (void) noexcept
 
const std::string toString (void) const noexcept
 
- Public Member Functions inherited from arc::gen4::CArcBase
virtual ~CArcBase (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from arc::gen4::CArcBase
static const std::string version (void)
 
static void zeroMemory (void *pDest, std::size_t uiSize)
 
static void copyMemory (void *pDest, void *pSrc, std::size_t uiSize)
 
template<typename T >
static std::tuple< T *, T * > copyAndIncrement (void *pDest, void *pSrc, const std::size_t uiSize)
 
template<typename ErrCode >
requires std::is_integral_v<ErrCode>
static const std::string getSystemErrorMessage (ErrCode iErrCode)
 
static const std::string getSystemErrorMessage (void)
 
static std::uint32_t getSystemError (void) noexcept
 
static pStringList_t splitString (const std::string &sString, const char &zDelim=' ')
 
static std::string formatString (const char *pszFmt,...)
 
static const std::filesystem::path incrementFileName (const std::filesystem::path &tFilePath="", const std::int32_t iStartValue=-1)
 
static std::filesystem::path getFileName (const std::string &sFilter="Gen IV Microcontroller binary file\0*.bin\0All\0*.*\0"s) noexcept
 
static std::string convertWideToAnsi (const wchar_t wzString[]) noexcept
 
static std::string convertWideToAnsi (const std::wstring &wsString)
 
static std::wstring convertAnsiToWide (const char *pszString)
 
static std::string cmdToString (const std::uint32_t uiCmd)
 
static std::string uintToString (const std::uint32_t uiValue) noexcept
 
template<typename T >
static std::string iterToString (T *begin, T *end, const char zSeperator=' ')
 
static std::unique_ptr< std::uint8_t[]> readFileBytes (const std::filesystem::path &tFilePath, std::uint32_t &uiFileLength)
 
static std::string setDots (std::string_view svText, const std::size_t uiMaxLength, const char szDot='.')
 
static std::string trim (const std::string &sText) noexcept
 
static std::size_t replaceAll (std::string &sText, std::string_view svWhat, std::string_view svWith)
 
static float uintToFloat (const std::uint32_t uiValue)
 
static const std::chrono::time_point< std::chrono::high_resolution_clock > startCodeTime (void) noexcept
 
template<typename T >
static constexpr auto endCodeTime (const std::chrono::time_point< std::chrono::high_resolution_clock > tStartTimePoint) noexcept
 
- Protected Member Functions inherited from arc::gen4::CArcBase
 CArcBase (void)=default
 
 CArcBase (const CArcBase &)=delete
 
 CArcBase (CArcBase &&)=delete
 
CArcBaseoperator= (const CArcBase &)=delete
 
CArcBaseoperator= (CArcBase &&)=delete
 
- Static Protected Attributes inherited from arc::gen4::CArcBase
static const std::string m_sVersion
 

Detailed Description

Controller board mapping class. This class describes the board locations in the controller.

See also
arc::gen4::CArcBase

Definition at line 36 of file CArcBoardMap.h.

Member Typedef Documentation

◆ iterator

typedef std::map<std::uint32_t,std::shared_ptr<std::vector<std::uint32_t>>>::iterator arc::gen4::CArcBoardMap::iterator

Returns an iterator to the first element of the board map. If the map is empty, the returned iterator will be equal to end(). The .first map value contains the board number (420, 400, etc). The .second map value contains a list of the board slot numbers in the controller stack. Iterator for the board mapping

Definition at line 44 of file CArcBoardMap.h.

◆ const_iterator

typedef std::map<std::uint32_t,std::shared_ptr<std::vector<std::uint32_t>>>::const_iterator arc::gen4::CArcBoardMap::const_iterator

Returns a constant iterator to the first element of the board map. If the map is empty, the returned iterator will be equal to end(). The .first map value contains the board number (420, 400, etc). The .second map value contains a list of the board slot numbers in the controller stack. Constant iterator for the board mapping

Definition at line 50 of file CArcBoardMap.h.

Constructor & Destructor Documentation

◆ CArcBoardMap() [1/4]

arc::gen4::CArcBoardMap::CArcBoardMap ( const uint32_t *  pMapData,
const std::int32_t  iLength 
)

Constructor

Parameters
pMapData- The controller mapping data as returned by the 'GBMP' command. Bits 0-28 of each data value are the ARC board number, while bits 28-31 are the board slot number (position) within the controller stack.
iLength- The number of 32-bit dwords in the map data parameter

◆ CArcBoardMap() [2/4]

arc::gen4::CArcBoardMap::CArcBoardMap ( void  )
delete

Delete default constructor

◆ CArcBoardMap() [3/4]

arc::gen4::CArcBoardMap::CArcBoardMap ( const CArcBoardMap tBoardMap)

Copy constructor

Parameters
tBoardMap- The CArcBoardMap to copy into this instance.

◆ CArcBoardMap() [4/4]

arc::gen4::CArcBoardMap::CArcBoardMap ( CArcBoardMap &&  tBoardMap)
noexcept

Move constructor

◆ ~CArcBoardMap()

arc::gen4::CArcBoardMap::~CArcBoardMap ( void  )
default

Default destructor

Member Function Documentation

◆ operator=() [1/2]

CArcBoardMap & arc::gen4::CArcBoardMap::operator= ( const CArcBoardMap tBoardMap)

Copy assignment constructor

◆ operator=() [2/2]

CArcBoardMap & arc::gen4::CArcBoardMap::operator= ( CArcBoardMap &&  tBoardMap)
noexcept

Move assignment constructor

◆ findBoard()

std::weak_ptr< std::vector< std::uint32_t > > arc::gen4::CArcBoardMap::findBoard ( const std::uint32_t  uiBoard) const

Find all the slot positions for the specified ARC board number.

Parameters
uiBoard- The ARC board number to search for. Can be one of 420 (timing), 430 (clock driver), 440 (video) or 480 (power supply).
Returns
A pointer to the list of found slot numbers for the specified ARC board number or nullptr if no boards with the specified number are found.
Exceptions
std::out_of_range

◆ boardNumbers()

std::unique_ptr< std::vector< std::uint32_t > > arc::gen4::CArcBoardMap::boardNumbers ( void  ) const

Returns all the ARC board numbers from the mapping

Returns
A pointer to a list of the ARC board numbers in the mapping.
Exceptions
Anyexception thrown by std::vector

◆ begin()

iterator arc::gen4::CArcBoardMap::begin ( void  )
noexcept

Returns an iterator to the first element of the board map. If the map is empty, the returned iterator will be equal to end().

◆ cbegin()

const_iterator arc::gen4::CArcBoardMap::cbegin ( void  )
noexcept

Returns a constant iterator to the first element of the board map. If the container is empty, the returned iterator will be equal to end().

◆ end()

iterator arc::gen4::CArcBoardMap::end ( void  )
noexcept

Returns an iterator to the element following the last element of the board map. This element acts as a placeholder; attempting to access it results in undefined behavior.

◆ cend()

const_iterator arc::gen4::CArcBoardMap::cend ( void  )
noexcept

Returns a constant iterator to the element following the last element of the board map. This element acts as a placeholder; attempting to access it results in undefined behavior.

◆ toString()

const std::string arc::gen4::CArcBoardMap::toString ( void  ) const
noexcept

Return a string representation for the board mapping. The format of this mapping may change at any time.

Returns
A string representation for the board mapping