Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

Validation Test Server

server used to test all features of libFreiburg 2.0. More...

Classes

struct  TestCtxS
 link libFreiburg 2.0 object with application object. More...

Defines

#define MQ_ERROR_S   context->msgque->error

Typedefs

typedef TestCtxS TestCtxS
 link libFreiburg 2.0 object with application object.

Functions

MqErrorE Ot_ERR1 (MqS *msgque, void *data)
 create an non recoverable error
MqErrorE Ot_ERR2 (MqS *msgque, void *data)
 create a recoverable error
MqErrorE Ot_WAR1 (MqS *msgque, void *data)
 add additional warning item to a return-message
MqErrorE Ot_ECOU (MqS *msgque, void *data)
 echo a MqBufferS object
MqErrorE Ot_ECO2 (MqS *msgque, void *data)
 echo a MQ_INT2 object
MqErrorE Ot_ECO4 (MqS *msgque, void *data)
 echo a MQ_INT4 object
MqErrorE Ot_ECO8 (MqS *msgque, void *data)
 echo a MQ_INT8 object
MqErrorE Ot_ECOF (MqS *msgque, void *data)
 echo a MQ_FLT4 object
MqErrorE Ot_ECOD (MqS *msgque, void *data)
 echo a MQ_FLT8 object
MqErrorE Ot_ECOP (MqS *msgque, void *data)
 echo a MQ_PTR object
MqErrorE Ot_ECOS (MqS *msgque, void *data)
 echo a MQ_STR object
MqErrorE _ECOL_Item (struct MqReadS *read, const int incr)
MqErrorE Ot_ECOL (MqS *msgque, void *data)
 echo a MQ_LST object
MqErrorE Ot_TEST (MqS *msgque, void *data)
 handle a collection of testes
MqErrorE Ot_OPTT (MqS *msgque, void *data)
 test libFreiburg 2.0 options
MqErrorE Ot_MSQT (MqS *msgque, void *data)
 return debug, stat, binary, and silent value
MqErrorE Ot_SLEP (MqS *msgque, void *data)
 server sleeps n seconds
MqErrorE Ot_USLP (MqS *msgque, void *data)
 server sleeps n microseconds
MqErrorE Ot_CSV1 (MqS *const msgque, MQ_PTR data)
 test client/server interaction
MqErrorE ContextCreate (MqBufferLS *const argv, TestCtxS **out)
 create the parent context
void ContextDelete (TestCtxS **contextP)
 delete the parent context
MqErrorE ContextCreate (struct MqBufferLS *const argv, TestCtxS **out)
int main (int argc, char **argv)
 main loop entry-point for server

Detailed Description

server used to test all features of libFreiburg 2.0.

definition of the service-handles


Define Documentation

#define MQ_ERROR_S   context->msgque->error
 

Definition at line 26 of file context.c.

Referenced by ContextCreate().


Typedef Documentation

typedef struct TestCtxS TestCtxS
 

link libFreiburg 2.0 object with application object.

for this special case no additional application objects are required.


Function Documentation

MqErrorE _ECOL_Item struct MqReadS *  read,
const int  incr
[static]
 

Definition at line 295 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_INT4, MqErrorCheck, MqGet4, MqReadCreate_LST_Ref(), MqReadDelete_LST_Ref(), MqReadGetMsgque(), MqReadGetNumItems(), MqReadU(), MqSend4(), MqSend_LST_END(), MqSend_LST_START(), MqSendRETURN(), MqSendU(), MqS::send, and MqBufferS::type.

Referenced by Ot_ECOL().

MqErrorE ContextCreate struct MqBufferLS *const   argv,
TestCtxS **  out
 

MqErrorE ContextCreate MqBufferLS *const   argv,
TestCtxS **  out
 

create the parent context

Definition at line 591 of file context.c.

References ContextCreate(), ContextDelete(), MQ_ERROR_PROC_FMT, MQ_ERROR_S, MqBufferLAppendHP(), MqCreate(), MqErrorCheck, MqErrorSAppendV(), MqPanicC, MqServiceCreate(), MqSP, MqSysCalloc(), TestCtxS::msgque, Ot_CSV1(), Ot_ECO2(), Ot_ECO4(), Ot_ECO8(), Ot_ECOD(), Ot_ECOF(), Ot_ECOL(), Ot_ECOP(), Ot_ECOS(), Ot_ECOU(), Ot_ERR1(), Ot_ERR2(), Ot_MSQT(), Ot_OPTT(), Ot_SLEP(), Ot_TEST(), Ot_USLP(), and Ot_WAR1().

Referenced by ContextCreate(), and main().

void ContextDelete TestCtxS **  contextP  ) 
 

delete the parent context

Definition at line 641 of file context.c.

References MQ_PTR, MqDelete(), MqSysFree(), and TestCtxS::msgque.

Referenced by ContextCreate(), and main().

int main int  argc,
char **  argv
 

main loop entry-point for server

Definition at line 33 of file server/main.c.

References ContextCreate(), ContextDelete(), MqS::error, MQ_FOREVER, MQ_TIMEOUT, MQ_WAIT, MqBufferLAppendH2(), MqBufferLCreateArgv(), MqErrorCheck, MqErrorSSend(), MqProcessEvent(), and TestCtxS::msgque.

MqErrorE Ot_CSV1 MqS *const   msgque,
MQ_PTR  data
[static]
 

test client/server interaction

