Go to the first, previous, next, last section, table of contents.

the tickle_types file

This is the file that contains the information on what types of messages are parsed by the various processes in the HETE WXM architecture. The chapters above should give examples of how to use these types to command the instrument.

This file contains a list of types that can be used from ground to tickle
processes.  This is only a list for reference.  -- Rebecca Barliant

First of all, the syntax for tickle is:

	tickle dest-process-id [type [word1 word2 ...]]

where the default type (if you don't specify it) is XRAY_TYPE_DEFAULT

---------------------------------------------------------------------------
 
XRAY_TYPE_DEFAULT      8192
	when no type is needed (I don't know why you would ever use this
	from ground, but just in case)

---------------------------------------------------------------------------

**** XRAY_FLIGHT_DSP 2048 ****

this is the process number of the X DSP; it is used as a destination
with "tickle".

for tickling the xdsp (tickle 2048 ...):

XRAY_TYPE_ECHO         8193
	generic echo responding; also sends a timestamp to ground.

XRAY_TYPE_WXM_WORD     8203
	sending a command word to the WXM.  takes an argument.
	Examples:
	  to turn on wire XA0 noise events:
	      tickle 2048 8203 24607

XRAY_TYPE_HK_REQ_BRIEF 8204
	flip on hk request for a certain number of microseconds (I think
	100us) and then flip it off.

XRAY_TYPE_HK_REQ_TOGGLE 8205
	set the HK request pin high if it is low, and vice-versa.
	this allows the user keep it up for a long time before
	toggling it back down.

XRAY_TYPE_CLOCK_SET    8210
	set the clock speed from ground (what units for argument???).
	the units (I believe) are the clock divisor, so a small number
	means a really fast clock.

XRAY_TYPE_START_PORT_C 8211
	initializes port c (starts the xdsp running its main loop).
	until this tickle is received, xdsp does no I/O.

XRAY_TYPE_STOP_PORT_C  8212
	turn off port C by setting all to parallel I/O
	and setting all pcddr directions to input

XRAY_TYPE_CHANGE_PERIODS 8224
	allow the user to tickle to change periods.  this
	is in milisecond units.
	-> the first arg is the xdsp-to-ground report period (mostly
		timestamps).
	-> the second arg is the period for sending histograms to
		RECEIVE_X_HIST.
	-> the third arg is the period for sending PHA histograms to
		RECEIVE_X_PHA_HIST.
	For example, Nobu frequently does a
		tickle 2048 8224 1000 400 1600
	so that he gets a report to NOBU_GSE every second.

	I frequently set this to
		tickle 2048 8224 10000 100 400
	so that I get time stamps every 10s and histograms every 100ms
	and 400ms

XRAY_TYPE_REPORT_WXM_ON		(8215)
XRAY_TYPE_REPORT_WXM_OFF	(8216)
	Used to tell the DSP that we think the WXM has been powered on (off).

XRAY_TYPE_OUTPUT_STYLE				8217
	changes the type of output.  here are the options (from dsp_defs.h):
      /* these macros describe the various styles of output that can be chosen,
         these are sent to the X DSP with the XRAY_TYPE_OUTPUT_STYLE IPP
	 message (as I write that is 8217).
	 */
	#define OSTYLE_HISTS_TO_XPTR 0	/* histograms to the transputer */
	#define OSTYLE_ARCHIVER_RAW_DATA 1 /* raw data words to ARCHIVER */
	#define OSTYLE_TAG_STREAM 2
	/* now some output styles for the test DSP program; this is
	   more for debug messages than for data, but I will also put in
	   a field for whether we send fake gamma ray data.
	 */
	#define OSTYLE_TDSP_NONE 0      /* no output at all */
	#define OSTYLE_TDSP_ALL 1       /* everything gets output */

XRAY_TYPE_DBG_HK				8218
	sends a message to putsd with housekeeping information

XRAY_TYPE_FAKE_XRAY_RCV				8219
	takes msg[0] and msg[1] and puts them in the input stream
	as if they were words from the WXM detector.

XRAY_TYPE_SET_PRODUCTS				8220
	takes one argument, which is a bit pattern of product types
	(like CHEESY_TAG and PRODUCT_TIME_HIST).
	default initial value is 0x0003.  Don't use it yet.

XRAY_TYPE_TH_IN_IPP				8221
	takes one argument.  sets how many TIME_HIST histograms will go
	from the DSP to the transputer in a single IPP message.
	Min: 1, Max: 25(approx), Default: 4.

XRAY_TYPE_SEND_SOFTWARE_STATE			8222
	no arguments.  sends back the structure describing the software state

XRAY_TYPE_SEND_ERROR_COUNTERS			8223
	no arguments.  sends back the structure that collects error histograms

XRAY_TYPE_EXECUTE_SHORT_PERIODIC		8227
	no arguments.  forces execution of short_periodic(), which is
	usually run by the IRQB interrupt.  when run from the forground
	main loop like this, short_periodic() can use debugging statements.

XRAY_TYPE_TAG_REQ_TO_DSP			8228
	no arguments (maybe put in a "MAX_IPPS" argument!!! so xptr
	can do the sleeping!!).  tells DSP to send its TAG buffers
	to ground.

XRAY_TYPE_TAG_FROM_DSP				8229
	the type used by the DSP to send its tags to ground.

----------------------------------------------------------------------------
XRAY_ARCHIVER 7006

#define XRAY_TYPE_ARCHIVER_TIME		(XRAY_TYPE_START + 300 + 2)	8494
	send a message to the xray archiver (GROUND_XRAY_ARCHIVER = 7006)
	telling it to put a human time (UNIX time(NULL)) stamp in the
	archive file.

------------------------------------------------------------------------------
XRAY_FLIGHT_TESTDSP 2049

for tickling the xdsp (tickle 2049 ...):

XRAY_TYPE_REPORT_HK_FLAG			8225
	no arguments; gets sent to TEST_DSP.  sends back an IPP_word
	that has bit 0 set if HK was requested, and clear if it was not.
	
XRAY_TYPE_SIMUL_STREAM 8692
	Sends a stream of simulated xrays.

XRAY_TYPE_SIMUL_HV0_ON 8693
XRAY_TYPE_SIMUL_HV1_ON 8694
XRAY_TYPE_SIMUL_HV0_OFF 8695
XRAY_TYPE_SIMUL_HV1_OFF 8696
	These simulate the power services.

XRAY_TYPE_PRETEND_HK 8697
	Sets an hk request flag which results in a debugging printout of the
	current state of housekeeping.

XRAY_TYPE_SET_XRAY_PERIOD 8698
XRAY_TYPE_BURST_MODE_ON 8699
XRAY_TYPE_BURST_MODE_OFF 8700
	These control the amount of generated events.

XRAY_TYPE_SIMULATE_SINGLE_PHOTON 8701
        Have a single photon sent out.

XRAY_TYPE_SCI_BYTES    8202
	We send out the byte in msg[0] several times (the count is
	encoded in msg[1]).

-----------------------------------------------------------------------------
This bank of types is for types parsed by the transputer:

#XRAY_WRITE_56K_CONFIG   2061
#	Set configuration parameters for the 56K.

#XRAY_TAKE_SNAPSHOT      2063
#	Take a snapshot of the current state of the processors and
#	instrument; this is not filght code; just a way for us to see
#	what's going on while we debug.  Message should be length 0.

XRAY_REINIT_TRANS_REQ   2064
	This activates the routine which re-initializes the global
	transputer data structures; it also does instrument poweron.
	  ** type 8300: power WXM ON -- XRAY_TYPE_POWER_WXM_ON
	  ** type 8301: power WXM OFF -- XRAY_TYPE_POWER_WXM_OFF
          ** type 8302: fake trigger -- XRAY_TYPE_FAKE_TRIGGER
          ** type 8303: WXM word with delay -- XRAY_TYPE_WXM_WORD_WITH_DELAY

XRAY_RECEIVE_TAG	2060
	This receives photon tag buffers from the DSP and sends them
	down in case of a burst.  It also receives requests for a special
	sending-down of the current buffer.
	  ** type 8297 (XRAY_TYPE_SEND_TAG): new data coming in from DSP

XRAY_ARCHIVE_TAG	2074
	Takes the received TAG data and sends down to ground in a
	sequence of IPP messages with subtypes starting at 0 and going
	up.  This happens when an END_OF_BURST message comes through
	or when you explicitly request it with "tickle 2074 8298".
	  ** type 8298 (XRAY_TYPE_TAG_REQUEST):
				special request to flush data to ground

XRAY_IMAGE              2066
	Ultimately intended to trigger the imaging software, this now 
	launches a benchmarking test.

XRAY_UNCLEAR            2067
	This process now does nstarts of processes which for some
	reason are not started up sufficiently in the normal 
	uplinking procedure.  In general, it is just Mark's dummy
	process.

XRAY_VERSION 2068
	request for the number of the version of software.

The rest of this list is types that are mainly used internally, but can
be used from ground for testing.

XRAY_SET_INST_STATE     2053
	NOTE: this has not yet been implemented ???
	The argument will set the state of the instrument.

XRAY_SET_INST_CONFIG    2054
	NOTE: this has not yet been implemented ???
	The argument will set the state of the instrument.

XRAY_RECEIVE_X_HIST     2056
	Processes the xray data contained in the message. (Expect
	histograms to appear in putsd window)

XRAY_RECEIVE_P_HIST     2057
	Processes the gamma ray pha data contained in the message.

XRAY_RECEIVE_G_HIST     2058
	Processes the high time resolution gamma ray data contained in
	the message. (Expect histograms to appear in putsd window)

XRAY_RECEIVE_R_HIST     2059
	Processes the rbm data contained in the message.

XRAY_RECEIVE_TAG        2060
	Processes the tag data contained in the message.

XRAY_WRITE_TRANS_CONFIG 2062
	Set configuration parameters for the transputer.  This process
	sits around waiting for a message tha tells it to write parts
	of the configuration structure for the transputer.

XRAY_TRIGGER            2065
	don't *ever* send messages to this guy: it is periodic
	and only generates messages.

XG_SET_GAMMA_CONFIG     2069
	this process enters 3 communications: it receives
	ground messages from the FREGATE team to set new
	configurations; it receives messages from the GAMMA DSP
	(usually at boot) for that configuration; and finally it sends
	that configuration to the GAMMA DSP.  This configuration gets
	stored in both the transputer RAM and in EEPROM
	types for the GAMMA config data (within above process):
	XG_TYPE_SET_CONFIG	8292 
		Sets gamma config info to the argument.
	XG_TYPE_CONFIG_REQ	8293
		Requests current configuration info, which is then
		sent to the source of the request.

XG_SET_GAMMA_STATUS   	2070
	NOTE: this has not yet been implemented ???
	this process receives 4 different requests from the ground
	to store the trigger on/off status and the high-voltage
	on/off status, and pass that new status to the GAMMA DSP.  The
	types for these messages (G_TRIG_ON_TOGPP etc...) are taken
	from gamma_types.h
	NOTE: it says so, but I can't find them.

XG_GAMMA_TRIGGER        2071
	NOTE: this has not yet been implemented ???
	this is a 9-word message from the GAMMA DSP; its type is in
	gamma_types.h; this process receives both the BURST and
	END_OF_BURST messages:
		G_BURST_TRIG           12433
		G_END_OF_BURST         12435 

??? Except for putsd, I don't understand anything beneath this line.

GROUND_XRAY_WXM_CMD    7000

GROUND_XRAY_PING       7001

GROUND_XRAY_PUTSD      7002
	A daemon for general debugging.  It parses the following IPP 
	message types:

	XRAY_TYPE_PUTS         8193
		Prints a message from a file called ground_messages. The 
		argument is the number of the message from the list that
		is to be printed.

	XRAY_TYPE_PUTI         8194
		Prints an integer in three forms: decimal, hex. and binary.  
		The argument is the integer to be printed.

	XRAY_TYPE_PUTI2        8203
		Same as puti but prints two integers on the line.

	XRAY_TYPE_PUTI3        8204
		Same as puti but prints three integers on the line.

	XRAY_TYPE_PUTI4        8205
		Same as puti but prints four integers on the line.

	XRAY_TYPE_STRING       8195
		Prints a string. 

	XRAY_TYPE_TIMESTAMP    8199
		Prints a timestamp in two forms: the four words which
		contain the different levels of bit significance in
		microseconds, and then in hours, minutes, and seconds.

GROUND_XRAY_RAW_WORDS  7003
	A demon that listens for raw streams of words put out by the
	xdsp when it simply dumps its queue, rather than processing it
	and forming histograms.

GROUND_XRAY_NOBU_GSE   7004

#define    XRAY_TYPEXTH         1 /* x-ray time history from 56001 to trans  */
#define    XRAY_TYPEXPH          2    /* x-ray spectra from 56001 to trans  */
#define    XRAY_TYPEGTHPH        6    /* gamma-ray th and pha from 56001  */
#define    XRAY_TYPERBMTH        7    /* rbm from mit  */
#define    XRAY_TYPEX56001TAG    9    /* photon tag from 56001 to trans  */
#define    XRAY_TYPEXTRANSTAG   10    /* photon tag from trans to ground  */
#define    XRAY_TYPEWRITE56001RAM 11  /* write to the 56001 ram  */
#define    XRAY_TYPEWRITETRANSRAM 12  /* write to the trans ram  */
#define    XRAY_TYPERESETX56001   13  /* reset the x dsp  */
#define    XRAY_TYPERESETXTRANS   14  /* reset the x-gamma gpp  */
#define    XRAY_TYPEXGRDCOMMAND   15  /* ground command for x-g gpp  */
/* write to 56K config struct */
#define    XRAY_TYPE_WRITE_56K_CONFIG XRAY_TYPEWRITE56001RAM
#define    XRAY_TYPE_WRITE_TRANS_CONFIG XRAY_TYPEWRITETRANSRAM

/* here go the types I (Mark Galassi) am defining; this must really be
   brought in sync with the types defined by Mark Levine at MIT ???
 */
/* here goes the bank of bogus (simulator only) IPP message types */
#define XRAY_TYPE_BOGUS_D_EVENT  2048 /* detector event simulation */
#define XRAY_TYPE_BOGUS_TIME_SET 2049 /* set the DSP time */
#define XRAY_TYPE_BOGUS_SNAPSHOT 2050 /* take a snapshot */

---------------------------------------------------------------------

Examples of raw commands to the WXM:

tickle 2048 8203 24607 will turn on wire XA0 noise events

Go to the first, previous, next, last section, table of contents.