EasyManua.ls Logo

P&E Microcomputer Systems Cyclone LC Series - Page 75

P&E Microcomputer Systems Cyclone LC Series
149 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...
User Manual For Cyclone LC Programmers 75
8.2.4.3 Cyclone Connecting / Disconnecting Calls
8.2.4.3.1 connectToCyclone
uint32_t connectToCyclone(char *nameIpOrPortIdentifier) ;
This function opens a session with a Cyclone and tests the connection. The handle returned by
this function is passed as a parameter to other functions provided by the DLL. If you connect to a
Cyclone that already has a handle, the same handle is returned. If there is a failure contacting the
Cyclone, the function returns a 0.
Note that the DLL does not support multiple Cyclones connected via the serial port. If you require
more than one Cyclone to use a serial port connection, PEmicro recommends using the RS232
communication protocols.
8.2.4.3.2 connectToMultipleCyclones
bool connectToMultipleCyclones(char *nameIpOrPortIdentifierArray,
multipleCycloneHandleArrayPtrType cycloneHandleArrayPointer, int32_t
*numberOfCycloneOpensAttempted);
This function returns a array of handles to opened Cyclones from a null-terminated String of
comma delimited identifiers.
@parameter
informationType
Specifies the property of the Cyclone to return. The possible values
are:
CycloneInformationation_IP_Address
CycloneInformation_Name
CycloneInformation_Generic_port_number
@returnvalue
A pointer to a null-terminated string containing the property value of
the specified Cyclone.
@parameter
nameIPOrPortIdentifier
A pointer to a null-terminated string which uniquely identifies the
Cyclone connected to the host PC.
If identifying by IP address, the string should be in the format of
xxx.xxx.xxx.xxx, where xxx = 0…255.
If identifying by name, the string should contain the name of the
Cyclone.
If identifying by port and the Cyclone is connected by USB, the
string should be USB# where # is 1…8. If the Cyclone is
connected by Ethernet, the string should be in the format of
xxx.xxx.xxx.xxx, where xxx = 0…255.
If the Cyclone is connected by Serial, the string should be
COM1.
@returnvalue
The handle to the opened Cyclone unit. A return value of 0
indicates a failure to connect to the specified Cyclone unit.

Table of Contents