public interface Backend extends OnNewRosMessageSourceInt
This serves as a backend for direct communication with ROS nodes. It can be used either for publishing messages OR for receiving messages.
For communication between nodes, the Nengo uses either RealOutput or SpikeOutput data types. The Real output is implemented as vector of float values. Therefore the Backend accepts and returns vectors of floats. Note that SpikeOutput is not implemented so far.
SpikeOutput
,
RealOutput
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(MyEventListenerInterface listener)
Adds the listener which waits for new message from ROS events.
|
float[] |
decodeMessage(org.ros.internal.message.Message mess)
This method decodes the last available message from ROS
into Nengo format (that is an array of floats)
|
void |
fireOnNewMessage(org.ros.internal.message.Message mess)
New message from ROS received.
|
int |
gedNumOfDimensions()
The data from ROS message are concatenated into one vector
of float values.
|
void |
publish(float[] data)
This transforms given array of floats (from Nengo)
to given data type and publishes message with data
the to a given ROS topic.
|
removeEventListener
void publish(float[] data)
data
- float[] decodeMessage(org.ros.internal.message.Message mess)
int gedNumOfDimensions()
void addEventListener(MyEventListenerInterface listener)
addEventListener
in interface OnNewRosMessageSourceInt
OnNewRosMessageSource
void fireOnNewMessage(org.ros.internal.message.Message mess)
fireOnNewMessage
in interface OnNewRosMessageSourceInt
OnNewRosMessageSource