/* * Handle a E1.33 Status PDU. */ bool E133StatusInflator::HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len) { unsigned int size = std::min( pdu_len, static_cast<unsigned int>(ola::e133::MAX_E133_STATUS_STRING_SIZE)); string description(reinterpret_cast<const char*>(&data[0]), size); m_handler->Run(&headers.GetTransportHeader(), &headers.GetE133Header(), static_cast<uint16_t>(vector), description); return true; }
/* * Handle a DMP PDU for E1.33. */ bool RDMInflator::HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len) { if (vector != VECTOR_RDMNET_DATA) { OLA_INFO << "Not a RDM message, vector was " << vector; return true; } string rdm_message(reinterpret_cast<const char*>(&data[0]), pdu_len); E133Header e133_header = headers.GetE133Header(); if (m_rdm_handler.get()) { m_rdm_handler->Run(&headers.GetTransportHeader(), &e133_header, rdm_message); } else { OLA_WARN << "No RDM handler defined!"; } return true; }
/** * This runs the on_data callback if we have one */ bool RootInflator::PostHeader(uint32_t, const HeaderSet &headers) { if (m_on_data.get()) m_on_data->Run(headers.GetTransportHeader()); return true; }