summaryrefslogtreecommitdiff
path: root/PluginCommandInterfaceCAPI/fidl/CommandInterface.fidl
blob: 8f1a2206260f4225c043c7b7a271ed2972931014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
package org.genivi.audiomanager

import org.genivi.audiomanager.am.* from "amTypes.fidl"

<**
	@author :		J�rgen Gehring 

	@description :	CommandInterface AudioManager.

	@details : Source D-Bus specification org.genivi.audiomanager.CommandInterface

**>

interface CommandInterface {
	version {
		major 0
		minor 1
	}
	method Connect {
		in {
			am_sourceID_t sourceID
			am_sinkID_t sinkID
		}
		out {
			am_Error_e result
			am_mainConnectionID_t mainConnectionID
		}
	}
	method Disconnect {
		in {
			am_mainConnectionID_t mainConnectionID
		}
		out {
			am_Error_e result
		}
	}
	method SetVolume {
		in {
			am_sinkID_t sinkID
			am_mainVolume_t volume
		}
		out {
			am_Error_e result
		}
	}
	method VolumeStep {
		in {
			am_sinkID_t sinkID
			am_mainVolume_t volumeStep
		}
		out {
			am_Error_e result
		}
	}
	method SetSinkMuteState {
		in {
			am_sinkID_t sinkID
			am_MuteState_e muteState
		}
		out {
			am_Error_e result
		}
	}
	method SetMainSinkSoundProperty {
		in {
			am_sinkID_t sinkID
			am_MainSoundProperty_s soundProperty
		}
		out {
			am_Error_e result
		}
	}
	method SetMainSourceSoundProperty {
		in {
			am_sourceID_t sourceID
			am_MainSoundProperty_s soundProperty
		}
		out {
			am_Error_e result
		}
	}
	method SetSystemProperty {
		in {
			am_SystemProperty_s soundProperty
		}
		out {
			am_Error_e result
		}
	}
	method GetListMainConnections {
		out {
			am_Error_e result
			am_MainConnectionType_l listConnections
		}
	}
	method GetListMainSinks {
		out {
			am_Error_e result
			am_SinkType_l listMainSinks
		}
	}
	method GetListMainSources {
		out {
			am_Error_e result
			am_SourceType_l listMainSources
		}
	}
	method GetListMainSinkSoundProperties {
		in {
			am_sinkID_t sinkID
		}
		out {
			am_Error_e result
			am_MainSoundProperty_l listSoundProperties
		}
	}
	method GetListMainSourceSoundProperties {
		in {
			am_sourceID_t sourceID
		}
		out {
			am_Error_e result
			am_MainSoundProperty_l listSourceProperties
		}
	}
	method GetListSourceClasses {
		out {
			am_Error_e result
			am_SourceClass_l listSourceClasses
		}
	}
	method GetListSinkClasses {
		out {
			am_Error_e result
			am_SinkClass_l listSinkClasses
		}
	}
	method GetListSystemProperties {
		out {
			am_Error_e result
			am_SystemProperty_l listSystemProperties
		}
	}
	method GetTimingInformation {
		in {
			am_mainConnectionID_t mainConnectionID
		}
		out {
			am_Error_e result
			am_timeSync_t delay
		}
	}
	broadcast NumberOfMainConnectionsChanged {
	}
	broadcast MainConnectionStateChanged {
		out {
			am_mainConnectionID_t connectionID
			am_ConnectionState_e connectionState
		}
	}
	broadcast NumberOfSourceClassesChanged {
	}
	broadcast SourceAdded {
		out {
			am_SourceType_s newSource
		}
	}
	broadcast SourceRemoved {
		out {
			am_sourceID_t removedSourceID
		}
	}
	broadcast MainSourceSoundPropertyChanged {
		out {
			am_sourceID_t sourceID
			am_MainSoundProperty_s SoundProperty
		}
	}
	broadcast SourceAvailabilityChanged {
		out {
			am_sourceID_t sourceID
			am_Availability_s availability
		}
	}
	broadcast NumberOfSinkClassesChanged {
	}
	broadcast SinkAdded {
		out {
			am_SinkType_s newSink
		}
	}
	broadcast SinkRemoved {
		out {
			am_sinkID_t removedSinkID
		}
	}
	broadcast MainSinkSoundPropertyChanged {
		out {
			am_sinkID_t sinkID
			am_MainSoundProperty_s SoundProperty
		}
	}
	broadcast SinkAvailabilityChanged {
		out {
			am_sinkID_t sinkID
			am_Availability_s availability
		}
	}
	broadcast VolumeChanged {
		out {
			am_sinkID_t sinkID
			am_mainVolume_t volume
		}
	}
	broadcast SinkMuteStateChanged {
		out {
			am_sinkID_t sinkID
			am_MuteState_e muteState
		}
	}
	broadcast SystemPropertyChanged {
		out {
			am_SystemProperty_s SystemProperty
		}
	}
	broadcast TimingInformationChanged {
		out {
			am_mainConnectionID_t mainConnection
			am_timeSync_t time
		}
	}
	
