AURobotServers  4
Public Member Functions | List of all members
UServerStatic Class Reference

#include <userverstatic.h>

Inheritance diagram for UServerStatic:
Inheritance graph

Public Member Functions

virtual bool getStaticHelpList (char *list, const int listCnt)
 
virtual bool getStaticHelpList (char *list, const int listCnt)
 
virtual bool getStaticHelpList (char *list, const int listCnt)
 
virtual bool getStaticHelpList (char *list, const int listCnt)
 
virtual bool getStaticHelpList (char *list, const int listCnt)
 
virtual bool getStaticHelpList (char *list, const int listCnt)
 
virtual bool getStaticHelpList (char *list, const int listCnt)
 
virtual bool loadStaticModule (const char *moduleName, const char *aliasName, char *why, const int whyCnt)
 
virtual bool loadStaticModule (const char *moduleName, const char *aliasName, char *why, const int whyCnt)
 
virtual bool loadStaticModule (const char *moduleName, const char *aliasName, char *why, const int whyCnt)
 
virtual bool loadStaticModule (const char *moduleName, const char *aliasName, char *why, const int whyCnt)
 
virtual bool loadStaticModule (const char *moduleName, const char *aliasName, char *why, const int whyCnt)
 
virtual bool loadStaticModule (const char *moduleName, const char *aliasName, char *why, const int whyCnt)
 
virtual bool loadStaticModule (const char *moduleName)
 
virtual bool loadStaticModule (const char *moduleName, const char *aliasName, char *why, const int whyCnt)
 
 UServerStatic ()
 
 UServerStatic ()
 
 UServerStatic ()
 
 UServerStatic ()
 
 UServerStatic ()
 
 UServerStatic ()
 
 UServerStatic ()
 
virtual ~UServerStatic ()
 
virtual ~UServerStatic ()
 
virtual ~UServerStatic ()
 
virtual ~UServerStatic ()
 
virtual ~UServerStatic ()
 
 ~UServerStatic ()
 
virtual ~UServerStatic ()
 
- Public Member Functions inherited from UCmdExe
bool addFunction (UFunctionBase *function)
 
bool addNewRessources (UFunctionBase *function)
 
bool addResource (UResBase *res, UFunctionBase *owner)
 
void closeClient (int clientIdx)
 
void createBaseVar ()
 
bool deleteFunction (UFunctionBase *function)
 
bool doBashCmd (UServerInMsg *msg, const char *cmdStr)
 execute a command line command and return reply as help text. More...
 
bool executeFunction (int functionIndex, UServerInMsg *msg, void *extra, bool aPush)
 
bool executePushFunction (int functionIndex, UServerInMsg *msg, void *extra)
 
bool executeScriptFile (const char *cfn, bool andWait, int forClient)
 
int findFunctionIndex (UFunctionBase *function)
 
int findFunctionOwner (const char *tagName)
 
int getFuncCnt ()
 
double getLoad ()
 
void * getLoadedModuleRef (int functionIndex)
 
UResBasegetStaticResource (const char *resName, bool mayCreate, bool staticOnly=true)
 get a pointer to a static resource. More...
 
bool handleAlive (UServerInMsg *msg)
 handles a command starting with the keyword 'alive'. More...
 
bool handleMessagesThreadStart ()
 
bool handleOneMessageFromQueue ()
 
bool handleOneServerPushMessage ()
 
bool handleShellCmd (UServerInMsg *msg)
 handles a command starting with the keyword 'do'. More...
 
bool isClientAlive (int clientIdx, double holdOffTime)
 
bool isModuleStatic (int moduleIndex)
 Test if the module with this index is loaded as static. More...
 
bool isResourceOwner (const char *ressID, UFunctionBase *owner)
 
bool isRxQueueEmpty ()
 
bool isRxQueueFull ()
 
bool isStopping ()
 
void killServer (UServerInMsg *msg)
 
UFunctionBaseloadFunctionModule (const char *moduleFileName, char *buff, int buffCnt, const char *aliasName)
 
virtual bool methodCall (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct=NULL, int *returnStructCnt=NULL)
 
bool postCommand (int client, const char *command)
 
void print (const char *preStr)
 
void printRess (const char *preStr)
 
void run ()
 
void runIdle ()
 
bool sendDebug (UServerInMsg *msg, const char *debugText)
 
bool sendError (UServerInMsg *msg, const char *errorText)
 
bool sendHelp (UServerInMsg *msg, const char *infoText)
 
bool sendHelpDone (UServerInMsg *msg)
 Send a help close tag The help close tag </help> if followed by a full tag with the message 'msg' tag name and the text "info=done". More...
 
bool sendHelpStart (UServerInMsg *msg, const char *infoText)
 Send the open help tag Send open tag with one 'info' attribute with the provided string as value. Must be finished with a call to sendHelpDone(msg). More...
 
