aboutsummaryrefslogtreecommitdiffstats
path: root/ucs2-lib/inc/ucs_xrm_pb.h
blob: 99c618fda217b1bc5bcb4e184151dbcefbe1c99b (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
/*------------------------------------------------------------------------------------------------*/
/* UNICENS V2.1.0-3491                                                                            */
/* Copyright (c) 2017 Microchip Technology Germany II GmbH & Co. KG.                              */
/*                                                                                                */
/* This program is free software: you can redistribute it and/or modify                           */
/* it under the terms of the GNU General Public License as published by                           */
/* the Free Software Foundation, either version 2 of the License, or                              */
/* (at your option) any later version.                                                            */
/*                                                                                                */
/* This program is distributed in the hope that it will be useful,                                */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of                                 */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                  */
/* GNU General Public License for more details.                                                   */
/*                                                                                                */
/* You should have received a copy of the GNU General Public License                              */
/* along with this program.  If not, see <http://www.gnu.org/licenses/>.                          */
/*                                                                                                */
/* You may also obtain this software under a propriety license from Microchip.                    */
/* Please contact Microchip for further information.                                              */
/*------------------------------------------------------------------------------------------------*/

/*!
 * \file
 * \brief Public header file of the Extended Resource Manager.
 */

#ifndef UCS_XRM_PB_H
#define UCS_XRM_PB_H

/*------------------------------------------------------------------------------------------------*/
/* Includes                                                                                       */
/*------------------------------------------------------------------------------------------------*/
#include "ucs_rules.h"
#include "ucs_xrm_cfg.h"
#include "ucs_ret_pb.h"
#include "ucs_inic_pb.h"
#include "ucs_rsm_pv.h"

#ifdef __cplusplus
extern "C"
{
#endif

/*------------------------------------------------------------------------------------------------*/
/* Definitions                                                                                    */
/*------------------------------------------------------------------------------------------------*/
/*! \def UCS_XRM_CONST
 *  \brief      Defines a ROM data qualifier for XRM data objects.
 *  \details    This macro is used to define a XRM ROM data qualifier. It is used for XRM 
 *              configuration structures and XRM resource object lists. The definition of this 
 *              macro must be part of the XRM configuration file ucs_xrm_cfg.h.
 */
#ifdef UCS_XRM_CONST
#    error UCS_XRM_CONST macro is not supported on UNICENS anymore. Please remove It from your config file.
#endif

#define UCS_XRM_CONST

/*! \def UCS_XRM_NUM_JOBS
 *  \brief      Defines the size of the internal job list.
 *  \details    The number of XRM jobs to execute. The value is used to specify the size of the
 *              internal job list. The definition of this macro must be part of the XRM 
 *              configuration file ucs_xrm_cfg.h.
 *              Valid range: 1..254. Default value: 1.
 *  \ingroup    G_UCS_XRM_CFG
 */
#ifndef UCS_XRM_NUM_JOBS
#   define UCS_XRM_NUM_JOBS
#   define XRM_NUM_JOBS             1U 
#else
#   define XRM_NUM_JOBS             ((uint8_t)UCS_XRM_NUM_JOBS)
#endif

/*! \def UCS_XRM_NUM_RESOURCES
 *  \brief      Defines the number of provided resources.
 *  \details    The number of required resources depends on the defined XRM jobs. The 
 *              definition of the public macro UCS_XRM_NUM_RESOURCES must be part of the 
 *              XRM configuration file ucs_xrm_cfg.h.
 *              Valid range: 1..254. Default value: 8.
 *  \ingroup    G_UCS_XRM_CFG
 */
#ifndef UCS_XRM_NUM_RESOURCES
#   define UCS_XRM_NUM_RESOURCES
#   define XRM_NUM_RESOURCE_HANDLES         8U 
#else
#   define XRM_NUM_RESOURCE_HANDLES         ((uint8_t)UCS_XRM_NUM_RESOURCES)
#endif

/*!
 * \addtogroup G_UCS_XRM_TYPES
 * @{
 */
/*------------------------------------------------------------------------------------------------*/
/* Enumerators                                                                                    */
/*------------------------------------------------------------------------------------------------*/
/*! \brief Result codes of the Extended Resource Manager. */
typedef enum Ucs_Xrm_ResultCode_
{
    UCS_XRM_RES_SUCCESS_BUILD     = 0x00U,      /*!< \brief Build of connection succeeded. */
    UCS_XRM_RES_SUCCESS_DESTROY   = 0x01U,      /*!< \brief Destruction of connection succeeded. */
    UCS_XRM_RES_RC_AUTO_DESTROYED = 0x02U,      /*!< \brief Invalid resources have been successfully destroyed. */
    UCS_XRM_RES_ERR_CONFIG        = 0x03U,      /*!< \brief Invalid user settings in the XRM configuration file.
                                                 *   \details The number of jobs or resources exceeds the maximum allowed in your XRM configuration file. */
    UCS_XRM_RES_ERR_BUILD         = 0x04U,      /*!< \brief Build of connection failed due to a function-specific error found on target device or a transmission error on the MOST network.
                                                 *   \details The \em result_type section in Ucs_Xrm_ResultDetails_t will provide you with more detailed information concerning the error type.
                                                 */
    UCS_XRM_RES_ERR_DESTROY       = 0x05U,      /*!< \brief Destruction of connection failed due to a function-specific error found on target device or a transmission error on the MOST network.
                                                 *   \details The \em result_type section in Ucs_Xrm_ResultDetails_t will provide you with more detailed information concerning the error type.
                                                 */
    UCS_XRM_RES_ERR_INV_LIST      = 0x06U,      /*!< \brief Request of invalid resources failed due to a function-specific error found on target device or a transmission error on the MOST network.
                                                 *   \details The \em result_type section in Ucs_Xrm_ResultDetails_t will provide you with more detailed information concerning the error type.
                                                 */
    UCS_XRM_RES_ERR_SYNC          = 0x07U,      /*!< \brief The remote synchronization of target device failed due to a function-specific error a transmission error on the MOST network.
                                                 *   \details The \em result_type section in Ucs_Xrm_ResultDetails_t will provide you with more detailed information concerning the error type.
                                                 */
    UCS_XRM_RES_UNKNOWN           = 0xFFU       /*!< \brief Result is unknown. */
} Ucs_Xrm_ResultCode_t;

/*! \brief INIC resource types used by the Extended Resource Manager. */
typedef enum Ucs_Xrm_ResourceType_
{
    UCS_XRM_RC_TYPE_DC_PORT      = 0x00U,       /*!< \brief Default created port */
    UCS_XRM_RC_TYPE_MOST_SOCKET  = 0x01U,       /*!< \brief MOST socket */
    UCS_XRM_RC_TYPE_MLB_PORT     = 0x02U,       /*!< \brief MediaLB port */
    UCS_XRM_RC_TYPE_MLB_SOCKET   = 0x03U,       /*!< \brief MediaLB socket */
    UCS_XRM_RC_TYPE_USB_PORT     = 0x04U,       /*!< \brief USB port */
    UCS_XRM_RC_TYPE_USB_SOCKET   = 0x05U,       /*!< \brief USB socket */
    UCS_XRM_RC_TYPE_RMCK_PORT    = 0x06U,       /*!< \brief RMCK port */
    UCS_XRM_RC_TYPE_STRM_PORT    = 0x07U,       /*!< \brief Streaming port */
    UCS_XRM_RC_TYPE_STRM_SOCKET  = 0x08U,       /*!< \brief Streaming socket */
    UCS_XRM_RC_TYPE_SYNC_CON     = 0x09U,       /*!< \brief Synchronous data connection */
    UCS_XRM_RC_TYPE_DFIPHASE_CON = 0x0AU,       /*!< \brief DiscreteFrame Isochronous streaming 
                                                 *          phase connection
                                                 */
    UCS_XRM_RC_TYPE_COMBINER     = 0x0BU,       /*!< \brief Combiner */
    UCS_XRM_RC_TYPE_SPLITTER     = 0x0CU,       /*!< \brief Splitter */
    UCS_XRM_RC_TYPE_AVP_CON      = 0x0DU,       /*!< \brief A/V packetized isochronous streaming
                                                 *          data connection
                                                 */
    UCS_XRM_RC_TYPE_QOS_CON      = 0x0EU        /*!< \brief Quality of Service IP streaming data
                                                 *          connection
                                                 */

} Ucs_Xrm_ResourceType_t;

/*! \brief Port types use for default created ports. */
typedef enum Ucs_Xrm_PortType_
{
    UCS_XRM_PORT_TYPE_MLB          = 0x0AU,     /*!< \brief MediaLB Port */
    UCS_XRM_PORT_TYPE_USB          = 0x12U,     /*!< \brief USB Port */
    UCS_XRM_PORT_TYPE_STRM         = 0x16U      /*!< \brief Streaming Port */

} Ucs_Xrm_PortType_t;

/*! \brief This enumerator specifies the kind of result - Internal, Target or Transmission. */
typedef enum Ucs_Xrm_ResultType_
{
    UCS_XRM_RESULT_TYPE_INT        = 0x00U,     /*!< \brief Specifies the internal results, typically standard return codes of MNS used for synchronous response. */
    UCS_XRM_RESULT_TYPE_TGT        = 0x01U,     /*!< \brief Specifies the target results, typically INIC function-specific error from target device. */
    UCS_XRM_RESULT_TYPE_TX         = 0x02U      /*!< \brief Specifies the transmission error information on the MOST network. */

} Ucs_Xrm_ResultType_t;

/*! \brief This enumerator specifies the type of resources information */
typedef enum Ucs_Xrm_ResourceInfos_
{
    UCS_XRM_INFOS_BUILT            = 0x00U,   /*!< \brief Signals that the resource is built */
    UCS_XRM_INFOS_DESTROYED        = 0x01U,   /*!< \brief Signals that the resource is destroyed */
    UCS_XRM_INFOS_ERR_BUILT        = 0x02U,   /*!< \brief Signals that XRM fails to build the resource */
    UCS_XRM_INFOS_ERR_DESTROYED    = 0x03U    /*!< \brief Signals that XRM fails to destroy the resource */

} Ucs_Xrm_ResourceInfos_t;


/*------------------------------------------------------------------------------------------------*/
/* Type definitions                                                                               */
/*------------------------------------------------------------------------------------------------*/
/*! \brief INIC Resource Object used for Extended Resource Manager jobs. 
 *  \attention This resource object must be \b terminated with a \b NULL \b pointer to mark the end of the list. 
 */
typedef void Ucs_Xrm_ResObject_t;

/*! \brief Function signature of result callback used by Ucs_Xrm_Stream_SetPortConfig() and 
 *         Ucs_Xrm_Stream_GetPortConfig().
 *  \mns_res_inic{StreamPortConfiguration,MNSH3-StreamPortConfiguration680}
 *  \param node_address         The node address from which the results come 
 *  \param index                Streaming Port instance. \mns_name_inic{Index}
 *  \param op_mode              Operation mode of the Streaming Port. \mns_name_inic{OperationMode}
 *  \param port_option          Direction of the physical pins of the indexed Streaming Port. \mns_name_inic{PortOption}
 *  \param clock_mode           Configuration of the FSY/SCK signals. \mns_name_inic{ClockMode}
 *  \param clock_data_delay     Configuration of the FSY/SCK signals for Generic Streaming. \mns_name_inic{ClockDataDelay}
 *  \param result               Returned result of the operation
 *  \param user_ptr             User reference provided in \ref Ucs_InitData_t "Ucs_InitData_t::user_ptr"
 */
typedef void (*Ucs_Xrm_Stream_PortCfgResCb_t)(uint16_t node_address,
                                              uint8_t index,
                                              Ucs_Stream_PortOpMode_t op_mode,
                                              Ucs_Stream_PortOption_t port_option,
                                              Ucs_Stream_PortClockMode_t clock_mode,
                                              Ucs_Stream_PortClockDataDelay_t clock_data_delay,
                                              Ucs_StdResult_t result,
                                              void *user_ptr);

/*------------------------------------------------------------------------------------------------*/
/* Structures                                                                                     */
/*------------------------------------------------------------------------------------------------*/
/*! \brief Detailed information used for Extended Resource Manager results. */
typedef struct Ucs_Xrm_ResultDetails_
{
    /*! \brief Specifies the INIC resource type for which the result has been returned. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Specifies the table index of the resource object for which the result has been returned. */
    uint8_t resource_index;
    /*! \brief Specifies the type of the current asynchronous result.
     *  \details The following briefly describes the different types of results available:
     *              - \b UCS_XRM_RESULT_TYPE_INT: internal results, typically standard return codes of MNS used for synchronous response. \n Refer to \em int_result to get the results.
     *              - \b UCS_XRM_RESULT_TYPE_TGT: target results, typically INIC function-specific error from target device. \n Refer to \em inic_result to get the results.
     *              - \b UCS_XRM_RESULT_TYPE_TX:  transmission results, typically transmission error on the MOST network. \n Refer to \em tx_result to get the results.
     */
    Ucs_Xrm_ResultType_t result_type;
    /*! \brief Holds the internal MNS results. */
    Ucs_Return_t int_result;
    /*! \brief Holds the INIC results. */
    Ucs_StdResult_t inic_result;
    /*! \brief Holds the transmission error information. */
    Ucs_MsgTxStatus_t tx_result;

} Ucs_Xrm_ResultDetails_t;

/*! \brief Result structure of the Extended Resource Manager. */
typedef struct Ucs_Xrm_Result_
{
    /*! \brief Result code. */
    Ucs_Xrm_ResultCode_t code;
    /*! \brief Detailed information on the returned result. */
    Ucs_Xrm_ResultDetails_t details;

} Ucs_Xrm_Result_t;

/*! \brief Resources Identity from user point of view. */
typedef struct Ucs_Xrm_ResIdentity_
{
    /*! \brief Result code. */
    Ucs_Xrm_ResObject_t * resource_store;
    /*! \brief Result code. */
    uint8_t resource_id;

} Ucs_Xrm_ResIdentity_t;

/*------------------------------------------------------------------------------------------------*/
/* Structures used for INIC resource objects                                                      */
/*------------------------------------------------------------------------------------------------*/
/*! \brief Configuration structure of a default created port. This structure is used for ports that 
 *         are configured via the INIC's Configuration String and are automatically created at 
 *         startup.
 */
typedef struct Ucs_Xrm_DefaultCreatedPort_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Type of the hardware port */
    Ucs_Xrm_PortType_t port_type;
    /*! \brief Port instance identifier */
    uint8_t index;

} Ucs_Xrm_DefaultCreatedPort_t;

/*! \brief Configuration structure of a MOST socket. */
typedef struct Ucs_Xrm_MostSocket_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Port resource handle. \mns_param_inic{MOSTPortHandle,MOSTSocketCreate,MNSH3-MOSTSocketCreate611}
     */
    uint16_t most_port_handle;
    /*! \brief Direction of data stream. \mns_param_inic{Direction,MOSTSocketCreate,MNSH3-MOSTSocketCreate611} 
     */
    Ucs_SocketDirection_t direction;
    /*! \brief Data type. \mns_param_inic{DataType,MOSTSocketCreate,MNSH3-MOSTSocketCreate611}
     */
    Ucs_Most_SocketDataType_t data_type;
    /*! \brief Required socket bandwidth. \mns_param_inic{Bandwidth,MOSTSocketCreate,MNSH3-MOSTSocketCreate611}
     */
    uint16_t bandwidth;

} Ucs_Xrm_MostSocket_t;

