ARPDAS_QNX6 1.0
collect.h
Go to the documentation of this file.
00001 /* collect.h defines routines applications might use to
00002    communicate with collection.
00003    $Log: collect.h,v $
00004    Revision 1.4  2009/10/29 18:00:40  ntallen
00005    Indexer debugging, including proper support for ionotify() on DG_data
00006 
00007    Revision 1.3  2009/10/20 18:25:17  ntallen
00008    Add support for non-blocking writes with ionotify
00009 
00010    Revision 1.2  2008/07/29 19:21:06  ntallen
00011    Support for colsend
00012 
00013    Revision 1.1  2008/07/25 13:38:03  ntallen
00014    Col_send functionality
00015    Includes a proposed Col_Send class for C++
00016 
00017  * Revision 1.2  1994/11/22  14:53:44  nort
00018  * New functionality, C++ escapes.
00019  *
00020  * Revision 1.1  1993/01/09  15:50:41  nort
00021  * Initial revision
00022  *
00023  */
00024 #ifndef _COLLECT_H_INCLUDED
00025 #define _COLLECT_H_INCLUDED
00026 
00027 #include <sys/siginfo.h>
00028 
00029 #ifdef __cplusplus
00030   // This is a proposed C++ wrapper. To my knowledge it has not been implemented
00031   class Col_Send {
00032     public:
00033       Col_Send(char *name, void *data_in, int size_in, int synch);
00034       ~Col_Send();
00035       int send();
00036       int fd;
00037       int rv;
00038     private:
00039       void *data;
00040       int data_size;
00041   };
00042 
00043 extern "C" {
00044 #endif
00045 
00046 /*   
00047    COL_SEND is used for data which is sent to collection via
00048    standard QNX6 IPC, namely a POSIX open/write.
00049    
00050    COL_SEND/COL_SEND_INIT:  The initialization uses the
00051    ASCIIZ name for the particular data as specified in the
00052    'TM "Receive" name 0;' statement. Collection will locate the
00053    specified name and return the pre-determined ID number. Possible
00054    return values in the type field:
00055      DAS_OK   id field of colmsg is the id for future correspondence.
00056          DAS_UNKN the name wasn't found. Don't call back!
00057          DAS_BUSY the name is in use by another program.
00058 
00059    COL_SEND/COL_SEND_SEND: Uses the data substructure of colmsg.
00060    The id established with the _INIT col goes in the id field.
00061    The size as determined by the sender is included with the
00062    message. It is compared to the size we like, and the smaller
00063    value is used for the actual data transfer.
00064    
00065    COL_SEND/COL_SEND_RESET: Uses the data substructure, but only
00066    the id field is used.
00067 */
00068 
00069 /* API */
00070 
00071 typedef struct {
00072   int fd;
00073   void *data;
00074   int data_size;
00075   int err_code;
00076   int armed;
00077   struct sigevent event;
00078 } send_id_struct, *send_id;
00079 
00080 send_id Col_send_init(const char *name, void *data, unsigned short size, int synch);
00081 int Col_send_arm( send_id sender, int coid, short code, int value );
00082 int Col_send(send_id sender);
00083 int Col_send_reset(send_id sender);
00084 
00085 #ifdef __cplusplus
00086 };
00087 #endif
00088 
00089 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines