![]() |
Developer Application Interface (ARC API) v4.5.8
ARC, Inc. GenIV Application Interface
|
#include <CArcImagePacket.h>
Public Member Functions | |
CArcImagePacket (void) | |
CArcImagePacket (const CArcImagePacket &rPacket) | |
virtual | ~CArcImagePacket (void)=default |
virtual bool | headerValid (void) const noexcept override |
bool | endOfImage (void) const noexcept |
bool | endOfImage (const imagePacketHeader_t *pHeader) const noexcept |
void | assign (std::uint8_t *pData, std::uint32_t uiSize) |
void | assign (void) |
bool | hasMoreDataSections (void) const noexcept |
arc::gen4::dataSection_t | getNextDataSection (void) |
const std::string | getName (void) const override |
void | serialize (std::ostream &tStream) |
void | deserialize (std::istream &tStream) |
![]() | |
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 Public Attributes | |
static constexpr std::uint16_t | MAX_PACKET_SIZE = 1500 |
Protected Attributes | |
imagePacketHeader_t * | m_pHeader |
imageDataHeader_t * | m_pDataHeader |
std::uint16_t * | m_pNextDataSection |
std::uint16_t * | m_pPayload |
std::uint16_t * | m_pEndOfPacket |
bool | m_bHasMoreDataSections |
![]() | |
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 = 0xAA |
static constexpr std::uint32_t | EOI_RESERVED = 0x454F4949 |
![]() | |
static constexpr auto | MAX_PACKET_SIZE = static_cast< std::uint32_t >( 1024 ) |
![]() | |
static const std::string | m_sVersion |
Friends | |
std::ostream & | operator<< (std::ostream &tStream, const arc::gen4::CArcImagePacket &rPacket) |
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 |
Definition at line 62 of file CArcImagePacket.h.
arc::gen4::CArcImagePacket::CArcImagePacket | ( | void | ) |
Constructor
arc::gen4::CArcImagePacket::CArcImagePacket | ( | const CArcImagePacket & | rPacket | ) |
Copy constructor
rPacket | - The image packet to copy into this one. |
|
virtualdefault |
Destructor
|
overridevirtualnoexcept |
Returns whether or not the header contains valid values.
Implements arc::gen4::CArcPacket.
|
noexcept |
Returns whether or not the packet is a special end-of-image packet.
|
noexcept |
Returns whether or not the specified header the end-of-image indicator.
pHeader | - A pointer to an image packet header. |
void arc::gen4::CArcImagePacket::assign | ( | std::uint8_t * | pData, |
std::uint32_t | uiSize | ||
) |
Assign data to the packet.
pData | - The byte data to assign as the packet data. |
uiSize | - The number of bytes in the data buffer parameter. |
std::runtime_error | See specific packet types to details. |
std::invalid_argument | |
std::out_of_range | error if data too large for packet type. |
void arc::gen4::CArcImagePacket::assign | ( | void | ) |
Ensure proper object internals if the buffer data has been directly assigned instead of using the assign() method.
std::runtime | error |
|
noexcept |
Returns whether or not there are more sub-payload data sections within the packet.
arc::gen4::dataSection_t arc::gen4::CArcImagePacket::getNextDataSection | ( | void | ) |
Returns the next available image data section.
std::runtime_error | |
std::out_of_range | error |
|
overridevirtual |
Returns the packet name.
Any | exception thrown by std::string |
Implements arc::gen4::CArcPacket.
void arc::gen4::CArcImagePacket::serialize | ( | std::ostream & | tStream | ) |
Serialize the class object to the specified output stream. The packet is output using MAX_PACKET_SIZE.
tStream | - The output stream to place the output of the toLogString() method. |
Any | exception thrown by std::basic_ostream::write |
void arc::gen4::CArcImagePacket::deserialize | ( | std::istream & | tStream | ) |
Deserialize the class object from the specified input stream.
tStream | - The input stream to read the packet from. |
Any | exception thrown by std::basic_ostream::read |
|
friend |
Output toLogString() to the specified stream.
tStream | - The output stream to place the output of toLogString() method. |
Output arc::gen4::CArcImagePacket::toLogString() to the specified stream.
tStream | - The output stream to place the output of toLogString() method. |
|
staticconstexpr |
Maximum packet size ( in bytes )
Definition at line 130 of file CArcImagePacket.h.
|
staticconstexprprotected |
Payload identifier
Definition at line 153 of file CArcImagePacket.h.
|
staticconstexprprotected |
End-Of-Packet reserved value
Definition at line 156 of file CArcImagePacket.h.
|
protected |
Packet header pointer
Definition at line 159 of file CArcImagePacket.h.
|
protected |
Image data header pointer
Definition at line 162 of file CArcImagePacket.h.
|
protected |
Next image data pointer
Definition at line 165 of file CArcImagePacket.h.
|
protected |
Image packet payload pointer
Definition at line 168 of file CArcImagePacket.h.
|
protected |
Image packet end
Definition at line 171 of file CArcImagePacket.h.
|
protected |
End of data reached
Definition at line 174 of file CArcImagePacket.h.