TG Motion  version 421 - 4033/904 cnc 121
Real-time system for controlling servo drives and I/O modules
CTGM_COMM_INT_2 Class Reference

C++ wrapper class for TGM_Comm_Int_2 library functions. More...

#include <tgm_comm_int_ii_dll.h>

Public Member Functions

error_code LoadDll (const char *fileName)
 First function to be called. Loads the TGM_Comm_Int_2.dll and gets pointers to all of its exported functions. More...
 
error_code Create_Interface_2 (const TGM_TCHAR *DLL_Directory)
 Create communication interface. More...
 
void Destroy_Interface ()
 Closes created interface. Need to be called during application termination.
 
error_code Open_Connection (int32_t keepOnline, int32_t commTimeout, device deviceType, uint32_t IPAddress)
 Establishes a communication with a given device. More...
 
error_code Close_Connection ()
 Close already opened connection. Each call to Open_Connection must match the Close_Connection. More...
 
error_code Change_Connection (device deviceType, uint32_t IPAddress)
 Change connection type on the fly. More...
 
error_code Get_Dll_Info (device deviceType, int32_t *pVersion, int32_t *pCompatibilityID, int32_t *pCompatibilityMemID)
 Get information about communication library (depending on device type) More...
 
void Set_App_Compatibility_VN (int32_t compatibilityID, int32_t compatibilityMemID, int32_t version, const TGM_TCHAR *appName)
 Set application compatibility request values. More...
 
status Get_Status ()
 Returns actual status. More...
 
status Get_Status_Graphics (int32_t *pBackgroundColor, int32_t *pTextColor, TGM_TCHAR *statusText)
 Returns actual status and its text representation. More...
 
error_code Show_Connections_Info_Win (TGM_HWND parent, int32_t enableChangeConnection)
 Displays Connection Info window with an info of all the connections and plug-in modules. More...
 
error_code Close_Connections_Info_Win ()
 Closes connection info window opened by Show_Connections_Info_Win. More...
 
void Get_Connections_Info_Win_Dimension (int32_t *pWidth, int32_t *pHeight)
 Returns recommended width and height of the Connection Info window. More...
 
error_code Get_Connections_Info_2 (device *pDeviceType, uint32_t *IPAddress, connected_memory *pConnectedMemory)
 Returns information about actually opened communication. More...
 
error_code Get_Server_Info (device deviceType, int32_t *pCompatibilityID, int32_t *pCompatibilityMemID, status *pConnectionStatus)
 Returns information about the remote server. More...
 
read_write Read_I32 (shared_memory memoryType, uint32_t offset, int32_t *pValue)
 Read 32bit integer from shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local value. More...
 
read_write Read_I64 (shared_memory memoryType, uint32_t offset, int64_t *pValue)
 Read 64bit integer from shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local value. More...
 
read_write Read_Double (shared_memory memoryType, uint32_t offset, double *pValue)
 Read double floating point value (8 bytes) from shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local value. More...
 
read_write Read_BLOCK (shared_memory memoryType, uint32_t offset, void *buffer, uint32_t bufferLength)
 Read block of shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local values. More...
 
read_write Read_LPSTR (shared_memory memoryType, uint32_t offset, char *buffer, uint32_t buffer_Char_Len, uint32_t *pRead_Char_Count)
 Read ANSI string from memory. For remote devices, the read request is sent and the function returns the last (previous) stored local values. More...
 
read_write Read_LPWSTR (shared_memory memoryType, uint32_t offset, TGM_WCHAR *buffer, uint32_t buffer_Char_Len, uint32_t *pRead_Char_Count)
 Read UTF-16 string from memory. For remote devices, the read request is sent and the function returns the last (previous) stored local values. More...
 
read_write Write_I32 (shared_memory memoryType, uint32_t offset, int32_t Value)
 Write 32bit integer to shared memory. For remote devices, the write request is sent and the function immediatelly returns. More...
 
read_write Write_I64 (shared_memory memoryType, uint32_t offset, int64_t Value)
 Write 64bit integer to shared memory. For remote devices, the write request is sent and the function immediatelly returns. More...
 
read_write Write_Double (shared_memory memoryType, uint32_t offset, double Value)
 Write double floating point value (8 bytes) to shared memory. For remote devices, the write request is sent and the function immediatelly returns. More...
 
read_write Write_BLOCK (shared_memory memoryType, uint32_t offset, const void *buffer, uint32_t bufferLength)
 Write block (any memory structure) to shared memory. More...
 
read_write Write_LPSTR (shared_memory memoryType, uint32_t offset, const char *buffer, uint32_t Write_Char_Len)
 Write ANSI string to shared memory. More...
 
read_write Write_LPWSTR (shared_memory memoryType, uint32_t offset, const TGM_WCHAR *buffer, uint32_t Write_Char_Len)
 Write UNICODE string (UTF-16) to shared memory. More...
 
read_write Set_Bit_I32 (shared_memory memoryType, uint32_t offset, int32_t Value)
 Performs logical OR on 32bit integer in shared memory. (i.e. originalValue |= Value). More...
 
read_write Set_Bit_I64 (shared_memory memoryType, uint32_t offset, int64_t Value)
 Performs logical OR on 64bit integer in shared memory. (i.e. originalValue |= Value). More...
 
read_write Clr_Bit_I32 (shared_memory memoryType, uint32_t offset, int32_t Value)
 Performs logical NAND on 32bit integer in shared memory. (i.e. originalValue &= ~Value). More...
 
read_write Clr_Bit_I64 (shared_memory memoryType, uint32_t offset, int64_t Value)
 Performs logical NAND on 64bit integer in shared memory. (i.e. originalValue &= ~Value). More...
 
read_write Tgl_Bit_I32 (shared_memory memoryType, uint32_t offset, int32_t Value)
 Performs logical XOR on 32bit integer in shared memory. (i.e. originalValue ^= Value). More...
 
