RDK Documentation (Open Sourced RDK Components)
DataBlock.hpp
1
/*
2
* If not stated otherwise in this file or this component's Licenses.txt file the
3
* following copyright and licenses apply:
4
*
5
* Copyright 2016 RDK Management
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*/
19
20
21
/**
22
* @defgroup hdmicec
23
* @{
24
* @defgroup ccec
25
* @{
26
**/
27
28
29
#ifndef HDMI_CCEC_DATABLOCK_HPP_
30
#define HDMI_CCEC_DATABLOCK_HPP_
31
32
#include <iostream>
33
34
#include "CCEC.hpp"
35
#include "ccec/CECFrame.hpp"
36
#include "Assert.hpp"
37
#include "ccec/Util.hpp"
38
39
CCEC_BEGIN_NAMESPACE
40
41
typedef
uint32_t Op_t;
42
43
extern
"C"
const
char
*GetOpName(Op_t);
44
45
class
DataBlock
46
{
47
public
:
48
/* Base is empty block */
49
virtual
std::string toString(
void
)
const
{
return
"[No Operands]"
;}
50
virtual
void
print(
void
)
const
{
51
CCEC_LOG
( LOG_DEBUG,
"%s : %s \n"
,GetOpName(opCode()),toString().c_str());
52
}
53
virtual
CECFrame
&serialize(
CECFrame
&frame)
const
{
54
/* Default: Empty Datablock */
55
return
frame;
56
};
57
virtual
Op_t opCode(
void
)
const
= 0;
58
};
59
60
CCEC_END_NAMESPACE;
61
62
63
#endif
64
65
66
/** @} */
67
/** @} */
CECFrame
Definition:
CECFrame.hpp:40
CCEC_LOG
void CCEC_LOG(int level, const char *format ...)
This function is used to gets the logs depending on the level of log and print these to standard outp...
Definition:
Util.cpp:120
DataBlock
Definition:
DataBlock.hpp:45
components
generic
hdmicec
ccec
include
ccec
DataBlock.hpp
Generated on Thu Feb 9 2023 06:32:30 for RDK Documentation (Open Sourced RDK Components) by
1.8.17