MqConfigS Struct Reference
[PUBLIC: object configuration]

end-user configuration data, also available as command-line options More...

#include <src/msgque.h>

Collaboration diagram for MqConfigS:

Collaboration graph
[legend]

Data Fields

MQ_BOL isSilent
 Suppress logging output.
MQ_BOL isString
 Use string mode, send as many data as possible as string.
enum MqStartE startAs
 User preferences on HOWTO start a new entity.
MQ_STR name
 The human-readable name of context.
MQ_STR srvname
 The human-readable name of the server-context.
MQ_INT debug
 Send additional debugging output to stderr.
struct MqSparent
 Create a child-context.
struct MqSmaster
 SLAVE: a pointer to the master object or NULL.
MQ_SIZE master_id
 SLAVE: the ID in the master SLAVES array or O.
MQ_BOL ignoreThread
 do not allow the usage of threads
MQ_BOL ignoreSpawn
 do not allow the usage of spawn
MQ_BOL ignoreFork
 do not allow the usage of fork
struct MqIoConfigS io
 Global configuration data belonging to "io".

Detailed Description

end-user configuration data, also available as command-line options

Definition at line 606 of file msgque.h.


Field Documentation

Send additional debugging output to stderr.

type default option application context
INTEGER (0-9) 0 --debug server/client parent/child

Attention:
Using pipe (e.g. --pipe) the server get the debug flag from the client.

Definition at line 716 of file msgque.h.

Referenced by MqConfigGetDebug(), MqConfigSetDebug(), MqDLogX(), MqLinkCreate(), pIoStartServer(), pReadHDR(), sIoFillArgvC(), and sIoFillArgvU().

do not allow the usage of fork

Definition at line 740 of file msgque.h.

Referenced by MqConfigSetDaemon(), MqConfigSetIgnoreFork(), MqContextInit(), pIoStartServer(), and sMqCheckArg().

do not allow the usage of spawn

Definition at line 737 of file msgque.h.

Referenced by pIoStartServer(), and sMqCheckArg().

do not allow the usage of threads

Definition at line 734 of file msgque.h.

Referenced by MqConfigSetIgnoreThread(), MqContextInit(), pIoStartServer(), and sMqCheckArg().

struct MqIoConfigS MqConfigS::io [read]

Suppress logging output.

type default option application context
BOOL NO --silent server/client parent/child

Definition at line 613 of file msgque.h.

Referenced by MqConfigGetIsSilent(), MqConfigSetIsSilent(), MqLinkCreate(), pErrorReport(), sIoFillArgvC(), sIoFillArgvU(), sLogDynItem(), sLogDynList(), sLogRET(), and sLogVL().

Use string mode, send as many data as possible as string.

type default option application context
BOOL NO --string client parent

libmsgque_private distinguish between a string based (option: --string) and a binary based (this is the default) data packages. The items is a libmsgque_private data package are of type MqBufferU including OS specific native data of type MQ_ATO. The native data can be transmitted as string (slow) or as binary (fast). string is used for debugging purpose or if the binary data model is different between client and server. The difference in endianness (http://en.wikipedia.org/wiki/Endian) is handled by libmsgque_private and does not require using the --string option. The options is only available for the client-parent setup.

Definition at line 629 of file msgque.h.

Referenced by MqConfigGetIsString(), MqConfigSetIsString(), MqLinkCreate(), MqSendB(), MqSendC(), MqSendD(), MqSendF(), MqSendI(), MqSendL_END(), MqSendO(), MqSendS(), MqSendSTART(), MqSendVL(), MqSendW(), MqSendY(), pLogBDY(), pLogHDR(), pMqSendEND(), pReadCreate(), pReadHDR(), sLogDynList(), sLogRET(), sSend_RET_END(), and sSend_RET_START().

struct MqS* MqConfigS::master [read]

SLAVE: the ID in the master SLAVES array or O.

Definition at line 731 of file msgque.h.

Referenced by MqConfigDup(), MqConfigSetMaster(), pSlaveCreate(), and pSlaveDelete().

The human-readable name of context.

type default option application context
STRING unknown --name server/client parent

The name is used as prefix for application specific log and error messages:

C> (NAME) [2009-01-12:16-22-27] [4-0-sIoCheckArg]: option:  io->com = PIPE
and is created using the following steps:
  • initial set to unknown
  • the argument of the --name option in argv
  • the MqConfigS::name entry from the related configuration object
  • the basename of the first option in argv
Attention:
  • the memory of the name data-entry is managed by libmsgque_private and freed during deleting of the MqS object. A Value of NULL is allowed.
  • the name data-entry will be replaced by the argument of the --srvname command-line option of the client.
  • to initialize this value with a static string use:
    MqConfigSetName(context, "myString");
    

Definition at line 683 of file msgque.h.

Referenced by MqConfigDup(), MqConfigGetName(), MqConfigReset(), MqConfigSetName(), MqContextFree(), MqErrorSAppendV(), MqErrorSGenVL(), MqLinkCreate(), pConfigSetName(), sLogVL(), and sMqCheckArg().

struct MqS* MqConfigS::parent [read]

Create a child-context.

type default option application context
POINTER NULL NO client parent

Read more in: WHAT-IS: parent versa child

Definition at line 725 of file msgque.h.

Referenced by MqConfigDup(), MqConfigGetParent(), MqConfigSetParent(), MqLinkCreate(), MqLinkDelete(), pIoCreate(), pSlaveCreate(), and sMqCheckArg().

The human-readable name of the server-context.

type default option application context
STRING unknown --srvname client parent/child

The srvname is used as prefix for the server-application specific log and error messages:

C> (NAME) [2009-01-12:16-22-27] [4-0-sIoCheckArg]: option:  io->com = PIPE
and is created using the following steps:
  • initial set to unknown
  • the argument of the --srvname option in argv
  • the MqConfigS::srvname entry from the related configuration object
Attention:
  • the memory of the srvname data-entry is managed by libmsgque_private and freed during deleting of the MqS object. A Value of NULL is allowed.
  • to initialize this value with a static string use:
    MqConfigSetSrvName(context, "myString");
    

Definition at line 708 of file msgque.h.

Referenced by MqConfigDup(), MqConfigGetSrvName(), MqConfigReset(), MqConfigSetSrvName(), MqContextFree(), and MqLinkCreate().

User preferences on HOWTO start a new entity.

type default option application context
ENUM MQ_START_DEFAULT NO client/server parent
ENUM MQ_START_FORK --fork client/server parent
ENUM MQ_START_THREAD --thread client/server parent
ENUM MQ_START_SPAWN --spawn client/server parent

The MQ_START_DEFAULT depend on the application-context:

  • server setup
    Start a UDP or TCP server capable to serve one incoming client connection.
  • client setup
    Start a PIPE server using the following order:
    • fork (if the fork system-call is available)
    • thread (if libmsgque_private was compiled with --enable-threads)
    • spawn (this always works)
Attention:
In server mode the --fork , --thread and the --spawn options require the MqSetupS::Parent - MqLinkSetupS::fCreate and MqSetupS::Parent - MqLinkSetupS::fDelete value to provide an entry-point after the new entity was created. In addition the option MqSetupS::fProcessExit or MqSetupS::fThreadExit is used to exit the entity.

The --fork option require the fork system-call and is not compatible with threads.

Definition at line 655 of file msgque.h.

Referenced by GenericServer(), MqConfigGetStartAs(), MqConfigSetStartAs(), pIoStartServer(), and UdsServer().


The documentation for this struct was generated from the following file:

libmsgque project on SF: Get libmsgque at SourceForge.net. Fast, secure and Free Open Source software downloads    Generated on Mon Nov 9 16:57:16 2009 by doxygen 1.5.8