NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
pixie16app_common.h
1 #ifndef __PIXIE16APP_COMMON_H
2 #define __PIXIE16APP_COMMON_H
3 
4 /*----------------------------------------------------------------------
5  * Copyright (c) 2005 - 2009, XIA LLC
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms,
9  * with or without modification, are permitted provided
10  * that the following conditions are met:
11  *
12  * * Redistributions of source code must retain the above
13  * copyright notice, this list of conditions and the
14  * following disclaimer.
15  * * Redistributions in binary form must reproduce the
16  * above copyright notice, this list of conditions and the
17  * following disclaimer in the documentation and/or other
18  * materials provided with the distribution.
19  * * Neither the name of XIA LLC nor the names of its
20  * contributors may be used to endorse or promote products
21  * derived from this software without specific prior
22  * written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
25  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
26  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
27  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28  * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
29  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
33  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
34  * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
35  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36  * SUCH DAMAGE.
37  *----------------------------------------------------------------------*/
38 
39 /******************************************************************************
40  *
41  * File Name:
42  *
43  * pixie16app_common.h
44  *
45  * Description:
46  *
47  * Function prototypes shared among multiple files.
48  *
49  * $Rev: 27118 $
50  * $Id: pixie16app_common.h 27118 2013-05-17 01:55:17Z htan $
51  ******************************************************************************/
52 
53 // If this is compiled by a C++ compiler, make it
54 // clear that these are C routines.
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 /*-------------------------------------
60  Functions that are only used locally
61  -------------------------------------*/
62 
63 int Pixie_Start_Run (
64  unsigned short mode, // mode = NEW_RUN or RESUME_RUN
65  unsigned short run_task, // run task number
66  unsigned short control_task, // control task number
67  unsigned short ModNum );
68 
69 int Pixie_End_Run (
70  unsigned short ModNum );
71 
72 int Pixie_Check_Run_Status (
73  unsigned short ModNum );
74 
75 int Pixie_Control_Task_Run (
76  unsigned short ModNum, // Pixie module number
77  unsigned short ControlTask, // Control task number
78  unsigned int Max_Poll ); // Timeout control in unit of ms for control task run
79 
80 int Pixie_Broadcast (
81  const char *str, // variable name whose value is to be broadcasted
82  unsigned short SourceModule ); // the source module number
83 
84 int Pixie_ComputeFIFO (
85  unsigned int TraceDelay, // current trace dealy value
86  unsigned short ModNum, // Pixie module number
87  unsigned short ChanNum ); // Pixie channel number
88 
89 int Pixie_CopyDSPParameters (
90  unsigned short BitMask, // copy/extract bit mask pattern
91  unsigned short SourceModule, // source module number
92  unsigned short SourceChannel, // source Pixie channel
93  unsigned short DestinationModule, // destination module number
94  unsigned short DestinationChannel ); // destination channel number
95 
96 int Pixie_Init_DSPVarAddress(const char *DSPVarFile, unsigned short ModNum);
97 
98 int Pixie_Copy_DSPVarAddress(unsigned short SourceModNum, unsigned short DestinationModNum);
99 
100 #ifdef __cplusplus
101 }
102 #endif
103 
104 #endif
105 
106