Definition at line 551 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_INT2, MQ_PTR, MQ_TIMEOUT, MqErrorCheck, MqGetTransPtr(), MqRead2(), MqSend2(), MqSend_RET_OK(), MqSendEND_AND_WAIT(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECO2 MqS msgque,
void *  data
[static]
 

echo a MQ_INT2 object

Definition at line 127 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_INT2, MqErrorCheck, MqRead2(), MqSend2(), MqSend_RET_OK(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECO4 MqS msgque,
void *  data
[static]
 

echo a MQ_INT4 object

Definition at line 151 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_INT4, MqErrorCheck, MqRead4(), MqSend4(), MqSend_RET_OK(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECO8 MqS msgque,
void *  data
[static]
 

echo a MQ_INT8 object

Definition at line 175 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_INT8, MqErrorCheck, MqRead8(), MqSend8(), MqSend_RET_OK(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECOD MqS msgque,
void *  data
[static]
 

echo a MQ_FLT8 object

Definition at line 223 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_FLT8, MqErrorCheck, MqReadD(), MqSend_RET_OK(), MqSendD(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECOF MqS msgque,
void *  data
[static]
 

echo a MQ_FLT4 object

Definition at line 199 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_FLT4, MqErrorCheck, MqReadF(), MqSend_RET_OK(), MqSendEND_RETR(), MqSendF(), MqSendRETURN(), MqSendSTART(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECOL MqS msgque,
void *  data
[static]
 

echo a MQ_LST object

Definition at line 333 of file context.c.

References _ECOL_Item(), MqOptionU::B, ECOL_LEN, MqS::error, MQ_ERROR_PROC_FMT, MqErrorCheck, MqOptDefault(), MqOptFree(), MqOptGet(), MqOptionUP, MqSend_RET_OK(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECOP MqS msgque,
void *  data
[static]
 

echo a MQ_PTR object

Definition at line 247 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_PTR, MqErrorCheck, MqReadP(), MqSend_RET_OK(), MqSendEND_RETR(), MqSendP(), MqSendRETURN(), MqSendSTART(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECOS MqS msgque,
void *  data
[static]
 

echo a MQ_STR object

Definition at line 271 of file context.c.

References MQ_ERROR_PROC_FMT, MQ_STR, MqErrorCheck, MqReadC(), MqSend_RET_OK(), MqSendC(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ECOU MqS msgque,
void *  data
[static]
 

echo a MqBufferS object

Definition at line 102 of file context.c.

References MQ_ERROR_PROC_FMT, MqErrorCheck, MqReadU(), MqSend_RET_OK(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqSendU(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_ERR1 MqS msgque,
void *  data
[static]
 

create an non recoverable error

Definition at line 40 of file context.c.

References MqS::error, and MqPanicC.

Referenced by ContextCreate().

MqErrorE Ot_ERR2 MqS msgque,
void *  data
[static]
 

create a recoverable error

Definition at line 57 of file context.c.

References MqSend_RET_END(), MqSend_RET_START(), MqSendC(), MqSendEND_RETR(), MqSendSTART(), and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_MSQT MqS msgque,
void *  data
[static]
 

return debug, stat, binary, and silent value

Definition at line 470 of file context.c.

References MqS::binary, MqS::debug, MqLogContext(), MqLogType(), MqSend_RET_OK(), MqSendC(), MqSendEND_RETR(), MqSendH2(), MqSendHC(), MqSendSTART(), MqS::send, MqS::silent, and MqS::stat.

Referenced by ContextCreate().

MqErrorE Ot_OPTT MqS msgque,
void *  data
[static]
 

test libFreiburg 2.0 options

Definition at line 424 of file context.c.

References MqS::error, MQ_ERROR_PROC_FMT, MQ_STR, MqBufferInitFromString, MqErrorCheck, MqOptDefault(), MqOptFree(), MqOptGet(), MqSend2(), MqSend4(), MqSend_RET_OK(), MqSendC(), MqSendD(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), OPTT_LEN, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_SLEP MqS msgque,
void *  data
[static]
 

server sleeps n seconds

Definition at line 499 of file context.c.

References MqS::error, MQ_ERROR_PROC_FMT, MQ_INT4, MqErrorCheck, MqRead4(), MqSend4(), MqSend_RET_OK(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqSysSleep(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_TEST MqS msgque,
void *  data
[static]
 

handle a collection of testes

Definition at line 370 of file context.c.

References MqOptionU::B, MqS::error, MQ_ERROR_PROC_FMT, MQ_INT4, MqErrorCheck, MqOptDefault(), MqOptFree(), MqOptGet(), MqRead4(), MqSend4(), MqSend_RET_END(), MqSend_RET_OK(), MqSend_RET_START(), MqSendC(), MqSendEND_RETR(), MqSendH4(), MqSendRETURN(), MqSendSTART(), MqS::send, and TEST_LEN.

Referenced by ContextCreate().

MqErrorE Ot_USLP MqS msgque,
void *  data
[static]
 

server sleeps n microseconds

Definition at line 525 of file context.c.

References MqS::error, MQ_ERROR_PROC_FMT, MQ_INT4, MqErrorCheck, MqRead4(), MqSend4(), MqSend_RET_OK(), MqSendEND_RETR(), MqSendRETURN(), MqSendSTART(), MqSysUSleep(), MqS::read, and MqS::send.

Referenced by ContextCreate().

MqErrorE Ot_WAR1 MqS msgque,
void *  data
[static]
 

add additional warning item to a return-message

Definition at line 79 of file context.c.

References MqSend_RET_END(), MqSend_RET_START(), MqSendC(), MqSendEND_RETR(), MqSendSTART(), and MqS::send.

Referenced by ContextCreate().


Generated on Tue Nov 23 16:13:10 2004 for testFreiburg by  doxygen 1.3.8-20040928