/*! \brief Configuration structure of a MediaLB port. */
typedef struct Ucs_Xrm_MlbPort_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief MLB port instance. \mns_param_inic{Index,MediaLBPortCreate,MNSH3-MediaLBPortCreate621}
     */
    uint8_t index;
    /*! \brief Clock speed configuration. \mns_param_inic{ClockConfig,MediaLBPortCreate,MNSH3-MediaLBPortCreate621}
     */
    Ucs_Mlb_ClockConfig_t clock_config;

} Ucs_Xrm_MlbPort_t;

/*! \brief Configuration structure of a MediaLB socket. */
typedef struct Ucs_Xrm_MlbSocket_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object the socket is attached to.  */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *mlb_port_obj_ptr;
    /*! \brief Direction of data stream. \mns_param_inic{Direction,MediaLBSocketCreate,MNSH3-MediaLBSocketCreate631}
     */
    Ucs_SocketDirection_t direction;
    /*! \brief Data type. \mns_param_inic{DataType,MediaLBSocketCreate,MNSH3-MediaLBSocketCreate631}
     */
    Ucs_Mlb_SocketDataType_t data_type;
    /*! \brief Required socket bandwidth. \mns_param_inic{Bandwidth,MediaLBSocketCreate,MNSH3-MediaLBSocketCreate631}
     */
    uint16_t bandwidth;
    /*! \brief MLB channel address. \mns_param_inic{ChannelAddress,MediaLBSocketCreate,MNSH3-MediaLBSocketCreate631}
     */
    uint16_t channel_address;

} Ucs_Xrm_MlbSocket_t;

