User manual

142
void log_msg(log_message_type_t msg_type, const char *fmt, ...);
Message logging.
msg_type - type of message
*fmt - message
void debug_trace(unsigned char debug_level, const char *fmt, ...);
Trace logging.
debug_level - debug level
*fmt - trace message
void get_sys_err( unsigned long err );
System error logging.
err - system error number
NOTE about implemented CHAPI serial line controllers and CHAPI serial lines.
Three CHAPI serial lines were implemented:
-
CHAPI serial line mapped to MOXA NPort 5210;
-
CHAPI serial line mapped to COM port;
-
CHAPI serial line mapped to TCP/IP protocol;
To load implemented CHAPI serial line at run-time you should:
1) Load dll by calling :
hinst=::LoadLibrary(TEXT(“chapi_serial.dll”));
2) Find initiating function in loaded dll:
pf_init_line_t init_line = (pf_init_line_t)::GetProcAddress(hinst,
init_name);
init_name can be:
- “init_moxa_line
- “init_tcpip_line
- “init_com_line
Type of initiating function defined as:
typedef bool (*pf_init_line_t)(void * ctrl, chapi_serial_line_interface **
p_serial_l_i, unsigned char line_id);
Where: