CYCLONE-User-Manual.pdf - 第83页
User Manual For Cyclone LC Programmers 83 8.2.4.5.8 setPropertyV alue bool setPropertyValue(uint32_t cycloneHandle, uint32_t resourceOrImageId, char * categoryName, char *propertyName, char * newValue); This function cha…

User Manual For Cyclone LC Programmers 82
8.2.4.5.6 countCycloneImages
uint32_t countCycloneImages(uint32_t cycloneHandle);
This function returns the number of stand-alone programming images currently stored in the
internal Flash and the external memory card of the Cyclone.
8.2.4.5.7 getPropertyValue
char *getPropertyValue(uint32_t cycloneHandle, uint32_t resourceOrImageId, char
*categoryName, char *propertyName);
This function reads a property value of the Cyclone or a stored SAP image. Examples of properties
are Cyclone Name, Cyclone IP Address, Image Name or Image media type. There are different
categories with different properties. Refer to the header file for a list of valid category and property
names. The function getPropertyList will return a list of valid properties for each category.
@parameter replaceImageOfSameDescription
Set to True if you want the image to
overwrite any existing images with the
same description
Set to False if you do not want the image
to overwrite any existing images with the
same description. An error will occur.
@parameter aFile
A pointer to a null-terminated character
string which contains the full path to the
.SAP file to be added.
@returnvalue
The image number of the image that was
just added. This number is used as the
“imageId” parameter for some function
calls.
A return value of “0” indicates an error has
occurred during the process.
@parameter cycloneHandle The handle of the Cyclone to query for the image count
@returnvalue
The total number of images stored in internal and external
memory.
@parameter cycloneHandle The handle of the Cyclone from which to read the property.
@parameter resourceOrImageId
The id for image properties is the image id on the Cyclone.
The id for Cyclone or Network properties is 0.
@parameter categoryName
A pointer to a null-terminated character string that contains
the category of the property that will be read.
@parameter propertyName
A pointer to a null-terminated character string that contains
the name of the property that will be read.
@returnvalue
A pointer to a null-terminated character string that contains
the value of the property.

User Manual For Cyclone LC Programmers 83
8.2.4.5.8 setPropertyValue
bool setPropertyValue(uint32_t cycloneHandle, uint32_t resourceOrImageId, char *
categoryName, char *propertyName, char * newValue);
This function changes the property of the Cyclone to the value specified. Only certain properties
can be changed using this call. This function will return false if the property was not changed.
Refer to the header file for a list of valid category and property names. The function getPropertyList
will return a list of valid properties for each category.
8.2.4.5.9 getPropertyList
char *getPropertyList(uint32_t cycloneHandle, uint32_t resourceOrImageId, char
*categoryName);
This function returns a list of valid category and property names that can be used with the
“getPropertyValue” and “setPropertyValue” functions. Refer to the header file for a list of valid
category and property names.
8.2.4.6 Features Calls
8.2.4.6.1 getFirmwareVersion
char *getFirmwareVersion(uint32_t cycloneHandle);
@parameter cycloneHandle The handle of the Cyclone from which to read the property.
@parameter resourceOrImageId
The id for image properties is the image id on the Cyclone.
The id for Cyclone or Network properties is 0.
@parameter categoryName
A pointer to a null-terminated character string that contains
the category of the property that will be modified.
@parameter propertyName
A pointer to a null-terminated character string that contains
the name of the property that will be modified.
@parameter newValue
A pointer to a null-terminated character string that contains
the new value of the property.
@returnvalue
True if the data was successfully set
False otherwise
@parameter cycloneHandle The handle of the Cyclone that will return the property list.
@parameter resourceOrImageId
The id for image properties is the image id on the Cyclone.
The id for Cyclone or Network properties is 0.
@parameter categoryName
A pointer to a null-terminated character string that contains
the category of the property list.
@returnvalue
A pointer to a null-terminated character string that contains
a list of property names.

User Manual For Cyclone LC Programmers 84
This function reads the firmware version of the selected Cyclone.
8.2.4.6.2 cycloneSpecialFeatures
bool cycloneSpecialFeatures(uint32_t featureNum, bool setFeature, uint32_t
paramValue1, uint32_t paramValue2, uint32_t paramValue3, void *paramReference1,
void *paramReference2);
This function is used for executing special features described by the featureNum parameter. Refer
to the parameter specifications below for details.
@parameter cycloneHandle The handle of the Cyclone of which to read the firmware version.
@returnvalue
Returns a pointer to a null-terminated character string containing
the firmware version.
@parameter featureNum
CYCLONE_GET_IMAGE_DESCRIPTION_FROM_FILE
@parameter setFeature
Indicates whether the image file has been decoded.
If previous operations has already decoded the file,
then set it to true. Otherwise set it to false.
@parameter paramValue1 Ignored, set it to 0.
@parameter paramValue2 Ignored, set it to 0.
@parameter paramValue3 Ignored, set it to 0.
@parameter paramReference1
A pointer to a pointer to a null-terminated character
string that contains the image description of the SAP
file.
@parameter paramReference2
A pointer to a null-terminated character string which
contains the full path to the specified SAP file.
@returnvalue
True if the image description was read
False otherwise
@parameter featureNum
CYCLONE_GET_IMAGE_CRC32_FROM_FILE
@parameter setFeature
Indicates whether the image file has been decoded.
If previous operations has already decoded the file,
then set it to true. Otherwise set it to false.
@parameter paramValue1 Ignored, set it to 0.
@parameter paramValue2 Ignored, set it to 0.
@parameter paramValue3 Ignored, set it to 0.
@parameter paramReference1
A pointer to an unsigned 32-bit value containing the
CRC32 of the SAP file.