NanoOcp
Minimal AES70 / OCP.1 TCP client/server library for d&b Soundscape devices
Loading...
Searching...
No Matches
Ocp1ObjectDefinitions.h
Go to the documentation of this file.
1/* Copyright (c) 2023, Bernardo Escalona
2 *
3 * This file is part of NanoOcp <https://github.com/ChristianAhrens/NanoOcp>
4 *
5 * This library is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License version 3.0 as published
7 * by the Free Software Foundation.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#pragma once
20
21
22#include "Ocp1Message.h"
23#include "Ocp1DataTypes.h"
24
25
26namespace NanoOcp1
27{
28
38typedef std::uint32_t BoxAndObjNo;
39
54static constexpr int DefLevel_OcaRoot = 1;
55static constexpr int DefLevel_OcaAgent = 1 + DefLevel_OcaRoot;
56static constexpr int DefLevel_OcaWorker = 1 + DefLevel_OcaRoot;
57static constexpr int DefLevel_OcaActuator = 1 + DefLevel_OcaWorker;
58static constexpr int DefLevel_OcaPolarity = 1 + DefLevel_OcaActuator;
59static constexpr int DefLevel_OcaSwitch = 1 + DefLevel_OcaActuator;
60static constexpr int DefLevel_OcaGain = 1 + DefLevel_OcaActuator;
61static constexpr int DefLevel_OcaMute = 1 + DefLevel_OcaActuator;
62static constexpr int DefLevel_OcaDelay = 1 + DefLevel_OcaActuator;
67static constexpr int DefLevel_OcaSensor = 1 + DefLevel_OcaWorker;
74
90//==============================================================================
91namespace AmpGeneric
92{
93
94static constexpr BoxAndObjNo Config_Mute = 0x205;
95static constexpr BoxAndObjNo Config_PotiLevel = 0x206;
96
101{
102 dbOcaObjectDef_Config_PotiLevel(std::uint32_t channel)
103 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, Config_PotiLevel), // ONO of Config_PotiLevel
104 OCP1DATATYPE_FLOAT32, // Value type
106 1) // Prop_Gain
107 {
108 }
109};
110
116{
117 dbOcaObjectDef_Config_Mute(std::uint32_t channel)
118 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, Config_Mute), // ONO of Config_Mute
119 OCP1DATATYPE_UINT8, // Value type
121 1) // Prop_Setting
122 {
123 }
124};
125}
126
127
128//==============================================================================
129// Dx and Dy amplifiers
130//==============================================================================
131namespace AmpDxDy
132{
133
134static constexpr BoxAndObjNo Settings_PwrOn = 0x100;
135static constexpr BoxAndObjNo ChStatus_Isp = 0x400;
136static constexpr BoxAndObjNo ChStatus_Gr = 0x401;
137static constexpr BoxAndObjNo ChStatus_Ovl = 0x402;
138
144{
146 : Ocp1CommandDefinition(GetONo(0x01, 0x00, 0x00, Settings_PwrOn), // ONO of Settings_PwrOn
147 OCP1DATATYPE_UINT16, // Value type
149 1) // Prop_Setting
150 {
151 }
152};
153
158{
159 dbOcaObjectDef_ChStatus_Isp(std::uint32_t channel)
160 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_Isp), // ONO of ChStatus_Isp
161 OCP1DATATYPE_BOOLEAN, // Value type
163 1) // Prop_Reading
164 {
165 }
166};
167
172{
173 dbOcaObjectDef_ChStatus_Gr(std::uint32_t channel)
174 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_Gr), // ONO of ChStatus_Gr
175 OCP1DATATYPE_BOOLEAN, // Value type
177 1) // Prop_Reading
178 {
179 }
180};
181
186{
187 dbOcaObjectDef_ChStatus_Ovl(std::uint32_t channel)
188 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_Ovl), // ONO of ChStatus_Ovl
189 OCP1DATATYPE_BOOLEAN, // Value type
191 1) // Prop_Reading
192 {
193 }
194};
195
196}
197
198
199//==============================================================================
200// Dx amplifier
201//==============================================================================
202namespace AmpDx // NOTE: namespaces starting with numbers cause problems
203{
204
205static constexpr BoxAndObjNo ChStatus_GrHead = 0x40c;
206
211{
212 dbOcaObjectDef_ChStatus_GrHead(std::uint32_t channel)
213 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_GrHead), // ONO of ChStatus_GrHead
214 OCP1DATATYPE_FLOAT32, // Value type
216 1) // Prop_Reading ?
217 {
218 }
219};
220
221}
222
223
224//==============================================================================
225// Dy amplifier
226//==============================================================================
227namespace AmpDy // NOTE: namespaces starting with numbers cause problems
228{
229
230static constexpr BoxAndObjNo ChStatus_GrHead = 0x40a;
231
236{
237 dbOcaObjectDef_ChStatus_GrHead(std::uint32_t channel)
238 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_GrHead), // ONO of ChStatus_GrHead
239 OCP1DATATYPE_FLOAT32, // Value type
241 1) // Prop_Reading ?
242 {
243 }
244};
245
246}
247
248
249//==============================================================================
250// 5D amplifier
251//==============================================================================
252namespace Amp5D // NOTE: namespaces starting with numbers cause problems
253{
254
255static constexpr BoxAndObjNo Settings_PwrOn = 0x101;
256static constexpr BoxAndObjNo ChStatus_Isp = 0x401;
257static constexpr BoxAndObjNo ChStatus_Gr = 0x402;
258static constexpr BoxAndObjNo ChStatus_Ovl = 0x403;
259static constexpr BoxAndObjNo ChStatus_GrHead = 0x404;
260
266{
268 : Ocp1CommandDefinition(GetONo(0x01, 0x00, 0x00, Settings_PwrOn), // ONO of Settings_PwrOn
269 OCP1DATATYPE_UINT16, // Value type
271 1) // Prop_Setting
272 {
273 }
274};
275
280{
281 dbOcaObjectDef_ChStatus_Isp(std::uint32_t channel)
282 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_Isp), // ONO of ChStatus_Isp
283 OCP1DATATYPE_BOOLEAN, // Value type
285 1) // Prop_Reading
286 {
287 }
288};
289
294{
295 dbOcaObjectDef_ChStatus_Gr(std::uint32_t channel)
296 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_Gr), // ONO of ChStatus_Gr
297 OCP1DATATYPE_BOOLEAN, // Value type
299 1) // Prop_Reading
300 {
301 }
302};
303
308{
309 dbOcaObjectDef_ChStatus_Ovl(std::uint32_t channel)
310 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_Ovl), // ONO of ChStatus_Ovl
311 OCP1DATATYPE_BOOLEAN, // Value type
313 1) // Prop_Reading
314 {
315 }
316};
317
322{
323 dbOcaObjectDef_ChStatus_GrHead(std::uint32_t channel)
324 : Ocp1CommandDefinition(GetONo(0x01, 0x00, channel, ChStatus_GrHead), // ONO of ChStatus_GrHead
325 OCP1DATATYPE_FLOAT32, // Value type
327 1) // Prop_Reading ?
328 {
329 }
330};
331
332}
333
334}
static constexpr BoxAndObjNo Settings_PwrOn
static constexpr BoxAndObjNo ChStatus_Gr
static constexpr BoxAndObjNo ChStatus_Ovl
static constexpr BoxAndObjNo ChStatus_GrHead
static constexpr BoxAndObjNo ChStatus_Isp
static constexpr BoxAndObjNo ChStatus_Isp
static constexpr BoxAndObjNo ChStatus_Ovl
static constexpr BoxAndObjNo ChStatus_Gr
static constexpr BoxAndObjNo Settings_PwrOn
static constexpr BoxAndObjNo ChStatus_GrHead
static constexpr BoxAndObjNo ChStatus_GrHead
static constexpr BoxAndObjNo Config_PotiLevel
static constexpr BoxAndObjNo Config_Mute
Minimal AES70 / OCP.1 TCP client/server library built on JUCE.
Definition NanoOcp1.cpp:23
static constexpr int DefLevel_OcaDelay
static constexpr int DefLevel_OcaWorker
static constexpr int DefLevel_OcaPolarity
std::uint32_t GetONo(std::uint32_t type, std::uint32_t record, std::uint32_t channel, std::uint32_t boxAndObjectNumber)
static constexpr int DefLevel_OcaBasicActuator
static constexpr int DefLevel_OcaRoot
@ OCP1DATATYPE_BOOLEAN
Single byte: 0 = false, non-zero = true.
@ OCP1DATATYPE_UINT16
Unsigned 16-bit integer, big-endian.
@ OCP1DATATYPE_FLOAT32
IEEE 754 single-precision float, big-endian (4 bytes).
@ OCP1DATATYPE_UINT8
Unsigned 8-bit integer.
static constexpr int DefLevel_OcaAgent
static constexpr int DefLevel_OcaBasicSensor
static constexpr int DefLevel_OcaInt32Actuator
std::uint32_t BoxAndObjNo
Shorthand for the combined box-and-object-number part of an ONo.
static constexpr int DefLevel_OcaActuator
static constexpr int DefLevel_OcaFloat32Actuator
static constexpr int DefLevel_OcaStringSensor
static constexpr int DefLevel_OcaGain
static constexpr int DefLevel_OcaAudioLevelSensor
static constexpr int DefLevel_OcaBooleanSensor
static constexpr int DefLevel_dbOcaDataTransfer
d&b data-transfer agent (DS100 scene control).
static constexpr int DefLevel_dbOcaSceneAgent
DS100 scene agent, extends dbOcaDataTransfer.
static constexpr int DefLevel_dbOcaSpeakerPositionAgentDeprecated
Deprecated d&b speaker-position agent.
static constexpr int DefLevel_OcaMute
static constexpr int DefLevel_OcaInt32Sensor
static constexpr int DefLevel_OcaSensor
static constexpr int DefLevel_OcaStringActuator
static constexpr int DefLevel_dbOcaPositionAgentDeprecated
Deprecated d&b 3D position agent (pre-firmware DB000CD0).
static constexpr int DefLevel_OcaLevelSensor
static constexpr int DefLevel_OcaSwitch
Parameter bundle that fully describes one OCA controllable property.
Definition Ocp1Message.h:72