read_write Tgl_Bit_I64 (shared_memory memoryType, uint32_t offset, int64_t Value)
 Performs logical XOR on 64bit integer in shared memory. (i.e. originalValue ^= Value). More...
 
read_write Read_I32_DIRECT (shared_memory memoryType, uint32_t offset, int32_t *pValue)
 Read 32bit integer from shared memory. For remote devices the function always waits for response, i.e. it returns the actual value. More...
 
read_write Read_I64_DIRECT (shared_memory memoryType, uint32_t offset, int64_t *pValue)
 Read 64bit integer from shared memory. For remote devices the function always waits for response, i.e. it returns the actual value. More...
 
read_write Read_Double_DIRECT (shared_memory memoryType, uint32_t offset, double *pValue)
 Read double floating point value (8 bytes) from shared memory. For remote devices the function always waits for response, i.e. it returns the actual value. More...
 
read_write Read_BLOCK_DIRECT (shared_memory memoryType, uint32_t offset, void *buffer, uint32_t bufferLength)
 Read data from shared memory. For remote devices the function always waits for response, i.e. it returns the actual data. More...
 
read_write Read_LPSTR_DIRECT (shared_memory memoryType, uint32_t offset, char *buffer, uint32_t buffer_Char_Len, uint32_t *pRead_Char_Count)
 Read ANSI string from memory. For remote devices the function always waits for response, i.e. it returns the actual data. More...
 
read_write Read_LPWSTR_DIRECT (shared_memory memoryType, uint32_t offset, TGM_WCHAR *buffer, uint32_t buffer_Char_Len, uint32_t *pRead_Char_Count)
 Read UTF-16 string from memory. For remote devices the function always waits for response, i.e. it returns the actual data. More...
 
read_write Write_I32_DIRECT (shared_memory memoryType, uint32_t offset, int32_t Value)
 Write 32bit integer to shared memory. For remote devices the function always waits for acknowledge. More...
 
read_write Write_I64_DIRECT (shared_memory memoryType, uint32_t offset, int64_t Value)
 Write 64bit integer to shared memory. For remote devices the function always waits for acknowledge. More...
 
read_write Write_Double_DIRECT (shared_memory memoryType, uint32_t offset, double Value)
 Write double floating point value (8 bytes) to shared memory. For remote devices the function always waits for acknowledge. More...
 
read_write Write_BLOCK_DIRECT (shared_memory memoryType, uint32_t offset, const void *buffer, uint32_t bufferLength)
 Write double to shared memory. For remote devices the function always waits for acknowledge. More...
 
read_write Write_LPSTR_DIRECT (shared_memory memoryType, uint32_t offset, const char *buffer, uint32_t Write_Char_Len)
 Write ANSI string to shared memory. For remote devices the function always waits for acknowledge. More...
 
read_write Write_LPWSTR_DIRECT (shared_memory memoryType, uint32_t offset, const TGM_WCHAR *buffer, uint32_t Write_Char_Len)
 Write UNICODE string (UTF-16) to shared memory. For remote devices the function always waits for acknowledge. More...
 
read_write Set_Bit_I32_DIRECT (shared_memory memoryType, uint32_t offset, int32_t Value)
 Performs logical OR on 32bit integer in shared memory. (i.e. originalValue |= Value). For remote devices the function always wait for acknowledge. More...
 
read_write Set_Bit_I64_DIRECT (shared_memory memoryType, uint32_t offset, int64_t Value)
 Performs logical OR on 64bit integer in shared memory. (i.e. originalValue |= Value). For remote devices the function always wait for acknowledge. More...
 
read_write Clr_Bit_I32_DIRECT (shared_memory memoryType, uint32_t offset, int32_t Value)
 Performs logical NAND on 32bit integer in shared memory. (i.e. originalValue &= ~Value). For remote devices the function always wait for acknowledge. More...
 
read_write Clr_Bit_I64_DIRECT (shared_memory memoryType, uint32_t offset, int64_t Value)
 Performs logical NAND on 64bit integer in shared memory. (i.e. originalValue &= ~Value). For remote devices the function always wait for acknowledge. More...
 
read_write Tgl_Bit_I32_DIRECT (shared_memory memoryType, uint32_t offset, int32_t Value)
 Performs logical XOR on 32bit integer in shared memory. (i.e. originalValue ^= Value). For remote devices the function always wait for acknowledge. More...
 
read_write Tgl_Bit_I64_DIRECT (shared_memory memoryType, uint32_t offset, int64_t Value)
 Performs logical XOR on 64bit integer in shared memory. (i.e. originalValue ^= Value). For remote devices the function always wait for acknowledge. More...
 
read_write Flush_Buffer ()
 For remote devices, send all the requests stored in command queue (i.e. sends all non-direct Read and Write function requests). More...
 

Static Public Member Functions

static const TGM_TCHAR * DeviceToString (device deviceType)
 Converts device type to UNICODE (Windows) or ANSI (Linux) string. More...
 
static const TGM_TCHAR * StatusToString (status code)
 Converts status value to its text representation - UNICODE (Windows) or ANSI (Linux) More...
 
static const TGM_TCHAR * ReadWriteCodeToString (read_write code)
 Converts return valud of Read_XXX and Write_XXX functions to UNICODE (Windows) or ANSI (Linux) string. More...
 
static const char * DeviceToStringA (device deviceType)
 Convert device type to ANSI string. More...
 
static const char * StatusToStringA (status code)
 Converts status value to ANSI string. More...
 
static const char * ReadWriteCodeToStringA (read_write code)
 Converts read_write error code to ANSI string. More...
 
static const char * ErrorCodeToStringA (error_code code)
 Converts error_code to ANSI string. More...
 
static const char * MemoryTypeToStringA (shared_memory memory)
 Converts memory type to its ANSI name. More...
 

Public Attributes

