theLink 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
MqDumpC_TOR_C_API

MqDumpC - various functions to create, initialize and destroy a dumpMore...

+ Collaboration diagram for MqDumpC_TOR_C_API:

Functions

enum MkErrorE MqDumpExport_RT (MK_RT mkrt, MQ_CTX const ctx, MQ_DMP *const dumpP_inout)
 create a MqDumpC as export of the ctx-read-data-package
 
enum MkErrorE MqDumpError_RT (MK_RT mkrt, MQ_CTX const error, MQ_DMP *const dumpP_inout)
 export the context->error into the dump-package
 
enum MkErrorE MqDumpImport_RT (MK_RT mkrt, MQ_DMP const dump, MQ_CTX const ctx)
 import the dump-package into the ctx-read-data-package
 
enum MkErrorE MqDumpBinSet_RT (MK_RT mkrt, MkBinaryR data, MQ_DMP *dmp_out)
 create an MqDumpS object from binary data
 
MkBinaryR MqDumpBinGet (MQ_DMPN const dump)
 export the binary data from an MqDumpS object
 

MqDumpDelete

void MqDumpDelete_RT (MK_RT mkrt, MQ_DMP dmp)
 Destructor - delete a MqDumpC instance …
 

MqDumpC - MqDumpC_TOR_C_API - overload

#define MqDumpError_NULL(...)
 
#define MqDumpError(...)
 
#define MqDumpError_E(...)
 
#define MqDumpError_C(...)
 
#define MqDumpError_e(...)
 
#define MqDumpExport_NULL(...)
 
#define MqDumpExport(...)
 
#define MqDumpExport_E(...)
 
#define MqDumpExport_C(...)
 
#define MqDumpExport_e(...)
 
#define MqDumpBinSet_NULL(...)
 
#define MqDumpBinSet(...)
 
#define MqDumpBinSet_E(...)
 
#define MqDumpBinSet_C(...)
 
#define MqDumpBinSet_e(...)
 
#define MqDumpDelete(x)
 
#define MqDumpImport_NULL(...)
 
#define MqDumpImport(...)
 
#define MqDumpImport_E(...)
 
#define MqDumpImport_C(...)
 

Detailed Description

MqDumpC - various functions to create, initialize and destroy a dump

Macro Definition Documentation

◆ MqDumpBinSet

#define MqDumpBinSet ( ...)
Value:
#define MK_RT_CALL
enum MkErrorE MqDumpBinSet_RT(MK_RT mkrt, MkBinaryR data, MQ_DMP *dmp_out)
create an MqDumpS object from binary data

Definition at line 944 of file msgque_overload_mq.h.

◆ MqDumpBinSet_C

#define MqDumpBinSet_C ( ...)
Value:
if (MkErrorCheckI(MqDumpBinSet(__VA_ARGS__)))
#define MqDumpBinSet(...)

Definition at line 946 of file msgque_overload_mq.h.

◆ MqDumpBinSet_E

#define MqDumpBinSet_E ( ...)
Value:
MkErrorCheck(MqDumpBinSet(__VA_ARGS__))

Definition at line 945 of file msgque_overload_mq.h.

◆ MqDumpBinSet_e

#define MqDumpBinSet_e ( ...)
Value:
MK_EMBEDDED(MQ_DMP,MqDumpBinSet,__VA_ARGS__)
MqDumpC - the class known as dmp or dump is used to export a pymqmsgque data package as binary …

Definition at line 947 of file msgque_overload_mq.h.

◆ MqDumpBinSet_NULL

#define MqDumpBinSet_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 943 of file msgque_overload_mq.h.

◆ MqDumpDelete

#define MqDumpDelete ( x)
Value:
#define MkObjectDeleteToNull(fct, NS, x)
void MqDumpDelete_RT(MK_RT mkrt, MQ_DMP dmp)
Destructor - delete a MqDumpC instance …

Definition at line 950 of file msgque_overload_mq.h.

◆ MqDumpError

#define MqDumpError ( ...)
Value:
enum MkErrorE MqDumpError_RT(MK_RT mkrt, MQ_CTX const error, MQ_DMP *const dumpP_inout)
export the context->error into the dump-package …

Definition at line 932 of file msgque_overload_mq.h.

◆ MqDumpError_C