	broadcast SinkUpdated{
		out{
			am_sinkID_t sinkID
			am_sinkClass_t sinkClassID
			am_MainSoundProperty_l listMainSoundProperties
		}
	}
	
	broadcast SourceUpdated{
		out{
			am_sourceID_t sourceID
			am_sourceClass_t sourceClassID
			am_MainSoundProperty_l listMainSoundProperties
		}
	}
	
	broadcast SinkNotification{
		out{
			am_sinkID_t sinkID
			am_NotificationPayload_s notification
		}
	}
	
	broadcast SourceNotification{
		out{
			am_sourceID_t sourceID
			am_NotificationPayload_s notification
		}
	}
	
	broadcast MainSinkNotificationConfigurationChanged{
		out{
			am_sinkID_t sinkID
			am_NotificationConfiguration_s mainNotificationConfiguration
		}
	}
	
	broadcast MainSourceNotificationConfigurationChanged{
		out{
			am_sourceID_t sourceID
			am_NotificationConfiguration_s mainNotificationConfiguration
		}
	}
	
	typedef am_sourceID_t is UInt16

	typedef am_sinkID_t is UInt16

	typedef am_mainConnectionID_t is UInt16

	typedef am_timeSync_t is Int16

	typedef am_mainVolume_t is Int16

	typedef am_sourceClass_t is UInt16

	typedef am_sinkClass_t is UInt16

	<**
		@description : The errors of the audiomanager. All possible errors are in here. This enum is used widely as return parameter. 
	**>
	enumeration am_Error_e {

		//E_UNKNOWN = "0x00"

		<**
			@description : no error - positive reply 
		**>
		E_OK = "0x00"

		<**
			@description : value out of range 
		**>
		E_OUT_OF_RANGE = "0x01"

		<**
			@description : not used 
		**>
		E_NOT_USED = "0x02"

		<**
			@description : a database error occurred 
		**>
		E_DATABASE_ERROR = "0x03"

		<**
			@description : the desired object already exists 
		**>
		E_ALREADY_EXISTS = "0x04"

		<**
			@description : there is no change 
		**>
		E_NO_CHANGE = "0x05"

		<**
			@description : the desired action is not possible 
		**>
		E_NOT_POSSIBLE = "0x06"

		<**
			@description : the desired object is non existent 
		**>
		E_NON_EXISTENT = "0x07"

		<**
			@description : the asynchronous action was aborted 
		**>
		E_ABORTED = "0x08"

		<**
			@description : This error is returned in case a connect is issued with a connectionFormat
    that cannot be selected for the connection. This could be either due to the capabilities of
    a source or a sink or gateway compatibilities for example 
		**>
		E_WRONG_FORMAT = "0x09"
		E_MAX = "0xA"
	}

	enumeration am_MuteState_e {

		<**
			@description : default 
		**>
		MS_UNKNOWN = "0x00"

		<**
			@description : the source / sink is muted 
		**>
		MS_MUTED = "0x01"

		<**
			@description : the source / sink is unmuted 
		**>
		MS_UNMUTED = "0x02"
		MS_MAX = "0x03"
	}

