Programming Datatypes
OcaEnumItem
OcaBitSet16
-
using OcaBitSet16 = OcaUint16
OcaBitSet16 shall define a 16-bit integer that represents a set of 16 bits. Each bit shall be represented by one binary digit of a 16-bit number. In this standard, each bit of a bitset is defined by a static constant attribute with the value of its 16-bit integer representation. For example, consider a bitset datatype MyColor that represents three colors Red, Green, and Blue. Its static attributes would be defined as follows: MyColor Red value=1 MyColor Green value=2 MyColor Blue value=4
OcaEnumItem16
OcaID16
OcaID32
OcaJsonValue
OcaParameterRecord
-
using OcaParameterRecord = OcaJsonValue
A parameter record. JSON object that represents a parameter data set defined by an external (i.e. non-OCA) protocol. Instructions for use are in [AES70-2(Parameter Records)].
OcaAdaptationIdentifier
OcaUUID
OcaMimeType
OcaParameterMask
-
using OcaParameterMask = OcaBitSet16
Bitset to indicate which method parameters contain valid data. The position of a bit in the bitset shall correspond to the ordinal position of the respective parameter of the method in question.
OcaStringComparisonType
-
enum OcaStringComparisonType : uint8_t
Type of string comparison.
-
enumerator Exact = 0
Exact comparison, Case-sensitive.
-
enumerator Substring = 1
Match all strings whose initial substrings equal the given key. Case-sensitive.
-
enumerator Contains = 2
Match all strings that contain the given key. Case-sensitive.
-
enumerator ExactCaseInsensitive = 3
Exact comparison. Case-insensitive.
-
enumerator SubstringCaseInsensitive = 4
Match all strings whose initial substrings equal the given key. Case-insensitive.
-
enumerator ContainsCaseInsensitive = 5
Match all strings that contain the given key. Case-insensitive.
-
enumerator Exact = 0
OcaRelationalOperator
-
enum OcaRelationalOperator : uint8_t
Enumeration of relational operators that can be used in OCA classes.
-
enumerator None = 0
-
enumerator Equality = 1
The equality (==) operator.
-
enumerator Inequality = 2
The inequality (!=) operator.
-
enumerator GreaterThan = 3
The greater than
(>)
operator.
-
enumerator GreaterThanOrEqual = 4
The greater than or equal
(>=)
operator.
-
enumerator LessThan = 5
The less than
(<)
operator
-
enumerator LessThanOrEqual = 6
The less than or equal
(<=)
operator.
-
enumerator None = 0
OcaInterval
-
template<typename DT>
struct OcaInterval<DT> Template datatype that expresses a range of values according to the mathematical definition of “interval”. An interval consists of one or two values called “bounds”.
An interval with two bounds (an upper and a lower) is called “bounded”.
An interval with only one bound is called “half-bounded”.
A bound may be “inclusive” or “exclusive”.
An inclusive bound includes its value in the interval.
An exclusive bound excludes its value from the interval.
Inclusive bounds are usually indicated by “[ ]” delimiters, exclusive bounds by “( )” or “][“.
For example:
[5,10] includes all values V such that 5
<=
V<=
10.(5,10) includes all values V such that 5
<
V<
10.[5,10) includes all values V such that 5
<=
V<
10.(5,10] includes all values V such that 5
<
V<=
10.
Here are some half-bounded intervals:
[5,) and [5,] mean all values V such that 5
<=
V.(5,) and (5,] mean all values V such that 5
<
V.(,10] and [,10] mean all values V such that V
<=
10.(,10) and [,10) mean all values V such that V
<
10.
When a datatype (e.g. OcaFloat32, OcaFloat64) has a value (”inf” below) to represent Infinity, it may be used as a bound. For example:
[1.0, inf) means all values V such that 1.0
<=
V and V<
inf[1.0,** inf**] means all values V such that 1.0
<=
V(-inf, 1.0] means all values V such that V
<=
1.0 and V>
-inf[-inf, 1.0] means all values V such that V
<=
1.0
… and so on. The usual term “range” means an inclusive, bounded interval, e.g. “the range from 3 to 12” means [3,12]. The property .Bounds is a bitset that specifies which bounds are given and whether the given bounds are inclusive or exclusive. OcaInterval is a template datatype, where the template variable is the datatype of the bounds. Thus, may be defined for integers, floats, and even strings.
OcaIntervalBounds
-
using OcaIntervalBounds = OcaBitSet16
Bitset describing which bounds of an OcaInterval have been specified, and whether each specified bound is inclusive or exclusive. Bitset values have the following meanings: MinOmitted: 0 if Min is specified, 1 if omitted MaxOmitted: 0 if Max is specified, 1 if omitted MinInclusive: 0 if Min is an exclusive bound, 1 if inclusive MaxInclusive: 0 if Max is an exclusive bound, 1 if inclusive Thus , for OcaInterval = {Min, Max, Bounds}, and where a means any bit value - 1 or 0 x means any number Q designates the quantity under test: {x,x,0b0000} = empty interval {x,x,0baa11} = whole number line {10,40,0b0000} = 10
<
Q<
40 {10,40,0b1100} = 10<=
Q<=
40 {10,x,0ba110} = 10<=
Q {10,x,0ba010} = 10<
Q
OcaTypedBlob
-
struct OcaTypedBlob
OcaBlob with ancillary field that shall specify the MIME type of the OcaBlob’s content.
-
OcaMimeType ContentType
MIME type of the content of the Content field.
-
OcaMimeType ContentType