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

MkKernel PACKAGE - a collection of all native-data-types supported by MkBufferCMore...

+ Collaboration diagram for MkKernel_PrimitiveType_C_API:

Data Structures

union  MkBufferAtomU
 union used to set or modify native data from an MkBufferS object … More...
 
union  MkBufferU
 a union for all data items supported by MkBufferSMore...
 

macros to support types

#define MkType_O   MK_BOL
 
#define MkType_Y   MK_I8
 
#define MkType_S   MK_I16
 
#define MkType_I   MK_I32
 
#define MkType_W   MK_I64
 
#define MkType_F   MK_FLT
 
#define MkType_D   MK_DBL
 
#define MkType_C   MK_STRN
 
#define MkType_B   MK_BIN
 
#define MkType_U   MK_BUF
 
#define MkType_L   MK_BFL
 

Detailed Description

MkKernel PACKAGE - a collection of all native-data-types supported by MkBufferC

The data send from one package-item to an other package-item is focused on speed and usability. By default the data is send as binary, only if the endian changes or a string representation is required an additional transformation is done.
The data send from one package-item to an other package-item is limited to a collection of specific types, based on native C data types.
An libmkkernel-API command with a focus on a specific type is using a type-postfix, for example MqReadSTR read a (STR=string) data from the read-package.
In the documentation the type-item (TT) is a synonym for a (Y,O,S,I,W,F,D,B,C,L,U) type-item.

The following native-type identifier are available:

TT T native comment
BOL O MK_BOL 1 byte boolean value using MK_YES or MK_NO
I8 Y MK_I8 1 byte signed character
I16 S MK_I16 2 byte signed short
I32 I MK_I32 4 byte signed integer
I64 W MK_I64 8 byte signed long long integer
FLT F MK_FLT 4 byte float
DBL D MK_DBL 8 byte double
BIN B MK_BINN unsigned char array used for binary data
STR C MK_STR string data using a \0 at the end

The following composee identifier's are available:

TT T native comment
BUF U MK_BUF buffer-item that can hold any single typed item from above
BFL L MK_BFL buffer-list that can hold many buffer-item from above

Every native-data-type is encapsualted into a MkBufferC. A MkBufferC is type safe, this mean that every read to a MkBufferC have to match the data-type of the previous write. One exception is available, the cast from and to the C data-type (TYPE=C) is allowed.

Sending data mean sending one ore more MkBufferC from one package-item to an other package-item. The sender is using a MqSendTT command to put data as MkBufferC into an send-data-package and the reveiver is using a MqReadTT command to retrieve the data from the read-data-package.

Macro Definition Documentation

◆ MkType_B

#define MkType_B   MK_BIN

Definition at line 2074 of file LibMkKernel_mk.h.

◆ MkType_C

#define MkType_C   MK_STRN

Definition at line 2073 of file LibMkKernel_mk.h.

◆ MkType_D

#define MkType_D   MK_DBL

Definition at line 2072 of file LibMkKernel_mk.h.

◆ MkType_F

#define MkType_F   MK_FLT

Definition at line 2071 of file LibMkKernel_mk.h.

◆ MkType_I

#define MkType_I   MK_I32

Definition at line 2069 of file LibMkKernel_mk.h.

◆ MkType_L

#define MkType_L   MK_BFL

Definition at line 2076 of file LibMkKernel_mk.h.

◆ MkType_O

#define MkType_O   MK_BOL

Definition at line 2066 of file LibMkKernel_mk.h.

◆ MkType_S

#define MkType_S   MK_I16

Definition at line 2068 of file LibMkKernel_mk.h.

◆ MkType_U

#define MkType_U   MK_BUF

Definition at line 2075 of file LibMkKernel_mk.h.

◆ MkType_W

#define MkType_W   MK_I64

Definition at line 2070 of file LibMkKernel_mk.h.

◆ MkType_Y

#define MkType_Y   MK_I8

Definition at line 2067 of file LibMkKernel_mk.h.