Skip to content
Snippets Groups Projects
Commit edec4142 authored by Erik von Reis's avatar Erik von Reis
Browse files

awgtpman: delete some commented out code

parent 80784027
No related branches found
No related tags found
No related merge requests found
......@@ -167,9 +167,7 @@ extern int testpoint_manager_rpc;
#pragma init(initAWGServer);
__fini__(finiAWGServer);
#pragma fini(finiAWGServer);
#ifdef _AWG_RM
//static int initializeDCUs (void);
#endif
extern void rawgprog_1 (struct svc_req* rqstp,
register SVCXPRT* transp);
......@@ -660,169 +658,6 @@ extern int testpoint_manager_rpc;
}
//#if defined(_AWG_RM)
///*----------------------------------------------------------------------*/
///* */
///* Internal Procedure Name: updateCycleCount */
///* */
///* Procedure Description: updates test points DCU IPC area */
///* */
///* Procedure Arguments: scheduler task, time, epoch, void* */
///* */
///* Procedure Returns: 0 if successful, <0 if not */
///* */
///*----------------------------------------------------------------------*/
// static int updateCycleCount (schedulertask_t* info, taisec_t time,
// int epoch, void* arg)
// {
// taisec_t dtime; /* time of data */
// int depoch; /* epcoh of data */
//
// /* calculate cycle count */
// depoch = epoch - DATA_EPOCH_DELAY;
// if (depoch < 0) {
// depoch += NUMBER_OF_EPOCHS;
// dtime = time - 1;
// }
// else {
// dtime = time;
// }
// /* update IPC area */
// if (lscIPC != NULL) {
// lscIPC->bp[depoch % DATA_BLOCKS].timeSec = dtime;
// lscIPC->bp[depoch % DATA_BLOCKS].timeNSec = depoch * _EPOCH;
// lscIPC->bp[depoch % DATA_BLOCKS].cycle = depoch;
// lscIPC->cycle = depoch;
// }
// if (ascIPC != NULL) {
// ascIPC->bp[depoch % DATA_BLOCKS].timeSec = dtime;
// ascIPC->bp[depoch % DATA_BLOCKS].timeNSec = depoch * _EPOCH;
// ascIPC->bp[depoch % DATA_BLOCKS].cycle = depoch;
// ascIPC->cycle = depoch;
// }
// /* update run flag */
// if ((epoch % NUMBER_OF_EPOCHS == 0) ||
// (epoch % NUMBER_OF_EPOCHS == 4) ||
// (epoch % NUMBER_OF_EPOCHS == 8) ||
// (epoch % NUMBER_OF_EPOCHS == 12)) {
// /* if running update RUN status */
// if (checkAWG ()) {
// if (lscIPC != NULL) {
// lscIPC->status = DAQ_STATE_RUN;
// }
// if (ascIPC != NULL) {
// ascIPC->status = DAQ_STATE_RUN;
// }
// }
// /* if suspended try to restart */
// else if (epoch % NUMBER_OF_EPOCHS == 4) {
// restartAWG();
// }
// }
//
// return 0;
// }
//
//
///*----------------------------------------------------------------------*/
///* */
///* Internal Procedure Name: initializeDCUs */
///* */
///* Procedure Description: initializes DCU areas */
///* */
///* Procedure Arguments: void */
///* */
///* Procedure Returns: 0 if successful, <0 if failed */
///* */
///*----------------------------------------------------------------------*/
// static int initializeDCUs (void)
// {
// int k; /* data block index */
// char* addr; /* rm address */
// schedulertask_t task; /* update task entry */
//
// /* fill in pointers */
// if ((_LSCX_BASE >= 0) &&
// (rmCheck (_RM_ID, _LSCX_BASE, _LSCX_SIZE))) {
// lscIPC = (rmIpcStr*) (rmBaseAddress (_RM_ID) + _LSCX_BASE);
// }
// if ((_ASCX_BASE >= 0) &&
// (rmCheck (_RM_ID, _ASCX_BASE, _ASCX_SIZE))) {
// ascIPC = (rmIpcStr*) (rmBaseAddress (_RM_ID) + _ASCX_BASE);
// }
//
// /* clear data area */
// if (lscIPC != NULL) {
// addr = rmBaseAddress (_RM_ID) +
// UNIT_ID_TO_DATA_OFFSET(_LSCX_UNIT_ID);
// memset (addr, 0, DATA_BLOCKS *
// UNIT_ID_TO_DATA_BLOCKSIZE(_LSCX_UNIT_ID));
// }
// if (ascIPC != NULL) {
// addr = rmBaseAddress (_RM_ID) +
// UNIT_ID_TO_DATA_OFFSET(_ASCX_UNIT_ID);
// memset (addr, 0, DATA_BLOCKS *
// UNIT_ID_TO_DATA_BLOCKSIZE(_ASCX_UNIT_ID));
// }
//
// /* initial IPC area */
// if (lscIPC != NULL) {
// memset (lscIPC, 0, sizeof (rmIpcStr));
// lscIPC->status = DAQ_STATE_RUN_CONFIG;
// lscIPC->dcuId = _LSCX_UNIT_ID;
// lscIPC->command = DAQS_CMD_NO_CMD;
// lscIPC->reqAck = DAQS_CMD_NO_CMD;
// lscIPC->request = DAQS_CMD_NO_CMD;
// lscIPC->cmdAck = DAQS_CMD_NO_CMD;
// lscIPC->status = DAQ_STATE_RUN;
// for (k = 0; k < DATA_BLOCKS; k++) {
// lscIPC->bp[k].run = 0;
// lscIPC->bp[k].timeSec = 0;
// lscIPC->bp[k].timeNSec = 0;
// lscIPC->bp[k].cycle = 0xFFFFFFFF;
// }
// lscIPC->cycle = 0xFFFFFFFF;
// }
//
// if (ascIPC != NULL) {
// memset (ascIPC, 0, sizeof (rmIpcStr));
// ascIPC->status = DAQ_STATE_RUN_CONFIG;
// ascIPC->dcuId = _LSCX_UNIT_ID;
// ascIPC->command = DAQS_CMD_NO_CMD;
// ascIPC->reqAck = DAQS_CMD_NO_CMD;
// ascIPC->request = DAQS_CMD_NO_CMD;
// ascIPC->cmdAck = DAQS_CMD_NO_CMD;
// ascIPC->status = DAQ_STATE_RUN;
// for (k = 0; k < DATA_BLOCKS; k++) {
// ascIPC->bp[k].run = 0;
// ascIPC->bp[k].timeSec = 0;
// ascIPC->bp[k].timeNSec = 0;
// ascIPC->bp[k].cycle = 0xFFFFFFFF;
// }
// ascIPC->cycle = 0xFFFFFFFF;
// }
//
// /* setup task info structure for update cycle count */
// SET_TASKINFO_ZERO (&task);
// task.flag = SCHED_REPEAT;
// task.repeattype = SCHED_REPEAT_INFINITY;
// task.repeatratetype = SCHED_REPEAT_EPOCH;
// task.repeatrate = 1;
// task.repeatsynctype = SCHED_SYNC_NEXT;
// task.func = updateCycleCount;
//
// /* schedule cycle count task */
// if (scheduleTask (sd, &task) < 0) {
// closeScheduler (sd, 3 * _EPOCH);
// sd = NULL;
// return -5;
// }
//
// /* return */
// return 0;
// }
//#endif
/*----------------------------------------------------------------------*/
/* */
/* External Procedure Name: awg_server */
......@@ -880,15 +715,7 @@ extern int testpoint_manager_rpc;
}
prognum += testpoint_manager_node;
#if defined(_AWG_RM)
// /* initialize DCUs */
// if (initializeDCUs () < 0) {
// gdsError (GDS_ERR_PROG, "unable to initialize DCUs");
// return -6;
// }
#endif
/* init rpc services */
if (rpcInitializeServer (&rpcpmstart, _SVC_FG, _SVC_MODE,
&transp, &proto) < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment