X64 Xcelera-CL PX4 User's Manual
Appendix: X-I/O Module Option
•
113
Sapera LT General I/O Demo Code Samples
The following source code was extracted from the General I/O demo program. The comments highlight
the areas that an application developer needs for embedding X-I/O module controls within the imaging
application.
Main I/O Demo code
BOOL CGioMainDlg::OnInitDialog()
{
[ . . . ]
// some declarations
UINT32 m_gioCount;
int m_ServerIndex;
int m_ResourceIndex;
// Show the Server Dialog to select the acquisition device
CGioServer dlg(this);
if (dlg.DoModal() == IDOK)
{
m_ServerIndex = dlg.GetServerIndex();
m_ServerName = dlg.GetServerName();
if ( m_ServerIndex != -1)
{
// Get the number of resources from SapManager for ResourceGio type by using
// - the server index chosen in the dialog box
// - the resource type to enquire for Gio
m_gioCount=SapManager::GetResourceCount(m_ServerIndex,SapManager::ResourceGio);
// Create all objects [see the function following]
if (!CreateObjects()) { EndDialog(TRUE); return FALSE; }
[ . . . ]
//Loop for all resources
for (UINT32 iDevice = 0; (iDevice < MAX_GIO_DEVICE) && (iDevice < m_gioCount);
+)
{
[ . . . ]
// direct read access to low-level Sapera C library capability to check
// I/O Output module
if
(m_pGio[iDevice]->IsCapabilityValid(CORGIO_CAP_DIR_OUTPUT))
status
=
m_pGio[iDevice]->GetCapability(CORGIO_CAP_DIR_OUTPUT,&capOutput);
// direct read access to low-level Sapera C library capability to
// check I/O Input module
if
(m_pGio[iDevice]->IsCapabilityValid(CORGIO_CAP_DIR_INPUT))
Summary of Contents for X64 Xcelera-CL PX4
Page 32: ...30 Installing X64 Xcelera CL PX4 X64 Xcelera CL PX4 User s Manual ...
Page 42: ...40 CamExpert Quick Start X64 Xcelera CL PX4 User s Manual ...
Page 104: ...102 Camera Link Interface X64 Xcelera CL PX4 User s Manual ...
Page 124: ...122 Glossary of Terms X64 Xcelera CL PX4 User s Manual ...