From a25ed5045dab6becd0337ce3ae3faa2f1c95f562 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Fri, 1 Jul 2011 19:07:37 +0300 Subject: [PATCH] get_parameter_count method new method: BusMessage::get_parameter_count(); Signed-off-by: Mika Laitio --- src/plpbus/BusMessage.cc | 10 +++++++++- src/plpbus/BusMessage.hh | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/plpbus/BusMessage.cc b/src/plpbus/BusMessage.cc index 99d32a0..47a7b7a 100644 --- a/src/plpbus/BusMessage.cc +++ b/src/plpbus/BusMessage.cc @@ -306,6 +306,15 @@ float BusMessage::get_float_parameter(string arg_name_param, int *err_flg) { return ret_val; } +unsigned long BusMessage::get_parameter_count() { + int ret_val; + DataItemSequence *seq; + + seq = (DataItemSequence *)_dataItemSeq; + ret_val = seq->length(); + return ret_val; +} + void BusMessage::printout_dataitem(long index, void *item) { CORBA::TCKind kind; const char *name; @@ -369,7 +378,6 @@ void BusMessage::printout() { count = seq->length(); log_debug("BusMessage.printout(): parameter count: %ld\n", count); for (long ii = 0; ii < count; ii++) { - printf("item[%ld]\n", ii); item = (*seq)[ii]; printout_dataitem(ii, &item); } diff --git a/src/plpbus/BusMessage.hh b/src/plpbus/BusMessage.hh index 21faff6..05fba36 100644 --- a/src/plpbus/BusMessage.hh +++ b/src/plpbus/BusMessage.hh @@ -31,6 +31,7 @@ namespace plpbus { int get_int_parameter(std::string arg_name_param, int *err_flg); double get_double_parameter(std::string arg_name_param, int *err_flg); float get_float_parameter(std::string arg_name_param, int *err_flg); + unsigned long get_parameter_count(); void printout(); protected: BusMessage(); -- 2.41.1