XFcCommunicationScheduler class Reference

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XFcCommunicationScheduler Class Reference

XFcCommunicationScheduler is user interface to use Xforge communication. More...

Inheritance diagram for XFcCommunicationScheduler:

[legend]
Collaboration diagram for XFcCommunicationScheduler:

[legend]
List of all members.

## Public Member Functions

virtual XFCIMPORT | ~XFcCommunicationScheduler ()
| Virtual destructor.
virtual XFCIMPORT INT | runScheduler ()
| Runs scheduler.
XFCIMPORT INT | getError () const
| Gets last runscheduler error.
XFCIMPORT INT32 | addClient (XFcClientCommWin *aClient)
| Adds client.
XFCIMPORT INT32 | getRoundTripTime (INT32 aClient) const
| Gets round client round trip time.
XFCIMPORT XFcClientCommWin * | removeClient (INT32 aClient)
| Removes client.
XFCIMPORT XFcClientCommWin * | getClient (INT32 aClient)
| Gets client.
XFCIMPORT INT | addCommunicationHandler (XFcCommunicationHandler *aHandler)
| Adds communication handler.
XFCIMPORT XFcCommunicationHandler * | getCommunicationHandler (INT32 aHandler)
| Gets communication handler.
XFCIMPORT XFcCommunicationHandler * | removeCommunicationHandler (INT32 aHandler)
| Removes communication handler.
XFCIMPORT void | setDataReceiver (XFcDataReceiver *aReceiver)
| Sets data receiver.
XFCIMPORT INT | addDataReceiver (UINT32 aId, XFcDataReceiver *aReceiver)
| Adds data receiver to hash table.
XFCIMPORT XFcDataReceiver * | getDataReceiver (UINT32 aId)
| Gets data receiver.
XFCIMPORT XFcDataReceiver * | removeDataReceiver (UINT32 aId)
| Removes data receiver.
XFCIMPORT XFcObjectDataFrame * | getPacketFrame (INT32 aClient, INT aSlot)
| Gets packet frame.
XFCIMPORT XFcObjectDataFrame * | getRecentStateFrame (INT32 aClient, INT32 aRecentId)
| Gets recent state frame.
XFCIMPORT void | removeRecentStateFrame (INT32 aClient, INT32 aRecentId)
| Removes recent state frame.
XFCIMPORT void | addCommunicationService (INT aType, XFcCommService *aCommService)
| Adds communication service.

## Static Public Member Functions

XFcCommunicationScheduler * | create ()
| Static constructor.

## Protected Member Functions

XFcSchedulerObject * | getSchedulerObjectByType (INT aType)
| Gets scheduler object from list.
const XFcSchedulerObject * | getSchedulerObjectByType (INT aType) const
XFcSchedulerObject * | getSchedulerObjectByClientId (INT32 aIndex)
const XFcSchedulerObject * | getSchedulerObjectByClientId (INT32 aIndex) const
INT | init ()
| Initializes class.
XFCIMPORT | XFcCommunicationScheduler ()
| Protected constructor.

## Protected Attributes

XFcSchedulerObject | mCommunication [XFCNET_SUPPORTED_HANDLER_COUNT]
| Holds sceduler objects for bt and inet. First one is Bt and second is INET.

## Private Attributes

XFcObjectDataServant * | mObjectDataServant
| Holds object data servant, its used to share data all registered data receiver.

## Detailed Description

XFcCommunicationScheduler is user interface to use Xforge communication.

XFcore communication uses client to receiver communication. All data is send throught client that express physical receiver to data receiver. XFcCommunicationScheduler can hold multiple data receiver which can receive data from multiple different clients. Any data receiver is not connected to any certain client. Its doesn't own any data receiver or client so it does not delete any on destructor.

## Constructor & Destructor Documentation

XFCIMPORT XFcCommunicationScheduler::XFcCommunicationScheduler | ( |  | ) | `[protected]`

| Protected constructor.

virtual XFCIMPORT XFcCommunicationScheduler::~XFcCommunicationScheduler | ( |  | ) | `[virtual]`

| Virtual destructor.

## Member Function Documentation

XFCIMPORT INT32 XFcCommunicationScheduler::addClient | ( | XFcClientCommWin * | aClient | ) |

Adds client.

Parameters:

  aClient | client data.

Returns:
  client id if successful, or XFCNET_CLIENTADD_ERROR if unsuccessful.

XFCIMPORT INT XFcCommunicationScheduler::addCommunicationHandler | ( | XFcCommunicationHandler * | aHandler | ) |

Adds communication handler.

Parameters:

  aHandler | communication handler.

Returns:
  handler id if successful, or XFENET_COMMHANDLERADD_ERROR otherwise.

XFCIMPORT void XFcCommunicationScheduler::addCommunicationService | ( | INT | aType,
|  | XFcCommService * | aCommService
| ) |

Adds communication service.

Parameters:

  aType | connection type, e.g. XFCNET_COMMUNICATIONTYPE_INET.
  aCommService | pointer to communication service.

