EASY-ROB™ Application Programming Interface  v8.008
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Static Public Member Functions | List of all members
ER_CAPI_USER_IO_DIALOG Class Reference

Method class, supplies dialogs, i.e. to enter and show values. More...

#include <ER_CAPI.H>

Inheritance diagram for ER_CAPI_USER_IO_DIALOG:
ER_CAPI_USER_IO ER_CAPI

Static Public Member Functions

static ER_DllExport int dialog_save_file (char *fln, char *dialog_title)
 Opens a dialog, for entering or selecting a file to save. More...
 
static ER_DllExport int dialog_get_file (char *fln, char *dialog_title)
 Opens a dialog, for selecting an existing file. More...
 
static ER_DllExport int dialog_get_file_ext (char *path, char *file, char *dialog_title)
 Opens a dialog, for selecting an existing file
This method opens EASY-ROBs 'Selection Dialog' containing all files in folder path and with the extension defined temporarly in file
As a result, file contains the complete selected file name.
Remarks
The parameter path must end with '\' sign. More...
 
static ER_DllExport int dialog_edit_file (char *fln)
 Opens a file with an associated editor
Opens a file with an associated editor. The editor is defined in the configuration file 'config.dat'
i.e. EDIT= notepad
Remarks
If the given file does not exist, it is created. More...
 
static ER_DllExport int dialog_start_device_manager (char *fln=NULL)
 Starts Device Manager to load a file
The selceted file is loaded into EASY-ROB immediatly. More...
 
static ER_DllExport int dialog_select (char *title, int n, int n_strt, char **ww, int dlg_mode=INPUT_LINE_SELECT_DEFAULT)
 Opens a Selection dialog
This Dialog allows to select one of several items in the string array ww
dlg_mode is a bitwise inclusive OR operator (|) of
INPUT_LINE_SELECT_DEFAULT - items are not sorted, but numerated
INPUT_LINE_SELECT_NO_NUMBER - items are not numerated
INPUT_LINE_SELECT_SORT - items are alphabetical sorted
INPUT_LINE_SELECT_SORT_KEEP_FIRST - items are alphabetical sorted, but not the first item
INPUT_LINE_SELECT_SORT_KEEP_LAST - items are alphabetical sorted, but not the last item. More...
 
static ER_DllExport int dialog_checkbox (char *title, int n, char **ww, int *iv, char **ww_on=NULL, char **ww_off=NULL)
 Opens CheckBox dialog
This Dialog allows to check or uncheck the status for several items in the string array ww. More...
 
static ER_DllExport int dialog_values (char *title, int n, char **ww, float *v, float *vmin, float *vmax)
 Opens a Enter Value dialog
This Dialog allows to enter the values for several items in the string array ww Remarks
Set all data in vmin and vmax to zero, to disable boundaries. More...
 
static ER_DllExport int dialog_string (char *title, int n, char **ww, char **v, int len)
 Opens dialog to enter strings
This Dialog allows to enter the string v for several items in the string array ww. More...
 
static ER_DllExport int dialog_string_single (char *title, char *header, char *footer, char *v, int len, int pw=0)
 Opens dialog to enter a single string
This Dialog allows to enter a string v. More...
 
static ER_DllExport int dialog_frame (char *title, frame *T)
 Opens a Frame dialog
This Dialog allows to enter a frame T
A frame FRAME is a homogeneous 4x4 transformation matrix.
. More...
 
static ER_DllExport int dialog_frame_ex (char *title, frame *T, int grfupdate, void(*callback_fct)(void *vptr), void *vptr)
 Opens a Frame dialog with callback function
This Dialog allows to enter a frame T
If grfupdate is 1, the GrfUpdate button is activated.
Each click on that button will call the callback function callback_fct with the callback function paramter vptr.
A frame FRAME is a homogeneous 4x4 transformation matrix. More...
 
static ER_DllExport int dialog_yes_no (char *title)
 Opens a Yes/No dialog. More...
 
static ER_DllExport int dialog_color (char *title, int *color_idx)
 Opens a Color dialog
