EasyManua.ls Logo

LMI Technologies Gocator 2100 Series - Page 684

LMI Technologies Gocator 2100 Series
800 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...
Gocator Line Profile Sensors: User Manual
684
measurements—are captured by GDKToolVersionInfo objects.
By default, a tool has just one version (GdkToolInfo_FirstVersion), but more versions may be
added using GdkToolInfo_AddVersion. Whenever the interface of a tool has changed, a new version
can be registered so that the new interface can be correctly parsed by the framework.
When the configuration of a tool instance is saved, the version used at the time is also saved. This saved
version is used by the framework to parse the configuration. If a version is not defined by the firmware
implementation, then that tool instance will not be active.
During run-time, you can query the version of the configuration of a tool instance by using
GdkToolCfg_Version. You can then interpret the parameters depending on the version the
configuration is saved in.
GdkFx(kStatus) GdkExampleTool_VDescribe(GdkToolInfo info)
{
kCheck(GdkToolInfo_SetLabel(info, "Example"));
kCheck(GdkToolInfo_SetSourceType(info, GDK_DATA_TYPE_UNIFORM_PROFILE));
kCheck(GdkToolInfo_AddSourceOption(info, GDK_DATA_SOURCE_TOP));
kCheck(GdkExampleTool_DescribeV0(info));
kCheck(GdkExampleTool_DescribeV1(info));
kCheck(GdkToolInfo_SetDefaultVersion(info, GdkToolInfo_VersionAt(info, 1)));
return kOK;
}
GdkFx(kStatus) GdkExampleTool_DescribeV0(GdkToolInfo info)
{
kCheck(GdkParamsInfo_Add(GdkToolInfo_Params(info), "RefRegion", GDK_PARAM_TYPE_PROFILE_
REGION, "Ref Region", kNULL));
kCheck(GdkParamsInfo_Add(GdkToolInfo_Params(info), "Region", GDK_PARAM_TYPE_PROFILE_
REGION, "Region", kNULL));
kCheck(GdkToolInfo_SetFirstVersionName(info, ""));
return kOK;
}
GdkFx(kStatus) GdkExampleTool_DescribeV1(GdkToolInfo info)
{
GdkToolVersionInfo versionInfo;
// Auto-version
kCheck(GdkToolInfo_AddVersion(info, kNULL, &versionInfo));
kCheck(GdkToolVersionInfo_UseBase(versionInfo, GdkToolInfo_FirstVersion(info)));
kCheck(GdkParamsInfo_AddFloat(GdkToolVersionInfo_Params(versionInfo), "BaseScale",
kNULL, 2.0, kNULL));
return kOK;
}

Table of Contents

Related product manuals