summaryrefslogtreecommitdiff
path: root/PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl
blob: e0bfd0553fa7e9310074c599c4e67e5c90fc8508 (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
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
package org.genivi.am
import org.genivi.am.* from "../../AudioManagerDaemon/fidls/AudioManagerTypes.fidl"

<**
    @description : This class implements everything from Audiomanager -&gt; RoutingAdapter
    @author : Christian Mueller
**>

interface RoutingControl {
    version {
        major 1
        minor 0
    }

    <**
        @description : aborts an asynchronous action.
(at)return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not found
    **>
    method asyncAbort {
        in {
            am_Handle_s handle
        }
    }

    <**
        @description : connects a source to a sink
(at)return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case am_CustomConnectionFormat_t does not match
	**>
	method asyncConnect {
		in {
			am_Handle_s handle
			am_connectionID_t connectionID
			am_sourceID_t sourceID
			am_sinkID_t sinkID
			am_CustomConnectionFormat_t connectionFormat
		}
	}

    <**
        @description : disconnect a connection with given connectionID
(at)return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
    **>
    method asyncDisconnect {
        in {
            am_Handle_s handle
            am_connectionID_t connectionID
        }
    }

    <**
        @description : this method is used to set the volume of a sink. This function is used to drive ramps, to mute or unmute or directly set the value. The difference is made through the ramptype.
(at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is out of range
	**>
	method asyncSetSinkVolume {
		in {
			am_Handle_s handle
			am_sinkID_t sinkID
			am_volume_t volume
			am_CustomRampType_t ramp
			am_time_t time
		}
	}

    <**
        @description : sets the volume of a source. This method is used to set the volume of a sink. This function is used to drive ramps, to mute or unmute or directly set the value. The difference is made through the ramptype.
(at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of range.
triggers the acknowledge ackSourceVolumeChange
	**>
	method asyncSetSourceVolume {
		in {
			am_Handle_s handle
			am_sourceID_t sourceID
			am_volume_t volume
			am_CustomRampType_t ramp
			am_time_t time
		}
	}

    <**
        @description : This function is used to set the source state of a particular source.
(at)return E_OK on success, E_UNKNOWN on error
    **>
    method asyncSetSourceState {
        in {
            am_Handle_s handle
            am_sourceID_t sourceID
            am_SourceState_e ^state
        }
    }

    <**
        @description : this function sets the sinksoundproperty.
(at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
    **>
    method asyncSetSinkSoundProperties {
        in {
            am_Handle_s handle
            am_sinkID_t sinkID
            am_SoundProperty_L listSoundProperties
        }
    }

    <**
        @description : this function sets the sinksoundproperty.
(at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
    **>
    method asyncSetSinkSoundProperty {
        in {
            am_Handle_s handle
            am_sinkID_t sinkID
            am_SoundProperty_s soundProperty
        }
    }

    <**
        @description : this function sets the sourcesoundproperty.
(at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
    **>
    method asyncSetSourceSoundProperties {
        in {
            am_Handle_s handle
            am_sourceID_t sourceID
            am_SoundProperty_L listSoundProperties
        }
    }

    <**
        @description : this function sets the sourcesoundproperty.
(at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
    **>
    method asyncSetSourceSoundProperty {
        in {
            am_Handle_s handle
            am_sourceID_t sourceID
            am_SoundProperty_s soundProperty
        }
    }

    <**
        @description : this function triggers crossfading.
(at)return E_OK on success, E_UNKNOWN on error
	**>
	method asyncCrossFade {
		in {
			am_Handle_s handle
			am_crossfaderID_t crossfaderID
			am_HotSink_e hotSink
			am_CustomRampType_t rampType
			am_time_t time
		}
	}

    <**
        @description : this function is used for early and late audio functions to set the domain state
(at)return E_OK on success, E_UNKNOWN on error
    **>
    method setDomainState {
        in {
            am_domainID_t domainID
            am_DomainState_e domainState
        }
        out {
            am_Error_e ^error
        }
    }
    method asyncSetVolumes {
        in {
            am_Handle_s handle
            am_Volumes_L volumes
        }
    }
    method asyncSetSinkNotificationConfiguration {
        in {
            am_Handle_s handle
            am_sinkID_t sinkID
            am_NotificationConfiguration_s notificationConfiguration
        }
    }
    method asyncSetSourceNotificationConfiguration {
        in {
            am_Handle_s handle
            am_sourceID_t sourceID
            am_NotificationConfiguration_s notificationConfiguration
        }
    }

}

<**
    @description : Routing Receive sendInterface description.
    @author : Christian Mueller
**>

interface RoutingControlObserver {
    version {
        major 0
        minor 1
    }

    <**
        @description : This attribute signals to the clients the current routing state.
A client should notify himself to this attribute in order to know the current state and act accordingly.
    **>
    attribute am_RoutingReady_e RoutingReady readonly

    <**
        @description : acknowledges a asyncConnect
    **>
    method ackConnect {
        in {
            am_Handle_s handle
            am_connectionID_t connectionID

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges a asyncDisconnect
    **>
    method ackDisconnect {
        in {
            am_Handle_s handle
            am_connectionID_t connectionID

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges a asyncsetSinkVolume 
    **>
    method ackSetSinkVolumeChange {
        in {
            am_Handle_s handle

            <**
                @description : The current actual value that is set 
            **>
            am_volume_t volume

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges a asyncsetSourceVolume
    **>
    method ackSetSourceVolumeChange {
        in {

            <**
                @description : handle that belongs to the change 
            **>
            am_Handle_s handle

            <**
                @description : the current volume
            **>
            am_volume_t volume

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowlegde for asyncSetSourceState
    **>
    method ackSetSourceState {
        in {
            am_Handle_s handle

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges asyncSetSinkSoundProperties
    **>
    method ackSetSinkSoundProperties {
        in {
            am_Handle_s handle

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges asyncSetSinkSoundProperty
    **>
    method ackSetSinkSoundProperty {
        in {
            am_Handle_s handle

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges asyncSetSourceSoundProperties
    **>
    method ackSetSourceSoundProperties {
        in {
            am_Handle_s handle

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges asyncSetSourceSoundProperty
    **>
    method ackSetSourceSoundProperty {
        in {
            am_Handle_s handle

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges asyncCrossFade
    **>
    method ackCrossFading {
        in {
            am_Handle_s handle

            <**
                @description : this is the current hot sink, HS_INTERMEDIATE is here when a crossfading action did not reach the end
            **>
            am_HotSink_e hotSink

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges a volume tick. This can be used to display volumechanges during ramps
    **>
    method ackSourceVolumeTick {
        in {
            am_Handle_s handle
            am_sourceID_t sourceID
            am_volume_t volume
        }
    }

    <**
        @description : acknowledges a volume tick. This can be used to display volumechanges during ramps
    **>
    method ackSinkVolumeTick {
        in {
            am_Handle_s handle
            am_sinkID_t sinkID
            am_volume_t volume
        }
    }

    <**
        @description : This function returns the ID to the given domainName. If already a domain is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the domain. The other parameters of the domain will be overwritten when the domain is registered.
(at)return E_OK on success, E_UNKNOWN on error
    **>
    method peekDomain {
        in {
            String name
        }
        out {
            am_domainID_t domainID
            am_Error_e ^error
        }
    }

    <**
        @description : registers a domain
(at)return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
    **>
    method registerDomain {
        in {

            <**
                @description : domainID in am_Domain_s must be 0!
            **>
            am_Domain_s domainData
            String returnBusname
            String returnInterface
        }
        out {
            am_domainID_t domainID
            am_Error_e ^error
        }
    }

    <**
        @description : deregisters a domain. All sources, sinks, gateways and crossfaders from that domain will be removed as well.
(at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
    **>
    method deregisterDomain {
        in {

            <**
                @description : < the nonde of the bus
            **>
            am_domainID_t domainID
        }
        out {
            am_Error_e ^error
        }
    }

    <**
        @description : registers a gateway. (at)return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
    **>
    method registerGateway {
        in {

            <**
                @description : In a fixed setup, the gatewayID must be below 100. In a dynamic setup, the gatewayID shall be 0. listSourceFormats and listSinkFormats are empty at registration time. Values are taken over when sources and sinks are registered.


            **>
            am_Gateway_s gatewayData
        }
        out {
            am_gatewayID_t gatewayID
            am_Error_e ^error
        }
    }

    <**
        @description : deregisters a gateway. Also removes all sinks and sources of the controlling domain.
(at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
    **>
    method deregisterGateway {
        in {

            <**
                @description : domainID of the control domain
            **>
            am_gatewayID_t gatewayID
        }
        out {
            am_Error_e ^error
        }
    }

    <**
        @description : This function returns the ID to the given sinkName. If already a sink is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the sink. The other parameters of the sink will be overwritten when the sink is registered.
(at)return E_OK on success, E_UNKNOWN on error
    **>
    method peekSink {
        in {

            <**
                @description : ID is not valid since not created yet
            **>
            String name
        }
        out {
            am_sinkID_t sinkID
            am_Error_e ^error
        }
    }

    <**
        @description : Registers a sink. If the sink is part of a gateway, the listconnectionFormats is copied to the gatewayInformation
(at)return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
    **>
    method registerSink {
        in {

            <**
                @description : In a fixed setup, the sinkID within am_Sink_s must be below 100. In a dynamic setup the sinkID must be 0 in am_Sink_s.
            **>
            am_Sink_s sinkData
        }
        out {
            am_sinkID_t sinkID
            am_Error_e ^error
        }
    }

    <**
        @description : deregisters a sink.
(at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
    **>
    method deregisterSink {
        in {
            am_sinkID_t sinkID
        }
        out {
            am_Error_e ^error
        }
    }

    <**
        @description : This function returns the ID to the given sourceName. If already a source is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the source. The other parameters of the source will be overwritten when the source is registered.
(at)return E_OK on success, E_UNKNOWN on error
    **>
    method peekSource {
        in {
            String name
        }
        out {
            am_sourceID_t sourceID
            am_Error_e ^error
        }
    }

    <**
        @description : registers a source.  If the source is part of a gateway, the listconnectionFormats is copied to the gatewayInformation
(at)return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXIST if either name or sourceID already exists
    **>
    method registerSource {
        in {

            <**
                @description : In a fixed setup, the sourceID within am_Source_s must be below 100. In a dynamic setup the sourceID must be 0 in am_Source_s
            **>
            am_Source_s sourceData
        }
        out {
            am_sourceID_t sourceID
            am_Error_e ^error
        }
    }

    <**
        @description : deregisters a source
(at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
    **>
    method deregisterSource {
        in {
            am_sourceID_t sourceID
        }
        out {
            am_Error_e ^error
        }
    }

    <**
        @description : this function registers a crossfader.
(at)return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
    **>
    method registerCrossfader {
        in {

            <**
                @description : in a fixed setup, the crossfaderID must be below 100. In a dynamic setup the crossfasderID shall be 0
            **>
            am_Crossfader_s crossfaderData
        }
        out {
            am_crossfaderID_t crossfaderID
            am_Error_e ^error
        }
    }

    <**
        @description : this function deregisters a crossfader. removes all sources and sinks assiated as well.
(at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
    **>
    method deregisterCrossfader {
        in {
            am_crossfaderID_t crossfaderID
        }
        out {
            am_Error_e ^error
        }
    }

    <**
        @description : this function peeks a sourceclassID. It is used by the RoutingPlugins to determine the SinkClassIDs of a sinkClass.
(at)return E_OK on succes, E_DATABASE_ERROR on error
    **>
    method peekSourceClassID {
        in {
            String name
        }
        out {
            am_sourceClass_t sourceClassID
            am_Error_e ^error
        }
    }

    <**
        @description : this function peeks a sourceclassID. It is used by the RoutingPlugins to determine the SinkClassIDs of a sinkClass.
(at)return E_OK on succes, E_DATABASE_ERROR on error
    **>
    method peekSinkClassID {
        in {
            String name
        }
        out {
            am_sinkClass_t sinkClassID
            am_Error_e ^error
        }
    }

    <**
        @description : is called when a low level interrupt changes it status.
    **>
    method hookInterruptStatusChange {
        in {
            am_sourceID_t sourceID
            am_InterruptState_e interruptState
        }
    }

    <**
        @description : This hook is called when all elements from a domain are registered.
Is used by the Controller to know when all expected domains are finally registered
    **>
    method hookDomainRegistrationComplete {
        in {
            am_domainID_t domainID
        }
    }

    <**
        @description : is called when a sink changes its availability
    **>
    method hookSinkAvailablityStatusChange {
        in {
            am_sinkID_t sinkID
            am_Availability_s availability
        }
    }

    <**
        @description : is called when a source changes its availability
    **>
    method hookSourceAvailablityStatusChange {
        in {
            am_sourceID_t sourceID
            am_Availability_s availability
        }
    }

    <**
        @description : is called when a domain changes its status. This used for early domains only
    **>
    method hookDomainStateChange {
        in {
            am_domainID_t domainID
            am_DomainState_e domainState
        }
    }

    <**
        @description : is called when the timinginformation (delay) changed for a connection.
    **>
    method hookTimingInformationChanged {
        in {
            am_connectionID_t connectionID
            am_timeSync_t delay
        }
    }

    <**
        @description : this function is used to send out all data that has been changed in an early state.
(at)return E_OK on success, E_UNKNOWN on error
    **>
    method sendChangedData {
        in {
            am_EarlyData_L earlyData
        }
    }

    <**
        @description : updates data of an gateway. (at)return E_OK on success, E_NON_EXISTENT if the gatewayID is not valid. 
    **>
    method updateGateway {
        in {

            <**
                @description : This is the new gateway data that has been updated. Please note that changing source and sink IDs,

            **>
            am_gatewayID_t gatewayID
            am_ConnectionFormat_L listSourceFormats
            am_ConnectionFormat_L listSinkFormats
            am_Convertion_L convertionMatrix
        }
        out {
            am_Error_e ^error
        }
    }

    <**
        @description : updates data of an gateway. (at)return E_OK on success, E_NON_EXISTENT if the sinkID is not valid.
    **>
    method updateSink {
        in {

            <**
                @description : The sinkID of the sink 
            **>
            am_sinkID_t sinkID
            am_sinkClass_t sinkClassID
            am_SoundProperty_L listSoundProperties
            am_ConnectionFormat_L listConnectionFormats
            am_MainSoundProperty_L listMainSoundProperties
        }
        out {
            am_Error_e ^error
        }
    }

    <**
        @description : updates data of an source. (at)return E_OK on success, E_NON_EXISTENT if the sourceID in the struct is not valid. 
Please note that only the following data out of am_Source_s have effect when they are changed:
sourceClassID,
listSoundProperties,
listConnectionFormats,
listMainSoundProperties
    **>
    method updateSource {
        in {

            <**
                @description : the sourceID of the source
            **>
            am_sourceID_t sourceID
            am_sourceClass_t sourceClassID
            am_SoundProperty_L listSoundProperties
            am_ConnectionFormat_L listConnectionFormats
            am_MainSoundProperty_L listMainSoundProperties
        }
        out {
            am_Error_e ^error
        }
    }

    <**
        @description : acknowledges a asyncSetSinkVolumes
    **>
    method ackSetVolumes {
        in {
            am_Handle_s handle

            <**
                @description : The list of volumes that have been set. ramp and time values have no meaning when the struct is used here.
            **>
            am_Volumes_L listvolumes

            <**
                @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
            **>
            am_Error_e ^error
        }
    }

    <**
        @description : The acknowledge of the SinkNotificationConfiguration
    **>
    method ackSinkNotificationConfiguration {
        in {
            am_Handle_s handle
            am_Error_e ^error
        }
    }

    <**
        @description : The acknowledge of the SourceNotificationConfiguration
    **>
    method ackSourceNotificationConfiguration {
        in {
            am_Handle_s handle
            am_Error_e ^error
        }
    }

    <**
        @description : is called whenever a notified value needs to be send
    **>
    method hookSinkNotificationDataChange {
        in {

            <**
                @description : The sinkID of the sink where the data changed
            **>
            am_sinkID_t sinkID

            <**
                @description : The payload
            **>
            am_NotificationPayload_s payload
        }
    }

    <**
        @description : is called whenever a notified value needs to be send
    **>
    method hookSourceNotificationDataChange {
        in {

            <**
                @description : The sinkID of the sink where the data changed
            **>
            am_sourceID_t sourceID

            <**
                @description : The payload
            **>
            am_NotificationPayload_s payload
        }
    }
    method confirmRoutingRundown {
        in {
            String domainName
        }
    }

}