30 #ifndef GENAPI_REGISTERT_H 31 #define GENAPI_REGISTERT_H 33 #include "../IRegister.h" 34 #include "GenApi/impl/Log.h" 39 # define _snprintf snprintf 46 # pragma warning ( push ) 47 # pragma warning ( disable : 4996 ) // depcretaced function 62 std::list<CNodeCallback*> CallbacksToFire;
65 typename Base::EntryMethodFinalizer E(
this,
meSet );
72 static const char fmt[] =
74 static const int BufferLen(256);
77 int BufferLeft(
_snprintf(_pBuffer, BufferLen, fmt, Length));
80 for(
int i = 0; i <
Length; i++)
82 const int n =
_snprintf(_pBuffer + BufferLeft,
83 BufferLen - BufferLeft,
84 "%02X", (
unsigned int) pBuffer[i]);
85 #pragma BullseyeCoverage off 89 if (BufferLeft + n >= BufferLen)
92 #pragma BullseyeCoverage on 104 typename Base::PostSetValueFinalizer PostSetValueCaller(
this, CallbacksToFire);
107 Base::InternalSet(pBuffer, Length,
Verify);
112 Base::InternalCheckError();
118 std::list<CNodeCallback*>::iterator ptrCallback;
119 for( ptrCallback = CallbacksToFire.begin(); ptrCallback != CallbacksToFire.end(); ptrCallback++ )
126 std::list<CNodeCallback*>::iterator ptrCallback;
127 for( ptrCallback = CallbacksToFire.begin(); ptrCallback != CallbacksToFire.end(); ptrCallback++ )
138 typename Base::EntryMethodFinalizer E(
this,
meGet, IgnoreCache );
146 Base::InternalGet(pBuffer, Length,
Verify, IgnoreCache );
150 Base::InternalCheckError();
156 static const char fmt[] =
157 "...Get( %" FMT_I64 "d ) = 0x";
159 static const int BufferLen( 256 );
161 int BufferLeft(
_snprintf( _pBuffer, BufferLen, fmt, Length ) );
164 for (
int i = 0; i <
Length; i++)
166 const int n =
_snprintf( _pBuffer + BufferLeft,
167 BufferLen - BufferLeft,
168 "%02X", (
unsigned int) pBuffer[i] );
169 #pragma BullseyeCoverage off 174 if (BufferLeft + n >= BufferLen)
177 #pragma BullseyeCoverage on 190 return Base::InternalGetLength(
Verify);
198 return Base::InternalGetAddress(
Verify,
false);
203 # pragma warning ( pop ) 208 #endif // GENAPI_REGISTERT_H virtual int64_t GetLength(bool Verify=false)
Implementation of IRegister::GetLength()
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Implementation of the IRegister interface.
bool IsReadable(EAccessMode AccessMode)
Tests if readable.
virtual int64_t GetAddress(bool Verify=false)
Retrieves the Address of the register.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT int64_t int64_t Length
static bool Exist(const gcstring &LoggerName)
Checks if a category/logger exists First checks the local logger map Finally checks via ILoggerFactor...
#define ACCESS_EXCEPTION_NODE
Fires a access error exception, e.g. throw ACCESS_ERROR_EXCEPTION("Not everybody") ...
virtual void Get(uint8_t *pBuffer, int64_t Length, bool Verify=false, bool IgnoreCache=false)
Implementation of IRegister::Get()
Definition of macros for cross-platform compatibility.
#define GCLOGINFOPUSH(cat,...)
virtual void Set(const uint8_t *pBuffer, int64_t Length, bool Verify=true)
Implementation of IRegister::Set()
bool IsWritable(EAccessMode AccessMode)
Tests if writable.
#define GCLOGINFOPOP(cat,...)
Lexical analyzer for CIntSwissKnife.
callback is fired on leaving the tree inside the lock-guarded area
virtual CLock & GetLock() const =0
Returns the lock which guards the node map.