MotionAPI64
example for softMC MotionAPI
Macros | Enumerations
generalDefines.h File Reference

Go to the source code of this file.

Macros

#define ERR_ON_CLOSE   100
 ERR_ON_CLOSE:( = 100 ) special error event sent to the callback when connection is dropped. More...
 

Enumerations

enum  KMResponse {
  KMRet_OK = 0, KMRet_CONNECTED, KMRet_ASYNC, KMErr_GENERAL,
  KMErr_TIMEOUT, KMErr_BAD_KMApiID, KMErr_FAIL_EXEC, KMErr_UNKNOWN_MESSAGE,
  KMErr_FAIL_CREATE_FILE, KMErr_FAIL_OPEN_FILE, KMErr_FILE_NOT_FOUND, KMErr_CANNOT_CONNECT,
  KMErr_INVALID_FORMAT, KMErr_BUFFER_TOO_SMALL, KMErr_FOLDER_NOT_FOUND, KMErr_TRUNCATED_FRAME,
  KMErr_MC_ERR, KMErr_RETRIEVE
}
 a response code for all KMApi functions More...
 
enum  KMTimeout { KMTO_Connect, KMTO_Exec }
 
enum  FrameTypeEnum {
  INVALID_FRAME = 0, ACKNOWLEDGE_FRAME, DATA_FRAME, BINARY_FRAME,
  CONTROL_FRAME, PROMPT_FRAME, ERROR_FRAME, ASYNC_FRAME,
  ASYNC2_FRAME, ASYNC_OTHER, AUTHENTICATE_FRAME, STATE_FRAME
}
 

Macro Definition Documentation

◆ ERR_ON_CLOSE

#define ERR_ON_CLOSE   100

ERR_ON_CLOSE:( = 100 ) special error event sent to the callback when connection is dropped.

Definition at line 39 of file generalDefines.h.

Enumeration Type Documentation

◆ FrameTypeEnum

Enumerator
INVALID_FRAME 

Invalid frame.

ACKNOWLEDGE_FRAME 

sent from mc to acknowledge frame is in process (internal)

DATA_FRAME 

a frame of date.(internal)

BINARY_FRAME 

binary data frame (internal).

CONTROL_FRAME 
PROMPT_FRAME 

a prompt is sent at the end of every MC response (internal).

ERROR_FRAME 

sent when last command result an error with error details (internal).

ASYNC_FRAME 

this frame is sent when an asynchronous error frame is received from SoftMC. You should expect it on your callback function.

ASYNC2_FRAME 

same as ASYNC_FRAME but contains data such a program log message or status. You should expect it on your callback function.

ASYNC_OTHER 
AUTHENTICATE_FRAME 

sent during authentication process

STATE_FRAME 

SoftMC "state change" message.

Definition at line 54 of file generalDefines.h.

◆ KMResponse

enum KMResponse

a response code for all KMApi functions

Enumerator
KMRet_OK 

All is OK: returned when commands succeeds.

KMRet_CONNECTED 

connected to Soft MC

KMRet_ASYNC 

Async message received.

KMErr_GENERAL 

General error use get last error for details.

KMErr_TIMEOUT 

Timeout waiting for response / connection.

KMErr_BAD_KMApiID 

Invalid KMApi ID received (only in C function)

KMErr_FAIL_EXEC 

Error executing command.

KMErr_UNKNOWN_MESSAGE 

Unknown message received.

KMErr_FAIL_CREATE_FILE 

Error creating New File when loading file.

KMErr_FAIL_OPEN_FILE 

Cannot Open File either is locked or used by other process.

KMErr_FILE_NOT_FOUND 

File not found check file name again.

KMErr_CANNOT_CONNECT 

Cannot connect - connection refused or host not found.

KMErr_INVALID_FORMAT 

Invalid format - Frame CRC is wrong or invalid Frame.

KMErr_BUFFER_TOO_SMALL 

The provided buffer is too small for response.

KMErr_FOLDER_NOT_FOUND 

The folder was not found (cannot copy file to)

KMErr_TRUNCATED_FRAME 

Frame is truncated (will wait for rest of the frame until timeout) therefore you will get Timeout instead of truncated.

KMErr_MC_ERR 

MC returned an error use GetLastError to get string.

KMErr_RETRIEVE 

cannot retrieve error message (returned from GetLastError)

Definition at line 6 of file generalDefines.h.

◆ KMTimeout

enum KMTimeout
Enumerator
KMTO_Connect 

Connect timeout type.

KMTO_Exec 

Execute command timeout type.

Definition at line 32 of file generalDefines.h.