enum ENUM_CLASS error_code: int32_t { Success = 0
 Error codes returned by most of the functions. More...
 
enum ENUM_CLASS Device_Type = 1
 unknown device type
 
enum ENUM_CLASS Interface_Not_Create = 2
 Create_Interface_2 function not called
 
enum ENUM_CLASS Connection_Not_Open = 3
 Open_Connection not called
 
enum ENUM_CLASS Not_Detect_Comm_DLL = 4
 TGM_Comm_Int_2.dll or supplemental DLL not found (TGM_MINI.dll, TGM_Remote.dll)
 
enum ENUM_CLASS Interface_Already_Exists = 5
 Create_Interface_2 already called
 
enum ENUM_CLASS Interface_Create_Off_Mem = 6
 Offline shared memory cannot be created.
 
enum ENUM_CLASS Connection_Already_Exists = 7
 Open_Connection already called
 
enum ENUM_CLASS Connection_Create_Thread = 8
 working thread cannot be created
 
enum ENUM_CLASS Invalid_Data = 9
 invalid data - memory number, offset, etc.
 
enum ENUM_CLASS device: uint32_t { Local_TGM = 0
 Allowed device types. More...
 
enum ENUM_CLASS TGM_Mini = 1
 TGM mini connected via network, valid IP address is needed for Open_Connection()
 
enum ENUM_CLASS TGM_REMOTE = 2
 TG Motion running on remote PC.
 
enum ENUM_CLASS connected_memory: int32_t { None = 0
 Connected memory types. More...
 
enum ENUM_CLASS Local_Offline = 1
 local offline memories (TGM simulation)
 
enum ENUM_CLASS Local_TGM_Online = 2
 local TGM memories (TGM running under real-time)
 
enum ENUM_CLASS TGM_Mini_Offline = 3
 offline memory of TGMmini (remote)
 
enum ENUM_CLASS TGM_Mini_Online = 4
 TGMmini memories (remote)
 
enum ENUM_CLASS REM_Client_Offline = 5
 client offline memories (TGM_REMOTE)
 
enum ENUM_CLASS REM_Server_Offline = 6
 server offline memories (TGM_REMOTE)
 
enum ENUM_CLASS REM_Server = 7
 server memories (TGM_REMOTE)
 
enum ENUM_CLASS compatibility: int32_t { App_ID_None = -1
 Compatibility types.
 
enum ENUM_CLASS status: int32_t { Simulation_Mode_TGM = 2
 connection status (return codes of Get_Status()) More...
 
enum ENUM_CLASS Online = 1
 Online - connection established.
 
enum ENUM_CLASS Offline_Connection_Proceeds = 0
 Offline - waiting for connection (usually for remote devices)
 
enum ENUM_CLASS Offline_Device_Offline = -1
 Offline - device is not connected (ether TG Motion is not running locally or remote device is not connected)
 
enum ENUM_CLASS Offline_Incompatible_DLL_ID = -2
 Offline - wrong App ID compatibility number of DLL and application.
 
enum ENUM_CLASS Offline_Incompatible_DLL_Mem_ID = -3
 Offline - wrong App Mem ID compatibility number of DLL and application.
 
enum ENUM_CLASS Offline_Incompatible_DEVICE_ID = -4
 Offline - wrong Device ID compatibility number of DLL and application.
 
enum ENUM_CLASS Offline_Incompatible_DEVICE_Mem_ID = -5
 Offline - wrong Device memory ID compatibility number of DLL and application.
 
enum ENUM_CLASS Offline_Not_Detect_Comm_DLL = -6
 Offline - suplemental comm dll not found.
 
enum ENUM_CLASS Offline_Open_Connection_Failed = -7
 Offline - invalid parameters of Open_Connection() function.
 
enum ENUM_CLASS Offline_Init_Connection_Failed = -8
 Offline -.
 
enum ENUM_CLASS Offline_Connection_Not_Opened = -9
 Offline - no connection opened.
 
enum ENUM_CLASS Offline_Interface_Not_Create = -10
 Offline - interface not created.
 
enum ENUM_CLASS read_write: int32_t { OK = 0
 return values of Read_xxx and Write_xxx functions More...
 
enum ENUM_CLASS OK_Offline_Data = -1
 OK - data are read from offline memory (TGM simulation)
 
enum ENUM_CLASS ERR_Invalid_Data = -2
 ERR - invalid memory type, offset, length, etc.
 
enum ENUM_CLASS ERR_Device_Busy = -3
 ERR - timeout R/W.
 
enum ENUM_CLASS ERR_Interface_Not_Create = -8
 ERR - Create_Interface not called.
 
enum ENUM_CLASS ERR_Unsupported_Function = -9
 ERR - function is not supported by device.
 
enum ENUM_CLASS ERR_Connection_Not_Open = 3
 ERR - Open_Connection not called.
 
enum ENUM_CLASS ERR_Not_Detect_Comm_DLL = 4
 TGM_Comm_Int_2.dll or suplemental DLL not found (TGM_MINI.dll, TGM_Remote.dll)
 
enum ENUM_CLASS shared_memory: uint32_t { SYSTEM = 0
 Shared memory numbers. More...
 
enum ENUM_CLASS DATA = 1
 TGM_DATA.
 
enum ENUM_CLASS CAM = 2
 TGM_Cam_Profile.
 
enum ENUM_CLASS OSC = 3
 TGM_Oscilloscope.
 
enum ENUM_CLASS SERVO = 4
 TGM_Servo.
 
enum ENUM_CLASS DIO = 5
 TGM_DIO.
 
enum ENUM_CLASS INTERP = 6
 TGM_Interpolator.
 
enum ENUM_CLASS INTERP_W = 7
 InterpolatorWriteMemory.
 
enum ENUM_CLASS INTERP_R = 8
 InterpolatorReadMemory.
 
enum ENUM_CLASS ODS = 9
 TGM_ODS (OutputDebugString)
 
enum ENUM_CLASS CNC_EX = 10
 TGM_CNCEX (CNC module)
 
enum ENUM_CLASS G_CODE = 11
 TGM_GCODE (gcode in binary format storage)
 
enum ENUM_CLASS CNC_EX_LOCAL = 12
 local device only, DLL shadow of shared TGM_CNCEX
 
enum ENUM_CLASS CNC_INI = 13
 TGM_CNCINI (cnc ini file)
 
enum ENUM_CLASS UNIVERSAL = 14
 TGM_Universal.
 
enum ENUM_CLASS NMemories = 15
 number of memories (without the CNC_EX_LOCAL)
 

Detailed Description

C++ wrapper class for TGM_Comm_Int_2 library functions.

Use of the wrapper:

