1 |
/**************************************************************************** |
2 |
* F i l e D a t a |
3 |
* $Id: CH_CommandHandler_INFN.c,v 1.2 2004/05/12 08:10:11 faber Exp $ |
4 |
* $Revision: 1.2 $ |
5 |
* $Date: 2004/05/12 08:10:11 $ |
6 |
* $RCSfile: CH_CommandHandler_INFN.c,v $ |
7 |
* |
8 |
**************************************************************************** |
9 |
* S W D e v e l o p m e n t E n v i r o n m e n t |
10 |
* |
11 |
* $Author: faber $ |
12 |
* : |
13 |
**************************************************************************** |
14 |
* U p d a t i n g |
15 |
* |
16 |
* $Log: CH_CommandHandler_INFN.c,v $ |
17 |
* Revision 1.2 2004/05/12 08:10:11 faber |
18 |
* *** empty log message *** |
19 |
* |
20 |
* Revision 1.1 2003/09/23 09:41:29 faber |
21 |
* CH_CommandHandler and autogeneration gen_params.pl introduced |
22 |
* some dummy file in src/INFN/commands/ |
23 |
* |
24 |
* Revision 1.1.1.1 2003/08/04 09:40:22 sebastiani |
25 |
* Imported sources laben rel. 19.06.2003 integrated with pam2 |
26 |
* |
27 |
* Revision 1.1 2003/06/23 15:40:10 sebastiani |
28 |
* Trakcer added: First Compilation of tracker |
29 |
* |
30 |
* |
31 |
*****************************************************************************/ |
32 |
|
33 |
|
34 |
/*============================= Include File ================================*/ |
35 |
|
36 |
#include <src/INFN/LU_SourceFileID_INFN.h> |
37 |
#define __FILEID__ _CH_CommandHandler_INFN__c |
38 |
|
39 |
#include <src/INFN/LU_LogUtility_INFN.h> |
40 |
#include <src/INFN/PRH_ParamHandler_INFN_auto.h> |
41 |
|
42 |
#include <src/INFN/CH_CommandHandler_INFN_auto.h> |
43 |
#include <src/INFN/CH_CommandHandler_INFN.h> |
44 |
#include <src/INFN/CM_Common_INFN.h> |
45 |
|
46 |
LU_DECL_MASK(); |
47 |
|
48 |
|
49 |
|
50 |
/*============================ Global define ================================*/ |
51 |
|
52 |
|
53 |
/*============================== global types ==============================*/ |
54 |
|
55 |
|
56 |
|
57 |
/*****************************************************************************/ |
58 |
/*=========================== Structure define ==============================*/ |
59 |
|
60 |
|
61 |
/*****************************************************************************/ |
62 |
/*============================ Enumerate define =============================*/ |
63 |
|
64 |
/*****************************************************************************/ |
65 |
|
66 |
/*=== Common I N T E R N A L ==*/ |
67 |
|
68 |
/*****************************************************************************/ |
69 |
|
70 |
void CH_Init() { |
71 |
|
72 |
} |
73 |
|
74 |
status_code CH_GetBuf(CH_COMMANDS bufid,DAQ_CMD_BUF **buf) { |
75 |
status_code s; |
76 |
if(bufid > CH_NULL && bufid < CH_MAX) { |
77 |
*buf = CH_auto_GetBuf(bufid); |
78 |
s = CM_RC_SUCCESSFUL; |
79 |
}else |
80 |
s = CM_RC_INVALID_ID; |
81 |
return s; |
82 |
} |
83 |
|
84 |
|
85 |
status_code CH_GetLen(CH_COMMANDS bufid,unsigned int *len) { |
86 |
status_code s; |
87 |
DAQ_CMD_BUF *b; |
88 |
if(bufid > CH_NULL && bufid < CH_MAX) { |
89 |
b = CH_auto_GetBuf(bufid); |
90 |
*len = b->len; |
91 |
s = CM_RC_SUCCESSFUL; |
92 |
}else |
93 |
s = CM_RC_INVALID_ID; |
94 |
return s; |
95 |
} |
96 |
|
97 |
|
98 |
status_code CH_SetAtoEto(CH_COMMANDS queue,BYTE ato,BYTE eto) |
99 |
{ |
100 |
DAQ_CMD_BUF *com; |
101 |
status_code s; |
102 |
s = CH_GetBuf(queue,&com); |
103 |
if(s == CM_RC_SUCCESSFUL) { |
104 |
com->ato = ato; |
105 |
com->eto = eto; |
106 |
} |
107 |
return s; |
108 |
} |