EasyManua.ls Logo

Dalsa X64 Xcelera-CL PX4 - Sapera LT General I;O Demo Code Samples

Default Icon
127 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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);
iDevice++)
{
[ . . . ]
// 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))

Table of Contents

Related product manuals