#define MqDumpError_C ( ...)
Value:
if (MkErrorCheckI(MqDumpError(__VA_ARGS__)))
#define MqDumpError(...)

Definition at line 934 of file msgque_overload_mq.h.

◆ MqDumpError_E

#define MqDumpError_E ( ...)
Value:
MkErrorCheck(MqDumpError(__VA_ARGS__))

Definition at line 933 of file msgque_overload_mq.h.

◆ MqDumpError_e

#define MqDumpError_e ( ...)
Value:
MK_EMBEDDED(MQ_DMP,MqDumpError,__VA_ARGS__)

Definition at line 935 of file msgque_overload_mq.h.

◆ MqDumpError_NULL

#define MqDumpError_NULL ( ...)
Value:

Definition at line 931 of file msgque_overload_mq.h.

◆ MqDumpExport

#define MqDumpExport ( ...)
Value:
enum MkErrorE MqDumpExport_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_DMP *const dumpP_inout)
create a MqDumpC as export of the ctx-read-data-package …

Definition at line 937 of file msgque_overload_mq.h.

◆ MqDumpExport_C

#define MqDumpExport_C ( ...)
Value:
if (MkErrorCheckI(MqDumpExport(__VA_ARGS__)))
#define MqDumpExport(...)

Definition at line 939 of file msgque_overload_mq.h.

◆ MqDumpExport_E

#define MqDumpExport_E ( ...)
Value:
MkErrorCheck(MqDumpExport(__VA_ARGS__))

Definition at line 938 of file msgque_overload_mq.h.

◆ MqDumpExport_e

#define MqDumpExport_e ( ...)
Value:
MK_EMBEDDED(MQ_DMP,MqDumpExport,__VA_ARGS__)

Definition at line 940 of file msgque_overload_mq.h.

◆ MqDumpExport_NULL

#define MqDumpExport_NULL ( ...)
Value:

Definition at line 936 of file msgque_overload_mq.h.

◆ MqDumpImport

#define MqDumpImport ( ...)
Value:
enum MkErrorE MqDumpImport_RT(MK_RT mkrt, MQ_DMP const dump, MQ_CTX const ctx)
import the dump-package into the ctx-read-data-package …

Definition at line 954 of file msgque_overload_mq.h.

◆ MqDumpImport_C

#define MqDumpImport_C ( ...)
Value:
if (MkErrorCheckI(MqDumpImport(__VA_ARGS__)))
#define MqDumpImport(...)

Definition at line 956 of file msgque_overload_mq.h.

◆ MqDumpImport_E

#define MqDumpImport_E ( ...)
Value:
MkErrorCheck(MqDumpImport(__VA_ARGS__))

Definition at line 955 of file msgque_overload_mq.h.

◆ MqDumpImport_NULL

#define MqDumpImport_NULL ( ...)
Value:

Definition at line 953 of file msgque_overload_mq.h.

Function Documentation

◆ MqDumpBinGet()

MkBinaryR MqDumpBinGet ( MQ_DMPN const dump)

export the binary data from an MqDumpS object

Parameters
[in]dumpthe source object
Returns
The required MkBinaryR
Attention
The data still belongs to the MqDumpS object… do NOT free.
MQ_DMPN const dump
) {
return (MkBinaryR) {dump->size, (MK_BIN)dump};
}
+ Here is the caller graph for this function:

◆ MqDumpBinSet_RT()

enum MkErrorE MqDumpBinSet_RT ( MK_RT mkrt,
MkBinaryR data,
MQ_DMP * dmp_out )

create an MqDumpS object from binary data

Check the MqDumpC_SIGNATURE and set the refCount to 0

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]datathe binary data
[out]dmp_outthe new MqDumpC
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Attention
The MqDumpS object is an pointer object… this mean the original data is still required and must NOT be freed.
MkBinaryR bin,
MQ_DMP *dmp_out
) {
assert(bin.data != NULL);
assert(dmp_out!=NULL);
MQ_DMP dump = (MQ_DMP) bin.data;
if (!__MkCheckX(MqDumpC,dump)) {
return MkErrorDbV_2_M(MK_ERROR_PRINT,MK_ERROR_VALUE_INVALID, "signature", "MqDumpS");
} else {
MkOBJ_R(dump).refCount = 0;
}
*dmp_out = dump;
return MK_OK;
}

◆ MqDumpDelete_RT()