bool sendInfo (UServerInMsg *msg, const char *infoText)
 
bool sendMsg (int clientIdx, const char *message, int size)
 
bool sendMsg (UServerInMsg *msg, const char *message, int size)
 
bool sendMsg (int clientIdx, const char *message)
 
bool sendMsg (UServerInMsg *msg, const char *message)
 
bool sendMsgAll (const char *message, bool lockedUser)
 
bool sendText (UServerInMsg *msg, const char *text)
 
bool sendWarning (UServerInMsg *msg, const char *warningText)
 
void setName (const char *serverName)
 
void setServer (UServerPort *socketServer)
 
void setVerbose (bool value)
 
void stop (bool andWait)
 
 UCmdExe ()
 
void UCmdExeInit ()
 
bool unloadAllModules ()
 
bool unloadFunctionModule (const char *value)
 
void updateLocalVar ()
 
virtual ~UCmdExe ()
 
- Public Member Functions inherited from UResVarPool
int addMethod (const char *formalName, const char *paramTypes, const char *comment)
 
int addMethodV (const char *formalName, const char *paramTypes, const char *comment)
 
UVarPooladdStruct (const char *name, const char *comment, bool copy=false)
 
UVariableaddVar (const char *name, const double initialValue, const char *type, const char *comment)
 
UVariableaddVar (const char *name, const char *initialValue, const char *type, const char *comment)
 
UVariableaddVarA (const char *name, const char *initialValue, const char *type, const char *comment)
 
bool callGlobal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 
bool callGlobalV (const char *name, const char *paramOrder, UVariable **params, UDataBase **returnStruct, int *returnStructCnt)
 Call a method from the root var pool scope It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate. More...
 
bool callLocal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 
bool callVS (const char *function, const char *stringParam)
 
int callVSCD (const char *function, const char *strPar, UDataBase *data, int cooSys)
 
void createBaseVar ()
 
virtual bool createVarSpace (const int varCnt, const int structCnt, const int methCnt, const char *note, bool copy=false)
 
bool getGlobalString (const char *name, const char **value)
 
bool getGlobalValue (const char *name, double *value)
 
bool getGlobalValue (const char *name, const char **value)
 
bool getGlobalValue (const char *name, bool *value)
 
bool getGlobalValue (const char *name, UTime *value)
 
bool getLocalValue (const char *name, double *value)
 get a value in this variable tree More...
 
bool getLocalValue (const char *name, bool *value)
 
bool getLocalValue (const char *name, UTime *value)
 
double getLocalValue (int idx)
 
UPosition getLocalValue3D (int idx)
 
UPosRot getLocalValue6D (int idx)
 
bool getLocalValueBool (int idx)
 
int getLocalValueInt (int idx)
 
UTime getLocalValueTime (int idx)
 
const char * getLogFileName ()
 
const char * getVarDescription (int idx)
 
UVarCalcgetVarPool ()
 
virtual bool gotAllResources (char *missingThese, int missingTheseCnt)
 
bool isLogFileOpen ()
 
bool isLogFileOpen (const char *structName)
 
bool isVarPoolUpdated (int lastCnt, int *newCnt)
 
void logFileClose ()
 
bool logFileOpen ()
 
void logFileStart (const char *structName, bool open)
 
virtual const char * print (const char *preString, char *buff, int buffCnt)
 
bool setGlobalVar (const char *name, const double value, bool mayAdd)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar (int idx, double value, const int element)
 
bool setLocalVar (const char *name, const double value, bool mayAdd)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar3D (int idx, UPosition *value)
 
bool setLocalVar6D (int idx, UPosRot *value)
 
bool setLocalVarAdd (int idx, double value, const int element)
 
bool setLocalVarPose (int idx, UPose *value)
 
virtual bool setResource (UResBase *resource, bool remove)
 
void setVarPool (UVarCalc *sharedVarPool)
 
int updateQTvars (int structIdx)
 
 UResVarPool ()
 
virtual ~UResVarPool ()
 
- Public Member Functions inherited from UResBase
void createReplayVar (UVarPool *pool)
 
virtual void createResources ()
 
UCmdExegetCorePointer ()
 
char * getLogFileName (char *fn, const int fnCnt)
 
int getResFuncIdx ()
 
const char * getResID ()
 
int getResVersion ()
 
bool isA (const char *idStr)
 
bool isAlsoA (const char *id)
 
virtual void saveSettings ()
 
void setCorePointer (UCmdExe *serverCore)
 
void setResFuncIdx (int idx)
 
virtual void setResID (const char *id, const int version)
 
virtual void updateReplayStatus ()
 
 UResBase ()
 
virtual ~UResBase ()
 
- Public Member Functions inherited from UReplay
void addChild (UReplay *child)
 