  1. call CTGM_COMM_INT_2::LoadDll with the full path to the TGM_Comm_Int_2.dll (or libTGM_Comm_Int_2.so)
  2. use CTGM_COMM_INT_2::Open_Connection to connect to particular TG Motion device (local, TGMmini, remote on other PC)
    • for real-time and simulated local TG Motion (H_TGM420_WIN.EXE) set device type to CTGM_COMM_INT_2::device::Local_TGM
  3. Wait for connection establishment by repeated call to CTGM_COMM_INT_2::Get_Status function.
  4. Use read and write functions:
    • on local device, the xxx_DIRECT and "normal" functions are the same
    • on remote device (TGM_Mini, TGM_Remote):
      • "normal" functions does not wait for response, i.e. read functions always returns the previous read value
      • xxx_DIRECT functions wait for ack (write) or for an actual read value since the communication goes through Ethernet, the xxx_DIRECT functions can block for several ms
      • it is up to programmer to use the correct functions, "normal" or xxx_DIRECT
  5. When finished, use CTGM_COMM_INT_2::Close_Connection and CTGM_COMM_INT_2::Destroy_Interface functions (called automatically in wrapper destructor)
Note
All the read and write function are thread-safe.

Definition at line 169 of file tgm_comm_int_ii_dll.h.

Member Function Documentation

◆ LoadDll()

error_code CTGM_COMM_INT_2::LoadDll ( const char *  fileName)
inline

First function to be called. Loads the TGM_Comm_Int_2.dll and gets pointers to all of its exported functions.

Parameters
fileNameFull path to DLL file name. Only filename is not sufficient, since the DLL needs also the directory, where suplemental DLLs are stored (TGM_Mini.dll, TGM_Remote.dll). Always ANSI. Internally calls Create_Interface_2. Uses path of the DLL filename for suplemental DLLs directory (i.e. the suplemental DLLs must be in the same folder as TGM_Comm_Int_2.dll)
Returns
Any value of error_code enumeration.

Definition at line 394 of file tgm_comm_int_ii_dll.h.

◆ Create_Interface_2()

error_code CTGM_COMM_INT_2::Create_Interface_2 ( const TGM_TCHAR *  DLL_Directory)
inline

Create communication interface.

Parameters
DLL_Directory- ANSI/UNICODE path to directory, where the suplemental DLLs are stored.
Returns
Any value of error_code enumeration.
Note
This funcion is not needed to call, since LoadDll() internally calls Create_Interface_2 and handles ANSI -> UNICODE conversion.

Definition at line 481 of file tgm_comm_int_ii_dll.h.

◆ Open_Connection()

error_code CTGM_COMM_INT_2::Open_Connection ( int32_t  keepOnline,
int32_t  commTimeout,
device  deviceType,
uint32_t  IPAddress 
)
inline

Establishes a communication with a given device.

Parameters
keepOnlineIf 0, after communication closes, do not automatically try to open connection again. If non-zero, tries to keep the communication open, or automatically opens it (usable for remote devices)
commTimeoutTimeout for opening the connection in ms
deviceTypedevice type (0 - local TG Motion, 1 - TGM mini, 2 - TGM remote)
IPAddressIPv4 address of remote device
Returns
Any value of error_code enumeration.

Definition at line 540 of file tgm_comm_int_ii_dll.h.

◆ Close_Connection()

error_code CTGM_COMM_INT_2::Close_Connection ( )
inline

Close already opened connection. Each call to Open_Connection must match the Close_Connection.

Returns
Any value of error_code enumeration.

Definition at line 580 of file tgm_comm_int_ii_dll.h.

◆ Change_Connection()

error_code CTGM_COMM_INT_2::Change_Connection ( device  deviceType,
uint32_t  IPAddress 
)
inline

Change connection type on the fly.

Parameters
deviceTypedevice to connect to (0 - local TG Motion, 1 - TGM mini, 2 - TGM remote)
IPAddressIPv4 address of the remote device
Returns
0 for success or error_code

Definition at line 611 of file tgm_comm_int_ii_dll.h.

◆ Get_Dll_Info()

error_code CTGM_COMM_INT_2::Get_Dll_Info ( device  deviceType,
int32_t *  pVersion,
int32_t *  pCompatibilityID,
int32_t *  pCompatibilityMemID 
)
inline

Get information about communication library (depending on device type)

Parameters
deviceType- 0 - TGM_Comm_Int_2.dll, 1 - TGM_Mini.dll, 2 - TGM_Remote.dll
pVersionReturned version, must be valid pointer
pCompatibilityIDReturned compatibility ID, must be valid pointer
pCompatibilityMemIDReturned memory compatibility ID, must be valid pointer
Returns
0 for success or error_code

Definition at line 637 of file tgm_comm_int_ii_dll.h.

◆ Set_App_Compatibility_VN()

void CTGM_COMM_INT_2::Set_App_Compatibility_VN ( int32_t  compatibilityID,
int32_t  compatibilityMemID,
int32_t  version,
const TGM_TCHAR *  appName 
)
inline

Set application compatibility request values.

In the case the compatibilities do not match, the communication library will not work. The Get_Status function will return any of the incompatibility status codes. If this function is not called, the compatibility check inside the TGM_Comm_Int_2 is not performed.

Parameters
compatibilityIDRequested compatibility ID of the device (local TG Motion, TGMmini, etc.)
compatibilityMemIDRequested memory compatibility ID
versionApplication version to be displayed in the Connection Info window (Show_Connections_Info_Win function). Version format is decimal number vvvddmmrr (e.g. 052110917 is version 05.2 from 11 Sept 2017)
appNameApplication name to be displayed in Connection Info dialog box

Definition at line 658 of file tgm_comm_int_ii_dll.h.

◆ Get_Status()

status CTGM_COMM_INT_2::Get_Status ( )
inline

Returns actual status.

Returns
status codes enumeration

Definition at line 668 of file tgm_comm_int_ii_dll.h.

◆ Get_Status_Graphics()

status CTGM_COMM_INT_2::Get_Status_Graphics ( int32_t *  pBackgroundColor,
int32_t *  pTextColor,
TGM_TCHAR *  statusText 
)
inline

Returns actual status and its text representation.

Parameters
pBackgroundColorRecommended RGB color for displaying background of the statusText
pTextColorRecommended RGB color for displaying the statusText
statusTextPointer to UNICODE (Windows) / ANSI (Linux) string with minimal length of 256 characters, which will contain the status in English text form.
Returns
status codes enumeration

Definition at line 683 of file tgm_comm_int_ii_dll.h.

◆ Show_Connections_Info_Win()

error_code CTGM_COMM_INT_2::Show_Connections_Info_Win ( TGM_HWND  parent,
int32_t  enableChangeConnection 
)
inline

Displays Connection Info window with an info of all the connections and plug-in modules.

Parameters
parentHandle of the parent window. Can be NULL.
enableChangeConnectionEnable change type of the connection directly in the window.
Returns
0 for success or error_code
Note
The window remains open till Close_Connections_Info_Win function is called

Definition at line 697 of file tgm_comm_int_ii_dll.h.

◆ Close_Connections_Info_Win()

error_code CTGM_COMM_INT_2::Close_Connections_Info_Win ( )
inline

Closes connection info window opened by Show_Connections_Info_Win.

Returns
0 for success or error_code

Definition at line 708 of file tgm_comm_int_ii_dll.h.

◆ Get_Connections_Info_Win_Dimension()

void CTGM_COMM_INT_2::Get_Connections_Info_Win_Dimension ( int32_t *  pWidth,
int32_t *  pHeight 
)
inline

Returns recommended width and height of the Connection Info window.

Parameters
pWidthPointer to valid pointer, which will contain the width of the window
pHeightPointer to valid pointer, which will contain the height of the window
Note
In the case of failure, no values are stored to pWidth or pHeight, so it is recommended to set its values to zero before calling this function.

Definition at line 722 of file tgm_comm_int_ii_dll.h.

◆ Get_Connections_Info_2()

error_code CTGM_COMM_INT_2::Get_Connections_Info_2 ( device pDeviceType,
uint32_t *  IPAddress,
connected_memory pConnectedMemory 
)
inline

Returns information about actually opened communication.

Parameters
pDeviceTypePointer to actual used device
IPAddressIn the case of remote devices (TGMmini, TGM Remote), used IPv4 address of the device
pConnectedMemoryMemory used for connection
Returns
0 for success or error_code
Note
All the pointers must be valid.

Definition at line 738 of file tgm_comm_int_ii_dll.h.

◆ Get_Server_Info()

error_code CTGM_COMM_INT_2::Get_Server_Info ( device  deviceType,
int32_t *  pCompatibilityID,
int32_t *  pCompatibilityMemID,
status pConnectionStatus 
)
inline

Returns information about the remote server.

Parameters
deviceTypeDevice to get info about
pCompatibilityIDReturned compatibility ID
pCompatibilityMemIDReturned memory compatibility ID
pConnectionStatusActual connection status
Returns
0 for success or error_code
Note
All the pointers must be valid.

Definition at line 757 of file tgm_comm_int_ii_dll.h.

◆ Read_I32()

read_write CTGM_COMM_INT_2::Read_I32 ( shared_memory  memoryType,
uint32_t  offset,
int32_t *  pValue 
)
inline

Read 32bit integer from shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local value.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
pValueReturned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 780 of file tgm_comm_int_ii_dll.h.

◆ Read_I64()

read_write CTGM_COMM_INT_2::Read_I64 ( shared_memory  memoryType,
uint32_t  offset,
int64_t *  pValue 
)
inline

Read 64bit integer from shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local value.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
pValueReturned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 799 of file tgm_comm_int_ii_dll.h.

◆ Read_Double()

read_write CTGM_COMM_INT_2::Read_Double ( shared_memory  memoryType,
uint32_t  offset,
double *  pValue 
)
inline

Read double floating point value (8 bytes) from shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local value.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
pValueReturned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 818 of file tgm_comm_int_ii_dll.h.

◆ Read_BLOCK()

read_write CTGM_COMM_INT_2::Read_BLOCK ( shared_memory  memoryType,
uint32_t  offset,
void *  buffer,
uint32_t  bufferLength 
)
inline

Read block of shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local values.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to buffer for storing the data. In case of error, no data are written to the buffer. Pointer must be valid.
bufferLengthLength of data to be written in bytes
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 838 of file tgm_comm_int_ii_dll.h.

◆ Read_LPSTR()

read_write CTGM_COMM_INT_2::Read_LPSTR ( shared_memory  memoryType,
uint32_t  offset,
char *  buffer,
uint32_t  buffer_Char_Len,
uint32_t *  pRead_Char_Count 
)
inline

Read ANSI string from memory. For remote devices, the read request is sent and the function returns the last (previous) stored local values.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to buffer for storing the string (ANSI). In case of error, no data are written to the buffer. Pointer must be valid.
buffer_Char_LenLength of the buffer in characters
pRead_Char_CountPointer to variable where is stored the actual number of characters read. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 861 of file tgm_comm_int_ii_dll.h.

◆ Read_LPWSTR()

read_write CTGM_COMM_INT_2::Read_LPWSTR ( shared_memory  memoryType,
uint32_t  offset,
TGM_WCHAR *  buffer,
uint32_t  buffer_Char_Len,
uint32_t *  pRead_Char_Count 
)
inline

Read UTF-16 string from memory. For remote devices, the read request is sent and the function returns the last (previous) stored local values.

Parameters
memoryType- see enum shared_memory
offset- byte offset to memory
buffer- pointer to buffer for storing the string (UTF-16). In case of error, no data are written to the buffer.
buffer_Char_Len- length of the buffer in characters
pRead_Char_Count- pointer to variable where is stored the actual number of characters read
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 883 of file tgm_comm_int_ii_dll.h.

◆ Write_I32()

read_write CTGM_COMM_INT_2::Write_I32 ( shared_memory  memoryType,
uint32_t  offset,
int32_t  Value 
)
inline

Write 32bit integer to shared memory. For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
ValueInteger value to be written
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 902 of file tgm_comm_int_ii_dll.h.

◆ Write_I64()

read_write CTGM_COMM_INT_2::Write_I64 ( shared_memory  memoryType,
uint32_t  offset,
int64_t  Value 
)
inline

Write 64bit integer to shared memory. For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueInteger value to be written
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 918 of file tgm_comm_int_ii_dll.h.

◆ Write_Double()

read_write CTGM_COMM_INT_2::Write_Double ( shared_memory  memoryType,
uint32_t  offset,
double  Value 
)
inline

Write double floating point value (8 bytes) to shared memory. For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueFloating point value to be written
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 935 of file tgm_comm_int_ii_dll.h.

◆ Write_BLOCK()

read_write CTGM_COMM_INT_2::Write_BLOCK ( shared_memory  memoryType,
uint32_t  offset,
const void *  buffer,
uint32_t  bufferLength 
)
inline

Write block (any memory structure) to shared memory.

For remote devices, the write request is sent and the function immediatelly returns. Use this function with caution for remote devices - the structure passed could be splitted due to Ethernet packet length and not all structure members would be written at once.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to data to be written. Pointer must be valid.
bufferLengthData length in bytes
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 956 of file tgm_comm_int_ii_dll.h.

◆ Write_LPSTR()

read_write CTGM_COMM_INT_2::Write_LPSTR ( shared_memory  memoryType,
uint32_t  offset,
const char *  buffer,
uint32_t  Write_Char_Len 
)
inline

Write ANSI string to shared memory.

For remote devices, the write request is sent and the function immediatelly returns. Use this function with caution for remote devices - the string passed could be splitted due to Ethernet packet length and not all string characters would be written at once.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to ANSI string to be written. Pointer must be valid.
Write_Char_LenString length in characters (without the terminating null character)
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 980 of file tgm_comm_int_ii_dll.h.

◆ Write_LPWSTR()

read_write CTGM_COMM_INT_2::Write_LPWSTR ( shared_memory  memoryType,
uint32_t  offset,
const TGM_WCHAR *  buffer,
uint32_t  Write_Char_Len 
)
inline

Write UNICODE string (UTF-16) to shared memory.

For remote devices, the write request is sent and the function immediatelly returns. Use this function with caution for remote devices - the string passed could be splitted due to Ethernet packet length and not all string characters would be written at once.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to UTF-16 string to be written. Pointer must be valid.
Write_Char_LenString length in characters (without the terminating null character)
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 1004 of file tgm_comm_int_ii_dll.h.

◆ Set_Bit_I32()

read_write CTGM_COMM_INT_2::Set_Bit_I32 ( shared_memory  memoryType,
uint32_t  offset,
int32_t  Value 
)
inline

Performs logical OR on 32bit integer in shared memory. (i.e. originalValue |= Value).

For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
ValueInteger value to be ORed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 1023 of file tgm_comm_int_ii_dll.h.

◆ Set_Bit_I64()

read_write CTGM_COMM_INT_2::Set_Bit_I64 ( shared_memory  memoryType,
uint32_t  offset,
int64_t  Value 
)
inline

Performs logical OR on 64bit integer in shared memory. (i.e. originalValue |= Value).

For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueInteger value to be ORed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 1041 of file tgm_comm_int_ii_dll.h.

◆ Clr_Bit_I32()

read_write CTGM_COMM_INT_2::Clr_Bit_I32 ( shared_memory  memoryType,
uint32_t  offset,
int32_t  Value 
)
inline

Performs logical NAND on 32bit integer in shared memory. (i.e. originalValue &= ~Value).

For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
ValueInteger value to be NANDed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 1059 of file tgm_comm_int_ii_dll.h.

◆ Clr_Bit_I64()

read_write CTGM_COMM_INT_2::Clr_Bit_I64 ( shared_memory  memoryType,
uint32_t  offset,
int64_t  Value 
)
inline

Performs logical NAND on 64bit integer in shared memory. (i.e. originalValue &= ~Value).

For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueInteger value to be NANDed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 1077 of file tgm_comm_int_ii_dll.h.

◆ Tgl_Bit_I32()

read_write CTGM_COMM_INT_2::Tgl_Bit_I32 ( shared_memory  memoryType,
uint32_t  offset,
int32_t  Value 
)
inline

Performs logical XOR on 32bit integer in shared memory. (i.e. originalValue ^= Value).

For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
ValueInteger value to be XORed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 1095 of file tgm_comm_int_ii_dll.h.

◆ Tgl_Bit_I64()

read_write CTGM_COMM_INT_2::Tgl_Bit_I64 ( shared_memory  memoryType,
uint32_t  offset,
int64_t  Value 
)
inline

Performs logical XOR on 64bit integer in shared memory. (i.e. originalValue ^= Value).

For remote devices, the write request is sent and the function immediatelly returns.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueInteger value to be XORed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 1113 of file tgm_comm_int_ii_dll.h.

◆ Read_I32_DIRECT()

read_write CTGM_COMM_INT_2::Read_I32_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int32_t *  pValue 
)
inline

Read 32bit integer from shared memory. For remote devices the function always waits for response, i.e. it returns the actual value.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
pValueReturned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1133 of file tgm_comm_int_ii_dll.h.

◆ Read_I64_DIRECT()

read_write CTGM_COMM_INT_2::Read_I64_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int64_t *  pValue 
)
inline

Read 64bit integer from shared memory. For remote devices the function always waits for response, i.e. it returns the actual value.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
pValueReturned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1152 of file tgm_comm_int_ii_dll.h.

◆ Read_Double_DIRECT()

read_write CTGM_COMM_INT_2::Read_Double_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
double *  pValue 
)
inline

Read double floating point value (8 bytes) from shared memory. For remote devices the function always waits for response, i.e. it returns the actual value.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
pValueReturned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1171 of file tgm_comm_int_ii_dll.h.

◆ Read_BLOCK_DIRECT()

read_write CTGM_COMM_INT_2::Read_BLOCK_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
void *  buffer,
uint32_t  bufferLength 
)
inline

Read data from shared memory. For remote devices the function always waits for response, i.e. it returns the actual data.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues
bufferPointer where to store data. Must be valid. Pointer must be valid.
bufferLengthSize of data to be read in bytes
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1191 of file tgm_comm_int_ii_dll.h.

◆ Read_LPSTR_DIRECT()

read_write CTGM_COMM_INT_2::Read_LPSTR_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
char *  buffer,
uint32_t  buffer_Char_Len,
uint32_t *  pRead_Char_Count 
)
inline

Read ANSI string from memory. For remote devices the function always waits for response, i.e. it returns the actual data.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to buffer for storing the string (ANSI). In case of error, no data are written to the buffer. Pointer must be valid.
buffer_Char_LenLength of the buffer in characters
pRead_Char_CountPointer to variable where is stored the actual number of characters read. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1214 of file tgm_comm_int_ii_dll.h.

◆ Read_LPWSTR_DIRECT()

read_write CTGM_COMM_INT_2::Read_LPWSTR_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
TGM_WCHAR *  buffer,
uint32_t  buffer_Char_Len,
uint32_t *  pRead_Char_Count 
)
inline

Read UTF-16 string from memory. For remote devices the function always waits for response, i.e. it returns the actual data.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to buffer for storing the string (UTF-16). In case of error, no data are written to the buffer. Pointer must be valid.
buffer_Char_LenLength of the buffer in characters
pRead_Char_CountPointer to variable where is stored the actual number of characters read. Pointer must be valid.
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1238 of file tgm_comm_int_ii_dll.h.

◆ Write_I32_DIRECT()

read_write CTGM_COMM_INT_2::Write_I32_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int32_t  Value 
)
inline

