ARPDAS_QNX6 1.0
Classes | Defines | Typedefs | Functions | Variables
tm.h File Reference

Defines basic telemetry formats. More...

#include <sys/types.h>
#include <fcntl.h>
Include dependency graph for tm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tm_hdr_t
struct  tstamp_t
struct  tmid_t
struct  tm_dac_t
struct  tm_info_t
struct  tm_data_t1_t
struct  tm_data_t2_t
struct  tm_data_t3_t
struct  tm_data_t4_t
struct  tm_msg
union  tm_hdrs
union  tm_packet_t

Defines

#define __attribute__(x)
#define TMHDR_WORD   0x4D54
#define TMBUFSIZE   16384
#define TMTYPE_INIT   0x0100
#define TMTYPE_TSTAMP   0x0200
#define TMTYPE_DATA_T1   0x0301
#define TMTYPE_DATA_T2   0x0302
#define TMTYPE_DATA_T3   0x0303
#define TMTYPE_DATA_T4   0x0304
#define TM_HDR_SIZE_T1   6
#define TM_HDR_SIZE_T2   10
#define TM_HDR_SIZE_T3   8
#define TMF_INVERTED   1
#define tmi(x)   tm_info.tm.x
#define tm_mfctr(mf)   (mf[tmi(mfc_lsb)] + (mf[tmi(mfc_msb)]<<8))
#define CMD_MAX_COMMAND_IN   300

Typedefs

typedef unsigned short mfc_t
typedef unsigned short tm_hdrw_t
typedef unsigned long tmcks_t
typedef struct tm_msg tm_msg_t
typedef union tm_hdrs tm_hdrs_t

Functions

const char * tm_dev_name (const char *base)
 Build a standard name for QNX6 resource.
int tm_open_name (const char *name, const char *node, int flags)
void cic_options (int argc, char **argv, const char *def_prefix)
int cic_init (void)
void cic_reset (void)
void cic_transmit (char *buf, int n_chars, int transmit)
int ci_sendcmd (const char *cmdtext, int mode)
int ci_sendfcmd (int mode, const char *fmt,...)
void ci_settime (long int time)
const char * ci_time_str (void)
void ci_server (void)
void cis_initialize (void)
void cis_terminate (void)
int ci_cmdee_init (const char *name)
void ci_report_version (void)
void tma_new_state (unsigned int partition, const char *name)
void tma_new_time (unsigned int partition, long int t1, const char *next_cmd)
void tma_hold (int hold)
void load_tmdac (const char *path)

Variables

tm_info_t tm_info
int TM_fd
char * TM_buf
char ci_version []
int cic_cmd_quit_fd

Detailed Description

Defines basic telemetry formats.

Definition in file tm.h.


Define Documentation

#define __attribute__ (   x)

Definition at line 14 of file tm.h.

#define CMD_MAX_COMMAND_IN   300

Definition at line 250 of file tm.h.

#define TM_HDR_SIZE_T1   6

Definition at line 42 of file tm.h.

Referenced by process_tm_info().

#define TM_HDR_SIZE_T2   10

Definition at line 43 of file tm.h.

Referenced by process_tm_info().

#define TM_HDR_SIZE_T3   8

Definition at line 44 of file tm.h.

Referenced by process_tm_info().

#define tm_mfctr (   mf)    (mf[tmi(mfc_lsb)] + (mf[tmi(mfc_msb)]<<8))

Definition at line 225 of file tm.h.

#define TMBUFSIZE   16384

Definition at line 33 of file tm.h.

#define TMF_INVERTED   1

Definition at line 85 of file tm.h.

#define TMHDR_WORD   0x4D54

Definition at line 32 of file tm.h.

Referenced by do_write(), data_generator::init(), read_reply(), and data_generator::transmit_data().

#define tmi (   x)    tm_info.tm.x
#define TMTYPE_DATA_T1   0x0301
#define TMTYPE_DATA_T2   0x0302
#define TMTYPE_DATA_T3   0x0303
#define TMTYPE_DATA_T4   0x0304

Definition at line 41 of file tm.h.

Referenced by do_write(), and data_client::process_message().

#define TMTYPE_INIT   0x0100

Definition at line 36 of file tm.h.

Referenced by do_write(), data_generator::init(), data_client::process_message(), and read_reply().

#define TMTYPE_TSTAMP   0x0200

Typedef Documentation

typedef unsigned short mfc_t

Definition at line 25 of file tm.h.

typedef union tm_hdrs tm_hdrs_t

tm_hdrs_t is a combination of all the header types, defining the minimum size struct we need to read in to understand the rest of the message. The message layout is best understood in the tm_msg_t structure, but in actual practice, I will use tm_hdrs_t, then access the data directly.

typedef unsigned short tm_hdrw_t

Definition at line 26 of file tm.h.

typedef struct tm_msg tm_msg_t

tm_msg_t is the logical format of TM messages to and from TMbfr.

typedef unsigned long tmcks_t

Definition at line 27 of file tm.h.


Function Documentation

int ci_cmdee_init ( const char *  name)

