Display string¶
RequestDisplayStringList¶
- Overview
You can use this API and GetDisplayStringTypes() and GetDisplayStringList() to get the menu string and menu information displayed on the camera body.
See to “Get the menu display string” for details.
- Definition
CrError RequestDisplayStringList(CrDeviceHandle deviceHandle, CrDisplayStringType type);
Input parameters
Type |
Explanation |
|---|---|
CrDeviceHandle |
deviceHandle |
CrDisplayStringType |
type
Specify the type of DisplayStringList you want to get. Use the CrDisplayStringType defined in CrDeviceProperty.h.
The type of DisplayStringList that can be obtained depends on each model. Not all types are available.
|
- Output parameters
None
Return value
Type |
Explanation |
|---|---|
CrError |
CrError_None on Success
CrError_Api_Insufficient if the update fails
|
- Related API
- Special note (details)
The result will be notified by OnWarning().
If CrWarning_RequestDisplayStringList_Success is notified by OnWarning(), GetDisplayStringTypes() and GetDisplayStringList() will be available.
If CrWarning_RequestDisplayStringList_Error is notified by OnWarning(), the camera may not support the specified type.
GetDisplayStringTypes¶
- Overview
This API is used to know the type and number of information acquired by RequestDisplayStringList().
See to “Get the menu display string” for details.
- Definition
CrError GetDisplayStringTypes(CrDeviceHandle deviceHandle, CrDisplayStringType** types, CrInt32u* numOfTypes);
Input parameters
Type |
Explanation |
|---|---|
CrDeviceHandle |
deviceHandle |
Output parameters
Type |
Explanation |
|---|---|
CrDisplayStringType** |
types
The CrDisplayStringType list pointer. Developers should pass the address of a modifiable CrDisplayStringType pointer. The value of this pointer should be initialized to nullptr.
The function will make a copy of the SDK-internal CrDisplayStringType list for the indicated deviceHandle. When function returns successfully, this parameter will point to the copy of CrDisplayStringType list.
Note:
It may contain CrDisplayStringType that the SDK does not support.
|
CrInt32u* |
numOfTypes
An integer pointer that indicates the number of CrDisplayStringType returned by the types pointer.
Developers should pass the address of a modifiable CrInt32u variable.
|
Return value
Type |
Explanation |
|---|---|
CrError |
CrError_None on Success
However, if numOfTypes is zero, even if CrError_None is returned, it should be judged as fail.
CrError_Api_NoApplicableInformation The reason why numOfTypes is returned as zero is probably because RequestDisplayStringList() has not been executed yet, or the camera itself does not own the CrDisplayStringType specified by the type parameter of RequestDisplayStringList().
|
- Related API
- Special note (details)
This API is not mandatory. If the processing result of RequestDisplayStringList() is successful, you can call GetDisplayStringList() directly.
GetDisplayStringList¶
- Overview
This API gets the menu string and menu information displayed on the camera body.
See to “Get the menu display string” for details.
- Definition
CrError GetDisplayStringList(CrDeviceHandle deviceHandle, CrDisplayStringType type, CrDisplayStringListInfo** list, CrInt32u* numOfList);
Input parameters
Type |
Explanation |
|---|---|
CrDeviceHandle |
deviceHandle |
CrDisplayStringType |
type
Specify the type of DisplayStringList you want to get. Use the CrDisplayStringType defined in CrDeviceProperty.h.
The type of DisplayStringList that can be obtained depends on each model. Not all types are available.
It is recommended to get a list of types that can be referred by GetDisplayStringTypes() in advance and check if the type you want to use exists in it.
|
Output parameters
Type |
Explanation |
|---|---|
CrDisplayStringListInfo** |
list
The CrDisplayStringListInfo list pointer. Developers should pass the address of a modifiable CrDisplayStringListInfo pointer. The value of this pointer should be initialized to nullptr.
The function will make a copy of the SDK-internal CrDisplayStringListInfo list for the indicated deviceHandle. When the function returns successfully, this parameter will point to the copy of CrDisplayStringListInfo list. Only the information that matches the type specified in the type parameter is copied.
Note:
If CrDisplayStringType_AllList is specified as an input parameter, CrDisplayStringListInfo of CrDisplayStringType that SDK does not support may be returned in the output parameter.
|
CrInt32u* |
numOfList
An integer pointer that indicates the number of CrDisplayStringListInfo returned by the list pointer.
Developers should pass the address of a modifiable CrInt32u variable.
|
Return value
Type |
Explanation |
|---|---|
CrError |
CrError_None on Success
CrError_Api_Insufficient if the update fails
|
- Related API
- Special note (details)
When the menu character string or menu information is updated, it will be notified by OnWarning().
refs. CrWarning_DisplayListChanged_Button_AssignDisplayList and more
If the beginning of the warning code of the received warning is “CrWarning_DisplayListChanged_”, it is also possible to directly acquire the menu information with this API without checking using RequestDisplayStringList().
ReleaseDisplayStringTypes¶
- Overview
This function releases the CrDisplayStringType allocated by GetDisplayStringTypes().
- Definition
CrError ReleaseDisplayStringTypes(CrDeviceHandle deviceHandle, CrDisplayStringType* types);
Input parameters
Type |
Explanation |
|---|---|
CrDeviceHandle |
deviceHandle |
CrDisplayStringType* |
types
CrDisplayStringType list pointer to release.
|
- Output parameters
None
Return value
Type |
Explanation |
|---|---|
CrError |
CrError_None If the Type list is released successfully
CrError_Init if the SDK is uninitialized
CrError_Generic_InvalidHandle If the deviceHandle is an invalid handle
Other than errors above, see Status code & Error
|
- Related API
- Special note (details)
None in particular
ReleaseDisplayStringList¶
- Overview
This function releases the CrDisplayStringListInfo allocated by GetDisplayStringList().
- Definition
CrError ReleaseDisplayStringList(CrDeviceHandle deviceHandle, CrDisplayStringListInfo* list);
Input parameters
Type |
Explanation |
|---|---|
CrDeviceHandle |
deviceHandle |
CrDisplayStringListInfo* |
list
CrDisplayStringListInfo list pointer to release.
|
- Output parameters
None
Return value
Type |
Explanation |
|---|---|
CrError |
CrError_None If the list is released successfully
CrError_Init if the SDK is uninitialized
CrError_Generic_InvalidHandle If the deviceHandle is an invalid handle
Other than errors above, see Status code & Error
|
- Related API
- Special note (details)
None in particular