blob: eccb130b1d7a4f2c756221403b7584a4a153fe49 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#include <fuchsia/sysinfo/llcpp/fidl.h>
#include <memory>
namespace llcpp {
namespace fuchsia {
namespace sysinfo {
namespace {
[[maybe_unused]]
constexpr uint64_t kSysInfo_GetHypervisorResource_Ordinal = 0x4682e82d00000000lu;
[[maybe_unused]]
constexpr uint64_t kSysInfo_GetHypervisorResource_GenOrdinal = 0x1ab9d2b80bbb43a4lu;
extern "C" const fidl_type_t v1_fuchsia_sysinfo_SysInfoGetHypervisorResourceRequestTable;
extern "C" const fidl_type_t v1_fuchsia_sysinfo_SysInfoGetHypervisorResourceResponseTable;
[[maybe_unused]]
constexpr uint64_t kSysInfo_GetBoardName_Ordinal = 0x1346873400000000lu;
[[maybe_unused]]
constexpr uint64_t kSysInfo_GetBoardName_GenOrdinal = 0x6d29d1a6edf9a614lu;
extern "C" const fidl_type_t v1_fuchsia_sysinfo_SysInfoGetBoardNameRequestTable;
extern "C" const fidl_type_t v1_fuchsia_sysinfo_SysInfoGetBoardNameResponseTable;
[[maybe_unused]]
constexpr uint64_t kSysInfo_GetBoardRevision_Ordinal = 0x6f07cacb00000000lu;
[[maybe_unused]]
constexpr uint64_t kSysInfo_GetBoardRevision_GenOrdinal = 0x3dd050d99012e9cclu;
extern "C" const fidl_type_t v1_fuchsia_sysinfo_SysInfoGetBoardRevisionRequestTable;
extern "C" const fidl_type_t v1_fuchsia_sysinfo_SysInfoGetBoardRevisionResponseTable;
[[maybe_unused]]
constexpr uint64_t kSysInfo_GetInterruptControllerInfo_Ordinal = 0x4ff3937d00000000lu;
[[maybe_unused]]
constexpr uint64_t kSysInfo_GetInterruptControllerInfo_GenOrdinal = 0x31a438b28dca119clu;
extern "C" const fidl_type_t v1_fuchsia_sysinfo_SysInfoGetInterruptControllerInfoRequestTable;
extern "C" const fidl_type_t v1_fuchsia_sysinfo_SysInfoGetInterruptControllerInfoResponseTable;
} // namespace
template <>
SysInfo::ResultOf::GetHypervisorResource_Impl<SysInfo::GetHypervisorResourceResponse>::GetHypervisorResource_Impl(::zx::unowned_channel _client_end) {
constexpr uint32_t _kWriteAllocSize = ::fidl::internal::ClampedMessageSize<GetHypervisorResourceRequest, ::fidl::MessageDirection::kSending>();
::fidl::internal::AlignedBuffer<_kWriteAllocSize> _write_bytes_inlined;
auto& _write_bytes_array = _write_bytes_inlined;
uint8_t* _write_bytes = _write_bytes_array.view().data();
memset(_write_bytes, 0, GetHypervisorResourceRequest::PrimarySize);
::fidl::BytePart _request_bytes(_write_bytes, _kWriteAllocSize, sizeof(GetHypervisorResourceRequest));
::fidl::DecodedMessage<GetHypervisorResourceRequest> _decoded_request(std::move(_request_bytes));
Super::SetResult(
SysInfo::InPlace::GetHypervisorResource(std::move(_client_end), Super::response_buffer()));
}
SysInfo::ResultOf::GetHypervisorResource SysInfo::SyncClient::GetHypervisorResource() {
return ResultOf::GetHypervisorResource(::zx::unowned_channel(this->channel_));
}
SysInfo::ResultOf::GetHypervisorResource SysInfo::Call::GetHypervisorResource(::zx::unowned_channel _client_end) {
return ResultOf::GetHypervisorResource(std::move(_client_end));
}
template <>
SysInfo::UnownedResultOf::GetHypervisorResource_Impl<SysInfo::GetHypervisorResourceResponse>::GetHypervisorResource_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer) {
FIDL_ALIGNDECL uint8_t _write_bytes[sizeof(GetHypervisorResourceRequest)] = {};
::fidl::BytePart _request_buffer(_write_bytes, sizeof(_write_bytes));
memset(_request_buffer.data(), 0, GetHypervisorResourceRequest::PrimarySize);
_request_buffer.set_actual(sizeof(GetHypervisorResourceRequest));
::fidl::DecodedMessage<GetHypervisorResourceRequest> _decoded_request(std::move(_request_buffer));
Super::SetResult(
SysInfo::InPlace::GetHypervisorResource(std::move(_client_end), std::move(_response_buffer)));
}
SysInfo::UnownedResultOf::GetHypervisorResource SysInfo::SyncClient::GetHypervisorResource(::fidl::BytePart _response_buffer) {
return UnownedResultOf::GetHypervisorResource(::zx::unowned_channel(this->channel_), std::move(_response_buffer));
}
SysInfo::UnownedResultOf::GetHypervisorResource SysInfo::Call::GetHypervisorResource(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer) {
return UnownedResultOf::GetHypervisorResource(std::move(_client_end), std::move(_response_buffer));
}
::fidl::DecodeResult<SysInfo::GetHypervisorResourceResponse> SysInfo::InPlace::GetHypervisorResource(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer) {
constexpr uint32_t _write_num_bytes = sizeof(GetHypervisorResourceRequest);
::fidl::internal::AlignedBuffer<_write_num_bytes> _write_bytes;
::fidl::BytePart _request_buffer = _write_bytes.view();
_request_buffer.set_actual(_write_num_bytes);
::fidl::DecodedMessage<GetHypervisorResourceRequest> params(std::move(_request_buffer));
SysInfo::SetTransactionHeaderFor::GetHypervisorResourceRequest(params);
auto _encode_request_result = ::fidl::Encode(std::move(params));
if (_encode_request_result.status != ZX_OK) {
return ::fidl::DecodeResult<SysInfo::GetHypervisorResourceResponse>::FromFailure(
std::move(_encode_request_result));
}
auto _call_result = ::fidl::Call<GetHypervisorResourceRequest, GetHypervisorResourceResponse>(
std::move(_client_end), std::move(_encode_request_result.message), std::move(response_buffer));
if (_call_result.status != ZX_OK) {
return ::fidl::DecodeResult<SysInfo::GetHypervisorResourceResponse>::FromFailure(
std::move(_call_result));
}
return ::fidl::Decode(std::move(_call_result.message));
}
template <>
SysInfo::ResultOf::GetBoardName_Impl<SysInfo::GetBoardNameResponse>::GetBoardName_Impl(::zx::unowned_channel _client_end) {
constexpr uint32_t _kWriteAllocSize = ::fidl::internal::ClampedMessageSize<GetBoardNameRequest, ::fidl::MessageDirection::kSending>();
::fidl::internal::AlignedBuffer<_kWriteAllocSize> _write_bytes_inlined;
auto& _write_bytes_array = _write_bytes_inlined;
uint8_t* _write_bytes = _write_bytes_array.view().data();
memset(_write_bytes, 0, GetBoardNameRequest::PrimarySize);
::fidl::BytePart _request_bytes(_write_bytes, _kWriteAllocSize, sizeof(GetBoardNameRequest));
::fidl::DecodedMessage<GetBoardNameRequest> _decoded_request(std::move(_request_bytes));
Super::SetResult(
SysInfo::InPlace::GetBoardName(std::move(_client_end), Super::response_buffer()));
}
SysInfo::ResultOf::GetBoardName SysInfo::SyncClient::GetBoardName() {
return ResultOf::GetBoardName(::zx::unowned_channel(this->channel_));
}
SysInfo::ResultOf::GetBoardName SysInfo::Call::GetBoardName(::zx::unowned_channel _client_end) {
return ResultOf::GetBoardName(std::move(_client_end));
}
template <>
SysInfo::UnownedResultOf::GetBoardName_Impl<SysInfo::GetBoardNameResponse>::GetBoardName_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer) {
FIDL_ALIGNDECL uint8_t _write_bytes[sizeof(GetBoardNameRequest)] = {};
::fidl::BytePart _request_buffer(_write_bytes, sizeof(_write_bytes));
memset(_request_buffer.data(), 0, GetBoardNameRequest::PrimarySize);
_request_buffer.set_actual(sizeof(GetBoardNameRequest));
::fidl::DecodedMessage<GetBoardNameRequest> _decoded_request(std::move(_request_buffer));
Super::SetResult(
SysInfo::InPlace::GetBoardName(std::move(_client_end), std::move(_response_buffer)));
}
SysInfo::UnownedResultOf::GetBoardName SysInfo::SyncClient::GetBoardName(::fidl::BytePart _response_buffer) {
return UnownedResultOf::GetBoardName(::zx::unowned_channel(this->channel_), std::move(_response_buffer));
}
SysInfo::UnownedResultOf::GetBoardName SysInfo::Call::GetBoardName(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer) {
return UnownedResultOf::GetBoardName(std::move(_client_end), std::move(_response_buffer));
}
::fidl::DecodeResult<SysInfo::GetBoardNameResponse> SysInfo::InPlace::GetBoardName(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer) {
constexpr uint32_t _write_num_bytes = sizeof(GetBoardNameRequest);
::fidl::internal::AlignedBuffer<_write_num_bytes> _write_bytes;
::fidl::BytePart _request_buffer = _write_bytes.view();
_request_buffer.set_actual(_write_num_bytes);
::fidl::DecodedMessage<GetBoardNameRequest> params(std::move(_request_buffer));
SysInfo::SetTransactionHeaderFor::GetBoardNameRequest(params);
auto _encode_request_result = ::fidl::Encode(std::move(params));
if (_encode_request_result.status != ZX_OK) {
return ::fidl::DecodeResult<SysInfo::GetBoardNameResponse>::FromFailure(
std::move(_encode_request_result));
}
auto _call_result = ::fidl::Call<GetBoardNameRequest, GetBoardNameResponse>(
std::move(_client_end), std::move(_encode_request_result.message), std::move(response_buffer));
if (_call_result.status != ZX_OK) {
return ::fidl::DecodeResult<SysInfo::GetBoardNameResponse>::FromFailure(
std::move(_call_result));
}
return ::fidl::Decode(std::move(_call_result.message));
}
template <>
SysInfo::ResultOf::GetBoardRevision_Impl<SysInfo::GetBoardRevisionResponse>::GetBoardRevision_Impl(::zx::unowned_channel _client_end) {
constexpr uint32_t _kWriteAllocSize = ::fidl::internal::ClampedMessageSize<GetBoardRevisionRequest, ::fidl::MessageDirection::kSending>();
::fidl::internal::AlignedBuffer<_kWriteAllocSize> _write_bytes_inlined;
auto& _write_bytes_array = _write_bytes_inlined;
uint8_t* _write_bytes = _write_bytes_array.view().data();
memset(_write_bytes, 0, GetBoardRevisionRequest::PrimarySize);
::fidl::BytePart _request_bytes(_write_bytes, _kWriteAllocSize, sizeof(GetBoardRevisionRequest));
::fidl::DecodedMessage<GetBoardRevisionRequest> _decoded_request(std::move(_request_bytes));
Super::SetResult(
SysInfo::InPlace::GetBoardRevision(std::move(_client_end), Super::response_buffer()));
}
SysInfo::ResultOf::GetBoardRevision SysInfo::SyncClient::GetBoardRevision() {
return ResultOf::GetBoardRevision(::zx::unowned_channel(this->channel_));
}
SysInfo::ResultOf::GetBoardRevision SysInfo::Call::GetBoardRevision(::zx::unowned_channel _client_end) {
return ResultOf::GetBoardRevision(std::move(_client_end));
}
template <>
SysInfo::UnownedResultOf::GetBoardRevision_Impl<SysInfo::GetBoardRevisionResponse>::GetBoardRevision_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer) {
FIDL_ALIGNDECL uint8_t _write_bytes[sizeof(GetBoardRevisionRequest)] = {};
::fidl::BytePart _request_buffer(_write_bytes, sizeof(_write_bytes));
memset(_request_buffer.data(), 0, GetBoardRevisionRequest::PrimarySize);
_request_buffer.set_actual(sizeof(GetBoardRevisionRequest));
::fidl::DecodedMessage<GetBoardRevisionRequest> _decoded_request(std::move(_request_buffer));
Super::SetResult(
SysInfo::InPlace::GetBoardRevision(std::move(_client_end), std::move(_response_buffer)));
}
SysInfo::UnownedResultOf::GetBoardRevision SysInfo::SyncClient::GetBoardRevision(::fidl::BytePart _response_buffer) {
return UnownedResultOf::GetBoardRevision(::zx::unowned_channel(this->channel_), std::move(_response_buffer));
}
SysInfo::UnownedResultOf::GetBoardRevision SysInfo::Call::GetBoardRevision(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer) {
return UnownedResultOf::GetBoardRevision(std::move(_client_end), std::move(_response_buffer));
}
::fidl::DecodeResult<SysInfo::GetBoardRevisionResponse> SysInfo::InPlace::GetBoardRevision(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer) {
constexpr uint32_t _write_num_bytes = sizeof(GetBoardRevisionRequest);
::fidl::internal::AlignedBuffer<_write_num_bytes> _write_bytes;
::fidl::BytePart _request_buffer = _write_bytes.view();
_request_buffer.set_actual(_write_num_bytes);
::fidl::DecodedMessage<GetBoardRevisionRequest> params(std::move(_request_buffer));
SysInfo::SetTransactionHeaderFor::GetBoardRevisionRequest(params);
auto _encode_request_result = ::fidl::Encode(std::move(params));
if (_encode_request_result.status != ZX_OK) {
return ::fidl::DecodeResult<SysInfo::GetBoardRevisionResponse>::FromFailure(
std::move(_encode_request_result));
}
auto _call_result = ::fidl::Call<GetBoardRevisionRequest, GetBoardRevisionResponse>(
std::move(_client_end), std::move(_encode_request_result.message), std::move(response_buffer));
if (_call_result.status != ZX_OK) {
return ::fidl::DecodeResult<SysInfo::GetBoardRevisionResponse>::FromFailure(
std::move(_call_result));
}
return ::fidl::Decode(std::move(_call_result.message));
}
template <>
SysInfo::ResultOf::GetInterruptControllerInfo_Impl<SysInfo::GetInterruptControllerInfoResponse>::GetInterruptControllerInfo_Impl(::zx::unowned_channel _client_end) {
constexpr uint32_t _kWriteAllocSize = ::fidl::internal::ClampedMessageSize<GetInterruptControllerInfoRequest, ::fidl::MessageDirection::kSending>();
::fidl::internal::AlignedBuffer<_kWriteAllocSize> _write_bytes_inlined;
auto& _write_bytes_array = _write_bytes_inlined;
uint8_t* _write_bytes = _write_bytes_array.view().data();
memset(_write_bytes, 0, GetInterruptControllerInfoRequest::PrimarySize);
::fidl::BytePart _request_bytes(_write_bytes, _kWriteAllocSize, sizeof(GetInterruptControllerInfoRequest));
::fidl::DecodedMessage<GetInterruptControllerInfoRequest> _decoded_request(std::move(_request_bytes));
Super::SetResult(
SysInfo::InPlace::GetInterruptControllerInfo(std::move(_client_end), Super::response_buffer()));
}
SysInfo::ResultOf::GetInterruptControllerInfo SysInfo::SyncClient::GetInterruptControllerInfo() {
return ResultOf::GetInterruptControllerInfo(::zx::unowned_channel(this->channel_));
}
SysInfo::ResultOf::GetInterruptControllerInfo SysInfo::Call::GetInterruptControllerInfo(::zx::unowned_channel _client_end) {
return ResultOf::GetInterruptControllerInfo(std::move(_client_end));
}
template <>
SysInfo::UnownedResultOf::GetInterruptControllerInfo_Impl<SysInfo::GetInterruptControllerInfoResponse>::GetInterruptControllerInfo_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer) {
FIDL_ALIGNDECL uint8_t _write_bytes[sizeof(GetInterruptControllerInfoRequest)] = {};
::fidl::BytePart _request_buffer(_write_bytes, sizeof(_write_bytes));
memset(_request_buffer.data(), 0, GetInterruptControllerInfoRequest::PrimarySize);
_request_buffer.set_actual(sizeof(GetInterruptControllerInfoRequest));
::fidl::DecodedMessage<GetInterruptControllerInfoRequest> _decoded_request(std::move(_request_buffer));
Super::SetResult(
SysInfo::InPlace::GetInterruptControllerInfo(std::move(_client_end), std::move(_response_buffer)));
}
SysInfo::UnownedResultOf::GetInterruptControllerInfo SysInfo::SyncClient::GetInterruptControllerInfo(::fidl::BytePart _response_buffer) {
return UnownedResultOf::GetInterruptControllerInfo(::zx::unowned_channel(this->channel_), std::move(_response_buffer));
}
SysInfo::UnownedResultOf::GetInterruptControllerInfo SysInfo::Call::GetInterruptControllerInfo(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer) {
return UnownedResultOf::GetInterruptControllerInfo(std::move(_client_end), std::move(_response_buffer));
}
::fidl::DecodeResult<SysInfo::GetInterruptControllerInfoResponse> SysInfo::InPlace::GetInterruptControllerInfo(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer) {
constexpr uint32_t _write_num_bytes = sizeof(GetInterruptControllerInfoRequest);
::fidl::internal::AlignedBuffer<_write_num_bytes> _write_bytes;
::fidl::BytePart _request_buffer = _write_bytes.view();
_request_buffer.set_actual(_write_num_bytes);
::fidl::DecodedMessage<GetInterruptControllerInfoRequest> params(std::move(_request_buffer));
SysInfo::SetTransactionHeaderFor::GetInterruptControllerInfoRequest(params);
auto _encode_request_result = ::fidl::Encode(std::move(params));
if (_encode_request_result.status != ZX_OK) {
return ::fidl::DecodeResult<SysInfo::GetInterruptControllerInfoResponse>::FromFailure(
std::move(_encode_request_result));
}
auto _call_result = ::fidl::Call<GetInterruptControllerInfoRequest, GetInterruptControllerInfoResponse>(
std::move(_client_end), std::move(_encode_request_result.message), std::move(response_buffer));
if (_call_result.status != ZX_OK) {
return ::fidl::DecodeResult<SysInfo::GetInterruptControllerInfoResponse>::FromFailure(
std::move(_call_result));
}
return ::fidl::Decode(std::move(_call_result.message));
}
bool SysInfo::TryDispatch(Interface* impl, fidl_msg_t* msg, ::fidl::Transaction* txn) {
if (msg->num_bytes < sizeof(fidl_message_header_t)) {
zx_handle_close_many(msg->handles, msg->num_handles);
txn->Close(ZX_ERR_INVALID_ARGS);
return true;
}
fidl_message_header_t* hdr = reinterpret_cast<fidl_message_header_t*>(msg->bytes);
zx_status_t status = fidl_validate_txn_header(hdr);
if (status != ZX_OK) {
txn->Close(status);
return true;
}
switch (hdr->ordinal) {
case kSysInfo_GetHypervisorResource_Ordinal:
case kSysInfo_GetHypervisorResource_GenOrdinal:
{
auto result = ::fidl::DecodeAs<GetHypervisorResourceRequest>(msg);
if (result.status != ZX_OK) {
txn->Close(ZX_ERR_INVALID_ARGS);
return true;
}
impl->GetHypervisorResource(
Interface::GetHypervisorResourceCompleter::Sync(txn));
return true;
}
case kSysInfo_GetBoardName_Ordinal:
case kSysInfo_GetBoardName_GenOrdinal:
{
auto result = ::fidl::DecodeAs<GetBoardNameRequest>(msg);
if (result.status != ZX_OK) {
txn->Close(ZX_ERR_INVALID_ARGS);
return true;
}
impl->GetBoardName(
Interface::GetBoardNameCompleter::Sync(txn));
return true;
}
case kSysInfo_GetBoardRevision_Ordinal:
case kSysInfo_GetBoardRevision_GenOrdinal:
{
auto result = ::fidl::DecodeAs<GetBoardRevisionRequest>(msg);
if (result.status != ZX_OK) {
txn->Close(ZX_ERR_INVALID_ARGS);
return true;
}
impl->GetBoardRevision(
Interface::GetBoardRevisionCompleter::Sync(txn));
return true;
}
case kSysInfo_GetInterruptControllerInfo_Ordinal:
case kSysInfo_GetInterruptControllerInfo_GenOrdinal:
{
auto result = ::fidl::DecodeAs<GetInterruptControllerInfoRequest>(msg);
if (result.status != ZX_OK) {
txn->Close(ZX_ERR_INVALID_ARGS);
return true;
}
impl->GetInterruptControllerInfo(
Interface::GetInterruptControllerInfoCompleter::Sync(txn));
return true;
}
default: {
return false;
}
}
}
bool SysInfo::Dispatch(Interface* impl, fidl_msg_t* msg, ::fidl::Transaction* txn) {
bool found = TryDispatch(impl, msg, txn);
if (!found) {
zx_handle_close_many(msg->handles, msg->num_handles);
txn->Close(ZX_ERR_NOT_SUPPORTED);
}
return found;
}
void SysInfo::Interface::GetHypervisorResourceCompleterBase::Reply(int32_t status, ::zx::resource resource) {
constexpr uint32_t _kWriteAllocSize = ::fidl::internal::ClampedMessageSize<GetHypervisorResourceResponse, ::fidl::MessageDirection::kSending>();
FIDL_ALIGNDECL uint8_t _write_bytes[_kWriteAllocSize] = {};
auto& _response = *reinterpret_cast<GetHypervisorResourceResponse*>(_write_bytes);
SysInfo::SetTransactionHeaderFor::GetHypervisorResourceResponse(
::fidl::DecodedMessage<GetHypervisorResourceResponse>(
::fidl::BytePart(reinterpret_cast<uint8_t*>(&_response),
GetHypervisorResourceResponse::PrimarySize,
GetHypervisorResourceResponse::PrimarySize)));
_response.status = std::move(status);
_response.resource = std::move(resource);
::fidl::BytePart _response_bytes(_write_bytes, _kWriteAllocSize, sizeof(GetHypervisorResourceResponse));
CompleterBase::SendReply(::fidl::DecodedMessage<GetHypervisorResourceResponse>(std::move(_response_bytes)));
}
void SysInfo::Interface::GetHypervisorResourceCompleterBase::Reply(::fidl::BytePart _buffer, int32_t status, ::zx::resource resource) {
if (_buffer.capacity() < GetHypervisorResourceResponse::PrimarySize) {
CompleterBase::Close(ZX_ERR_INTERNAL);
return;
}
auto& _response = *reinterpret_cast<GetHypervisorResourceResponse*>(_buffer.data());
SysInfo::SetTransactionHeaderFor::GetHypervisorResourceResponse(
::fidl::DecodedMessage<GetHypervisorResourceResponse>(
::fidl::BytePart(reinterpret_cast<uint8_t*>(&_response),
GetHypervisorResourceResponse::PrimarySize,
GetHypervisorResourceResponse::PrimarySize)));
_response.status = std::move(status);
_response.resource = std::move(resource);
_buffer.set_actual(sizeof(GetHypervisorResourceResponse));
CompleterBase::SendReply(::fidl::DecodedMessage<GetHypervisorResourceResponse>(std::move(_buffer)));
}
void SysInfo::Interface::GetHypervisorResourceCompleterBase::Reply(::fidl::DecodedMessage<GetHypervisorResourceResponse> params) {
SysInfo::SetTransactionHeaderFor::GetHypervisorResourceResponse(params);
CompleterBase::SendReply(std::move(params));
}
void SysInfo::Interface::GetBoardNameCompleterBase::Reply(int32_t status, ::fidl::StringView name) {
constexpr uint32_t _kWriteAllocSize = ::fidl::internal::ClampedMessageSize<GetBoardNameResponse, ::fidl::MessageDirection::kSending>();
FIDL_ALIGNDECL uint8_t _write_bytes[_kWriteAllocSize];
GetBoardNameResponse _response = {};
SysInfo::SetTransactionHeaderFor::GetBoardNameResponse(
::fidl::DecodedMessage<GetBoardNameResponse>(
::fidl::BytePart(reinterpret_cast<uint8_t*>(&_response),
GetBoardNameResponse::PrimarySize,
GetBoardNameResponse::PrimarySize)));
_response.status = std::move(status);
_response.name = std::move(name);
auto _linearize_result = ::fidl::Linearize(&_response, ::fidl::BytePart(_write_bytes,
_kWriteAllocSize));
if (_linearize_result.status != ZX_OK) {
CompleterBase::Close(ZX_ERR_INTERNAL);
return;
}
CompleterBase::SendReply(std::move(_linearize_result.message));
}
void SysInfo::Interface::GetBoardNameCompleterBase::Reply(::fidl::BytePart _buffer, int32_t status, ::fidl::StringView name) {
if (_buffer.capacity() < GetBoardNameResponse::PrimarySize) {
CompleterBase::Close(ZX_ERR_INTERNAL);
return;
}
GetBoardNameResponse _response = {};
SysInfo::SetTransactionHeaderFor::GetBoardNameResponse(
::fidl::DecodedMessage<GetBoardNameResponse>(
::fidl::BytePart(reinterpret_cast<uint8_t*>(&_response),
GetBoardNameResponse::PrimarySize,
GetBoardNameResponse::PrimarySize)));
_response.status = std::move(status);
_response.name = std::move(name);
auto _linearize_result = ::fidl::Linearize(&_response, std::move(_buffer));
if (_linearize_result.status != ZX_OK) {
CompleterBase::Close(ZX_ERR_INTERNAL);
return;
}
CompleterBase::SendReply(std::move(_linearize_result.message));
}
void SysInfo::Interface::GetBoardNameCompleterBase::Reply(::fidl::DecodedMessage<GetBoardNameResponse> params) {
SysInfo::SetTransactionHeaderFor::GetBoardNameResponse(params);
CompleterBase::SendReply(std::move(params));
}
void SysInfo::Interface::GetBoardRevisionCompleterBase::Reply(int32_t status, uint32_t revision) {
constexpr uint32_t _kWriteAllocSize = ::fidl::internal::ClampedMessageSize<GetBoardRevisionResponse, ::fidl::MessageDirection::kSending>();
FIDL_ALIGNDECL uint8_t _write_bytes[_kWriteAllocSize] = {};
auto& _response = *reinterpret_cast<GetBoardRevisionResponse*>(_write_bytes);
SysInfo::SetTransactionHeaderFor::GetBoardRevisionResponse(
::fidl::DecodedMessage<GetBoardRevisionResponse>(
::fidl::BytePart(reinterpret_cast<uint8_t*>(&_response),
GetBoardRevisionResponse::PrimarySize,
GetBoardRevisionResponse::PrimarySize)));
_response.status = std::move(status);
_response.revision = std::move(revision);
::fidl::BytePart _response_bytes(_write_bytes, _kWriteAllocSize, sizeof(GetBoardRevisionResponse));
CompleterBase::SendReply(::fidl::DecodedMessage<GetBoardRevisionResponse>(std::move(_response_bytes)));
}
void SysInfo::Interface::GetBoardRevisionCompleterBase::Reply(::fidl::BytePart _buffer, int32_t status, uint32_t revision) {
if (_buffer.capacity() < GetBoardRevisionResponse::PrimarySize) {
CompleterBase::Close(ZX_ERR_INTERNAL);
return;
}
auto& _response = *reinterpret_cast<GetBoardRevisionResponse*>(_buffer.data());
SysInfo::SetTransactionHeaderFor::GetBoardRevisionResponse(
::fidl::DecodedMessage<GetBoardRevisionResponse>(
::fidl::BytePart(reinterpret_cast<uint8_t*>(&_response),
GetBoardRevisionResponse::PrimarySize,
GetBoardRevisionResponse::PrimarySize)));
_response.status = std::move(status);
_response.revision = std::move(revision);
_buffer.set_actual(sizeof(GetBoardRevisionResponse));
CompleterBase::SendReply(::fidl::DecodedMessage<GetBoardRevisionResponse>(std::move(_buffer)));
}
void SysInfo::Interface::GetBoardRevisionCompleterBase::Reply(::fidl::DecodedMessage<GetBoardRevisionResponse> params) {
SysInfo::SetTransactionHeaderFor::GetBoardRevisionResponse(params);
CompleterBase::SendReply(std::move(params));
}
void SysInfo::Interface::GetInterruptControllerInfoCompleterBase::Reply(int32_t status, ::llcpp::fuchsia::sysinfo::InterruptControllerInfo* info) {
constexpr uint32_t _kWriteAllocSize = ::fidl::internal::ClampedMessageSize<GetInterruptControllerInfoResponse, ::fidl::MessageDirection::kSending>();
FIDL_ALIGNDECL uint8_t _write_bytes[_kWriteAllocSize];
GetInterruptControllerInfoResponse _response = {};
SysInfo::SetTransactionHeaderFor::GetInterruptControllerInfoResponse(
::fidl::DecodedMessage<GetInterruptControllerInfoResponse>(
::fidl::BytePart(reinterpret_cast<uint8_t*>(&_response),
GetInterruptControllerInfoResponse::PrimarySize,
GetInterruptControllerInfoResponse::PrimarySize)));
_response.status = std::move(status);
_response.info = std::move(info);
auto _linearize_result = ::fidl::Linearize(&_response, ::fidl::BytePart(_write_bytes,
_kWriteAllocSize));
if (_linearize_result.status != ZX_OK) {
CompleterBase::Close(ZX_ERR_INTERNAL);
return;
}
CompleterBase::SendReply(std::move(_linearize_result.message));
}
void SysInfo::Interface::GetInterruptControllerInfoCompleterBase::Reply(::fidl::BytePart _buffer, int32_t status, ::llcpp::fuchsia::sysinfo::InterruptControllerInfo* info) {
if (_buffer.capacity() < GetInterruptControllerInfoResponse::PrimarySize) {
CompleterBase::Close(ZX_ERR_INTERNAL);
return;
}
GetInterruptControllerInfoResponse _response = {};
SysInfo::SetTransactionHeaderFor::GetInterruptControllerInfoResponse(
::fidl::DecodedMessage<GetInterruptControllerInfoResponse>(
::fidl::BytePart(reinterpret_cast<uint8_t*>(&_response),
GetInterruptControllerInfoResponse::PrimarySize,
GetInterruptControllerInfoResponse::PrimarySize)));
_response.status = std::move(status);
_response.info = std::move(info);
auto _linearize_result = ::fidl::Linearize(&_response, std::move(_buffer));
if (_linearize_result.status != ZX_OK) {
CompleterBase::Close(ZX_ERR_INTERNAL);
return;
}
CompleterBase::SendReply(std::move(_linearize_result.message));
}
void SysInfo::Interface::GetInterruptControllerInfoCompleterBase::Reply(::fidl::DecodedMessage<GetInterruptControllerInfoResponse> params) {
SysInfo::SetTransactionHeaderFor::GetInterruptControllerInfoResponse(params);
CompleterBase::SendReply(std::move(params));
}
void SysInfo::SetTransactionHeaderFor::GetHypervisorResourceRequest(const ::fidl::DecodedMessage<SysInfo::GetHypervisorResourceRequest>& _msg) {
fidl_init_txn_header(&_msg.message()->_hdr, 0, kSysInfo_GetHypervisorResource_GenOrdinal);
_msg.message()->_hdr.flags[0] |= FIDL_TXN_HEADER_UNION_FROM_XUNION_FLAG;
}
void SysInfo::SetTransactionHeaderFor::GetHypervisorResourceResponse(const ::fidl::DecodedMessage<SysInfo::GetHypervisorResourceResponse>& _msg) {
fidl_init_txn_header(&_msg.message()->_hdr, 0, kSysInfo_GetHypervisorResource_GenOrdinal);
_msg.message()->_hdr.flags[0] |= FIDL_TXN_HEADER_UNION_FROM_XUNION_FLAG;
}
void SysInfo::SetTransactionHeaderFor::GetBoardNameRequest(const ::fidl::DecodedMessage<SysInfo::GetBoardNameRequest>& _msg) {
fidl_init_txn_header(&_msg.message()->_hdr, 0, kSysInfo_GetBoardName_GenOrdinal);
_msg.message()->_hdr.flags[0] |= FIDL_TXN_HEADER_UNION_FROM_XUNION_FLAG;
}
void SysInfo::SetTransactionHeaderFor::GetBoardNameResponse(const ::fidl::DecodedMessage<SysInfo::GetBoardNameResponse>& _msg) {
fidl_init_txn_header(&_msg.message()->_hdr, 0, kSysInfo_GetBoardName_GenOrdinal);
_msg.message()->_hdr.flags[0] |= FIDL_TXN_HEADER_UNION_FROM_XUNION_FLAG;
}
void SysInfo::SetTransactionHeaderFor::GetBoardRevisionRequest(const ::fidl::DecodedMessage<SysInfo::GetBoardRevisionRequest>& _msg) {
fidl_init_txn_header(&_msg.message()->_hdr, 0, kSysInfo_GetBoardRevision_GenOrdinal);
_msg.message()->_hdr.flags[0] |= FIDL_TXN_HEADER_UNION_FROM_XUNION_FLAG;
}
void SysInfo::SetTransactionHeaderFor::GetBoardRevisionResponse(const ::fidl::DecodedMessage<SysInfo::GetBoardRevisionResponse>& _msg) {
fidl_init_txn_header(&_msg.message()->_hdr, 0, kSysInfo_GetBoardRevision_GenOrdinal);
_msg.message()->_hdr.flags[0] |= FIDL_TXN_HEADER_UNION_FROM_XUNION_FLAG;
}
void SysInfo::SetTransactionHeaderFor::GetInterruptControllerInfoRequest(const ::fidl::DecodedMessage<SysInfo::GetInterruptControllerInfoRequest>& _msg) {
fidl_init_txn_header(&_msg.message()->_hdr, 0, kSysInfo_GetInterruptControllerInfo_GenOrdinal);
_msg.message()->_hdr.flags[0] |= FIDL_TXN_HEADER_UNION_FROM_XUNION_FLAG;
}
void SysInfo::SetTransactionHeaderFor::GetInterruptControllerInfoResponse(const ::fidl::DecodedMessage<SysInfo::GetInterruptControllerInfoResponse>& _msg) {
fidl_init_txn_header(&_msg.message()->_hdr, 0, kSysInfo_GetInterruptControllerInfo_GenOrdinal);
_msg.message()->_hdr.flags[0] |= FIDL_TXN_HEADER_UNION_FROM_XUNION_FLAG;
}
} // namespace sysinfo
} // namespace fuchsia
} // namespace llcpp