Ejemplo n.º 1
0
Archivo: irc.c Proyecto: ngircd/ngircd
/**
 * Handler for the IRC "PRIVMSG" command.
 *
 * @param Client The client from which this command has been received.
 * @param Req Request structure with prefix and all parameters.
 * @return CONNECTED or DISCONNECTED.
 */
GLOBAL bool
IRC_PRIVMSG(CLIENT *Client, REQUEST *Req)
{
	return Send_Message(Client, Req, CLIENT_USER, true);
} /* IRC_PRIVMSG */
Ejemplo n.º 2
0
Archivo: irc.c Proyecto: ngircd/ngircd
/**
 * Handler for the IRC "NOTICE" command.
 *
 * @param Client The client from which this command has been received.
 * @param Req Request structure with prefix and all parameters.
 * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_NOTICE(CLIENT *Client, REQUEST *Req)
{
	return Send_Message(Client, Req, CLIENT_USER, false);
} /* IRC_NOTICE */
Ejemplo n.º 3
0
/**
 * @brief Transmits a dummy packet if no other subscriptions are set
 * @ingroup  QDebug-Remote
 */
void Transmit_Dummy(void)
{
   PutChar(QT_DUMMY);
   Send_Message();
}
Ejemplo n.º 4
0
/**
 * Handler for the IRC "SQUERY" command.
 *
 * @param Client The client from which this command has been received.
 * @param Req Request structure with prefix and all parameters.
 * @return CONNECTED or DISCONNECTED.
 */
GLOBAL bool
IRC_SQUERY(CLIENT *Client, REQUEST *Req)
{
	return Send_Message(Client, Req, CLIENT_SERVICE, true);
} /* IRC_SQUERY */
/*! \brief Transmits the global config struct to QTouch Studio.
 */
void Transmit_Global_Config(void)
{
	int16_t touch_ret;
	UNUSED(touch_ret);  /* Dummy. To avoid warning. */
	
#if ((DEF_TOUCH_QDEBUG_ENABLE_QM == 1)      ||\
	(DEF_TOUCH_QDEBUG_ENABLE_QTA == 1) ||\
	(DEF_TOUCH_QDEBUG_ENABLE_QTB == 1))

	touch_global_param_t global_params;

	/* get the global parameters from the library and transmit the global
	 * parameters to the Qtouch Studio */
	touch_ret = QDEBUG_GET_GLOBAL_PARAM_FUNC(&global_params);
	if (touch_ret != TOUCH_SUCCESS) {
		while (1) {
		}
	}

	PutChar(QT_GLOBAL_CONFIG);

	PutChar(global_params.recal_threshold);
	PutChar(global_params.di);
	PutChar(global_params.drift_hold_time);
	PutChar(global_params.max_on_duration);
	PutChar(global_params.neg_drift_rate);
	PutChar(global_params.pos_drift_rate);
	PutChar(global_params.pos_recal_delay);
	PutInt(measurement_period_ms);
	PutInt(0);              /* TICKS_PER_MS */
	PutChar(0);             /* Time_Setting */
#endif

#if DEF_TOUCH_QDEBUG_ENABLE_AT == 1
	touch_at_param_t touch_sensor_param;

	/* Fill touch_sensor_param structure with default values.
	 * This is because QTouch Studio does not provide sense and outsense
	 * values.  So these values should not be overwritten by the update API.
	 * */
	touch_ret = QDEBUG_GET_GLOBAL_PARAM_FUNC(&touch_sensor_param);
	if (touch_ret != TOUCH_SUCCESS) {
		while (1) {
		}
	}

	PutChar(QT_GLOBAL_CONFIG);

	PutChar(touch_sensor_param.pthr);
	PutChar(touch_sensor_param.filter);
	PutChar(1u);            /* Dummy. drift_hold_time. */
	PutChar(0u);            /* Dummy. max_on_duration. */
	PutChar(touch_sensor_param.ndrift);
	PutChar(touch_sensor_param.pdrift);
	PutChar(1u);            /* Dummy. pos_recal_delay. */
	PutInt(measurement_period_ms);
	PutInt(0);              /* TICKS_PER_MS */
	PutChar(0);             /* Time_Setting */
#endif

	Send_Message();
}