]> pilppa.org Git - libplpbus.git/blob - src/plpbus/BusMessage.hh
2ebd63581dd296a5e6b78edc5c43db591795298d
[libplpbus.git] / src / plpbus / BusMessage.hh
1 /*
2  * BusMessage.h
3  *
4  *  Created on: Aug 17, 2010
5  *      Author: lamikr
6  */
7
8 #ifndef BUSMESSAGE_H_
9 #define BUSMESSAGE_H_
10
11 #include <string>
12
13 namespace plpbus {
14         class BusMessage
15         {
16                 public:
17                         void    *_dataItemSeq;
18
19                         BusMessage(long type_param);
20                         BusMessage(long type_param, const char *arg_name_param, const char *arg_string_value_param);
21                         virtual ~BusMessage();
22                         int add_string_parameter(std::string arg_name_param, std::string string_value_param);
23                         int add_long_parameter(std::string arg_name_param, long value_param);
24                         int add_int_parameter(std::string arg_name_param, int value_param);
25                         int add_double_parameter(std::string arg_name_param, double value_param);
26                         int add_float_parameter(std::string arg_name_param, float value_param);
27                         long get_type(int *err_flg);
28                         std::string get_string_parameter(std::string arg_name_param, int *err_flg);
29                         long get_long_parameter(std::string arg_name_param, int *err_flg);
30                         int get_int_parameter(std::string arg_name_param, int *err_flg);
31                         double get_double_parameter(std::string arg_name_param, int *err_flg);
32                         float get_float_parameter(std::string arg_name_param, int *err_flg);
33                         void printout();
34                 protected:
35                         BusMessage();
36                         void printout_dataitem(long index, void *item);
37         };
38 }
39
40 #endif /* BUSMESSAGE_H_ */