AURobotServers
4
|
#include <userverpush.h>
Public Member Functions | |
UServerPushElement * | get (int index) |
UServerPushElement * | getFreeQueueElement () |
UTime | getNextExeTime () |
UServerPushElement * | getNextTimedPushElement () |
int | getPushCmdActiveCnt (int *cmdCnt, int *callCnt) |
int | getPushCmdCnt () |
void | print (const char *preString) |
void | print (const char *preString, char *buff, int buffCnt) |
int | systemQueueflush (const int client, const char *attValue) |
UServerPushQueue () | |
Static Public Member Functions | |
static bool | doPushCall (UVarPool *vp, UServerPushElement *pe, const char *value) |
Private Attributes | |
UServerPushElement | pushCmd [MAX_SERVER_PUSH_CMDS] |
int | pushCmdCnt |
int | pushCmdNext |
Queue with server push commands, and parameters to start the push event
UServerPushQueue::UServerPushQueue | ( | ) |
Constructor
|
static |
do the push call called for by this push element. Update the push element after the call.
vp | is a var pool pointer, either the root or an element in the root tree, to implement the call. |
pe | the push element to implement call for. |
value | is the (optional) event value string to be used in the call |
References UServerPushElement::activeCall, UVarPool::callGlobal(), UServerPushElement::callName, UServerPushElement::MAX_PAR, UServerPushElement::parDouble, UServerPushElement::parOrder, UServerPushElement::parString, and UServerPushElement::update().
Referenced by UCmdExe::handleOneServerPushMessage().
|
inline |
Get indexed queue element
Referenced by UFunctionImgPool::handleImageListCommand().
UServerPushElement * UServerPushQueue::getFreeQueueElement | ( | ) |
Find first free server push queue element. Returns NULL if no more space in queue
References UServerPushElement::activeCall, UServerPushElement::activeCmd, and MAX_SERVER_PUSH_CMDS.
Referenced by UPush::addPushCommand(), and UCmdExe::handleServerPushCommand().
UTime UServerPushQueue::getNextExeTime | ( | ) |
Get next time a job is scheduled to be initiated
References UServerPushElement::activeCall, UServerPushElement::activeCmd, UServerPushElement::nextExeTime, and UTime::now().
UServerPushElement * UServerPushQueue::getNextTimedPushElement | ( | ) |
Get next queued push element that has to be activated. Returns pointer to element or NULL if none is ready for activation
References UServerPushElement::activeCall, UServerPushElement::activeCmd, UServerPushElement::nextExeTime, UTime::Now(), USmlTagIn::reset(), UServerInMsg::tag, and UServerPushElement::toDo.
Referenced by UCmdExe::handleOneServerPushMessage().
int UServerPushQueue::getPushCmdActiveCnt | ( | int * | cmdCnt, |
int * | callCnt | ||
) |
Get number if elements in queue that are active.
cmdCnt | is the count of active push commands |
callCnt | is the count of active call commands |
References UServerPushElement::activeCall, UServerPushElement::activeCmd, and MAX_SERVER_PUSH_CMDS.
Referenced by UFunctionImgPool::handlePoolPushCommand().
|
inline |
Get number if elements in queue
Referenced by UFunctionImgPool::handleImageListCommand(), and UPush::pushEvent().
void UServerPushQueue::print | ( | const char * | preString | ) |
print the active content of the queue
Referenced by UCmdExe::handleServerPushCommand(), UCmdExe::print(), and testPush().
void UServerPushQueue::print | ( | const char * | preString, |
char * | buff, | ||
int | buffCnt | ||
) |
print the active content of the queue to a string buffer
int UServerPushQueue::systemQueueflush | ( | const int | client, |
const char * | attValue | ||
) |
Flush active push commands from this client with this value. Returns number of push elements flushed.
References UServerPushElement::activeCall, UServerPushElement::activeCmd, UServerInMsg::client, UServerInMsg::getTag(), USmlTagIn::getTagName(), UServerInMsg::message, and UServerPushElement::toDo.
Referenced by UPush::addPushCommand(), UPush::flushClientCmds(), and UCmdExe::handleServerPushCommand().
|
private |
Command queue for server push commands
Referenced by UPush::addPushCommand().
|
private |
Number of used server push commands
|
private |
Next server push command to be tested for pending execution