TG Motion
version 421 - 4033/904 cnc 121
Real-time system for controlling servo drives and I/O modules
|
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) | |
C++ wrapper class for TGM_Comm_Int_2 library functions.
Definition at line 169 of file tgm_comm_int_ii_dll.h.
|
inline |
First function to be called. Loads the TGM_Comm_Int_2.dll and gets pointers to all of its exported functions.
fileName | Full 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) |
Definition at line 394 of file tgm_comm_int_ii_dll.h.
|
inline |
Create communication interface.
DLL_Directory | - ANSI/UNICODE path to directory, where the suplemental DLLs are stored. |
Definition at line 481 of file tgm_comm_int_ii_dll.h.
|
inline |
Establishes a communication with a given device.
keepOnline | If 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) |
commTimeout | Timeout for opening the connection in ms |
deviceType | device type (0 - local TG Motion, 1 - TGM mini, 2 - TGM remote) |
IPAddress | IPv4 address of remote device |
Definition at line 540 of file tgm_comm_int_ii_dll.h.
|
inline |
Close already opened connection. Each call to Open_Connection must match the Close_Connection.
Definition at line 580 of file tgm_comm_int_ii_dll.h.
|
inline |
Change connection type on the fly.
deviceType | device to connect to (0 - local TG Motion, 1 - TGM mini, 2 - TGM remote) |
IPAddress | IPv4 address of the remote device |
Definition at line 611 of file tgm_comm_int_ii_dll.h.
|
inline |
Get information about communication library (depending on device type)
deviceType | - 0 - TGM_Comm_Int_2.dll, 1 - TGM_Mini.dll, 2 - TGM_Remote.dll |
pVersion | Returned version, must be valid pointer |
pCompatibilityID | Returned compatibility ID, must be valid pointer |
pCompatibilityMemID | Returned memory compatibility ID, must be valid pointer |
Definition at line 637 of file tgm_comm_int_ii_dll.h.
|
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.
compatibilityID | Requested compatibility ID of the device (local TG Motion, TGMmini, etc.) |
compatibilityMemID | Requested memory compatibility ID |
version | Application 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) |
appName | Application name to be displayed in Connection Info dialog box |
Definition at line 658 of file tgm_comm_int_ii_dll.h.
|
inline |
Returns actual status.
Definition at line 668 of file tgm_comm_int_ii_dll.h.
|
inline |
Returns actual status and its text representation.
pBackgroundColor | Recommended RGB color for displaying background of the statusText |
pTextColor | Recommended RGB color for displaying the statusText |
statusText | Pointer to UNICODE (Windows) / ANSI (Linux) string with minimal length of 256 characters, which will contain the status in English text form. |
Definition at line 683 of file tgm_comm_int_ii_dll.h.
|
inline |
Displays Connection Info window with an info of all the connections and plug-in modules.
parent | Handle of the parent window. Can be NULL. |
enableChangeConnection | Enable change type of the connection directly in the window. |
Definition at line 697 of file tgm_comm_int_ii_dll.h.
|
inline |
Closes connection info window opened by Show_Connections_Info_Win.
Definition at line 708 of file tgm_comm_int_ii_dll.h.
|
inline |
Returns recommended width and height of the Connection Info window.
pWidth | Pointer to valid pointer, which will contain the width of the window |
pHeight | Pointer to valid pointer, which will contain the height of the window |
Definition at line 722 of file tgm_comm_int_ii_dll.h.
|
inline |
Returns information about actually opened communication.
pDeviceType | Pointer to actual used device |
IPAddress | In the case of remote devices (TGMmini, TGM Remote), used IPv4 address of the device |
pConnectedMemory | Memory used for connection |
Definition at line 738 of file tgm_comm_int_ii_dll.h.
|
inline |
Returns information about the remote server.
deviceType | Device to get info about |
pCompatibilityID | Returned compatibility ID |
pCompatibilityMemID | Returned memory compatibility ID |
pConnectionStatus | Actual connection status |
Definition at line 757 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
pValue | Returned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid. |
Definition at line 780 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
pValue | Returned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid. |
Definition at line 799 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
pValue | Returned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid. |
Definition at line 818 of file tgm_comm_int_ii_dll.h.
|
inline |
Read block of shared memory. For remote devices, the read request is sent and the function returns the last (previous) stored local values.
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to buffer for storing the data. In case of error, no data are written to the buffer. Pointer must be valid. |
bufferLength | Length of data to be written in bytes |
Definition at line 838 of file tgm_comm_int_ii_dll.h.
|
inline |
Read ANSI string from memory. For remote devices, the read request is sent and the function returns the last (previous) stored local values.
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to buffer for storing the string (ANSI). In case of error, no data are written to the buffer. Pointer must be valid. |
buffer_Char_Len | Length of the buffer in characters |
pRead_Char_Count | Pointer to variable where is stored the actual number of characters read. Pointer must be valid. |
Definition at line 861 of file tgm_comm_int_ii_dll.h.
|
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.
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 |
Definition at line 883 of file tgm_comm_int_ii_dll.h.
|
inline |
Write 32bit integer to shared memory. For remote devices, the write request is sent and the function immediatelly returns.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
Value | Integer value to be written |
Definition at line 902 of file tgm_comm_int_ii_dll.h.
|
inline |
Write 64bit integer to shared memory. For remote devices, the write request is sent and the function immediatelly returns.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Integer value to be written |
Definition at line 918 of file tgm_comm_int_ii_dll.h.
|
inline |
Write double floating point value (8 bytes) to shared memory. For remote devices, the write request is sent and the function immediatelly returns.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Floating point value to be written |
Definition at line 935 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to data to be written. Pointer must be valid. |
bufferLength | Data length in bytes |
Definition at line 956 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to ANSI string to be written. Pointer must be valid. |
Write_Char_Len | String length in characters (without the terminating null character) |
Definition at line 980 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to UTF-16 string to be written. Pointer must be valid. |
Write_Char_Len | String length in characters (without the terminating null character) |
Definition at line 1004 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
Value | Integer value to be ORed with original value |
Definition at line 1023 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Integer value to be ORed with original value |
Definition at line 1041 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
Value | Integer value to be NANDed with original value |
Definition at line 1059 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Integer value to be NANDed with original value |
Definition at line 1077 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
Value | Integer value to be XORed with original value |
Definition at line 1095 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Integer value to be XORed with original value |
Definition at line 1113 of file tgm_comm_int_ii_dll.h.
|
inline |
Read 32bit integer from shared memory. For remote devices the function always waits for response, i.e. it returns the actual value.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
pValue | Returned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid. |
Definition at line 1133 of file tgm_comm_int_ii_dll.h.
|
inline |
Read 64bit integer from shared memory. For remote devices the function always waits for response, i.e. it returns the actual value.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
pValue | Returned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid. |
Definition at line 1152 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
pValue | Returned value. In case of error, no value is stored, so the value should be initialized before calling this function. Pointer must be valid. |
Definition at line 1171 of file tgm_comm_int_ii_dll.h.
|
inline |
Read data from shared memory. For remote devices the function always waits for response, i.e. it returns the actual data.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues |
buffer | Pointer where to store data. Must be valid. Pointer must be valid. |
bufferLength | Size of data to be read in bytes |
Definition at line 1191 of file tgm_comm_int_ii_dll.h.
|
inline |
Read ANSI string from memory. For remote devices the function always waits for response, i.e. it returns the actual data.
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to buffer for storing the string (ANSI). In case of error, no data are written to the buffer. Pointer must be valid. |
buffer_Char_Len | Length of the buffer in characters |
pRead_Char_Count | Pointer to variable where is stored the actual number of characters read. Pointer must be valid. |
Definition at line 1214 of file tgm_comm_int_ii_dll.h.
|
inline |
Read UTF-16 string from memory. For remote devices the function always waits for response, i.e. it returns the actual data.
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. Pointer must be valid. |
buffer_Char_Len | Length of the buffer in characters |
pRead_Char_Count | Pointer to variable where is stored the actual number of characters read. Pointer must be valid. |
Definition at line 1238 of file tgm_comm_int_ii_dll.h.
|
inline |
Write 32bit integer to shared memory. For remote devices the function always waits for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
Value | Integer value to be written |
Definition at line 1257 of file tgm_comm_int_ii_dll.h.
|
inline |
Write 64bit integer to shared memory. For remote devices the function always waits for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Integer value to be written |
Definition at line 1273 of file tgm_comm_int_ii_dll.h.
|
inline |
Write double floating point value (8 bytes) to shared memory. For remote devices the function always waits for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Floating point value to be written |
Definition at line 1289 of file tgm_comm_int_ii_dll.h.
|
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!
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to data to be written. Pointer must be valid. |
bufferLength | Data length in bytes |
Definition at line 1310 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to ANSI string to be written. Pointer must be valid. |
Write_Char_Len | String length in characters (without the terminating null character) |
Definition at line 1331 of file tgm_comm_int_ii_dll.h.
|
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.
memoryType | See enum shared_memory |
offset | Byte offset to memory |
buffer | Pointer to UTF-16 string to be written. Pointer must be valid. |
Write_Char_Len | String length in characters (without the terminating null character) |
Definition at line 1353 of file tgm_comm_int_ii_dll.h.
|
inline |
Performs logical OR on 32bit integer in shared memory. (i.e. originalValue |= Value). For remote devices the function always wait for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
Value | Integer value to be ORed with original value |
Definition at line 1372 of file tgm_comm_int_ii_dll.h.
|
inline |
Performs logical OR on 64bit integer in shared memory. (i.e. originalValue |= Value). For remote devices the function always wait for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Integer value to be ORed with original value |
Definition at line 1390 of file tgm_comm_int_ii_dll.h.
|
inline |
Performs logical NAND on 32bit integer in shared memory. (i.e. originalValue &= ~Value). For remote devices the function always wait for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
Value | Integer value to be NANDed with original value |
Definition at line 1408 of file tgm_comm_int_ii_dll.h.
|
inline |
Performs logical NAND on 64bit integer in shared memory. (i.e. originalValue &= ~Value). For remote devices the function always wait for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Integer value to be NANDed with original value |
Definition at line 1426 of file tgm_comm_int_ii_dll.h.
|
inline |
Performs logical XOR on 32bit integer in shared memory. (i.e. originalValue ^= Value). For remote devices the function always wait for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 4 |
Value | Integer value to be XORed with original value |
Definition at line 1444 of file tgm_comm_int_ii_dll.h.
|
inline |
Performs logical XOR on 64bit integer in shared memory. (i.e. originalValue ^= Value). For remote devices the function always wait for acknowledge.
memoryType | See enum shared_memory |
offset | Byte offset to memory - for performance issues, offset should be multiple of 8 |
Value | Integer value to be XORed with original value |
Definition at line 1462 of file tgm_comm_int_ii_dll.h.
|
inline |
For remote devices, send all the requests stored in command queue (i.e. sends all non-direct Read and Write function requests).
Definition at line 1476 of file tgm_comm_int_ii_dll.h.
|
inlinestatic |
Converts device type to UNICODE (Windows) or ANSI (Linux) string.
deviceType | type of the device |
Definition at line 1490 of file tgm_comm_int_ii_dll.h.
|
inlinestatic |
Converts status value to its text representation - UNICODE (Windows) or ANSI (Linux)
code | Status code from Get_Status function. |
Definition at line 1510 of file tgm_comm_int_ii_dll.h.
|
inlinestatic |
Converts return valud of Read_XXX and Write_XXX functions to UNICODE (Windows) or ANSI (Linux) string.
code | Return value of any of read or write function |
Definition at line 1550 of file tgm_comm_int_ii_dll.h.
|
inlinestatic |
Convert device type to ANSI string.
deviceType | Type of device |
Definition at line 1581 of file tgm_comm_int_ii_dll.h.
|
inlinestatic |
Converts status value to ANSI string.
code | Status returned by Get_Status function |
Definition at line 1601 of file tgm_comm_int_ii_dll.h.
|
inlinestatic |
Converts read_write error code to ANSI string.
code | Return value of any of read or write functions |
Definition at line 1641 of file tgm_comm_int_ii_dll.h.
|
inlinestatic |
Converts error_code to ANSI string.
code | Return value of initialization or informational functions |
Definition at line 1671 of file tgm_comm_int_ii_dll.h.
|
inlinestatic |
Converts memory type to its ANSI name.
memory | Number of the memory |
Definition at line 1705 of file tgm_comm_int_ii_dll.h.
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.
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.
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.
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.
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.
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.