Write 32bit integer to shared memory. For remote devices the function always waits for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
ValueInteger value to be written
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1257 of file tgm_comm_int_ii_dll.h.

◆ Write_I64_DIRECT()

read_write CTGM_COMM_INT_2::Write_I64_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int64_t  Value 
)
inline

Write 64bit integer to shared memory. For remote devices the function always waits for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueInteger value to be written
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1273 of file tgm_comm_int_ii_dll.h.

◆ Write_Double_DIRECT()

read_write CTGM_COMM_INT_2::Write_Double_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
double  Value 
)
inline

Write double floating point value (8 bytes) to shared memory. For remote devices the function always waits for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueFloating point value to be written
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1289 of file tgm_comm_int_ii_dll.h.

◆ Write_BLOCK_DIRECT()

read_write CTGM_COMM_INT_2::Write_BLOCK_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
const void *  buffer,
uint32_t  bufferLength 
)
inline

Write double to shared memory. For remote devices the function always waits for acknowledge.

For remote devices use this function with caution, the data structure written could be splitted to multiple Ethernet packets and therefore not written at once. The split could be even inside an integer or double variable!

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to data to be written. Pointer must be valid.
bufferLengthData length in bytes
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1310 of file tgm_comm_int_ii_dll.h.

◆ Write_LPSTR_DIRECT()