/*! \brief Configuration structure of a USB port. */
typedef struct Ucs_Xrm_UsbPort_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief USB port instance. \mns_param_inic{Index,USBPortCreate,MNSH3-USBPortCreate661}
     */
    uint8_t index;
    /*! \brief interface of the USB Port�s physical layer. \mns_param_inic{PhysicalLayer,USBPortCreate,MNSH3-USBPortCreate661}
     */
    Ucs_Usb_PhysicalLayer_t physical_layer;
    /*! \brief USB devices interfaces mask. \mns_param_inic{DeviceInterfaces,USBPortCreate,MNSH3-USBPortCreate661}
     */
    uint16_t devices_interfaces;
    /*! \brief OUT Endpoints inside the streaming interface. \mns_param_inic{StreamingIfEpOutCount,USBPortCreate,MNSH3-USBPortCreate661}
     */
    uint8_t streaming_if_ep_out_count;
    /*! \brief IN Endpoints inside the streaming interface. \mns_param_inic{StreamingIfEpInCount,USBPortCreate,MNSH3-USBPortCreate661}
     */
    uint8_t streaming_if_ep_in_count;

} Ucs_Xrm_UsbPort_t;

/*! \brief Configuration structure of a USB socket. */
typedef struct Ucs_Xrm_UsbSocket_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object the socket is attached to. */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *usb_port_obj_ptr;
    /*! \brief Direction of the data stream. \mns_param_inic{Direction,USBSocketCreate,MNSH3-USBSocketCreate671}
     */
    Ucs_SocketDirection_t direction;
    /*! \brief Data type. \mns_param_inic{DataType,USBSocketCreate,MNSH3-USBSocketCreate671}
     */
    Ucs_Usb_SocketDataType_t data_type;
    /*! \brief Address of a USB Endpoint. \mns_param_inic{EndpointAddress,USBSocketCreate,MNSH3-USBSocketCreate671}
     */
    uint8_t end_point_addr;
    /*! \brief Number of MOST network frames/packets per one USB transaction. \mns_param_inic{FramesPerTransfer,USBSocketCreate,MNSH3-USBSocketCreate671}
     */
    uint16_t frames_per_transfer;

} Ucs_Xrm_UsbSocket_t;

