Compute Graph Framework SDK Reference  5.16
dw::framework::IChannelFsiCom Class Referenceabstract

Detailed Description

Interface for FSI communication

Definition at line 48 of file FsiCom.hpp.

Public Types

using createFactory = std::function< std::shared_ptr< IChannelFsiCom >(uint8_t, const char *)>
 

Public Member Functions

virtual bool connect ()=0
 Connect to a specified FSI endpoint. More...
 
virtual void disconnect ()=0
 Disconnect from a connected FSI endpoint. More...
 
virtual bool isConnected ()=0
 Check if FSI endpoint is connected. More...
 
virtual int32_t read (void *buff, uint32_t size, uint32_t &readBytes)=0
 Read from a connected FSI endpoint. More...
 
bool registerClient (bool consumer)
 Register a FSI connection. More...
 
void unregisterClient (bool consumer)
 Unregister a FSI connection. More...
 
virtual int32_t waitForEvent (dwTime_t timeout_us)=0
 Wait for a buffer to be available to read. More...
 
virtual int32_t write (void *buff, uint32_t size, uint32_t &writtenBytes)=0
 Write to a connected FSI endpoint. More...
 
virtual ~IChannelFsiCom ()=default
 

Static Public Member Functions

static std::shared_ptr< IChannelFsiComcreate (uint8_t numChannels, const char *compat, createFactory &overrider)
 Create the FSI channel. More...
 

Static Public Attributes

static constexpr char LOG_TAG [] {"IChannelFsiCom"}
 

Member Typedef Documentation

◆ createFactory

using dw::framework::IChannelFsiCom::createFactory = std::function<std::shared_ptr<IChannelFsiCom>(uint8_t, const char*)>

Definition at line 105 of file FsiCom.hpp.

Constructor & Destructor Documentation

◆ ~IChannelFsiCom()

virtual dw::framework::IChannelFsiCom::~IChannelFsiCom ( )
virtualdefault

Member Function Documentation

◆ connect()

virtual bool dw::framework::IChannelFsiCom::connect ( )
pure virtual

Connect to a specified FSI endpoint.

Returns
true if no errors were reported during connection, false otherwise

◆ create()

static std::shared_ptr< IChannelFsiCom > dw::framework::IChannelFsiCom::create ( uint8_t  numChannels,
const char *  compat,
createFactory overrider 
)
static

Create the FSI channel.

Parameters
[in]numChannelsthe numChannel parameter for FSI
[in]compatcompat string for FSI
[in]overriderif provided, this custom function will be used for creating the channel
Returns
the channel object

◆ disconnect()

virtual void dw::framework::IChannelFsiCom::disconnect ( )
pure virtual

Disconnect from a connected FSI endpoint.

◆ isConnected()

virtual bool dw::framework::IChannelFsiCom::isConnected ( )
pure virtual

Check if FSI endpoint is connected.

Returns
true if connected, false otherwise

◆ read()

virtual int32_t dw::framework::IChannelFsiCom::read ( void *  buff,
uint32_t  size,
uint32_t &  readBytes 
)
pure virtual

Read from a connected FSI endpoint.

Parameters
[in,out]buffthe buffer to be filled
[in]sizethe size of the buffer
[out]readBytesbytes read from FSI
Returns
POSIX errno indicating if write is successful

◆ registerClient()

bool dw::framework::IChannelFsiCom::registerClient ( bool  consumer)

Register a FSI connection.

Parameters
[in]consumerindicate if the channel to be registered is a consumer
Returns
true if registration is successful. Registration is only successful if only a single consumer or producer is registered.

◆ unregisterClient()

void dw::framework::IChannelFsiCom::unregisterClient ( bool  consumer)

Unregister a FSI connection.

Parameters
[in]consumerindicate if the channel to be unregistered is a consumer

◆ waitForEvent()

virtual int32_t dw::framework::IChannelFsiCom::waitForEvent ( dwTime_t  timeout_us)
pure virtual

Wait for a buffer to be available to read.

Parameters
[in]timeout_usthe amount of time to wait for event
Returns
POSIX errno indicating if there is data available

◆ write()

virtual int32_t dw::framework::IChannelFsiCom::write ( void *  buff,
uint32_t  size,
uint32_t &  writtenBytes 
)
pure virtual

Write to a connected FSI endpoint.

Parameters
[in]buffthe buffer to be written to FSI
[in]sizethe size of the buffer
[out]writtenBytesbytes written to FSI
Returns
POSIX errno indicating if write is successful

Member Data Documentation

◆ LOG_TAG

constexpr char dw::framework::IChannelFsiCom::LOG_TAG[] {"IChannelFsiCom"}
staticconstexpr

Definition at line 53 of file FsiCom.hpp.


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