This program is porting rosserial_arduino for mbed http://www.ros.org/wiki/rosserial_arduino This program supported the revision of 169 of rosserial. This program contains an example.
Dependencies: rosserial_mbed_lib mbed Servo
Diff: ros/publisher.h
- Revision:
- 0:06fc856e99ca
- Child:
- 1:098e75fd5ad2
diff -r 000000000000 -r 06fc856e99ca ros/publisher.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/publisher.h Fri Aug 19 09:06:16 2011 +0000 @@ -0,0 +1,34 @@ +/* + * publisher.h + * + * Created on: Aug 5, 2011 + * Author: astambler + */ + +#ifndef PUBLISHER_H_ +#define PUBLISHER_H_ + +#include "node_output.h" + +namespace ros{ + /* Generic Publisher */ + + class Publisher + { + public: + Publisher( const char * topic_name, Msg * msg ): topic_(topic_name), msg_(msg){}; + int publish( Msg * msg ){ + return no_->publish(id_, msg_); + }; + + const char * topic_; + + Msg *msg_; + int id_; + NodeOutput_* no_; + }; + +} + + +#endif /* PUBLISHER_H_ */