/*! \brief Configuration structure of a RMCK port. */
typedef struct Ucs_Xrm_RmckPort_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief RMCK Port instance. \mns_param_inic{Index,RMCKPortCreate,MNSH3-RMCKPortCreate6A1}
     */
    uint8_t index;
    /*! \brief Source of the RMCK clock. \mns_param_inic{ClockSource,RMCKPortCreate,MNSH3-RMCKPortCreate6A1}
     */
    Ucs_Rmck_PortClockSource_t clock_source;
    /*! \brief Divisor of the clock source. \mns_param_inic{Divisor,RMCKPortCreate,MNSH3-RMCKPortCreate6A1}
     */
    uint16_t divisor;

} Ucs_Xrm_RmckPort_t;

/*! \brief Configuration structure of a streaming port. */
typedef struct Ucs_Xrm_StrmPort_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Streaming Port instance. \mns_param_inic{Index,StreamPortCreate,MNSH3-StreamPortCreate681}
     */
    uint8_t index;
    /*! \brief Clock speed configuration. \mns_param_inic{ClockConfig,StreamPortCreate,MNSH3-StreamPortCreate681}
     */
    Ucs_Stream_PortClockConfig_t clock_config;
    /*! \brief Alignment of the data bytes. \mns_param_inic{DataAlignment,StreamPortCreate,MNSH3-StreamPortCreate681}
     */
    Ucs_Stream_PortDataAlign_t data_alignment;

} Ucs_Xrm_StrmPort_t;

