ARPDAS_QNX6 1.0
|
Defines basic telemetry formats. More...
#include <sys/types.h>
#include <fcntl.h>
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 |
Defines basic telemetry formats.
Definition in 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)) |
#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 |
Definition at line 224 of file tm.h.
Referenced by data_queue::init(), data_generator::init(), data_client::init_tm_type(), load_tmdac(), and process_tm_info().
#define TMTYPE_DATA_T1 0x0301 |
Definition at line 38 of file tm.h.
Referenced by do_write(), data_queue::init(), data_client::init_tm_type(), data_client::process_message(), process_tm_info(), and read_reply().
#define TMTYPE_DATA_T2 0x0302 |
Definition at line 39 of file tm.h.
Referenced by do_write(), data_queue::init(), data_client::init_tm_type(), data_client::process_message(), process_tm_info(), and read_reply().
#define TMTYPE_DATA_T3 0x0303 |
Definition at line 40 of file tm.h.
Referenced by do_write(), data_queue::init(), data_client::init_tm_type(), data_client::process_message(), process_tm_info(), and read_reply().
#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 |
Definition at line 37 of file tm.h.
Referenced by do_write(), data_client::process_message(), read_reply(), and data_generator::transmit_data().
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.
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().
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().
int ci_sendfcmd | ( | int | mode, |
const char * | fmt, | ||
... | |||
) |
Definition at line 8 of file cicf.c.
References ci_sendcmd(), CMD_INTERP_MAX, and cmdbuf.
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().
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().
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().
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.
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.
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.
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().
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().
void tma_new_state | ( | unsigned int | partition, |
const char * | name | ||
) |
Definition at line 83 of file tma.c.
Referenced by tma_init_state().
void tma_new_time | ( | unsigned int | partition, |
long int | t1, | ||
const char * | next_cmd | ||
) |
char ci_version[] |
Definition at line 7 of file cis_stubs.c.
Referenced by ci_report_version(), cic_init(), and io_write().
int cic_cmd_quit_fd |
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 |
Definition at line 4 of file tm_info.c.
Referenced by dq_data_ref::append_rows(), collector::commit_tstamp(), do_write(), data_queue::init(), data_generator::init(), data_client::init_tm_type(), load_tmdac(), data_client::process_init(), data_client::process_message(), process_tm_info(), data_client::process_tstamp(), read_reply(), and data_queue::retire_rows().