Loading...
Searching...
No Matches
MqContextC_SendApi_Block_C_API

MqContextC - a wrapper to send a list-block or a transaction-blockMore...

+ Collaboration diagram for MqContextC_SendApi_Block_C_API:

Functions

MQ_EXTERN enum MkErrorE libmqmsgque::MqSendL_START_RT (MK_RT const mkrt, MQ_CTX const ctx)
 start to append an embedded body-list-item to the send-data-package. …
 
MQ_EXTERN enum MkErrorE libmqmsgque::MqSendL_END_RT (MK_RT const mkrt, MQ_CTX const ctx)
 finish to append an embedded body-list-item to the send-data-package. …
 
MQ_EXTERN enum MkErrorE libmqmsgque::MqSendT_START_RT (MK_RT const mkrt, MQ_CTX const ctx)
 open a longterm-transaction-item
 
MQ_EXTERN enum MkErrorE libmqmsgque::MqSendT_END_RT (MK_RT const mkrt, MQ_CTX const ctx)
 closed a longterm-transaction-item
 

MqContextC - MqContextC_SendApi_Block_C_API - overload

#define MqSendL_END_NULL(...)
 
#define MqSendL_END(...)
 
#define MqSendL_END_E(...)
 
#define MqSendL_END_C(...)
 
#define MqSendL_START_NULL(...)
 
#define MqSendL_START(...)
 
#define MqSendL_START_E(...)
 
#define MqSendL_START_C(...)
 
#define MqSendT_END_NULL(...)
 
#define MqSendT_END(...)
 
#define MqSendT_END_E(...)
 
#define MqSendT_END_C(...)
 
#define MqSendT_START_NULL(...)
 
#define MqSendT_START(...)
 
#define MqSendT_START_E(...)
 
#define MqSendT_START_C(...)
 

Detailed Description

MqContextC - a wrapper to send a list-block or a transaction-block

start to append an embedded body-list-item to the send-data-package. …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Example
Create a body-list-item in C
MqSendL_START(send); // start a list-item
MqSendI32(send,myInt); // first list-sub-item
MqSendSTR(send,"myString"); // second list- sub-item
// ... do additional MqSend?
MqSendL_END(send); // finish a list-item
#define MqSendI32(...)
#define MqSendSTR(...)
#define MqSendL_START(...)
#define MqSendL_END(...)

Macro Definition Documentation

◆ MqSendL_END

#define MqSendL_END ( ...)
Value:
MqSendL_END_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 674 of file msgque_overload_mq.h.

◆ MqSendL_END_C

#define MqSendL_END_C ( ...)
Value:
if (MkErrorCheckI(MqSendL_END(__VA_ARGS__)))

Definition at line 676 of file msgque_overload_mq.h.

◆ MqSendL_END_E

#define MqSendL_END_E ( ...)
Value:
MkErrorCheck(MqSendL_END(__VA_ARGS__))

Definition at line 675 of file msgque_overload_mq.h.

◆ MqSendL_END_NULL

#define MqSendL_END_NULL ( ...)
Value:
MqSendL_END_RT(MK_RT_CALL_NULL __VA_ARGS__)
#define MK_RT_CALL_NULL

Definition at line 673 of file msgque_overload_mq.h.

◆ MqSendL_START

#define MqSendL_START ( ...)
Value:
MqSendL_START_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 678 of file msgque_overload_mq.h.

◆ MqSendL_START_C

#define MqSendL_START_C ( ...)
Value:
if (MkErrorCheckI(MqSendL_START(__VA_ARGS__)))

Definition at line 680 of file msgque_overload_mq.h.

◆ MqSendL_START_E

#define MqSendL_START_E ( ...)
Value:
MkErrorCheck(MqSendL_START(__VA_ARGS__))

Definition at line 679 of file msgque_overload_mq.h.

◆ MqSendL_START_NULL

#define MqSendL_START_NULL ( ...)
Value:
MqSendL_START_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 677 of file msgque_overload_mq.h.

◆ MqSendT_END

#define MqSendT_END ( ...)
Value:
MqSendT_END_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 682 of file msgque_overload_mq.h.

◆ MqSendT_END_C

#define MqSendT_END_C ( ...)
Value:
if (MkErrorCheckI(MqSendT_END(__VA_ARGS__)))
#define MqSendT_END(...)

Definition at line 684 of file msgque_overload_mq.h.

◆ MqSendT_END_E

#define MqSendT_END_E ( ...)
Value:
MkErrorCheck(MqSendT_END(__VA_ARGS__))

Definition at line 683 of file msgque_overload_mq.h.

◆ MqSendT_END_NULL

#define MqSendT_END_NULL ( ...)
Value:
MqSendT_END_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 681 of file msgque_overload_mq.h.

◆ MqSendT_START

#define MqSendT_START ( ...)
Value:
MqSendT_START_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 686 of file msgque_overload_mq.h.

◆ MqSendT_START_C

#define MqSendT_START_C ( ...)
Value:
if (MkErrorCheckI(MqSendT_START(__VA_ARGS__)))
#define MqSendT_START(...)

Definition at line 688 of file msgque_overload_mq.h.

◆ MqSendT_START_E

#define MqSendT_START_E ( ...)
Value:
MkErrorCheck(MqSendT_START(__VA_ARGS__))

Definition at line 687 of file msgque_overload_mq.h.

◆ MqSendT_START_NULL

#define MqSendT_START_NULL ( ...)
Value:
MqSendT_START_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 685 of file msgque_overload_mq.h.

Function Documentation

◆ MqSendL_END_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqSendL_END_RT ( MK_RT const mkrt,
MQ_CTX const ctx )

finish to append an embedded body-list-item to the send-data-package. …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)

◆ MqSendL_START_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqSendL_START_RT ( MK_RT const mkrt,
MQ_CTX const ctx )

start to append an embedded body-list-item to the send-data-package. …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Example
Create a body-list-item in C
MqSendL_START(send); // start a list-item
MqSendI32(send,myInt); // first list-sub-item
MqSendSTR(send,"myString"); // second list- sub-item
// ... do additional MqSend?
MqSendL_END(send); // finish a list-item

◆ MqSendT_END_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqSendT_END_RT ( MK_RT const mkrt,
MQ_CTX const ctx )

closed a longterm-transaction-item

finish a setup-block started with MqSendT_START. read more at MqSendEND_AND_TRANSACTION.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)

◆ MqSendT_START_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqSendT_START_RT ( MK_RT const mkrt,
MQ_CTX const ctx )

open a longterm-transaction-item

Every longterm-transaction-item have to be closed with MqSendT_END. Between MqSendT_START and MqSendT_END, a non specified number of other items can be added. These items are saved in a local database (in-memory or file-based) and the rowid is send as transaction-id to the link-target. By Default only the in-memory-database is used. To switch to a file-based database use the MqStorageOpen function.

Example from server.cc make a service-call with transaction-support

      void TRNS () {
	SendSTART ();
	SendT_START ();
	SendI32 (9876);
	SendT_END ();
	SendI32 ( ReadI32() );
	SendEND_AND_TRANSACTION ("ECOI", "TRN2");
	ProcessEvent (MQ_WAIT_ONCE, 10);
	SendSTART ();
	SendI32 (i);
	SendI32 (j);
	SendRETURN ();
      }
Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)