/*! \brief Configuration structure of a streaming data socket. */
typedef struct Ucs_Xrm_StrmSocket_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object the socket is attached to. */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *stream_port_obj_ptr;
    /*! \brief Direction of the data stream. \mns_param_inic{Direction,StreamSocketCreate,MNSH3-StreamSocketCreate691}
     */
    Ucs_SocketDirection_t direction;
    /*! \brief Data type. \mns_param_inic{DataType,StreamSocketCreate,MNSH3-StreamSocketCreate691}
     */
    Ucs_Stream_SocketDataType_t data_type;
    /*! \brief Required socket bandwidth in bytes. \mns_param_inic{Bandwidth,StreamSocketCreate,MNSH3-StreamSocketCreate691}
     */
    uint16_t bandwidth;
    /*! \brief ID of the serial interface pin. \mns_param_inic{StreamPinID,StreamSocketCreate,MNSH3-StreamSocketCreate691}
     */
    Ucs_Stream_PortPinId_t stream_pin_id;

} Ucs_Xrm_StrmSocket_t;

/*! \brief Configuration structure of a synchronous data connection. */
typedef struct Ucs_Xrm_SyncCon_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object that specifies the socket that is the 
     *         starting point of the link. Must be a socket of type \c Input.
     */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_in_obj_ptr;
    /*! \brief Reference to the INIC resource object that specifies the socket that is the 
     *         ending point of the link. Must be a socket of type \c Output.
     */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_out_obj_ptr;
    /*! \brief Mode of operation of mute. \mns_param_inic{MuteMode,SyncCreate,MNSH3-SyncCreate871}  
     */
    Ucs_Sync_MuteMode_t mute_mode;
    /*! \brief Offset from where the socket data should be routed from a splitter. \mns_param_inic{Offset,SyncCreate,MNSH3-SyncCreate871}  
     */
    uint16_t offset;

} Ucs_Xrm_SyncCon_t;

/*! \brief Configuration structure of a DiscreteFrame Isochronous streaming phase connection. */
typedef struct Ucs_Xrm_DfiPhaseCon_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object that specifies the socket that is the 
     *         starting point of the link. Must be a socket of type \c Input.
     */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_in_obj_ptr;
    /*! \brief Reference to the INIC resource object that specifies the socket that is the 
     *         ending point of the link. Must be a socket of type \c Output.
     */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_out_obj_ptr;

} Ucs_Xrm_DfiPhaseCon_t;

/*! \brief Configuration structure of a combiner resource. */
typedef struct Ucs_Xrm_Combiner_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object that specifies the synchronous socket. */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *port_socket_obj_ptr;
    /*! \brief Port resource handle. \mns_param_inic{MOSTPortHandle,CombinerCreate,MNSH3-CombinerCreate901} 
     */
    uint16_t most_port_handle;
    /*! \brief Total number of data bytes to be transferred each MOST network frame. \mns_param_inic{BytesPerFrame,CombinerCreate,MNSH3-CombinerCreate901}  
     */
    uint16_t bytes_per_frame;

} Ucs_Xrm_Combiner_t;

/*! \brief Configuration structure of a splitter resource. */
typedef struct Ucs_Xrm_Splitter_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object that specifies the synchronous socket. */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_in_obj_ptr;
    /*! \brief Port resource handle. \mns_param_inic{MOSTPortHandle,SplitterCreate,MNSH3-SplitterCreate911}
     */
    uint16_t most_port_handle;
    /*! \brief Total number of data bytes to be transferred each MOST network frame. \mns_param_inic{BytesPerFrame,SplitterCreate,MNSH3-SplitterCreate911}  
     */
    uint16_t bytes_per_frame;

} Ucs_Xrm_Splitter_t;

