ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

So where are the constants transmitted?

Nowhere (*).

They are compile time constants (in compiled languages such as C and C++) or predefined (constant) variables in the namespace of the message class / struct / dictionary for languages like Python.

So in your case, since you don't use test_types::type33::a or any of the other constants anywhere in your code, you'll not see their values anywhere in the serialised data stream.

) I wrote *nowhere, but that's not exactly true. The complete message definition is exchanged between publisher and subscriber during setup of the connection, so technically the constant values are also sent to the subscriber.

But that's not as part of the actual message exchange, hence the nowhere.

So where are the constants transmitted?

Nowhere (*).

They are compile time constants (in compiled languages such as C and C++) or predefined (constant) variables in the namespace of the message class / struct / dictionary for languages like Python.Python. They are not part of the data that gets (de)serialised when exchanging messages.

So in your case, since you don't use test_types::type33::a or any of the other constants anywhere in your code, you'll not see their values anywhere in the serialised data stream.

It would also not be very efficient to do that for each and every message.

The assumption is that publisher and subscriber both have access to the message structure (ie: definition file or code generated from those). As the constants would be present in those representations, the receiving side can use them.

) I wrote *nowhere, but that's not exactly true. The complete message definition is exchanged between publisher and subscriber during setup of the connection, so technically the constant values are also sent to the subscriber.

But that's not as part of the actual message exchange, hence the nowhere.

So where are the constants transmitted?

Nowhere (*).

They are compile time constants (in compiled languages such as C and C++) or predefined (constant) variables in the namespace of the message class / struct / dictionary for languages like Python. They are not part of the data that gets (de)serialised when exchanging messages.

So in your case, since you don't use test_types::type33::a or any of the other constants anywhere in your code, you'll not see their values anywhere in the serialised data stream.

It would also not be very efficient to do that for each and every message.

The assumption is that publisher and subscriber both have access to the message structure (ie: definition file or code generated from those). As the constants would be present in those representations, the receiving side can use them.

) *) I wrote *nowherenowhere, but that's not exactly true. The complete message definition is exchanged between publisher and subscriber during setup of the connection, so technically the constant values are also sent to the subscriber.

But that's not as part of the actual message exchange, hence the nowhere.

So where are the constants transmitted?

Nowhere (*).

They are compile time constants (in compiled languages such as C and C++) or predefined (constant) variables in the namespace of the message class / struct / dictionary for languages like Python. They are not part of the data that gets (de)serialised when exchanging messages.

So in your case, since you don't use test_types::type33::a or any of the other constants anywhere in your code, you'll not see their values anywhere in the serialised data stream.

It would also not be very efficient to do that for each and every message.

The assumption is that publisher and subscriber both have access to the message structure (ie: definition file or code generated from those). As the constants would be present in those representations, the receiving side can use them.

*) I wrote nowhere, but that's not exactly true. The complete message definition is exchanged between publisher and subscriber during setup of the connection, so technically the constant values are also sent to the subscriber.

But that's not as part of the actual message data exchange, hence the nowhere.