Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef PLUGIN_H
00015 #define PLUGIN_H
00016
00017 #include <sys/types.h>
00018
00019 #ifdef PLUGIN_COMPATIBILITY
00020 #include "qtime.h"
00021 #endif
00022
00023 #define PLUGIN_INTERFACE_VERSION 3
00024 #define PLUGIN_FD 63
00025 #define PLUGIN_MAX_DATA_BYTES 4000
00026 #define PLUGIN_MAX_MSG_SIZE 132
00027 #define PLUGIN_MSEED_SIZE 512
00028 #define PLUGIN_SIDLEN 10
00029 #define PLUGIN_CIDLEN 10
00030
00031 enum PluginPacketType
00032 {
00033 PluginRawDataTimePacket=8,
00034 PluginRawDataPacket,
00035 PluginRawDataGapPacket,
00036 PluginRawDataFlushPacket,
00037 PluginLogPacket,
00038 PluginMSEEDPacket
00039 };
00040
00041 struct ptime
00042 {
00043 int year;
00044 int yday;
00045 int hour;
00046 int minute;
00047 int second;
00048 int usec;
00049 };
00050
00051 struct PluginPacketHeader
00052 {
00053 enum PluginPacketType packtype;
00054 char station[PLUGIN_SIDLEN];
00055 char channel[PLUGIN_CIDLEN];
00056 struct ptime pt;
00057 int usec_correction;
00058 int timing_quality;
00059 int data_size;
00060 };
00061
00062 #ifdef __cplusplus
00063 extern "C" {
00064 #endif
00065
00066 int send_raw3(const char *station, const char *channel, const struct ptime *pt,
00067 int usec_correction, int timing_quality, const int32_t *dataptr,
00068 int number_of_samples);
00069 int send_flush3(const char *station, const char *channel);
00070 int send_log3(const char *station, const struct ptime *pt, const char *fmt,
00071 ...);
00072 int send_mseed(const char *station, const void *dataptr, int packet_size);
00073 int send_raw_depoch(const char *station, const char *channel, double depoch,
00074 int usec_correction, int timing_quality, const int32_t *dataptr,
00075 int number_of_samples);
00076
00077 #ifdef PLUGIN_COMPATIBILITY
00078 int send_raw(const char *station, const char *channel, const INT_TIME *it,
00079 int usec_correction, const int32_t *dataptr, int number_of_samples);
00080 int send_raw2(const char *station, const char *channel, const INT_TIME *it,
00081 int usec_correction, int timing_quality, const int32_t *dataptr,
00082 int number_of_samples);
00083 int send_log(const char *station, const INT_TIME *it, const char *fmt, ...);
00084 #endif
00085
00086 #ifdef __cplusplus
00087 }
00088 #endif
00089
00090 #endif
00091