	enumeration am_MainSoundPropertyType_e {

		<**
			@description : default 
		**>
		MSP_UNKNOWN = "0x00"

		<**
			@description : example value between -10 and +10 
		**>
		MSP_EXAMPLE_TREBLE = "0x01"

		<**
			@description : example value between -10 and +10 
		**>
		MSP_EXAMPLE_MID = "0x02"

		<**
			@description : example value between -10 and +10 
		**>
		MSP_EXAMPLE_BASS = "0x03"
		MSP_SOURCE_TYPE = "0x04"
		MSP_MAX = "0x05"
	}

	enumeration am_SystemPropertyType_e {

		<**
			@description : default 
		**>
		SYP_UNKNOWN = "0x00"
		SYP_MAX = "0x01"
	}

	enumeration am_ConnectionState_e {
		CS_UNKNOWN = "0x00"

		<**
			@description : This means the connection is just building up 
		**>
		CS_CONNECTING = "0x01"

		<**
			@description : the connection is ready to be used 
		**>
		CS_CONNECTED = "0x02"

		<**
			@description : the connection is in the course to be knocked down 
		**>
		CS_DISCONNECTING = "0x03"

		<**
			@description : only relevant for connectionStatechanged. Is send after the connection was removed 
		**>
		CS_DISCONNECTED = "0x04"

		<**
			@description : this means the connection is still build up but unused at the moment 
		**>
		CS_SUSPENDED = "0x05"
		CS_MAX = "0x06"
	}

	enumeration am_Availablility_e {

		<**
			@description : default 
		**>
		A_UNKNOWN = "0x00"

		<**
			@description : The source / sink is available 
		**>
		A_AVAILABLE = "0x01"

		<**
			@description : the source / sink is not available 
		**>
		A_UNAVAILABLE = "0x02"
		A_MAX = "0x03"
	}

	enumeration am_AvailabilityReason_e {

		<**
			@description : default 
		**>
		AR_UNKNOWN = "0x00"

		<**
			@description : the availability changed because an new media was entered. 
		**>
		AR_GENIVI_NEWMEDIA = "0x01"

		<**
			@description : the availability changed because the same media was entered. 
		**>
		AR_GENIVI_SAMEMEDIA = "0x02"

		<**
			@description : the availability changed because there is no media. 
		**>
		AR_GENIVI_NOMEDIA = "0x03"

		<**
			@description : the availability changed because of a temperature event. 
		**>
		AR_GENIVI_TEMPERATURE = "0x04"

		<**
			@description : the availability changed because of a voltage event. 
		**>
		AR_GENIVI_VOLTAGE = "0x05"

		<**
			@description : the availability changed because of fatal errors reading or accessing media. 
		**>
		AR_GENIVI_ERRORMEDIA = "0x06"
		AR_MAX = "0x07"
	}

	enumeration am_ClassProperty_e {

		<**
			@description : default 
		**>
		CP_UNKNOWN = "0x00"

		<**
			@description : defines the source type of a source. Project specific, could be for example differentiation between interrupt source and main source. 
		**>
		CP_GENIVI_SOURCE_TYPE = "0x01"
		/**
	 * defines the SINK_TYPE. Project specific
	 */
		<**
			@description : defines the SINK_TYPE. Project specific. 
		**>
		CP_GENIVI_SINK_TYPE = "0x02"
		CP_MAX = "0x03"
	}
	
	enumeration am_InterruptState_e
	{
		/**
		 * default
		 */
		IS_UNKNOWN = "0x00"
		/**
		 * the interrupt state is off - no interrupt 
		 */
		IS_OFF = "0x01"
		/**
		 * the interrupt state is interrupted - the interrupt is active
		 */
		IS_INTERRUPTED = "0x02"
		IS_MAX = "0x03"
	}

	struct am_MainSoundProperty_s {

		<**
			@description : the type of the property 
		**>
		am_MainSoundPropertyType_e type

		<**
			@description : the actual value 
		**>
		Int16 value
	} array am_MainSoundProperty_l of am_MainSoundProperty_s