Definition at line 18 of file ci_cmdee.c.

References CMDEE_BUFSIZE, nl_assert, nl_error, nl_response, and tm_dev_name().

Here is the call graph for this function:

void ci_report_version ( void  )

Definition at line 5 of file civ.c.

References ci_version.

int ci_sendcmd ( const char *  cmdtext,
int  mode 
)

Definition at line 146 of file cic.c.

References ci_time_str(), cic_header, cic_init(), cis_fd, CMD_MAX_COMMAND_IN, CMDREP_EXECERR, CMDREP_QUIT, CMDREP_SYNERR, nl_error, nl_response, playback, and sent_quit.

Referenced by ci_sendfcmd(), cic_transmit(), read_a_cmd(), tma_init_state(), and tma_process().

Here is the call graph for this function:

Here is the caller graph for this function:

int ci_sendfcmd ( int  mode,
const char *  fmt,
  ... 
)

Definition at line 8 of file cicf.c.

References ci_sendcmd(), CMD_INTERP_MAX, and cmdbuf.

Here is the call graph for this function:

void ci_server ( void  )

Definition at line 176 of file cis.c.

void ci_settime ( long int  time)

Definition at line 115 of file cic.c.

References ci_time.

const char* ci_time_str ( void  )

Definition at line 119 of file cic.c.

References ci_time, and playback.

Referenced by ci_sendcmd(), and tma_new_state().

Here is the caller graph for this function:

int cic_init ( void  )

Definition at line 65 of file cic.c.

References ci_version, cic_cmd_quit_fd, cic_header, cis_fd, cis_node, CMD_VERSION_MAX, CMDSRVR_NAME, nl_error, nl_response, NLRSP_QUIET, NLRSP_WARN, playback, set_response(), tm_dev_name(), and tm_open_name().

Referenced by ci_sendcmd(), nct_cmdclt_init(), and nlph_cmdclt_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void cic_options ( int  argc,
char **  argv,
const char *  def_prefix 
)

Definition at line 30 of file cic.c.

References cic_header, cis_node, CMD_PREFIX_MAX, nl_error, opt_string, OPTIND_RESET, and playback.

void cic_reset ( void  )

Definition at line 103 of file cic.c.

References cic_cmd_quit_fd, and cis_fd.

Referenced by cic_cmd_quit_func().

Here is the caller graph for this function:

void cic_transmit ( char *  buf,
int  n_chars,
int  transmit 
)

Definition at line 40 of file cictrans.c.

References ci_sendcmd(), cmd_check(), CMD_INTERP_MAX, cmd_report(), cmdbuf, cur, curpos, nl_error, cmd_lev::pos, cmd_lev::prev, and cmd_lev::state.

Here is the call graph for this function:

void cis_initialize ( void  )

Definition at line 8 of file cis_stubs.c.

void cis_terminate ( void  )

Definition at line 9 of file cis_stubs.c.

void load_tmdac ( const char *  path)

Definition at line 17 of file tmdac.c.

References nl_error, tm_info_t::nrowminf, open_path(), tm_info_t::tm, tm_info, and tmi.

Here is the call graph for this function:

const char* tm_dev_name ( const char *  base)

Build a standard name for QNX6 resource.

#include "tm.h"
const char *tm_dev_name(const char *base);

If the input base string does not start with a '/', tm_dev_name() builds a string of the form: /dev/huarp/exp/base where exp is the current value of the environment variable "Experiment" and base is the input argument string. This is the standard means of building resource names within the ARP Data Acquisition System architecture.

Returns a pointer to a static buffer containing the expanded name. You must save the string if it is needed for long.

Returns:
the input string if it begins with a '/'. Otherwise returns a pointer to a static buffer containing the expanded name.

Definition at line 31 of file tm_dev_name.c.

References assert, COMPANY, nl_error, and nl_response.

Referenced by DG_cmd::attach(), ci_cmdee_init(), ci_server(), cic_init(), cis_setup_rdr(), Col_send_init(), data_client::data_client(), DG_data::DG_data(), data_generator::init(), msg_init_options(), cmdif_wr::Setup(), and setup_mount().

Here is the caller graph for this function:

int tm_open_name ( const char *  name,
const char *  node,
int  flags 
)

Definition at line 8 of file tm_open_name.c.

References nl_error, and nl_response.

Referenced by cic_init(), Ser_Sel::init(), and data_client::init().

Here is the caller graph for this function:

void tma_hold ( int  hold)

Definition at line 62 of file tma.c.

void tma_new_state ( unsigned int  partition,
const char *  name 
)

Definition at line 83 of file tma.c.

Referenced by tma_init_state().

Here is the caller graph for this function:

void tma_new_time ( unsigned int  partition,
long int  t1,
const char *  next_cmd 
)

Variable Documentation

char ci_version[]

Definition at line 7 of file cis_stubs.c.

Referenced by ci_report_version(), cic_init(), and io_write().

Definition at line 17 of file cic.c.

Referenced by cic_init(), cic_reset(), nct_cmdclt_init(), and nlph_cmdclt_init().

char* TM_buf
int TM_fd
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines