libcamera
v0.3.2+116-83c5ad0f
Supporting cameras in Linux since 2019
|
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. More... | |
IPCMessage (const Header &header) | |
Construct an IPCMessage instance with a given header. More... | |
IPCMessage (IPCUnixSocket::Payload &payload) | |
Construct an IPCMessage instance from an IPC payload. More... | |
IPCUnixSocket::Payload | payload () const |
Create an IPCUnixSocket payload from the IPCMessage. More... | |
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. | |
IPC message to be passed through IPC message pipe.
libcamera::IPCMessage::IPCMessage | ( | uint32_t | cmd | ) |
Construct an IPCMessage instance with a given command code.
[in] | cmd | The command code |
libcamera::IPCMessage::IPCMessage | ( | const Header & | header | ) |
Construct an IPCMessage instance with a given header.
[in] | header | The header that the constructed IPCMessage will contain |
libcamera::IPCMessage::IPCMessage | ( | IPCUnixSocket::Payload & | payload | ) |
Construct an IPCMessage instance from an IPC payload.
[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.
IPCUnixSocket::Payload libcamera::IPCMessage::payload | ( | ) | const |
Create an IPCUnixSocket payload from the IPCMessage.
This essentially converts the IPCMessage into an IPCUnixSocket payload.