This Dialog allows select a color color_idx
The color_idx can be one of the following values.
ER_BLACK, ER_BLUE, ER_GREEN, ER_CYAN,
ER_RED, ER_MAGENTA, ER_ORANGE, ER_LGRAY,
ER_GRAY, ER_LBLUE, ER_LGREEN, ER_LCYAN,
ER_LRED, ER_VIOLETT, ER_YELLOW, ER_WHITE,
or an 7 Bit based RGB color index. More...
 
static ER_DllExport int dialog_open (int dialog_idx, int dlg_mode)
 Opens an EASY-ROB non modal dialog
The method allows to open or close non modal dialog or request its current status
The dialog_idx can be one of the following values.
Online_Output_Data_DLG - open/close another output data dialog
Program_Window_DLG - open/close non modal program window dialog
Teach_Window_DLG - open/close non modal teach dialog
Jog_Window_DLG - open/close non modal jog window dialog
Tag_Window_DLG - open/close non modal tag window dialog
Navigator_Window_DLG - open/close non modal navigator window dialog
_3D_CAD_Window_DLG - open/close non modal 3d_cad window dialog
Kinematics_Window_DLG - open/close non modal kineamtics window dialog
Message_Window_DLG - open/close non modal message window dialog
Remote_Control_DLG - open/close non modal remote control dialog
Sensor_Interface_DLG - open/close non modal sensor interface window dialog
Api_User_Dll_DLG - open modal dialog to select API UserDLL to start
ER_PlugIn_dll_DLG - open modal dialog to select ER_PlugIn to start
AVI_Recorder_DLG - open non modal avi recorder dialog (ER_PlugIn)
VRML_97_Export_DLG - open non modal vrml export dialog (ER_PlugIn)
CAD_IMPORT_DLG - open/close non modal cad import dialog
AUTOPATH_MOP_DLG - open/close non modal auto path motion planner dialog
_3D_PDF_Export_DLG - open/close non modal 3D Pdf Export dialog
The dlg_mode can be one of the following values.
DLG_Mode_Close - close non modal dialog
DLG_Mode_Open - open non modal dialog
DLG_Mode_Status - ask current status of non modal dialog. More...
 
static ER_DllExport int dialog_open_ext (int dialog_idx, int dlg_mode, int param=0, int chk_ext=-1)
 Opens an EASY-ROB non modal dialog
The method allows to open or close non modal dialog or request its current status
The dialog_idx can be one of the following values.
Online_Output_Data_DLG - open/close another output data dialog
Program_Window_DLG - open/close non modal program window dialog
Teach_Window_DLG - open/close non modal teach dialog
Jog_Window_DLG - open/close non modal jog window dialog
Tag_Window_DLG - open/close non modal tag window dialog
Navigator_Window_DLG - open/close non modal navigator window dialog
_3D_CAD_Window_DLG - open/close non modal 3d_cad window dialog
Kinematics_Window_DLG - open/close non modal kineamtics window dialog
Message_Window_DLG - open/close non modal message window dialog
Remote_Control_DLG - open/close non modal remote control dialog
Sensor_Interface_DLG - open/close non modal sensor interface window dialog
Api_User_Dll_DLG - open modal dialog to select API UserDLL to start
ER_PlugIn_dll_DLG - open modal dialog to select ER_PlugIn to start
AVI_Recorder_DLG - open non modal avi recorder dialog (ER_PlugIn)
VRML_97_Export_DLG - open non modal vrml export dialog (ER_PlugIn)
CAD_IMPORT_DLG - open/close non modal cad import dialog
AUTOPATH_MOP_DLG - open/close non modal auto path motion planner dialog
_3D_PDF_Export_DLG - open/close non modal 3D Pdf Export dialog
The dlg_mode can be one of the following values.
DLG_Mode_Close - close non modal dialog
DLG_Mode_Open - open non modal dialog
DLG_Mode_Status - ask current status of non modal dialog
param and chk_ext are an individual parameter when opening a dialog. More...
 
static ER_DllExport int moni_msg (char *fmt,...)
 Output into the message file moni_msg.txt. More...
 
static ER_DllExport void moni_T (char *s, frame *T)
 Frame output into the message file moni_msg.txt. More...
 
static ER_DllExport void moni_v (char *s, float *v, int n, float scal)
 Vector output into the message file moni_msg.txt. More...
 
static ER_DllExport void moni_lv (char *s, double *v, int n, float scal)
 Vector output into the message file moni_msg.txt. More...
 
