Loading...
Searching...
No Matches
libcamera::IPCMessage Class Reference

IPC message to be passed through IPC message pipe. More...

## Classes

struct | Header
| Container for an IPCMessage header. More...

## Public Member Functions

| IPCMessage ()
| Construct an empty IPCMessage instance.
| IPCMessage (uint32_t cmd)
| Construct an IPCMessage instance with a given command code.
| IPCMessage (const Header &header)
| Construct an IPCMessage instance with a given header.
| IPCMessage (IPCUnixSocket::Payload &payload)
| Construct an IPCMessage instance from an IPC payload.
IPCUnixSocket::Payload | payload () const
| Create an IPCUnixSocket payload from the IPCMessage.
Header & | header ()
| Returns a reference to the header.
std::vector< uint8_t > & | data ()
| Returns a reference to the byte vector containing data.
std::vector< SharedFD > & | fds ()
| Returns a reference to the vector containing file descriptors.
const Header & | header () const
| Returns a const reference to the header.
const std::vector< uint8_t > & | data () const
| Returns a const reference to the byte vector containing data.
const std::vector< SharedFD > & | fds () const
| Returns a const reference to the vector containing file descriptors.

## Detailed Description

IPC message to be passed through IPC message pipe.

## Constructor & Destructor Documentation

## IPCMessage() [1/3]

libcamera::IPCMessage::IPCMessage | ( | uint32_t | cmd | ) |

Construct an IPCMessage instance with a given command code.

Parameters

  [in] | cmd | The command code

## IPCMessage() [2/3]

libcamera::IPCMessage::IPCMessage | ( | const Header & | header | ) |

Construct an IPCMessage instance with a given header.

Parameters

  [in] | header | The header that the constructed IPCMessage will contain

## IPCMessage() [3/3]

libcamera::IPCMessage::IPCMessage | ( | IPCUnixSocket::Payload & | payload | ) |

Construct an IPCMessage instance from an IPC payload.

Parameters

  [in] | payload | The IPCUnixSocket payload to construct from

This essentially converts an IPCUnixSocket payload into an IPCMessage. The header is extracted from the payload into the IPCMessage's header field.

If the IPCUnixSocket payload had any valid file descriptors, then they will all be invalidated.

## Member Function Documentation

## payload()

IPCUnixSocket::Payload libcamera::IPCMessage::payload | ( |  | ) | const

Create an IPCUnixSocket payload from the IPCMessage.

This essentially converts the IPCMessage into an IPCUnixSocket payload.

Todo
  Resolve the layering violation (add other converters later?)

The documentation for this class was generated from the following files:

- include/libcamera/internal/ipc_pipe.h
- src/libcamera/ipc_pipe.cpp