Go to the documentation of this file.
31 #ifndef __STRUCTPORT_H
32 #define __STRUCTPORT_H
41 template <
class CDataStruct>
77 CDataStruct *pDataStruct =
static_cast<CDataStruct*
>(
this);
78 if( ( InternalAddress < 0 ) || (
Length < 0 ) || ( InternalAddress +
Length >
static_cast<int64_t>(
sizeof(CDataStruct) ) ) )
80 memcpy( pBuffer, (uint8_t*)pDataStruct + InternalAddress, (
size_t)
Length );
89 CDataStruct *pDataStruct =
static_cast<CDataStruct*
>(
this);
90 if( ( InternalAddress < 0 ) || (
Length < 0 ) || ( InternalAddress +
Length >
static_cast<int64_t>(
sizeof(CDataStruct) ) ) )
91 throw RUNTIME_EXCEPTION(
"CTestPortStruct::Write - Invalid address and/or length");
92 memcpy( (uint8_t*)pDataStruct + InternalAddress, pBuffer, (
size_t)
Length );
102 memset(
static_cast<CDataStruct*
>(
this), FillValue,
sizeof(CDataStruct) );
140 #endif // __STRUCTPORT_H
int64_t GetNumReads()
Returns the number of reads since lastReset Statistics.
void MemSet(const char FillValue)
Lexical analyzer for CIntSwissKnife.
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
Implements a register spaces based on a C++ struct.
void ResetStatistics()
Resets the read/write statistics.
virtual GENAPI_NAMESPACE::EInterfaceType GetPrincipalInterfaceType() const
Get the type of the main interface of a node.
int64_t GetNumWrites()
Returns the number of writes since lastReset Statistics.
int64_t m_NumReads
Number of reads since last reset.
int64_t m_BaseAddress
the base address used for the struct
CTestPortStruct(int64_t BaseAddress=0)
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
virtual void Read(void *pBuffer, int64_t Address, int64_t Length)
Reads a chunk of bytes from the port.
int64_t m_NumWrites
Number of writes since last reset.
@ intfIPort
IPort interface.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t Address
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t int64_t Length
virtual GENAPI_NAMESPACE::EAccessMode GetAccessMode() const
Get the access mode of the node.
virtual void Write(const void *pBuffer, int64_t Address, int64_t Length)
Writes a chunk of bytes to the port.
#define RUNTIME_EXCEPTION
Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:12