00001 /* 00002 * Filename: perftype.hh 00003 * 00004 * Purpose: 00005 * Defines the message class for messages that will be used by nmlperf and 00006 * perfsvr. 00007 */ 00008 00009 #ifndef PERFTYPE_HH 00010 #define PERFTYPE_HH 00011 00012 #include "nmlmsg.hh" /* NMLmsg */ 00013 00014 #define NML_PERFORMANCE_TEST_MSG_TYPE ((NMLTYPE) 0xff) 00015 00016 class NML_PERFORMANCE_TEST_MSG:public NMLmsg 00017 { 00018 public: 00019 NML_PERFORMANCE_TEST_MSG ():NMLmsg (NML_PERFORMANCE_TEST_MSG_TYPE, 00020 sizeof (NML_PERFORMANCE_TEST_MSG)) 00021 { 00022 }; 00023 void update (CMS *); 00024 int serial_number; 00025 int test_type; 00026 long array_length; 00027 00028 #ifndef JAVA_DIAG_APPLET 00029 union 00030 { 00031 char char_data; 00032 short short_data; 00033 int int_data; 00034 long long_data; 00035 float float_data; 00036 double double_data; 00037 }; 00038 void compute_array_length (); 00039 void *operator new (size_t); 00040 void operator delete (void *); 00041 #endif 00042 00043 }; 00044 00045 enum TEST_TYPE 00046 { 00047 CHAR_TEST, 00048 SHORT_TEST, 00049 INT_TEST, 00050 LONG_TEST, 00051 FLOAT_TEST, 00052 DOUBLE_TEST 00053 }; 00054 00055 extern "C" 00056 { 00057 #include <stddef.h> /* size_t */ 00058 } 00059 00060 extern void set_real_test_msg_size (long); 00061 extern void delete_test_msg_buffer (); 00062 extern unsigned int real_test_msg_size; 00063 extern unsigned int test_msg_buffer_size; 00064 extern void *test_msg_buffer; 00065 extern int perf_types_format (NMLTYPE type, void *buffer, CMS * cms); 00066 00067 00068 00069 #endif /* !PTYPES_HH */