static ER_DllExport void moni_i (char *s, int *v, int n)
 Vector output into the message file moni_msg.txt. More...
 
static ER_DllExport void moni_s (char *s, short *v, int n)
 Vector output into the message file moni_msg.txt. More...
 
static ER_DllExport void ErrorExitBox (char *s)
 Show Error Message Box with MB_OK button and MB_ICONSTOP icon and MB_SYSTEMMODAL. More...
 
static ER_DllExport void MsgBox (char *s)
 Show Message Box with MB_OK button and MB_ICONSTOP icon. More...
 
static ER_DllExport int AfxMessageBox (char *s, unsigned int nType=MB_ICONSTOP)
 Show Message Box
Parameter mb represents the style of the message box and is a combination of
MB_OK, MB_OKCANCEL, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL,
MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_DEFBUTTON4,
MB_ICONSTOP, MB_ICONINFORMATION, MB_ICONEXCLAMATION, MB_ICONQUESTION, MB_YESNO,
MB_APPLMODAL, MB_SYSTEMMODAL, MB_TASKMODAL. More...
 
static ER_DllExport void _info_line (int mode, char *s)
 String output into Information Dialog if Message Window is closed
The output identifier mode can have one of the following values
0 add message to Information Dialog
-1 clear all messages in the Information Dialog
-2 show all messages in the Information Dialog. More...
 
static ER_DllExport int _info_line_msg (int moni, char *fmt,...)
 Output into Message Window, same as printf(...)
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt. More...
 
static ER_DllExport int _info_line_msg_i (int moni, char *s, int *vi, int n, int scal)
 int Vector output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt More...
 
static ER_DllExport int _info_line_msg_v (int moni, char *s, float *v, int n, float scal)
 float Vector output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt More...
 
static ER_DllExport int _info_line_msg_lv (int moni, char *s, double *v, int n, double scal)
 double Vector output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt More...
 
static ER_DllExport int _info_line_msg_M (int moni, char *s, float *M, int n, int m, float scal=1)
 float Matrix (nxm) output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt More...
 
static ER_DllExport int _info_line_msg_lM (int moni, char *s, double *M, int n, int m, double scal=1)
 double Matrix (nxm) output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt More...
 
static ER_DllExport int _info_line_msg_T (int moni, char *s, frame *T)
 Frame output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt. More...
 
static ER_DllExport int _info_line_msg_T_vec (int moni, char *s, frame *T)
 Frame output into Message Window as Vector Pxyz, Rxyz
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt. More...
 
static ER_DllExport int _info_line_msg_q (int moni, char *s, float *q, int no_auto_scal=0)
 Vector output into Message Window, for each joint of current robot, scaled by DEG or m2mm
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt
If parameter no_auto_scal is 0 (default), auto scaling is enabled.
In case of auto scaling, rotational joint data are converted to [deg] and translational data are converted to [mm]. If parameter no_auto_scal is 1, auto scaling is disabled. the output is in internal units, [rad] or [m]. More...
 

Additional Inherited Members

- Static Public Attributes inherited from ER_CAPI_USER_IO
static ER_CAPI_USER_IO_FILE er_capi_user_io_file
 Method class to load and save work cells-, robots-, tool-files, etc. More...
 
static ER_CAPI_USER_IO_DIALOG er_capi_user_io_dialog
 Method class, supplies dialogs, i.e. to enter and show values. More...
 
static ER_CAPI_USER_IO_PICK er_capi_user_io_pick
 Method class to "pick" objects such as devices, tags, polygon, vertices, measure distances, ... More...
 
static ER_CAPI_USER_IO_CRUISE er_capi_user_io_cruise
 Method class to manipulate the 3D Scene. More...
 
static ER_CAPI_USER_IO_3DPDF er_capi_user_io_3dpdf
 Method class for 3D Pdf Export. More...
 
- Static Public Attributes inherited from ER_CAPI
static ER_CAPI_USER_IO er_capi_user_io
 Method class for interaction with EASY-ROB. More...
 
static ER_CAPI_DEVICES er_capi_devices
 Method class to create, attach, update devices, for kinematics calculations and for trajectory planning and -execution. More...
 
static ER_CAPI_SIM er_capi_sim
 Method class for simulation settings. More...
 
