31 #ifndef GENAPI_CHUNKPORT_H 32 #define GENAPI_CHUNKPORT_H 39 # pragma warning(push) 40 # pragma warning(disable: 4251) // GenApi::CChunkPort::m_ptrPort' : class 'GenApi::CPointer<T>' needs to have dll-interface 104 void AttachChunk(uint8_t *pBaseAddress,
int64_t ChunkOffset,
int64_t Length,
bool Cache);
112 return m_ChunkIDLength;
116 bool CheckChunkID(uint8_t* pChunkIDBuffer,
int ChunkIDLength);
119 bool CheckChunkID(uint64_t ChunkID);
122 void UpdateBuffer(uint8_t *pBaseAddress);
130 if (!m_ptrPort.IsValid())
133 return m_ptrPort->GetNodeMap()->GetLock();
177 # pragma warning(pop) 180 #endif // GENAPI_CHUNKPORT_H uint8_t * m_pBaseAddress
Pointer to the begin of the buffer.
virtual void InvalidateNode()=0
Indicates that the node's value may have changed.
int64_t m_Length
Length of the chunk.
uint8_t * m_pChunkData
cache for the chunk data
interface GENAPI_DECL_ABSTRACT IPort
Interface for ports.
int GetChunkIDLength()
Gets the ChunkID length.
int64_t m_LengthAlloc
Space allocated for the chunk.
#define RUNTIME_EXCEPTION
Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
virtual EYesNo GetSwapEndianess()
Determines if the port adapter must perform an endianess swap.
CNodePtr m_ptrPort
Pointer to the node holding a reference to this implementation.
interface GENAPI_DECL_ABSTRACT int64_t Address
enum GENAPI_NAMESPACE::_EYesNo EYesNo
Defines the choices of a Yes/No alternatives.
Definition of interface INodeMap.
Definition of interface IPortConstruct.
interface GENAPI_DECL_ABSTRACT int64_t int64_t Length
Definition of template CPointer.
Port attachable to a chunk in a buffer.
uint8_t * m_pChunkIDBuffer
Binary version of the chunk ID.
interface GENAPI_DECL_ABSTRACT IPortConstruct
Interface for ports.
virtual EInterfaceType GetPrincipalInterfaceType() const =0
Get the type of the main interface of a node.
uint64_t m_ChunkIDNumber
Chunk ID stored as a number (for more straightforward access)
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
int m_ChunkIDLength
Length of the chunk ID buffer.
int64_t m_ChunkOffset
The chunk's offset within the buffer.
bool m_ChunkIDNumberValid
indicates if the m_ChunkIDNumber is valid (could be invalid eg. if the ID does not fit in 64-bit rang...
virtual void Write(const void *pBuffer, int64_t Address, int64_t Length)=0
Writes a chunk of bytes to the port.
bool m_CacheData
indicates if the data needs to be cached
Part of the generic device API.
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type