Public Member Functions | Protected Member Functions | Protected Attributes
GENAPI_NAMESPACE::CChunkPort Class Reference

Port attachable to a chunk in a buffer. More...

#include <ChunkPort.h>

List of all members.

Public Member Functions

void AttachChunk (uint8_t *pBaseAddress, int64_t ChunkOffset, int64_t Length, bool Cache)
 Attaches the Chunk to the ChunkPort.
bool AttachPort (GENAPI_NAMESPACE::IPort *pPort)
 Attaches the ChunkPort to the Port.
 CChunkPort (IPort *pPort=NULL)
 Constructor; can attach to a port.
bool CheckChunkID (uint8_t *pChunkIDBuffer, int ChunkIDLength)
 Checks if a ChunkID matches.
bool CheckChunkID (uint64_t ChunkID)
 Checks if a ChunkID matches, version using uint64_t ID representation.
void ClearCache ()
 Clears the chunk cache.
void DetachChunk ()
 Detaches the Chunk from the ChunkPort.
void DetachPort ()
 Detaches the ChunkPort to the Port.
virtual EAccessMode GetAccessMode () const
 Get the access mode of the node.
int GetChunkIDLength ()
 Gets the ChunkID length.
virtual EInterfaceType GetPrincipalInterfaceType () const
 Get the type of the main interface of a node.
virtual EYesNo GetSwapEndianess ()
 Determines if the port adapter must perform an endianess swap.
void InvalidateNode ()
virtual void Read (void *pBuffer, int64_t Address, int64_t Length)
 Reads a chunk of bytes from the port.
virtual void SetPortImpl (GENAPI_NAMESPACE::IPort *pPort)
 Called from the port node to give the chunk port a pointer to itself.
void UpdateBuffer (uint8_t *pBaseAddress)
 Updates the base address of the chunk.
virtual void Write (const void *pBuffer, int64_t Address, int64_t Length)
 Writes a chunk of bytes to the port.
virtual ~CChunkPort ()
 Destructor; detaches from the port.

Protected Member Functions

CLockGetLock () const

Protected Attributes

bool m_CacheData
 indicates if the data needs to be cached
int m_ChunkIDLength
 Length of the chunk ID buffer.
uint64_t m_ChunkIDNumber
 Chunk ID stored as a number (for more straightforward access)
bool m_ChunkIDNumberValid
 indicates if the m_ChunkIDNumber is valid (could be invalid eg. if the ID does not fit in 64-bit range)
int64_t m_ChunkOffset
 The chunk's offset within the buffer.
int64_t m_Length
 Length of the chunk.
int64_t m_LengthAlloc
 Space allocated for the chunk.
uint8_t * m_pBaseAddress
 Pointer to the begin of the buffer.
uint8_t * m_pChunkData
 cache for the chunk data
uint8_t * m_pChunkIDBuffer
 Binary version of the chunk ID.
CNodePtr m_ptrPort
 Pointer to the node holding a reference to this implementation.

Detailed Description

Port attachable to a chunk in a buffer.

Definition at line 48 of file ChunkPort.h.


Constructor & Destructor Documentation

Constructor; can attach to a port.

Destructor; detaches from the port.


Member Function Documentation

void GENAPI_NAMESPACE::CChunkPort::AttachChunk ( uint8_t *  pBaseAddress,
int64_t  ChunkOffset,
int64_t  Length,
bool  Cache 
)

Attaches the Chunk to the ChunkPort.

Attaches the ChunkPort to the Port.

bool GENAPI_NAMESPACE::CChunkPort::CheckChunkID ( uint8_t *  pChunkIDBuffer,
int  ChunkIDLength 
)

Checks if a ChunkID matches.

Checks if a ChunkID matches, version using uint64_t ID representation.

Clears the chunk cache.

Detaches the Chunk from the ChunkPort.

Detaches the ChunkPort to the Port.

Get the access mode of the node.

Gets the ChunkID length.

Definition at line 108 of file ChunkPort.h.

CLock& GENAPI_NAMESPACE::CChunkPort::GetLock ( ) const [inline, protected]

Definition at line 126 of file ChunkPort.h.

Get the type of the main interface of a node.

Determines if the port adapter must perform an endianess swap.

Definition at line 79 of file ChunkPort.h.

virtual void GENAPI_NAMESPACE::CChunkPort::Read ( void *  pBuffer,
int64_t  Address,
int64_t  Length 
) [virtual]

Reads a chunk of bytes from the port.

Called from the port node to give the chunk port a pointer to itself.

void GENAPI_NAMESPACE::CChunkPort::UpdateBuffer ( uint8_t *  pBaseAddress)

Updates the base address of the chunk.

virtual void GENAPI_NAMESPACE::CChunkPort::Write ( const void *  pBuffer,
int64_t  Address,
int64_t  Length 
) [virtual]

Writes a chunk of bytes to the port.


Member Data Documentation

indicates if the data needs to be cached

Definition at line 163 of file ChunkPort.h.

Length of the chunk ID buffer.

Definition at line 157 of file ChunkPort.h.

Chunk ID stored as a number (for more straightforward access)

Definition at line 166 of file ChunkPort.h.

indicates if the m_ChunkIDNumber is valid (could be invalid eg. if the ID does not fit in 64-bit range)

Definition at line 169 of file ChunkPort.h.

The chunk's offset within the buffer.

Definition at line 142 of file ChunkPort.h.

Length of the chunk.

Definition at line 145 of file ChunkPort.h.

Space allocated for the chunk.

Definition at line 148 of file ChunkPort.h.

Pointer to the begin of the buffer.

Definition at line 139 of file ChunkPort.h.

cache for the chunk data

Definition at line 160 of file ChunkPort.h.

Binary version of the chunk ID.

Definition at line 154 of file ChunkPort.h.

Pointer to the node holding a reference to this implementation.

Definition at line 151 of file ChunkPort.h.


The documentation for this class was generated from the following file:


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:10