read_write CTGM_COMM_INT_2::Write_LPSTR_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
const char *  buffer,
uint32_t  Write_Char_Len 
)
inline

Write ANSI string to shared memory. For remote devices the function always waits for acknowledge.

For remote devices use this function with caution, the string written could be splitted to multiple Ethernet packets.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to ANSI string to be written. Pointer must be valid.
Write_Char_LenString length in characters (without the terminating null character)
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1331 of file tgm_comm_int_ii_dll.h.

◆ Write_LPWSTR_DIRECT()

read_write CTGM_COMM_INT_2::Write_LPWSTR_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
const TGM_WCHAR *  buffer,
uint32_t  Write_Char_Len 
)
inline

Write UNICODE string (UTF-16) to shared memory. For remote devices the function always waits for acknowledge.

For remote devices use this function with caution, the string written could be splitted to multiple Ethernet packets.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory
bufferPointer to UTF-16 string to be written. Pointer must be valid.
Write_Char_LenString length in characters (without the terminating null character)
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1353 of file tgm_comm_int_ii_dll.h.

◆ Set_Bit_I32_DIRECT()

read_write CTGM_COMM_INT_2::Set_Bit_I32_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int32_t  Value 
)
inline

Performs logical OR on 32bit integer in shared memory. (i.e. originalValue |= Value). For remote devices the function always wait for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
ValueInteger value to be ORed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1372 of file tgm_comm_int_ii_dll.h.