/*! \brief Configuration structure for a A/V Packetized isochronous streaming data connection. */
typedef struct Ucs_Xrm_AvpCon_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object that specifies the socket that is the 
     *         starting point of the link. Must be a socket of type \c Input.
     */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_in_obj_ptr;
    /*! \brief Reference to the INIC resource object that specifies the socket that is the 
     *         ending point of the link. Must be a socket of type \c Output.
     */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_out_obj_ptr;
    /*! \brief Size of data packets. \mns_param_inic{IsocPacketSize,AVPacketizedCreate,MNSH3-AVPacketizedCreate861} 
     */
    Ucs_Avp_IsocPacketSize_t isoc_packet_size;

} Ucs_Xrm_AvpCon_t;

/*! \brief Configuration structure for a Quality of Service IP streaming data connection. */
typedef struct Ucs_Xrm_QoSCon_
{
    /*! \brief Type of the INIC resource object. */
    Ucs_Xrm_ResourceType_t resource_type;
    /*! \brief Reference to the INIC resource object that specifies the socket that is the 
     *         starting point of the link. Must be a socket of type \c Input.
     */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_in_obj_ptr;
    /*! \brief Reference to the INIC resource object that specifies the socket that is the 
     *         ending point of the link. Must be a socket of type \c Output.
     */
    UCS_XRM_CONST Ucs_Xrm_ResObject_t *socket_out_obj_ptr;

} Ucs_Xrm_QoSCon_t;

/*------------------------------------------------------------------------------------------------*/
/* Type definitions                                                                               */
/*------------------------------------------------------------------------------------------------*/
/*! \brief Function signature used for the MOST Port status.
 *
 *  This callback function is called to report streaming-related information for a MOST Port.
 *  \param most_port_handle          Port resource handle.
 *  \param availability              State of the MOST port related to streaming connections.
 *  \param avail_info                Sub state to parameter \c availability.
 *  \param free_streaming_bw         Free streaming bandwidth for the dedicated MOST Port.
 *  \param user_ptr                  User reference provided in \ref Ucs_InitData_t "Ucs_InitData_t::user_ptr".
 *  \ingroup G_UCS_IRM
 */
typedef void (*Ucs_Xrm_Most_PortStatusCb_t)(uint16_t most_port_handle,
                                            Ucs_Most_PortAvail_t availability,
                                            Ucs_Most_PortAvailInfo_t avail_info,
                                            uint16_t free_streaming_bw,
                                            void* user_ptr);

/*! \brief  Function signature used for monitoring the XRM resources.
 *  \param  resource_type       The XRM resource type to be looked for
 *  \param  resource_ptr        Reference to the resource to be looked for
 *  \param  resource_infos      Resource information
 *  \param  endpoint_inst_ptr   Reference to the endpoint object that encapsulates the given resource.
 *  \param  user_ptr            User reference provided in \ref Ucs_InitData_t "Ucs_InitData_t::user_ptr"
 */
typedef void (*Ucs_Xrm_ResourceDebugCb_t)(Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos, void *endpoint_inst_ptr, void *user_ptr);

/*! \brief Function signature used for the check unmute callback.
 *
 *   Whenever this callback function is called and the EHC has sink connections muted by the mute pin, the application has to ensure that this mute pin is not asserted before attempting unmute.
 *  \param  node_address  The node address of the device to be looked for.
 *  \ingroup G_UCS_IRM
 */
typedef void (*Ucs_Xrm_CheckUnmuteCb_t)(uint16_t node_address, void *user_ptr);


#ifdef __cplusplus
}   /* extern "C" */
#endif

#endif  /* #ifndef UCS_XRM_PB_H */

/*! @} */

/*------------------------------------------------------------------------------------------------*/
/* End of file                                                                                    */
/*------------------------------------------------------------------------------------------------*/