Retrieve the device ID then the device can be accessed.
Ret = SsiInit ( DeviceName , &Id )
DeviceName
[ C, C++: char * ] [ Python: ctypes.c_char_p ]
Specify the device name set with the setup tool(config). Device name is
maximum 50 characters(NULL is included).
Id
[ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
A device ID is returned. By using this device ID, you can access to the
device in the following functions.
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
Definition |
Value [Dec] |
Description |
SSI_ERR_SUCCESS |
0 |
Succeeded |
SSI_ERR_INI_RESOURCE |
1 |
Can not get resources. |
SSI_ERR_INI_MEMORY |
3 |
Can not allocate memory. This error would hardly occur. If this error occurred, please extend the memory. |
SSI_ERR_INI_CONFIG_FILE |
4 |
Can not read setting file. |
SSI_ERR_INI_BOARD_ID |
5 |
BoardID conflict error. |
SSI_ERR_DLL_DEVICE_NAME |
10000 |
Invalid device name. Device name which isn't registered in setting file is specified. |
SSI_ERR_DLL_CALL_DRIVER |
10002 |
Can not call driver (ioctl failed). Please confirm
whether the initialization function has completed normally. |
SSI_ERR_DLL_CREATE_FILE |
10003 |
Can not open driver file (open failed). Please confirm whether the device driver is started by lsmod. |
SSI_ERR_INFO_INVALID_DEVICE |
10050 |
Invalid device. Specified device name is not found. Please check spelling. |
SSI_ERR_INFO_NOT_FIND_DEVICE |
10051 |
Can not find device. |
The others (See also: Details of Error Code)
None
Retrieve the device ID then the device can
be accessed.
By using this device ID, you can access the device in the following functions.
If you want to access more than one device, you need to provide several
variables to store ID.
After SsiInit normal completed, each function can be used until SsiExit
is called.
Initialize the device "SSI000" , and retrieves an Id.
C, C++ |
long
Ret; |
Python |
Ret = ctypes.c_long() Id
= ctypes.c_short() |
Up to 16 processes can access a single device.
There is no limit when accessing from multiple threads in the same process.