◆ Set_Bit_I64_DIRECT()

read_write CTGM_COMM_INT_2::Set_Bit_I64_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int64_t  Value 
)
inline

Performs logical OR on 64bit integer in shared memory. (i.e. originalValue |= Value). For remote devices the function always wait for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueInteger value to be ORed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1390 of file tgm_comm_int_ii_dll.h.

◆ Clr_Bit_I32_DIRECT()

read_write CTGM_COMM_INT_2::Clr_Bit_I32_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int32_t  Value 
)
inline

Performs logical NAND on 32bit integer in shared memory. (i.e. originalValue &= ~Value). For remote devices the function always wait for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
ValueInteger value to be NANDed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1408 of file tgm_comm_int_ii_dll.h.

◆ Clr_Bit_I64_DIRECT()

read_write CTGM_COMM_INT_2::Clr_Bit_I64_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int64_t  Value 
)
inline

Performs logical NAND on 64bit integer in shared memory. (i.e. originalValue &= ~Value). For remote devices the function always wait for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueInteger value to be NANDed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1426 of file tgm_comm_int_ii_dll.h.

◆ Tgl_Bit_I32_DIRECT()

read_write CTGM_COMM_INT_2::Tgl_Bit_I32_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int32_t  Value 
)
inline

Performs logical XOR on 32bit integer in shared memory. (i.e. originalValue ^= Value). For remote devices the function always wait for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 4
ValueInteger value to be XORed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1444 of file tgm_comm_int_ii_dll.h.

