Skip to content
Snippets Groups Projects
wrs-ipcserver.c 18.6 KiB
Newer Older
 * Copyright (C) 2013-2023 CERN (www.cern.ch)
 * Author: Aurelio Colosimo
 * Released according to the GNU LGPL, version 2.1 or any later version.
 */

#include <ppsi/ppsi.h>
#include <ppsi-wrs.h>

#include <ppsi/set-param.h>

#define PPSI_EXPORT_STRUCTURES
#include <ppsi_exports.h>
/* Execute command coming ipc */
static int wrsipc_cmd(int cmd, int value)
{
	if (cmd == PPSIEXP_COMMAND_TRACKING){
		if (CONFIG_HAS_EXT_WR || CONFIG_HAS_EXT_L1SYNC) {
			pp_diag(NULL, config, 2,
				"%s: cmd %d (PPSIEXP_COMMAND_TRACKING) value "
				"%d\n",
				__func__, cmd, value);
			wrh_servo_enable_tracking(value);
baujc's avatar
baujc committed
			return 0;
		}

}

static int export_cmd(const struct minipc_pd *pd,
				 uint32_t *args, void *ret)
{
	int i;
	i = wrsipc_cmd(args[0], args[1]);
	*(int *)ret = i;
	return 0;
}

static int update_param_cmd(const struct minipc_pd *pd, uint32_t *args,
			    void *ret)
{
	int rval = PPSIEXP_RET_OK;
	int param_type = args[0];
	int param_val = args[1];

	switch (param_type) {
	case PPSIEXP_PARAM_PRIORITY1_CMD:
		pp_diag(NULL, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_PRIORITY1_CMD) value %d\n",
			__func__, param_type, param_val);
		if (!in_range(param_val, PP_MIN_PRIORITY1, PP_MAX_PRIORITY1)) {
			pp_diag(NULL, config, 1,
				"Param update Error: value of "
				"priority1 (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_PRIORITY1_CMD)\n",
				param_val, param_type);
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		set_param_global_prio1(ppg_local, param_val);

		break;
	case PPSIEXP_PARAM_PRIORITY2_CMD:
		pp_diag(NULL, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_PRIORITY2_CMD) value %d\n",
			__func__, param_type, param_val);
		if (!in_range(param_val, PP_MIN_PRIORITY2, PP_MAX_PRIORITY2)) {
			pp_diag(NULL, config, 1,
				"Param update Error: value of "
				"priority2 (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_PRIORITY2_CMD)\n",
				param_val, param_type);
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		set_param_global_prio2(ppg_local, param_val);

		break;
	case PPSIEXP_PARAM_BMCA_CMD:
		pp_diag(NULL, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_BMCA_CMD) value %d\n",
			__func__, param_type, param_val);
		if (!check_range_global_bmca(ppg_local->rt_opts->globalProfile,
					     param_val)) {
			pp_diag(NULL, config, 1,
				"Param update Error: value of "
				"bmca (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_BMCA_CMD)\n",
				param_val, param_type);
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		set_param_global_bmca(ppg_local, param_val);

		break;

	case PPSIEXP_PARAM_EXT_PORT_CONFIG_CMD:
		pp_diag(NULL, config, 2,
			"%s cmd %d (PPSIEXP_PARAM_EXT_PORT_CONFIG_CMD) "
			"value %d\n",
			__func__, param_type, param_val);
		if (param_val == PPSIEXP_ENABLE) {
			/* Enable externalPortConfiguration */
			new_bmca = PPSI_BMCA_EXT_PORT_CONFIG;
		} else if (param_val == PPSIEXP_DISABLE) {
			/* Disable externalPortConfiguration, use previously
			 * set BMCA. Error if no valid was set before. */
			new_bmca = ppg_local->defaultDS->bmcaType;
		} else {
			pp_diag(NULL, config, 1,
				"Param update Error: value of "
				"externalPortConfiguration (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_EXT_PORT_CONFIG_CMD)\n",
				param_val, param_type);
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		if (!check_range_global_bmca(ppg_local->rt_opts->globalProfile,
					     new_bmca)) {
			pp_diag(NULL, config, 1,
				"Param update Error: value of "
				"bmca for externalPortConfiguration (%d) not "
				"in range! "
				"cmd %d (PPSIEXP_PARAM_EXT_PORT_CONFIG_CMD)\n",
				new_bmca, param_type);
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		set_param_global_bmca(ppg_local, new_bmca);

		break;

	default:
		pp_diag(NULL, config, 1,
			"Param update Error: not supported param cmd %d value "
			"%d\n",
			param_type, param_val);
		rval = PPSIEXP_RET_ERROR_CMD;
		break;
	}

	*(int *)ret = rval;
	return 0;
}

static int update_param64_cmd(const struct minipc_pd *pd, uint32_t *args,
			      void *ret)
{
	int rval = PPSIEXP_RET_OK;
	int param_type = args[0];
	int64_t param64_val = *((int64_t *)&args[1]);

	switch (param_type) {
	case PPSIEXP_PARAM64_DELTA_RXM_CMD:
		pp_diag(NULL, config, 2,
			"%s cmd %d (PPSIEXP_PARAM64_DELTA_RXM_CMD) "
			"value %d%d\n",
			__func__, param_type,
			(int)(param64_val/1000000000),
			(int)(param64_val % 1000000000));


#if !CONFIG_HAS_EXT_WR
		pp_diag(NULL, config, 1,
			"Unable to set delta rxm, WR not supported\n");
		rval = PPSIEXP_RET_ERROR_VAL;
		break;
#endif

		if (set_param_delta_rxm64(ppg_local, param64_val)) {
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		break;

	case PPSIEXP_PARAM64_DELTA_TXM_CMD:
		pp_diag(NULL, config, 2,
			"%s cmd %d (PPSIEXP_PARAM64_DELTA_TXM_CMD) "
			"value %d%d\n",
			__func__, param_type,
			(int)(param64_val/1000000000),
			(int)(param64_val % 1000000000));


#if !CONFIG_HAS_EXT_WR
		pp_diag(NULL, config, 1,
			"Unable to set delta txm, WR not supported\n");
		rval = PPSIEXP_RET_ERROR_VAL;
		break;
#endif

		if (set_param_delta_txm64(ppg_local, param64_val)) {
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		break;

	default:
		pp_diag(NULL, config, 1,
			"Param update Error: not supported param64 cmd %d value"
			" %d%d\n",
			param_type, (int)(param64_val/1000000000),
			(int)(param64_val % 1000000000));
		rval = PPSIEXP_RET_ERROR_CMD;
		break;
	}

	*(int *)ret = rval;
	return 0;
}

static int update_param_instance(struct pp_instance *ppi, int ppi_i,
				 int param_type, int param_val)
{
	int rval = PPSIEXP_RET_OK;

	switch (param_type) {
	case PPSIEXP_PARAM_INST_AUTONEG_CMD:
		pp_diag(ppi, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_INST_AUTONEG_CMD) "
			"instance %d, port %s, value %d\n", __func__,
			param_type, ppi_i, ppi->iface_name, param_val);
		switch (param_val) {
		case PPSI_EXT_AUTONEG_DISABLE:
		case PPSI_EXT_AUTONEG_ENABLE:
			break; /* Known value */
		default: /* Value not known */
			pp_diag(ppi, config, 1,
				"Param update Error: value of "
				"extension autonegotiation (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_INST_AUTONEG_CMD) "
				"instance %d, port %s\n",
				param_val, param_type, ppi_i, ppi->iface_name);
		switch (ppi->cfg.profile) {
		case PPSI_PROFILE_HA_WR:
		case PPSI_PROFILE_CUSTOM:
			break; /* Known value */
		default: /* Value not known */
			pp_diag(ppi, config, 1, "Param update Error: current "
				"profile (%d) does not support extension "
				"autonegotiation\n",
				ppi->cfg.profile);
			return PPSIEXP_RET_ERROR_VAL;
		}
		ppi->cfg.extAutonegEnable = param_val;
		rval = PPSIEXP_RET_OK;
		break;

	case PPSIEXP_PARAM_INST_EPC_DESIRED_CMD:
		pp_diag(ppi, config, 2,
			"%s cmd %d (PPSIEXP_PARAM_INST_EPC_DESIRED_CMD) "
			"instance %d, port %s, value %d\n",
			__func__, param_type, ppi_i,
			ppi->iface_name, param_val);

		switch (param_val) {
		case PPSIEXP_PARAM_EPC_DESIRED_INITIALIZING:
		case PPSIEXP_PARAM_EPC_DESIRED_FAULTY:
		case PPSIEXP_PARAM_EPC_DESIRED_DISABLED:
		case PPSIEXP_PARAM_EPC_DESIRED_LISTENING:
		case PPSIEXP_PARAM_EPC_DESIRED_PRE_MASTER:
		case PPSIEXP_PARAM_EPC_DESIRED_MASTER:
		case PPSIEXP_PARAM_EPC_DESIRED_PASSIVE:
		case PPSIEXP_PARAM_EPC_DESIRED_UNCALIBRATED:
		case PPSIEXP_PARAM_EPC_DESIRED_SLAVE:
			/* Known value */
			break;
		default:
			/* Value not known */
			pp_diag(ppi, config, 1,
				"Param update Error: value of "
				"externalPortConfiguration (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_INST_EPC_DESIRED_CMD) "
				"instance %d, port %s\n",
				param_val, param_type, ppi_i, ppi->iface_name);
			return PPSIEXP_RET_ERROR_VAL;
		}

		set_param_externalPortConfiguration_desiredState(ppi,
								 param_val);

		break;

	case PPSIEXP_PARAM_INST_EXTENSION_CMD:
		pp_diag(ppi, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_INST_EXTENSION_CMD) "
			"instance %d, port %s, value %d\n", __func__, param_type,
			ppi_i, ppi->iface_name, param_val);

		switch (param_val) {
		case PPSIEXP_PARAM_EXTENSION_NONE:
		case PPSIEXP_PARAM_EXTENSION_WR:
		case PPSIEXP_PARAM_EXTENSION_L1SYNC:
			/* Known value */
			break;
		default:
			/* Value not known */
			pp_diag(ppi, config, 1,
				"Param update Error: value of "
				"extension (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_INST_EXTENSION_CMD) "
				"instance %d, port %s\n",
				param_val, param_type, ppi_i, ppi->iface_name);
			return PPSIEXP_RET_ERROR_VAL;
		}

		if (set_extension_runtime(ppi, param_val)) {
			pp_diag(ppi, config, 1,
				"Param update Error: failed to set extension to"
				"value %d! "
				"cmd %d (PPSIEXP_PARAM_INST_EXTENSION_CMD) "
				"instance %d, port %s\n",
				param_val, param_type, ppi_i, ppi->iface_name);
			rval = PPSIEXP_RET_ERROR_VAL;
		}
	case PPSIEXP_PARAM_INST_PROFILE_CMD:
		pp_diag(ppi, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_INST_PROFILE_CMD) "
			"instance %d, port %s, value %d\n", __func__, param_type,
			ppi_i, ppi->iface_name, param_val);
		switch (param_val) {
		case PPSIEXP_PARAM_PROFILE_PTP:
		case PPSIEXP_PARAM_PROFILE_HA_WR:
		case PPSIEXP_PARAM_PROFILE_CUSTOM:
			/* Known value */
			break;
		default:
			/* Value not known */
			pp_diag(ppi, config, 1,
				"Param update Error: value of "
				"profile (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_INST_PROFILE_CMD) "
				"instance %d, port %s\n",
				param_val, param_type, ppi_i, ppi->iface_name);
			return PPSIEXP_RET_ERROR_VAL;
		}

		if (set_profile_runtime(ppi, param_val)) {
			pp_diag(ppi, config, 1,
				"Param update Error: failed to set profile to"
				"value %d! "
				"cmd %d (PPSIEXP_PARAM_INST_PROFILE_CMD) "
				"instance %d, port %s\n",
				param_val, param_type, ppi_i, ppi->iface_name);
			rval = PPSIEXP_RET_ERROR_VAL;
		}

		break;

	case PPSIEXP_PARAM_INST_DELAY_REQ_INT_CMD:
		pp_diag(ppi, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_INST_DELAY_REQ_INT_CMD) "
			"instance %d, port %s, value %d\n", __func__,
			param_type, ppi_i, ppi->iface_name, param_val);
		if (!check_range_inst_logMinDelayReqInterval(ppi->cfg.profile,
							     param_val)) {
			pp_diag(ppi, config, 1,
				"Param update Error: value of "
				"logMinDelayReqInterval (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_INST_DELAY_REQ_INT_CMD) "
				"instance %d, port %s\n",
				param_val, param_type, ppi_i, ppi->iface_name);
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		set_param_inst_logMinDelayReqInterval(ppi, param_val);

		break;

	case PPSIEXP_PARAM_INST_SYNC_INT_CMD:
		pp_diag(ppi, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_INST_SYNC_INT_CMD) "
			"instance %d, port %s, value %d\n", __func__,
			param_type, ppi_i, ppi->iface_name, param_val);
		if (!check_range_inst_logSyncInterval(ppi->cfg.profile,
						      param_val)) {
			pp_diag(ppi, config, 1,
				"Param update Error: value of "
				"logSyncInterval (%d) not in range! "
				"cmd %d (PPSIEXP_PARAM_INST_SYNC_INT_CMD) "
				"instance %d, port %s\n",
				param_val, param_type, ppi_i, ppi->iface_name);
			rval = PPSIEXP_RET_ERROR_VAL;
			break;
		}

		set_param_inst_logSyncInterval(ppi, param_val);

		break;

	default:
		pp_diag(ppi, config, 1,
			"Param update Error: not supported param instance cmd "
			"%d value %d\n",
			param_type, param_val);
		rval = PPSIEXP_RET_ERROR_CMD;
		break;
	}

static int update_param64_instance(struct pp_instance *ppi, int ppi_i,
				   int param_type, int64_t param64_val)
{
	int rval = PPSIEXP_RET_OK;

	switch (param_type) {
	case PPSIEXP_PARAM64_INST_CONSTANT_ASYMMETRY_CMD:
		pp_diag(ppi, config, 2,
			"%s cmd %d "
			"(PPSIEXP_PARAM64_INST_CONSTANT_ASYMMETRY_CMD) "
			"instance %d, port %s, value %d%d\n",
			__func__, param_type, ppi_i,
			ppi->iface_name, (int)(param64_val/1000000000),
			(int)(param64_val % 1000000000));

		set_param_constant_asymmetry64(ppi, param64_val);

		break;

	case PPSIEXP_PARAM64_INST_DELAY_COEFFICIENT_CMD:
		pp_diag(ppi, config, 2,
			"%s: cmd %d "
			"(PPSIEXP_PARAM64_INST_DELAY_COEFFICIENT_CMD) "
			"instance %d, port %s, value %d%d\n",
			__func__, param_type, ppi_i,
			ppi->iface_name, (int)(param64_val/1000000000),
			(int)(param64_val % 1000000000));

		set_param_delay_coefficient64(ppi, param64_val);

		break;

	case PPSIEXP_PARAM64_INST_EGRESS_LATENCY_CMD:
		pp_diag(ppi, config, 2,
			"%s cmd %d (PPSIEXP_PARAM_INST_EGRESS_LATENCY_CMD) "
			"instance %d, port %s, value %d%d\n",
			__func__, param_type, ppi_i,
			ppi->iface_name, (int)(param64_val/1000000000),
			(int)(param64_val % 1000000000));

		set_param_egress_latency64(ppi, param64_val);

		break;

	case PPSIEXP_PARAM64_INST_INGRESS_LATENCY_CMD:
		pp_diag(ppi, config, 2,
			"%s cmd %d (PPSIEXP_PARAM_INST_INGRESS_LATENCY_CMD) "
			"instance %d, port %s, value %d%d\n",
			__func__, param_type, ppi_i,
			ppi->iface_name, (int)(param64_val/1000000000),
			(int)(param64_val % 1000000000));

		set_param_ingress_latency64(ppi, param64_val);

		break;

	default:
		pp_diag(ppi, config, 1,
			"Param update Error: not supported param64 instance cmd"
			" %d value %d%d\n",
			param_type, (int)(param64_val/1000000000),
			(int)(param64_val % 1000000000));
		rval = PPSIEXP_RET_ERROR_CMD;
		break;
	}

	return rval;
}

static int update_param_str_cmd(const struct minipc_pd *pd, uint32_t *args,
				void *ret)
{
	int rval = PPSIEXP_RET_OK;
	int param_type = args[0];
	char *param_val_str = (char *)&args[1];

	switch (param_type) {
	case PPSIEXP_PARAM_STR_DIAG_CMD:
		pp_diag(NULL, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_STR_DIAG_CMD) value %s\n",
			__func__, param_type, param_val_str);
		pp_global_d_flags = pp_diag_parse(param_val_str);
		break;

	default:
		pp_diag(NULL, config, 1,
			"Param update Error: not supported param str cmd %d "
			"value %s\n",
			param_type, param_val_str);
		rval = PPSIEXP_RET_ERROR_CMD;
		break;
	}

	*(int *)ret = rval;
	return 0;
}

static int update_param_instance_cmd(const struct minipc_pd *pd,
				     uint32_t *args, void *ret)
{
	int i;
	int rval = PPSIEXP_RET_OK;
	int rval_tmp = -1;
	int param_type = args[0];
	int param_instance = args[1];
	int param_val = args[2];
	struct pp_instance *ppi;
	char iface_name[16];
	if (param_instance & PPSIEXP_PPSI_INSTANCE_USE_PORT) {
		all_ports = (param_instance == PPSIEXP_PPSI_INSTANCE_USE_PORT);
		/* Execute command for all instances in a given interface */
		snprintf(iface_name, 16, "wri%d",
			 param_instance & ~PPSIEXP_PPSI_INSTANCE_USE_PORT);
		for (i = 0; i < get_numberPorts(GDSDEF(ppg_local)); i++) {
			ppi = INST(ppg_local, i);
			if (!all_ports && strcmp(iface_name, ppi->iface_name))
				continue;
			rval_tmp = update_param_instance(ppi, i, param_type,
							 param_val);
			if (rval_tmp != PPSIEXP_RET_OK)
				rval = rval_tmp;
		}
		/* If rval_tmp == -1, no instance found on requested port */
		if (rval_tmp == -1)
			rval = PPSIEXP_RET_ERROR_INSTANCE;
	} else {
		ppi = INST(ppg_local, param_instance);
		rval = update_param_instance(ppi, param_instance, param_type,
					     param_val);
	}

	*(int *)ret = rval;
	return 0;
}
static int update_param64_instance_cmd(const struct minipc_pd *pd,
				       uint32_t *args, void *ret)
{
	int i;
	int rval = PPSIEXP_RET_OK;
	int rval_tmp = -1;
	int param_type = args[0];
	int param_instance = args[1];
	int64_t param64_val = *((int64_t *)&args[2]);
	struct pp_instance *ppi;
	char iface_name[16];
	int all_ports = 0;
	
	if (param_instance & PPSIEXP_PPSI_INSTANCE_USE_PORT) {
		all_ports = (param_instance == PPSIEXP_PPSI_INSTANCE_USE_PORT);
		/* Execute command for all instances in a given interface */
		snprintf(iface_name, 16, "wri%d",
			 param_instance & ~PPSIEXP_PPSI_INSTANCE_USE_PORT);
		for (i = 0; i < get_numberPorts(GDSDEF(ppg_local)); i++) {
			ppi = INST(ppg_local, i);
			if (!all_ports && strcmp(iface_name, ppi->iface_name))
				continue;
			rval_tmp = update_param64_instance(ppi, i, param_type,
							   param64_val);
			if (rval_tmp != PPSIEXP_RET_OK)
				rval = rval_tmp;
		}
		/* If rval_tmp == -1, no instance found on requested port */
		if (rval_tmp == -1)
			rval = PPSIEXP_RET_ERROR_INSTANCE;
	} else {
		ppi = INST(ppg_local, param_instance);
		rval = update_param64_instance(ppi, param_instance, param_type,
					       param64_val);
	}

	*(int *)ret = rval;
	return 0;
}

static int update_param_instance_str(struct pp_instance *ppi, int ppi_i,
				     int param_type, char *param_val_str)
{
	int rval = PPSIEXP_RET_OK;

	switch (param_type) {
	case PPSIEXP_PARAM_INST_STR_DIAG_CMD:
		pp_diag(ppi, config, 2,
			"%s: cmd %d (PPSIEXP_PARAM_INST_STR_DIAG_CMD) "
			"instance %d, port %s, value %s\n", __func__,
			param_type, ppi_i, ppi->iface_name, param_val_str);
		rval = PPSIEXP_RET_OK;
		ppi->d_flags = pp_diag_parse(param_val_str);
		break;

	default:
		pp_diag(ppi, config, 1,
			"Param update Error: not supported param instance str "
			"cmd %d, value %s\n",
			param_type, param_val_str);
		rval = PPSIEXP_RET_ERROR_CMD;
		break;
	}

	return rval;
}

static int update_param_instance_str_cmd(const struct minipc_pd *pd,
					 uint32_t *args, void *ret)
{
	int i;
	int rval = PPSIEXP_RET_OK;
	int rval_tmp = -1;
	int param_type = args[0];
	int param_instance = args[1];
	char *param_val_str = (char *)&args[2];
	struct pp_instance *ppi;
	char iface_name[16];
	int all_ports = 0;

	if (param_instance & PPSIEXP_PPSI_INSTANCE_USE_PORT) {
		all_ports = (param_instance == PPSIEXP_PPSI_INSTANCE_USE_PORT);
		/* Execute command for all instances in a given interface */
		snprintf(iface_name, 16, "wri%d",
			 param_instance & ~PPSIEXP_PPSI_INSTANCE_USE_PORT);
		for (i = 0; i < get_numberPorts(GDSDEF(ppg_local)); i++) {
			ppi = INST(ppg_local, i);
			if (!all_ports && strcmp(iface_name, ppi->iface_name))
				continue;
			rval_tmp = update_param_instance_str(ppi, i, param_type,
							     param_val_str);
			if (rval_tmp != PPSIEXP_RET_OK)
				rval = rval_tmp;
		}
		/* If rval_tmp == -1, no instance found on requested port */
		if (rval_tmp == -1)
			rval = PPSIEXP_RET_ERROR_INSTANCE;
	} else {
		ppi = INST(ppg_local, param_instance);
		rval = update_param_instance_str(ppi, param_instance,
						 param_type, param_val_str);
	}

	*(int *)ret = rval;
	return 0;
}

/* To be called at startup, right after the creation of server channel */
void wrs_init_ipcserver(struct pp_globals *ppg, struct minipc_ch *ppsi_ch)
	__rpcdef_cmd.f = export_cmd;
	ppsiexp_update_param_cmd.f = update_param_cmd;
	ppsiexp_update_param64_cmd.f = update_param64_cmd;
	ppsiexp_update_param_str_cmd.f = update_param_str_cmd;
	ppsiexp_update_param_instance_cmd.f = update_param_instance_cmd;
	ppsiexp_update_param64_instance_cmd.f = update_param64_instance_cmd;
	ppsiexp_update_param_instance_str_cmd.f = update_param_instance_str_cmd;

	minipc_export(ppsi_ch, &__rpcdef_cmd);
	minipc_export(ppsi_ch, &ppsiexp_update_param_cmd);
	minipc_export(ppsi_ch, &ppsiexp_update_param64_cmd);
	minipc_export(ppsi_ch, &ppsiexp_update_param_str_cmd);
	minipc_export(ppsi_ch, &ppsiexp_update_param_instance_cmd);
	minipc_export(ppsi_ch, &ppsiexp_update_param64_instance_cmd);
	minipc_export(ppsi_ch, &ppsiexp_update_param_instance_str_cmd);