static void handle_manual(CMD_Request *rx_message, CMD_Reply *tx_message) { int option; option = ntohl(rx_message->data.manual.option); switch (option) { case 0: MNL_Disable(); break; case 1: MNL_Enable(); break; case 2: MNL_Reset(); break; default: tx_message->status = htons(STT_INVALID); break; } }
static void slew_samples(struct timeval *raw, struct timeval *cooked, double dfreq, double doffset, LCL_ChangeType change_type, void *not_used) { double delta_time; int i; if (change_type == LCL_ChangeUnknownStep) { MNL_Reset(); } for (i=0; i<n_samples; i++) { UTI_AdjustTimeval(&samples[i].when, cooked, &samples[i].when, &delta_time, dfreq, doffset); samples[i].offset += delta_time; } }