XFCIMPORT INT XFcCommunicationScheduler::addDataReceiver | ( | UINT32 | aId,
|  | XFcDataReceiver * | aReceiver
| ) |

Adds data receiver to hash table.

Parameters:

  aReceiver | data receiver.

Returns:
  1 if successful, or 0 if unsuccessful.

XFcCommunicationScheduler* XFcCommunicationScheduler::create | ( |  | ) | `[static]`

Static constructor.

Parameters:

  aCommHnalderArraySize | communication handler array size.

Returns:
  new XFcCommunicationScheduler object if successful, or NULL if unsuccessful.

XFCIMPORT XFcClientCommWin* XFcCommunicationScheduler::getClient | ( | INT32 | aClient | ) |

Gets client.

Parameters:

  aClient | client id.

Returns:
  client.

XFCIMPORT XFcCommunicationHandler* XFcCommunicationScheduler::getCommunicationHandler | ( | INT32 | aHandler | ) |

Gets communication handler.

Parameters:

  aHandler | handler id.

Returns:
  handler if successful, or NULL otherwise.

XFCIMPORT XFcDataReceiver* XFcCommunicationScheduler::getDataReceiver | ( | UINT32 | aId | ) |

Gets data receiver.

Parameters:

  aId | receiver id.

Returns:
  data receiver.

XFCIMPORT INT XFcCommunicationScheduler::getError | ( |  | ) | const

Gets last runscheduler error.

Returns:
  Error value.

XFCIMPORT XFcObjectDataFrame* XFcCommunicationScheduler::getPacketFrame | ( | INT32 | aClient,
|  | INT | aSlot
| ) |

Gets packet frame.

Parameters:

  aClient | client id.
  aSlot | message identifier (XFENET_RECENTSTATE ...).

Returns:
  packet frame class.

XFCIMPORT XFcObjectDataFrame* XFcCommunicationScheduler::getRecentStateFrame | ( | INT32 | aClient,
|  | INT32 | aRecentId
| ) |

Gets recent state frame.

Parameters:

  aClient | client id.
  aRecentId | recent state id.

Returns:
  recent state frame.

XFCIMPORT INT32 XFcCommunicationScheduler::getRoundTripTime | ( | INT32 | aClient | ) | const

Gets round client round trip time.

Parameters:

  aClient | client id.

const XFcSchedulerObject* XFcCommunicationScheduler::getSchedulerObjectByClientId | ( | INT32 | aIndex | ) | const`[protected]`

XFcSchedulerObject* XFcCommunicationScheduler::getSchedulerObjectByClientId | ( | INT32 | aIndex | ) | `[protected]`

const XFcSchedulerObject* XFcCommunicationScheduler::getSchedulerObjectByType | ( | INT | aType | ) | const`[protected]`

XFcSchedulerObject* XFcCommunicationScheduler::getSchedulerObjectByType | ( | INT | aType | ) | `[protected]`

| Gets scheduler object from list.

INT XFcCommunicationScheduler::init | ( |  | ) | `[protected]`

Initializes class.

Parameters:

  aCommHandlerArraySize | communication handler array size.

Returns:
  1 if successful, or 0 otherwise.

XFCIMPORT XFcClientCommWin* XFcCommunicationScheduler::removeClient | ( | INT32 | aClient | ) |

Removes client.

Parameters:

  aClient | client id.

Returns:
  client.

XFCIMPORT XFcCommunicationHandler* XFcCommunicationScheduler::removeCommunicationHandler | ( | INT32 | aHandler | ) |

Removes communication handler.

Parameters:

  aHandler | handler id.

Returns:
  handler if successful, or NULL otherwise.

XFCIMPORT XFcDataReceiver* XFcCommunicationScheduler::removeDataReceiver | ( | UINT32 | aId | ) |

Removes data receiver.

Parameters:

  aId | receiver id.

Returns:
  data receiver.

XFCIMPORT void XFcCommunicationScheduler::removeRecentStateFrame | ( | INT32 | aClient,
|  | INT32 | aRecentId
| ) |

Removes recent state frame.

Parameters:

  aClient | client id.
  aRecentId | recent state id.

virtual XFCIMPORT INT XFcCommunicationScheduler::runScheduler | ( |  | ) | `[virtual]`

Runs scheduler.

Note:
  Not supported.

Reimplemented from XFcCommunication.

XFCIMPORT void XFcCommunicationScheduler::setDataReceiver | ( | XFcDataReceiver * | aReceiver | ) |

Sets data receiver.

Parameters:

  aReceiver | data receiver.

## Member Data Documentation

XFcSchedulerObject XFcCommunicationScheduler::mCommunication[XFCNET_SUPPORTED_HANDLER_COUNT]`[protected]`

| Holds sceduler objects for bt and inet. First one is Bt and second is INET.

XFcObjectDataServant* XFcCommunicationScheduler::mObjectDataServant`[private]`

| Holds object data servant, its used to share data all registered data receiver.

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch