![]() |
Developer Application Interface (ARC API) v4.5.8
ARC, Inc. GenIV Application Interface
|
#include <CArcCommandPacket.h>
Public Member Functions | |
CArcCommandPacket (const std::uint8_t uiId=0) | |
CArcCommandPacket (const arc::gen4::cmds_e tCmd, const std::uint8_t uiId=0) | |
CArcCommandPacket (const std::uint32_t uiCmd, const std::uint8_t uiId=0) | |
CArcCommandPacket (const std::vector< std::uint32_t > &vCmdList, const std::uint8_t uiId=0) | |
CArcCommandPacket (const std::vector< std::any > &vCmdList, const std::uint8_t uiId=0) | |
CArcCommandPacket (const arc::gen4::CArcCommandPacket &tObject)=delete | |
CArcCommandPacket & | operator= (const arc::gen4::CArcCommandPacket &tObject)=delete |
CArcCommandPacket (arc::gen4::CArcCommandPacket &&tObject) noexcept=delete | |
CArcCommandPacket & | operator= (arc::gen4::CArcCommandPacket &&tObject) noexcept=delete |
virtual | ~CArcCommandPacket (void)=default |
bool | headerValid (void) const noexcept override |
const std::string | getName (void) const override |
bool | isStartId (void) const noexcept |
std::uint32_t | command (void) const noexcept |
std::uint8_t | getDestination (void) const noexcept |
template<uint32Type... Args> | |
void | add (const Args... args) |
![]() | |
virtual | ~CArcPacket (void)=default |
constexpr std::uint32_t | headerLength (void) const noexcept |
constexpr std::uint32_t | headerByteLength (void) const noexcept |
std::uint8_t | packetId (void) const |
bool | checkPacketId (std::uint32_t uiHeader, std::uint8_t uiPacketId) const noexcept |
std::uint8_t | payloadId (void) const |
std::uint8_t | payloadLength (void) const |
std::uint32_t | payloadByteLength (void) const |
std::uint32_t * | payload (void) const noexcept |
void | add (const std::uint32_t uiValue) |
std::uint32_t | length (void) const noexcept |
std::uint32_t | byteLength (void) const noexcept |
std::uint32_t | maxByteLength (void) const noexcept |
std::uint32_t | maxLength (void) const noexcept |
std::uint32_t | at (const std::uint32_t uiIndex) const |
std::uint32_t & | operator[] (const std::uint32_t uiIndex) |
std::uint8_t * | data (void) const noexcept |
virtual const std::string | toString (void) const |
virtual const std::string | toLogString (void) const |
![]() | |
virtual | ~CArcBase (void) |
Static Protected Member Functions | |
static std::uint8_t | getNextId (void) |
Protected Attributes | |
std::uint32_t * | m_pCommand |
std::uint32_t * | m_pArgs |
![]() | |
packetHeader_t * | m_pHeader |
std::uint32_t * | m_pPayload |
std::unique_ptr< std::uint8_t[]> | m_pData |
std::uint32_t | m_uiSize |
Static Protected Attributes | |
static constexpr std::uint8_t | PAYLOAD_ID = 0xAC |
static const std::uint8_t | MAX_ID = 255 |
static std::uint8_t | m_uiId |
![]() | |
static constexpr auto | MAX_PACKET_SIZE = static_cast< std::uint32_t >( 1024 ) |
![]() | |
static const std::string | m_sVersion |
Additional Inherited Members | |
![]() | |
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::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) |
template<typename T > | |
static std::string | iterToString (T *begin, T *end, const char zSeperator=' ') |
static std::string | setDots (const std::string &sText, const std::size_t uiMaxLength, const char szDot='.') |
static std::string | trim (const std::string &sText) noexcept |
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 |
![]() | |
CArcPacket (const std::uint32_t uiSize=MAX_PACKET_SIZE) | |
void | incrementLength (const std::uint8_t uiIncr=1) noexcept |
![]() | |
CArcBase (void)=default | |
CArcBase (const CArcBase &)=delete | |
CArcBase (CArcBase &&)=delete | |
CArcBase & | operator= (const CArcBase &)=delete |
CArcBase & | operator= (CArcBase &&)=delete |
ARC GenIV command packet class. Controller commands are sent using this packet type.
Definition at line 39 of file CArcCommandPacket.h.
arc::gen4::CArcCommandPacket::CArcCommandPacket | ( | const std::uint8_t | uiId = 0 | ) |
Constructor
uiId | - The packet id. A value of zero results in auto id generation ( default = 0 ). |
arc::gen4::CArcCommandPacket::CArcCommandPacket | ( | const arc::gen4::cmds_e | tCmd, |
const std::uint8_t | uiId = 0 |
||
) |
Creates a new command packet using the specified command value and auto generated packet id.
tCmd | - A valid command from the arc::gen4::cmds_e enumeration. |
uiId | - The packet id. A value of zero results in auto id generation ( default = 0 ). |
arc::gen4::CArcCommandPacket::CArcCommandPacket | ( | const std::uint32_t | uiCmd, |
const std::uint8_t | uiId = 0 |
||
) |
Creates a new command packet using the specified command value and an auto generated packet id.
uiCmd | - A valid command value. |
uiId | - The packet id. A value of zero results in auto id generation ( default = 0 ). |
arc::gen4::CArcCommandPacket::CArcCommandPacket | ( | const std::vector< std::uint32_t > & | vCmdList, |
const std::uint8_t | uiId = 0 |
||
) |
Creates a new command packet using the specified command list and auto generated packet id.
vCmdList | - The command list. See std::vector for details. |
uiId | - The packet id. A value of zero results in auto id generation ( default = 0 ). |
arc::gen4::CArcCommandPacket::CArcCommandPacket | ( | const std::vector< std::any > & | vCmdList, |
const std::uint8_t | uiId = 0 |
||
) |
Creates a new command packet using the specified command list and auto generated packet id.
vCmdList | - The command list. See std::vector for details. The first argument must be of type arc::gen4::cmds_e. All remaining arguments must be of type unsigned int. Format is command, arg0, arg1, ... |
uiId | - The packet id. A value of zero results in auto id generation ( default = 0 ). |
|
delete |
Copy constructor. Removed since each command has a unique id and should not be copied.
tObject | - A arc::gen4::CArcCommandPacket instance to copy. |
|
deletenoexcept |
Move constructor. Removed since each command has a unique id and should not be copied.
tObject | - A arc::gen4::CArcCommandPacket instance to move. |
|
virtualdefault |
Destructor
|
delete |
Copy assignment constructor. Removed since each command has a unique id and should not be copied.
tObject | - A arc::gen4::CArcCommandPacket instance to copy. |
|
deletenoexcept |
Move assignment constructor. Removed since each command has a unique id and should not be copied.
tObject | - A arc::gen4::CArcCommandPacket instance to move. |
|
overridevirtualnoexcept |
Returns whether or not the header contains valid values.
Implements arc::gen4::CArcPacket.
Reimplemented in arc::gen4::CArcDLoadPacket.
|
overridevirtual |
Returns the packet name.
Any | exception thrown by std::string |
Implements arc::gen4::CArcPacket.
Reimplemented in arc::gen4::CArcDLoadPacket.
|
noexcept |
Returns whether or not the packet ID matches the initial start ID.
|
noexcept |
Returns the command code
|
noexcept |
Returns the command destination
|
inline |
Adds all the values (in order) to the end of the current payload.
uiCmdList | - One or more values to append to the current payload. All values must be of type std::uint32_t. |
std::out_of_range | exception if insertion goes beyond the maximum length of the packet. |
Definition at line 133 of file CArcCommandPacket.h.
|
staticprotected |
Increments and returns the next unique packet identifier, which is used to uniquely idenfity command packets.
|
staticconstexprprotected |
Payload identifier
Definition at line 146 of file CArcCommandPacket.h.
|
staticprotected |
Maximum packet ID value
Definition at line 154 of file CArcCommandPacket.h.
|
staticprotected |
Unique packet identifier
Definition at line 157 of file CArcCommandPacket.h.
|
protected |
Definition at line 159 of file CArcCommandPacket.h.
|
protected |
Definition at line 161 of file CArcCommandPacket.h.