virtual bool decodeReplayLine (char *)
 
char * getLogFileName (char *fn, const int fnCnt)
 
char * getReplayFileName (char *fn, const int fnCnt)
 
int getReplayLogLine ()
 
bool isReplay ()
 
bool isReplayFileOpen ()
 
void removeChild (UReplay *child)
 
virtual void replayAdvanceTime (UTime untilTime)
 
void replaySetBaseFileName (const char *name, const char *preName="")
 
void replaySetFileName (const char *name)
 
virtual bool replayStep ()
 
int replayStep (int steps)
 
virtual bool replayToTime (UTime untilTime)
 
void setParent (UReplay *parent)
 
bool setReplay (bool value)
 
 UReplay ()
 
virtual ~UReplay ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 
- Public Member Functions inherited from UVarMethodImplement
virtual bool methodCallV (const char *name, const char *paramOrder, UVariable *params[], UDataBase **returnStruct, int *returnStructCnt)
 
virtual ~UVarMethodImplement ()
 
- Public Member Functions inherited from UServerPushImplement
bool addPushWatch (UServerPush *obj)
 Add an server push object to watch list. This is called by a combined resource-push object when the object is updated and thus a push command may need triggering. More...
 
void event ()
 
int getFunctionOwner (UServerInMsg *msg)
 
 UServerPushImplement ()
 
virtual ~UServerPushImplement ()
 

Additional Inherited Members

- Static Public Member Functions inherited from UCmdExe
static const char * getResClassID ()
 
- Static Public Member Functions inherited from UResVarPool
static const char * getResClassID ()
 
- Public Attributes inherited from UReplay
bool replayTimeAdvancePending
 
UTime replayTimeNow
 
- Protected Member Functions inherited from UCmdExe
void closeLogServer ()
 
virtual const char * commandList ()
 
bool handleQuit (UServerInMsg *msg)
 
bool handleServerCommand (UServerInMsg *msg)
 
bool handleServerPushCommand (UServerInMsg *msg)
 
virtual const char * name ()
 
void resourcesUpdate (int funcIdx)
 
void resourcesUpdated ()
 
bool sysModuleCmd (UServerInMsg *msg)
 
bool sysServerHelp (UServerInMsg *msg)
 
bool systemFunction (UServerInMsg *msg)
 
bool unloadThisModule (int funcIdx)
 
- Protected Member Functions inherited from UResVarPool
void setDescription (const char *note, bool copy=false)
 
- Protected Member Functions inherited from UResBase
UResBasegetStaticResource (const char *resName, bool mayCreate, bool staticOnly=true)
 get a pointer to a static resource. More...
 
- Protected Attributes inherited from UResBase
int resFuncIdx
 
char resID [MAX_RESOURCE_ID_LENGTH]
 
char resIsAlso [MAX_RESOURCE_ISALSO_LENGTH]
 
int resVersion
 
- Protected Attributes inherited from UReplay
bool replay
 
FILE * replayFile
 
char replayFileName [REPLAY_FILE_NAME_LENGTH]
 replay filename More...
 
char replayLine [MAX_LOG_LINE_LENGTH]
 
int replayLogLine
 
UReplayreplayParent
 
UTime replayTimeNext
 
- Protected Attributes inherited from UServerPushImplement
sem_t actionFlag
 flag to be posted, when an event has happend More...
 
UServerPushpushWatch [MAX_PUSH_WATCH_CNT]
 
int pushWatchCnt
 
ULock pushWatchLock
 
- Static Protected Attributes inherited from UReplay
static const int MAX_LOG_LINE_LENGTH = 10000
 
static const int REPLAY_FILE_NAME_LENGTH = 264
 max length of replay filename More...
 

Detailed Description

Server core extension with static modules

    @author Christian Andersen <jca@oersted.dtu.dk>

Class to add server specific static classes

    @author Christian Andersen <jca@oersted.dtu.dk>

Constructor & Destructor Documentation

UServerStatic::UServerStatic ( )

Constructor

UServerStatic::~UServerStatic ( )
virtual

Destructor

UServerStatic::UServerStatic ( )

Constructor

virtual UServerStatic::~UServerStatic ( )
virtual

Destructor

UServerStatic::UServerStatic ( )

Constructor

virtual UServerStatic::~UServerStatic ( )
virtual

Destructor

UServerStatic::UServerStatic ( )

Constructor

virtual UServerStatic::~UServerStatic ( )
virtual

Destructor

UServerStatic::UServerStatic ( )

Constructor

virtual UServerStatic::~UServerStatic ( )
virtual

Destructor

UServerStatic::UServerStatic ( )

Constructor

UServerStatic::~UServerStatic ( )

Destructor

UServerStatic::UServerStatic ( )

Constructor