static ER_CAPI_TARGETS er_capi_targets
 Method class for paths and tags. More...
 
static ER_CAPI_CAD er_capi_cad
 Method class for for 3D CAD Data import and -export, changing attributes and positions. More...
 
static ER_CAPI_SYS er_capi_sys
 Method class for mathematical calculations, simulation status, units. More...
 

Detailed Description

Method class, supplies dialogs, i.e. to enter and show values.

Member Function Documentation

static ER_DllExport void ER_CAPI_USER_IO_DIALOG::_info_line ( int  mode,
char *  s 
)
static

String output into Information Dialog if Message Window is closed
The output identifier mode can have one of the following values
0 add message to Information Dialog
-1 clear all messages in the Information Dialog
-2 show all messages in the Information Dialog.

Parameters
[in]modeoutput identifier
[in]smessage text
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg ( int  moni,
char *  fmt,
  ... 
)
static

Output into Message Window, same as printf(...)
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt.

Parameters
[in]moni=0 - output is displayed in the message window only
[in]fmtformat specification
Return values
n- number of characters
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg_i ( int  moni,
char *  s,
int *  vi,
int  n,
int  scal 
)
static

int Vector output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt

Parameters
[in]moni=0 - output is displayed in the message window only
[in]sText
[in]viVector, int
[in]nsize of vi
[in]scalscaling value
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg_lM ( int  moni,
char *  s,
double *  M,
int  n,
int  m,
double  scal = 1 
)
static

double Matrix (nxm) output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt

Parameters
[in]moni=0 - output is displayed in the message window only
[in]sText
[in]Mnxm Matrix, double
[in]nnumber rows of M
[in]mnumber of columns of M
[in]scalscaling value
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg_lv ( int  moni,
char *  s,
double *  v,
int  n,
double  scal 
)
static

double Vector output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt

Parameters
[in]moni=0 - output is displayed in the message window only
[in]sText
[in]vVector, double
[in]nsize of v
[in]scalscaling value
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg_M ( int  moni,
char *  s,
float *  M,
int  n,
int  m,
float  scal = 1 
)
static

float Matrix (nxm) output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt

Parameters
[in]moni=0 - output is displayed in the message window only
[in]sText
[in]Mnxm Matrix, float
[in]nnumber rows of M
[in]mnumber of columns of M
[in]scalscaling value
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg_q ( int  moni,
char *  s,
float *  q,
int  no_auto_scal = 0 
)
static

Vector output into Message Window, for each joint of current robot, scaled by DEG or m2mm
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt
If parameter no_auto_scal is 0 (default), auto scaling is enabled.
In case of auto scaling, rotational joint data are converted to [deg] and translational data are converted to [mm]. If parameter no_auto_scal is 1, auto scaling is disabled. the output is in internal units, [rad] or [m].

Parameters
[in]moni=0 - output is displayed in the message window only
[in]sText
[in]qcurrent Robot joints
[in]no_auto_scal=0 - enable auto scaling, =1 - disable auto scaling
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg_T ( int  moni,
char *  s,
frame T 
)
static

Frame output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt.

Parameters
[in]moni=0 - output is displayed in the message window only
[in]sText
[in]Thomegeneous matrix FRAME
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg_T_vec ( int  moni,
char *  s,
frame T 
)
static

Frame output into Message Window as Vector Pxyz, Rxyz
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt.

Parameters
[in]moni=0 - output is displayed in the message window only
[in]sText
[in]Thomegeneous matrix FRAME
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::_info_line_msg_v ( int  moni,
char *  s,
float *  v,
int  n,
float  scal 
)
static

float Vector output into Message Window
If parameter moni is 1, the output is appended to the monitoring file moni_msg.txt

Parameters
[in]moni=0 - output is displayed in the message window only
[in]sText
[in]vVector, float
[in]nsize of v
[in]scalscaling value
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::AfxMessageBox ( char *  s,
unsigned int  nType = MB_ICONSTOP 
)
static

Show Message Box
Parameter mb represents the style of the message box and is a combination of
MB_OK, MB_OKCANCEL, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL,
MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_DEFBUTTON4,
MB_ICONSTOP, MB_ICONINFORMATION, MB_ICONEXCLAMATION, MB_ICONQUESTION, MB_YESNO,
MB_APPLMODAL, MB_SYSTEMMODAL, MB_TASKMODAL.

