PC-Side HostIO Library
This document describes the PC interface to the HostIO library. For details about the library interface, see the SDK documentation for the PARTNER-CTR HIO-Daemon.
File Overview
| Files |
Description |
path |
| devhio.dll |
HostIO library. Place this file in the same directory as the sample application. |
$KMC_CTRHOSTIO/SDK |
| devhio.lib |
C library file.
|
$KMC_CTRHOSTIO/SDK |
devhio_host.h devhio_sio.h devhio_smem.h |
C header files.
|
$KMC_CTRHOSTIO/SDK |
| CDEVHIO.h |
Wrapper class for C++. This makes it simple to load and perform other operations on devhio.dll.
|
$KMC_CTRHOSTIO/SDK |
How to Use the HostIO Host-Side Interface
Assume that VisualStudio will be used.
Changing Project Settings
- Add "$(KMC_CTRHOSTIO)/SDK" to "Additional Include Directories"
- Add "$(KMC_CTRHOSTIO)/SDK" to "Additional Library Directories"
- Add devhio.lib to "Additional Dependent Files"
Adding Include Files to Source Files
Add the following.
- #include <devhio_host.h>
- #include <devhio_sio.h>
- #include <devhio_smem.h>
For C++, also add the following.
Calling the HostIO API in Source Files (C++)
First, initialize HostIO.
Next, be sure to call the following functions, in order, to connect.
- CDEVHIO::Find()
- CDEVHIO::Connect()
Next, call the appropriate serial communication functions, if performing serial communications.
- Functions with a format such as CDEVHIO::xxxSio()
(see the SDK documentation for the PARTNER-CTR HIO-Daemon for details)
Call the appropriate shared memory functions if using shared memory.
- Functions with a format such as CDEVHIO::xxxSmem()
(see the SDK documentation for the PARTNER-CTR HIO-Daemon for details)
When finished, call the disconnection and termination functions.
- CDEVHIO::Disconnect()
- CDEVHIO::~CDEVHIO()
For the corresponding functions when using C, see the SDK documentation for the PARTNER-CTR HIO-Daemon.
Note
How do I connect the debugger to multiple systems?
If you specify 0 for the size argument and call the CDEVHIO::Find function, a user interface for selecting the debugger will be displayed when the Find function is called.
Notes
File I/O operates in such a way that a thread is created in the library when a file is opened. Waiting for commands from the target is handled automatically.
As a result, breaks encountered while debugging a HOSTIO application may cause this waiting thread to halt within the driver, which in turn makes it impossible to perform any PARTNER-CTR/S operations.
If input does not return from the DEVHIO_cio_gets function, file I/O on other channels will also be locked. (Serial/shared memory will work.)
This library must be used with the 2010/04/16 build or later builds of PARTNER-CTR/S 5.61.
Revision History
- 2012/03/29
- Added a description about how to use.
- 2010/02/04
- Initial version.
CTR-06-0204-002-G
CONFIDENTIAL