NanoOcp
Minimal AES70 / OCP.1 TCP client/server library for d&b Soundscape devices
Loading...
Searching...
No Matches
NanoOcp1::Ocp1Response Class Reference

#include <Ocp1Message.h>

+ Inheritance diagram for NanoOcp1::Ocp1Response:
+ Collaboration diagram for NanoOcp1::Ocp1Response:

Public Member Functions

 Ocp1Response (std::uint32_t handle, std::uint8_t status, std::uint8_t paramCount, const ByteVector &parameterData)
 
 ~Ocp1Response () override=default
 
std::uint32_t GetResponseHandle () const
 
std::uint8_t GetResponseStatus () const
 
std::uint8_t GetParamCount () const
 
ByteVector GetSerializedData () override
 
- Public Member Functions inherited from NanoOcp1::Ocp1Message
 Ocp1Message (std::uint8_t msgType, const ByteVector &parameterData)
 
virtual ~Ocp1Message ()=default
 
std::uint8_t GetMessageType () const
 
ByteVector GetParameterData () const
 

Protected Attributes

std::uint32_t m_handle
 
std::uint8_t m_status
 
std::uint8_t m_paramCount
 
- Protected Attributes inherited from NanoOcp1::Ocp1Message
Ocp1Header m_header
 
ByteVector m_parameterData
 

Additional Inherited Members

- Public Types inherited from NanoOcp1::Ocp1Message
enum  MessageType {
  Command = 0 ,
  CommandResponseRequired = 1 ,
  Notification = 2 ,
  Response = 3 ,
  KeepAlive = 4
}
 OCP.1 message type codes as defined in AES70. More...
 
- Static Public Member Functions inherited from NanoOcp1::Ocp1Message
static std::unique_ptr< Ocp1MessageUnmarshalOcp1Message (const ByteVector &receivedData)
 
- Static Protected Attributes inherited from NanoOcp1::Ocp1Message
static std::uint32_t m_nextHandle = 2
 

Detailed Description

Representation of an Oca Response message.

Definition at line 490 of file Ocp1Message.h.

Constructor & Destructor Documentation

◆ Ocp1Response()

NanoOcp1::Ocp1Response::Ocp1Response ( std::uint32_t  handle,
std::uint8_t  status,
std::uint8_t  paramCount,
const ByteVector parameterData 
)
inline

Class constructor.

Definition at line 496 of file Ocp1Message.h.

◆ ~Ocp1Response()

NanoOcp1::Ocp1Response::~Ocp1Response ( )
overridedefault

Class destructor.

Member Function Documentation

◆ GetParamCount()

std::uint8_t NanoOcp1::Ocp1Response::GetParamCount ( ) const
inline

Gets the number of parameters contained in this response. Status doesn't count as a parameter.

Returns
Number of parameters contained in this response.

Definition at line 537 of file Ocp1Message.h.

References m_paramCount.

Referenced by NanoOcp1Demo::MainComponent::OnOcp1MessageReceived().

◆ GetResponseHandle()

std::uint32_t NanoOcp1::Ocp1Response::GetResponseHandle ( ) const
inline

Gets the handle of the OCA response.

Returns
Handle of OCA response.

Definition at line 517 of file Ocp1Message.h.

References m_handle.

Referenced by NanoOcp1Demo::MainComponent::OnOcp1MessageReceived().

◆ GetResponseStatus()

std::uint8_t NanoOcp1::Ocp1Response::GetResponseStatus ( ) const
inline

Gets the status of the OCA response. Use StatusToString for its string representation.

Returns
Status of the OCA response.

Definition at line 527 of file Ocp1Message.h.

References m_status.

Referenced by NanoOcp1Demo::MainComponent::OnOcp1MessageReceived().

◆ GetSerializedData()

ByteVector NanoOcp1::Ocp1Response::GetSerializedData ( )
overridevirtual

Returns a vector of bytes representing the binary contents of the complete message. Must be reimplemented for each message type.

Returns
A vector containing the OCA message including header.

Implements NanoOcp1::Ocp1Message.

Definition at line 380 of file Ocp1Message.cpp.

References NanoOcp1::Ocp1Header::GetMessageSize(), NanoOcp1::Ocp1Header::GetSerializedData(), m_handle, NanoOcp1::Ocp1Message::m_header, m_paramCount, NanoOcp1::Ocp1Message::m_parameterData, and m_status.

Member Data Documentation

◆ m_handle

std::uint32_t NanoOcp1::Ocp1Response::m_handle
protected

Handle of the response. Should match the handle of a previously sent command.

Definition at line 550 of file Ocp1Message.h.

Referenced by GetResponseHandle(), and GetSerializedData().

◆ m_paramCount

std::uint8_t NanoOcp1::Ocp1Response::m_paramCount
protected

Number of parameters contained in this response. Status doesn't count as a parameter.

Definition at line 560 of file Ocp1Message.h.

Referenced by GetParamCount(), and GetSerializedData().

◆ m_status

std::uint8_t NanoOcp1::Ocp1Response::m_status
protected

Indicates whether the previously sent command was successful.

Definition at line 555 of file Ocp1Message.h.

Referenced by GetResponseStatus(), and GetSerializedData().


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