Granules Class Reference

#include <granules.h>

List of all members.

Public Member Functions

 Granules ()

Private Member Functions

int channelVerifyPut (const unsigned int, chtype)
 Contains methods that are used by Instant template: channelVerifyPut: preVerification of client's requested data.
int channelPreparePut (const unsigned int)
 channelPreparePut: prepare client's requested data for ca call
int channelExecutePut (const unsigned int)
 channelExecutePut: prepare client's requested data for ca call
int waitForPutEvent (const unsigned int, double)
 waitForPutEvent: waits for put callback to complete
bool isPutCallbackDone (const unsigned int _handle)
 isPutCallbackDone performs a ca_poll() and queries the Conduit data container to determine if the putWithCallback has been completed
int channelVerifyGet (const unsigned int, chtype)
 Contains methods that are used by Instant template, namely verifyChannelGetMethod: preVerification of client's requested data.
int channelPrepareGet (const unsigned int)
 channelPrepareGet: prepare client's requested data for ca call
int channelExecuteGet (const unsigned int)
 channelExecuteGet: Executes ca_get method and wiats for response
int channelExecuteGetNoWait (const unsigned int)
 channelExecuteGetNoWait: Executes ca_get method WITH CALLBACK!
A channelRequestPolicyGet.getMethodKind()==WITHOUT_CALLBACK setting is
ignored; getMethodKind()=WITH_DEFAULT_CALLBACK is then used
int waitForManyGetEvents (const unsigned int *handleArray, unsigned int arrayLength, map< unsigned int, int > &bundleResponse)
 waitForManyGetEvents: waits for all get callback to complete
int waitForGetEvent (const unsigned int, double)
 waitForGetEvent: waits for get callback to complete
bool isGetCallbackDone (const unsigned int _handle)
 isGetCallbackDone performs a ca_poll() and queries the Conduit data container to determine if the getWithCallback has been completed
int channelVerifyGetCtrl (const unsigned int, chtype)
 channelVerifyGetCtrl: preVerification of client's requested data
int channelPrepareGetCtrl (const unsigned int)
 channelPrepareGetCtrl: prepare client's requested data for ca call
int channelExecuteGetCtrl (const unsigned int)
 channelExecuteGetCtrl: Executes ca_get method
int channelExecuteGetCtrlNoWait (const unsigned int _handle)
 channelExecuteGetCtrl: Executes ca_get method
int waitForGetCtrlEvent (const unsigned int, double)
 waitForGetCtrlEvent: waits for get callback to complete
bool isGetCtrlCallbackDone (const unsigned int _handle)
 isGetXtrlCallbackDone performs a ca_poll() and queries the Conduit data container to determine if the getCtrlWithCallback has been completed
chtype convertMatrix (const chtype nativeType, const chtype clientT)
 convertMatrix determines datatype for message transmission. The datatype will be the smaller of the native datatype and that requested by client.

Private Attributes

HandleHelper helper
CAFEStatus cafeStatus
ChannelRequestDataTypePolicy channelRequestDataTypePolicy
ChannelRequestPolicyKind methodKind
ChannelRequestPolicy channelRequestPolicyPut
ChannelRequestStatus channelRequestStatusPut
ChannelRequestPolicy channelRequestPolicyGet
ChannelRequestStatus channelRequestStatusGet
ChannelRequestMetaDataClient channelRequestMetaDataClient
ChannelRequestMetaData channelRequestMetaData
ChannelRequestMetaData channelRequestMetaPrimitive
ChannelRequestPolicy channelRequestPolicyGetCtrl
ChannelRequestStatus channelRequestStatusGetCtrl
ChannelRequestMetaDataClient channelRequestMetaCtrlClient
ChannelRequestMetaData channelRequestMetaCtrl
ChannelTimeoutPolicy channelTimeoutPolicyGet
ChannelTimeoutPolicy channelTimeoutPolicyPut
int status

Friends

class Instant
class CAFE

Detailed Description

Contains methods that are used by Instant template Among these are the Verify, Prepare, Execute


Constructor & Destructor Documentation

Granules::Granules (  )  [inline]

Member Function Documentation

int Granules::channelExecuteGet ( const unsigned int  _handle  )  [private]
int Granules::channelExecuteGetCtrl ( const unsigned int  _handle  )  [private]
int Granules::channelExecuteGetCtrlNoWait ( const unsigned int  _handle  )  [private]
int Granules::channelExecuteGetNoWait ( const unsigned int  _handle  )  [private]
int Granules::channelExecutePut ( const unsigned int  _handle  )  [private]
int Granules::channelPrepareGet ( const unsigned int  _handle  )  [private]
int Granules::channelPrepareGetCtrl ( const unsigned int  _handle  )  [private]
int Granules::channelPreparePut ( const unsigned int  _handle  )  [private]
int Granules::channelVerifyGet ( const unsigned int  _handle,
chtype  _dbrType 
) [private]
int Granules::channelVerifyGetCtrl ( const unsigned int  _handle,
chtype  _dbrType 
) [private]
int Granules::channelVerifyPut ( const unsigned int  _handle,
chtype  _dbrType 
) [private]
chtype Granules::convertMatrix ( const chtype  nativeType,
const chtype  clientT 
) [private]

