MessagePort Class Reference
|
Space-ng SDK
|
#include <sol3/core/message_port.h>
Public Member Functions | |
| MessagePort ()=default | |
| Default-constructed port with zero value and payload type. More... | |
| MessagePort (uint32_t encoded, uint32_t payload_type) | |
| Construct from encoded value. More... | |
| MessagePort (uint32_t component_id, msg::InterfaceType interface_type, uint32_t interface_id, uint32_t payload_type) | |
| uint16_t | componentId () const |
| 12-bit component identifier extracted from the port value. More... | |
| sol3::core::msg::InterfaceType | interfaceType () const |
| Interface type encoded in bits [15:12]. More... | |
| uint16_t | interfaceId () const |
| 12-bit interface/index extracted from the port value. More... | |
| uint32_t | payloadType () const |
| 32-bit FlatBuffers file identifier of the payload type for this port. More... | |
| uint32_t | encoded () const |
| Packed 32-bit port value. More... | |
Detailed Description
A logical message port (component id, interface type, interface id) and associated payload type.
The encoded bit layout: [31:28] unused (0) [27:16] component id (12 bits) [15:12] interface type (4 bits) [11:00] interface id (12 bits)
The payloadType() stores the 32-bit identifier for the payload type carried on this port. Typically this is the flatbuffer file_identifer.
Constructor & Destructor Documentation
◆ MessagePort() [1/3]
|
default |
Default-constructed port with zero value and payload type.
◆ MessagePort() [2/3]
|
inline |
Construct from encoded value.
◆ MessagePort() [3/3]
|
inline |
Constructs a port from its components and associates a payload type.
Only the low 12 bits of component and interface are kept. Only the low 4 bits of interface_type are kept.
Member Function Documentation
◆ componentId()
|
inline |
12-bit component identifier extracted from the port value.
◆ encoded()
|
inline |
Packed 32-bit port value.
◆ interfaceId()
|
inline |
12-bit interface/index extracted from the port value.
◆ interfaceType()
|
inline |
Interface type encoded in bits [15:12].
◆ payloadType()
|
inline |
32-bit FlatBuffers file identifier of the payload type for this port.
The documentation for this class was generated from the following file:
- /workspaces/astro/sol3-sdk/cpp/sol3/core/message_port.h
Generated by