Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes

AcsBulkdata::BulkDataNTSenderFlow Class Reference

#include <bulkDataNTSenderFlow.h>

Inheritance diagram for AcsBulkdata::BulkDataNTSenderFlow:
Inheritance graph
[legend]
Collaboration diagram for AcsBulkdata::BulkDataNTSenderFlow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BulkDataNTSenderFlow (BulkDataNTSenderStream *senderStream, const char *flowName, const SenderFlowConfiguration &sndCfg, BulkDataNTSenderFlowCallback *cb, bool releaseCB)
virtual ~BulkDataNTSenderFlow ()
unsigned int getNumberOfReceivers ()
void startSend (ACE_Message_Block *param=0)
void startSend (const unsigned char *param, size_t len)
void sendData (const unsigned char *buffer, size_t len)
void stopSend ()
void dumpStatistics (ACE_Log_Priority level=LM_DEBUG)

Protected Types

enum  SenderFlowStates { StartState, DataRcvState, StopState, IgnoreDataState }

Protected Member Functions

void setACKsTimeout (double ACKsTimeout)
 ACKs timeout.
void setThrottling (double throttling)
 min time that should elapsed for sending one frame (640000 bytes)
void writeFrame (ACSBulkData::DataType dataType, const unsigned char *param=0, size_t len=0, unsigned int restFrameCount=0, bool waitForACKs=false)
 setter from throttling parameter (in MB/sec)
 BulkDataNTSenderFlow ()
 disable default - empty constructor
void operator= (const BulkDataNTSenderFlow &)
 ALMA C++ coding standards state assignment operators should be disabled.
 BulkDataNTSenderFlow (const BulkDataNTSenderFlow &)
 ALMA C++ coding standards state copy constructors should be disabled.

Protected Attributes

SenderFlowStates currentState_m
AcsBulkdata::BulkDataNTSenderStreamsenderStream_m
 strings name of states
SenderFlowConfiguration senderFlowCfg_m
 pointer to the sender
BulkDataNTSenderFlowCallbackcallback_m
 flow configuration
bool releaseCB_m
 callback
AcsBulkdata::BulkDataNTDDSPublisherddsPublisher_m
 should the CB be destroyed when the flow is destroyed
DDS::Topic * ddsTopic_m
 DDS publisher.
BulkDataNTWriterListenerwriterReaderListener_m
 DDS topic where data will be write.
ACSBulkData::BulkDataNTFrameDataWriter * ddsDataWriter_m
 DDS listener for status etc.
DDS::Duration_t ackTimeout_m
 DDS writer.
double throttling_m
 setter for ackTimeout
double throttlingMinFrameTime_m
ACSBulkData::BulkDataNTFrame * frame_m
 frame

Static Protected Attributes

static const char * state2String []
 current state of Sender Flow

Member Enumeration Documentation

Enumerator:
StartState 
DataRcvState 
StopState 
IgnoreDataState 

Constructor & Destructor Documentation

AcsBulkdata::BulkDataNTSenderFlow::BulkDataNTSenderFlow ( BulkDataNTSenderStream senderStream,
const char *  flowName,
const SenderFlowConfiguration sndCfg,
BulkDataNTSenderFlowCallback cb,
bool  releaseCB 
)

Sender Flow constructor.

Parameters:
senderStream sender stream where the flow will be created
flowName the name of flow that should be created
sndCfg sender flow configuration
cb pointer to callback
releaseCB should CB be released when flow is destroyed
virtual AcsBulkdata::BulkDataNTSenderFlow::~BulkDataNTSenderFlow (  )  [virtual]

Sender flow destructor

AcsBulkdata::BulkDataNTSenderFlow::BulkDataNTSenderFlow (  )  [protected]

disable default - empty constructor

AcsBulkdata::BulkDataNTSenderFlow::BulkDataNTSenderFlow ( const BulkDataNTSenderFlow  )  [protected]

ALMA C++ coding standards state copy constructors should be disabled.


Member Function Documentation

void AcsBulkdata::BulkDataNTSenderFlow::dumpStatistics ( ACE_Log_Priority  level = LM_DEBUG  ) 

Logs statistics for debugging

This log is usually submitted at the DEBUG level to avoid impacting performances but in case of error we wish to force this log at ERROR level. With the parameter the user can freely customize the level of this log.

Parameters:
level,: The level of the log
unsigned int AcsBulkdata::BulkDataNTSenderFlow::getNumberOfReceivers (  ) 

Returns number of connected receivers for the flow.

Returns:
number of receivers
void AcsBulkdata::BulkDataNTSenderFlow::operator= ( const BulkDataNTSenderFlow  )  [protected]

ALMA C++ coding standards state assignment operators should be disabled.

void AcsBulkdata::BulkDataNTSenderFlow::sendData ( const unsigned char *  buffer,
size_t  len 
)

Method to send data. The data length can be of any size.

Parameters:
buffer data
len length of data
Exceptions:
SendDataErrorExImpl 
void AcsBulkdata::BulkDataNTSenderFlow::setACKsTimeout ( double  ACKsTimeout  )  [protected]

ACKs timeout.

void AcsBulkdata::BulkDataNTSenderFlow::setThrottling ( double  throttling  )  [protected]

min time that should elapsed for sending one frame (640000 bytes)

void AcsBulkdata::BulkDataNTSenderFlow::startSend ( ACE_Message_Block *  param = 0  ) 
Parameters:
param parameter data
len parameter data length
Exceptions:
StartSendErrorExImpl Deprecated method to send "START" and parameter using ACE_Message_Block
Deprecated:
Parameters:
param parameter in form of ACE_Message_Block
void AcsBulkdata::BulkDataNTSenderFlow::startSend ( const unsigned char *  param,
size_t  len 
)

Method to send "START" and parameter

Parameters:
param parameter data
len parameter data length
Exceptions:
StartSendErrorExImpl 
void AcsBulkdata::BulkDataNTSenderFlow::stopSend (  ) 

Method to send "stop"

Exceptions:
StopSendErrorExImpl 
void AcsBulkdata::BulkDataNTSenderFlow::writeFrame ( ACSBulkData::DataType  dataType,
const unsigned char *  param = 0,
size_t  len = 0,
unsigned int  restFrameCount = 0,
bool  waitForACKs = false 
) [protected]

setter from throttling parameter (in MB/sec)

Common method to send frame(s) to the topic. The method it is used internally by: startSend, sendData and stopSend

Parameters:
dataType data frame type (START/DATA/STOP)
param - data
len length of data
restFrameCount how many frames do we have still sent
waitForACKs shall be wait for the ACKs (we force to wait for ACKs)
Exceptions:
SendFrameTimeoutExImpl,SendFrameGenericErrorExImpl,FrameAckTimeoutExImpl 

Member Data Documentation

DDS writer.

flow configuration

ACSBulkData::BulkDataNTFrameDataWriter* AcsBulkdata::BulkDataNTSenderFlow::ddsDataWriter_m [protected]

DDS listener for status etc.

should the CB be destroyed when the flow is destroyed

DDS publisher.

ACSBulkData::BulkDataNTFrame* AcsBulkdata::BulkDataNTSenderFlow::frame_m [protected]

frame

callback

pointer to the sender

strings name of states

const char* AcsBulkdata::BulkDataNTSenderFlow::state2String[] [static, protected]

current state of Sender Flow

setter for ackTimeout

DDS topic where data will be write.


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