convertMatrix determines datatype for message transmission. The datatype will be the smaller of the native datatype and that requested by client.

Parameters:
nativeType input: native datatype
clientT input: datatype is that requested by client
Returns:
clientRequestType is datatype for message transmission

References __METHOD__.

Referenced by channelPrepareGet(), channelPrepareGetCtrl(), and channelPreparePut().

bool Granules::isGetCallbackDone ( const unsigned int  _handle  )  [private]

isGetCallbackDone performs a ca_poll() and queries the Conduit data container to determine if the getWithCallback has been completed

Parameters:
_handle input: handle
Returns:
bool true or false

References __METHOD__, cs, and CAFENUM::PENDING.

bool Granules::isGetCtrlCallbackDone ( const unsigned int  _handle  )  [private]

isGetXtrlCallbackDone performs a ca_poll() and queries the Conduit data container to determine if the getCtrlWithCallback has been completed

Parameters:
_handle input: handle
Returns:
bool true or false

References __METHOD__, cs, and CAFENUM::PENDING.

bool Granules::isPutCallbackDone ( const unsigned int  _handle  )  [private]

isPutCallbackDone performs a ca_poll() and queries the Conduit data container to determine if the putWithCallback has been completed

Parameters:
_handle input: handle
Returns:
bool true or false

References __METHOD__, cs, and CAFENUM::PENDING.

int Granules::waitForGetCtrlEvent ( const unsigned int  _handle,
double  _timeout 
) [private]

waitForGetCtrlEvent: waits for get callback to complete

Parameters:
_handle input: handle
_timeout input: wait time before method timeouts
Returns:
ICAFE_NORMAL or ECAFE_TIMEOUT

References __METHOD__, channelRequestStatusGetCtrl, cs, ECAFE_INVALID_HANDLE, ECAFE_TIMEOUT, ChannelRequestStatus::getCallbackProgressKind(), ChannelRequestStatus::getMessageStatus(), ICAFE_NORMAL, CAFENUM::PENDING, and status.

Referenced by channelExecuteGetCtrl(), and CAFE::getCtrlCache().

int Granules::waitForGetEvent ( const unsigned int  _handle,
double  _timeout 
) [private]

waitForGetEvent: waits for get callback to complete

Parameters:
_handle input: handle
_timeout input: wait time before method timeouts
Returns:
ICAFE_NORMAL or ECAFE_TIMEOUT

References __METHOD__, channelRequestStatusGet, cs, ECAFE_INVALID_HANDLE, ECAFE_TIMEOUT, ChannelRequestStatus::getCallbackProgressKind(), ChannelRequestStatus::getMessageStatus(), ICAFE_NORMAL, CAFENUM::PENDING, and status.

Referenced by channelExecuteGet(), Instant< CTYPE >::getCache(), CAFE::getCache(), and CAFE::waitForGetEvent().

int Granules::waitForManyGetEvents ( const unsigned int handleArray,
unsigned int  arrayLength,
map< unsigned int, int > &  bundleResponse 
) [private]

waitForManyGetEvents: waits for all get callback to complete

Parameters:
handleArray input: array of handles
arrayLength input: size of array of handles
bundleResponse output: map<unsigned int, int>
Returns:
ICAFE_NORMAL or ECAFE_TIMEOUT

cout << nWaitActiveOver << " nWaitActiveOver// " << nWaitActive << endl;

cout << "No iterations << " << nIterations << endl; /if (nIterations>5000) break;

References __METHOD__, cafeMutex, channelRequestPolicyGet, channelRequestStatusGet, channelTimeoutPolicyGet, cs, ECAFE_INVALID_HANDLE, ECAFE_TIMEOUT, ChannelTimeoutPolicy::getDeltaTimeout(), ChannelRequestStatus::getMessageStatus(), ChannelTimeoutPolicy::getNtries(), ChannelTimeoutPolicy::getTimeout(), ICAFE_NORMAL, MUTEX, CAFENUM::PENDING, ChannelRequestPolicy::setCallbackStatus(), ChannelTimeoutPolicy::setSelfGoverningTimeout(), and status.

Referenced by CAFE::get(), and CAFE::waitForBundledEvents().

int Granules::waitForPutEvent ( const unsigned int  _handle,
double  _timeout 
) [private]

waitForPutEvent: waits for put callback to complete

Parameters:
_handle input: handle
_timeout input: wait time before method timeouts
Returns:
ICAFE_NORMAL or ECAFE_TIMEOUT

References __METHOD__, channelRequestStatusPut, cs, ECAFE_INVALID_HANDLE, ECAFE_TIMEOUT, ChannelRequestStatus::getCallbackProgressKind(), ChannelRequestStatus::getMessageStatus(), ICAFE_NORMAL, CAFENUM::PENDING, and status.

Referenced by channelExecutePut(), and CAFE::waitForPut().


Friends And Related Function Documentation

friend class CAFE [friend]
friend class Instant [friend]

Member Data Documentation

Referenced by channelExecutePut().

Referenced by channelExecutePut().

Referenced by channelExecutePut().

int Granules::status [private]

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

Generated on 3 May 2017 for CAFE by  doxygen 1.6.1