virtual UServerStatic::~UServerStatic ( )
virtual

Destructor

Member Function Documentation

virtual bool UServerStatic::getStaticHelpList ( char *  list,
const int  listCnt 
)
virtual

Get help text for available static modules loadable by the loadStaticModule() function. Returns false if no module is available.

Reimplemented from UCmdExe.

virtual bool UServerStatic::getStaticHelpList ( char *  list,
const int  listCnt 
)
virtual

Get help text for available static modules loadable by the loadStaticModule() function. Returns false if no module is available.

Reimplemented from UCmdExe.

virtual bool UServerStatic::getStaticHelpList ( char *  list,
const int  listCnt 
)
virtual

Get help text for available static modules loadable by the loadStaticModule() function. Returns false if no module is available.

Reimplemented from UCmdExe.

virtual bool UServerStatic::getStaticHelpList ( char *  list,
const int  listCnt 
)
virtual

Get help text for available static modules loadable by the loadStaticModule() function. Returns false if no module is available.

Reimplemented from UCmdExe.

virtual bool UServerStatic::getStaticHelpList ( char *  list,
const int  listCnt 
)
virtual

Get help text for available static modules loadable by the loadStaticModule() function. Returns false if no module is available.

Reimplemented from UCmdExe.

virtual bool UServerStatic::getStaticHelpList ( char *  list,
const int  listCnt 
)
virtual

Get help text for available static modules loadable by the loadStaticModule() function. Returns false if no module is available.

Reimplemented from UCmdExe.

bool UServerStatic::getStaticHelpList ( char *  list,
const int  listCnt 
)
virtual

Get help text for available static modules loadable by the loadStaticModule() function. false if no module is available.

Reimplemented from UCmdExe.

References UCmdExe::getStaticHelpList().

virtual bool UServerStatic::loadStaticModule ( const char *  moduleName,
const char *  aliasName,
char *  why,
const int  whyCnt 
)
virtual

Create a function module that may be statically available in this server. The moduleName is a keyword to one of the available static modules. Returns false if no such module exist. If the module exist it is created and added to the function list.

Reimplemented from UCmdExe.

virtual bool UServerStatic::loadStaticModule ( const char *  moduleName,
const char *  aliasName,
char *  why,
const int  whyCnt 
)
virtual

Create a function module that may be statically available in this server. The moduleName is a keyword to one of the available static modules. Returns false if no such module exist. If the module exist it is created and added to the function list.

Reimplemented from UCmdExe.

virtual bool UServerStatic::loadStaticModule ( const char *  moduleName,
const char *  aliasName,
char *  why,
const int  whyCnt 
)
virtual

Create a function module that may be statically available in this server. The moduleName is a keyword to one of the available static modules. Returns false if no such module exist. If the module exist it is created and added to the function list.

Reimplemented from UCmdExe.

virtual bool UServerStatic::loadStaticModule ( const char *  moduleName,
const char *  aliasName,
char *  why,
const int  whyCnt 
)
virtual

Create a function module that may be statically available in this server. The moduleName is a keyword to one of the available static modules. Returns false if no such module exist. If the module exist it is created and added to the function list.

Reimplemented from UCmdExe.

virtual bool UServerStatic::loadStaticModule ( const char *  moduleName,
const char *  aliasName,
char *  why,
const int  whyCnt 
)
virtual

Create a function module that may be statically available in this server. The moduleName is a keyword to one of the available static modules. Returns false if no such module exist. If the module exist it is created and added to the function list.

Reimplemented from UCmdExe.

virtual bool UServerStatic::loadStaticModule ( const char *  moduleName,
const char *  aliasName,
char *  why,
const int  whyCnt 
)
virtual

Create a function module that may be statically available in this server. The moduleName is a keyword to one of the available static modules. Returns false if no such module exist. If the module exist it is created and added to the function list.

Reimplemented from UCmdExe.

virtual bool UServerStatic::loadStaticModule ( const char *  moduleName)
inlinevirtual

Create a function module that may be statically available in this server. The moduleName is a keyword to one of the available static modules. false if no such module exist. If the module exist it is created and added to the function list.

bool UServerStatic::loadStaticModule ( const char *  moduleName,
const char *  aliasName,
char *  why,
const int  whyCnt 
)
virtual

Create a function module that may be statically available in this server. The moduleName is a keyword to one of the available static modules. false if no such module exist. If the module exist it is created and added to the function list. If alias name is provided (and the module allows) the module command keyword is redefined to the alias name (this is mostly (only) the generic interface module.

Returns
false if a module with an illegal name exist, in this case the reason is returned in 'why' (if not NULL)

Reimplemented from UCmdExe.

References UCmdExe::addFunction(), UCmdExe::func, UCmdExe::loadStaticModule(), and UFunctionBase::setAliasName().


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