	struct am_SystemProperty_s {

		<**
			@description : the type that is set 
		**>
		am_SystemPropertyType_e type

		<**
			@description : the actual value 
		**>
		Int16 value
	}

	array am_SystemProperty_l of am_SystemProperty_s

	struct am_MainConnectionType_s {

		<**
			@description : the ID of the mainconnection 
		**>
		am_mainConnectionID_t mainConnectionID

		<**
			@description : the sourceID where the connection starts 
		**>
		am_sourceID_t sourceID

		<**
			@description : the sinkID where the connection ends 
		**>
		am_sinkID_t sinkID

		<**
			@description : the delay of the mainconnection 
		**>
		am_timeSync_t delay

		<**
			@description : the current connection state 
		**>
		am_ConnectionState_e connectionState
	}

	array am_MainConnectionType_l of am_MainConnectionType_s

	struct am_Availability_s {

		<**
			@description : the current availability state. 
		**>
		am_Availablility_e availability

		<**
			@description : the reason for the last change. This can be used to trigger events that deal with state changes. 
		**>
		am_AvailabilityReason_e availabilityReason
	}

	struct am_SourceType_s {

		<**
			@description : his is the ID of the source, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID). 
		**>
		am_sourceID_t sourceID

		<**
			@description : The name of the source. Must be unique in the whole system. 
		**>
		String name

		<**
			@description : the availability of the source 
		**>
		am_Availability_s availability

		<**
			@description : the sourceClassID, indicates the class the source is in. This information can be used by the Controller to implement different behaviour for different classes. 
		**>
		am_sourceClass_t sourceClassID
	}

	array am_SourceType_l of am_SourceType_s

	struct am_SinkType_s {

		<**
			@description : This is the ID of the sink, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID). 
		**>
		am_sinkID_t sinkID

		<**
			@description : The name of the sink. Must be unique in the whole system. 
		**>
		String name

		<**
			@description :
	This attribute reflects the availability of the sink. There are several reasons why a sink could be not available for the moment: for example the shutdown of a sink because of overtemperature or over- & undervoltage. The availability consists of two pieces of information:
	Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN
	AvailabilityReason: this informs about the last reason for a change in availability. The reasons itself are product specific.
	
		**>
		am_Availability_s availability

		<**
			@description : This is the representation of the Volume for the commandInterface. It is used by the HMI to set the volume of a sink, the AudioManagerController has to transform this into real source and sink volumes. 
		**>
		am_mainVolume_t volume
		am_MuteState_e muteState

		<**
			@description : the sinkClassID references to a sinkClass. With the help of classification, rules can be setup to define the system behaviour. 
		**>
		am_sinkClass_t sinkClassID
	}

	array am_SinkType_l of am_SinkType_s

	struct am_ClassProperty_s {

		<**
			@description : he property as enum. 
		**>
		am_ClassProperty_e classProperty
		Int16 value
	}

	array am_ClassProperty_l of am_ClassProperty_s

	struct am_SourceClass_s {

		<**
			@description : the source ID. 
		**>
		am_sourceClass_t sourceClassID

		<**
			@description : the name of the sourceClass - must be unique in the system. 
		**>
		String name

		<**
			@description : the list of the class properties. These are pairs of  a project specific enum describing the type of the value and an integer holding the real value. 
		**>
		am_ClassProperty_l listClassProperties
	}

	array am_SourceClass_l of am_SourceClass_s

	struct am_SinkClass_s {

		<**
			@description : the ID of the sinkClass. 
		**>
		am_sinkClass_t sinkClassID

		<**
			@description : the name of the sinkClass - must be unique in the system. 
		**>
		String name

		<**
			@description : the list of the class properties. These are pairs of  a project specific enum describing the type of the value and an integer holding the real value. 
		**>
		am_ClassProperty_l listClassProperties
	}

	array am_SinkClass_l of am_SinkClass_s
	
	struct am_NotificationPayload_s
	{
		am_NotificationType_e type
		<**
		 	@description : This is finally the value of the notification. It's meaning depends on the notificationType
		 **>
		Int16 value

	}

}