Пример #1
0
/*!
  This function is called when a measurement sequence is done.
  This fucntion writes parameters to file.
  @return The return value is #AKM_SUCCESS.
  @param[in] path Specify a path to the settings file.
 */
int16 AKFS_Stop(
	const char* path
)
{
	AKMDATA(AKMDATA_DUMP, "%s: path=%s\n", __FUNCTION__, path);

	/* Write setting files to a file */
	if (AKFS_SaveParameters(&g_prms, path) != AKM_SUCCESS) {
		AKMERROR_STR("AKFS_Save");
	}

	return AKM_SUCCESS;
}
Пример #2
0
/*! This function is called when a measurement sequence is done.
  Save parameters to a file. This function must be called when a sequential
  measurement thread ends.
  @return The return value is #AKM_SUCCESS.
  @param[in/out] mem A pointer to a handler.
  @param[in] path The path to a setting file to be written. The path name
  should be terminated with NULL.
 */
int16 AKFS_Stop(void *mem, const char *path)
{
    AKMPRMS *prms;
#ifdef AKM_VALUE_CHECK
    if (mem == NULL || path == NULL) {
        AKMDEBUG(AKMDATA_CHECK, "%s: Invalid mem pointer.", __FUNCTION__);
        return AKM_ERROR;
    }
#endif
    AKMDEBUG(AKMDATA_DUMP, "%s: path=%s\n", __FUNCTION__, path);

    /* Copy pointer */
    prms = (AKMPRMS *)mem;

    /* Write setting files to a file */
    if (AKFS_SaveParameters(prms, path) != AKM_SUCCESS) {
        AKMERROR_STR("AKFS_SaveParameters");
    }

    return AKM_SUCCESS;
}