void MqDumpDelete_RT ( MK_RT mkrt,
MQ_DMP dmp )

Destructor - delete a MqDumpC instance …

See also
MqDumpExport MqDumpError MkObjectDelete

◆ MqDumpError_RT()

enum MkErrorE MqDumpError_RT ( MK_RT mkrt,
MQ_CTX const error,
MQ_DMP *const dumpP_inout )

export the context->error into the dump-package

The export include all data required to setup a read-data-package later again. After import with MqDumpImport the read-data-package and the environment will be set as it was on MqDumpExport The export can be saved into an external storage or be used in a network-tunnel (example: the agurad tool).

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]errorthe error-context to be exported into the dump-package-data
[in,out]dumpP_inoutthe reference object or None at error
  • The reference object have to be non None.
  • If reference object is a refrence to a non None object than the reference object is populated with the result.
  • If reference object is a refrence to a None object than :
    • The reference object is set to the TLS alocated object owned by the Programming-Language-Micro-Kernel (PLMK).
    • (do not free) The memory of the reference object value belongs to the called pymqmsgque function and therefore never becomes None for a non-error result.
      For details on the reference object value, see: MkKernel_Storage_C_API.
  • The newly created reference-object is owned by the caller.
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Attention
1. use remarks from MqDumpExport
2. MqDumpError using the send-data-package to create the dump-package.. to use the send-data-package afterwords a MqSendSTART is required
See also
MqStorageExport, MqDumpImport, MqDumpExport

◆ MqDumpExport_RT()

enum MkErrorE MqDumpExport_RT ( MK_RT mkrt,
MQ_CTX const ctx,
MQ_DMP *const dumpP_inout )

create a MqDumpC as export of the ctx-read-data-package

The new instance belongs to the caller and may have to be released if necessary. A manual release using DumpDelete is always possible, but the instance can no longer be used afterwards.

The export include all data required to setup a read-data-package again later. After import with MqDumpImport the read-data-package and the environment will be set as it was on MqDumpExport The export can be saved into an external storage or be used in a network-tunnel (example: the aguard tool).

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe context to be exported into the dump-package-data
[in,out]dumpP_inoutthe reference object or None at error
  • The reference object have to be non None.
  • If reference object is a refrence to a non None object than the reference object is populated with the result.
  • If reference object is a refrence to a None object than :
    • The reference object is set to the TLS alocated object owned by the Programming-Language-Micro-Kernel (PLMK).
    • (do not free) The memory of the reference object value belongs to the called pymqmsgque function and therefore never becomes None for a non-error result.
      For details on the reference object value, see: MkKernel_Storage_C_API.
  • The newly created reference-object is owned by the caller.
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
See also
MqStorageExport, MqDumpImport, MqDumpError
Attention
1. The goal of this function is to create a dump to be loaded in the context later. If the context is not the original context… propably additional work is necessary.
2. The MqDumpExport is using realloc to allocate space. The value of *value should be initialized with either None or a result of a previous MqDumpExport or MqDumpError.
3. Garbage is detected using MqDumpC_SIGNATURE… there is a MINIMAL chance (1 to 4.294.967.295) that the gargabe is NOT detected… to be save… always initialize the dump.
4. If the dump was initialized with None or garbage … new memory will be allocated… If the dump memory will NOT be reused… free the memory with (6.)
5. If the dump was initialized with an previous dump … the memory will be reused… and extended with realloc if required.
6. Free the memory with MqDumpDelete.
7. On error… the dump is unchanged.
8. In case of TLS memory returned read more at MkKernel_Storage_C_API.

◆ MqDumpImport_RT()

enum MkErrorE MqDumpImport_RT ( MK_RT mkrt,
MQ_DMP const dump,
MQ_CTX const ctx )

import the dump-package into the ctx-read-data-package

The dump is the result of a previous MqDumpExport function call. After the load an package is suitable for all kind of MqContextC READ API function. To just forward the package use the MqProxyForward function.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]dumpthe dump-package to be imported
[in]ctxthe context in wich the dump-package is imported
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Attention
- The memory is dynamic-allocated and can be reused for the next MqDumpExport.
  • (do not free) The memory of the out/return value belongs to the called pymqmsgque function and therefore never becomes None for a non-error result.
    For details on the out/return value, see: MkKernel_Storage_C_API.
See also
MqStorageExport, MqDumpExport, MqDumpError