VirtualBox

source: vbox/trunk/src/VBox/Devices/Audio/AudioTestServiceProtocol.cpp@ 89180

Last change on this file since 89180 was 89180, checked in by vboxsync, 3 years ago

Audio/ValKit: Started working on the audio test execution service (ATS) [SCM fixes]. bugref:10008

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: AudioTestServiceProtocol.cpp 89180 2021-05-19 15:46:15Z vboxsync $ */
2/** @file
3 * AudioTestService - Audio test execution server, Protocol helpers.
4 */
5
6/*
7 * Copyright (C) 2021 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*********************************************************************************************************************************
20* Header Files *
21*********************************************************************************************************************************/
22#define LOG_GROUP RTLOGGROUP_DEFAULT
23#include <iprt/asm.h>
24#include <iprt/cdefs.h>
25
26#include "AudioTestServiceProtocol.h"
27
28
29
30/**
31 * Converts a ATS packet header from host to network byte order.
32 *
33 * @returns nothing.
34 * @param pPktHdr The packet header to convert.
35 */
36DECLINLINE(void) atsProtocolPktHdrH2N(PATSPKTHDR pPktHdr)
37{
38 pPktHdr->cb = RT_H2N_U32(pPktHdr->cb);
39 pPktHdr->uCrc32 = RT_H2N_U32(pPktHdr->uCrc32);
40}
41
42
43#if 0 /* Unused */
44/**
45 * Converts a ATS packet header from network to host byte order.
46 *
47 * @returns nothing.
48 * @param pPktHdr The packet header to convert.
49 */
50DECLINLINE(void) atsProtocolPktHdrN2H(PATSPKTHDR pPktHdr)
51{
52 pPktHdr->cb = RT_N2H_U32(pPktHdr->cb);
53 pPktHdr->uCrc32 = RT_N2H_U32(pPktHdr->uCrc32);
54}
55
56
57/**
58 * Converts a ATS status header from host to network byte order.
59 *
60 * @returns nothing.
61 * @param pPktHdr The packet header to convert.
62 */
63DECLINLINE(void) atsProtocolStsHdrH2N(PATSPKTSTS pPktHdr)
64{
65 atsProtocolPktHdrH2N(&pPktHdr->Hdr);
66 pPktHdr->rcReq = RT_H2N_U32(pPktHdr->rcReq);
67 pPktHdr->cchStsMsg = RT_H2N_U32(pPktHdr->cchStsMsg);
68}
69
70
71/**
72 * Converts a ATS status header from network to host byte order.
73 *
74 * @returns nothing.
75 * @param pPktHdr The packet header to convert.
76 */
77DECLINLINE(void) atsProtocolStsHdrN2H(PATSPKTSTS pPktHdr)
78{
79 atsProtocolPktHdrN2H(&pPktHdr->Hdr);
80 pPktHdr->rcReq = RT_N2H_U32(pPktHdr->rcReq);
81 pPktHdr->cchStsMsg = RT_N2H_U32(pPktHdr->cchStsMsg);
82}
83#endif
84
85
86DECLHIDDEN(void) atsProtocolReqH2N(PATSPKTHDR pPktHdr)
87{
88 atsProtocolPktHdrH2N(pPktHdr);
89}
90
91
92DECLHIDDEN(void) atsProtocolReqN2H(PATSPKTHDR pPktHdr)
93{
94 RT_NOREF1(pPktHdr);
95}
96
97
98DECLHIDDEN(void) atsProtocolRepH2N(PATSPKTSTS pPktHdr)
99{
100 RT_NOREF1(pPktHdr);
101}
102
103
104DECLHIDDEN(void) atsProtocolRepN2H(PATSPKTSTS pPktHdr)
105{
106 RT_NOREF1(pPktHdr);
107}
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use