Parameters
[in]sMessage text
[in]nTypeThe style of the message box
Return values
1- IDOK - The OK button was selected.
2- IDCANCEL - The Cancel button was selected.
3- IDABORT - The Abort button was selected.
4- IDRETRY - The Retry button was selected.
5- IDIGNORE - The Ignore button was selected.
6- IDYES - The Yes button was selected.
7- IDNO - The No button was selected.
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_checkbox ( char *  title,
int  n,
char **  ww,
int *  iv,
char **  ww_on = NULL,
char **  ww_off = NULL 
)
static

Opens CheckBox dialog
This Dialog allows to check or uncheck the status for several items in the string array ww.

// Example:
char title_txt[MAXSTR] = {"Change Item status"};
char *ww[] = {"ItemTxt"};
int n = sizeof(ww)/sizeof(ww[0]); // get number of Items
int iv = 1; // check
char *ww_on[] = {"On"};
char *ww_off[] = {"Off"};
int ret=er_user_io_dialog.dialog_checkbox(title_txt,n,ww,&iv,ww_on,ww_off);
if (ret==1)
{
er_user_io_dialog._info_line_msg(0,"Item status is %s",iv?"ON:"OFF");
}
...
Parameters
[in]titledialog title
[in]nnumber of items
[in]wwarray of strings, size n
[in]ivarray of item status to check or uncheck, size n
[in]ww_onarray of strings when item checked, size n
[in]ww_offarray of strings when item unchecked, size n
Return values
1- OK
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_color ( char *  title,
int *  color_idx 
)
static

Opens a Color dialog
This Dialog allows select a color color_idx
The color_idx can be one of the following values.
ER_BLACK, ER_BLUE, ER_GREEN, ER_CYAN,
ER_RED, ER_MAGENTA, ER_ORANGE, ER_LGRAY,
ER_GRAY, ER_LBLUE, ER_LGREEN, ER_LCYAN,
ER_LRED, ER_VIOLETT, ER_YELLOW, ER_WHITE,
or an 7 Bit based RGB color index.

Parameters
[in]titledialog title
[out]color_idxcolor index
Return values
1- OK
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_edit_file ( char *  fln)
static

Opens a file with an associated editor
Opens a file with an associated editor. The editor is defined in the configuration file 'config.dat'
i.e. EDIT= notepad
Remarks
If the given file does not exist, it is created.

Parameters
[in]flnfile to open
Return values
0- ER_OK
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_frame ( char *  title,
frame T 
)
static

Opens a Frame dialog
This Dialog allows to enter a frame T
A frame FRAME is a homogeneous 4x4 transformation matrix.
.

Parameters
[in]titledialog title
[out]Thomegeneous matrix FRAME
Return values
1- OK
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_frame_ex ( char *  title,
frame T,
int  grfupdate,
void(*)(void *vptr)  callback_fct,
void *  vptr 
)
static

Opens a Frame dialog with callback function
This Dialog allows to enter a frame T
If grfupdate is 1, the GrfUpdate button is activated.
Each click on that button will call the callback function callback_fct with the callback function paramter vptr.
A frame FRAME is a homogeneous 4x4 transformation matrix.

// Example:
typedef struct _DLG_FRAME_EX {
frame *iTb;
frame T_old;
int ivalue;
} DLG_FRAME_EX;
void callback_fct_dialog_frame_ex(void* vptr)
{
DLG_FRAME_EX *dfe = (DLG_FRAME_EX *)vptr;
dfe->T_old = *dfe->iTb;
dfe->ivalue += 1;
// do some other calculations
//...
// maybe update all kinematics devices
er_devices.data_update_all_devices();
// or maybe visualize the result
er_sys_view.grf_update_export();
er_user_io_dialog._info_line_msg(0," callback_fct_dialog_frame_ex() dfe->ivalue = %d",dfe->ivalue);
er_user_io_dialog._info_line_msg_T_vec(0," dfe->T_old",&dfe->T_old);
return;
}
...
strcpy(title_txt,"Enter Frame Callback Fct");
DLG_FRAME_EX dfe;
dfe.iTb = er_rob_kin.inq_iTb(); // location of current device w.r.t. inertia
er_sys_mathematics.rob_kin_frame_ident(&dfe.T_old);
dfe.ivalue=0;
int grfupdate = 1;
er_user_io_dialog._info_line_msg(0,"1.2 dialog_frame_ex()");
ret = er_user_io_dialog.dialog_frame_ex (title_txt,dfe.iTb,grfupdate,callback_fct_dialog_frame_ex,(void *)&dfe); // open enter frame dialog
er_user_io_dialog._info_line_msg(0,"1.2 dialog_frame_ex() ret = %d",ret);
er_user_io_dialog._info_line_msg_T_vec(0," frame iTb =",dfe.iTb);
er_user_io_dialog._info_line_msg(0," dfe.ivalue = %d",dfe.ivalue);
...
Parameters
[in]titledialog title
[out]Thomegeneous matrix FRAME
[in]grfupdate1-enable GrfUpdate button, 0-disable
[in]callback_fctcallback function pointer
[in]vptrpointer to callback function parameter
Return values
1- OK
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_get_file ( char *  fln,
char *  dialog_title 
)
static

Opens a dialog, for selecting an existing file.

Parameters
[out]flnselected file
[in]dialog_titleTitle of Dialog
Return values
1- OK, file selected
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_get_file_ext ( char *  path,
char *  file,
char *  dialog_title 
)
static

Opens a dialog, for selecting an existing file
This method opens EASY-ROBs 'Selection Dialog' containing all files in folder path and with the extension defined temporarly in file
As a result, file contains the complete selected file name.
Remarks
The parameter path must end with '\' sign.

// Example:
char dlg_path[HS_MAXSTR];
strcpy(dlg_path,"..\\release\\");
strcpy(fln,"*.rob");
ret = er_user_io_dialog.dialog_get_file_ext(dlg_path,fln,"My Get Dialog Ext Text");
er_user_io_dialog._info_line_msg(0,"1.2 dialog_get_file() ret = %d path = '%s' fln = '%s'",ret,dlg_path,fln);
...
Parameters
[in]pathfolder name of interest file
[out]filecomplete selected file
[in]dialog_titleTitle of Dialog
Return values
1- OK, file selected
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_open ( int  dialog_idx,
int  dlg_mode 
)
static

Opens an EASY-ROB non modal dialog
The method allows to open or close non modal dialog or request its current status
The dialog_idx can be one of the following values.
Online_Output_Data_DLG - open/close another output data dialog
Program_Window_DLG - open/close non modal program window dialog
Teach_Window_DLG - open/close non modal teach dialog
Jog_Window_DLG - open/close non modal jog window dialog
Tag_Window_DLG - open/close non modal tag window dialog
Navigator_Window_DLG - open/close non modal navigator window dialog
_3D_CAD_Window_DLG - open/close non modal 3d_cad window dialog
Kinematics_Window_DLG - open/close non modal kineamtics window dialog
Message_Window_DLG - open/close non modal message window dialog
Remote_Control_DLG - open/close non modal remote control dialog
Sensor_Interface_DLG - open/close non modal sensor interface window dialog
Api_User_Dll_DLG - open modal dialog to select API UserDLL to start
ER_PlugIn_dll_DLG - open modal dialog to select ER_PlugIn to start
AVI_Recorder_DLG - open non modal avi recorder dialog (ER_PlugIn)
VRML_97_Export_DLG - open non modal vrml export dialog (ER_PlugIn)
CAD_IMPORT_DLG - open/close non modal cad import dialog
AUTOPATH_MOP_DLG - open/close non modal auto path motion planner dialog
_3D_PDF_Export_DLG - open/close non modal 3D Pdf Export dialog
The dlg_mode can be one of the following values.
DLG_Mode_Close - close non modal dialog
DLG_Mode_Open - open non modal dialog
DLG_Mode_Status - ask current status of non modal dialog.

Parameters
[in]dialog_idxIdentifier of the dialog
[in]dlg_modeDialog request
Return values
0- Dialog status is closed
1- Dialog status is open
-1- Fail, Error
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_open_ext ( int  dialog_idx,
int  dlg_mode,
int  param = 0,
int  chk_ext = -1 
)
static

Opens an EASY-ROB non modal dialog
The method allows to open or close non modal dialog or request its current status
The dialog_idx can be one of the following values.
Online_Output_Data_DLG - open/close another output data dialog
Program_Window_DLG - open/close non modal program window dialog
Teach_Window_DLG - open/close non modal teach dialog
Jog_Window_DLG - open/close non modal jog window dialog
Tag_Window_DLG - open/close non modal tag window dialog
Navigator_Window_DLG - open/close non modal navigator window dialog
_3D_CAD_Window_DLG - open/close non modal 3d_cad window dialog
Kinematics_Window_DLG - open/close non modal kineamtics window dialog
Message_Window_DLG - open/close non modal message window dialog
Remote_Control_DLG - open/close non modal remote control dialog
Sensor_Interface_DLG - open/close non modal sensor interface window dialog
Api_User_Dll_DLG - open modal dialog to select API UserDLL to start
ER_PlugIn_dll_DLG - open modal dialog to select ER_PlugIn to start
AVI_Recorder_DLG - open non modal avi recorder dialog (ER_PlugIn)
VRML_97_Export_DLG - open non modal vrml export dialog (ER_PlugIn)
CAD_IMPORT_DLG - open/close non modal cad import dialog
AUTOPATH_MOP_DLG - open/close non modal auto path motion planner dialog
_3D_PDF_Export_DLG - open/close non modal 3D Pdf Export dialog
The dlg_mode can be one of the following values.
DLG_Mode_Close - close non modal dialog
DLG_Mode_Open - open non modal dialog
DLG_Mode_Status - ask current status of non modal dialog
param and chk_ext are an individual parameter when opening a dialog.

Parameters
[in]dialog_idxIdentifier of the dialog
[in]dlg_modeDialog request
[in]paramindividual parameter for DLG_Mode_Open
[in]chk_extshowing extended data, one of [-1,0,1] for DLG_Mode_Open
Return values
0- Dialog status is closed
1- Dialog status is open
-1- Fail, Error
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_save_file ( char *  fln,
char *  dialog_title 
)
static

Opens a dialog, for entering or selecting a file to save.

Parameters
[in,out]flnfile to save
[in]dialog_titleTitle of Dialog
Return values
1- OK, file selected
0- no file selected
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_select ( char *  title,
int  n,
int  n_strt,
char **  ww,
int  dlg_mode = INPUT_LINE_SELECT_DEFAULT 
)
static

Opens a Selection dialog
This Dialog allows to select one of several items in the string array ww
dlg_mode is a bitwise inclusive OR operator (|) of
INPUT_LINE_SELECT_DEFAULT - items are not sorted, but numerated
INPUT_LINE_SELECT_NO_NUMBER - items are not numerated
INPUT_LINE_SELECT_SORT - items are alphabetical sorted
INPUT_LINE_SELECT_SORT_KEEP_FIRST - items are alphabetical sorted, but not the first item
INPUT_LINE_SELECT_SORT_KEEP_LAST - items are alphabetical sorted, but not the last item.

// Example:
char title_txt[MAXSTR] = {"Select CAD type "};
char *ww[] = {"None", "Cube", "Pyramid", "Wedge", "Cylinder","Cone", "Sphere", "Igp", "Stl"}; // char-Array with 9 Items
int n = sizeof(ww)/sizeof(ww[0]); // get number of Items
static int n_strt = 1 ; // Item 1 is pre selected
int dlg_mode=INPUT_LINE_SELECT_DEFAULT; // Dialog mode
int is = er_user_io_dialog.dialog_select (title_txt,n,n_strt,ww,dlg_mode); // return -1 cancel, [0..n-1] selected item
er_user_io_dialog._info_line_msg(0,"1.2 dialog_select() ret = %d",ret);
switch (is) {
default:
case ER_CANCEL:
break;
case 0:
// 1st Item
break;
case 1:
// 2nd Item
break;
}
...
Parameters
[in]title- Dialog title
[in]n- Number of items
[in]n_strt- Pre selected item [1..n]
[in]ww- Array of n strings
[in]dlg_mode- Dialog mode
Return values
is- selected Item [0..n-1]
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_start_device_manager ( char *  fln = NULL)
static

Starts Device Manager to load a file
The selceted file is loaded into EASY-ROB immediatly.

Parameters
[out]flnselected file name if fln not NULL
Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_string ( char *  title,
int  n,
char **  ww,
char **  v,
int  len 
)
static

Opens dialog to enter strings
This Dialog allows to enter the string v for several items in the string array ww.

Parameters
[in]titledialog title
[in]nnumber of items
[in]wwarray of n strings
[in,out]vstring values to modify, size n
[in]lenmaximum length for each v
Return values
1- OK
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_string_single ( char *  title,
char *  header,
char *  footer,
char *  v,
int  len,
int  pw = 0 
)
static

Opens dialog to enter a single string
This Dialog allows to enter a string v.

Parameters
[in]titledialog title
[in]headerdialog header information
[in]footerdialog footer information
[in,out]vstring value to modify
[in]lenmaximum length for each v
[in]pwpassword, hide text if true
Return values
1- OK
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_values ( char *  title,
int  n,
char **  ww,
float *  v,
float *  vmin,
float *  vmax 
)
static

Opens a Enter Value dialog
This Dialog allows to enter the values for several items in the string array ww Remarks
Set all data in vmin and vmax to zero, to disable boundaries.

// Example:
char title_txt[MAXSTR] = {"Enter a value"};
char *ww[] = {"ValueTxt"};
int n = sizeof(ww)/sizeof(ww[0]); // get number of Items
float v = 1.0F;
float v_min = (float)0.5F;
float v_max = (float)60*60.0F;
int ret=er_user_io_dialog.dialog_values(title_txt,n,ww,&v,&v_min,&v_max);
if (ret==1)
{
er_user_io_dialog._info_line_msg(0,"Value = %.3f",v);
auto_label_time_delta_ = (double)vs;
ER_String str("Auto Label step size = %.1lfs",auto_label_time_delta_);
SimUpdateDlg(str.buffer());
}
...
Parameters
[in]titledialog title
[in]nnumber of items
[in]wwarray of n strings
[in]vvalues to modify, size n
[in]vminlower bound of values, size n
[in]vmaxupper bound of values, size n
Return values
1- OK
-1- ER_CANCEL, dialog cancelled
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::dialog_yes_no ( char *  title)
static

Opens a Yes/No dialog.

Parameters
[in]titledialog title
Return values
0- No
1- Yes
static ER_DllExport void ER_CAPI_USER_IO_DIALOG::ErrorExitBox ( char *  s)
static

Show Error Message Box with MB_OK button and MB_ICONSTOP icon and MB_SYSTEMMODAL.

Parameters
[in]sError text
static ER_DllExport void ER_CAPI_USER_IO_DIALOG::moni_i ( char *  s,
int *  v,
int  n 
)
static

Vector output into the message file moni_msg.txt.

Parameters
[in]sText
[in]vVector, int
[in]nsize of v
static ER_DllExport void ER_CAPI_USER_IO_DIALOG::moni_lv ( char *  s,
double *  v,
int  n,
float  scal 
)
static

Vector output into the message file moni_msg.txt.

Parameters
[in]sText
[in]vVector, double
[in]nsize of v
[in]scalscaling value
static ER_DllExport int ER_CAPI_USER_IO_DIALOG::moni_msg ( char *  fmt,
  ... 
)
static

Output into the message file moni_msg.txt.

Parameters
[in]fmtformat specification
Return values
n- number of characters
static ER_DllExport void ER_CAPI_USER_IO_DIALOG::moni_s ( char *  s,
short *  v,
int  n 
)
static

Vector output into the message file moni_msg.txt.

Parameters
[in]sText
[in]vVector, short
[in]nsize of v
static ER_DllExport void ER_CAPI_USER_IO_DIALOG::moni_T ( char *  s,
frame T 
)
static

Frame output into the message file moni_msg.txt.

Parameters
[in]sText
[in]Thomegeneous matrix FRAME
static ER_DllExport void ER_CAPI_USER_IO_DIALOG::moni_v ( char *  s,
float *  v,
int  n,
float  scal 
)
static

Vector output into the message file moni_msg.txt.

Parameters
[in]sText
[in]vVector, float
[in]nsize of v
[in]scalscaling value
static ER_DllExport void ER_CAPI_USER_IO_DIALOG::MsgBox ( char *  s)
static

Show Message Box with MB_OK button and MB_ICONSTOP icon.

Parameters
[in]sMessage text

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