◆ Tgl_Bit_I64_DIRECT()

read_write CTGM_COMM_INT_2::Tgl_Bit_I64_DIRECT ( shared_memory  memoryType,
uint32_t  offset,
int64_t  Value 
)
inline

Performs logical XOR on 64bit integer in shared memory. (i.e. originalValue ^= Value). For remote devices the function always wait for acknowledge.

Parameters
memoryTypeSee enum shared_memory
offsetByte offset to memory - for performance issues, offset should be multiple of 8
ValueInteger value to be XORed with original value
Returns
0 for success or read_write error code
Note
Function is thread-safe. Waiting for remote device response can last several ms.

Definition at line 1462 of file tgm_comm_int_ii_dll.h.

◆ Flush_Buffer()

read_write CTGM_COMM_INT_2::Flush_Buffer ( )
inline

For remote devices, send all the requests stored in command queue (i.e. sends all non-direct Read and Write function requests).

Returns
0 for success or read_write error code
Note
Function is thread-safe.

Definition at line 1476 of file tgm_comm_int_ii_dll.h.

◆ DeviceToString()

static const TGM_TCHAR* CTGM_COMM_INT_2::DeviceToString ( device  deviceType)
inlinestatic

Converts device type to UNICODE (Windows) or ANSI (Linux) string.

Parameters
deviceTypetype of the device
Returns
Human readable string of the deviceType

Definition at line 1490 of file tgm_comm_int_ii_dll.h.

◆ StatusToString()

static const TGM_TCHAR* CTGM_COMM_INT_2::StatusToString ( status  code)
inlinestatic

Converts status value to its text representation - UNICODE (Windows) or ANSI (Linux)

Parameters
codeStatus code from Get_Status function.
Returns
Human readable string of the status code

Definition at line 1510 of file tgm_comm_int_ii_dll.h.

◆ ReadWriteCodeToString()

static const TGM_TCHAR* CTGM_COMM_INT_2::ReadWriteCodeToString ( read_write  code)
inlinestatic

Converts return valud of Read_XXX and Write_XXX functions to UNICODE (Windows) or ANSI (Linux) string.

Parameters
codeReturn value of any of read or write function
Returns
Human readable string of the read_write code

Definition at line 1550 of file tgm_comm_int_ii_dll.h.

◆ DeviceToStringA()

static const char* CTGM_COMM_INT_2::DeviceToStringA ( device  deviceType)
inlinestatic

Convert device type to ANSI string.

Parameters
deviceTypeType of device
Returns
ANSI string with the name of the device

Definition at line 1581 of file tgm_comm_int_ii_dll.h.

◆ StatusToStringA()

static const char* CTGM_COMM_INT_2::StatusToStringA ( status  code)
inlinestatic

Converts status value to ANSI string.

Parameters
codeStatus returned by Get_Status function
Returns
ANSI string describing the status code

Definition at line 1601 of file tgm_comm_int_ii_dll.h.

◆ ReadWriteCodeToStringA()

static const char* CTGM_COMM_INT_2::ReadWriteCodeToStringA ( read_write  code)
inlinestatic

Converts read_write error code to ANSI string.

Parameters
codeReturn value of any of read or write functions
Returns
ANSI string describing the read_write error code

Definition at line 1641 of file tgm_comm_int_ii_dll.h.

◆ ErrorCodeToStringA()

static const char* CTGM_COMM_INT_2::ErrorCodeToStringA ( error_code  code)
inlinestatic

Converts error_code to ANSI string.

Parameters
codeReturn value of initialization or informational functions
Returns
ANSI string representation of the error_code

Definition at line 1671 of file tgm_comm_int_ii_dll.h.

◆ MemoryTypeToStringA()

static const char* CTGM_COMM_INT_2::MemoryTypeToStringA ( shared_memory  memory)
inlinestatic

Converts memory type to its ANSI name.

Parameters
memoryNumber of the memory
Returns
ANSI string of the memory name

Definition at line 1705 of file tgm_comm_int_ii_dll.h.

Member Data Documentation

◆ error_code

enum ENUM_CLASS CTGM_COMM_INT_2::error_code

Error codes returned by most of the functions.

OK

Definition at line 177 of file tgm_comm_int_ii_dll.h.

◆ device

enum ENUM_CLASS CTGM_COMM_INT_2::device

Allowed device types.

local TGM (either real-time or simulated)

Definition at line 201 of file tgm_comm_int_ii_dll.h.

◆ connected_memory

enum ENUM_CLASS CTGM_COMM_INT_2::connected_memory

Connected memory types.

no memories created (communication interface not established)

Definition at line 232 of file tgm_comm_int_ii_dll.h.

◆ status

enum ENUM_CLASS CTGM_COMM_INT_2::status

connection status (return codes of Get_Status())

TGM runs locally in simulation mode (H_TGM420_WIN.EXE)

Definition at line 270 of file tgm_comm_int_ii_dll.h.

◆ read_write

enum ENUM_CLASS CTGM_COMM_INT_2::read_write

return values of Read_xxx and Write_xxx functions

OK

Definition at line 296 of file tgm_comm_int_ii_dll.h.

◆ shared_memory

enum ENUM_CLASS CTGM_COMM_INT_2::shared_memory

Shared memory numbers.

The same numbers as in OSC_MEMORY_TYPES enumeration in TGM.h file.TGM_SYSTEM

Definition at line 320 of file tgm_comm_int_ii_dll.h.


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